LittleBits DIY Smart Thermostat

Powered by Instructables.
<

Step 1: littleBits DIY Smart Thermostat

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.

Control:

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.

Automate:

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.

On/Off­:

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 2: Set up your cloudBit

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


Step 3: ​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 4: ​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 5: 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 6: 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 7: 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 8: 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 9: 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 10: Attach thermostat to the wall

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


License: Attribution-NonCommercial-ShareAlike.

Tools and Space
Age Level
Category
Time Per Project
1div id="in-node-search">

Search

C