While alarm system projects have been done to death, I have found almost no projects that combine different sensors into one, making a re-usable device that can serve several functions. a door sensor will always be a door sensor, and a proximity sensor will never do anything else.
On the other hand, this sensor can always be taken down and assigned another purpose. This is convinient if you want to quickly and temporarily mount a security system - lets say you're going on holiday for a few weeks, or have contractors coming to your house unsupervised for repairs. This sensor can simply be set up in a matter of minutes and be fully operational.
Sensors:
- Time Of Flight sensor (distance sensor with a 4m range, 27 degree FOV, 50Hz polling rate and programmable region of interest: VL53L1CXV0FY/1)
- IR Motion sensor (Thermal camera with 4m range, 80 degree FOV, and sensitive to IR wavelength emitted by the human body: STHS34PF80TR)
- Light Sensor (For detection of light switch flipping, shadows passing and opening of cabinets/containers. Can detect ambient light (Lux) and IR ambient intensity, which can be used in tandem with the IR motion sensor for more accurate results: TSL25911FN)
- Hall effect switch (can accurately detect magnet micro-movements through walls, making it possible to detect the motion of a magnet when the sensor is completely hidden away)
- Reed switch (used for ultra-low power, operation. If this sensor is used on a door, it can be in deep sleep mode, consuming an extremely low current. This makes it possible for the battery to power this sensor for around a month straight.)
- 3 Axis Accelerometer (used for low-power, low frequency polling: MSA311)
- 9 Axis Accelerometer (This sensor is off for the majority of the time. Once the MSA311 detects an anomaly, this sensor kicks in, sending more frequent and more accurate acceleration data to check whether the motion exceeds an acceleration threshold: LSM9DS1TR)
- Temperature sensor (small, nice-to-have sensor for thermostat applications and smart-home integration. Not necessarily used for security, although there may be some niche applications such as detecting human presence through an increase in ambient temperature, or through a drop in temperature if an external door or window is opened)
Features:
- ESP32-S3 Main processor. This is a powerful chip, supporting wifi, bluetooth, zigbee integration, etc. It is also very easy to program, and can run at a 240mhz max clock speed. Specifically, this is a ESP32-S3-WROOM-1U-N16R8 chip. - There are 8 Operating modes including: multi mode - proximity, acceleration, magnet low power door sensing - only reed is enabled as a sleep interupt accelerometer only mode light sensor rate of change (high sensitivity and low sensitivity variations) light sensor threshold etc... - Automatic power loss and wifi outage detection and reconnection. The program stores the last operating mode in non-volatile flash memory, making it possible for a sensor to keep working without issues after brownouts. Without flash storage, brownouts will cause the sensor to revert to mode 0. - Stealth mode switch to disable all leds, and buzzers through hardware. Wifi and sensing functionality all still works exactly the same. (only the battery charging led gets an exception to this switch. This led is only on when the battery is charging. Not when the battery is missing, or full, or discharging. - Speaking of the battery, a rechargable coin cell lithium battery is present on the board. This is not designed to be a primary source, but rather as a backup for power outages of a few hours. This battery can seamlessly take over during a power cut, and seamlessly reconnect to usb power when electricity returns. - There are several Status leds for debugging and alerts. both regular diodes, rgb leds, and individual addressible RGB ones too) - there is a large buzzer array at the back with an externally controlled square wave, meaning that these can play a range of tones up to 20khz - For long range wired communication, a hardware signal inverter is present on the board. This allows a differential pair signal to be routed out for a few hundred meters (low speed communication <10khz recommended) - this board has excessive circuit protection, from esd protection on most communication ports, to an ideal diode on input and a resettable fuse. - This board can be programmed with both USB and UART from the same connector. This is achieved through using a small differential pair switch and a button to switch between the two modes through hardware. - This sensor itself is small, black and not flashy (with stealth mode), meaning that it can be hidden in plain sight, camouflage well among other projects and electronics. - This board has several JST connectors for accessories and integration with larger systems such as an alarm/security hub used on commercial buildings. The pads and headers also allow you to change component config settings, enable/disable hardware features, and route out signals for use with other electronics. - Alerts are sent through a discord webhook, making notifications free, reliable and easily implemented. While this project is not open source, I have attached some behind-the-scenes images and PCB screenshots:




-------------------------------------------------------------
Thanks to JLCPCB for sponsoring this project! You can find out more about this project (and learn more about JLCPCB's services) on Youtube! (https://www.youtube.com/@MagmaBow). If the video is not released yet, make sure that you are subscribed, and keep an eye on your notifications over the next week!
Discover Easy, Affordable, and Reliable PCB manufacturing with JLCPCB! Register to get $123 New customer coupons: https://jlcpcb.com/?from=MagmaBowpcb
CNC and sheet metal needs can also be fulfilled at JLCCNC, via: https://jlccnc.com/?from=Magmabow
Magmabow