This Seeed XIAO ESP32C3-Based Alarm Is a Teeny-Tiny Motion Sensor with Smart Potential
Stuck to anything that shouldn't be moving, this dinky little alarm will let you know when something's amiss.
Pseudonymous maker "gokux" has turned a Seeed Studio XIAO ESP32C3 microcontroller board into a self-contained motion-triggered alarm β packing the board, battery, inertial measurement unit (IMU), and a buzzer into a compact 3D-printed case.
"By using this [device], if a small movement is detected by the IMU, it will trigger a sound in the buzzer," gokux explains of the gadget. "It will alert you if an object moves even if it is supposed to be stationary, like a door, home appliance, or drawer. You can attach this device to any surface with double[-sided] tape. It is also useful for monitoring children and elderly people."
Inside the eye-catching 3D-printed case is a Seeed Studio XIAO ESP32C3, a compact development board built around the Espressif ESP32-C3 microcontroller β the wireless connectivity of which goes unused in this particular project, though it's easy to see it being extended to offer network-based alerts as well as a locally-audible siren. To this, gokux has added a TDK MPU-6050 three-axis inertial measurement unit (IMU) with gyroscope and accelerometer to detect things moving when they shouldn't.
"After powering on the alarm will not be activated," gokux says of the device's method of operation. "To activate this alarm you need to press down the push button, then you will hear one beep sound which indicates the activation sequence is successful. After pressing the button we will have four seconds to place this alarm, any movement happening during this four seconds will be ignored. After the stand-by sequence, you will hear two beep sounds which indicate the Detection sequence is started. From here the alarm is fully armed."
Once armed, any movement detected by the IMU triggers a ten-second sounding of the alarm β plus a flashing LED, for good measure. "I used a XIAO ESP32C3 for [a] future-proof design," gokux says, "because without any hardware change we can convert it to a lot of devices like notifying alarm triggers with phone notifications or performing other tasks like if you open the door it will switch on the room lights etc."
The full project is documented on Instructables, including wiring diagram, source code, and the 3D print files for the case.