Hung Nguyen's profile

Alarm Clock Microcontroller

This microcontroller project incorporated an ADXL345 Accelerometer, Monochrome OLED display, and the PIC32 itself to create an adjustable alarm clock that can be turned off only by shaking the accelerometer like an activity-based alarm clock. To implement this project, I had to learn how to use SPI communication and plan out the state machine model to incorporate into the code written in C.
The alarm clock is set up with all the peripheral connections below:
1. The push buttons are used to cycle through each time field (using BTN3), turning the alarm on or off (BTN3 on main screen), and incrementing/decrementing the time (BTN1 and BTN2)
2. These neon yellow LEDS light up when the alarm is on and the clock time reaches the alarm time.
3. The monochrome OLED display shows main parts (Clock and Alarm) of the clock program
4. The accelerometer is to be shaken for 5 seconds straight to turn the LEDS alarm off.
The clock is ticking at the expected rate using clock divider and period register calculation (1 second = 1 Hz).
Alarm turning on (notice the LEDS in the upper-left) when clock time is the same as the set alarm time.
Turning the alarm clock off (LEDS from on to off) with a continuous shaking for five seconds.
After doing this project, I was surprised to see that I had built a version of a simple electronic that had always been an important part in my life growing up ( mostly to avoid being late for classes ), so it was really fun working on this project.
Alarm Clock Microcontroller
Published:

Alarm Clock Microcontroller

Published: