Week 10 - Output Devices

For this week, our task was to add an output device to a microcontroller board we’ve designed, and program it to do something. I decided to use this assignment to work on programming Neopixels WS2812B LEDs, which I plan to use in my “Crystal Ball” display for my final project.

I was inspired by this DIY tutorial of a thundercloud lamp for a reference of how I can diffuse the LED lights in a simple way. My plan was to reproduce this effect using WS2812B individually addressable LEDs, a transparent Christmas ornament, butter paper and cotton balls. I purchase the LEDs from Amazon and cut them in separate strips, so that I could cover a bigger area with my lights. This LED strip comes with nice metal patches (GND, data and 5V) on each end that can be soldered, so you can cut the strips as you like. After soldering some of them (I underestimated how long it would take to solder all pieces!), I decided to use an external 5V supply to power my lights. My supply had a power barrel end and I used a connector + soldered wires to insert the power into my board.

I am using the board from Week 6/Electronic Production with the Xiao ESP32S3, and my board has several female connectors for GND and I/O Pins. I connect the GND from the LEDs strip and from the power supply to the board GND female connector, the 5V from power to the LEDs strip and the data line to pin 8 of my board. I am able to light up my LEDs with purple and yellow lights.

I then started assembling my LED strip on my transparent ornament, using hot glue to stick the LEDs and also to isolate my soldering tips. After adding the cotton balls, I was able to diffuse the very bright lights, but thought that there weren’t enough LEDs to populate the whole sphere.

When I was trying to readjust the lights, everything started to go ~wrong~. I accidentally stipped the solder tips from the 2nd LED segment, leaving me with only 7 working lights. In addition, my ESP32S3 proved to be very finicky and it stopped being recognized in the Arduino IDE after a while. Resetting the microcontroller would *sometimes* worl, but I pressed the reset button so much that it also broke.

I decided to use my Xiao RP2040 and breadboard from Week 3 to give another try at programming the LED strip. I luckily also bought an extra stip from amazon that came with 144 continuous LED (no soldering needed), so I just glued that to the ornament and used my RP2040 to program the lights. The result was much more satisfactory, but still not perfect. I played a little bit with the light programming in two modes (rainbow/clear sky), and hope that I can implement lightings that reflect the “mood” of a person for my crystal ball. Overall this was a great exploratory experience using WS2812B LEDs and I definitely plan to use them in my Final Project!

Files for this week can be found here