Old Projects
PRISM Door Sensor
Posted: 2020.7.10 at 14:23
While I never managed to get much use out of it myself (due to the sudden lockdown), PRISM wanted a system to let people check if the door to the physical club room was open. This would provide people with a safe space to kick back and relax in a supportive environment. Truth be told, a system like this was in use around my first year at CMU. However, the Raspberry Pi that was operating the sensor broke when the door accidentally slammed into it. Whoops! The club officers asked me, the current webmaster for the org, to find a way to fix it. While reparing a shattered motherboard is a bit beyond my capabilities, I was at least able to recommend a new Raspberry Pi system to use in the old one's place.
We ended up purchasing a Raspberry Pi 3B+. A bit overkill for a simple door sensor, but I was able to get in on a sale. Score! The door sensor mechanism itself is rather simple. Using a set of magnets, we can hook one to the door and another to the Raspberry Pi. When the door's magnet swings past the Raspberry Pi's we can detect the voltage difference from the Hall effect. Changing the door status online is as simple as sending a POST with a small bit of data attached to our old webserver.