Introduction: Lunchbox Soldering Controller

The soldering iron is one of the most important handtool in electronic workshop. Without a heat controller,it becomes prone to overheating. Overheating soldering iron will not last long this leads to periodic parts replacement, specially the filament and tip. Its tip requires constant tinning to reduce oxidation, it is the condition where the tip is covered with black,crusty oxidized material that reduces its performance.This will also make poor solder connection. The worst part of it, you will burn and pry out the copper trace of PCB and might as well burn the components that you're working.

The solution is to buy a soldering station. This kind of device is somehow quite expensive specially to those who have a tight budget like me. So my remedy is to build a controller and incorporate to my already existing soldering iron. While I'm soldering and my arduino is not in use it will be controlling my iron.In case you want to know immediately how this controller works and how to use it, please jump to Step 6.


This project involves mains power source. mains carry high energies and lethal. If you believed you have enough knowledge in dealing main voltage you can proceed in this project. If not, please seek assistance to a more knowledgeable person. I will highlight the part that deals with the mains. We need to be very cautious. Please be safe.

Step 1: Materials Needed

Before starting any project its good to have all the materials. Here's the list:

Arduino Uno
           (i tried it also,using my old Duemilanove)
16x2 LCD
            (HD44780 compatible LCD)
solid state relay
           (see materials in step 4 including instruction how to make it)

 5k trimmer pot
 50K potentiometer
 1000 ohms 1/2watt resistor
 330 ohms  1/2watt resistor
 400 ohms  1/2watt resistor
  red LED
  ribbon cable
  male pin header
  small perf board
  0.5A fuse
  fuse holder
  rocker switch (with LED indicator)
2 - AC outlet (case mount)
  AC plug (with cord)
  wall adaptor (for arduino supply 100 to 240 AC ,12V 1A DCout)
lunchbox of course!with nice locks on lid
(if no lid locks its fine)

and the tools, we cant do it without the tools
this include pliers,soldering iron,cutter razor, hot glue gun, etc
I know some of the tools i used are not the proper tool for the job but that's all in my toolbox.

Step 2: The Box

Before wiring up components,we need to put holes in it by drilling or what i did is put a hole in it by melting the plastic using my other soldering iron.  I choose the right side of the box where there is a small compartment for the parts that deals with mains. this will add protection and isolation. 

 Bore a hole by first melting it. The first 2 bore are for AC socket and switch. Continue melting until its 3/4 the size switch and socket. We don't want an over-sized hole,component would be loose. (first image)

then cut the melted plastic and carved the area to the size of component using razor cutter (2nd image)

one by one I manage to add the switch,socket and then the fuse holder in the middle. (3rd,4th,5th image)

Next is the socket for arduino power adapter which is on the division of the lunchbox. (6th image)

power adapter will be placed inside the box,it will be plugged in the socket place in the division. (7th image)

and then the power cord, while tentatively soldering the components.(8th image)

Its fine not to solder yet in this stage, lets just focus on adding large component and securing them well, making them fit snugly.
If you find it difficult to cut and carve the plastic and the components didn't  fit snugly don't worry, just add hot glue on it.

then lets add more holes in the lunchbox.This time is on the lid.I choose to placed the LCD on top of the lid.Melt it to create a small slit. These will be for the wires of LCD. (9th,10th image)

lastly add 2 holes for LED and potentiometer.

My bad on this part because i rushed on soldering the components,see (7th image) component are already soldered. i realized in the end that i cant insert those pin headers on the slit. I don't want a large slit. so i wasted my time,i desoldered  the wire so i could insert those wires. 

Step 3: Wiring Arduino

wiring arduino and LCD 

I wanted to use schematic diagram but I find it difficult to know-which-is-which connected in actual component so i decided to use to pictorial diagram,hope this would be helpful. you can also check its the same connection.

so lets start by adding power to LCD, connect:
LCD Gnd pin 1 to Arduino Gnd     (red wire)
LCD V+  pin 2 to Arduino 5v  (brown wire)

next lets add contrast control,
connect trimmer pot pin 2 to LCD Vo pin 3   ( white wire)
connect Trimmer pot pin 1 to Arduino 5v, ( red wire,in actual circuit i used white wire)
connect trimmer pot pin 3 to arduino Gnd,(brown wire, in actual circuit i used white wire)
as you noticed pin1 is connected to 5v and pin3 to gnd,it should be opposite this means increasing the contrast would be turning the knob counterclockwise,anyway its not that big deal because you'll just set it once, you'll not be adjusting it frequently.

then,  LCD RS      pin 4 to digital pin 12 (orange)
LCD RW     pin 5 to Gnd
LCD Enable  pin 6 to digital pin 11 (yellow)

and the data,
LCD D4 pin 11 to digital pin 5  (green)
LCD D5 pin 12 to digital pin 4  (blue)
LCD D6 pin 13 to digital pin 3  (violet)
LCD D7 pin 14 to digital pin 2  (grey)

All the ribbon cable are soldered to pin header for easy connetion to arduino board.The other end are soldered  to LCD board

lets go to wiring of control knob (potentiometer),connect:
pot pin 1 to Gnd, (brown)
pot pin 2 to analog in 0 (orange)
pot pin 3 in series with 1000 ohm resistor to 5v (red)

