LittleBits DIY Smart Thermostat




Introduction: LittleBits DIY Smart Thermostat

About: littleBits makes an open-source library of electronic modules that snap together with tiny magnets for prototyping, learning, and fun. littleBits consists of tiny circuit-boards with specific functions engin...

Monitor and control the temperature of your home remotely. Transform your average household thermostat into a smart thermostat, kind of like nest. Now you can use your smartphone to get real time temperature readouts from your home and change the temperature from anywhere, whether you are across the world or sitting on the couch.

*Note: The temperature sensor is coming soon. Stay tuned!

Make this project with littleBits

littleBits is the easiest and most extensive way to learn and prototype with electronics. We are making hardware limitless with our award-winning, ever-growing library of electronic modules, ranging from the very simple (power, sensors, LED) to the very complex (wireless, programmable). This project uses the littleBits cloudBit (TM). The cloudBit lets you connect any device to the internet, turning any object into an internet connected device in a snap – no soldering, wiring or programming required. Instructions for setting up the cloudBit can be found here.

How it works:

Monitor: ­

There are two number modules in this circuit, one which displays the the current temperature in your home, and the other which displays the desired temperature you set. The current temperature in your home is read by the temperature sensor and transmitted through the first Arduino module to the cloudBit. In Cloud Control, you can view the temperature readout under the “receive signal” tab.


The desired temperature can either be controlled through Cloud Control with the cloudBit or manually with the dimmer. Because these two inputs will often be set to different temperatures, the second Arduino module decides which input was most recently changed by you and sends that signal to the first Arduino. This module compares this value to the analog value coming in from the temperature sensor. Based on the difference of this comparison, the Arduino will either tell the servo to turn on or off. The servo activates the mechanism in a traditional thermostat that controls the temperature in your home. For example, if the current temperature of your home is 80 degrees Fahrenheit, and you set it to be 70 degrees Fahrenheit, the Arduino will turn the servo on until the current temperature comes down to 70 degrees Fahrenheit, thus equalizing the inputs.


Use IFTTT to program your thermostat to maintain certain temperatures throughout the day. IFTTT is a service that lets you connect to different web apps through simple conditional statements. For example, when you are away from home during the day, it is ok if the temp reaches up to 80 degrees Fahrenheit, but when you are home after 5 pm, you want it to stay around 70 degrees Fahrenheit.


The button, latch, and LED at the top of the circuit act as an on/off switch for the thermostat. When this part of the circuit is on, the Arduino runs its program. When the button turns the latch off, the Arduino stops adjusting the servo (but you can still read the current temperature from the number module or from Cloud Control).

Bits You Will Need:

littleBits Arduino x 2

littleBits Branch x 1

littleBits Bright LED x 1

littleBits Button x 1

littleBits cloudBit™ x 1

littleBits Latch x 1

littleBits Number x 2

littleBits Servo x 1

littleBits Slide Dimmer x 1

littleBits Temperature Sensor x 1

littleBits USB Power x 1

littleBits Wire x 4

Other Materials Used:

Manual Analog Thermostat

Super Glue

Tools Needed:

Screw Driver

Wire Cutters

Files You Will Need:

Arduino Input Control

Arduino Temperature Control

Servo Swing Arm

Visit the littleBits project page for more DIY project ideas.

Step 1: Set Up Your CloudBit

You'll find the instructions for setting up the cloudBit here.

Step 2: ​Assemble the Circuit

Assemble the circuit using the image as a guide.

Because it’s a pretty big circuit, we recommend using either some mounting boards or littleBits shoes mounted to a board.

Step 3: ​Load Your Code Onto Each Arduino

Input_Control should be loaded onto the Arduino labeled #1 in the diagram. This Arduino will decide whether to read the set temperature from the dimmer or from the cloudBit. Essentially, the code chooses whichever input was most recently changed.

Temperature_Control should be loaded onto Arduino #2. This Arduino reads the current temperature, compares it to the set temperature, and then turns your heater or AC on or off.

Step 4: Prepare Your Thermostat

You have two basic options for how to use the circuit you just built to turn a simple thermostat into a smart, internet­-connected one.

The simplest way is to use the servo to adjust the temperature switch like we did in this image. If your thermostat doesn’t have an easily accessible switch (or if you just like to open things up and take them apart) you can also replace the switch with a servo. See the next step for how we did that.

Step 5: Prep Your Thermostat (part 2)

We used a very basic thermostat from the hardware store. It uses a temperature responsive metal coil to turn your AC/heater on and off (see image).

This kind of thermostat is perfect for this project because the metal coil is essentially just an on/off switch. We replaced the metal coil with our servo so we could control the thermostat with our new circuit.

Step 6: Remove the Coil

First, open up your thermostat and remove the metal coil and any levers attached to it.

There should be a contact on the end of the metal coil that is attached to a wire. Keep this piece connected to the wire. It’s what turns the switch on and off when the coil moves.

Step 7: Add the Servo

Connect a power module to the servo so that it will go to its 0% power position and hold there.

Attach the swing arm (template included above) to the servo with a screw and washer. Run a 3mm machine screw through the swing arm and then attach the thermostat’s contact to the end of it as shown in the images.

