My project was to Connect a multicolor LED strip to smartphone to make a touch-controlled light show! You can be very creative with such a project.At first I wanted to light up a big igloo we made out of wood for my sculpture but I realized it was going to cost me too much money so I decided buy a lamp. You can attache the LED to pretty much anything bike, under a table or anything else you think needs a bit more color. Your imagination is your only limitation
I found out there are many ways to connect smartphone to an embedded microcontroller. In this project I will use an Android phone in USB host mode. This way, the Android phone both powers and communicates with the Arduino! Even though the Arduino is connected via USB, the communication happens via serial, just like when an Arduino is connected to the computer.
For this project I will need:
- RGB LED strips usually have 4 wires: one for power, and one each for red, green, and blue control. Arduino Uno microcontroller board
- Jumper wires
- Android phone (list of supported device)Note not every phone can used as a host check the link below I had a hard time trying to find a phone. People don’t want to let me used their phone they cannot stay away from it for too long.https://code.google.com/p/usb-serial-for-android/wiki/CompatibleAndroidDevices
- AC adapter, 12v 1A I brought mine at Radio Shack
- A breadboard
- A usb cable, on-the-go “ OTG” micro-B male to standard-A female. I got mine from B&H
- 3 Transistors
- 3 Resistors 1kDownload the app and installer at trevorshp.com/creations/ArduinoColor.apk
- First I had to set up the circuit you can view the set up of the schematic down below. Then I had to solder the jumper wires to the LED strip which was one.
- An Arduino’s output pins can only provide around 40mA to each LED, so to help it out with a driver circuit to boost the power. This circuit takes 3 PWM signals from the Arduino and uses them to drive 3 transistors supplying power to the red, green, and blue LEDs — giving full control over the brightness of each color, then it can be mix them to create any color in the spectrum.
To control the light from the phone we will need to use the USB On-The-Go (OTG) devices, which means they can act as the USB host (providing power) or slave. or I could also control go wireless and add a Bluetooth or Wi-Fi module to the Arduino and get rid of the all the messy cable but I didn’t have enough money to buy the wi fi module.
This is the usb OTG
The power supply
This code was proved by Trevor Shannon he wrote a small Arduino sketch to receive the color data and control the RGB LEDs.