This is second generation of the soldering controller for hakko 907 handle. This version implements lcd display to simplify controller building. Also, high frequency PWM signal is used to make the controller silent.
This generation of the controller used external power supply from notebook, allowing more flexibility and portability of the controller. You can easily replace the power supply with another one and put the controller and power supply in one big box if you want.
The controller deals with the hakko 907 soldering handle with replaceable tips and has built-in heater element and thermoresistor to check the iron temperature. The handle has two independed electrical circuits for iron heating and temperature checking. This controller can be implemented with another iron handle that has this architecture.
For whom, who is not familiar with the first version of the controller, i can say that the first problem of hakko 907 iron was the rarely used connector that was replaced with aviation plug GX16-5.
The key features of this controller are:
- The PID algorithm is implemented to keep the temperature of the soldering iron. The iron raises the temperature in about 30 seconds and keeps it inside 1-2 degrees of Celsius.The controller keeps the temperature in case of heavy usage because the PID algorithm is very sensitive and can quickly increase the supplied power.
Three reference temperature points implemented in the soldering iron calibration.
The calibration procedure is automated by use of PID algorithm to keep the temperature near reference point.
- The controller supports two working modes: keep the temperature and keep the power supplied.
- To keep the operation silent, the Timer1 high frequency PWM signal is used. This allows increase the PWM frequency up to 31250 Hz instead of 490 Hz by built-in analogWrite() function.
- The controller has automatic power-off feature in case of inactivity.
- The controller implements accelerated rotary encoder. When the encoder is rotated slowly, the temperature setting is changed by 1 degree. When the encoder rotated quickly, the temperature setting is changed by 5 degrees.
- The temperature is stored in arduino EEPROM after the soldering iron was used in case the temperature settings were changed.
- The controller support two temperature units (Celsius or Fahrenheit) used for the displayed temperature value.
- The controller has tune mode to simplify the initial setup procedure of the controller.
Step 1: The Controller Menu
The controller has several modes:
- standby mode
- main working mode (keep the temperature)
- power mode (manually change the supplied power)
- setup mode
- calibration mode
- tune mode (soldering controller initial setup)
When the controller is just powered on, the standby mode is activated. In this mode the soldering iron is powered off and the main display shows the preset temperature and the current temperature of the iron. The 'OFF' message in the up-right corner is indicating that the iron is powered off. In case the iron is not connected to the controller, the message 'no iron' would be displayed on the second line. When the iron become cold after usage, the 'cold' message would be displayed on the second line. This means you can safely touch the iron.
The preset temperature can be adjusted by rotating the encoder handle while the iron is off. To power on the soldering iron, push the encoder handle lightly. The controller will be switched to the main mode. In the main mode the controller keeps the iron temperature near the preset one. The display shows preset and current temperatures, power supplied in percents of maximum possible power. In the up-right corner of the display you can see the current status 'ON' - if the iron is heating, 'rdy' (ready) when the iron is ready for use or 'wrk' when the iron was recently used or just heated.
By rotating the encoder it is possible to change the preset temperature. The message 'ON' will be showed again till the iron reaches the new preset temperature. To return to the standby mode, press the encoder handle lightly.
In the main mode, the controller checks that the iron is working properly. If in 10 seconds from start the temperature of the iron would not changed, the controller would switched off the power and the message 'Failed' would be displayed on the screen. Light press the encoder button to return to the standby mode.
The power mode can be switched on by long press the encoder while it is in the main mode. In the power mode, you can adjust the power supplied to the soldering iron manually by rotating the encoder handle. In the power mode the screen shows the power supplied to the iron in the internal units and the iron temperature in human readable units. Light press of the encoder toggles on-off power in the power mode. Long press of rotary encoder handle will return the controller from power mode to the main mode.
To get to the setup mode, long press the encoder in standby mode. In the setup mode the configuration parameters can be adjusted. There are 7 menu entries in the setup mode: automatic power-off timeout, temperature units (Celsius or Fahrenheit), the iron calibration ('calib.'), the controller initial setup procedure ('tune'), save changes, cancel the changes and set default parameters.
Rotate the encoder handle to select the desired menu item. To change the selected item, press lightly the encoder handle. After adjusting the parameter, press the handle again to return to the setup menu. Long press of the encoder handle can be used to return back to standby mode and save the parameters in the EEPROM.
When you setup the controller for first time or update the firmware, it is recommended to load default configuration by selecting the 'default' menu item.
Step 2: The Sensor Readings Schematics
The schematics of sensor reading of this controller is shown on the picture above. This iron hakko 907 handle uses the thermoresistor to measure the temperature. The 10k resistor is used in the schematics to set power to the iron sensor.
In the second generation of the controller i have replaced the chip amplifier lm358 with the high-accuracy amplifier that implements rail-to-rail technology. This amplifier produces near full voltage supplied to the output pin. So the interval of readings on the A0 pin is increased also from 0 to 1023. This amplifier significantly increases the accuracy of the temperature readings and allows the controller to keep the temperature of the iron inside the smaller temperature interval. You can replace the ad822 amplifier with its analog if you wish.
While the iron is heating, the resistance of the sensor increased from about 50 ohm when it is cold to about 200 ohm when the temperature of the soldering iron becomes 400 degrees of Celsius. Probably, another iron handle can have the different parameters, so i decided to use a variable resistor to tune the operating amplifier AD822. This variable resistor should be tuned the following way: when the iron is 400 degree of Celsius, the output voltage should become near 5 volts (reading of A0 pin in the arduino is 900).
For the first time the controller should be tuned by adjusting the potentiometer. To simplify the initial setup procedure the tune mode is implemented inside the controller. The tune mode can be run from the settings menu.
Step 3: The Timer1 High Frequency PWM Signal
To make the controller silent, Timer1 high frequency (31.5 kHz) PWM signal generation is used. No one can hear this noise. To make the the mosfet running at this high frequency the two-transistor driver is implemented in the schematics. This forum thread explains the problem in details. In short, the mosfet has capacitance inside that require time to charge or discharge. To increase the speed of mosfet, the two-transistors driver is implemented on bipolar transistors. You can use another transistor pair.
Step 4: Let's Combine All the Parts Together
The complete schematics is shown on the picture abive. You can place all the components on the small PCB behing the 0802 lcd screen as i did. To preserve the capatitors inside the power supply, the inductivity is implemented in the schematics. You can buy some inductivity of 200-1000 uH or create the one by yourself. You need the ferrit core of 2 cm in diameter and the copper wire of 1 mm. Put the wire to the core till it become full.
You can skip this inductivity from the controller, just replace it with direct wire.
Here is the github repository of the project. In this repository you can find the schematics file for dipTrace program.
This is the component list:
- hakko 907 iron handle;
- 5 pin aviation plug GX12-5;
- dc-dc adjustable converter;
Arduino Nano R3;
ac-dc notebook power supply, 24 v;
lcd screen 8x2 (can be replaced by 16x2 display);
Operating amplifier ad822 or analog;
fr304 Fast Recovery Rectifier Diode;
General Purpose Transistor NPN;
General Purpose Transistor PNP;
Rotary Encoder with Push-Button;
Capacitor 1000 uF 35v;
Capacitor 100 nF - 4 pcs;
Resistor 1k ohm - 2pcs;
Resistor 2.2k ohm;
Resistor 10k ohm;
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn) - 2pcs;
The ferrit core;
Step 5: Initial Setup of the Controller
You need external thermometer to setup the controller.
First, load default parameter of the controller from setup menu.
The variable resistor has to be adjusted to get the operating amplifier the correct signal from the soldering iron. In the program is assumed that the working temperature interval of soldering iron is 180 - 400 degrees of Celsius. It is possible to change this interval by editing constants in the program sketch.
To simplify initial setup procedure of the controller, tune mode is implemented.
Select 'tune' menu item from the setup menu. The iron starts heating. The controller displays the temperature readings in internal units (0-1023) in this mode. Rotating the encoder adjust the power to keep the 400 degrees of centigrade (use external thermometer). At the beginning you can increase the supplied power to the maximum value to speed up the iron heating, then decrease the power to keep the temperature at the 400 degrees. Now rotate the variable resistor handle to get the sensor readings near 900. Ensure that this readings is not the maximum one, rotate the variable register and get 930-950, then return back to 900. It is important because the controller should be able to measure the temperature greater than maximum value. When the variable register adjusted, press and hold the encoder handle for about 2 seconds. The initial setup procedure is complete.
Step 6: Calibrate the Soldering Iron
The controller reads the temperature in internal units (0-1023) by reading the voltage on A0 arduino pin. It is convenient for us to use the human readable units like degrees of Celsius or Fahrenheit. The controller has default parameters that allow to translate internal temperature readings into human readable units. But the soldering iron could be different so the calibration procedure implemented in the controller. There are three reference points for soldering iron calibration: 200, 300 and 400 degrees of Celsius. The controller saves internal readings for these three reference points and uses them to convert the temperature.
Select 'calib.' menu item from the setup menu to start calibration process. Select desired calibration point from the menu list (200, 300 or 400) and switch-on the iron by pressing the encoder handle. The soldering iron starts heating. The PID algorithm allows reach the desired temperature in short time. When the reference point temperature would be reached, the controller 'beeps' indicating it is ready to check the temperature by external sensor. Wait a little allowing the temperature to stabilize then check the real temperature of the soldering iron by external sensor (thermocouple). Then, rotate the handle of the rotary encoder and select read temperature of the iron. Press the encoder handle slightly. The controller saves the real temperature for the reference point. Select the next reference temperature and repeat the procedure. You can calibrate the reference temperature one more time by selecting desired reference point. When you finish the calibration, long press the rotary encoder handle. Now the controller saved new values for all reference temperatures you have selected.
Step 7: Automatic Power-off Feature
The automatic switch-off feature has been implemented in the second generation of the controller. This was a great challenge because the iron handle has no shock sensor or other way to verify correctly the iron is in use now or just is laying down on the table. The main idea was to use the value of supplied power to the iron. In the idle state, the controller decreased the power to the minimum value to keep the preset temperature. Unfortunately, the math dispersions of the temperature and the supplied power are not constant in the idle state and can periodically deviate. Tuning the PID algorithm parameters, i have stabilized the readings and minimized both dispersions. Now the controller in the idle state keeps the temperature dispersion as low as possible. The criteria of the iron usage is the power has been incremented slightly from the smallest value registered. This algorithm has been tested for a while and proved could be used for automatic power-off feature.
This solution is not very reliable so you can disable this feature if something will be going wrong. Also, the sketch contains the class for debug and tune the PID parameters manually. You can implement another iron handle in your version of the controller, the handle can have the shock sensor or similar to surely distinguish the idle state.