Introduction: Bluetooth Controllable RGB Temperature Light (TfCD)

Picture of Bluetooth Controllable RGB Temperature Light (TfCD)

Smart homes are becoming more and more popular in our society. We want more information and efficiency on our home systems. There are a lot of products out right now that tend to solve that. This Arduino LED regulator tells you what the temperature is in your home and communicates this with a suiting color. Apart from this it also serves as a product with which you can adjust the color of your lighting to whatever you desire through your phone. By this you save money on expensive systems and get the same versatility.

Functions

  • NeoPixel that changes color according to the room temperature while in "Temperature-mode"
  • Or change NeoPixel color using your smartphone through Bluetooth while in "Manual-mode"
  • Change NeoPixel brightness by rotating a knob
  • Toggle NeoPixel on and off (Note: the NeoPixel is off by default)

Needed components

  • Arduino
  • Breadboard
  • TMP36 Temperature sensor (Thermistor)
  • HC-05 Bluetooth module
  • NeoPixel Jewel 7x5050
  • Keyes KY-040
  • Jumper cables
  • Soldering equipment (for NeoPixel wiring)
  • 3 Resistors of same value or 2resistors with one double the value of the other. (This tutorial uses 3x 1kOhm resistors)
  • 1 10kOhm resistor

NeoPixel Jewel

The neopixels are a LED line created by Adafruit. There are multiple different configurations, like miniature LEDs, LED strips, LED rings and many more. The Neopixel Jewel consists of 7 tiny 5050 smart RGB LEDs on a ring. The current in the Jewel is constantly ~18A. This makes that the color are very consistent even when the voltage varies. The Jewel works on the 5V provided by the Arduino.

Keyes KY-040

This component is a rotary encoder. With this component we can adjust the brightness and turn the LED on and off. (Note: while the LED is turned off current still flows through the system) Some Keyes rotary encoders come without built-in 10kOhm resistors. If your rotary encoder comes without these resistors, add them manually.

TMP36 Temperature sensor

This component serves as our temperature sensor. It works from -40°C (0.1V) to +150°C (2.0V). The current runs below 50 μA, so the sensor won’t heat up much at all.

HC-05 Bluetooth

This module is a serial port replacer for wired connections. It serves as a bluetooth connection between the Arduino and a PC or android phone (apple products not supported).

Made by Joost Kuitert and Mark van Hasselt

Delft University of Technology, Faculty of Industrial Design Engineering

Step 1: Soldering the NeoPixel

Picture of Soldering the NeoPixel

The first step is soldering wires to the NeoPixel Jewel. When this is done you can continue to step 2.

All circuit building steps are shown individually, but should be combined on the same breadboard.

Step 2: Building the Bluetooth Circuit

Picture of Building the Bluetooth Circuit

Connect the HC-05 Bluetooth module according to the circuit above:

VCC -- 5V

GND -- Common ground

TXD -- Pin 11

RXD -- Pin 12 (through voltage divider)

The resistors shown in this circuit are 1kOhm each, but others will work as long as they have the same value.

Step 3: Building the NeoPixel Jewel Circuit

Picture of Building the NeoPixel Jewel Circuit

Connect the NeoPixel Jewel according to the circuit above:

GND -- common ground

Data in -- Pin 6

5V DC Power -- 5V

Step 4: Building the Temperature Sensor Circuit

Picture of Building the Temperature Sensor Circuit

Connect the TMP36 Temperature sensor according to the circuit above:

If looking straight at the flat side:

From right to left

VCC -- 5V

Data -- A0

GND -- Seperate ground (! If connected to the common ground there will be a lot of distortion)

Step 5: Building the Rotary Encoder Circuit

Picture of Building the Rotary Encoder Circuit

Connect the Keyes KY-040 rotary encoder according to the circuit above:

CLK -- Pin2

DT -- Pin4

SW -- Pin3 (Through external 10kOhm pull-up resistor)

+ -- 5V

GND -- Common ground

Rotating the knob will change the brightness of the NeoPixel.

Pressing the knob will toggle the NeoPixel on and off.

Step 6: CODE

Picture of CODE

Adding the NeoPixel library.

To make the code work you will need the Adafruit Neopixel library. To get thi in your arduino coding software you need to execute a few steps.
Go to Sketch>Include Library> Manage Libraries.

Then in the search bar you type: “Neopixel”.

Select the second library from the list and install.

Now you have the library up and running you can paste the code from the link below.
Feel free to change the code to whatever it is you would like.

If the Arduino IDE does not use the SoftwareSerial.h library and the Wire.h library, add these manually or import them likewise.

Step 7: Connecting Your Phone

Picture of Connecting Your Phone

To connect your android phone to the project you will need to install the following app from the Google play store.

To connect the Arduino to your phone you need to go to settings>Bluetooth>Link device There you will find HC-05. The pairing code will be 1234.

When you have a bluetooth connection you can now open the Color LED Controller app. Click BT List and click the HC-05.

Now you can adjust the light color real-time through your phone, or change the LED mode from manual to temperature mode.

In manual mode you can select a color from the color wheel. (If the "LED Turn off" button is visible)

In temperature mode the system will measure ambient temperature and display a gradient from blue (cold) to red (warm) depending on the temperature.

Do note that the NeoPixel is off by default

Enjoy your own build first step towards a smart home!

Comments

Swansong (author)2016-12-22

Thanks for sharing :)

markmuilwijk (author)Swansong2016-12-24

Delft b'vo !?

Droxz (author)2016-12-22

Nice instructable, keep up the good work

About This Instructable

2,816views

81favorites

License:

More by markvanhasselt:Bluetooth controllable RGB temperature light (TfCD)
Add instructable to: