RGB Sword - ESP8266 RGB LED strip only

Introduction

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.

Parts and Tools

You are going to need the following parts:

  • Arduino with ESP8266
    • Alternatively NodeMCU or similar products
  • LED strip
  • 3 x MOSFET
    • I recommend the IRLZ44N
  • 3 x 10k ohm resistor
  • 12V Power supply
    • The current capacity will determine the length of LED strip
  • LM7805
  • Perf board
  • Female pin headers
  • 5.5mm female barrel jack
  • 5.5mm male barrel jack
    • These are used for the power supply and are optional

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

Circuit

jpg

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!

Avatar
Eirik Sverd
Engineer | Artist | Business Economist | Co-Founder

Related