Home security is a big market while existing doorbell cameras have drawbacks such as large power consumption due to the always-on camera.
We are going to create a low-power doorbell camera equipped with edge AI for detecting potential break-ins by thieves.
A XIAO ESP32C3 serves as the main controller and remains in a low-power sleep mode. When a human presence is detected by the PIR sensor, it wakes up the ESP32C3. Subsequently, the ESP32C3 activates the Grove Vision AI Module v2 for person classification. If the identified person is not the tenant, the ESP32C3 sends a WhatsApp message to the tenant.
Hardware:Wiring between XIAO ESP32C3 and Grove Vision AI Module V2 (WE2)
Following the pin assignment below (or schematic (https://github.com/teamprof/github-we2-doorbell/blob/main/doc/we2-esp32c3-sch-v1.0.pdf)) for wiring between XIAO ESP32C3 and Grove Vision AI Module V2
Hardware:Wiring between XIAO ESP32C3 and PIR lamp
Connect the PIR detector output by wire wrapping NSA3182FT180's pin5 to XIAO ESP32C3 GPIO4.
Since NSA3182FT180's pin5 is connected to R9, it is easier to soldering a wire on R9.
To simplify the demonstration, we utilize a pre-trained pet detection model on the Grove Vision AI Module v2.
Visit https://seeed-studio.github.io/SenseCraft-Web-Toolkit/#/setup/process, connect the ‘Grove Vision AI (V2)’, select the ‘Pet Detection’ model, and click the ‘Send’ button in your browser. This action will flash the Pet Detection model onto the Grove Vision AI Module v2.
1. Clone this repository by "git clone https://github.com/teamprof/github-we2-doorbell"
2. Follow the instruction on "https://www.callmebot.com/blog/free-api-whatsapp-messages/" to get the APIKEY.
3. Replace the "<MobileNumber>" and "<ApiKey>" values with your mobile number and the APIKEY got on step 2 in "secret.h".
4. Replace the "<YourWifiSsid>" and "<YourWifiPassword>" in "secret.h"
5. Build and upload the firmware in Arduino IDE.
If everything goes smooth, you should see the followings on the Arduino IDE Output:
**DO NOT connect USB cable to both XIAO ESP32C3 and Grove Vision AI Module v2 (WE2) simultaneously. Otherwise, board(s) MAY be permanently damage!**
1. Connect a USB cable between XIAO ESP32C3 and PC
2. Launch a Serial terminal, set baud rate to 115200 and connect it to the USB port of the XIAO ESP32C3 Board
3. Press the RESET button on XIAO ESP32C3
4. If everything goes smooth, you should see the followings on the serial terminal:
5. Put a "cat" in front of the camera/PIR, the PIR lamp turns on, the Grove Vision AI Module v2 starts inference. If everything works smoothly, a whatsapp message with "tenant" will be received on the mobile phone in couples of seconds.
6. Put a "dog" in front of the camera/PIR, the PIR lamp turns on, the Grove Vision AI Module v2 starts inference. If everything works smoothly, a whatsapp message with "stranger" will be received on the mobile phone in couples of seconds.
Video demo is available on https://www.youtube.com/watch?v=cL3YblVXM7Y
Contributions and ThanksMany thanks to the following authors who have developed great software and libraries.
1. [Seeed Studio Grove Vision AI Module V2](https://wiki.seeedstudio.com/grove_vision_ai_v2/)
2. [Seeed Studio OV5647-62 FOV Camera Module](https://www.seeedstudio.com/OV5647-69-1-FOV-Camera-module-for-Raspberry-Pi-3B-4B-p-5484.html)
3. [Seeed Studio XIAO ESP32C3](https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html)
4. [DebugLog](https://github.com/hideakitai/DebugLog)
5. [UrlEncode](https://github.com/plageoj/urlencode)
LicenseThe project is licensed under GNU GENERAL PUBLIC LICENSE Version 3
CopyrightCopyright 2024 teamprof.net@gmail.com. All rights reserved.
Comments