søndag 24. september 2017

RGB Sword - ESP8266 RGB LED strip only


This is information regarding a smart lamp with RGB channels only. You may consider this the first version of the smart lamp, and the five channel lamp the latest version. The main difference between the two is the five channels on the latest version: Red, Green, Blue, Cold white, Warm white.

Here you can see the results after I installed the RGB LED strip in my brothers room.

Parts and Tools

You are going to need the following parts

To put everything together you will need these tools
  • Soldering iron
  • Solder
  • Wire cutters
  • Wire strippers
  • USB cable that goes between your computer and micro controller


Simply follow the schematic to recreate your circuit on a perf board. I recommend using the barrel jack on the power connections from the power supply. It's also a good idea to solder female header pins to the perf board so the NodeMCU can easily be added or removed from the soldered perf board.

To determine your maximum length of LED strip we need to do a bit of math. The LED strips draw 60mA of current per 10cm of length. The strip is divided into segments of 10cm so this means it draws 60mA per segment. The NodeMCU along with the linear voltage regulator draws about 100mA. My PSU could supply 2A at 12V.
Thus I can power a max number of: (2000 [mA] - 100 [mA]) / 60 [mA per segment] = 31.67 segments
Which equals 31 segments * 10cm = 310cm. Thats a long light strip!

Arduino Code

Follow the regular arduino configuration in the main information page. The only difference here is you need to change 
const int ARRAY_LED_COUNT = 5;
to 3 instead of five. Along with removing 5, and 4 from the line
const int ledPin[ARRAY_LED_COUNT] = {14, 12, 13, 5, 4};
That's it! You've now configured the arduino code to work with three instead of five channels!

Ingen kommentarer:

Legg inn en kommentar