amc:ss2023:group-e:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
amc:ss2023:group-e:start [2023/07/25 00:50] – wai001 | amc: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\\ | ||
+ | Yongyi Wang(27634), | ||
**1. Introduction** \\ | **1. Introduction** \\ | ||
EU The Birds Directive (Directive 79/ | EU The Birds Directive (Directive 79/ | ||
Line 27: | Line 29: | ||
\\ | \\ | ||
{{: | {{: | ||
+ | Fig1 : Bird house design (source-Wang) | ||
\\ | \\ | ||
- | + | \\ | |
**2.Material and method**\\ | **2.Material and method**\\ | ||
**2.1 Material** \\ | **2.1 Material** \\ | ||
+ | \\ | ||
● ESP 32-Cam | ● ESP 32-Cam | ||
- | |||
ESP 32-Cam is a low cost development board with an onboard camera. It is suitable for our | ESP 32-Cam is a low cost development board with an onboard camera. It is suitable for our | ||
application | application | ||
Line 41: | Line 43: | ||
The specification can be assessed here in the datasheet below. | The specification can be assessed here in the datasheet below. | ||
\\ | \\ | ||
- | {{: | + | {{: |
\\ | \\ | ||
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 47: | 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 | + | //Esp32 In flashing |
camera | camera | ||
- | 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.// |
- | / | + | \\{{: |
Fig3: Esp32 cam on flashing mode( source: Wai Lin) | Fig3: Esp32 cam on flashing mode( source: Wai Lin) | ||
\\ | \\ | ||
Line 56: | 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:// | + | [[https:// |
- | + | ||
● 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 64: | Line 66: | ||
● PIR Sensor\\ | ● PIR Sensor\\ | ||
- | | + | |
- | Fig 5: PIR sensor description (source: Adafruit ) \\ | + | Fig 4: PIR sensor description (source: Adafruit ) \\ |
PIR referred to as " | PIR referred to as " | ||
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 74: | 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:// | + | [[https:// |
- | sensor datasheet]] | + | sensor datasheet]] |
● Solar Panel \\ | ● Solar Panel \\ | ||
Line 99: | 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. \\ | ||
- | | + | {{ : |
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 106: | 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 \\ | ||
| | ||
- | + | ||
\\ | \\ | ||
**Camera module and PIR sensor connection**\\ | **Camera module and PIR sensor connection**\\ | ||
- | | + | |
\\ | \\ | ||
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 117: | 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: | Table 1.2: The sleeping modes supported by ESP32 (source: | ||
- | Power | + | ^ Power Mode ^ Description |
- | mode | + | | Active (RF working) |
- | Description | + | | Modem-sleep |
- | Description | + | | Modem-sleep |
- | Power consumption | + | | Modem-sleep |
- | Active | + | | Modem-sleep |
- | (RF | + | | Modem-sleep |
- | working | + | | Light-sleep |
- | ) | + | | Deep-sleep |
- | Wi-Fi/ | + | | Deep-sleep |
- | listening | + | | Deep-sleep |
- | Wi-Fi/ | + | | 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:// |
- | 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: | + | |
- | 20 mA ~ 31 mA | + | |
- | Modem | + | |
- | -sleep | + | |
- | The CPU is powered on. | + | |
- | Normal speed: | + | |
- | 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 | + | |
- | level, | + | |
- | powered off. | + | |
- | CHIP_PU | + | |
- | level, | + | |
- | powered off. | + | |
- | 1 µA | + | |
- | ESP32 power saving: modem and light sleep – 2 – 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 | ||
- | < | + | |
and off with external signal; | and off with external signal; | ||
sensor, the waking up of the system takes place. \\ | sensor, the waking up of the system takes place. \\ | ||
| | ||
- | \\ | + | \\ |
- | ***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 317: | Line 256: | ||
- | **3.3 Power Profile** \\ | + | **3.4 Power Profile** \\ |
In order to test the prower profile of the system we utilized the Power Profile Kit 2 to test the | In order to test the prower profile of the system we utilized the Power Profile Kit 2 to test the | ||
efficiency of the code and whether the battery can support the system only being charged by | efficiency of the code and whether the battery can support the system only being charged by | ||
Line 326: | 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. | ||
+ | \\ | ||
| | ||
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.4 Home assistant integration** | + | |
Home assistant is an open source home automation that can control a whole host of devices | Home assistant is an open source home automation that can control a whole host of devices | ||
with custom dashboards. It can host a range of add ons such as Node red, Mqtt dockers, | with custom dashboards. It can host a range of add ons such as Node red, Mqtt dockers, | ||
Line 339: | 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. | ||
+ | \\ | ||
| | ||
Fig9: ESP Home configuration assistant (source:Wai Lin) \\ | Fig9: ESP Home configuration assistant (source:Wai Lin) \\ | ||
Line 346: | 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 361: | Line 302: | ||
MB module can be utilized, it allows the board to directly via Micro-USB without a programming | MB module can be utilized, it allows the board to directly via Micro-USB without a programming | ||
device. \\ | device. \\ | ||
+ | |||
+ | \\ | ||
**5. Conclusion **\\ | **5. Conclusion **\\ | ||
- | | + | |
+ | \\ | ||
In the end, the surveillance system achieves the set criteria of inexpensive, | In the end, the surveillance system achieves the set criteria of inexpensive, | ||
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.1690239047.txt.gz · Last modified: 2023/07/25 00:50 by wai001