Olarm: the Most Effective Alarm Clock - Alarm Clock + IOS App That Only Shuts Off When You Get Our of Bed.
by pintchom in Circuits > Apple
12 Views, 0 Favorites, 0 Comments
Olarm: the Most Effective Alarm Clock - Alarm Clock + IOS App That Only Shuts Off When You Get Our of Bed.
This is the last alarm clock your lazy ass will ever need. Simply set an alarm time through the Olarm app, go to bed, wake up to horrific siren sounds, and the ONLY way to shut it off is by either completely destroying it, or simply going to the bathroom and lifting your toothbrush up from its stand.
Github: https://github.com/pintchom/Olarm
Supplies
1 x ESP32-C3 (toothbrush controller):
https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html (my new favorite micro-controller)
1 x Raspberry pi pico W (alarm controller):
https://www.adafruit.com/product/5526
1 x Mono audio jack speaker :
https://vilros.com/products/mini-speaker?variant=32188543762526&country=US¤cy=USD&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic&com_cvv=8fb3d522dc163aeadb66e08cd7450cbbdddc64c6cf2e8891f6d48747c6d56d2c (Something like this, doesn't have to be this exact one (smaller is better) )
1 x magnet button latch :
https://www.adafruit.com/product/375
3 x NeoPixel Flora :
https://www.adafruit.com/product/1260
1 x Mono Female Audio Jack :
https://pmdway.com/products/3-5mm-panel-mount-mono-jack-socket-5-pack?variant=21538212675668&country=US¤cy=USD&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic&gQT=2 (not the exact one i used, but something along these lines)
Alarm Controller
Step 1: Initial Setup
1: Install CircuitPython on your board
2: Install required libraries:
adafruit_httpserver
adafruit_requests
neopixel
circuitpython_schedule
Step 2: Hardware Connections
Connect NeoPixel data pin to GPIO4
Connect speaker/buzzer to GPIO5
Save a "siren.wav" file to your board (any alarm sound will do)
Step 3: WiFi Connection
Set up WiFi credentials in a separate settings.toml file:
Step 4: Server Setup
Create routes for:
Setting alarms
Stopping alarms
Getting current alarms
Deleting alarms
Step 5: Alarm Logic
Store alarm times in a list
Check current time against alarm times
Trigger alarm when times match
Play sound and control LED animations during alarm
How It Works
Board connects to WiFi on startup
Web server starts and listens for commands
When alarm time is reached:
Siren sound plays
NeoPixel LEDs pulse red
Alarm can be stopped via web request
Usage
Power up the board
Connect to http://[board-ip-address]
Set alarms using POST requests to /set-alarm
Stop alarm using GET request to /stop-alarm
Tips
Use a reliable WiFi connection
Keep sound file small to avoid memory issues
Test alarm times with short intervals first
Toothbrush Controller
Step 1: Initial Setup
Install CircuitPython on your board
Install required libraries:
adafruit_debouncer
adafruit_requests
adafruit_httpserver
Step 2: Hardware Connection
Connect one wire from the reed switch/door sensor to GPIO14 (GP14)
Connect the other wire to ground (GND)
Place magnet near the sensor for testing
Step 3: WiFi Setup
Create a settings.toml file:
Step 4: Sensor Setup
How It Works
Board connects to WiFi on startup
Continuously monitors the magnetic sensor
When magnet is detected (door opened/closed):
Sends HTTP request to stop an alarm on another device
System runs indefinitely, perfect for monitoring cabinet/door status
Usage
Mount sensor on fixed surface (like doorframe)
Place magnet on moving part (door)
Power up the board
System will automatically detect magnetic presence/absence
Tips
Ensure proper sensor placement for reliable detection
Keep magnet close enough to trigger sensor
Test WiFi connection before final installation
Alarm Wiring and Components
For the alarm controller, the wiring scheme is fairly simple. Daisy chain your neo pixel flora lights with the poorly drawn diagram above in mind. The root neopixel attaches the up arrow to signal, the + to 5v power, and the - to ground. Then every next neopixel attaches the same way but daisy chained to the previous, - to -, + to + and up arrow to down arrow.
For the speaker, the only wiring that needs to be done is to attach signal and ground to the female mono jack so that any mono aux speaker could just plug into it.
And that's it!
For the toothbrush controller, the only other piece being added to the board is the magnet latch. The wiring is very simple, just signal and ground to your esp32. That's it!
Container and Prints
The physical components for this build are also very simple. A red box with holes for sound travel for the alarm controller, and a small box with a cutout for toothbrush for the toothbrush controller. Both STL files are in the github above. I would recommend sizing them up a little bit, I was a little bit too ambitious with space conservation. The spherical thing for the toothbrush stand I recommend just gluing over the small box after wiring and confirming everything is working.
The final step is super tiny magnet attached to your toothbrush. A nice thing about the magnet latch linked above is that any magnetic signal will be tracked and it makes it easy to apply pretty much any magnet to the system. I simply glued a tiny magnet to my toothbrush and shaved down the sides a bit. Like I said, size up the models a little bit so you don't have to grind away at the edges of your toothbrush.
Assemble
After all of your code is finished and all of your wiring is done, cram everything into those little boxes and you're done! I will say that gluing the flora lights in place of the small holes of the alarm controller box was very annoying, so make sure you have small clamps ready to keep them in place while they dry. Same goes for the toothbrush controller case, the magnet latch was tough to secure in place, but nothing a little super glue doesn't fix.
MAKE SURE THAT WHEN ATTACHING THE MAGNET IT IS FACING THE RIGHT WAY. The magnet latch posted above is of a fairly odd shape as its meant for doors so make sure to do some testing prior to gluing the latch to your box to confirm which side of the white square thing is the one actually reading a signal.
After that, that's it! Enjoy annoying your family and friends with the worlds most effective alarm clock.