Introduction: The Digital Controller for Amazing T12 Soldering Tips

Picture of The Digital Controller for Amazing T12 Soldering Tips

Updated 10/21/2017. New PID parameters used. Fixed FET connectivity in the schematics.

Updated 10/14/2017. Fixed unstable work with 'thin' soldering tips such as T12-BC1, T12-JL02, T12-IL, T12-D12 by Increasing the frequency of temperature sampling to 50 Hz.. New PID coefficients implemented. No hardware change required, no configuration changes required, just update the firmware of your controller.

Updated 7/1/2017. New software features are available: new per-tip calibration and high-frequency temperature check by Timer1, no additional software library required.

It was a brilliant idea to create the hakko t12 soldering tips. They are just great: can keep the required temperature within the small interval, are compact and are heating extremely fast. Usually it takes about 12-15 seconds to reach the required temperature. You can buy great and expensive soldering station that uses these tips, or you can make own digital soldering controller based on arduino and invest more interesting details. In this project i will show you how to create non-expensive controller for hakko t12. The main feature of the controller is PID algorithm, that allows to supply the power to the iron smoothly and keep the required temperature very accurate.

The key features of this controller are:

  • Each tip can be calibrated separately by 3 reference points to increase the accuracy.
  • The PID method is implemented to keep the temperature of the soldering iron. The iron raises the temperature in about 12-15 seconds and keeps it inside 1 degree 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.
  • The controller supports two working modes: keep the temperature and keep the power supplied.
  • The controller is silent. The Timer1 working at 31250 Hz is used to generate the PWM signal.
  • 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 saves in EEPROM units used for the displayed temperature (Celsius or Fahrenheit), preset temperature and calibration data.
  • Automatic switch-off in case of idle operation is implemented.

Step 1: The Connector

Picture of The Connector

First problem was the connector, supplied with the soldering iron handle. It was 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 is aviation plug GX16-5 (or you can use GX16-5) with 5 pins.The wires of the iron handle are: black - minus, green - plus (24v), red - should be ground. Actually, i did not attached the red wire anywhere. The main two wires are the black one which is connected to the ground of the controller (minus) and the green one which is connected to the plus pin.

Step 2: Connect the Sensors

Picture of Connect the Sensors

Second problem was the iron tip uses the same pins for heating and to check the temperature. The iron has the thermocouple inside that is connected consequently with the heating element. The thermocouple generates a small amount of electricity, about 2-9 millivolts depending on the iron temperature. The black wire is minus, the green wire is plus, do not change them. To register this electricity accurate operating amplifier IC must be used. But, the iron should be powered through the same two wires. No one operating amplifier likes 24 volts on the input pins! Fortunately, some qualified people have solved this problem already. Here is the soldering iron controller for the hakko t12 iron. The schematics have brilliant idea to use the zener diode (vd6) to limit voltage on the input pin of the operating amplifier. As you can see on the picture above, In my controller 3.3 v zener diode is implemented.

The controller has two parameters to check: the iron temperature via first amplifier on pins 1,2,3 and the current that is going through the soldering iron via the second amplifier on pins 5,6,7. First amplifier should be tuned by 500k potentiometer at least for the first time. This variable resistor should be tuned the following way: when the iron is 450 degree of Celsius, the output voltage should become near 5 volts (reading of A0 pin in the arduino near 850-900). To simplify the calibrate procedure the tune mode is implemented inside the controller software. The tune mode can be run from the settings menu. The tune procedure usually runs only once: it is implemented to help adjusting the variable register so the controller could correctly check the iron temperature.

The second amplifier is used to check the soldering iron is connected to the controller. The controller switch on power to the iron and checks the current is going through it. The 1uF and 100n capacitors increase the readings stability. The current is checked permanently when the iron is powered on and is checked every second by the small amount of power every second when the iron is switched off.

Step 3: Make It Silent

Picture of Make It Silent

