Software apps and online services
Hand tools and fabrication machines
In this project i will show you how to create your own soldering iron controller for amazing Hakko T12 tips on Arduino. This is my first soldering controller for hakko T12 tips.
The Hakko T12 soldering tips are amazing tools for soldering: they heat very fast and can reach very high temperatures in a short period of time. Each tip have a built-in thermo couple to control its temperature very accurately. Also, using apporpriate handle, you can replace the tip on the fly in 1 second.
The main features of this controller are:
- PID algorithm used to manage the supplied power. This allows you to keep the required temperature of the tip very accurate.
- The controller supports individual calibration of the tip by three reference points: 200, 300 and 400 degrees Celsius.
- There is a calibration procedure in the controller simplifying the tip calibration process.
- The controller uses high-frequency PWM signal to control the supplied power and controller is working silently.
- Accelerated rotary encoder algorithm implemented in the controller. While the encoder rorated sowly, the temperature preset changes by 1 degree and if you turn the knob fastly, the temperature preset would be increased by 5 degrees.
- The temperature can be displayed in two degrees: Celsius or Fahrenheit.
- The controller implements automatic power-off procedure in case of inactivity.
The Hakko T12 soldering tips
The first thing you need to use these tips is a handle. There are a several handles for these tips in the market and I would like to recommend you to order the FX-9501 one. This handle has a light weight, very convenient and has a good quality socket (inside) to plug the tip. You can easily change the tip on the fly if you wish.
The tip has 3 wires: "+", "-" and earth ground. The heater is connected consequently with the thermo couple inside the tip, so it required only two wires to be connected to the controller.
First problem was the original connector of the handle. It is so rarely used, I could not find the socket for it, so I used the aviation plug GX12-5.
As I mentioned before, the tip uses two wires to heat and to check the temperature. The controller puts some power to the iron for some period then turns the power off and checks the tip temperature. The thermo couple generates very small voltage, about several millivolts, so to check this voltage operating amplifier is implemented in the schematics. But the amplifier does not like a 24 volts on its input and could be destroyed. Hopefully, this problem has been already solved by qualified people: they used Zener diode to limit the voltage on the input circuit. You can see the sensor part of the schematics on the picture below.
The main component of the schematics is a dual channel operating amplifier, ad822. It has a mosfet transistors on its input, is rail-to-rail and has very low noise. I have bought couple of amplifiers on eBay supplier for $5 each. Now you can find much more cheaper variant of this amplifier on Chinese suppliers. Unfortunately, this variant is much noisy. So it is better to use another non-expensive amplifier, mcp602 for this controller.
The temperature of the iron is checked by the first amplifier on pins 1, 2, 3 and the current through the iron is checked by the second amplifier on pins 5, 6, 7. This allows to ensure that the tip is connected to the controller. When the tip removed from the handle the controller starts 'change tip' procedure alowing you to select new tip from the tip list menu.
The first idea of supplying power to the iron was to use PWM signal by analogWrite() function of Arduino. Unfortunately, the default frequency of the Arduino PWM signal is 490 Hz and the iron makes a noise while heating. It was ridiculous. To make the iron silent the high-frequency PWM signal implemented on TIMER1 running 31250 Hz to power the iron. To allow the FET managing such high frequency PWM signal, the three transistor mosfet driver is implemented in the schematics.
For short, the FET has near zero resistance while it is open and about infinite resistance when it is closed. But in the intermediate state (while the FET is switching) the resistance become valuable and the FET starts heating. Beause the FET has capacitance in the gate that requires time to charge or discharge. This forum thread explains the problem in details.
Zener diode (18V) is used to limit the Gate voltage (Vgs) of the FET while it is open because the power supply voltage is higher than maximum value of mosfet vgs voltage. The fast recoverable diode FR104 removes the power from the iron when the FET is closed. You can replace this diode with another one, but you must use fast recoverable diode.
The inductivity shown in the schematics is a tor of outer diameter about 1.5 cm wired with 20 cm long copper. The inductivity is about 100 uH. This inductance prevents flickering of the electricity while the iron is heating.
The complete controller schematics is shown on the picture below. The controller is built on the atmega328p-pu micro controller running at 16 MHz. You can use Arduino nano board if you wish. They are completely compatible.
As you can see on the picture, the DC-DC converter is used to get 5v for the operating amplifier and to power the micro controller. The WSTECH DC-DC isolated converter is implemented. It supplies very stable power for the operating amplifier.
The software sketch can be downloaded from the GitHub repository.
The external thermo couple required to tune the potentiometer.
In the controller schematics you can see the potentiometer that tunes the operation amplifier to get the expected temperature readings at Arduino pin A0. You can use different operating amplifier, you can use different tips so this potentiometer increases the controller flexibility. This potentiometer should be tuned at least once when you created the controller. The main idea is that the controller reads the voltage from the thermo couple through the ADC and gets some integer data in the interval 0-1023 depending of the voltage on its pin. The near the voltage to 5v the near the readings to the 1023. The potentiometer should be tuned so when the iron temperature become 400 centegrees, the ADC reading should be about 900.
To tune the potentiometer, select 'tune' menu item from the setup menu. The iron starts heating. The controller displays the temperature readings from A0 pin in the internal units (0-1023) in this mode. By rotating the encoder you can adjust the power to keep the iron temperature of 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 multi-turn potentiometer 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 400 degrees of Centigrade.
When the variable register is adjusted, press and hold the encoder handle for about 2 seconds. The initial setup procedure now is complete.
Note: the sketch assumes that the working temperature interval of the soldering iron is 180 - 400 degrees of Celsius. It is possible to change this interval by editing constants in the program sketch before you plan to tune the controller.
It is recommended to use the thick tip that produces the highest voltage to perform the tune procedure. For example, T12-K, T12-D52 or so.
The controller has several modes:
- Standby mode
- Main working mode (keep the preset temperature)
- Power mode (keep the supplied power)
- Setup mode
- Calibration mode
- Tune mode (the initial setup procedure)
When the controller is just powered on, the standby mode is activated. In this mode the soldering iron is powered off. The main display shows the following information:
- The preset temperature on the left side of the upper line (in units selected - Celsius or Fahrenheit);
- The 'OFF' message on the right side of the upper line indicating that the iron is powered off;
- The current temperature of the iron is on the left side of the second line;
In case the iron is not connected to the controller, the controller starts tip selection mode. Select the tip name you going to insert from the tip list, then insert the tip.
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 main working mode of controller will be activated. Now the controller keeps the iron temperature near the preset one.
In the main mode the display shows the following information:
- The preset temperature on the left side of the upper line (in units selected - Celsius or Fahrenheit)
- The 'ON' message on the right side of the upper line indicating that the iron is powered on and is still heating. When the iron reaches the preset temperature, the '
rdy' (ready) message will be displayed;
- The current temperature of the iron is displayed in the left side of the second line;
- The power supplied to the iron (in percents of the maximum allowable power) is displayed in the right side of the screen;
By rotating the encoder it is possible to change the preset temperature. The message 'ON' would be showed again till the iron would reached 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 the current through the iron would not detected, the controller would switch off the power and the message '
Failed ' would be displayed on the screen. In this case, press the encoder button lightly to return to the standby mode.
The power mode can be switched on by long pressing 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 encoder. 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. By pressing the encoder toggles on-off power in the power mode. Long press of the rotary encoder handle will return the controller from power mode to the main working mode.
To get to the controller setup menu, long press the encoder in standby mode. In the setup mode the configuration parameters can be adjusted. There are 6 menu entries in this mode:
- automatic power-off timeout (in minutes)
- temperature units (Celsius or Fahrenheit)
- the iron calibration ('calib.')
- initial setup procedure ('tune')
- save the changes
- cancel the changes
Rotate the handle to select the menu item. To change the selected item, press lightly on 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.
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. 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 from internal reading to human readable values.
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 would 'beep' 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. Then rotate the handle of the rotary encoder and enter the real temperature of the iron. Press the encoder handle lightly. The controller saves the real temperature of the reference point. Select the next reference temperature and repeat the procedure. You can setup any reference point multiple times. Every time, you save real temperature for reference point, the controller updates translation formula. This allows you to calibrate the iron more accurately. When you finish the calibration, long press the rotary encoder handle. Now the controller saved new values for all reference temperatures you have selected.
The automatic switch-off feature has been implemented in the second generation of the controller. This was a challenge because the iron handle has no shock sensor or other way to verify correctly the iron is in use 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 low. 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 working fine for automatic power-off feature.
This solution is not high 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.