Hello everyone, Merry Christmas to all.
In this text, I present a project that I developed for this year's Christmas. The project is a Christmas ornament powered by a CR2032 battery, featuring 30 LEDs and various lighting effects to make the Christmas tree even more beautiful. The project is built on the CH32V003 microcontroller platform.
This project was conceived in response to a challenge proposed by the Brazilian open hardware community called Franzininho. The challenge specified the use of the CH32V003 microcontroller and power from a CR2032 battery. Guided by these directives, I decided to create a Christmas tree ornament. The central idea was to insert a printed circuit board (PCB) inside an acrylic sphere and position several LEDs around the PCB.
To accommodate 30 LEDs along the edge of the PCB, I employed the microcontroller's pin multiplexing technique, a common approach for driving 7-segment displays.
After defining the board's shape and measurements to fit inside the acrylic sphere, I moved on to routing the board in KiCad. I positioned the LEDs on the front side of the board and the other components on the botton side.
Regarding the software, I developed it based on the Hardware Abstraction Layer (HAL) for CH32 provided by WCH. I utilized support for PlatformIO in the development: GitHub - Community-PIO-CH32V/platform-ch32v: PlatformIO platform for CH32V RISC-V chips (CH32V003, CH32V103, CH32V20x, CH32V30x) and CH56x, CH57x, CH58x
To drive the LEDs, I employed the multiplexing technique, where each set of LEDs was activated at a frequency imperceptible to the human eye, ensuring that the LEDs appeared continuously lit. This technique facilitated the control of the 30 LEDs on the board and contributed to battery power conservation. The project offers various lighting effects that users can switch through either a button or timing.
A significant challenge was implementing the sleep mode for power saving. The board lacks a conventional power on/off button, and to truly "turn off, " the deep sleep mode was used. In this mode, a current of approximately 10 µA was achieved. In operation, the average consumption was around 5 mA.
It was an exciting challenge to undertake. The project is open hardware, and you can use it as a reference to create your own ornament for the next Christmas.
Video: Project working
Check out more images and videos of the project on my Instagram: https://www.instagram.com/fabiosouza.io/
Merry Christmas! 🎄
Comments
Please log in or sign up to comment.