Introduction: LinkIt ONE Bluetooth PWM LED Control
In this Instructable, I am going to show you how to control an LED strip, using the PWM pin on the LinkIt ONE via Bluetooth. You will need to make the transistor switching circuit, using the TIP120, given in my previous Instructable “LinkIt ONE Bluetooth Solenoid Control”.
This is because the LinkIt ONE’s digital pins only provide 3.3v which is not enough to power a 12v LED strip. This LED strip controller can then be used in many different applications and the LED’s brightness can also be controlled using your phone itself.
Step 1: Materials Required
- LinkIt ONE and usb cable to upload sketches
- An Android phone with version 4.0.3 and above
- TIP120 transistor
- 2.2K resistor
- 1N4001 diode
You can easily find the transistor and the components from Farnell or RS components, or even scavenge them from old electronics. Once you have collected the items listed above, move on to the next step.
Also, as always, your LinkIt must be already set up to successfully upload sketches.
Step 2: Make the Circuit
This simple circuit can be made using a couple of wires on a breadboard. I have attached the Fritzing diagram from my previous Instructable with this for your reference. You will attach your LED Strip in place of the solenoid in the Fritzing diagram, but keep note that the polarity must be correct as an LED will not work if it is plugged in the other way round, unlike a solenoid.
Note: This circuit is absolutely necessary and you cannot plug in the wires of the LED strip directly, as the LinkIt’s pins do not provide that much voltage.
Step 3: Download and Uploading the Code
Now download the attached code and upload it to your LinkIt ONE, selecting the correct COM port in the Arduino IDE. When done successfully, take out your Android phone, because the next step is based on that.
Step 4: Now to the Android Part
- Here, download the attached Android .apk file and save it to your phones memory.
- Navigate to it using the file browser and click on it to install it.
- Make sure that you have enabled installing 3rd party applications in your phones settings, if it does not install.
- When installed successfully, move on to the next step.
Step 5: Working
- Check if all the wires are attached in the circuit.
- Then give the LED strip its power (12v for me) and power up the LinkIt ONE via USB or battery, with its bluetooth/WiFi antenna also attached to it.
- Then take your android phone and open the application installed earlier.
- It will ask you to switch on Bluetooth if it is not already on. Allow it to switch bluetooth on.
- Press the settings button and there, press ”Make Discoverable”
- After doing that, go back and press the bluetooth icon next to settings icon. There, you will be able to see your paired or available devices.
- Find and click “My_BTServer” from the available or paired devices
- Hopefully, it will say “Connected to My_BTServer”. If not, then close the application and try again.
When successfully connected, you can use the slider to control the LED strip’s brightness. It also shows the history, what number you have sent before and ranges from 0 to 1023. And above the slider, you can also see the slider's current position too.
Step 6: Troubleshooting
I have tested this on a few phones and it works. If you have any problem, close the application and then try again, but as every phone is different, we cannot guarantee that the application works. Leave a comment if you have any problem and I will try my best to assist you.
We have a be nice policy.
Please be positive and constructive.