Skip to main content
Topic: Simple Soldering Iron Driver (SSID) with Arduino PID Control (Read 40261 times) previous topic - next topic

Simple Soldering Iron Driver (SSID) with Arduino PID Control

Main features are:
- Any thermocouple type irons.
- Additional control mode: On-Off controller (besides PID PWM).
- External power supply: Some standard Notebook power supply DC 19V, 4.74A.
- Small dimensions: It fits into 90mm x 110mm x 45mm (WxDxH) box.
- Easy to assemble.
- Simple design: only a few components (besides Arduino).

The HQ soldering iron HQ20/HQ30 (24V, 48W) was used. It has the E-type thermocouple built in (68uV/degC) but you can change that value in software according to the soldering iron that is used (for example K-type is 41uV/degC).

Schematic:
[attachment=0]

Realization:
[attachment=3]
[attachment=2]
[attachment=1]

Usage:
- Buttons UP and DOWN, changes set-point temperature by 5 degC
- Button SET cycle trough set-point temperature presets: 0 - 150 - 280 -320 -350 degC.
- Buttons UP and DOWN simultaneously, change the operating controller mode ( PID control / OnOff control ).

Measuring results

Reply #1
Here are come measuring results, illustrated in following diagrams.

PID controller:
[attachment=2]

ON/OFF controller:
[attachment=1]

PID vs ON/OFF, overlapped:
[attachment=0]

Conclusion:
On/Off controller performs well and hold the temperature error inside ±5 ºC, but PID controller performs better (if the overshoot of 15 ºC is neglected) having the steady output temperature error smaller than 1 ºC.

The Arduino Code

Reply #2
And of course, the Arduino code is given in following file:
[attachment=0]

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #3
Hi,

for K-type thermocouple:

240°C = 9.84mA

240-25=215  0.00984/215=4.576744E-5(0.00004576744)

this is correct?

thx for reply

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #4
According to diagram on Wikipedia
http://en.wikipedia.org/wiki/Thermocouple

it should be 41uV/deg, and you have calculated 45.8uV/deg and that should be verified by experiment with external thermometer or some known melting point.

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #5
ok thx

i find for K-type=41,276μV/°C and for E-type=76.373μV/°C

I tested with known melting point cca 183°C  with 41uV/°C on program, is approximately to 99.7 correct setting

great work

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #6
LM358 can be powered from arduino or external 5V supply ? 

if it fails the distortion at the output of operational amplifier

I did not notice and I got a short circuit on OA, arduino received 9V / 19V to A1 and Arduino is destroyed :(

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #7
Hello carlazar,

I am trying to remake this project for MSP430.

How you were able to drive IRF640 only with 5 V from arduino? IRF640 needs Vgs = 10 V to fully open.

Re: Measuring results

Reply #8
[quote author="carlazar"]...if the overshoot of 15 ºC is neglected....[/quote]
You can discard the integral term when you are too far away from the setpoint. For slow processes, your integral term will saturate before you get into a controllable region and that will cause an overshoot before the integral term settles (because it needs a negative feed, i.e. overshoot, to get reduced).

The standard solution for this problem it to set Ki to zero when you are not within x% of the setpoint. That point x should coincide with the point where the PWM stops being 100%, but you have not yet reached the setpoint.

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #9
@Berto, Thanks for this great advice.

@arunasas, According to IRF640 datasheet, Gate-Source Threshold Voltage is 2.0 - 4.0 V, so it works, somehow.

@lukux, In schematics if the lines are crossing, there is NO junction (┼). To represent junction I use split junction notation (┬┴). Sorry for your loss, but you have joined the lines that are even not the same width in the schematic.


Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #11
Hello All.
I have done this soldering station here. Works fantastic. Congratulations, by the way.
However, I am using a hakko 907 genuine. It uses an thermostatic sensor instead of thermocouple.
With some code and hardware changes it is working very well.
Here is the thermistor vs temp relation:

Code: [Select]
fTemp = -146.9*pow(fVoltage,6) + 2235*pow(fVoltage,5) - 14005*pow(fVoltage,4) + 46255*pow(fVoltage,3) - 84791*pow(fVoltage,2) + 81850*pow(fVoltage,1) - 32536;

Where the sensor wires are just in a volt divisor with a 100 ohm resistance.

I just woould like to know why there isnt any capacitor on 7809 schematic dc regulator.

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #12
Hi Bruno, could you pls, send me the changes that  was made for hakko 907?

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #13
[quote author="thiagogualchi"]Hi Bruno, could you pls, send me the changes that  was made for hakko 907?[/quote]

Hello, the main difference is at the sensor type of the soldering iron.
Hakko907 uses a thermostatic instead of thermocouple.

Due to a lack of knowledge (at that time) I used a simple voltage divisor on the sensor.
There are two cons on that: measurements could be better (but is is ok anyhow), and a high current drain due to low resistor series.

My next project is a simple change using an opamp LM358 to get  better resolution and low current drain. I will provide it ASAP.

My current project on "SSID06" (corrected) folder:
http://https://www.dropbox.com/s/q9zffpwiuw6r4xv/Soldering%20Station%20MOD.rar?dl=0

I realized the LM7809 was heating too much, so I placed a heatsink on it. In order to monitor temp of the heatsink, I placed a LM35 temp sensor sticked on the heatsink. I made a change on the code, so when the 3 buttons are pressed at the same time, I can see the internal temp on the display.
Some other small changes on the code were made. I dont remembar all now, but it is working very well.

Let me know if you need any help.

Re: Simple Soldering Iron Driver (SSID) with Arduino PID Con

Reply #14
If I have soldering iron with thermocouple I can change data according to the thermocouple type and it will work? That's really interesting option.