Tuesday, July 28, 2015

3. Drawing the PCB

After having tested the prototype some more without finding any problems, I decided to work a bit to make a suitable PCB for the solding station. For this task I used a very nice freeware program called ExpressPCB. Luckily it works great in Wine and the design process went smoothly. The download links for the PCB files are at the end of the article.

ExpressPCB - free and easy to use

If you want to try it, it can be found here:


Each module has its own PCB, this way it is easy to upgrade or fix without throwing away the good parts. For the powerboard, I chose to use through-hole parts because it contains quite a few bulky components: the filtering electrolytic capacitors, the LM7805, LM7809 and LM7909 voltage regulators and the BT137 triac. These need to be secured well and also be able to dissipate a bit of heat (theoretically, in practice the components remained cold in all tests).

The main board uses some SMD parts, with a few exceptions (OP07 op-amp and the ATMEGA microcontroller, the electrolytic capacitors, the 2 multiturn potentiometers, etc.). The current mainboard PCB uses resistors in 1206 package and capacitors in 0805 package. Since we're dealing with digital signals here, the SMD parts will help keep the resistance and inductance lower and also help achieve a smaller board.

Depending on the final design and choice for the case, the four buttons can be mounted on a separate, smaller PCB (this is what I used). An alternative to this is to use pushbutton switches with central mounting which can be attached directly to the case.

Fabricating the PCB

For making the PCB I opted for the photo-positive method. The boards themselves are not expensive at all and the results are very good. My favourite boards are made by a German company, Bungard. They are presensitized so there aren't many things that can go wrong. The steps below lack details, so if you want to learn more about this method, have a look at Nard Awater's excellent tutorial available here: http://www.aplomb.nl/TechStuff/PCB_s/UVsource_PCB.html

In case you decide to do things the same way, here are the steps:

1. Print the PDF files on normal paper using a laser printer. An inkjet printer works just as well, but in my tests, the laser printer made the traces more opaque and it didn't have any artifacts, while the inkjet-printed traces had a bit of noise around them. It could be that the paper I had wasn't very good. In any case, if you have a laser printer, use that one.

Printed pieces

2. Cut the PCB areas out of the printed page then pour a few drops of cooking oil on the back of the cutouts. Then take a piece of paper towel and gently spread the oil drops across the whole surface. Make sure to cover everything. This will make the paper pieces look transparent so that the ultraviolet radiation is able to penetrate them and cure the photoresist layer. After completely covering the pieces, use another paper towel to remove the  excess oil. Make sure not to rub the paper on the printed part because it may ruin the traces. After this operation you should be left with something like this:

Transparent layer

3. Cut the PCB to the needed size. You can use the transparent layers as a guide. After that, remove the protection layer from the PCB and superimpose the transparent layer over it (with the printed part oriented towards the photoresist). The supplied PCB diagrams are already mirrored so you should be able to see the text normally when looking through the transparent layer:

The PCB pieces are cut to size, ready for UV exposure

4. Expose the PCB to UV light. Have a look at the link above to see how to build an ultraviolet exposure box using UV leds.

5. Remove the exposed photoresist layer with Sodium Hydoxide. I use 1-2 teaspoon of NaOH (~ 10 - 15 grams) to 1 liter of water. Make sure to avoid using metal when working with Sodium Hydoxide (glass, wood and plastic are OK) and to avoid touching it with your hand or you might get chemical burns.

6. Rinse the board with cold water, without touching its surface. Just immerse it a few times in water to remove the NaOH solution.

7. Etch the board. I used ferric chloride for this project, but special care must be taken not to touch it or spill its container because it permanently stains anything it comes in contact with. As with the NaOH solution, don't touch metal with it since it's highly corrosive. Make sure to etch the board in a well ventilated area. After the etching is done, dispose of the highly toxic etchant solution by taking it to your local disposal center.

8. Carefully wash the PCB to remove the etching agent then clean it thoroughly with isopropylic alchool to remove the remaining photoresist from the traces.

PCB ready for testing, drilling then soldering

9. Test the traces with the multimeter's continuity test, drill the holes then solder the components.

The links for the PCB files

Power board PCB:

Power board silkscreen:

Main board PCB:

Main board silkscreen:

Switch board PCB:

Switch board silkscreen:

Next up is the firmware. I'll keep you posted.

Wednesday, July 15, 2015

2. The schematics / circuit diagram

I have managed to finish drawing the schematics for the soldering station. The circuit diagram has 2 parts, one is the power board and the other is the logic board.

