Another engineering-wonder/nonsense-project that was just way too much fun to make.
In short, it is an ESP32 with a PIR motion sensor that lives in a hotel room and updates a website with the latest time of a movement detection.
This motivation for this project emerged about a week ago when I decided to try and work with Python scripts on MIT’s servers. I knew that I would not have access to my class’ server soon, and sought for an alternative online resource. The fact that I have travelled for the T&F DIII nationals meant that I had to take both of my final exams in one day (fun challenge right?), but also that I now have free time to make things! Since we are staying in a hotel here, the idea to make an interconnected cleaning detector seemed suiting. Therefore, the time on the flight here, on the van to the hotel, and at the hotel was dedicated to get this system up and running.
How it actually works – workflow
- Movement detected by PIR motion sensor, which makes it send a digital HIGH signal to the ESP32
- The ESP32 fires off an HTTP GET request to the Python script that resides in the pits of MIT’s servers.
- The Python script processes the request, and adds the current time to a dedicated database. That database holds all the past times in which the sensor/script was triggered.
- Triggering the script from a browser, with a special keyword, updates the webpage and shows the recent database entries, which correlate to the times when the sensor detected movement.
Hardware for this project could not be any simpler – it consists of only the ESP32 and the PIR. To build this extremely intricate system, I spliced some remains of female jumper wires and twisted the leads together (see duct tape), connected the PIR to 5V, GND, and an IO pin, and duct taped the device to a wall:
To sum up for today, it was cool to see this project taking shape very quickly. I feel that tools such as online databases and interconnected projects have incredible potential, and I think I’ll dive deeper into that realm in the following months.