User Tools

Site Tools


amc:ss2023:group-y: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-y:start [2023/07/24 13:03] – [Import the libraires] hoi-fung.samamc:ss2023:group-y:start [2023/07/24 14:49] (current) – [2.1.3 Adafruit Universal USB / DC / Solar Lithium Ion/Polymer charger - bq24074] hoi-fung.sam
Line 4: Line 4:
 =====1.Introduction ===== =====1.Introduction =====
 ====Aim of the project:==== ====Aim of the project:====
-In this project, we are going to make a house for chickens in order for scientists to study their living habits. The basic idea of this chickens’ house is to first, capture motion of the chicken by PIR motion sensor. Second,  the PIR sensor transmits a signal to the camera and then the camera takes a photo of the chicken. In the end, the camera that is connected to Wifi will send the photo to the user via email. The energy supply of this project comes from a solar panel, which means the project is totally environment friendly. +In this project, we are going to make a house for chickens in order for scientists to study their living habits. The basic idea of this chickens’ house is to first, capture motion of the chicken by PIR motion sensor. Second,  the PIR sensor transmits a signal to the camera and then the camera takes a photo of the chicken. In the end, the camera that is connected to WiFi will send the photo to the user via email. The energy supply of this project comes from a solar panel, which means the project is totally environment friendly. 
  
 =====2.Methods and Materials===== =====2.Methods and Materials=====
 ====2.1 Materials:==== ====2.1 Materials:====
-  - breadboard +  - Breadboard 
-  - female jumper wires +  - Jumper wires
-  - male to female jumper wires+
   - HC-SR501 PIR Sensor   - HC-SR501 PIR Sensor
   - ESP32-camera   - ESP32-camera
-  - FTDI programmer+  - UartSBee V5 (FTDI programmer)
   - solar panel   - solar panel
   - battery   - battery
Line 47: Line 46:
 The ESP32-CAM is a popular development board designed for applications requiring a camera module. It includes multiple data pins, a combined Wi-Fi and camera module, and a microSD card slot for easy storage. In this project we mainly use the Wi-Fi function and following pins: Power Pins (5V, 3.3V and GND), general purpose input/output pins (GPIO12), serial pins (U0R, U0T) and GPIO0.\\ The ESP32-CAM is a popular development board designed for applications requiring a camera module. It includes multiple data pins, a combined Wi-Fi and camera module, and a microSD card slot for easy storage. In this project we mainly use the Wi-Fi function and following pins: Power Pins (5V, 3.3V and GND), general purpose input/output pins (GPIO12), serial pins (U0R, U0T) and GPIO0.\\
 ====2.1.3 Adafruit Universal USB / DC / Solar Lithium Ion/Polymer charger - bq24074==== ====2.1.3 Adafruit Universal USB / DC / Solar Lithium Ion/Polymer charger - bq24074====
 +The micro lipo charger is designed to charge Lithium Polymer or Lithium Ion (LiPoly/LiIon) batteries via a USB Type-C connection, DC or Solar power. This charger charges the batteries by plugging into a USB port and a 3.7V/4.2V LiPoly/LiIon to JST plug.\\
 +The Micro-Lipo charger is charged in three stages. Firstly, pretreatment charging, then constant current fast charging, and finally constant voltage trickle charging. The charger has a 0.1-inch connector, D+ and D- data lines, 100mA charging current, which can be adjusted to 500mA by soldering off the jumper.
 +
 ====2.2 Method:==== ====2.2 Method:====
 ====2.2.1 Wire connection to upload the code==== ====2.2.1 Wire connection to upload the code====
Line 136: Line 138:
    the Sender's Gmail account must activate 2-Step Verification then get "App Passwords". The method is in the video. Watch carefully.    the Sender's Gmail account must activate 2-Step Verification then get "App Passwords". The method is in the video. Watch carefully.
  */  */
