Motion Activated mp3 Security System¶
This is a pretty cool project - an ultra low power 2uA motion sensor system that plays any mp3 you want when motion is detected. Also has ability to only play the file during certain hours of the day and because it’s based on the ESP32, you can also send push notifications.
Parts Needed¶
Connections¶
Warning
The DC-DC booster modules need to be preset before installation. The 3.3V pin on the trigBoard is only enabled when triggered, so you can wire this to the booster module, but DON’T connect the output, until you adjust it for 12V using the trimpot. I did this with the trigBoard and just held the wake button until the LED starts flashing. That will keep the 3.3V rail up while you adjust the booster output. Then you can disconnect the battery and finish the connections.
Note
I added in a P-CH MOSFET to the design so that power to the audio circuit can be controlled. This is nice because the 3V3 rail will always turn on when motion is detected, even if you don’t want to play audio at that time. I added the MOSFET, so now, only during the active time frame the power to the amplifier & mp3 board is enabled by driving pin 13 LOW from the code.
Note that the 12V connection is soldered directly to the amplifier board:
Source Code¶
See Firmware Page for how to upload
Note
This code adds support for the mp3 player board as well as using the RTC (Clock) to check the current hour so that the dog bark is only enabled during a certain timeframe.