Budget-Friendly Gradient Strip Lights
by oklopfer in Circuits > LEDs
1368 Views, 12 Favorites, 0 Comments
Budget-Friendly Gradient Strip Lights
There are plenty of cheap RGB strip lights one can find online, but these lights are rather low functioning - usually, the entire strip can only emit a single color and brightness at a time. The more advanced strips, called addressable RGB lights, tend to be more expensive; and even then, they are fairly limited in their features, as the manufacturers tend to restrict users to their proprietary software. In this project, we have both 1) a budget-friendly setup for addressable gradient lights, and 2) complete customization access to the lights with open-source software.
Supplies
WS2812B Strip Lights - there are many options out there, allowing for lots of variety, but make sure you know the differences:
- Strip Length: the standard for the length is 1m/5m/10m/20m (3.2ft/16.4ft/32.8ft/65.6ft).
- Pixel Count: the number of LEDs per meter varies greatly, from 30px/m all the way up to 144px/m.
- PCB Style: the PCB is the underlying strip that the lights are mounted on top of, which have two colors (black and white) as well as different waterproofing ratings (IP30/IP65/IP67) for both indoor and outdoor use.
- Regular vs ECO: the ECO version of the lights are dimmer and do not have capacitors, but may be significantly cheaper.
For my project, I use Regular/5m/Black/150px/IP30 strips, which are about $23 / roll.
Grocery List:
- WS2812B Strip Lights ($15-$30 / roll)
- NodeMCU ESP2866 ($16 / 3 Boards)
- Dupont Wires ($6 / 120 Wires)
- Breadboard 400 Point ($10 / 4 Boards)
- Micro USB 5V Power Supply ($7 / Supply)
Download and Install Necessary Drivers
ESP8266 boards can connect with a data-transferring micro-USB cable to your computer to flash information on to the device, but first you have to install the drivers to allow your computer to communicate with the device. The link can be found here, where you can select and install the appropriate software for your computer's operating system:
https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
Connect ESP8266 to Computer + Install WLED
1. Once the drivers have successfully been installed, connect the device to your computer and go to install.wled.me on either Chrome or Firefox (Safari and Edge will not work!).
2. Click the install button, and when the popup appears, select the USB to UART Bridge Virtual COM Port (paired) option.
3. Follow the prompts to install WLED.
4. Once complete, you will be given the option to connect to WiFi.
a) If you are on a private network (home, small workplace, etc), just enter the credentials that WLED provides. You will then be given a popup to visit the device - select this to enter the WLED UI. Make note of the IP address that opened in your browser, this is the IP of your ESP8266 board.
b) If you are on a public network (school, large workplace, service provider, etc), do not connect to WiFi! You will lose your device to the network. Instead, skip this step, and on your computer, connect to the access point the device is emitting; the network will be called WLED-AP and the default password is wled1234. You will then get a popup which will show the WLED UI (if the popup does not show up, go to 4.3.2.1 on your browser).
Some info about what is going on: the ESP8266 boards are pretty barebones WiFi chips. They can send and receive functions over WiFi by communicating via IP address ports, which look something like 127.0.0.1 or 192.168.1.54. On private networks, devices can usually communicate easily with each other. On public networks, however, devices are often isolated and peer-to-peer communication is blocked by the router. This means that you will lose the ability to communicate with your device if connecting it to a public network!
5. Test to make sure your device works: press the power button on the WLED UI and make sure it is toggling the blue LED built in to your board.
Module Building + Circuit Wiring
Now it's time to connect the board to the lights. The wiring for this is extremely simple, but if done improperly will fry the board. WS2812B lights have three connector pins:
+5V (red cable): this is the power line with a 5 volt current. ESP8266 boards also use 5 volt currents via the micro-USB port, so the lights can be connected directly to the board.
DO/Din (green cable): this stands for Data Out/Data In; evidently, this is the data line. The lights communicate in one direction, so the aligning arrow on the lights must be pointed opposite from where you are connecting the pins.
GND (white cable): this is the ground cable to prevent circuit breakdown. If this is not connected properly, the entire system risks catching fire.
To wire the circuit:
1. Insert your ESP8266 board into a breadboard; keep the micro-USB port unplugged until the circuit is completely built.
2. Select 3 male-to-male Dupont wires (colors do not matter but may be helpful for organization).
3. Attach them to the following corresponding spots on the board and connections on the lights:
a) VIN to +5V (this is the power connection)
b) D4 to DO/Din (this is the data connection)
c) GND to GND (this is the ground connection)
4. Plug the micro-USB port in to provide power to the system; if done successfully, the first section of your lights will illuminate - now we can move on to configuration.
WLED Configuration
The final step to getting your lights fully up and running is the firmware configuration.
1. First, head to the config tab on the WLED UI, and select LED Preferences.
2. Scroll down to the LED outputs option, and change the Length value to the pixel count of your strip (e.g. 30 -> 150).
3. Select save and head back to the main config menu. If you are only setting up one strip of lights, then you are all set! Now you can go wild on messing with your new gadget. If you are setting up multiple strips of lights and want them to connect to each other, keep following.
4a. If you are on a private network:
a1. Go back to the WLED UI homepage.
a2. Go to the Nodes tab (if it does not appear, go to Info -> Instance List).
a3. Make sure you can see all of your devices, then close list.
a4. Select the Sync button. All detectable instances will be controlled by the current instance tab. Go wild!
4b. If you are on a public network, you will need to choose one of your boards to be the primary access point:
b1. Connect to your primary board's access point (WLED-AP) and select WiFi Setup. If you have multiple boards plugged in and running access points, your device will connect to whichever host it is closest to.
b2. Scroll down to access point configuration and give the AP a unique name and password.
b3. Select save, then disconnect from the access point.
b4. Connect to your secondary board's access point and open WiFi setup.
b5. In the WiFi credential options, enter the name and password of the primary board's AP. Repeat for all secondary boards.
b6. Disconnect from your secondary board and connect to the renamed primary access point.
b7. On the WLED UI homepage, go to the Nodes tab (if it does not appear, go to Info -> Instance List).
b8. Make sure you can see all of your devices, then close list.
b9. Select the Sync button. All detectable instances will be controlled by the current instance tab. Go wild!