Skip to main content
Topic: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron driver (Read 646195 times) previous topic - next topic

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #120
yes, great tool. I'm not advanced user, I can go trough wizard and get mu graphs ... I haven't managed to make anything show up on the FFT graphs .. but the main things work easy ... one should rtfm a bit to turn on the advanced options :D

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #121
The PID looks great.

Is it a pulse-skip PWM basically? What is the period?
Got a question? Please ask in the forum for the fastest answers.

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #122
As it is always rise time vs overshoot I think I found acceptable value...

Increasing the sensitivity to "D" may help the overshoot.

I start wonderful program called KST....
I hope my little laptop can handle this.
I will definitely look into this as I have the solid state relay and will start tweaking the PID for the reflow oven project.

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #123
[quote author="ian"]Is it a pulse-skip PWM basically? What is the period?[/quote]

~2Hz (16*32.7ms is the period)

Code: [Select]
//called every 32.7ms
void tmr1(){
  static unsigned int8 wherePWM = 0;
  if (bit_test(pwm, wherePWM++)){
  } else {
  if (wherePWM > 15) wherePWM = 0;

//outPWM is output from the PID routine with value 0-15
void setPWM(){
  pwm = 0xFFFF >> (15- (char) outPWM );
so as you can see the pwm variable holds as many ones as the return of the pwm is. In theory you could generate 0b010101.. but no real point to it, this way I get best results ... (for e.g. value of 10 is 0b0000001111111111 so for 6*32.7ms the heater will be off and for 10x32.7ms heater will be on - note that it's not 100% true as on output we have zero crossing detection and the AC signal we are switching is hitting zero every 10ms so we have a 0-10ms delay on any switch on so the duty cycle for ON period could be slightly lower in reality then it is outputted. That's why I selected 32.7ms as the timer1 interrupt time as it makes this error small enough with high enough precision of the output pwm. For the 18F I think I'll try the high freq pwm and no zero crossing driver for initial testing, should work better but is easier to implement and is even faster as for low power like this iron, only 50W, there's really no need to use zero crossing, I use zero crossing on my heated bed/chamber as I have a kW heater there so turning it on on zero makes more sense :D )

[quote author="eeAlchemist"]
Increasing the sensitivity to "D" may help the overshoot.
Yes of course, I tried that too but I started to hit oscillations / had problems with stability when I turned it higher so I decided to go with this fairly conservative values. Hopefully 18F version will allow for real time changing of the params so it will be easy for anyone to tweak it real time ..

[quote author="eeAlchemist"]
I hope my little laptop can handle this.

it just reads the data from the file and created graphs real time ... I don't see why it would not run on your laptop :) but if you use windoze - everything is possible :D

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #124
hi arhi i use a timer interupt for the PWM, every time the counter interupts a CN char variable is increased 0-255, and within the iterupt routine a IF statment is placed

set the pin,
else clear it.

that way I get 0-100% pwm with  0.4% increments

PID calculates the PWM char variable after a temp was read, witch updates every 0.2s,
that way if PWM to lets sa 17, the heater is on for 17 timer cycles, and off for 255-17=238 cycles.
best regards FIlip.

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #125
I may totally wrong here, but i assume most of the overshoot is from the I part getting to big during the ramp up. I see two possible solutions for this, you either limit the I part or start the PID only if you are in a narrow window ( lets say 25 degrees ) around the desired temperature. Outside it , it is a simple on/off regulator.

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #126
@LeissKG, There's a lot of way's to remove the overshoot .. and they are very simple .. for e.g. with PID = {0.07, 0.009, 0.38} there's no overshoot at all, but I don't mind overshoot for the initial turn on (as the iron is usually set initially to 200-250C), when you "reset" the tharget point the overshoot is minimal (few degrees only).

@arakis, that works only without zero crossing detection. Also calculating pid every 0.2sec does not help much too. Running pid more then 2times per sec never yields good results in my experience :) (making the hot plate and heated chamber I spend way too much time tweaking the pid + autotuning and finally the major problem was actually the sampling time, sampling too fast make pid behave worse because you lose a lot of precision as you use floats .. especially if you use low resolution pwm)


Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #127
I forgot to mention my station works with 24V DC, not AC, so no zerocrossing is needed
best regards FIlip.

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #128
with DC you can do standard PWM with 10-14bit resolution :) and get even finer results .. that's what I do with low power heaters ... but as I'm going to use similar board for my next heated chamber controller I need to be able to switch few amps and 230VAC

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #129
*sory for offtopic, let me just finish. I bought 2 pics, one to experiment on and the other to actualy use, the second one for some reason just couldn't get the hardware PWM to work, while the first worked perfectly, then the first one died after 12V apered out of *nowere and preaty much made miced meat out of it, and by nowere I mean I placed the wrong jumper on my bredboard PS and insted of 3V I got 12. :D.  so I was stuck with this software PWM
best regards FIlip.

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #130
yeah 12V on the Vdd can kill it completely, 12V on input pin usually just kills the pin.

As for non working pwm, you most likely miss-configured some config's (not sure about that pic you are using but lot of 18f's have ccp on few pins and you define with FUSE what pin will be ccp. If you don't set anything default value is not guaranteed)

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #131
I finally figured out how to get sensor data for the HAKKO soldering iron :D ... idiot, this was soooo easy.... thing is - I have station already that works .. it is unfortunately analog but it's closer then anything else I could find so .. I took a 100R multiturn pot and attached it to my station instead of the hakko pencil and started increasing resistance from 0. I set the station to 200C and when the heat indicator turned off I stopped turning and measured the resistance, then I set it to 225C and did the same thing, repeated until I reached 425C and 95R8. 450C was over 100R and I didn't want to solder on another resistor, had no 200R pot so I assume if 200-425 ain't gonna help those 450 and 480 values are not going to help either :). Then I measured resistance of the sensor on room temperature (1.7R - 27C) and plotted a graph - it's darn linear :D

so here is the resistance table for the HAKKO 907 ptc sensor:
Code: [Select]
C	     R
 27   1.7
200 42.0
225 50.0
250 56.5
275 63.3
300 69.3
325 74.8
350 80.6
375 84.6
400 90.6
425 95.8

Attached is the original schema for the output of the analog driver (this output is then compared to output generated by voltage divider and another op, but it shows the first amplification stage for the sensor in original HAKKO analog station). The 1N751 used in the schematic is:
Code: [Select]
*Motorola 5.1V 500mW Si Zener pkg:DO-35 1,2
.MODEL D1N751 D(IS=1E-11 RS=7.708 N=1.27 TT=5E-8 CJO=4.068E-10 VJ=0.75 M=0.33 BV=4.946 IBV=0.01 )
You can add this to your standard.dio file if you do not have it there already

LM324 model is in the archive

EDIT: if it is not clear from the schematic - the R6 is the sensor. All resistors in the schematic has to be 1% accurate. R2 needs to be 2W 1% (metal film), C3 has to be min 50V (all other cap's 25V is ok), R3 is actually a 300R multiturn for calibration.

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #132
Wow, that does look linear. See suggestion attached.


I'm curious. Why is there different gains for +/- signals on the second stage?

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #133
The "looks reversed" D1 is producing 820mV Vref so it's actually properly polarized.
As for the different gains - I have zero ideas :) - to be clear - this is a copy of the original hakko 936 sensor amplifier, it's not my own design (I only drawn the thing in ltspice to try to simulate it). btw if you are simulating it, for some reason it takes too muc time for ltspice to handle the first part (where Vref, Vcc and Vee are generated) so remove the whole power part and just set Vref to 820mV, Vcc to 11.65V and Vee to -5.08V. Then the simulation goes almost real time :)

Re: HAKKO (907ESD) and SOLOMON (SL-10/30) soldering iron dri

Reply #134
Here's the finished version of both code and the schematic/pcb's for the pic16F690 version of soldering driver.
  • Selection between PTC and TC sensor type is unfortunately with #define's in source so it not possible real time (not enough flash)
  • PID control implemented
  • PID parameters are stored in EEPROM but there's no interface to change them real time (not enough flash for menus, something could be implemented but these PID values actually work according to my taste both with HAKKO and SOLOMON irons so I don't want to change them any more. I do have a separate firmware that uses serial out and changes PID values real time to monitor the response, I'll refactor and publish it too when I get a chance. It can be used to fine type parameters if one is interested in doing so.
  • Calibration for PTC is done using 50k trimmer. In ideal conditions it should be set to 25k
  • There's a redundant power regulator on board. If you have single 24VAC supply you need to use the chopper but if you have separate 6-7VAC then you can use simple 7805 or similar chip.

  • PCB is available only in Proteus ARES format (gerber+excellon and pdf's are provided)
  • Schematic is available both in Proteus ISIS and KiCAD format (pdf's available too)
  • If anyone makes the PCB in KiCAD format, please share
  • It would be great if someone can make a single sided PCB
  • 50k trimmer on board should be multiturn so you can calibrate it nicely
  • PTC curve is not ideally linear but this firmware assumes it is, the error is +-5C by my calculation so it is IMHO precise enough
  • You can get info about SOLOMON and HAKKO irons on my blog. The txt is originally in Serbian but google translate works like a charm :)
  • HEX files provided are compiled with data for Solomon and HAKKO 307 soldering irons
  • To compile source project you will need CSC PICC compiler (not open source nor free but unfortunately there is no proper C compiler for 16F family hence PICC was used as the cheapest solution that produces good results)

Licence info
  • Use the project at your own risk.
  • If this project blows up and turns your house into a pile of rock - that's not my problem.
  • If you wire stuff wrong and get electrocuted - that's not my problem.
  • If you get frustrated because the thing don't work the way you expect it and shove soldering iron in your eye - that's not my problem.
  • There is no "licence" - the project is released as public domain, you wanna use it - use it, you wanna change it, change it, if you make a fortune with it you do not have to give me a dime; if you want to attribute the author feel free to do so (author is me, <bogdan.kecman [at] crsn [dot] rs> and site is ).