Andrew's Project Blog: Hardware, Software, Stuff I find Interesting

Oven Heater Element Control Circuit In a previous article I described insulation of a mini/toaster oven with the aim of using it for table top reflow soldering. Some manual tests have been encouraging. This article documents creation of the circuitry required to turn the ovens heating elements on and off under control of a microcontroller. I'm still not convinced that the oven can increase its temperature fast enough to warrant attempting to recreate a 'proper' reflow profile, but even if not, using a microcontroller to log and display the temperature and turn off the heating elements when the peak is reached will still be worthwhile.

The circuitry below involves mains electricity, don't try this unless you are sure you know what you are doing - check, test and insulate repeatedly and thoroughly.

There are a number of commercial relay control boards available, for example Futurlec and Elector.

The Hinari HTP033 oven has two elements and a total power rating of 630W - so each draws just over 1.3A at 240V (UK mains voltage), this obviously can't be provided directly from a microcontroller IO pin but requires some kind of relay. There's a huge range of relays available - I choose a IMO SRRHN-1C-S-5VDC, this can operate at 5Volts, draws 100mA (I actually found it took under 75mA) and is fairly cheap (a few £). Although a 5V device can be driven from a microcontroller IO pin, 100mA is too high a load, 40mA is the maximum for most AVR Microcontroller IO pins, although the maximum current drain for the entire device is around 200mA, so 40mA can only be driven on a few IO pins at once.

Driving the relay

A simple transistor/resistor circuit can be used to control the relay with much lower power drain. Basically the transistor (I used a 2N2222A) is being used as a current amplifying switch. Relay Board for Heater Element Control When the transistor is being used in on/off mode - only approximate mental/back of the envelope maths are needed to calculate the values of the resistors (Search Google for more background).

From the transistors datasheet, when the 100mA of current required to power the relay flows from collector to emittor the transistor will provide a minimum gain of just under 100 - so atleast 1mA needs to flow into the transistors base, if the IO pin is high at 5V and there's a 1V voltage drop from the transistors base to emitter, a resistor of 4K will provide this (R = V/I = (5V-1V)/1mA). To cope with less gain and a lower Vbe voltage, it's best to provide much more current to I used a 1330R and measured 3.5mA going into the base of the transistor when on.

Resistor R2 connects the base to ground when the input is unconnected. This ensures the relay will be safely turned off during microcontroller startup. The 10K resistor ensures the current flowing through it when the input is high will be low.

The relay is just a coil of wire which acts as an electromagnet when current flows through it, unfortunately when the power is switched off it will act as an inductor pumping current back into the circuit - the diode protects the transistor when this happens by providing a 'return path' to the 5V supply.


The circuit (2 of them) was simple enough to build on a Oven Relay BoxPrototype/Vero board (pictured above) and housed in a plastic box to protect from earthing. I bypassed the ovens element and timer controls and passed the live mains wire to the relay box with an output to each of the elements.

Some brief tests with an Arduino turning on the relay control pins showed that the relevant oven element came on perfectly, with a reasuring click from the relay as it switched. Now I have more control over the ovens elements the plan is to do more extensive testing to see how controllable the temperature is.


  2. Google Search: Using transistor as a power switch
  3. 2N2222A transistor datasheet
  4. Commercial Relay boards: Futurlec andElector.
  5. Some other relay control articles on the web SparkFun

It looks like your browser doesn't support javascript so comments won't work

Tags/Categories: projects, arduino, SMT, soldering, reflow oven, relay