-#define emailSenderAccount      "amc491561@gmail.com@gmail.com"+#define emailSenderAccount      "amc491561@gmail.com"
 #define emailSenderAppPassword  "vsvnciqerihrhurx" #define emailSenderAppPassword  "vsvnciqerihrhurx"
 #define smtpServer              "smtp.gmail.com" #define smtpServer              "smtp.gmail.com"
Line 465: Line 467:
 **ESP32_MailClient.h** allows ESP32 to send emails with attachments via [[https://randomnerdtutorials.com/esp32-send-email-smtp-server-arduino-ide/|SMTP]] servers (Simple Mail Transfer Protocol), here is the procedure to install the [[https://randomnerdtutorials.com/esp32-cam-send-photos-email/|ESP-Mail-Client library]] in Arduino.\\ **ESP32_MailClient.h** allows ESP32 to send emails with attachments via [[https://randomnerdtutorials.com/esp32-send-email-smtp-server-arduino-ide/|SMTP]] servers (Simple Mail Transfer Protocol), here is the procedure to install the [[https://randomnerdtutorials.com/esp32-cam-send-photos-email/|ESP-Mail-Client library]] in Arduino.\\
 **WiFi.h** allows ESP32 to connect to the local WiFi network which is useful for projects needed to connect Arduiono to the internet to send and receive data.\\ **WiFi.h** allows ESP32 to connect to the local WiFi network which is useful for projects needed to connect Arduiono to the internet to send and receive data.\\
-**<SPIFFS.h>** is used to access and manage the SPIFFS(SPI Flash File System)on ESP32 board. SPIFFS is a lightweight file system that uses the flash memory of the board to store and retrieve files.\\+**<SPIFFS.h>** is used to access and manage the SPIFFS(SPI Flash File System) on ESP32 board. SPIFFS is a lightweight file system that uses the flash memory of the board to store and retrieve files.\\
 **FS.h** allows to read, write, and manage files on different types of storage, such as SPIFFS, SD cards, and internal EEPROM.\\ **FS.h** allows to read, write, and manage files on different types of storage, such as SPIFFS, SD cards, and internal EEPROM.\\
 <code C++> <code C++>
Line 477: Line 479:
 </code> </code>
  
-===Define email=== 
 Define the email account and password that the ESP32-CAM would login as well as the recipient's email\\ Define the email provider SMTP setting, the [[https://randomnerdtutorials.com/esp32-send-email-smtp-server-arduino-ide/|SMTP settings for different email providers]] are different.\\ Define the email account and password that the ESP32-CAM would login as well as the recipient's email\\ Define the email provider SMTP setting, the [[https://randomnerdtutorials.com/esp32-send-email-smtp-server-arduino-ide/|SMTP settings for different email providers]] are different.\\
 <code C++> <code C++>
Line 758: Line 759:
  
 =====5.Reference===== =====5.Reference=====
 +[[https://cdn-learn.adafruit.com/downloads/pdf/adafruit-bq24074-universal-usb-dc-solar-charger-breakout.pdf|Adafruit Universal USB / DC / Solar
 +Lithium Ion/Polymer charger - bq24074]]\\
 +[[https://wiki.seeedstudio.com/UartSBee_v5/|UartSBee V5]]\\
 +[[https://randomnerdtutorials.com/esp32-cam-send-photos-email/|ESP32-CAM: Take and Send Photos via Email using an SMTP Server]]\\
 +[[https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/|ESP32 Deep Sleep with Arduino IDE and Wake Up Sources]]\\
 +[[https://lastminuteengineers.com/pir-sensor-arduino-tutorial/#sensitivity-adjustment|How HC-SR501 PIR Sensor Works & Interface It With Arduino]]\\
 +[[https://www.arrow.com/en/research-and-events/articles/understanding-active-and-passive-infrared-sensors|The Right Tool for the Job: Active and Passive Infrared Sensors]]\\
 +[[https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/how-pirs-work|How PIRs Work]]
amc/ss2023/group-y/start.1690196619.txt.gz · Last modified: 2023/07/24 13:03 by hoi-fung.sam