How to Build a Heater with Arduino – Part 1

This tutorial will explain how to build a portable heating device with Arduino. If you’re an amateur astronomer, this can be the perfect way to prevent the formation of dew on your mirrors and lenses. In my specific case, I’ve built one of those mini heaters to warm up a formicarium. Whether it’s for your feet or for your cold-blooded pets, building a heater is easy and cheap.

The second part of this tutorial (How to Build a Heater with Arduino – Part 2) will explain how to use a temperature sensor to maintain a desired temperature.

Introduction

It’s safe to assume that we’re all familiar with electric heating devices. Whether it’s a toaster or an oven, the underlying mechanism is the same. The current drawn from the socket is somehow transformed into heat. This phenomenon occurs even in situations in which is not desirable. Your laptop, for example, can warm up significantly when is performing intensive computation. The flow of electricity seems to be somehow related to heat. As a massive oversimplification, this happens due to a property of all materials, called electrical resistance. You can imagine the resistance as an obstacle that the current has to overcome when flowing through a conductor. Resistors are electrical components designed to have a specific resistance. When attached to a battery, resistors will dissipate some of the energy they receive as heat. In a nutshell: resistors get hot. How hot they can get, mostly depends on the amount of current that flows through them.

The Theory

The temperature of a resistor depends on many factors, from the room temperature to the rate at which air is flowing. The resulting increase in temperature can be hard to predict and to replicate reliably. Generally speaking, is not very useful to describe the heat produced by an electrical component in terms of degrees. What is more reliable is the amount of power that is dissipated, which is measured in Watts. But how “hot” is a Watt? The question doesn’t really make sense in its current formulation; but you can still get your head around it if you think about the following scenario. A traditional light bulb converts only 10% of the energy it receives into light; the rest is dissipated into heat. A 60W light bulb will dissipate 54W=60W*90\% into heat. That is enough to make a small filament of tungsten glowing red hot.

For the purpose of this tutorial, we want to create a heater that dissipates 3W. Which is generally hot enough to gently warm your hands and feet. The power will come from a standard 9V battery. Theoretically speaking, this could be done entirely with a single resistor. What’s the necessary resistance to achieve such an effect? To calculate this we have to rely on Ohm’s and Joule’s laws. Respectively:

    \[V=I\cdot R\]

    \[P = V\cdot I\]

The first one relates the voltage of a circuit (Volt) to the intensity of the current (Ampere) that goes through its resistor (Ohm). The second one, relates the energy (Watt) produced with a certain voltage and current.

We can merge the two to obtain a single equation that has exactly what we need:

    \[R=\frac{V^2}{P}\]

By plugging the values from our setup, we discover that a resistance of 27\Omega = \frac{9V^2}{3W} is needed to dissipate 3W of power from a 9V battery.

Dissipating the Heat

If we decide to use a single resistor, we’re forcing it to dissipate all those 3 Watts of power. Standard resistors are usually graded for \frac{1}{4} or \frac{1}{2} Watts. Forcing more energy through them will cause the resistors to fail. If your component changes colour or starts smoking, you know that you’ve fried it. Overheated resistors can catch fire and even explode, so be careful.

The easiest solution to overheating is simply dissipating those 3W of power between multiple resistors. If only \frac{1}{2}=0.5 Watts resistors are available, then we need at least 6=\frac{3W}{0.5W} of them. It’s important to notice that this refers to the maximum power that the component can withstand before failing; if you want to be safe, you should allow for a wider margin. Running a 0.5W graded resistor at 0.49W will dramatically reduce its lifetime. By using 12 resistors, we are sure they won’t be damaged in the long run.

Building the Ladder

We now know that we need 12 resistors, and that they have to somehow sum up to 29\Omega. There are a number of ways in which this can be arranged. For instance, you can use twelve 2.41\Omega=\frac{29\Omega}{12} resistors in series. Unfortunately, is unlikely you’ll find a component with such a resistance value.

Heating strips are usually made by connecting all the resistance in parallel, arranged in what is called a resistor ladder. To do this, each resistor will need 348\Omega = 29\Omega \cdot 12.

IMG_20160731_130421

Depending on the resistors that are available to you, your setup might be slightly different. I ended up using twelve 330\Omega, \frac{1}{2}W resistors, safely dissipating 2.9W.

wire1

Switching to Main

A standard 9V battery has a capacity of 500mAh; meaning that it can provide 0.5A for one hour before needing to be recharged. If we draw only half the current, it will last twice as long. Looking back at Joule’s law, our setup draws 0.3A=\frac{3W}{9V}. This means that a 9V battery will power the heater for 1.7h=\frac{0.5A}{0.3A}, which is approximately one hour and forty minutes. The final design presented in the second part of this tutorial will last much longer, since it will power the heater only sporadically.

Working with electricity can be dangerous. When you’re sure that your design works, you can improve it by providing power from the socket. The main supply voltage in the UK is 240V; touching a bare wire can kill you. If you want to be safe and worry about about running out of power, you should connect your resistor ladder to a phone charger. Chargers are usually rater for 5V, capping the amount of current they can provide to 0.5A (500mA).

Conclusion

If you’re looking for a quick, plug-and-play equation, this is what you need:

  • Decide how many Watts of power P you need to dissipate;
  • Check the wattage W of your resistors;
  • Check the voltage V of your power supply;
  • Calculate how much resistance you need to dissipate the desired power: R_{tot}=\frac{V^2}{P};
  • Calculate how many resistors you need: n = \left \lceil  \frac{P}{W} \right \rceil;
  • Calculate the resistance R you need for the n resistors in your ladder: R = R_{tot} \cdot n.

The next part of this tutorial will show how to add a temperature sensor to the design to keep the temperature stable.

Other Resources

Comments

10 responses to “How to Build a Heater with Arduino – Part 1”

  1. Thanks for the helpful explanation, that’s a good way to heat from a 5V PSU in my case.

    In “The theory” you arrive at 27 ohm. In “Building the ladder” you calculate with 29 ohm. With 29 instead of 27 you arrive at 2,41 ohm instead of 2,25 ohm. Then, by multiplying 27 * 12 the value should come out as 324 ohm.

    ; )

  2. Laura avatar

    Hello, thank you for this tutorial. It’s very helpful and I want to use it in my formicarium. It’s perfect for heating a few very tiny chambers and only a few degrees. I just wonder how you decided on the 3W? And would it be possibly to bundle the resistors (such as rolling up the ladder) so the heat gets concentrated or would that be too much for the resistors?

    1. I’m glad this helped! I used it for a formicarium as well!
      In that case, make sure to leave a side of the formicarium cold, so that the ants can have a temperature gradient they can play with! They like moving stuff around.

      Using 3W I got a good temperature. It is rather tricky to get how much your temperature will rise (this could be a good starting point: https://electronics.stackexchange.com/questions/65200/is-it-possible-to-calculate-how-much-heat-dissipation-and-temperature-rise-will ), mostly because you are heating something rather complex like a formicarium.
      I was not too worried about that, to be honest, because I can control the temperature using a sensor anyway. But having a lower/higher W definitely changes how rapidly your formicarium will heat up.

      And yes, you can definitely coil the resistor ladder. However, make sure the wires do not touch!

  3. André Ferreira Dias Martins avatar
    André Ferreira Dias Martins

    Alan, If I want to reach a set temperature in °C, for example 60°C, using a ceramic resistor plate, how can I determine the ideal Watt specification for the ceramic plate. Currently I’m playing around with a 7x7cm ceramic resistance rated for 300W @ 220V. With the experiments I made it seems to me that it’s totally overkill to what I’m trying to accomplish, keep the plate heated at around 60/70°C. I know this a tricky question to answer, that it depend on the material, the enviroment, etc…
    By the way, great article, really straightforward and easy to understand

    1. Hey!
      Yeah, is quite hard to calculate that unfortunately. Especially if the component is not done for that.
      My advice is to experiment with different power / resistors until you get the temperature you want. Alternatively, the best solution is to use a microcontroller and a temperature sensor. I covered this in the second part of this tutorial. Is a little bit more complicated, but to be honest you reduce the risk of setting your house on fire. :p

  4. Hi. I want to make a little oven, that rich just to 150°C. How can i have that heat??
    In my country we have 220v………..

    Thanks, and sorry (i dont speak english)

    1. Hey!
      Temperatures that high can be dangerous to traditional resistors.
      My best guess is to use an alternative (yet equivalent) solution.
      Have a look at at nichrome wire. It is a special type of wire that can get red hot, with the right amount of current.
      The voltage should not be a problem, as long as you do your Maths right! 🙂

  5. In “Switching to Main” part it should be 1.7h not 0.6

  6. […] the first part of this tutorial, How to Build a Heater with Arduino – Part 1, we’ve discussed how to create and calibrate the component that will generate the heat. The […]

Leave a Reply

Your email address will not be published. Required fields are marked *