Project Xmas Tree v1
Xmas Tree v1 - is a creative, miniature Christmas tree with 16 different animation effects and 16 brightness gradations saved in EEPROM. The heart of the Christmas tree is on 16 WS2812B address LEDs, and the brains on an 8-bit microcontroller from ST will fit STM8S003F3P6 or STM8S103F3P6.
Christmas tree effects:
- Running fire with filling
- Confetti
- Rainbow
- Rainbow with glitter
- Theatrical pixel chase
- Animation of gorenje flame
- The effect of appearing and disappearing pixel by pixel
- Sine-based effects in 3 variations
- Gradient fill in 3 variations
- The palette "Colors of the forest"
- The palette "Colors of the ocean"
- The palette "Colors of clouds"
- The palette "Colors of the rainbow"
- The palette "Colors of the disco"
- The palette "Purple-green"
- The palette "Red, white and blue"
The printed circuit board project was developed in the Altium Designer program.
Top layer:
Bottom layer:
I soldered at home, I can't say that it's very easy to install WS2812B LEDs, because if you accidentally touch the soldering iron tip on their body, they immediately melt and it turns out not nice. But, if you wish, everything is possible, I did it, so you will succeed!
To facilitate soldering of LEDs, I lay out a layer of silkscreen Top Overlay on it, a triangular slice is clearly visible, pay attention to how the LEDs VD7-VD9 are located.
After installing all the electronic components, you should get something like this:
Description of hardware and software:
The Christmas tree is made on an 8-bit STM8S103F3P6 microcontroller in a TSSOP-20 case. The project was made specifically for this controller, but as I said at the very beginning, you can safely put STM8S003F3P6. I personally checked everything works. Data is output to the address LEDs from the PD3 port. The button is connected to the PD2 port. Initially, as usual, fantasy is raging :) I thought that it could be used for switching modes, for example fast / slow and brightness adjustment. Later, as the program grows, there is less and less space in the controller :) (as usual), and the effects look so cute without something superfluous, as you realized in the end, only brightness adjustment remained. The brightness is divided into 16 levels. Now I'll tell you how to set it up.
- Turn off the Christmas tree (if it is on).
- Press the button and turn on the power without releasing it.
- Keep holding the button until the Christmas tree is turned on.
- As soon as the Christmas tree turns on, release the button, after a couple of seconds the current brightness level will be displayed in green.
- Press the button briefly to set the desired brightness level. The change of levels is circular.
- To keep the brightness, press and hold the button until the red dots fill up, as soon as you notice them, release the button. The tree will reboot itself.
The brightness level is stored in the EEPROM - for those who do not know, this is such a non-volatile memory inside the MK. What does it mean? This means that you do not need to set the brightness every time you turn on the Christmas tree, it is simply read from the memory cell.
Global interrupts are not used in the microcontroller. The main program works in an infinite loop while(1), there is a sequential change of effects. Each effect is displayed for about 5-15 seconds, including all pauses for static images, the entire working cycle lasts about 5 minutes, then everything starts from the beginning and so on in a circle. The MK is powered by a built-in 16 MHz oscillator. To write the effects, the public library from Arduino FastLED was taken as a basis with porting the code to the applied MK.
Watch the video on my instagram: https://www.instagram.com/domdevice/
Author: Ivan Petrov
Project Xmas Tree v1
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(2)
- Likes(1)
- Guang Ning Jan 10,2022
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Petrov Ivan
- Kitchen Timer v1.0 Автор: Петров Иван Евгеньевич.Кухонный таймер предназначен для отсчета установленного времени и пода...
- Project Xmas Tree v2 In the previous article, I told you in detail how to make a Christmas tree with your own hands for t...
- Project Xmas Tree v1 Xmas Tree v1 - is a creative, miniature Christmas tree with 16 different animation effects and 16 br...
- PCB badge or keychain for PCBWay v3 Hi!I bring to your attention the third version keychain for PCBWay. To better understand how they di...
- PCB badge or keychain for PCBWay v2 Hi!As you know, I made three different versions of such a beautiful keychain, but I shared only the ...
- Universal PCB for creating clocks and thermometers Based on this printed circuit board, you can make almost any clock on a 7 segment LED display with a...
- Simple digital thermometer 7Segmentic on STM8 & DS18B20 A simple digital thermometer made on an 8-bit microcontroller STM8S103F3P6 and a DS18B20 digital tem...
- PCB badge or keychain for PCBWay v1 They turned out to be very beautiful souvenirs, not very large in size 3x3 centimetre, you can even ...
- Love clock This is an electronic project created on a romantic theme. This project differs from LED hearts that...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
113 0 0 -
DIY Laser Power Meter with Arduino
163 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
156 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
564 0 3