amc:ss2023:group-t:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
amc:ss2023:group-t:start [2023/07/25 15:50] – somaya.ahmadian | amc:ss2023:group-t:start [2023/07/25 20:36] (current) – somaya.ahmadian | ||
---|---|---|---|
Line 28: | Line 28: | ||
- | https:// | + | Source: |
**ESP32CAM** | **ESP32CAM** | ||
- | The ESP32-CAM is the microcontroller that we used in this project that comes with a detachable camera aid. It costs approximately $10. Besides the OV2640 camera, and several GPIOs to connect peripherals, | + | The ESP32-CAM is the microcontroller that we used in this project that comes with a detachable camera aid. It costs approximately $10. Besides the OV2640 camera, and several GPIOs to connect peripherals, |
- | + | ||
- | {{: | + | |
Source: https:// | Source: https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Figure 1: ESP32CAM https:// | ||
+ | |||
+ | |||
+ | {{: | ||
+ | |||
+ | Figure 2: ESP32CAM pinout https:// | ||
+ | |||
==== 2.2. UartSBee ==== | ==== 2.2. UartSBee ==== | ||
UART stands for universal asynchronous receiver/ | UART stands for universal asynchronous receiver/ | ||
- | {{: | + | {{: |
+ | |||
+ | Figure 3: UartSBee https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Figure 4: Uart uses two wires between transmitter and receiver to transmit and receive in both directions. https:// | ||
Line 46: | Line 60: | ||
{{: | {{: | ||
+ | |||
+ | Figure 5: Uart frame contains start and stop bits, data bits, and an optional parity bit. https:// | ||
+ | |||
UART is still a widely used serial data protocol but has been replaced in some applications by technologies such as SPI, I2C, USB, and Ethernet in recent years. | UART is still a widely used serial data protocol but has been replaced in some applications by technologies such as SPI, I2C, USB, and Ethernet in recent years. | ||
- | Source: https:// | ||
==== 2.3. 16 GB MicroSD card ==== | ==== 2.3. 16 GB MicroSD card ==== | ||
Line 65: | Line 81: | ||
USB, in full universal serial bus, is a technology used to connect computers with peripheral devices [7]. In our project, we established a connection between the ESP32CAM and our computer using a USB cable. The primary use was for programming the ESP32CAM through the UART module, allowing us to upload and update the code to its microcontroller. Additionally, | USB, in full universal serial bus, is a technology used to connect computers with peripheral devices [7]. In our project, we established a connection between the ESP32CAM and our computer using a USB cable. The primary use was for programming the ESP32CAM through the UART module, allowing us to upload and update the code to its microcontroller. Additionally, | ||
- | ==== 2.6. Water meter in casing | + | ==== 2.6. Water meter ==== |
- | A water meter is an instrument used to measure the water consumption in a building connected to the municipal water supply. In residential settings, the meter reading ensures accurate water billing and can detect any potential leaks within the home.. | + | A water meter is an instrument used to measure the water consumption in a building connected to the municipal water supply. In residential settings, the meter reading ensures accurate water billing and can detect any potential leaks within the home. |
+ | Source: https:// | ||
+ | ==== 2.7. Casing ==== | ||
The ESP32 casing serves as a protective enclosure to securely hold the ESP32CAM and its camera module. For this project, we downloaded an existing design from https:// | The ESP32 casing serves as a protective enclosure to securely hold the ESP32CAM and its camera module. For this project, we downloaded an existing design from https:// | ||
- | Source: https:// | ||
- | ==== 2.7. LiPO Battery ==== | + | ==== 2.8. LiPO Battery ==== |
A 3.7V LiPo battery was used to supply power to our SWM system. It can be connected to a LiPo charger/ | A 3.7V LiPo battery was used to supply power to our SWM system. It can be connected to a LiPo charger/ | ||
{{: | {{: | ||
- | ==== 2.8. LiPo charger/ | + | Fifure 6: LiPo Battery https:// |
+ | |||
+ | ==== 2.9. LiPo charger/ | ||
An Adafruit 1.5A USB/ | An Adafruit 1.5A USB/ | ||
Line 85: | Line 104: | ||
{{: | {{: | ||
- | ==== 2.9. Step-up/ | + | Figure 7: LiPo charger/ |
+ | |||
+ | ==== 2.10. Step-up/ | ||
A Pololu Step-up/ | A Pololu Step-up/ | ||
{{: | {{: | ||
+ | |||
+ | Figure 8: Voltage Regulator https:// | ||
===== 3. Method ===== | ===== 3. Method ===== | ||
Line 96: | Line 119: | ||
The initial step involved connecting the ESP32CAM and UART module, using jumper cables. This ensured the proper flow of data between the devices. | The initial step involved connecting the ESP32CAM and UART module, using jumper cables. This ensured the proper flow of data between the devices. | ||
- | {{: | + | {{: |
+ | |||
+ | Figure 9: Connection setup of ESP32CAM with UartSBee | ||
+ | Table 1: Pin connection of ESP32CAM and UartSBee | ||
+ | |||
+ | {{: | ||
Line 109: | Line 138: | ||
Next, we navigated to the firmware folder on the hard disk and followed the installation instructions from the AI_on_the_edge documentation[4]. We initiated the process with the command " | Next, we navigated to the firmware folder on the hard disk and followed the installation instructions from the AI_on_the_edge documentation[4]. We initiated the process with the command " | ||
+ | |||
+ | {{: | ||
The next step, was to initialize the Ai-on-the-edge through Arduino' | The next step, was to initialize the Ai-on-the-edge through Arduino' | ||
Line 127: | Line 158: | ||
{{: | {{: | ||
+ | |||
+ | Figure 10: Focus adjustment of the camera https:// | ||
==== 3.6. Casing ==== | ==== 3.6. Casing ==== | ||
Line 133: | Line 166: | ||
{{: | {{: | ||
+ | |||
+ | Figure 11: ESP32CAM and watermeter casing | ||
+ | |||
==== 3.7 Power Supply ==== | ==== 3.7 Power Supply ==== | ||
Line 138: | Line 174: | ||
{{: | {{: | ||
+ | |||
+ | Figure 12: Power supply setup | ||
Line 146: | Line 184: | ||
{{: | {{: | ||
+ | |||
+ | Figure 13: AI-on-the-edge setup webpage | ||
However, we encountered an issue with the ESP32' | However, we encountered an issue with the ESP32' | ||
Line 158: | Line 198: | ||
{{: | {{: | ||
+ | |||
+ | Figure 14: Selecting some reference points | ||
Line 163: | Line 205: | ||
{{: | {{: | ||
+ | |||
+ | Figure 15: Selecting Region Of Interest (ROI) | ||
To adjust the positions of the ROIs within the reading, we used the options "Move Next" or "Move Previous." | To adjust the positions of the ROIs within the reading, we used the options "Move Next" or "Move Previous." | ||
Line 168: | Line 212: | ||
In the subsequent stage, we focused on the " | In the subsequent stage, we focused on the " | ||
- | ==== 4.3. MQTT integration on Home Assistant | + | ==== 4.3. MQTT in Home Assistant ==== |
+ | |||
+ | Further in the process, using the Oracle VirtualBox, a virtual machine was setup to run Home Assistant in a Linux based environment. Following the documentation on the Home Assistant website, the configuration was complete [8]. Once the setup was finished, Mosquitto Broker was installed as an Add-on into the Home Assistant. We had used the digitizer in the AI-on-the-edge initialisation to set up the MQTT credentials to be used for this process. | ||
+ | |||
+ | {{: | ||
- | Further in the process, Docker software can be installed where we can create a container for MQTT to be installed. We had used the digitizer in the AI-on-the-edge initialisation to set up the MQTT credentials to be used for this process. Using the documentation for the steps to guide through the integration of Mosquitto (MQTT) into the Home Assistant | + | Figure 16: Oracle VirtualBox setup to run Home Assistant in a Linux based environment |
===== 5. Discussion ===== | ===== 5. Discussion ===== | ||
- | While the SWM system is an inexpensive way to monitor household water consumption and the setup is relatively straightforward, | + | While the SWM system is an inexpensive way to monitor household water consumption and the setup is relatively straightforward, |
- | There were several instances where the camera module just stopped functioning, | + | Additionally, |
- | Although, the initial learning material helped us form the basis of establishing the connections, | + | Although, the initial learning material helped us form the basis of establishing the connections, |
Line 190: | Line 238: | ||
[5]https:// | [5]https:// | ||
[6]https:// | [6]https:// | ||
- | [7]https:// | + | [7]https:// |
+ | [8]https:// | ||
amc/ss2023/group-t/start.1690293015.txt.gz · Last modified: 2023/07/25 15:50 by somaya.ahmadian