Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC controlled soldering iron

Status
Not open for further replies.

MrDEB

Well-Known Member
Has auto shut-off (transformer and all turn off) after 10 minutes of non use of iron (beeps at 9 minutes
leds for HEAT or AT TEMPERATURE
the dial is not right as is the calibration of the "HAKO 907" iron that uses an RTD sensor. Really need a soldering iron temperature meter to accuratly calibrate. Just found when solder melts (370C and at what mv reading on the ADC input.
I need to rebuild case or figure out how to get all the wires enclosed into case.
https://s992.photobucket.com/albums/af44/MrDEB/?action=view&current=DSCF2359.mp4
 
What was the total bill of sales including labor to build the unit you made?
 
Under $30 but a 60W transformer needs to be purchased. I used the transformer from a Komec936 piece of junk but a 24 w ct 12v would be better.
I made my own board.
 
Let me post this again with a proper meaning.. What would be the total cost to a user for parts and labor assuming straight costs for components and 12 dollars and hour for labor?
 
Last edited:
Will get back to you.
I assume you want one?? or you want schematic and board design?
 
Did you use an algorithm for temp control or is the element just on or off if the measured temp is under/over the setpoint?
I like the shutoff feature I'm allways leaving mine on and shortening the life of the tips, how does the controller know the iron is in use, a switch on the stand or some clever code that detects thermal demand?
 
I just used if deg_S < deg_R (tip temp < desired temp then turn on iron.
The on/off feature is really simple. A micro switch on the holder. switch goes LOW (port pin LOW) then iron is not in use (port pin is tied to Vdd w/ 10k resistor) then a counting routine. When iron is used then count is reset to 0. The counter counts to 550 which is about 10 minutes. IF count = 500 the beeper goes on.Using a 2n2222 to keep the relay ON. A logic level mosfet would work but why waste it on such little application.
I used a 18F4520 but a lower pin count would work (I have several and its easier to use than running out of pins.
using 21 pins counting Vdd and grd.
Using an LM328 op amp for a constant currant source.
 
I can upload a compressed file of schematic and pcboard in DIPTRACE if you want.
Along with the Swordfish code I am using.
 
I was just interested in how you did it, I dont want to build one, but thanks for the offer.
You see some that have full blown pid software loops maintaining the temp of the iron, I never thought that was really necessary, and seeing as yours works it probably isnt.
I have a soldering station, a customer bought it and gave it me as pursasion to do a job, I've tried cheaper stations to use 'in the field' but werent all that pleased with them (sold on ebay), I was thinking I'd build a controller when mine eventually croaks, and wondered if straight forward 'bang bang' would work.
As I said I like the auto shut off, I think I'd also have a timer that shut the iron off if it was out of the holder too long, in case it was knocked over.
 
Last edited:
If you have a good iron pid really is not needed what is more important is how fast the iron can heat from cleaning to soldering.

Even the best of soldering station are not more then a good iron with good tips that can heat fast to the temp setting and switch off with out exposing the chip your soldering to EMF.

Recoverable from lost at cleaning and soldering are the most important parts. Most that I have looked at are +/- 5% which is not hard to achieve with just
a nice on and off routine and good temp sensor.
 
Kudos MrDeb. I expect it was a fun project and it really does not matter if you could have purchased one cheaper. My guess is there are a good number of us here with soldering stations that are good canadates for a refit.
 
I'm glade to see it work too just one thing fix the lcd Mrdeb LOL. It's been a long road getting you there,But it's nice to see it worked.
 
The LCD had connection issues. I solved by building a better board with bigger pads and traces. It was frustrating as I checked and rechecked connections using a DMM.
As far as time to recover heat the LED if you look at the video, the GREEN led indicates the iron is heating. The RED led is off. The red stays on really long compared to the GREEN.
From a cold start, I can be soldering in under 30-40 seconds aprox. Need to actually time it.
At present I have the auto shut off disabled as my batteries to activate the relay is really weak (need to change from a 12v coil to a 5v coil then go with rechargeable batteries.
As a bit of eye candy, I put alternating flashing LEDs on top of the power supply. A real eye catcher.
Where to go from here-- design and etch a pcboard for the power supply and associated circuitry using a 5v relay w/ 10amp contacts (overkill but then the relay would last a long time) and use one transformer (using a wall wart 12vdc transformer for the low voltage side. The 24vac is used strictly for the iron. My concern is noise from the 24v transformer output being switched on/off.
 
here is schematic

It is a DIPTRACE file.
I found DIPTRACE to be easier than EAGLE but just as good.
Things I would change in this project
LCD connected using a ribbon cable
A smaller board
Not real happy with the RTD readings but without a temp meter? I am basically guessing at the tip temp. If I had a RTD reference chart for this RTD it would be helpful (only found a 100ohm RTD chart not a 50 ohm) Room temp = 48-52 ohms.
Maybe a different pic as the ADC readings tend to jump say .5mv for a brief second. I found a routine that takes only 3 samples instead of 64 The code needs some house keeping for easier reading and cleaning up but it works as is. TWEEKING wouldn't hurt it either (fairly new at programing but getting the hang of it. Burt helped some here and there
Code:
     Device = 18F4520
Clock = 8
Config OSC = INTIO67
// some LCD options...
//#option LCD_DATA = PORTD.4 // Assign the LCD connections
//#option LCD_EN = PORTD.3 //
//#option LCD_RS = PORTD.2 //
   #option LCD_DATA = PORTD.4
   #option LCD_RS = PORTD.2
   #option LCD_EN = PORTD.3
  // #option LCD_INIT_DELAY =100

// import LCD library...

    
    // uses LCD and AD libraries...
    Include "LCD.bas"
    Include "ADC.bas"
    Include "convert.bas"
    Include "InternalOscillator.bas"
    Include "math.bas"
 
    Dim ADVal As Word
    Dim LED_g As PORTC.0     // GREEN LED tip desired temp
    Dim LED_r As PORTC.1     // HEATER ON
    Dim opti As PORTE.0
    Dim Vref As Integer      //want whole numbers
    Dim Vsensor As Integer
    Dim deg_S As Word        //Sensor variable
    Dim deg_R As Word        // Vref variable
    Dim gate As PORTC.7       // pin 25  controls mosfet gate
    Dim beep As PORTC.5       //pin 24 beeper sound controlled by counter
    Dim iron_sense As PORTC.4   // check iron sense switch pin 23
    Dim counter As Word
    Dim count_down As Integer    // count down timer
 // Read the AD ports...
 
    Function REF_V() As Word
        result = (ADC.Read(1)+1)*50/1024 //113 to 166 ADC.Read rsults
    End Function
    Function sensor() As Word
        result = (ADC.Read(0)+2)*500/10  //14 (RT) to 37 (melt) *30+22
    End Function
    
    
 // COPY / PASTED from Tetris code. The ADC readings were jumping out of order
 // I found the ADC.ReadMedian routine was buggy with the 18F4520. Instead of debugging it
 // I've created my own routine to do the job. Also, the program below takes 3 samples instead
 // of 64 (as performed by ADC.ReadMedian).
   
Function ReadMedian2(pChanne0 As Byte) As Word
    // define local variables
    Dim Results(3), tmpWord As Word, i, ReSort As Byte
    
    // make a number of samples
    For i = 0 To Bound(Results)
        Results(i) = ADC.Read(pChanne0)
    Next
    
    Repeat
        ReSort = 0
        For i = 0 To Bound(Results)-1
            If Results(i) > Results(i+1) Then
                tmpWord = Results(i)
                Results(i) = Results(i+1)
                Results(i+1) = tmpWord
                ReSort = 1
            EndIf
        Next            
    Until ReSort = 0
    
    Result = Results(Bound(Results)/2)
End Function

//###################################################################
// Start Of Program...
//###################################################################
    Input(PORTA.0)                  // temp ref voltage desired temp
    Input(PORTA.1)                  // tip sensor
    Low (LED_g)                     //pin 15 set lEDs OFF
    Low (LED_r)                     //pin 16
    High(opti)
    Output(PORTC.7)
    Output(PORTC.5)
    Input (PORTC.4)
    count_down=0 
    gate = 1
    ADCON1 = %10000000              //set up ADC regesters
    ADCON0.7 = 1
    ADCON0.6 = 1
    ADC.RightJustify = true
    DelayMS (150)
    LCD.Cls                         // clear LCD
   
//####################################################################    
// main program loop..   .
//###################################################################   
// call function REF_V() and assign the result to word variable 'Vref'
 
   
     
   
     
//    Select Vsensor
         // call function REF_V() and assign the result to word variable 'Vref'           
While true
    Vref= REF_V()               //Reference voltage
    Vsensor = sensor()          // tip sensor
     counter = count_down        // count down timer   
   
        //#######################################
        //voltage reference look up table
        //#######################################
               
        Select Vref                    //41-56 range for Vref
            Case < 28 deg_R =182  
            Case < 29 deg_R =209   
            Case < 30 deg_R =235   
            Case < 31 deg_R =262
            Case < 32 deg_R =289
            Case < 33 deg_R =315
            Case < 34 deg_R =342  
            Case < 35 deg_R =369 
           
            Case < 36 deg_R =375 
            Case < 37 deg_R =422   
           
           
         End Select    
          
       
        
            //#######################################
           // sensor look up table
           //#########################################
        Select Vsensor
             
            Case < 26 deg_S =182  
            Case < 27 deg_S =209
            Case < 28 deg_S =235
            Case < 29 deg_S =262
            Case < 30 deg_S =289  
            Case < 31 deg_S =315
            Case < 32 deg_S =342
            Case < 33 deg_S =369
            Case < 34 deg_S =375
            Case < 35 deg_S =422 
            
         End Select    
            
           
       
        
   
     
          //DESIRED TEMP DESIRED TEMPDESIRED TEMP DESIRED TEMP
         
          // call function REF_V() and assign the result to word variable 'Vref'
               
          //################################
              Vref= REF_V()
               // LCD.Cls                                 
                LCD.MoveCursor (1,1)
                LCD.Write("Degrees = ",  DecToStr(Vref*10),"    ")     // DecToStr(deg_R))  DecToStr(Vref),"    " 146 is solder time
               DelayMS(200)

   //TIP TEMP  TIP TEMP TIP TEMP TIP TEMP
// call function sensor() and assign the result to word variable 'Vsensor'               
                  
         
             Vsensor = sensor()        // tip sensor
               LCD.MoveCursor (2,1)
               LCD.Write("sensor = ",DecToStr(Vsensor),"   ")   //   DecToStr(deg_S)) 
                DelayMS(250)    
                      
                If Vsensor < Vref*10 Then      // not hot enough  If Vsensor < Vref 
                    LED_r=1
                    LED_g=0
                    opti=0                  // turn on opti couplier by going low
                 
                Else                        // Vsensor must be >= Vref, so desired temperature
                    LED_g=1
                    LED_r=0
                    opti=1                  // turn off opti couplier by going high
                End If       
                {
      LCD.MoveCursor (2,1)   
      LCD.Write("count = ",DecToStr(counter),"    ")
      delayms(1000)                
                 }     
       // If (iron_sense)=0 Then iron in holder HIGh if iron out of holder 
//#################################
 // count down timer
 //###############################
                  
        
    
   If  iron_sense=1                         //  iron out of holder
       Then count_down = 0                    
       ElseIf iron_sense=0                  //reset count if iron used
         Then  count_down = count_down +1   // iron in holder start counting for 10 miniutes 
      
                // compare Vsensor and Vref values  
               
         DelayMS(250)                       //switch debounce
       //  If count_down =500 Then            // aprox 9 minutes  550
     //    High (beep)                        //warning timing out 
        
        // EndIf
   EndIf 
 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
         //TIME OUT so unit is shut off
 //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                
    If(count_down) >= 550Then               //10+ miniutes since iron used
          Low(gate)                         // shut off iron
      
          
    EndIf         
             
       
                                      
        
            
//*************************************************************************
//When Vref is set to 215 then solder melts (160C aprox.) Vsensor jumps from 200 to 220
// readings at sensor = 28.4mv room temp 52-53mv solder melts                 
//*************************************************************************                 
                 
       Wend
 
I'm glad I didnt ask foir the code I'm an asm coder rather than C, spose I ought to get round to learning it.

One improvement you could make if you wanted was not use a relay at all, use a triac to switch the iron on and off, then worn or welded contacts isnt a concern, if you used something like a moc3040 you'd have isolation form the irons power supply and also zero crossing switching, as the '3040 is an opto isolated triac with zero crossing switching, I'ved used them before, zero switching noise.
 
WOW Burt that is one large schematic
THANKS
like I said, I contemplated using a triac for turning on/off (might give it a go as I have lots of 7A triacs and opti-coupliers from my Christmas light display. What concerns me is I read somewhere that a triac can be on without any gate voltage? Need to research that more. I was under the impression you turn off the gate and the triac shuts off.
 
Don't tell that out loud people may want to on how to do that LOL without any PDF software

I'm going to buy the same iron and make one of these but I'm going to use the same chip as posted on the net and use the pic to set temp and display it.
The chip that controlled the iron handled the zero crossing and the overshoot of temp. Just lacked the digital display.

And in code the pic will check if the iron is been used based on heat drop do to cleaning tip or soldering no big drop the iron goes to sleep and maybe let user
set time out based on how they use the iron.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top