User Tools

Site Tools


amc:ss2023:group-e:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
amc:ss2023:group-e:start [2023/07/25 01:03] wai001amc:ss2023:group-e:start [2023/07/26 07:45] (current) wai001
Line 1: Line 1:
 ====Bird House: Surveillance system==== ====Bird House: Surveillance system====
 HSRW AMC Project\\ HSRW AMC Project\\
-Yongyi Wang(-),Fonyuy Stacy-Kpufotitin(-),Wai Lin Maung(28690)\\+Yongyi Wang(27634),Fonyuy Stacy-Kpufotitin(29820),Wai Lin Maung(28690)\\
 **1. Introduction** \\ **1. Introduction** \\
 EU The Birds Directive (Directive 79/409/EEC)  EU The Birds Directive (Directive 79/409/EEC) 
Line 29: Line 29:
 \\ \\
 {{:amc:ss2023:group-e:whatsapp_image_2023-07-24_at_09.33.10.jpg?nolink&200|}}  {{:amc:ss2023:group-e:whatsapp_image_2023-07-24_at_09.33.10.jpg?nolink&200|}} 
 +Fig1 : Bird house design (source-Wang)
 \\ \\
  
Line 42: Line 43:
 The specification can be assessed here in the datasheet below.   The specification can be assessed here in the datasheet below.  
 \\ \\
-{{:amc:ss2023:group-e:image1.png?nolink&400|}}+{{:amc:ss2023:group-e:image1.png?nolink&400|}} Fig2: Pins configuration on Esp32cam module (source-digikey)
 \\ \\
 Esp32 cam can be powered by either 3.3V or 5V but when flashing on 3.3 V, esp32 cam error  Esp32 cam can be powered by either 3.3V or 5V but when flashing on 3.3 V, esp32 cam error 
Line 48: Line 49:
 be powered with 5V. Gpio 3 and 1 are serial pins and transfer data and used to upload codes  be powered with 5V. Gpio 3 and 1 are serial pins and transfer data and used to upload codes 
 to the camera module.   to the camera module.  
-Esp32  In flashing  mode:GPIO  0  is  important  when  uploading  codes  because  to  set  the +//Esp32  In flashing  mode:GPIO  0  is  important  when  uploading  codes  because  to  set  the 
 camera  to  flashing  mode  it  has  to  be  grounded.    Afte  the  code  is  uploaded,  remove  the  camera  to  flashing  mode  it  has  to  be  grounded.    Afte  the  code  is  uploaded,  remove  the 
-connection and unground the GPIO 0, for the camera module to start working.  +connection and unground the GPIO 0, for the camera module to start working./
-/\\{{:amc:ss2023:group-e:image12.png?nolink&400|}}+\\{{:amc:ss2023:group-e:image12.png?nolink&400|}}
 Fig3: Esp32 cam on flashing mode( source: Wai Lin)  Fig3: Esp32 cam on flashing mode( source: Wai Lin) 
  \\  \\
Line 57: Line 58:
 directly connected to the computer. Hence FDTI adapter is used which supports UART serial  directly connected to the computer. Hence FDTI adapter is used which supports UART serial 
 connection with the camera module.   connection with the camera module.  