Glue the servo to the thermostat so that the contact can swing from one end of the switch to the other.

Step 8: Adjust the Servo Swing in Your Arduino Code

To change how far the servo turns, adjust the variables servoTempHigh and servoTempLow in the Temperature_Control code. If you try to turn the servo too far, it will wear them out over time, so only turn them as much as you need to touch each of the ends of the switch.

Step 9: Attach Thermostat to the Wall

Wire your thermostat to the wall according to the manufacturer’s instructions and you’re ready to go!

Be the First to Share


    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Super-Size Speed Challenge

      Super-Size Speed Challenge
    • Audio Challenge 2020

      Audio Challenge 2020

    10 Discussions


    3 years ago

    I can see the advantages to using an off the shelf thermostat as an interface to the industry standard wiring for the thermostat, but wouldn't it be simpler and less error prone to replace the entire switch assembly with a relay instead of replacing part of it with a servo? Or is there some reason I'm not seeing for keeping part of the mechanical assembly?


    5 years ago on Introduction

    My only issue is that you can buy a Nest for the price of all the littleBits it takes to do this. The littlebit wire component by itself is $12, for two wires essentially. On the other hand, self revising the tutorial to use normal components and no littleBits makes for a pretty cheap smart thermostat.


    Reply 5 years ago on Introduction

    i agree, and using a prototyping board gets away from the need for soldering


    Reply 5 years ago on Introduction

    You're missing the point. This isn't an instructable on how to make a super cheap smart thermostat. This is an instructable on how to use little bits to make a smart thermostat. The idea being that you don't have to be an expert on electronics and wiring to do it. No offense but your post really adds nothing to this great instructable. It just complains about what is being used to do it.


    Reply 5 years ago on Introduction

    Your comment adds nothing to this 'ible or to max's comment, and i think comes close to crosing the be nice policy.


    Reply 5 years ago on Introduction

    Actually I see maxcorbetti as adding a very valuable piece of information to this 'ible. People like myself come to to find the best, and least expensive way of making a project we want/need.

    This 'bile shows a neat product idea to help those who cannot wire/etc, and for that I applaud it. But when someone points out the system - in this case - costs more than what it would be to buy a similar ready-made product, it gives insight in what to be careful about when using Little Bits. Now I know if I do look into Little Bits, I will be sure to integrate my own ideas (such as substituting two pieces of wire, instead of paying 12.00!) to keep the most money in my own pocket as possible.

    The only possible negative maxcorbetti's comment would have is on the profit made by the producers of this system since someone found a "hack" that makes their system less expensive to build. But... I thought great/inexpensive hacks was EXACTLY what was for...


    Reply 5 years ago on Introduction

    Anyone who spends time on this site knows that it is not just about cheap or inexpensive. It's about creative ways to do things. Yes, it's nice if we can be shown more inexpensive ways to do things but that is not the sole purpose of this site. And there is a be nice policy. It's at the bottom of every comment box. They want us to be positive and constructive. Pointing out that you can buy something to do the same thing is really not helping anything. We all know we can buy things to do almost anything this site shows us how to do. It's just not constructive. But that is my opinion.


    Reply 5 years ago on Introduction

    Please don't take my response as not saying littleBits (forgive the wrong spelling before) are not a cool idea! I think someone who has no time to learn soldering etc. has a good option in these.

    Two of your statements:

    "Pointing out that you can buy something to do the same thing is really not helping anything..."

    The only "negative" impact pointing out costs might have is to hurt potential profits by someone advertising a product. You said,

    "You're missing the point ... This is an instructable on how to use little bits to make a smart thermostat. The idea being that you don't have to be an expert on electronics and wiring to do it."

    Then there should be no perceived negative since the goal was not to make a profit, but to showcase this system.

    You also said, "Pointing out that you can buy something to do the same thing is really not helping anything."

    Well... yes it is to people who are reading/finding out about your 'bile since it will help them save a few bucks (if they choose not to build). I personally think it a very positive thing when people tell me how to save money.

    Al that put aside, littleBits seem a really cool idea. They should be able to stand on their own without a worry of something like someone pointing out its cheaper to buy a ready made product. I think if it is you who is trying to market these, you should try the education market. Being a former teacher, I can see how science classes could really benefit from these. Rather than a teacher needing o take the time to solder something together to show how a component works, your system makes it much more simple. It would be great for teaching students the basics, And only after that, the teacher could focus them on soldering etc. It would also help people see if electronic were truly something they would like to pursue without needing to take the time to learn soldering techniques.

    Definitely a cool idea! I wish this had been around years ago when I was teaching classes. You know, a good twist on all of this would be to offer the info to people that some components could be done with simple wire. I think with the mindset of most people today, they would likely buy the 12.00 component anyway, but they would appreciate someone who lets them know all the angles.


    5 years ago on Introduction

    instructables isn't just about creative ways to do things, it is about any way to do things DIY.

    this instructable shows a method for making a smart thermostat instead of buying a Nest, which is good.

    max tells people that it can also be done with off the shelf electronics components, instead of buying the expensive ones listed here, which is also good, and what i like about reading the comments.


    5 years ago on Introduction

    That's awesome. Mechanical control makes every thermostat better.