Introduction: Convert $2 LED Lamp to $50 Smart Lamp

A smart bulb is an internet or Bluetooth-capable LED light bulb that allows lighting to be customized, scheduled and controlled remotely. Smart bulbs are among the most immediately successful offerings in the growing category of home automation and Internet of Things (IoT) products. In today's market many types of smart bulbs are available form price $10 to $100. But, can you think you can convert a low price led bulb to a smart bulb easily? Today I will show you how I converted a cheap Chinese led lamp to a Smart Lamp.

Before going to the details let me explain the basic features of my Smart Lamp.

1. The lamp can be controlled from Android phone using Bluetooth.

2. It can be used as true white lamp as well as color lamp and can produce 16 million colors.

3. Brightness and color can be controlled from smart phone.

4. It operates directly from AC mains.

Project Video Here

Step 1: Collect the Materials

Picture of Collect the Materials

1. Low Price LED Light Bulb (

Many types of LED light bulbs are available in local market. Different types of wattage rating are also available. Select one as your requirement. I bought a $1.5, 7W LED Bulb from my local market.

2. Arduino UNO R3 ( (

As we want to include some control mechanism and communication features to our light bulb a microcontroller will be required. I selected Arduino UNO because developing prototype using Arduino is very easy. I just programmed the board, tested it and then removed the microcontroller from the UNO board. Then, I put the microcontroller to the circuit board.

3. HC-05 Bluetooth Module ( (

For communication with the light bulb from my smart phone I want to use Bluetooth and for the reason I selected low price HC-05 module. The module is working as slave mode and my phone as master.

4. RGB-LED 4 pin 5mm (8pcs) (

There is some power limitation as well as space limitation and for that I used only 8 RGB LEDs. RGB leds are very cool. These have four pin. One is the common and other three pin for three basic colors. You may use datasheet for details pin configuration. Using PWM 16million color can be generated from an RGB led.

5. Optocoupler TLP627 (

Optocoupler has an important role in our project. In the lad light bulb all LEDs are connected in series and connected to 100 V DC. Very simple transformer less power supply is used for step down and rectification and I found enough ripple in the output. If we want to on/off and control brightness of the lamp remotely we have to use a switch between rectifier output and LEDs. A high voltage transistor can be used for the job but for driving the transistor we have to connect it to the microcontroller. As transistor are working in high voltage it may damaged the microcontroller if you directly connect the base of the transistor to the microcontroller. So, an isolation is required between transistor and microcontroller and for the reason I selected opto-transistor instead of general transistor. It is a high voltage opto-transistor and can handle 150mA current which is enough for our circuit.

6. Prototype PCB board (

PCB board is for making connection to all RGB LEDs, transistors and microcontroller.

7. Resistor 100ohm (24pcs, 1/4w), 4.7k (3pcs, 1/4w) (

8. Jumper Cables (

9. Old Android Phone Charger (small size)

This is one of the critical component of our project. It will power the microcontroller and all RGB LEDs. Important fact is that power supply should be small enough and the output should be ripple free 5V, 1A. So, select a good SMP supply of 5V, 1A output. I selected the charger of my old HTC phone and I found it good enough for driving the circuit. Selecting wrong power supply may damaged your circuit, so do it at your own risk.


1. Soldering Iron ( (

2. Diagonal wire cutter

3. Knife

4. Multimeter ( (

5. Desoldering pump (

Step 2: Open the Lamp

Picture of Open the Lamp

At first, take the led light blub and remove the globe shaped diffuser cap. Bring out the circuit board from the base. You will find led driver circuit is vary simple. You will get two capacitor at the bottom of the circuit board. One capacitor is voltage dropper (rectangular shape) and another is filter capacitor. On the top you will find four diode working as bridge rectifier and a current limiting resistor. So, VERY SIMPLE!

Step 3: Hack the Circuit Board

Picture of Hack the Circuit Board

Two big sized capacitors ware placed in the bottom side of the led driver circuit. Remove these two capacitor carefully using desoldering pump. We will be required enough place in bottom side and for the reason we are removing these from bottom side. Don't be confused, we will resolder these in upper side.

Step 4: Cut the Trace

Picture of Cut the Trace

All leds are connected in series. These are connected to the output of the bridge rectifier. Using an anti cutter cut the trace between rectifier output and leds. The reason behind it is that, we want to on/off the lamp manually form smart phone and we also want to control the brightness of the lamp. So we will be required a transistor switch between these. We will drive the transistor using Arduino microcontroller. Instead of general purpose transistor we will place an optoisolator/optotransistor between rectifier and leds.

Step 5: Re-solder the Capacitors

Picture of Re-solder the Capacitors

As we removed the capacitors we have to reconnect these but in opposite side. It is the right time to re-soldering the capacitors we removed before. First solder the filter capacitor at it's original place from top side. Be careful, this is electrolytic and polarity must be correct. Now, solder the voltage dropper capacitor at it's place. It is non polarized, so you can solder it either way. At the last stage, we will connect opto-transistor. Connect collector pin of the optoisolator (pin #4 for TLP627) to the output of bridge rectifier and emitter to the leds (pin #3 of 627). Connect two wires to anode and cathode pin (pin # 1 & 2 respectively) of the optocoupler for next step.

Step 6: Cut the PCB

Picture of Cut the PCB

Take a prototype PCB board and cut it in round shape. Cut it in such a way that we can easily place it within the base of the light bulb. Don't make it too small, we will be required enough place at the bottom of it to place Bluetooth module and adapter circuit. Don't make it to big, we have to place microcontroller, RGB LEDs and white LED circuit board above this.

Step 7: Solder the LEDs

Picture of Solder the LEDs

After preparing the perfect sized PCB board, it is high time to make RGB LED circuit. Solder eight RGB leds as shown in pictures. An rgb led has 4 lags, longest one is the common (common anode or common cathode) and another three is for red, green and blue color. Solder a 28 pin IC base to the PCB for Arduino microcontroller. Using IC base is good instead of directly soldering microcontroller or any IC to PCB.

Step 8: Solder the Transistors

Picture of Solder the Transistors

Connect a 100 ohm resistor to red, green and blue pin of each led. Now, connect all same color pin together as shown in schematic using jumper wire. Solder three transistors to the PCB board. Connect three separate color pins to the emitter of each transistor. Base of every transistor is connected to the microcontroller I/O pin through a current limiting resistor. For error free connection follow the schematic. Optocoupler connection is also shown in the schematic.

Step 9: Open the Charger

Picture of Open the Charger

Of-course you should use a good quality charger which has regulated 5 V, 1 A output otherwise it may not work even damaged your microcontroller and Bluetooth module. So, use it at your own risk. A android phone charger is actually a low power switch mode power supply which needs small size transformer and filter capacitor. As it requires very small size transformer, the size of the charger is small enough to place it into lamp base.

To make it prepare for our work open the plastic casing of the charger. Bring it out from the case and cut the wire connection.

Step 10: Hack the Charger

Picture of Hack the Charger

Remove the USB connector from the circuit board. Connect two wires to positive and negative output pin of the charger shown in the picture. Connect two ground together using jumper wire shown in picture.

Step 11: Upload Program to Microcontroller

Picture of Upload Program to Microcontroller

It is the perfect time to upload the arduino sketch to the microcontroller. Because in the next step we will add the microcontroller to the circuit board. Upload following sketch to Arduino UNO board and then remove ATmega328 microcontroller from the UNO board and place it to the RGB circuit board.

After uploading the program you can test it either working or not.

Step 12: Connect Two Circuits Together

Picture of Connect Two Circuits Together

Bend all the RGB LEDs soldered previously as shown in picture. Connect anode pin of the optocoupler to the Arduino pin 6 through a 100 ohm resistor and cathode pin to the ground pin of microcontroller. I used extra wire to do so.

Step 13: Fix Two Circuit Board

Picture of Fix Two Circuit Board

Put white LED circuit board on RGB circuit board as shown in pic and bend RGB LEDs again according to the pictures. Do it in a way that two circuit board fixed tightly with one another. You may use hot glue to make the bond tighter.

Step 14: Connect Bluetooth Module

Picture of Connect Bluetooth Module

Connect four female headed jumper wire to the RGB circuit board according to schematic attached before to connect the Bluetooth module to the Arduino microcontroller. Don't be confused, TX pin of Bluetooth module should be connected to RX pin of Arduino microcontroller and RX pin of the Bluetooth Module must be connected to the TX pin of Arduino microcontroller. Ground pin should be connected together.

Step 15: Enclose the Circuits

Picture of Enclose the Circuits

Connect the charger adapter to the RGB circuit board at bottom side as like Bluetooth module. Put adapter circuit and Bluetooth module to the base of the lamp first and then put two circuit board on top. Fix all the thinks to the base as shown in pictures. Finally, attach diffuser cap to the base. Congratulation! our Smart Lamp is ready to operate.

Step 16: Make Android App (NO PROGRAMMING)

Picture of Make Android App (NO PROGRAMMING)

Making you own Android app is interesting. Don't be upset, we will not use any programming language. We will use very simple MIT App Inventor to make our android app. I attached complete source and .apk file in below. If you want to modify the app just import the .aia file to App Inventor Environment and change as your requirement. I hard coded the MAC address of my Bluetooth module to the app. You must replace it with your own MAC to connect your lamp with the app.

If you are new in App Inventor please take a look here.

OK, we have completed our project. It is the time to enjoy it.


SarthakM18 (author)2017-08-17

I made the circuit as instructed,But the LED bulb blinks continuously. I am using 817 optocoupler

AbsT (author)2017-03-18

Dear Tayfur

I'm mehmet. From istanbul / TURKEY

very thanks for labor.I offer respect.

I am a curious old man.

I am novice.

Horizontal Arrangement application part. This section has no video. I could not.

I tried to snap. It did not.

Help please . If it is possible.


Arturo osuna (author)2017-01-13

help, how can i make this using common anode??

pavelpekki (author)2016-12-29

How much did you pay for parts?

SriramD1 (author)pavelpekki2017-01-09

I calculated along with all the tools around 45$. This is including the tools at the end, without which it would be a mere 25$.

orizzo (author)2016-12-30

Wow, This is an excellent project. You have inspired me to try to create this project using a wifi module instead of Bluetooth. Your documentation and instructions were well done. Thank you for doing this!

voorkomen (author)2016-12-30

Nice workout. One little thing is that your schematic shows common cathode rgb leds while your link to eBay for the leds indicate common anode leds and the technical description is not in line with the heading and the package content which is confusing. Before buying these leds asure that they are common cathode leds, because common anode leds will result in NOT working of the lamp!

Peter_Pan (author)2016-12-29

Thank you so much! In this one project you've taught me so many things. Even if I never build this, I now know (1) how their inner circuits are (2) How easy arduino programming can be, (3) how easily a blue tooth module can be added to a design, and (4) a great shortcut to creating a basic android app.

Hemant Jain (author)2016-11-28

bhai gazab ka project hai...hats off

Anirudh Ralhan (author)2016-10-25

Simple yet awesome.??

I have a question I always wanted to ask you( if you don't mind answering ).... Are you from India??

sorry, the emojis got transformed into question marks :(

I'll write the sentence again..

Simple yet Awesome!!!!

lol nice one,i tought youre gonna use arduino or something

MrCreatorMaker (author)2016-10-03


Polymorph (author)2016-10-02

Great project.

Polymorph (author)2016-10-02

You can buy the AVR chip with the bootloader preprogrammed by itself and use the Arduino board to program it. Or the AVR plus a USB to TTL serial board.

AllenS10 (author)2016-09-25

Any chance of getting this to talk to Amazon Echo/Alexa

taifur (author)AllenS102016-09-25

Can be, then you should use esp8266 or other wifi module.

Polymorph (author)taifur2016-10-02

No need for the AVR from an Arduino, then. You can program the ESP8266 directly.

OnurÖ12 (author)2016-10-02

Hi. Firstly, thank you for sharing this project.
I want to ask you something. Can we use arduino nano or micro instead of removing atmega from Uno?

taifur (author)OnurÖ122016-10-02

Yes, you can if you have enough place to put it in.

kanavkumar (author)2016-10-01


I will start working on it ...and if i found some problem ....please help me to attach it...

thankx budy

gravityisweak (author)2016-10-01

Great job on this. Thanks for sharing your knowledge here.

AbdullahM31 (author)2016-09-28

Gteat job Taifur bhai.
I am soo proud of you as a Bangladeshi.

taifur (author)AbdullahM312016-09-29

Bhai apnake onak dhonnobad.

suraj220296 (author)2016-09-28

Any other optocoupler that i can used in place of tlp627......

ggadget (author)2016-09-27

This is an awesome project though unfortunately the cheapest LED light bulb I've seen is at least $6 ...not $2.

taifur (author)ggadget2016-09-27

In my country Bangladesh it is available at $1.5

JunezRiyaz (author)2016-09-27


taifur (author)JunezRiyaz2016-09-27


suraj220296 (author)2016-09-27

can i use optocoupler 621 in this project............

taifur (author)suraj2202962016-09-27

No, collector-emitter voltage of 621 is only 55 V but you need minimum 100 V for this project.

ddavidadams (author)2016-09-26

You could also use an ATtiny in place of the Arduino. It would reduce the circuit size quite a bit but the code would be a little more involved as the ATtiny does not have TX/RX pins so you would have to use some of the ATtiny Serial offerings.

taifur (author)ddavidadams2016-09-26

Yes, you are right and TX/RX pin is necessary here for Bluetooth communication.

Purphekt (author)2016-09-26

Nice job. The only thing about this project that would detract me from building it is that the novelty of the different color lights would soon wear on me loose my interest. But, I assume there would be situations where it could help set the mood of the moment. If you know what I mean.

bpwmd (author)2016-09-26

Im sorry if this is a bit derailing but is there an instructable to show how you designed this circuit without the arduino (whole board) as part of the project.

ive been trying to figure this out for some time, about how to do this in a way that I don't have to rebuy an arduino with every project. but to simply wire a chip in as you have done and program it.

jsnarey (author)2016-09-26

Nice job! Seems like a lot of work and the cost is a little high, for those who do not want to take the time to build this themselves can buy one from here for under $10.

DeathRaito (author)2016-09-25

In my residence the voltage is 220 v dc, can I use this TLP627?

taifur (author)DeathRaito2016-09-25

Yes, you can use TLP627 for 220V as the typical collector-emitter voltage for TLP627 is 300 V DC but one thing should be clear that, the lamp is only for AC voltage.

DeathRaito (author)taifur2016-09-26

Thanks for answering. The instructions you posted are great.

taifur (author)DeathRaito2016-09-25

You can use TLP627 upto 300 V but the lamp is designed only for AC voltage. It will not work from DC input.

suraj220296 (author)2016-09-26


is arduino is necessary or only using microcontroller we implement the circuit

taifur (author)suraj2202962016-09-26

Only microcontroller is necessary for the project and I only used Arduino for uploading the sketch to microcontroller.

AngeloM38 (author)2016-09-26

Even if parts are difficult to find worldwide I find this project extremely valuable for its own level of explanation and teaching.
This is the main target of instructables. Get everyone the possibility of learning, not only enjoy building something.
Great work!

EvangelistaA1 (author)2016-09-25

Great project: voted both ;)

taifur (author)EvangelistaA12016-09-25


cybertype2000 (author)2016-09-25

the way I understand this, the brightness of the lamp will be much more when glowing in pure white compared to any other colour? Also, How do you control the brightness of the other colours?

taifur (author)cybertype20002016-09-25

Brightness of other color is not adjustable. Color can be changed by PWM.

Jim Coyle (author)cybertype20002016-09-25

I believe you are right since you have many more power white leds than color ones. the way you adjust brightness of colors is one the sliders on your phone i believe. see app shown in instructable.

shripadlale (author)2016-09-25

Awesome! The idea, the execution, and the instruction - all fantastic!

taifur (author)shripadlale2016-09-25

Thank you very much.

About This Instructable




Bio: I like to learn, like to make, like to share.
More by taifur:Raspberry Pi Presentation Machine With Remote ControlWireless Powered Multi Color LED LampSmart Plug
Add instructable to: