In this project, we’ll demonstrate how to make a colorful, king-sized coconut tree (5 feet) decorative showpiece using a digital RGB LED strip.
The RGB LED strip is cut and arranged to form the shape of a coconut tree. The ATMega328 microcontroller is used to control the LED strip, generating several flashing, fading, and blinking LED effects. Much like a light show, more than 15 different multicolour effects will run continuously.
The structure
To build the tree structure, we’ll use 1-inch diameter PVC pipes, as well as L- and T-joints. These joints are used for the tree’s base stand. The leaves are made of medium-thick 1mm2 copper wire.
We’ll also use a circuit box and a [email protected] adapter. Additionally, to assemble everything, a hot glue gun and transparent tape is required.
The steps
1. To prepare the tree’s base stand, which has four legs, use four L-joints and three T-joints. Two L-joints and one T-joint make one side of the stand (then repeat). There are two sides (about 30-35cm tall) as shown in the above images.
2. The rubber stands must be fixed to all four legs to ensure a stable grip.
3. Join both sides of the stand using one of the T-joints at the center.
4. Add the main pipe (150 cm) to the center T-joint.
5. Using a hot glue gun, carefully affix four of the 1mm2 copper wire pieces (about 30-35cm long) to the top of the main pipe. Once secure, bend the wire to create a coconut leaf-like shape for the tree.
6. Using transparent tape, stick the RGB LED strip to the main pipe and the copper wire pieces.
7. Attach a small circuit housing box to the tree’s base stand, and connect the LED to the circuit using the 3-pin connector (provided on the box).
8. Carefully connect a [email protected] adapter to the circuit box. It powers both the circuit and LED strip.
After creating the tree-like structure, we’ll need to build the circuit.
Circuit diagram
The circuit only requires a few components. It uses the ATMega328 microcontroller, LM7805 voltage regulator chip, a 16 MHz crystal, a 10K resistor, two 22pf capacitors, and a micro push button.
- Connect the 16 MHz crystal to the ATMega328’s external crystal input pins 8 and 9.
- Connect the two 22pf capacitors with both of these pins to provide stability to the crystal oscillator.
- Connect the push button between ATMega328’s reset input pin 1 and the ground, with the 10K pull-up resistor.
- Note: the LM7805 receives 12V of input from the adapter. Its 5V output must be connected to ATMega328’s VCC pin (7) and AVcc pin (20).
- The digital RGB LED strip has three interfacing pins: VCC, DIN, and GND. The strip operates at 12V, so the VCC pin receives 12V from the adapter. Ensure that the GND pin is connected to the circuit’s ground. The DIN pin (data input) must be connected with ATMega328’s pin 4. It receives the data signal input from this pin.
Circuit operation
The circuit operation is simple. The ATMega328 microcontroller generates different, multi-color lighting effects on the LED strip. This includes blinking, fading, and chasing effects from the bottom to top, and the top to bottom of the LED strip.
The microcontroller provides data input from pin 4 to the LED strip for generating the different colors and effects, such as dual-color flashing, multi-color flashing, dual and multi-color fading, multi-color chasing from the bottom to the top, and vice versa, and so on.
There are about 15 multi-color LED effects that run continuously, one after another.
The circuit operation works, thanks to the software program. It’s downloaded to ATMega328’s internal FLASH memory. The program handles the full circuit operation.
The software
The software program is written in C/C++ language, and edited and compiled using Arduino IDE software. It’s downloaded to ATMega328’s internal FLASH memory using Arduino UNO board and Arduino IDE.
This program uses the flashLED.h library to control the RGB LED strip. This library is specifically for the WS2811-type RGB LED strips. By using this library, it’s possible to generate different colors from the LED strip and control different lighting effects.
YouTube video link:
https://youtu.be/JdASkX8co-o
You may also like:
Filed Under: AVR, Electronic Projects, LED Lighting, Microcontroller Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.