Summary
In the context of this project, addressable LED strips are used to create lamps with different purposes and features. What they share is that the lamps can be controlled through wifi.
- A countdown: This project consists of a visual countdown - a tower lamp that counts down from any given time to zero. The currently implemented idea is inspired from the lightning talks at the Chaos Computer Congress. The lamp is first all green, and as it counts down, it turns off LED after LED. Once it's all turned off, it turns all yellow and again turns off LED by LED. It then turns all red and again turns off LED by LED. But of course, the code can easily be adjusted to implement a different visual way of counting down time. The physical form of the lamp can also be conceived of differently; it does not need to be a tower.
- Decorative project: This project consists of a lamp that can take different colours, patterns and blink in different patterns, which can be easily selected through an online tool. The strips can be placed inside a lamp like container, stuck to a wall, a bicycle, you name it.
Components
Hardware
Common to all projects
- Addressable RGB LED strips. Note that their chipset should be compatible with the Neopixel library. This is the case of the ws2811/ws2812/ws2812B chipsets (cf. https://github.com/FastLED/FastLED/wiki/Chipset-reference).
- ESP8266.
- Something to connect it to power. You can power the lamps with batteries or by connecting them to the grid. I connect my projects to the grid with cheap laptop chargers.
- Micro USB male connectors. You need these to connect the ESP module to the rest of the project. Note that the ones linked here are disassembled and need to be assembled first. Maybe you can find better quality elsewhere.
- Some cables. I found mine in the trash.
Variable depending on project
Unless you directly want to stick the LED strips to a wall / bicycle / flower pot, you need to build the actual lamp. Use packaging material, paper, tissue, PLA rests or anything else mildly transparent to diffuse the light. If the material has roughly the consistency of paper or tissue, use it to wrap your lamp project in it. If the material is rigid (ie PLA rests), use it as the actual lamp, and place the LED strips directly inside it. To build the actual lamp, use anything. LED strips don't get very hot so basically all the materials can be used.
Tools
- Soldering iron. You need this to connect the LED strips, ESP module and the power supply.
- Anything to build the lamp, in case you want to (rather than sticking the LED strips directly onto the object of your choice). Woodworking tools, hot glue gun, knitting equipment - it depends on the materials you are working with.
Software
- To programme the ESP module, use Arduino INE. You can find the source codes for the lamps at the Microverse here.
- To interact with the lamps, use Adafruit IO, of which a lot of functionalities are available for free.
How to build an addressable LED strip lamp project
1. Set up the hardware as illustrated in the following picture.
2. Set up your Adafruit IO dashboard. Depending on your project, you will need different components. For instance, for a countdown, you might want to use a slider to set the time, and a button to start the countdown. For a decorative project, you might want a colour pick circle and different buttons for different patterns / blinking modes / whatever else fancy you desire to programme. You can find the dashboards for the Microverse countdown here and for the decorative lamp here.
Adafruit offers many tutorials for Adafruit IO. For instance, start out here to learn more about dashboards.
3. Programme the ESP. The code for the lamps in the Microverse is available here. Use Arduino INE for this.
Prior to uploading the code, you must set up Arduino IDE accordingly. Go to File → Preferences and in 'Additional boards Manager URLs' enter the following URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json
Then go on Tools → Boards → Board Manager (all the way on the top). In the window that opens, scroll to the bottom where you see an entry ESP8266. Click 'install'.
Now, when you go to Tools → Boards, in the list, you should have the ESP available. Select it.
Be sure that the selected port is the USB port to which you connected the ESP module by means of a USB-micro USB cable. And for the upload speed, select 115200.
4. Now connect the ESP to the male micro USB that is integrated in your project, and connect your project to power. Theoretically, it should now work. Test it by selecting different modes in your corresponding Adafruit IO dashboard.