To supply the power to the iron, the P-channel mosfet transistor is implemented. Arduino controler can manage this mosfet throughout the PWM signal. The arduino built-in software library implements the function analogWrite() to manage PWM pins. Unfortunately, the frequency of the standard PWM signal is 490 Hz. If this function would be implemented, the controller would generate the noise while the power supplied to the iron. But who need such a noise? To make the controller silent, PWM signal generated by Timer1 running at 31250 Hz is used.

Each mosfet has some capacitance on the gate. This capacitance is really matters when we need to switch the mosfet quickly. Here you can find the detailed description of the problem along with the schematics that allows manage the mosfet at the high frequency. The schematics of the heater is shown in the picture. To increase the speed of mosfet, the two-transistors driver is implemented on bipolar transistors. You can use another transistor pair. The fr304 diode does not allow the backward current when the mosfet is closed. You can change this diode with another high frequency impulse diode.

Step 4: Assemble the Controller

Picture of Assemble the Controller

You can divide the controller into two pieces: hight-voltage heater part and low-voltage sensor part. The high-voltage heater consists of the mosfet and its driver and fr304 diode. The low-voltage part can be placed on the PCB that plugged directly to the lcd screen (just behind the screen) and consists of arduino microcontroller and operating amplifier.

Here is the list of the components you need to build the controller:

  • AC-DC power supply 24 v.
  • AC-DC isolated power supply 5v for the controller.
  • Arduino controller (for example arduino nano v3). I used the atmega328p-pu controller with 16 MHz oscillator and two 22 pF capacitors because it is more compact. Do not forget to burn the bootloader inside the controller.
  • lcd 0802 display
  • irf9540 mosfet
  • npn general purpose transistor ksp10 (2n2222 is better) - 2 pcs.
  • pnp general purpose transistor s9012h (2n2907 is better)
  • Zener diode 3.3 volts
  • Zener diode 18 volts
  • FR304 FAST RECOVERY RECTIFIER diode(you can use another impulse diode)
  • Operating amplifier ad822 Rail to Rail with mosfet input (can be replaced by analog)
  • 0.22 Ohm 5 watt power resister to check the current
  • 100 Ohm resister - 2 pcs
  • 470 Ohm resister - 2 pc
  • 220k resister
  • 1k resister - 3 pcs
  • 5.1k resister
  • 10k resister - 3 pc
  • 100k resister
  • 10k potentiometer
  • 500k potentiometer
  • 1uF ceramic capacitor
  • 100 nF ceramic capacitor - 5 pcs
  • rotary encoder with the push button
  • buzzer
  • connector GX12-5 (or another)

Do not use the DC-DC converter or non-isolated power supply to get 5 volts for the controller. These devices can have small distortion on the ground pin and there can be negative voltage on the input pin of the amplifier. In that case is not possible to check the iron temperature. You can buy another isolated power supply or build the one by yourself from old transformer power adapter and 7805 voltage regulator.

Finally, burn the sketch to the controller.

Step 5: The Controller Menu

Picture of The Controller Menu

As i mention before, the controller has several modes:

  • standby mode
  • main working mode (keep the temperature)
  • power mode (manually regulate the power)
  • setup mode
  • tip calibration mode
  • tip selection mode
  • tune mode (tune the potentiometer)

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 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 not powered;
  • The current temperature of the iron in the left side of the second line;

When the iron become cold after it was used, the 'cold' message is displayed on the second line. The preset temperature can be adjusted by rotating the encoder handle while the iron is powered off.

Sometimes the active tip name is displayed in the upper-left corner of the standby screen instead of the preset temperature.

Tip selection mode is activated from standby mode when the iron tip (or iron handle) disconnected from the controller. When you remove the tip from the handle, the controller allows you to select new tip from the list menu of supported tips. This list can be adjusted in the sketch manually by editing the source code. As you can see, by default the sketch supports 5 different tips. You can change this number and you can supply new names of your tips (each tip name could have up to 4 letter in its name).

You can select new tip name from the menu list before plug the tip in the handle.

To power on the soldering iron, push the encoder handle lightly. The controller will be switched on and the main working mode activated. Now the controller keeps the iron temperature near the preset temperature. When the iron is heavily used, the temperature can deviate from the preset one. 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 heating. When the iron reaches the preset temperature, the 'rdy' (ready) message will be displayed. The 'wrk' message indicates that the iron is in use;
  • The current temperature of the iron is displayed in the left side of the second line;
  • The power supplied to the iron (in percents) is displayed in the right side of the screen;

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 working mode, the controller checks for the current through the iron. If the current would not detected, the controller switches off the power and the message 'Failed' would 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 manually adjust the power supplied to the soldering iron by rotating encoder. In the power mode the screen shows the power supplied to the iron in the internal units (0-255) 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 6 menu entries in this mode:

  • Automatic switch-off timeout is minites [3-30]. This feature can be disabled. To work properly you may need to tune the PID algorithm parameters manually;
  • Temperature units (Celsius or Fahrenheit);
  • Tip calibration ('tip cfg');
  • The iron potentiometer calibration ('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. Or the parameters can be saved, by selecting the 'save' menu item.

Step 6: Tune the Controller

Picture of Tune the Controller

You need external thermometer to calibrate the controller.

As it was said before, the controller has to be tuned at least once. The
potentiometer 500k should be adjusted accordingly. When the iron reaches the temperature of 450 centigrade, the readings of the A0 analog pin should be 850-900. To simplify calibration procedure, the tune mode is implemented in the controller.

When the tune mode activated the iron is powered-off. Lightly press the encoder in the tune mode to toggle the iron on or off. Rotate the rotary encoder to switch the iron on or to change the supplied power. The controller displays the temperature readings in internal units (readings from A0 pin) in this mode. Rotating the encoder adjust the power to keep the 450 degrees of centigrade (use external thermometer). At the beginning you can increase the power to the maximum value to speed up the iron heating, then decrease the power to keep the temperature at the 450 degrees. You need to adjust the power to keep the iron temperature as near to 450 degrees as possible.

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 for about 2 seconds to return to the setup menu. The controller calibration successfully completed.

Step 7: Calibrate the Tip

Picture of Calibrate the Tip

You need external thermometer to calibrate the tip.

The hakko T12 tips have different parameters and have to be calibrated separately to keep the temperature more accurately. You can calibrate the currently selected tip. To change the tip, return to the standby mode, remove the tip from the handle and select new tip name from menu list rotating the encoder. Asterisk ('*') in the lower-right corner of the display indicates that this tip has not calibrated yet.

Each tip calibrated by three reference temperatures: 200, 300 and 400 degrees of Celsius. To calibrate the current tip, select 'tip cfg' menu item from the setup menu. The controller will be switched to the calibration mode. In this mode first select the desired reference temperature (200, 300 or 400 degrees of Celsius) then lightly press the encoder. The iron starts to heat and the controller would keep the iron temperature near the selected value. As soon the iron reaches the selected temperature, the buzzer will beep. This indicates that the controller is ready to adjust the temperature at his reference point. Use external thermometer to evaluate actual temperature of the iron, then rotate the encoder to adjust the reference point to the controller. Then press the encoder lightly. The reference point will be saved. Select all the temperature reference points to adjust. To finish the tip calibration, press and hold the encoder button for about 2 seconds.

As is was mention before, the tip list can be adjusted in the software sketch. You can add mode tips to the list and select new names of your tips. Tip name could be up to 4 symbols length.

If the tip is not calibrated, the calibration points are evaluated as the average value of all another tips that are calibrated. If there is no one tip calibrated in the controller, the default calibration points would be used.

Step 8: Automatic Power-off Feature

Picture of Automatic Power-off Feature

The automatic switch-off feature has been implemented in the controller. This was a great challenge because the iron handle has no shock sensor or other way to ensure 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 required temperature. Unfortunately, the math dispersions of the temperature and the supplied power are not constant in the idle state and can periodically change. Tuning the PID algorithm parameters, i have stabilized and minimized both dispersions. The controller in the idle state now 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 i suppose can be used for automatic power-off feature.

This solution is not very reliable so you can disable this feature.

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.


ОлегР7 (author)2017-11-14

Thank you!

ОлегР7 (author)2017-11-14

Hello, I really want to try to collect your controller circuit. Where can I get Arduino sketch for it?

sfrwmaker (author)ОлегР72017-11-14


ОлегР7 (author)2017-11-14

Hello, I really want to try to collect your controller circuit. Where can I get Arduino sketch for it?

ОлегР7 (author)2017-11-14

Hello, I really want to try to collect your controller circuit. Where can I get Arduino sketch for it?

ОлегР7 (author)2017-11-14

Hello, I really want to try to collect your controller circuit. Where can I get Arduino sketch for it?

geko1453 (author)2017-10-19

Hi the project is great and the idea was brilliant to
include multiple tips menu with individual tip config for each one.

I made the
project, but I have some major problems with the latest sketch 10/14/2017. The
tune procedure was easy and set the upper temperature limit at 450 C° as it’s described. The stability of the
set temperature at the working mode was perfect, but never appears the ``rdy``
state and no buzzer sounds.

same thing happens at the tip calibration menu, so I cannot calibrate the tip at
the three preset points 200 C°, 300 C°, or 400 C°, and standby mode doesn’t work at all.

hope you can help me.

WizziL (author)geko14532017-10-27

@geko1453 would be possible to share your design/schematics - I really love your layout but I would like to try include the stepdown to it with few more changes also.

geko1453 (author)WizziL2017-10-27

No problem my friend, any way it`s an open hardware, but the gold medal belongs to @sfrwmaker for the project. Get the link:

You will find two versions:

v1 is with external isolated ac-dc 5v converter

v1.1 is with on board non isolated dc-dc converter

The two versions works perfect. GOOD LUCK and be progressive.....

sfrwmaker (author)geko14532017-10-28

Thank you very much for the great job you have done. It is nice to see that the project is usefull.

sfrwmaker (author)geko14532017-10-19


I really sorry for that. It seems that the PID parameters are not suitable for your hardware. Are the temperature and power readings stable? I suppose they are not. You can tune the PID parameters by yourself. To do so, you should change the sketch a little to activate the PID tuner code.

Starting the line #2121 you can find three lines of code:

//pidSCREEN pidScr(&iron, &rotEncoder);

SCREEN *pCurrentScreen = &offScr;
//SCREEN *pCurrentScreen = &pidScr;

Comment out the first and the last ones, and comment the second line. Connect controller to the arduino and open "Serial port monitor" window. Now the controller allows to tune the PID parameters. Use rotary encoder to select on of them and change it. First put Kd and Ki to zero and decrease Kp.

I suppose that Kp is too big (768) you can decrease it to 512 or 256 first. Then increase Ki till the temperature would deviate near required one. The third parameter, Kd, allows to decrease deviation amplitude.

When you have finished, remember the new parameters and save them to the code (line #891).

Or you can wait till the weekend when I can tune the parameters for you.

sfrwmaker (author)sfrwmaker2017-10-19

Also, there could be an hardware problem in the controller. As soon as is checks the temperature 50 times per second, I suppose the PID parameters are not much significant. Are the temperature readings stable? You can use the 'power mode' to check it out. Apply not much power to the iron to prevent overheating (10-20%) and see of the temperature. If there are some 'invalid temperature readings', you surely have hardware problem. The operating amplifier (ad822 on the schematics) could produce significant distortion to the temperature readings.

geko1453 made it! (author)sfrwmaker2017-10-19

The readings on lcd are stable. If for example in the
working mode we set 300 C° to the controller, the temperature rises normally and
stabilizes at 300 C° sharp and the power varies ±2% (LCD readings).

Now at the power mode, when I set 20% power, I don’t see
any strange readings and the temperature is stable. With more detail check I have
noticed that above 300 C° the (rdy) state appears after 15-30 sec and after
that standby function works fine.

The AD822 is very nice and stable op-amp, and during
my PCB design i have placed all the parts of the sensor block as close to the
op-amp, in order to prevent any unusual behavior of the sensor block.

The only thing I have modified to the circuit was to
reverse the IRF9540 mosfet pins. At your schematic you have placed SOURCE of
the mosfet to the iron, and DRAIN to +24v line. I believe the correct is for a
P-channel mosfet SOURCE +24v line, and DRAIN to the iron and everything worked fine
at power control. Finally I have used some 100n filter capacitors near the power
line of ATmega328p and AD822.

If you have time just check the PID algorithm.

sfrwmaker (author)geko14532017-10-21


I have found more stable parameters, see the line # 894:

PID(void) {
Kp = 2009;
Ki = 16;
Kd = 2048;

The sketch has been updated. The schematics are updated also to show the FET correctly.

You have created excellent schematics. What program have you used to create it?

It seems you have great background in the electronics. Can you help me to solve one problem in my schematics? I do not like the separate isolated power supply to power the Arduino. I tried to use DC-DC converter and thits worked very bad. I have only simple tester at home and I nave measured a negative voltage difference between the groung of 24 vols power supply and ground after DC-DC converter. May be you have an idea how to power the arduino controller without a separate isolated power supply?

geko1453 (author)sfrwmaker2017-10-23

Send to me a simple drawing to see how did you wire
the 24v PSU and the DC-DC step-down converter ( non isolated) you`ve used, with
the controller. You`ve said that you`ve measured a negative voltage difference
between the ground of 24 volts power supply and ground after DC-DC converter.

sfrwmaker (author)geko14532017-10-24


Here is the schematics i used with this ( DC-DC converter.

As you can see, the converter has dwo pins for input and another two for output. I have seen that the ground line goes directly from input to output. Unfortunatelly, there was a voltage differene. I supposed that the problem is that the converter is not transformer based one, not isolated.

I am trying to find the schematics for islated DC-dC converter. I supose, that there should be some high-frequency generator in the input cirquit, the transformer which 'generated' about 7 v on the secondary cirquit and finali linear voltage regulator such as ams1117-5.0. The problems are the generator and the transformer.

geko1453 made it! (author)sfrwmaker2017-10-24

Well I saw your schematic and you`ve done correct wiring
between two PSUs. One common GND, and two volt outs 24v and 5v. I assume you
used a step down converter like this in the picture. It uses LM2577 or something
like that, which is a simple switch regulator. The strange thing is why you get
voltage difference between two grounds. In fact is one ground.

Yesterday I did some tests on the controller. I
removed the isolated 220v ac to 5v dc PSU and I used a small non isolated regulated switch
DC-DC step down converter ( see picture) with the big 24v power supply. I had absolutely
0v between (two grounds) actually is one ground. I used one tip t12-BC2 to checked
the work of the controller, at three temperature points 200 °C,
300 °C, or 400 °C. The controller worked smoothly, stably, with no strange
readings at all functions (see pictures), just like when I used the isolated
power supply. Now if you insist to use an isolated dc-dc step down module, have
a look at this one
( I haven’t used it so I have no review
to give you).

sfrwmaker (author)geko14532017-10-25

Thank you very much for your assistance. I have ordered the isolated DC-DC converter you have had sugested. I amd going to build mobile verion of hakko t12 soldering controller that use the standard notebook PSU in a small case.

geko1453 (author)sfrwmaker2017-10-25

which of two DC-DC converter you`ve ordered? The small green one that i use is non-isolated

sfrwmaker (author)geko14532017-10-25

The isolated, non-adjustable one.

geko1453 (author)sfrwmaker2017-10-25

You mean this module on the pictures. Seems good, but make a pcb don`t
use just a breadboard and wires as your prototype. Op-amp IC has small
signals and it`s sensitive and might have instability......GOOD LUCK with the progress.

geko1453 made it! (author)sfrwmaker2017-10-22

Hi….. I`ve checked the 21-10-17 sketch with the new
PID parameters with two tips T12-BC2 and BC3 and the controller worked perfect
to all functions, even the most difficult one the (STANDBY) function worked
perfect too.***CONGRATULATIONS*** . I have ten different shape tips that I use
so I have to check them all, and then I will give you a detailed review.

The CAD I use for many years to design schematics and
pcb`s is EAGLE.

T-12 tips (see picture), have a very special design. They use heating
element and thermocouple sensor wired in series. So we have only two wires to
heat the tip and check the temperature. It could be better to use two separated
(isolated) PSU`s for more stable work. I use this tinny switch PSU for 5v line
that works perfect. .

As for the 24v line the PSU you use is perfect. Now if you insist to use just one PSU there are
some multiple output power supplies, but difficult to find and they are
expensive. I don`t suggest this solution. Let me check the solution with one
24v PSU and my DC-DC step-down converter that I I’ve used with your other project (HAKKO 907 controller)
that I’ve made too, with great success ( see picture) and I’ll tell my results.

sfrwmaker (author)geko14532017-10-20


It looks like we have the problem with a PID stability here. Is seems like the parameters are too big and the controller is very sensitive. I am going to review the PID parameters this weekend.

Thank you very much for your patientce.

geko1453 (author)2017-10-25

Finally I’ve finished all tests successfully. Everything
went fine with the use of the small
non-isolated psu
. I used seven T12 tips ( BL, BC2, BC3, C4, ILS, JL02, K ) and the controller worked
fine smoothly to all functions –CONCRATULATIONS-- for your project again. Now
I`ll do some modifications to the PCB design in order to add the small
non-isolated step-down module on controller`s PCB, and then I`ll begin the design
of the enclosure…….

WizziL (author)2017-10-21

Hi All,

I'm building this project from some time now, and even last few monts all the parts are staying and waiting to complete the project I'm missing 2 very important parts - the power supplies. @sfrwmaker, @geko1453 could you please suggest PSUs that will work? I'm OK to buy something of the shelf or to build it by myself, but I can't find suitable units. Any suggestions/links/schematics?


sfrwmaker (author)WizziL2017-10-21

hello! I used this one:

I have no schematics, sorry.

DerpyH (author)2017-08-02

Ah weird construction... do you think if I use AC as the power source and pause it between measurements I'll be able to use it with the MAX6675?

sfrwmaker (author)DerpyH2017-08-02

But only two wires. ;) i am not sure the max6675 would work, you can test. The one thing i kniw exactly: the iron tip can change the temperature very quickly. My controller checks the temperature 10 times per second. I have tried to check one time per second and failed to use the tis with a thin "nouse".

DerpyH (author)2017-08-01

Hi there cool project do you have the pinout or datasheet of that soldering tip?

I'm struggling to find em also what If I want to operate it with an AC voltage how difficult would it make to read off the soldering iron's temp?

sfrwmaker (author)DerpyH2017-08-01

you can search for some review of this soldering tip. For example, these ones (, ) describe the pinout and the parameters of the soldering tip. Sorry, i could not find the article in english. Hope the pictures are international or you could use google translate. These tips arevery popular in russian and ukranian community.

Do you know, there is elegant controller from tao bao chineese site fir thee tips in the intrnet? It is based on stm32 microchip, very compact, just tiny and very convenient. Unfortunatelly, some versions have non-good firmware.

I think it is good idea to create own controller for t12 based on stm32. May be i would made one.

DerpyH (author)sfrwmaker2017-08-02

According to what I understand this soldering tip has a thermocouple in parallel to the heating element correct me if I'm wrong.

sfrwmaker (author)DerpyH2017-08-02

not parallel, consequently. The current flows from '+' to the heater, then to the thermocouple and returns to the "-".

KrzysztofF8 (author)2017-05-28

Great project,

I found the PID (Kp=13107; Ki=655; Kd=20;) parameters that works better then original. Now the sleep function works every time.

sfrwmaker (author)KrzysztofF82017-05-30

Great Job! Thank you very much.

ZinderneufVelo (author)2016-10-27

Firstly, thanks for this I'm learning a lot reading your code.

Q: I'm wanting to build this but am struggling to see how the heater driver works with a p-channel MOSFET. Did you use a p-channel just because you had one to hand? Wouldn't an n-channel work here? I've been staring at this for about a week and can't seem to figure how the circuit works - shouldn't the source be +ve wrt the drain on a p-channel. But you have GND on the source and +24v on the drain ?? Regards from England.

sfrwmaker (author)ZinderneufVelo2016-10-27

n-channel mosfet cannot be implemented in the schematics. The problem is that inside the hakko t12 tip the heater and thermocouple are connected consequently and tip has only 2 connectors. The controller uses these connectors to heat the iron or to check the temperature (measure the voltage of the thermocouple). The thermocouple generates a small voltage about 5 milivolts between ground and '+'. When the p-mosfet is swithed-off, +24 volt is disconnected from the iron and the controller checks the thermocuople voltage throught the operating amplifier.

To prevent input cirquit of the operating amplifier when the +24 volts is applied to the iron, zener diode of 5v is implemented to limit the maximum voltage.

The n-mosfet can switch-off the ground, not +24v, but we need the ground.

On the p-mosfet, the source is +24v and the drain is connected to the iron. To switch-off the mosfet, you should put the +24 v to the gate. To switch-on the mosfet, you should put negative voltage to the drain (reletively to the source). For example, connet the gate to the ground. Unfortunatelly, it is not possible to directly connect GND to the gate because the mosfet VGS is limited by 21 volts. So the zener diode is implemented to limit VGS voltage to -18v.

Also, you must use isolated power supply for the arduino controller (as is shown in the schematics) not the DC-DC converter, because with the DC-DC converter you have some volttage shift on the controller GND and you have negative voltage on the '+' pin of the thermocouple!

You can compare the schematics of the two controllers, this one and the one for the hakko 907 ( where the iron has separate themperature sensor connectors. The second schematics implements the n-channel mosfet irfz44n because it is cheaper and more widely used. In the second schematics the +24 voltage onstantly connected to the iron and GND is swithed through the mosfet.

ZinderneufVelo (author)sfrwmaker2016-10-31

I stared at it a bit longer this morning, I think I have it now..
To lever a FET on/off (be it n or p channel) we apply a voltage between gate & source. We can't use an n channel in this cct because source would become disconnected from GND at turn off for the reasons you state, leaving us nothing to lever the gate against. But a p channel operates with its source +ve wrt drain, here connected to +24v, so we can lever away against source all day long. Then it's a matter of bringing gate voltage down within limits using the Zener. Thanks again!

SianaG (author)ZinderneufVelo2017-04-25

It's possible to utilize an N-channel MOSFET as a high-side switch by generating the gate voltage with a charge pump. You can just PWM out of your existing microcontroller to drive the charge pump

kcassella (author)2017-03-06

Hello sfrwmaker,

I have a couple of questions.

1. Can a regular hakko soldering iron (non-T12) work with this project? I have two of these irons laying around.

2. You mention of using isolated power supplies. Could a switching supply 24v/5v all-in-one power supply work? I have this one of these .

sfrwmaker (author)kcassella2017-03-06


1. It depends on 'regular' iron. I mean there are many different variants of hakko iron:
* using two independent cirquits for heating and temperature monitoring, that can be:
** thermo couple to monitor temperature
** thermo resister to monitor the temperature
* using united cirquits for heating and temperature monitoring (like hakko T12 tips).
Anyway, you can combine this project with another one (for hakko 907 iron) and buils your own controller. Some days ago i helped to build the soldering controller combining both project.

2. It depends on soldering iron. If the iron has separate cerquits for heating and temperature monitoring, you can use DC-DC converter and non-isolated power supply. For t12 tips you must use isolated power supply.

kcassella (author)sfrwmaker2017-03-07


Yes, I should have given more detail. I was saying hakko 907 soldering irons. These irons use thermocouples for temp sense.

Do I need to modify the sketch for using these hakko 907 irons? I'll admitt, I'm not to sharp in rewriting code. :)

sfrwmaker (author)kcassella2017-03-07


You're the second person who wants to build soldering controller for hakko 907 with thermocouple. ;) hopefully, i have solution already. First of all, are you sure your version of hakko iron implements thermocouple, not thermo resister? Have you measured the voltage generated by thermocouple? As far as i understand, your iron has 4 or 5 wires. Is that correct?

Have you got p-channel mosfet or you prefer to use n-channel?

You do not need to rewrite the sketch, you should just select one of two variants. Please, answer the questions above.

kcassella (author)sfrwmaker2017-03-07

Yes, I'm 100% sure they are using thermocouples in my version of the irons. It doesn't matter which mosfets I use. I do have n-channel mosfets.

The irons has 5 wires. +temp, -temp, GND, 24+(heater), 24-(heater).


sfrwmaker (author)kcassella2017-03-07


You can use another project, for hakko 907 soldering iron ( You need to change the schematics slightly to check the voltage, not resistance. The software can be used untouched. Here you can find updated schematics: and

kcassella (author)sfrwmaker2017-03-13

Hi sfrwmaker,

I built the circuit on a breadboard using the instructable "Soldering Iron Controller for Hakko 907" that you suggested. It works great, thank you. I used the schematic for the thermocouple soldering iron. The full schematic for the thermocouple shows a 10k resistor from 5v to pin 3 of the AD822. This 10k resistor needs to be removed for the thermocouple soldering iron. Otherwise, the LCD shows no iron. Thanks again for a great controller!

kcassella (author)sfrwmaker2017-03-08

Thank you. I appreciate your time.

WizziL (author)2016-12-02

Hello @sfrmaker, do you ever measure the coil value? I want to build such controller but I think it will be easier just to buy similar coil. Thanks!

sfrwmaker (author)WizziL2016-12-02

let's make some evaluation. Most components have been bought on e-bay from the china suppliers:

*The hakko fx9501 handle - $25 (there are much more chip version, but i prefer this one)

*The hakko t12 tip - $8 (average price, depends on tip)

* the power supply 24V, 4A - $6.58

*High precision operating amplifier - $4

*mosfet p-channel - $1

*lcd screen - $2

*case - $5

*all other small components - $5

Total: about $60.

You can save some value buing non-expensive handle. I have created the controller for fun yet the t12 tips are just the best! I have another iron based on hakk0 907, this iron is much more better.

WizziL (author)sfrwmaker2016-12-02

sfrwmaker, maybe you miss-understand my question, I love your project and I'm building it, the only component that I still don't have is the coil - that is the reason why I'm asking about it's inductivity value, I'm NOT asking about it's price. My idea is to search for already made coil with similar/"just a bit" bigger inductivity value, if I can't find such coil, I will build one based on the details from your project.

sfrwmaker (author)WizziL2016-12-02

Oh! A am sorry. The coil is a coil core in 2 cm in diameter with 20 rounds of 1 mm wire. My friend recommended use of this coil. He said that the value should be about 2mH.

This coil can be omited, just replace it with a wire. I am not sure this coil can preserve the capacitors in the power supply. And I using another controller (for hakko 907) without such a coil. The capacitors are not heating.

Sorry for my limited english.

About This Instructable



More by sfrwmaker:Water Meter AutomationAttiny85 Wireless Weather Sensor5 minutes Christmas neopixel led strip
Add instructable to: