18 Jul

Relay Circuit and Breakout Board

Before continuing with our toaster oven “reflow oven” project, we should understand how relays work and how to build a simple relay breakout board. This post will discuss the design of a relay breakout board specifically for our reflow oven project.

Disclaimer: As I mentioned in the previous post, do not attempt this project unless you know what you are doing. High voltages are dangerous and can kill you. Do this project at your own risk! This part is especially dangerous, as we are dealing directly with high voltage signals.

Introduction to Relays

The goal of a relay is to control high power devices using low power signals. A perfect example is controlling a 1500W toaster oven with a 3.3V or 5V microcontroller. Another example would be using a microcontroller to turn on or off lights in your house/apartment/dorm. Although the two examples I just gave involve turning on or off AC power to a device, relays can also switch high power DC signals such as headlights on a car.

While there are many different methods you can use for switching AC devices, I will only mention three of them. The first method uses a triac, the second uses a solid state relay, and the third uses an electromechanical relay. The first two methods are solid state, which means there are no moving parts; there are many advantages to using these two methods. The downside of using a triac circuit, is that it is not trivial to build. The downside of using a solid state relays is that it can be very expensive compared to electromechanical relays.

Relay Internals

Relay Internals (image from Wikipedia)

For this post, we will focus on electromechanical relays due to how easy they are to use and how inexpensive they are. Check out the Wikipedia page for a more detailed description of how relays work. To summarize, relays contains a coil (basically an inductor) which either forces a magnetic switch on or off; when current is flowing through the coil, the relay is “on”.

It is also important to note that relays won’t turn on until a certain amount of current is flowing through the coil. Many times, this current exceeds what a microcontroller can output so a transistor is needed to boost the current going into the coil.

Choosing a Relay

The first thing you need to determine when choosing a relay, is the maximum current and voltage you want the relay to control. For this project, my toaster oven has a maximum rated power of 1500W at 120V. It is important to find your maximum power, which is typically listed on every device. Using the following equation we can determine the maximum current the relay must switch on and off.

P = I * V

This is a very simple, yet useful equation; power is equal to current times voltage. Using this equation, the maximum current we need to design for is 12.5A. In engineering, it is always important to over-specify your system. Despite the fact that we only need to design for a maximum of 12.5A, we should design for 15A. This is a lot of current, way more than most devices will ever use. It is better to be safe than sorry!

Finally, the coil voltage and activation current must be determined. Since relays which can be turned on using a coil voltage of 3.3V or lower are expensive, we will be using a relay that has a coil voltage of 5V. This is great for those of you using a 5V microcontroller. Now that we know the coil voltage, we must find the cheapest relay which has the lowest turn on current. For my specific relay, this is denoted as “Operate power”. Given an operating power of 380mW and a voltage of 5V, the coil requires a minimum current of 76mA to turn on the relay. Since my coil requires more power than a microcontroller pin can drive, a transistor circuit will be needed.

20A Fujitsu Relay with 250 tab connections.

20A Fujitsu Relay with 250 tab connections.

Fujitsu Relay – 20A Heavy Load FTR-K3 Series

The last thing to note about the relay I have chosen, is that it is available with “#250 tab terminals”. As I mentioned in the previous post, this will greatly simplify things!

Relay Schematic

The image below shows how to set up a very basic relay circuit. The circuit consists of the relay, a diode, a MOSFET, and a resistor.

Schematic for the relay PCB.

Schematic for the relay PCB.

The output of the relay simply acts as a switch; for this project it will be hooked up between the heating elements and the AC return path (as discussed in the previous post) of my toaster oven. To protect the transistor (or microcontroller) from any unexpected current or voltage spikes, a protection diode is placed across the relay coil as shown above.

Using the transistor circuit shown above our MSP430 can turn on and off the relay. Since the output from a single I/O pin on the MSP430G2553 cannot exceed 6mA at 3V (we will be using 3.3V), a MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) must be used instead of a BJT (Bipolar Junction Transistor). Simply put, a MOSFET amplifies voltage where a BJT amplifies current. Finally, in order to protect the MSP430, a small resistor is placed between the gate and the microcontroller (100 ohms).

Current Voltage (IV) characteristic of a MOSFET.

Current Voltage (IV) characteristic of a MOSFET.

Now you might ask, can we just use any MOSFET or DIODE? While almost any diode will do, the MOSFET should be able to output 100mA at 5V (for our specific relay) and should have a minimum turn on voltage of 3V or lower. How can you find out if your MOSFET meets these criterion? Check the datasheet. Always check the datasheet. The image above is an excerpt from the BS170D26Z datasheet from Fairchilds; this MOSFET is available on Mouser. Here you can see that the MOSFET can operate at about 150mA when the gate to source voltage is 3.3V.

Putting the Circuit Together

When dealing with high voltages, it is important to be safe. As I keep mentioning, do not embark on this project if you do not know what you are doing. Due to safety issues, all relay circuits should be implemented on a PCB with thick enough traces to handle the current. Here is a picture of the circuit board I designed specifically for this project.

Rendering of my relay PCB from OSHPark.com (top).

Rendering of my relay PCB from OSHPark.com (top).

This circuit board was made using OSHPark.com, a service which has evolved from Laen’s PCB group order. In my opinion, this service is the best for small projects where you need 3 copies or less of a 5 square inch or smaller PCB. Now all we need to do is solder up the circuit board and test it out. The board works great turning on and off my toaster oven!


Stay tuned for more posts on building a toaster oven “reflow oven”. In the next post, we will look into measuring the temperature inside of our toaster oven. Stay tuned!

17 Jul

Modifying a Toaster Oven’s Wiring

In the previous post I discussed building a reflow toaster oven from a systems level perspective. This post will dive into choosing a toaster oven and modifying the internal wiring. Before working on the rest of the system, you should choose your toaster oven. This will ensure that the relay we choose can handle switching the amount of power the toaster oven needs.

As I mentioned in the last post, it is very important to use a toaster oven which has four heating elements and a convection fan. If you buy a cheap toaster oven which has fewer than four heating elements or lacks a convection fan, the oven will not heat up quickly enough nor will the heat on the PCB be evenly distributed.

The toaster oven I will be using for this project is a Black and Decker model which I purchased from Walmart. Despite this oven being somewhat expensive, it has four heating elements and a convection fan making it ideal for this project.  Here is a link to a more expensive toaster oven on Amazon that would also be perfect for this project. Before buying your oven, take a look at its wattage. The wattage should be about 1500W; generally speaking the higher the wattage, the hotter it can get and the faster it will heat up.  My oven is a 1500W oven.

Taking Apart the Oven

Taking a toaster oven apart is not a trivial matter, at least if you don’t want to break anything! Keep track of where every screw goes and try your hardest not to brute force any part of the oven. Once your oven is apart, it should look something like this.

My oven has three control knobs; the top is the temperature control, the middle sets which heating element is chosen, and the last is a timer.

Please note: This is not something that you should try if you are not familiar with high voltage systems. A toaster oven contains high voltage signals which can kill you. Proceed at your own risk. Do NOT attempt this project unless you really know what you are doing.

Now that I have the oven apart, I took my multimeter to it! I turned the oven on, played around with the settings, and measured the voltage on each heating element. Interestingly enough, the top heating units were driven with 60V (this is half of 120V, the mains voltage in the US). Apparently, having the top heating elements turned all the way on would be overkill for food; this is not true for a reflow oven! We want to have all of the elements turned on at full force, so the switching control will need to be bypassed.

Instead of replacing the timer control knob with a relay circuit, I decided to keep the timer circuit for safety. By setting the timer to 10 minutes at the start of a PCB run, I will have an additional safeguard in case I forget to turn the oven off for any reason. I disconnected the temperature knob and the oven mode knob and wired up the device so that all the heating elements will be completely on when the relay turns on; otherwise everything will be turned off.

The Wiring

How should you wire your toaster oven? While there are many ways to do this, I have chosen the following method.

Block diagram of the toaster oven's internal wiring.

Block diagram of the toaster oven’s internal wiring.

The above picture shows a block diagram of how I plan to wire the toaster oven. Note that the relay is connected between the final heating element and the negative AC input. There is no particular reason for putting the relay here, rather than directly in front of or behind the timer. The reason I wired up the relay this way is because it made the wiring significantly more simple on my specific oven. Take a look at your oven and plan ahead; taking the time to do so makes all the difference.

What About the LCD??

In our last post, I mentioned that there would be an LCD which displays the current temperature and the temperature curve. This is where a Dremel really comes in handy. For those of you with no means to cut metal, you can attach the screen to the outside of the oven and simply bring out the relay control wires to the microcomputer. Since I have a Dremel (which is an amazingly useful tool), I ended up cutting out a square hole for the LCD where the temperature control knob used to be.

The square hole cut for the LCD using my Dremel.

The square hole cut for the LCD using my Dremel.

Be patient when using your Dremel! Otherwise you will have a messy hole for your display; because I was impatient, my cutting job is not as clean as it should be! Oh well!

Preparing for the Relay

Many toaster ovens use a standard #250 tab terminal connector for the internal wiring. This is very useful! You can purchase relays which have this connector built in, allowing you to further separate the high voltage signals from your low voltage signals on the relay PCB. I will discussing this more in the following post on the relay circuit.

The toaster oven's terminal connectors connected to the relay.

