Top Internet of Things Daily & Weekly

Hijack RGB Flood Light With Arduino or ESP8266: 6 Steps (with Pictures)

RGB Flood Light with #ESP8266
🔧 

#IoT #Hack #LED

  • So I found some great little RGB flood lights on amazon and upon looking into the guts of them, I realised that you can hook them straight up to an arduino and esp8266 and control them using PWM.
  • I use openhab running on a raspberry pi to control them and I can even control them with amazon Echo (US), though that is slightly beyond the scope of this instructable I hope to find time to write that up!
  • Hope you enjoy, this is my first instructable for a very long time so please let me know what you think.

So I found some great little RGB flood lights on amazon and upon looking into the guts of them, I realised that you can hook them straight up to an arduino and esp8266 and control them using PWM.I now use two of them in my living room as accent lighting and have them set for certain scenes.I use openhab running on a raspberry pi to control them and I can even control them with amazon Echo (US), though that is slightly beyond the scope of this instructable I hope to find time to write that up!Hope you enjoy, this is my first instructable for a very long time so please let me know what you think.

@ESP8266: RGB Flood Light with #ESP8266
🔧

#IoT #Hack #LED

So I found some great little RGB flood lights on amazon and upon looking into the guts of them, I realised that you can hook them straight up to an arduino and esp8266 and control them using PWM.

I now use two of them in my living room as accent lighting and have them set for certain scenes.

I use openhab running on a raspberry pi to control them and I can even control them with amazon Echo (US), though that is slightly beyond the scope of this instructable I hope to find time to write that up!

Hope you enjoy, this is my first instructable for a very long time so please let me know what you think.

1. 10W RGB Flood Light: Amazon (UK), Ebay (UK), Amazon (US)

2. ESP8266-12 Module: Amazon (UK), Ebay (UK), Amazon (US)

3. LD1117 3.3V Regulator: Ebay (UK), Amazon (US)

4. 100uF Capacitor: Ebay (UK), Amazon (US)

5. 12V 1A DC Power Supply: Amazon (UK), Ebay (UK), Amazon (US)

6. A selection of resistors (I used 10K, but really you can make do with whatever)

This particular flood light is a simple screw together design.

The chassis comprises of three aluminium sections that all unscrew.

Removing the top section that holds the lens in place reveals the PCB with the LED array and control circuitry.

The first thing that I did was to identify which of the transistors controlled which colour array.

Hopefully the manufacturer does not have too many variations between board revisions, which would mean you can copy the image above, and solder wires directly to them. I have colour coded for Red, Green and Blue to make it easier for you. Interestingly though the transistor controlling the red LED was connected to the existing microcontroller via a resistor, so I left this in the circuit.

It is also important for this step to remove the existing control components from the PCB with a hot air gun and some tweezers, as can be seen in the picture above. It wasn’t absolutely necessary to remove the infrared receiver, but I thought I could use it in other projects.

Next just solder on some wires to the PWM pins going to the transistors and poke them through out to the other section of the light chassis, which is where we’ll go to next.

I have attached a schematic for this part as it says what you need to do much more clearly than I ever could.

Basically wire your red, green and blue LEDs to pins 12, 14 and 15 of the ESP8266 via a 10K resistor.

Then wire up the ESP power circuit as per the schematic, in the picture it shows that I have soldered it directly to the power supply/driver board for the LEDs but I did end up changing the orientation and didn’t manage to grab another picture.

The idea here is to keep everything as compact as possible, as it will need to fit inside of the chassis.

To achieve this I spliced the resistors inline with the wires and covered them with heatshrink.

Please avoid my mistake and don’t solder the resistor directly onto the ESP. I found this made them more difficult to work with than if I had done a true inline splice (as in wire-resistor-wire-esp rather than wire-resistor-esp).

Also the photo does look slightly different to the schematic, I didn’t use pin 15 originally and this was a mistake as pin 15 is great at pwm. Love that pin. It rules.

Using your preferred method, write the code for your ESP!

You can really choose to control it however you want, and there are amazing people out there doing amazing things with the ESP.

MY particular route was to use a MQTT home server in the form of openHAB that the light would then log on to and listen for colour commands. Using this method also allows me to use amazon Alexa and google home for control extremely easily. (As I said before, I hope to be able to write instructables for that process as I’ve had a great time doing it but am currently spending most of my free time building a new website (that will probably involve tutorials for those pieces any way)).

I have attached the code for that to this ‘ible, above (or below, wherever it appears).

I must say, I used to only develop in arduino IDE for ESP8266 but since I have started this particular project I am definitely being converted over to Lua scripts, they are great and a much less stressful time when uploading and debugging etc.

Once upon a time, I did write a program in arduino that did the following:

ESP boots, can’t connect to wifi, starts access point mode

client connects with phone, automatically opens browser with colour control page (basic html)

in the page, there was also an option to connect it to your router.

Once it was on the network, any control system could be programmed to send http requests pretty easily.

If I can find that code somewhere I will upload it, but have recently built a new PC so that file could be on any mixture of drives around the place.

If you don’t like the prism effect of the lens, it can be easily removed, this gives a less focused, more general glow. Flipping the lens back to front had some pretty great effects too.

Hijack RGB Flood Light With Arduino or ESP8266: 6 Steps (with Pictures)