Soldering Iron Controller for hakko T12 tips on arduino

First, there was an Idea

When I surfing the Internet for interesting projects, the hand made soldering station project touched me very much. The project at the same time was not really complicated, well documented and very useful. I used the generic soldering iron without any controller and could not imagine the difference between generic iron and this one. So it was brilliant idea to create own controller to try it out.

This project shows how to create your own soldering iron controller for amazing hakko t12 tips on Arduino. This is my first soldering controller for these tips.

The hakko t12 soldering tips are the best tool for soldering i have seen. They are just amazing: they are heating very fast and can reach very high temperatures. I have seen the red iron when the controller hanged for some trouble. They have built-in thermo couple to control the temperature and this feature allows to manage the temperature very accurate and very fast. They can be switched in the handle on the fly in 1 second if you need. If you have not tried them yet i would highly recommend to try.

The main features of this controller are:

  • PID algorithm used to manage the supplied power. This allows to keep the required temperature 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. The controller is working silently.
  • Accelerated rotary encoder algorithm implemented in the controller, allowing quickly tune the preset temperature and other settings.
  • The temperature can be displayed in two degrees: Celsius or Fahrenheit.
  • The controller implements automatic power-off precedure in case of inactivity.

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 recomend you to order the FX-9501 one. This handle is very light weight, convenient and have good quality socket (inside) to plug the tip. You can easily change the tip on the fly if you wish. Of course, you need some tool, because the tip is very hot to be touched by nands.

The tip has 3 wires: "+", "-" and 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. The cable of the FX-9501 handle is a light, flefible and very convenient to use.

First problem: the connector

First problem is the connector on the handle. It is so rarely used, i could not find the socket for it, so i used another pair of connectors that suit the characteristics of the soldering iron. This connector is aviation plug GX12-5. So i could recommend this connector very much. It could be ordered on e-bay or another site.

Connect the sensor

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 temperature. The thermo couple generates very small voltage, about several milivolts, 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 alredy solved by qualified people: they used zener diode to limit the voltage on te input cirquit. 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 two such amplifiers on e-bay supplier for $5 each. Now you can find much more cheaper variand of this amplifier on Chineese suppliers. Unfortunately, this variant is much noisy. So it is better to use another non-expensive amplifier, mcp601 for this controller.

The temperature of the iron is cheked 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 check that the tip is connected to the controller and start the 'change tip' procedure if the tip would disconnected from the handle.

Supply the power to the iron

The first idea of supplying power to the iron was to use PWM signal by analogWrite() function of Arduino. Unfortunatelly, the default frequency of the Arduino PWM signal is 490 Hz and the iron start crying (make a noise) while heating. It was rediculus. To make the iron silent, The TIMER1 fast PWM signal running 31250 Hz is used to power the iron. The mosfet has near zero resistance while it is open and about infinite resistance when it is closed. But in the intermediate state (while the mosfet is switching) the resistance become valuable and the mosfet start heating. This forum thread explains the problem in details. In short, the MOSFET has capacitance in the gate that requires time to charge or discharge. To increase the speed of the MOSFET, the three-transistor driver is implemented on bipolar transistors in the schematis.

Zener diode (18V) is used to limit the Gate voltage (Vgs) of the MOSFET while it is open because the power supply voltage is higher than maximum value of mosfet vgs voltage. The diode FR104 removes the power from the iron when the MOSFET 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. This inductivity prevents flickering of the electricity while the iron is heating.

Build the controller

The complete controller schematics is shown on the picture below. The controller is built on the atmega328p-pu bmicrocontroller 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. In the 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.

Tune the controller

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 expeted temperature readings at pin1. 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 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.

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 adjusted, press and hold the encoder handle for about 2 seconds. The initial setup procedure now is complete.

In the program sketch 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 before you plan to tune the controller.

It is recommended to use the thick tip that produce the highest voltage to perform the tupe procedure. For example, T12-K, T12-D52 or so.

Working Modes

The controller has several modes:

  • Standby mode
  • Main working mode (keep the 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. The main display shows the following information:

  • The preset temperature in the left side of the upper line (in units selected - Celsius or Fahrenheit);
  • The 'OFF' message in the right side of the upper line indicating that the iron is powered off;
  • The current temperature of the iron in 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 from the list you going to insert, 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 controller will be switched to the main mode. Now the controller keeps the iron temperature near the preset one. When the iron is heavily used, the temperature can slightly deviate from the preset temperture.

In the main mode the display shows the following information:

  • The preset temperature in the left side of the upper line (in units selected - Celsius or Fahrenheit)
  • The 'ON' message in 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. Ifthe current through the iron would not detected, the controller would switched 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 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 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 rotary encoder handle will return the controller from power mode to the main mode.

The Controller Menu

To get to the controler 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 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.

Calibrate the Soldering Tip

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 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 (thermo couple). Then, rotate the handle of the rotary encoder and select real temperature of the iron. Press the encoder handle lightly. The controller saves the real temperature for 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 calibrate the iron more accurate. When you finish the calibration, long press the rotary encoder handle. Now the controller saved new values for all reference temperatures you have selected.

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.

Conclusion

It is the great pleasure to use controlled soldering iron. It is heating quickly and keeps the temperature suitable for the situation.