In this mini DIY project, we will make a colorful and shiny coconut tree.

Figure 1: The image shows the coconut tree's RGB LED flashing light
It has two 3W RGB LEDs, which generate multicolored flash effects. Additionally, a tiny 8-pin ATtiny85 microcontroller generates eye-catching colorful LED chasing effects. It works on batteries and the battery is rechargeable, so it does not require power connection through wires. Can be placed anywhere and taken anywhere (fully mobile and portable). It is also easy to build and fun, including circuit making, wiring, soldering, crafts, cutting, watercolor painting, model making, etc.
First, we will start with the circuit diagram, followed by the circuit connections and functioning/operations, and finally we will see how to prepare the complete model and prospects for a display part.
Schematic diagram

Fig. 2: Complete circuit diagrams of the project with ATtiny85
The complete circuit uses just four to five components, a module and a battery cell. There are two 3W RGB LEDs, two 330E current limiting resistors, an ATtiny85 microcontroller, an SPDT ON-OFF switch, and a TP4056 LI-Ion battery charging module.
Circuit Connections
The RGB LED has 3 LEDs – red, green and blue. The anode terminals of all 3 LEDs are shorted and connected to the +Ve output through a current limiting resistor. The cathode terminals are connected to pins 5, 6 and 7 of the ATtiny85 as shown. Cross connections for R, G and B LEDs are made between 2 LEDs to generate two different colors at the same time from both RGB LEDs.
The circuit receives power through a 3.7V 2000mAh lithium-ion battery cell. The TP4056 module is used to charge the cell via any USB charger. The cell is connected between terminals B+ and B-. Its out+ and out- terminals are connected to the +ve supply and ground of the circuit through the switch.
An SPDT type ON-OFF switch is connected between out+ and the circuit power to turn on/off the circuit power.
Functioning and operation of the circuit
The ATtiny85 microcontroller turns on and off the red, green and blue LEDs one by one in a different sequence and generates different colors like yellow, orange, magenta, cyan, etc.
As the table shows, when any pin receives logic 0, it turns on any LED (red, green or blue) on both RGB LEDs and generates two different colors. When two pins are low – two LEDs are turned on and this will generate combined colors (yellow, magenta, cyan). RGB LEDs generate two colors simultaneously due to cross-connections at R, G and B inputs.
All three red, green and blue LEDs are randomly turned on and off at different rates (at different delays) so that they can generate the attractive multi-color chasing effect.
The software program is downloaded into the ATtiny85's internal FLASH to turn ON/OFF all three red, green and blue LEDs (the programming part will be discussed later).
The TP4056 module supplies power to the circuit through a Li-Ion cell. When the cell discharges, the module charges the cell using a USB charger (any cell phone charger can be used). There are two LEDs, red and blue, on the TP4056 module. The red LED indicates cell charging and a blue LED indicates the cell is fully charged.
Now let's see how these circuits, battery cells, charging modules, etc. are all housed inside the box and how the complete item is prepared.

Fig.3: Complete prototype of the RGB coconut flashing module
As shown in the figure, the battery cell, circuit and charging module are all packed inside a cardboard box. The box is painted in watercolor to give it a seaside look. Three holes (openings) are provided – one for micro-USB connectors and two for two RGB LEDs. Two semi-transparent glue sticks are precisely attached to the top of the LEDs so that the LED light disappears through them. Plastic cutouts, such as coconut leaves, are attached to the top of glue sticks with Fevicol glue to give a coconut tree appearance. Then simply charge the lithium-ion cell using any mobile USB charger via the TP4056 module, and when fully charged (indicated by the blue LED on the module), turn on the display piece and enjoy a colorful flashing effect.
Software program
The program for the ATtiny85 microcontroller is written and compiled in Arduino IDE. The Arduino IDE also supports the ATtiny85 microcontroller. To see how to download the program to the ATtiny85's internal flash memory, see my series of ATtiny85 tutorial articles.
Here is the program for ATtiny85 compiled using Arduino IDE.
.gist-data{height:250px; // Any height overflow: auto;
}
Youtube link to article
RGB LED decorative tree using ATtiny85 – YouTube