The toaster oven’s terminal connectors connected to the relay.

The image above shows these standard connectors in my toaster oven. These connectors are available at any hardware store (Lowes, Home Depot, Amazon). All you need is a crimper and the correct gauge wire. These connectors really make things easier. The less we have to cut and solder the original wiring, the better.


Be careful when you modify the wiring in your oven. Use zipties to keep your wiring clean and use electrical tape (or liquid electrical tape) to prevent shorts. Our next post will discuss the relay circuit. Stay tuned!

01 Jul

Yet Another Toaster Oven “Reflow Oven”

At some point, every electronics hobbyist wants to make their project permanent, or even start selling a simple design they have. With the advent of group PCB orders and cheap manufacturing services, such as OSH Park (originally DorkbotPDX PCB Order from Laen) and SeeedStudio’s Fusion PCB Service, the cost of getting a custom PCB made is almost negligible! What great times we live in. Instead of etching boards myself I simply upload my board to OSH Park, verify everything is correct with the automated model of my board, then checkout. About two weeks later, my boards arrive.

Now that custom PCBs are so easy to come by, the most difficult (and possibly most frustrating) part of a project is soldering all the components onto your PCB. Since many of my projects use surface mount devices (SMD or SMT) which are very small, I have wasted many hours simply soldering up my boards. Being that many of my projects are designed to be portable, the smaller the design, the better. This usually means that I will be using chips in my design which are very, very small. For example, I am currently designing a CC430 based circuit board; the CC430 is only available in a QFN package.

Dimensions of TI's CC430 QFN Package.

Dimensions of TI’s CC430 QFN Package.

This image, taken from TI’s QFN package pdf, shows how small these chips are. Those measurements are in mm and there are no pins coming off this device; each pad is underneath the chip. To make things even harder, there is a thermal pad completely underneath the chip. While soldering this by hand is possible, it is not fun. Trust me on that.

The Solution

A reflow toaster oven and a simple laser cutter. Why a laser cutter? Using a reflow oven makes things easier, but we still have the problem of putting the correct amount of solder paste on the board. This can be done using a PCB stencil. SparkFun has a great writeup on using PCB stencils, they also mention that you can get cheap stencils made from Pololu. Check out this link for a bit more information on what PCB stencils are and how they are used.

Since I make quite a few designs, buying custom stencil’s from Pololu would get quite expensive; thus the decision to make a laser cutter. After having built a RepRep (3D Printer), I feel that designing a simple laser cutter would be cake. We shall see… The process of building a laser cutter will be investigated after I finish the reflow oven.

The First Step

In this first post, I will discuss the high level system design of the reflow oven. My first step was to figure how I would control the reflow oven and create a block diagram of the system.

My reflow oven: A work in progress.

My reflow oven: A work in progress.

The goal here is to modify a regular toaster oven so that you can control the internal temperature accurately over a set duration of time. After doing some initial research and taking apart my toaster oven of choice, I have decided that the best way to control the temperature is to use an electromechanical relay. This method involves turning the heating elements on or off completely. In my design, I will control everything using an MSP430. I will also have a status display built into the toaster.

There are many toaster oven reflow designs out there, some have the electronics built into the oven others consist of a dongle which goes between the toaster oven and the power outlet. While there are benefits to both methods, I will be modifying the toaster oven and will keep all the electronics inside. My goal here is to have a completely self contained reflow oven. Now that we know what the system will consist of, we can draw the block diagram.

Block Diagram for the Reflow Oven.

Block Diagram for the Reflow Oven.

Each of these blocks will be discusses in a separate blog post as the design progresses. For now I would like to discuss an initial bill of materials (BOM) and expected cost. Here is a list of what I believe I will need to create a working reflow oven. Please note that this list and the prices are almost guaranteed to change going forward, this current list will give us a general idea of how much the project will cost.

Assuming you need to buy all of the items listed above, the cost will be $68. In reality, it can cost you significantly less than this depending on what you already have at home from other projects. I already have temperature sensors from my RepRap build, a DC regulator from an old cell phone charger, and number of MSP430 boards laying around. My total costs should be less than $55. This is not bad considering how many hours I will save by not hand soldering components; that is, if everything works out as planned!
Please note: I believe that it is very important to buy a new Toaster Oven when building a reflow oven. Having a new, perfectly clean oven with four heating elements will make all the difference. Having an oven which heats evenly and quickly is paramount; you will almost always have problems if you skimp on the toaster oven.

In the above list, I have provided links to examples of each part. If you are interested in building a reflow oven, these links are just suggestions on where to get started. The prices do not necessarily reflect what I link to, since you might need additional parts such as resistors, wiring, or a custom PCB.

Useful Links


Hopefully this post has peaked your interest. Stay tuned to watch the whole build process!