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.

Olarm: Annoying alarm clock
Screenshot 2024-12-06 at 10.40.43 AM.png
Screenshot 2024-12-06 at 10.31.16 AM.png
Screenshot 2024-12-06 at 10.40.34 AM.png
Screenshot 2024-12-06 at 10.30.02 AM.png

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

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:

WIFI_SSID="YourWiFiName"
WIFI_PASSWORD="YourPassword"

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:

WIFI_SSID="YourWiFiName"
WIFI_PASSWORD="YourPassword"


Step 4: Sensor Setup

door_sensor = digitalio.DigitalInOut(board.GP14)
door_sensor.switch_to_input(pull=digitalio.Pull.UP)


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

Screenshot 2024-12-06 at 10.57.43 AM.png
Screenshot 2024-12-06 at 11.06.13 AM.png

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

Screenshot 2024-12-06 at 11.09.30 AM.png

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.