The inputs for the power board are:
  • The 3 outputs from the transformer: 12-0-12v AC
  • The "heater command" line. When this signal is high, the optocoupler will turn the BT137 triac on, letting current flow to the heater coil
 The outputs are the following:
  • GND - this is the common ground
  • +5 volts for the microcontroller and the LCD screen
  • +9 volts - the positive rail of the OP07 op-amp
  • -9 volts - the negative rail of the OP07 op-amp
  • The 2 connections for the soldering iron coil: HT1 and HT2
Diagram 1: The power board

The second diagram is for the logic board which contains the microcontroller and the TC amplifier. It has the following inputs:

  • The GND, +5, +9 and -9v DC signals from the power board
  • The 4 buttons that will be used for adjustment: Stand-by, Up, Down and Preset
  • The 2 wires from the thermocouple installed in the tip of the soldering iron

 and the following outputs:
  • Heater command signal (HCM)
  • Piezo buzzer signal (BUZ)
  • Status led signal
  • The LCD power and data signals

Diagram 2: The logic board

A few details regarding the LCD

Most 16 x 2 LCDs sold today have a LED backlight which must be powered by the user. The problem is that they are produced by hundreds of manufacturers.

As a result, some LCDs have different power requirements, some consuming more than others. To avoid destroying them (replacing the led is a pain) you will need to consult the datasheet of your LCD and find out the correct voltage and current for the backlight. After finding the values, you can use the formula below to calculate the backlight current-limiting resistor:

ResistorOhms = (5 - LedForwardVoltage) / (LedRatedCurrent x 0.8)

For example, the screen I bought (PC1602A) has a forward voltage of 4.2 volts and a maximum forward current of 195 mA according to its datasheet. Replacing the numbers in the formula gives us (5 - 4.2) / (0.195 x 0.8) which is equal to 5.1 ohms (a standard resistor value, otherwise rounding to the nearest value would be necessary).

Instead of this simple way of powering the backlight, PWM could be employed, but that would just add complexity and no real benefit.

In conclusion, everything looks good (at least on paper). The voltage regulators don't get hot at all, neither does the triac. Generally speaking, the circuit is stable. I'll keep testing it and if everything is OK, a PCB will be created and presented in the next post.

Monday, July 13, 2015

1. Starting my first AVR project: Poorman's soldering station

In this post I'd like to discuss a bit about the various modules of the station, my choices for the components as well as help you make an idea of how it will all merge together into the final product.

To keep things simple, I've split the project in the following pieces:

Power supply:

This is what powers the electronics as well as the iron itself. In its most primitive form it comes as a transformer, but it can also come as a switching-mode power supply. As with everything, there are advantages and disadvantages between the different power supply types. Here are some of them:

Linear power supply (transformer) advantages: low cost, mechanically simple, reliable, low leakage current, low ripple and noise

Transformer disadvantages: big and heavy, not very efficient

Switch-mode power supply advantages: smaller, lighter, up to 80% efficiency at 24 volts output

SMPS  disadvantages: not very reliable (especially if poor quality components are used), high ripple / noise. One problem (as you probably know) is that heat greatly minimizes the lifespan of electrolytic capacitors. Combine this with the myriad of counterfeit, bulging <crapacitors> on the market and you have the recipe for disaster and a guaranteed fireworks show.

Personally, I went with the transformer since I had one lying around. Mine can only furnish about 25 watts of power but that's enough for the handle I bought.
So, a 24 volts, center tapped transformer (12 - 0 - 12 volts) delivering 1 A (3A or more recommended for use with 48 watt irons) will be a good starting point. Even if your soldering iron will only draw 2 amps, it's a good idea to always choose a more powerful transformer, otherwise it will heat up very quickly (valid especially for no-name units). The center tap is necessary since the operational amplifier used as thermocouple amplifier needs a symmetrical power supply.

A transformer (not the one I'll use though, mine needs rewinding first)

The power board:

The power board contains the capacitors for smoothing out the ripples from the transformer, some linear regulators to step down the voltage for the different components as well as the optocoupler and the triac that starts and stops the soldering iron (it will be driven by AC current to keep things simple).

A selection of electrolytic capacitors, most of which won't work more than 1 year judging by their looks and "brand"

Instead of the optocoupler / triac combination, a transistor and a relay could be used, but in my tests the relay's coil wasted a lot of power. The internal contacts got stuck together after some time, most probably because of the high current involved. In addition, with low hysteresis the repeated clicking noise from the relay became very annoying.

The logic board

This board hosts the microcontroller, the thermocouple amplifier and a few passives. For this project an AVR from the MEGA family will be used (Atmega 168 with additional support for Atmega 328P). The Atmega 168 seems like a good choice since it has plenty of flash space (16384 bytes), enough RAM (1024 bytes) as well as 512 bytes of EEPROM and it enjoys great support from a multitude of languages. Programming them is easy too, either via a dedicated USB programmer (like USBASP) or by the means of a simple serial port programmer (if your computer has one).

 To get the signal from the K-type thermocouple up to a usable level, an OP07C instrumentation operational amplifier from Texas Instruments will be employed. This op-amp was recommended in many discussions about thermocouple amplification and it looks perfect for the task. It should also be easy to find and very affordable compared to other dedicated solutions like MAX6675 or LT1025. And after all, the temperature level is informative, a hobbyist soldering iron driver is most certainly isn't a thermometer. According to the datasheet, OP07C offers low offset and long-term stability and wide input-voltage range which makes it ideal for the task.


For showing information, a 16 characters x 2 lines, Hitachi HD44780 compatible LCD will be used. This should be more than enough for a soldering station. In addition, they're very popular, supported by many programming languages and easy to reuse in other projects.

The 16x2 lines LCD, OPO7C op-amp and an ATMEGA168 MCU used for development

This is it regarding the components, next up is the schematic diagram for the soldering station. Stay tuned!

Saturday, July 11, 2015

Soldering 101

Being in need of a soldering station but having too little cash to waste, I decided to create my own. This decision was also helped by my scepticism towards the quality of modern knock-offs that comprise much of the market today. Don't get me wrong, some of the newer chinese-made soldering tools sold today are well worth the money, but those in the lower-end segment don't tempt me too much after having done some research on them and seeing some reviews.

My last soldering iron driver was analog and also home-made. It consisted of
very few parts, the most important of them being a LM358 op-amp used as a
comparator, an optocoupler, a triac and some passives. Most people I know that built the same driver also added a display to it in order to show the temperature.

Of course, the display part was as crude as the driver itself, being made from an ICL7107 voltmeter hooked to 3 LED displays and being fed by another LM358 op-amp. The job of the second LM358 was to amplify the signal from the thermocouple (millivolts range) up to a usable voltage. For the iron itself, I personally used a 230 volts, 45 watts unit, modified to hold a K-type thermocouple in the tip:

Although primitive, this driver worked well for over 2 years until I decided to scrap it, mainly due to the fact that I couldn't find new tips for the iron. The sellers didn't resupply them since most people threw the units away after the coating of the tips started to wear off (thing which happened quickly). Also each time the tip was changed, the temperature scale drifted because the thermocouple was moved from its old spot. This meant calibration had to be performed again and again, eventually becoming a burden.

One could improve on the old design by adding a new soldering iron to it (for example one made for Gordak stations). Any improvements would be modest though because analog circuits aren't too flexible compared to digital ones.

The new soldering station I have in mind should do everything the old one did and more. This is what I'm mainly after:

  • The driver should be digital, based on a well known microcontroller. This offers many advantages over the analog counterparts (for example we can use the software to compensate for accuracy problems).
  • It must have a screen to show information about the temperature, but also offer some auditive feedback
  • The design should be easy to build by experts and novices alike, with few, easy to find electronic components
  • It should be fairly accurate. Considering the small budget, the temperature information shown on the screen will most likely not be spot on with the reality but that's not a problem in my book. After all, the driver is just half of the equation, the iron being the other.
  • The driver should accept a standard, 24 volt soldering iron with an integrated K-type thermocouple to take readings from (since most soldering irons are built with thermocouples these days, the exception being some of the professional units like the Hakko ones).
I'll keep you posted with any progress on the design.

Friday, July 10, 2015

Hello everyone!

My name is Alex and I decided to create this blog in order to share with you some electronics projects that I decided to build and play with. I am not an expert in this field but I do like it very much and plan on learning more about it on the way.

Most of the projects you'll find here will be designed and built according to the KISS principle, primarily for these reasons:

  • They must be cheap to manufacture while still being robust enough for everyday work
  • The components must be easy to find anywhere in the world
  • The people who build them will quickly understand the internal workings and they should be able to modify the basic design to suit their needs
  • No time should be wasted on unnecessary bells and whistles

I hope you'll learn new things from the coming projects :-).