prepare pin headers for the rocker switch LED which is to be connected in digital pin 13 later
also to SSR and LED indicator to be connected to digital pin 10

Step 4: Solid State Relay or SSR (DIY Version)

 For SSR primer check this There are plenty of SSR you could choose. Some are affordable like 39MF21,its in DIP IC but not available here in my place. There are available but its industrial grade,high power,bulky and also have scary price. The problem is I couldn't find the SSR that fits into these project . We will be needing a small in size,affordable and should be available,easy to acquire. Since the discrete components are available here in our locality, i decided to just make it. 

By the way I believe mechanical relay could not endure switching at about 500Hz  that is the approximate  PWM frequency of arduino.
I'm not sure if there's a mechanical relay that could endure such switching speed though I am certain it would be noisy and will wear faster.

This project will use PWM to control the power of soldering iron, solid state relay is the ideal  component for this job.

materials needed (1st image)
it only uses 4 components and perfboard. We'll be using small area of the perf.

triac leads are bended backwards (2nd image )

(3nd image) I made another pictorial diagram for our SSR also included a datasheet link in the image . The actual area of the perfboard used is 5x10 dots.  I removed the copper dots by grinding it using small rotary tool with grinding wheel. you can also pry it using razor cutter,just be careful. If you'll copy it exactly,it will work without testing as i have  tried to make 3 and all works. if  perfboards are properly made the MOC3041 will provide isolation so we can touch the potentiometer,LCD,arduino board even while operating. This component will be handling mains.As long as we make sure all are properly connected there will be no problem.
the tricky part is the encapsulation,I did it for added isolation,protection and for a "SSR look". honestly I had tried silicone sealant used in glass and aluminium but I had no patience in waiting for it to dry and its hard to form. its not the proper way i guess. Epoxy resin will do the job but I don't have it. So i ended up using hot glue. Don't worry the triac wont heat up while in operation so it wont melt the glue encapsulation.

first step in encapsulation, spray a WD- 40 degreaser, or apply any oil on a paper (4th image )

now we need to apply hot glue on top of paper with oil covering approximately larger than the size of our SSR board, while the glue is still hot place it on top pressing it gently (5th image )

Apply again the hot glue until all of the SSR is covered. wait until the glue is cooled down and dry. (6th image )

then lift it effortlessly (7th image )

cut the unwanted excess glue. 2 of 3 finnished diy SSR ready for our project but we'll be using only one (8th image )

Step 5: Mains Section

Since all AC components are in place, all we have to do is connect and solder it, following the diagram (1st image)

Special care needed in this Step,deals on Mains

Although both AC socket are parallel to mains connected to switch and protected by a fuse,only the AC socket  for iron is controlled by the SSR. I placed it in that order so the switch serves as the main power on and will be the switch for arduino.  
AC component are all placed in the right side compartment of lunchbox while on the left side is arduino and power supply.
the LED indicator is on the lid of lunchbox.

now lets connect everything:
red LED indicator connected in series with resistor and SSR observe polarity of LED. connect it to digital pin 10.
rocker switch has 4 terminals those 2 smaller are the anode and cathode again observe polarity and connect it to digital pin 13.

double check, and review the connection for any error. Make sure no short circuit. You can use shrink tubes on the components that deals the mains.

then finally  time to upload the code..

Step 6: Code

The code works by controlling the SSR in pulse width modulation.To understand PWM, here

By rotating the shaft of potentiometer clockwise,we are increasing power and counter-clockwise to decrease. Analog input 0 reads the Potentiometer and adjust the PWM output of digital pin 10 that controls the SSR, also driving the red LED indicator located on top of box cover. This will make it brighter or dimmer. Arduino will show the value of PWM in a LCD as well as approximated temperature of soldering Iron. I use 30watts Goot soldering Iron and tested the temperature on its tip. my readings of its temperature are my basis for the value shown in the "Temp". Note, it would take a minute to fully heat the soldering iron and 5 mins to cool down.

Again it is just an approximation not the real tip temperature although it's close to the actual. 

here's the code
lunchbox soldering controller
  LCD library from

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int potAdjust = 0;
int switchLed = 13;
int pwmOut =  10;
int temp = 0;

void setup() {
  lcd.begin(16, 2);
  lcd.println( " Solder Station ");

  pinMode(switchLed, OUTPUT);
  pinMode(pwmOut, OUTPUT);

void loop() {
  digitalWrite(switchLed, HIGH);
  int potValue = analogRead (potAdjust);
  potValue = constrain(potValue, 0, 990);
  int range = map (potValue, 0, 990, 0, 100);

  int pwm = map (potValue, 0, 990, 0, 255);
  analogWrite(pwmOut, pwm );
    lcd.println("%   ");
    temp = 0;
   if (range==1 || range >=5)
    temp = 160;
   if (range==6 || range>=10)
    temp = 210;
    if (range==11 || range>=50)
    temp = 250;
    if (range==51 || range>=75)
    temp = 300;
    if (range==76 || range>=100)
    temp = 360;
    lcd.println("C  ");

The continuation of this project, hopefully would be a real time temperature controlled soldering station by using thermocouple as sensor.

I hope you'll find this instructable helpful. Enjoy your new Lunchbox Soldering Controller :)
Arduino Contest

Participated in the
Arduino Contest