Sometimes, we are counting down the days to an important event, such as a trip or an anniversary. In this project, a few modules are combined to produce a timer powered by a Li-Ion battery:
- An XIAO RP2350 is the "brain" of the project. It includes support for a battery and has enough I/O pins for connecting the other modules.
- An e-paper display shows the remaining days for the event. It shows the image even when turned off, keeping battery consumption low.
- The tinyRTC module has a DS1307 RTC chip, with a coin battery backup. It also includes a 24C32 EEPROM for saving the event date and time.
A button is used to enter the configuration mode (where the event date is programmed through the USB connector).
Hardware connections are straightforward. The display requires a 3-wire (MOSI, SCK, and CS) SPI connection plus three digital signals (BUSY, RES, and D/C). The tinyRTC utilizes an I2C interface (SDA and SCL), The button requires an additional digital signal.
The firmware will wake the RP2350 every 15 minutes to update the display. When running we use the P0_0 power state. The sleep state is P1_7, where most of the hardware is turned off. The RP2350 timer alarm is used to wake the processor.
Details on the hardware and firmware are available at my blog.
Comments