This is a pretty simple embedded project that uses a 2032 cell-powered PIC16LF1823 MCU to implement a few cool LED patterns, as well as a useful timed operation feature that suspends LED power after four hours. The LED patterns include solid, blinking, flicker, and half-brightness LED settings, along with variants. The flicker and half-brightness modes are implemented by the MCU’s PWM hardware.
The MCU runs a program intended to optimize power consumption by keeping itself in sleep mode and periodically waking up to perform necessary tasks. An external 32.768 kHz crystal allows for timekeeping even when the MCU core is in sleep mode. This timekeeping is used to ensure that the device powers off after four hours of runtime has elapsed; the device will resume operation after twenty hours and the cycle will reset. This feature allows a user to keep the unit powered without worrying about unnecessary battery drain that may result from forgetting to turn off the board.
Details
PCB fabricated and assembled by JLCPCB. 2-layer PCB, lead-free HASL finish. C program for PIC16LF1823 compiled with xc8. PICkit 3 used for programming and debugging.
Files
Tree Ornament Schematic 2024.pdf
New schematic revision. No changes to circuitry, but formatted it as a proper drawing to allow for better analysis of the circuitry.
Adobe Portable Document Format -
223.26 kB -
11/24/2024 at 15:20