An intelligent IoT device that prevents roommate conflicts by monitoring noise and intervening gently—preserving both peace and relationships.
Interviewed 15+ people in shared housing. 80% preferred anonymous notifications over direct confrontation.
Selected INMP441 for high SNR and digital I²S. Added a simple driver stage to boost buzzer output for clear audio alerts.
Optimized MicroPython for 4 MB constraints. Chose IFTTT over MQTT for reliability and easy SMS integration.
Separate thresholds for conversation, TV, and music. Tuned 2-second windows to avoid notification loops.
Beta in 3 households for 2 weeks. Iterated on timing, sensitivity, and UX based on feedback.
Beta testers reported ~85% fewer noise-related confrontations.
Detects and responds within ~2 seconds.
24/7 monitoring with customizable quiet hours.
Total component cost under $35.
# boot.py (excerpt) — keep minimal so main.py always runs
import network, time
SSID = "YOUR_SSID"
PASS = "YOUR_PASSWORD"
wlan = network.WLAN(network.STA_IF); wlan.active(True)
if not wlan.isconnected():
wlan.connect(SSID, PASS)
for _ in range(20):
if wlan.isconnected(): break
time.sleep(0.5)
print("Wi-Fi:", "OK" if wlan.isconnected() else "FAILED", wlan.ifconfig())
# main.py (excerpt)
from machine import Pin, PWM, I2S
import struct, time
THRESHOLD, WINDOW_S, SAMPLE_RATE, CHUNK_BYTES = 440, 2, 16000, 6400
led = Pin(26, Pin.OUT); buz = PWM(Pin(15), freq=1, duty=0); C3,G3,DUTY = 2000,3000,500
def play_buzzer():
for _ in range(2):
buz.duty(DUTY); buz.freq(C3); time.sleep(0.5)
buz.freq(G3); time.sleep(0.5)
buz.duty(0); time.sleep(1.0)
sck, ws, sd = Pin(12), Pin(13), Pin(27)
i2s = I2S(0, sck=sck, ws=ws, sd=sd, mode=I2S.RX, bits=16, format=I2S.MONO, rate=SAMPLE_RATE, ibuf=16000)
def avg_amplitude_over_window(seconds=WINDOW_S):
target_bytes = int(SAMPLE_RATE * seconds * 2)
got = runsum = numsamples = 0
buf = bytearray(CHUNK_BYTES); mv = memoryview(buf)
while got < target_bytes:
n = i2s.readinto(mv)
if not n: break
for x in range(0, n, 4):
l, r = struct.unpack_from(" THRESHOLD: led.value(1); play_buzzer()
time.sleep(0.5)
{
"quiet_hours": { "start": "22:00", "end": "07:00" },
"threshold_db": 50,
"window_s": 2
}
Calibration tools, quiet hours scheduling, and real-time monitoring.
Differentiate music, conversation, and appliance noise for smarter alerts.
Coordinate multiple devices for complete apartment coverage.
Move from breadboard to a polished housing.
Connect with Alexa and Google Home.