loading

Being the giant fan of LED's that I am i'm always trying to come up with new ways I can put them throughout my house. Today i'm going to show you how to create a simple, yet extremely eye catching, RGB Bluetooth controlled Shelf lighting system. The beauty of integrating Bluetooth into the system is that you can control your lights using almost any device, your computer, smart phone, even your tablet.

Step 1: Materials

You can find most of these from just about anywhere, you don't necessarily have use the links above, they are just a suggestion. You also don't need the DB9 Connector I use it for an easy disconnect from the LED's.

Step 2: The Circuit

Connect the HC-06 to the 5v power source on the Arduino and the WS2801's to the 12v power source. Be sure that the Tx on the HC-06 goes to the Rx pin on the Arduino and the Rx pin on the HC-06 to the Tx pin on the Arduino. You can connect as many LED's in a row as you would like, in this particular scenario I'm using 11.

Step 3: Connecting Bluetooth

The default password for these Bluetooth transceivers is "1234" without quotes. Below are all of the defaults:

-- Default COM setting: 9600, N, 8,1

-- Default Password/pairing code: 1234.

-- Supports the AT command to modify the baud rate, device name, passkey, master/slave, etc.

-- Supports baud rates 2400 -1382400.

-- Based on the CSR Bluetooth chip BC417143

-- Bluetooth specification v2.0 + EDR

-- Power supply: +3.3VDC 50mA

-- Frequency: 2.4GHz ISM band

-- Modulation: GFSK(Gaussian Frequency Shift Keying)

-- Emission power: ≤4dBm, Class 2

-- Sensitivity: ≤-84dBm at 0.1% BER

-- Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps

-- Security: Authentication and encryption

-- Size: 26.9mm x 13mm x 2.2 mm.

-- Working temperature: -20 ~ +75 Centigrade

-- Dimension: 26.9mm x 13mm x 2.2 mm

If you wish to change any of the defaults there is a great tutorial on Instructables that I used, the tutorial is for the HC-05 but it works for the HC-06 as well.


Modify The HC-05 Bluetooth Module Defaults Using AT Commands

Step 4: Arduino Software

Below I've included a link to an example of the code i'm using on the Arduino. This code simply accepts 1 - 6 in order to change the different patterns, as you can see the addition of the Bluetooth Transceiver doesn't require any extra code on the Arduino side. There is also a link to the WS2801 Library, be sure you have this library before you try to compile or it will fail.

Before you Compile your code be sure to change this line:

Adafruit_WS2801 strip = Adafruit_WS2801(11, dataPin, clockPin, WS2801_GRB);

Where the "11" is change this to the number of LED's you have in your system.

Step 5: Android Software

The software attache below simply opens the Bluetooth connection and sends either 1-6 depending on what button is clicked, for debug i included the top enter text bar where you can send any information you wish. Before you try and use this app be sure that you connect to your Bluetooth device with your phone using the "1234" password. One thing, before you compile the code be sure to change:

"HC-06" to whatever the name of your Bluetooth device is, you can find it in the section below.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Set pairedDevices = mBluetoothAdapter.getBondedDevices();
if(pairedDevices.size() > 0) {

for(BluetoothDevice device : pairedDevices) {

if(device.getName().equals("HC-06")) { <~~~~ Change This Line

mmDevice = device;

break;

}

}

}

myLabel.setText("Bluetooth Device Found");

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you would like a more detailed explanation of line by line what this code does I used this great tutorial:

ANDROID AND ARDUINO BLUETOOTH COMMUNICATION

Step 6: Finished!

Compile all your code, open the connection, and begin to send Data to the LED's and they should spring to life!

Here are a few videos of what mine looks like in action! Hope you enjoy!

<p>hi! this is amazing! can you send me more info about the circuit? i have no idea how to make it! </p><p>thank you!</p>
<p>Where's the Pirvate Stock Bottle ?</p>
<p>Dude! I was just writing an instructable for something similar to this! You beat me to it! <br><br><a href="https://github.com/sdenom01/Anduino" rel="nofollow">https://github.com/sdenom01/Anduino</a><br><br>Here I have something I created, It uses Lars Werkman's<br><a href="https://github.com/LarsWerkman/HoloColorPicker" rel="nofollow">https://github.com/LarsWerkman/HoloColorPicker<br><br></a><br>Currently all it can do is send RGB values over bluetooth to HC-06 Module. <br><br>I'll be looking through your code now to see how I can improve mine. </p>
I really like the idea with the LED's behind the bottles. It looks great!

About This Instructable

22,134views

384favorites

License:

Bio: Designer / Electrical Engineer
More by FamousMods:3W 4'x4' Arduino Laser Cutter/Engraver DJ Christmas Tree Pixel Drop Ceiling 
Add instructable to: