Do It Yourself Electrical Cup Heater (DEC)




Introduction: Do It Yourself Electrical Cup Heater (DEC)

We are sure some recluse anarchist somewhere enjoys sipping lukewarm tea in his doomsday bunker, just watching the world burn from behind his bulletproof glass. It’s easy to imagine them watching the steam escape from the dark liquid until it's flat and cold, for no one other than a malcontent insurrectionist could indulge in frigid coffee. The thought sends shivers up our spines. As generally complacent human beings, satisfied with living as active participants of society, we much prefer drinking such beverage as they are meant to be: hot. Yet, due to the little thermal insulation everyday mugs offer, we often find ourselves at the terrible crossroad between consuming tepid brews or wasting life’s finer things. We had to put a stop to this almost daily struggle. Hence, in the face of these trials of fire (or lack thereof), we decided to create a Monday-blues-curing device, one to finally put an end to this perpetual frustration: the DIY Cup-Heater.

Simply enough, this device of our creation can be attached to your favourite mug and give off heat when the temperature of the content of your cup goes below a certain point. Equipped with a temperature probe and a ring of resistances serving as the heating element, never again will you have to endure throwing back warmish liquid. An Arduino Nano is elegantly concealed in the base of the contraption which acts as a platform on which the mug stands. Power is drawn from a 9V battery and, as a security measure, a layer of silicone has been added to serve as an isolator between the heating element and the user’s hand. Thus, you can still drink from the cup even as it heats. All the components are either soldered or sewn together.

To put it into context, let’s examine the following scenario. You’ve been steadily working for a few hours, occasionally reaching out to take a shallow sip of your once-piping hot cup of hazelnut coffee. Feeling the recurring urge for the strong bitter taste, you blindly find the mug that rests next to your keyboard. Without paying much attention, you dip your lips into the tepid waters, unwittingly walking right into your worst nightmare. It’s cold. You jerk back with a grimace, and set the cup back down. Normally, frustration would be quick to fill you, but instead of giving into the emotion, you quickly open the bottom drawer of your desk and take out the D.E.C., a coy smile gracing your lips. Not this time, you think as you affix the small machine to your cup. You set your mug on the base and clip the ring of resistances around its body, a small elastic attaching the Styrofoam structure to the handle of the cup. A push of the button turns it on, and you sit back, successful in your endeavour. What you can’t see, yet know is happening, is that the Arduino is drawing electricity from the 9V battery, looking to the temperature probe to see if the liquid fills the conditions required by the code. Below 45 degrees Celsius, the Arduino sends electricity out to the ring of resistances to head the mug. Once the liquid reaches 55 degrees Celsius, the power to the resistances is cut, keeping the contents of the cup at around 50 degrees Celsius, prime hot beverage temperature. The machine stays on until you turn it off, which means that the temperature of the mug will never dip below 45 degrees as long as it is on. Now, you can drink your favourite warm brew with the knowledge that it will never go cold again.

So, as shown in the example above, our machine solves the horrid problem of cold tea or coffee. We hope that by making this an easy build and putting all the necessary instructions and the code at your disposal, you may benefit as well from this small idea. Even if a hot cup of Joe won’t solve all the world’s problems, it does help those who will wake up in the morning. As Jerry Seinfeld said: “We want to do a lot of stuff; we’re not in great shape. We didn’t get a good night’s sleep. We’re a little depressed. Coffee solves all these problems in one delightful little cup.” Might as well make that cup enjoyable.

Step 1: Tools, Material and Files

Alright, so here we go. First, take a look at the game plan for this project. As you can see, we’ve split the execution into three components to make this easier to follow: electrical circuit, coding, and sewing. Each step has its own list of materials and a clear protocol to follow as well as notes on what we’ve found works best. We’ve also put together a full list of what you’ll need to complete this project and any other tools you’ll require, which you can find just under this text. Links to the resources we used when putting together this project can be found at the bottom of this page, along with useful files, for all those who want to go a bit further with this design. You’ll need the Arduino software to complete this project. If you don't have it yet, we’ve attached the link at the bottom of the page where you can download it.


- Electric circuit

- Coding

- Sewing


A list of the material needed for the realization of our project is following:

- Your favorite mug

- Resistance of 560 ohm (x 19)

- Wires

- 9V Battery snap

- 9V Battery

- Temperature probe

- Nano-Arduino

- Bra clip

- Silicone band (for BBQ)

- Tissue elastic (matching color with your band)

- Thread (color of the band)

- Styrofoam

- Scalpel (10mm)

- Nail file

- Button (we however strongly recommend the usage of a normal switch)


Here's a list of the tools needed for the realization of your project:

- Sewing machine

- Arduino wire

- Hot glue


A list of hyperlinks to other people’s project that we used to inspired our project is following:

If needed, here is a link where the Arduino software can be downloaded. Note that you can also use a free online version of the software on the Arduino website if you don't want to download it.

Step 2: Electric Circuit

Material :

- Resistance 560 ohm (x 19)

- Wires

- 9V Battery snap

- 9V Battery

- Temperature probe

- Nano Arduino

- Button

- Hot glue


- Do the calculations to find the number of resistance needed. For our project, we needed 19 resistances of 560 ohm in our parallel circuit. Note that the number and the strength of the resistance will change if you do a series circuit.

- Install the resistors in parallel with one another similarly to the diagram. Note that the diagram doesn't have the right number of resistance due to the limited space and that they are not of the right colours.In order to do so, place the different resistance in parallel one form the other and, one at the time, solder each extremity of the various resistance to the two wires.

- Soldier the temperature probe to its respective place.

- Connect the circuit containing the resistances to the Nano Arduino

- Connect a 9V battery using a "snap" to the Arduino

Step 3: Arduino Coding


- Nano-arduino


-Establish a temperature range (ours is from 45 ° C - 55 ° C)

-Define the variables you need

-Upload the program into the Nano Arduino device


Code #define PIN_SENSOR A1
#define PIN_SWITCH 9

float target = 50;

void setup()






float getTemperature() {

float data = analogRead(PIN_SENSOR);

return (45.0* data * 55.0) / 1024.0; // Celsius


void loop()


// Temperature read

float c = getTemperature();

Serial.print("Temperature: ");


// Regulation

if (c > target)


digitalWrite(PIN_SWITCH, LOW);

Serial.print("\tHeater OFF");

} else {

digitalWrite(PIN_SWITCH, HIGH);

Serial.print("\tHeater ON");




Step 4: Assembly


- Your mug

- Bra clip

- Silicone band (for BBQ)

- Tissue elastic (matching color with your band)

- Thread (color of the band)

- Styrofoam

- Scalpel (10mm)

- Nail file (ours was in the shape of a foot)


- Cut the styrofoam into a cylinder.

- The circular base of it should be isometric to the base of your mug.
- Sculp two indents in your cylinder so the battery and the Nano arduino can completely rest inside. Thus, the one for the nano Arduino will be a rectangle of 45:18 per 30 mm of depth and the one for you battery will be of 55:20 per 30 mm of depth if you use one of 9V like in our project.

- Cut the band so that it can cover the entire mug

- Glue the styrofoam to the bottom of the silicone band.

-Sew the electrical circuit to the band as shown in the picture above

-Sew the bra clip in place

- Sew the bottom of the silicon so it is surrounds the styrofoam cylinder at the bottom of the cup

Step 5: Conclusion

In conclusion, this project, though thoroughly planned and well executed, is not perfect. In fact, we faced quite a few obstacles in the creation and making of this useful device. The first problem we encountered was how we were going heat the mug. We debated using a heating element bought off the internet, but worried the size or strength would risk the portability and effectiveness of the device. Only after thorough online research did we find an alternative in using a ladder of porcelain resistances. The adaptability of the easily found resource immediately hooked us, as well as the fact that most of the mathematics surrounding the use of the resistances was present in the article (which can be found in Step 1). This simplified our project significantly, letting us then shift our focus to the other issues surrounding our device.

One of these issues was the type of isolating fabric we would use on the outside of the electrical components to ensure it was safe to touch even when hot. It couldn’t be anything that would melt, so plastic was out of the question, but the material had to be pliable enough to bend around the mug. The idea of silicone actually came from our experience with cooking and baking. Silicone baking mats are used in place of parchment paper and can resist heats of 200 degrees Celsius in the oven. Furthermore, as we were well acquainted with the material, we knew how pliable it was. The choice of this fabric also permitted us to choose the colours and design most appropriate for our device and would conserve the heat in the mug being an isolating material.

After overcoming these obstacles, the project moved on almost flawlessly. The finished product was gratifying, but did not live up to all our expectations, sadly. One of the major aspects we would try to better in a future version of the system would be the quantity of heat given to the mug. A 9V battery, though it might heat the resistances, only changes the inside temperature of the mug very slightly. One modification that could be made would be the addition of a heating plate on the base of our machine so the bottom of the mug would also be heated. However, if this would be done, a bigger power source would have to be used, which means we would have to sacrifice the portability of our device and add a fixture that could be plugged into the wall.

In any case, the development of this device has enabled us to explore the use of Arduino and the design of electrical circuits, all to create something we could use in our everyday lives. We hope you take this design and personalize and improve it. Have fun, and be safe!

Valérie Courval and Sabine Plummer

Be the First to Share


    • Laser Challenge

      Laser Challenge
    • Unusual Uses Contest

      Unusual Uses Contest
    • Hide It Challenge

      Hide It Challenge



    4 years ago

    That's neat :)