-[[<https://media.digikey.com/pdf/Data%20Sheets/DFRobot%20PDFs/DFR0602_Web.pdf>/ESP32 cam- Datasheet from digikey data sheet:]] +[[https://media.digikey.com/pdf/Data%20Sheets/DFRobot%20PDFs/DFR0602_Web.pdf|ESP32 cam- Datasheet from digikey data sheet:]] 
- +
 ● UartSBee V5  ● UartSBee V5 
 UartSBee V5 is FTDI cable compatible USB to Serial adapter equipped with BEE socket(20pin  UartSBee V5 is FTDI cable compatible USB to Serial adapter equipped with BEE socket(20pin 
Line 65: Line 66:
    
 ● PIR Sensor\\ ● PIR Sensor\\
- {{:amc:ss2023:group-e:image7.png?direct&200|<https://cdn-learn.adafruit.com/downloads/pdf/pir-passive-infrared-proximity-motion-sensor.pdf>}}\\ + {{:amc:ss2023:group-e:image7.png?direct&200|<https://cdn-learn.adafruit.com/downloads/pdf/pir-passive-infrared-proximity-motion-sensor.pdf>}} 
-Fig 5: PIR sensor description (source: Adafruit ) \\+Fig 4: PIR sensor description (source: Adafruit ) \\
 PIR referred to as "Passive Infrared", "Pyroelectric", or "IR motion" sensors, they are small,   PIR referred to as "Passive Infrared", "Pyroelectric", or "IR motion" sensors, they are small,  
 low power and inexpensive motion sensors. It has a sensitivity range up to 6 meters high and  low power and inexpensive motion sensors. It has a sensitivity range up to 6 meters high and 
Line 75: Line 76:
 digital output will be low again. Since the sensor only detects heat signatures, it is perfect for  digital output will be low again. Since the sensor only detects heat signatures, it is perfect for 
 bird houses, as it will not be triggered by other motions such as falling leaves.  bird houses, as it will not be triggered by other motions such as falling leaves. 
-[[<https://cdn-learn.adafruit.com/downloads/pdf/pir-passive-infrared-proximity-motion-sensor.pdf>|Adafruit PIR  +[[https://cdn-learn.adafruit.com/downloads/pdf/pir-passive-infrared-proximity-motion-sensor.pdf|Adafruit PIR  
-sensor datasheet]] +sensor datasheet]]
    
 ●  Solar Panel \\ ●  Solar Panel \\
Line 100: Line 101:
 unnecessary troubleshooting along the way. The source code from esp32 library was utilized  unnecessary troubleshooting along the way. The source code from esp32 library was utilized 
 for this step.  \\ for this step.  \\
- {{ :amc:ss2023:group-e:img9.mp4 |}}(source- Wai Lin)\\+ {{ :amc:ss2023:group-e:img9.mp4 |}} Location of the example code on Esp32 library (source- Wai Lin)\\
 We chose AI thinker camera configuration.  We chose AI thinker camera configuration. 
 If everything goes well you will receive the IP address of your image stream on serial monitor  If everything goes well you will receive the IP address of your image stream on serial monitor 
Line 107: Line 108:
 After inserting the camera Ip address. you will get assess to your camera stream \\ After inserting the camera Ip address. you will get assess to your camera stream \\
  {{:amc:ss2023:group-e:image10.jpg?direct&400|}}\\  {{:amc:ss2023:group-e:image10.jpg?direct&400|}}\\
- +
    
  \\  \\
 **Camera module and PIR sensor connection**\\ **Camera module and PIR sensor connection**\\
- {{:amc:ss2023:group-e:image8.png?direct&400|}} (source-Wai Lin)+ {{:amc:ss2023:group-e:image8.png?direct&400|}} Schematics of the ESP32 cam and pir sensor connection with fdti (source-Wai Lin)
 \\ \\
 When motion is detected by the PIR sensor, GPIO13 goes high, the board will then  wake up,  When motion is detected by the PIR sensor, GPIO13 goes high, the board will then  wake up, 
Line 118: Line 119:
 be published to Flespi via MQTT as a message and also saved on the SD card.   be published to Flespi via MQTT as a message and also saved on the SD card.  
    
-====Sleeping Modes of ESP32==== \\+**Sleeping Modes of ESP3** \\
 The ESP32 microcontroller utilized in the project supports a range of general sleeping modes  The ESP32 microcontroller utilized in the project supports a range of general sleeping modes 
 depending on which can reduce the RAM and CPU power and the working Wifi capabilities.  depending on which can reduce the RAM and CPU power and the working Wifi capabilities. 
-Table 1.2 depicts a range of sleeping modes and their features with power supply.  +Table 1.2 depicts a range of sleeping modes and their features with power supply.  \\ 
 +\\
 Table 1.2: The sleeping modes supported by ESP32 (source:espressif)  Table 1.2: The sleeping modes supported by ESP32 (source:espressif) 
-Power  +Power Mode      ^ Description       ^ Description         ^Power  Consumption     ^ 
-mode  +Active (RF working)  |  Wi-Fi/BT Rx and listening Wi-Fi/BT Rx and listening   |78 mA ~ 90 mA without communication.For TX RX more info in the next table  | 
-Description  +Modem-sleep    The CPU is powered on.|240 MHz * | 30mA 68mA  | 
-Description  +Modem-sleep    The CPU is powered on.|160 MHz * | 27mA 44mA  | 
-Power consumption  +Modem-sleep    The CPU is powered on.|160 MHz * | 27mA 34mA  | 
-Active  +Modem-sleep    The CPU is powered on.|Normal speed: 80MHz * | 20mA 31mA  | 
-(RF  +Modem-sleep    The CPU is powered on.|Normal speed: 80MHz *| 20mA 25mA  | 
-working +Light-sleep    | - | - |0.8mA  | 
- +Deep-sleep The ULP co-processor is powered on.|The ULP co-processor is powered on. 150 µA 100 µA @1% duty 10 µA | 
-Wi-Fi/BT  Rx  and  +Deep-sleep ULP sensor-monitored pattern |ULP sensor-monitored pattern150 µA 100 µA @1% duty 10 µA | 
-listening  +Deep-sleep RTC timer + RTC memory |RTC timer + RTC memory 150 µA 100 µA @1% duty 10 µA | 
-Wi-Fi/BT  Rx  and  +| Hibernation | RTC timer only |RTC timer only | 5µA | 
-listening  +Power off CHIP_PU is set to low level, the chip is powered off. |CHIP_PU is set to low level, the chip is powered off.  | 1µA | 
-78  mA   90  mA  without  + 
-communication  + 
-  + 
-For TX RX more info in the next table  +[[https://mischianti.org/2021/03/10/esp32-power-saving-modem-and-light-sleep-2/|Table 1 source]]  
-Modem + 
--sleep  +\\
-The CPU is powered on.  +
-240 MHz *  +
-30 mA 68 mA  +
-Modem +
--sleep  +
-The CPU is powered on.  +
-160 MHz *  +
-27 mA 44 mA  +
-Modem +
--sleep  +
-The CPU is powered on.  +
-160 MHz *  +
-27 mA 34 mA  +
-Modem +
--sleep  +
-The CPU is powered on.  +
-Normal speed: 80 MHz  +
-20 mA 31 mA  +
-Modem +
--sleep  +
-The CPU is powered on.  +
-Normal speed: 80 MHz  +
-20 mA 25 mA  +
-Light- +
-sleep  +
-–  +
-–  +
-0.8 mA  +
-Deep- +
-sleep  +
-The ULP co-processor is  +
-powered on.  +
-The ULP co-processor is  +
-powered on.  +
-150 µA 100 µA @1% duty 10 µA  +
-Deep- +
-sleep  +
-ULP  sensor-monitored  +
-pattern  +
-ULP  sensor-monitored  +
-pattern  +
-150 µA 100 µA @1% duty 10 µA  +
-Deep- +
-sleep  +
-RTC  timer   RTC  +
-memory  +
-RTC  timer   RTC  +
-memory  +
-150 µA 100 µA @1% duty 10 µA  +
-Hiberna +
-tion  +
-RTC timer only  +
-RTC timer only  +
-5 µA  +
-Power  +
-off  +
-CHIP_PU  is  set  to  low  +
-level,  the  chip  is  +
-powered off.  +
-CHIP_PU  is  set  to  low  +
-level,  the  chip  is  +
-powered off.  +
-1 µA  +
-ESP32 power savingmodem and light sleep – – Renzo Mischianti  +
- \\+
 **Wake Up sources** : The RTC controller is a built-in timer which can be used to wake up  **Wake Up sources** : The RTC controller is a built-in timer which can be used to wake up 
 the microcontroller after a predefined amount of time.  For our part we are using the  the microcontroller after a predefined amount of time.  For our part we are using the 
 external sensor(PIR) to wake up the camera. The Gpio 13 which supports the power on  external sensor(PIR) to wake up the camera. The Gpio 13 which supports the power on 
-<https://mischianti.org/2021/03/10/esp32-power-saving-modem-and-light-sleep-2/>+
 and off with external signal;  the initial level 1 means when the signal is high from the  and off with external signal;  the initial level 1 means when the signal is high from the 
 sensor, the waking up of the system takes place. \\  sensor, the waking up of the system takes place. \\ 
  esp_sleep_enable_ext0_wakeup(gpio_13, int level=1) \\  esp_sleep_enable_ext0_wakeup(gpio_13, int level=1) \\
- \\ +\\ 
-***MQTT Protocol*** \\+\\ 
 +**MQTT Protocol** \\
 MQTT (message queuing telemetry transport) is a messaging protocol that was designed to  MQTT (message queuing telemetry transport) is a messaging protocol that was designed to 
 create a reliable standard for machine-to-machine (m2m) communication. It is a publish-and- create a reliable standard for machine-to-machine (m2m) communication. It is a publish-and-
Line 327: Line 265:
 to test the reproducibility of the power consumption we run 4 cycles in sequences and they  to test the reproducibility of the power consumption we run 4 cycles in sequences and they 
 are observed to be similar power curves.  \\ are observed to be similar power curves.  \\
 +\\
  {{:amc:ss2023:group-e:image2.png?direct&400|}}  {{:amc:ss2023:group-e:image2.png?direct&400|}}
 Fig 8: The power curve of 4 photos tanken successively (source - Wang)  \\ Fig 8: The power curve of 4 photos tanken successively (source - Wang)  \\
 +\\
  
 **3.5 Home assistant integration**  \\ **3.5 Home assistant integration**  \\
Line 340: Line 279:
 modules. A whole range of controls can also be made in one go in home assistant  modules. A whole range of controls can also be made in one go in home assistant 
 environment.  environment. 
 +\\
  {{:amc:ss2023:group-e:image5.png?direct&400|}}  {{:amc:ss2023:group-e:image5.png?direct&400|}}
 Fig9: ESP Home configuration assistant (source:Wai Lin) \\ Fig9: ESP Home configuration assistant (source:Wai Lin) \\
Line 347: Line 287:
    
    
-***4. Discussion*** \\+**4. Discussion** \\
 **4.1 Limitations**\\ **4.1 Limitations**\\
 The flashlight on ESP 32 cam is an indicator for successful photo taking, however, it is too  The flashlight on ESP 32 cam is an indicator for successful photo taking, however, it is too 
Line 365: Line 305:
 \\ \\
 **5. Conclusion **\\ **5. Conclusion **\\
- {{:amc:ss2023:group-e:image4.png?direct&400|}} (source-Wai Lin)+ {{:amc:ss2023:group-e:image4.png?direct&400|}} Schematics of the final setup(source-Wai Lin) 
 +\\
 In the end, the surveillance system achieves the set criteria of inexpensive, low power,  In the end, the surveillance system achieves the set criteria of inexpensive, low power, 
 reliable design which can be set up and operated without much knowledge prior. The system  reliable design which can be set up and operated without much knowledge prior. The system 
amc/ss2023/group-e/start.1690239807.txt.gz · Last modified: 2023/07/25 01:03 by wai001