Ed’s alarm is an alarm clock for Ed’s mobile home to help him wake up in the morning or set timers for daily life. There are two main modes: “Wake Up Mode”, and “Normal Mode”. In “Wake Up Mode” the alarm clock will actuate a mechanism to punch the user until they win a game of Whack-a-Mole (the alarm clock is meant to be situated next to the user’s head). This is to ensure that the user is really awake before they can turn off their alarm. In “Normal Mode” the alarm will emit a sound from a buzzer. The volume of this buzzer is based on a proximity sensor, and the user can change the volume by placing their hand nearer or farther from the alarm clock.
In order to switch modes, the user simply activates a toggle switch connected to the PIC32. One state of this pin is associated with “Wake Up Mode” and one state is associated with “Normal Mode.”
The user is also able to set the countdown time for the alarm. In order to set the time and begin the countdown, the user will use the 3 Select Buttons:
Button 1 (Red), Button 2 (Yellow), and Button 3 (Blue).
To begin setting the time, the user presses Button 3.
To add 10 seconds to the countdown time, the user presses Button 1.
To decrease 10 seconds from the countdown time, the user presses Button 2.
Once desired time is selected, the presses Button 3 again to begin the countdown.
The user may double press Button 3 while setting the time to return to the Welcome Screen
The user may press Button 3 during the countdown to return to the Welcome Screen
The Welcome Screen is the device’s home base, and it will return to the Welcome Screen if it is expecting a user input but does not receive one within 20 seconds. This reset will occur at any point during operation, be that during Countdown setting, Wake Up Alarm, or Normal Alarm, but not during countdown.
When in Wake Up mode, the device functions as an alarm clock that (lightly) punches the user when the time runs out. In order to turn off the alarm clock, the user must win a game of whack-a-mole.
The punching feedback will be achieved by connecting a PIC32 OC pin that can sink 5V to the MOSFET_N which connects to the DC motor. When the OC pin is high the motor is driven in a single direction. The motor is connected to a linkage with a tiny 3D printed fist.
Whack-a-mole is played with our 4 panel cascading LED Matrix. On this matrix, the first 3 panels are for displaying Moles, while the 4th panel displays the user’s score. When one of the panels lights up with the mole pattern, the user will press the associated select button. Button 1 corresponds to the leftmost panel, Button 2 to the 2nd panel, and Button 3 to the 3rd panel. The Mole resets its position randomly every 1 second, so the user must press the correct button within 1 second to receive a point. Once the user receives enough points, the motor is stopped. (See tutorial video below).
When in Normal Mode, the device functions as a normal alarm, and the PIC32 triggers a passive buzzer to emit a sound. To change the frequency of this buzzer, the user places their hand near an IR proximity sensor. This is an analog input, so when the user’s hand is far from the buzzer, a higher voltage is passed to the buzzer, and when their hand is near to the buzzer, a lower voltage is passed to the buzzer. As their hand gets closer and closer to the sensor, the frequency of the buzzer will decrease until it is eventually turned off.
Details of the Project
Bill Of Material