No description
Find a file
2026-04-30 22:16:03 -04:00
.gitignore *: initial toying with gpiozero python3 2024-11-15 21:08:19 -05:00
blink.py *: initial toying with gpiozero python3 2024-11-15 21:08:19 -05:00
button.py *: initial toying with gpiozero python3 2024-11-15 21:08:19 -05:00
CLAUDE.md CLAUDE.md: rewrite to reflect current architecture and deployment workflow 2026-04-30 22:16:03 -04:00
door.py door.py: start timer when door closed OR humidity above 70% 2026-04-30 21:55:30 -04:00
LICENSE Initial commit 2024-11-16 01:45:09 +00:00
read_i2c.py testing the DHT20 sensor 2026-04-30 20:53:50 -04:00
README.md README: add hardware list and pinout tables 2026-04-30 21:26:48 -04:00
requirements.txt requirements: adding a file for the python3 deps 2026-04-30 19:12:26 -04:00
sensor.py testing the DHT20 sensor 2026-04-30 20:53:50 -04:00

bathroom-timer

Problem: the kids take showers or are "on the can" for longer than 30min.

Solution: make an alarm that goes off when the door has been closed for 30min.

Hardware

  • Raspberry Pi Model A+ v1.1
  • ASAIR DHT20 temperature/humidity sensor (I2C)
  • Magnetic door sensor (reed switch)
  • 4-pin tactile push button (manual reset)
  • Buzzer (alarm)
  • CanaKit ribbon cable + breadboard GPIO adapter

Pinout

DHT20 (ASAIR, I2C) — pins left to right with label side facing you

DHT20 pin Label RPi pin
1 VDD 3.3V
2 SDA GPIO 2 (SDA)
3 GND GND
4 SCL GPIO 3 (SCL)

I2C must be enabled (dtparam=i2c_arm=on in /boot/config.txt). Device appears at address 0x38.

Door sensor (reed switch)

Wire RPi pin
Either wire GPIO 23
Other wire GND

Reset button (4-pin tactile)

The button straddles the breadboard center gap. Pins on the same side are internally connected; pressing bridges the two sides.

Button side RPi pin
One side (pin 1 or 3) GPIO 19
Other side (pin 2 or 4) GND

Buzzer

Wire RPi pin
+ (positive) GPIO 26
(negative) GND

Notes

Started with this kit: Huzzah! Adafruit.io Internet of Things Feather ESP8266 - WiFi Starter Kit

But I needed a clock to measure 30min, so I am now using an old, low-voltage RPI Model A+ v1.1.

Still considering the solder kit: Ladyada's Electronics Toolkit