DIY Rainbow Color Generator: Bring the Spectrum to Life With LEDs
by DIY GUY Chris in Circuits > Arduino
806 Views, 11 Favorites, 0 Comments
DIY Rainbow Color Generator: Bring the Spectrum to Life With LEDs
Simplicity and Fun, this is what you will get from this project.
Welcome to my instructables project, where I'm thrilled to share my creation for the Instructables Rainbow Color Contest! In this article, I will guide you through the process of building a mesmerizing device that produces the colors of the rainbow in a dazzling display. Using a small printed circuit board, some WS2812 LED pixels, and the power of an Atmega328p microcontroller, we'll bring the magic of the rainbow to your fingertips. So let's dive into the creation of this captivating rainbow color generator!
Supplies
Materials Needed:
- Half-circle shaped Printed Circuit Board (PCB)
- 35 WS2812 LED pixels (5 LEDs for each of the seven rainbow strips)
- Atmega328p microcontroller
- Arduino IDE
- USBASP programmer
- Soldering iron and solder hot airgun
- ThirdHand (optional, for assembling the circuit)
Designing the Circuit
To start, we need a blueprint for our rainbow color generator. Using a PCB design software like Altium, create a half-circle shaped layout that accommodates the 35 WS2812 LED pixels in seven strips, each strip containing five LEDs. Ensure the connections are well-planned, and there's space for the Atmega328p microcontroller.
Assembling the Circuit
Transfer your PCB design onto the actual board using a suitable method, I got the boards well manufactured from JLCPCB . Carefully solder the WS2812 LED pixels onto the board, following the strip arrangement for each color of the rainbow. I used hot plate to solder these LED.
Next, solder the Atmega328p microcontroller onto the board but this time I use hot airgun so I applied low temperature solder past to this side in order to avoid the disconnection of the LEDs soldered.
Don't forget to clean the board with some flux removal solvent.
Programming the Atmega328p Microcontroller
Connect the USBASP programmer to the Atmega328p microcontroller on the circuit board. Then, using the Arduino IDE, write the code to control the LEDs. The FastLED library can be extremely helpful for this task, providing an easy way to control the WS2812 LED pixels.
The code should include commands to display the colors of the rainbow in a loop, creating an enchanting and continuous color flow through the LED strips. Play around with different patterns or effects to make your rainbow color generator unique!
Finishing Touches
I designed a housing for this circuit to seperate the colors of the rainbow and I used 2mm threaded inserts to assemble the board to housing.
I then added a half circle share plexiglass to soften the LEDs light which will produce a smooth color of the rainbow strips.
Test and Enjoy
Power up your rainbow color generator and watch in awe as it springs to life! The vibrant colors of the rainbow should dance across the LED strips, creating a captivating and eye-catching display.
I hope you like it : )