amc:ss2023:group-a:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
amc:ss2023:group-a:start [2023/07/25 19:18] – osama-haiyl-attallah.attallah | amc:ss2023:group-a:start [2023/07/26 01:23] (current) – [2.0 Materials and Methods] ismail.santina-jarkass | ||
---|---|---|---|
Line 17: | Line 17: | ||
- | ==Quantitaive methods of biodiversity determination== | + | **Quantitaive methods of biodiversity determination** (Ismail) |
To describe species diversity in natural communities, | To describe species diversity in natural communities, | ||
Line 32: | Line 32: | ||
- | ==2.1.1 ESP32CAM + SD card (ismail)== | + | ==2.1.1 ESP32CAM + SD card (Ismail)== |
- | The ESP32-CAM is a compact and energy-efficient camera module built around ESP32. Equipped with the OV2640 camera, it boasts an onboard TF card slot. One of its standout features is the 4MB PSRAM, which efficiently stores camera images, enabling smooth video streaming and other processes without overwhelming the ESP32, thus allowing for higher picture quality. Additionally, | + | The ESP32-CAM, as shown in Fig 2 is a compact and energy-efficient camera module built around ESP32. Equipped with the OV2640 camera, it boasts an onboard TF card slot. One of its standout features is the 4MB PSRAM, which efficiently stores camera images, enabling smooth video streaming and other processes without overwhelming the ESP32, thus allowing for higher picture quality. Additionally, |
- | {{: | + | {{: |
+ | Fig 2. ESP32-Cam AI-Thinker + 8Gb SD Card | ||
- | ==2.1.2 FT232R | + | ==2.1.2 FT232R |
Since the ESP32-CAM AI-Thinker lacks a built-in programmer and a serial port, it cannot be programmed directly, thus serial communication must be first established through a protocol. The FT232R is a single chip USB to serial UART interface with advanced features, including integrated USB termination resistors, EEPROM for storing device descriptors, | Since the ESP32-CAM AI-Thinker lacks a built-in programmer and a serial port, it cannot be programmed directly, thus serial communication must be first established through a protocol. The FT232R is a single chip USB to serial UART interface with advanced features, including integrated USB termination resistors, EEPROM for storing device descriptors, | ||
- | {{: | + | {{: |
- | ==2.1.3 Solar module (ismail)== | + | Fig 3. UartSBee V5 |
- | On the roof of the bird house lies a solar (or photovoltaic panel) module. This eco-friendly component absorbs sunlight to generate clean and sustainable energy, which is then stored in a built-in rechargeable battery. This ensures a continuous and uninterrupted power supply for the bird house camera, even during cloudy days. | + | ==2.1.3 Solar module (Ismail)== |
+ | |||
+ | {{: | ||
+ | |||
+ | Fig 4. Solar panel module | ||
+ | |||
+ | On the roof of the bird house lies a solar (or photovoltaic panel) module, shown in Fig 4. This eco-friendly component absorbs sunlight to generate clean and sustainable energy, which is then stored in a built-in rechargeable battery. This ensures a continuous and uninterrupted power supply for the bird house camera, even during cloudy days. | ||
The short-circuit current is the current through the solar cell when the voltage across the solar cell is zero (i.e., when the solar cell is short circuited). Usually written as ISC, the short-circuit current is shown on the IV curve below. The short-circuit current is due to the generation and collection of light-generated carriers. For an ideal solar cell at most moderate resistive loss mechanisms, the short-circuit current and the light-generated current are identical. Therefore, the short-circuit current is the largest current which may be drawn from the solar cell. (7) | The short-circuit current is the current through the solar cell when the voltage across the solar cell is zero (i.e., when the solar cell is short circuited). Usually written as ISC, the short-circuit current is shown on the IV curve below. The short-circuit current is due to the generation and collection of light-generated carriers. For an ideal solar cell at most moderate resistive loss mechanisms, the short-circuit current and the light-generated current are identical. Therefore, the short-circuit current is the largest current which may be drawn from the solar cell. (7) | ||
Line 56: | Line 63: | ||
The open-circuit voltage, VOC, is the maximum voltage available from a solar cell, and this occurs at zero current. The open-circuit voltage corresponds to the amount of forward bias on the solar cell due to the bias of the solar cell junction with the light-generated current. The open-circuit voltage is shown on the IV curve below. (8) | The open-circuit voltage, VOC, is the maximum voltage available from a solar cell, and this occurs at zero current. The open-circuit voltage corresponds to the amount of forward bias on the solar cell due to the bias of the solar cell junction with the light-generated current. The open-circuit voltage is shown on the IV curve below. (8) | ||
- | Measuring the potential difference between the positive and negative terminals of the solar module yields a DC voltage of ~6V, which means it consists of 12 PV cells, with 0.5 V each connected serially. | + | Measuring the potential difference between the positive and negative terminals of the solar module, as in Vid 1. yields a DC voltage of ~6V, which means it consists of 12 PV cells, with 0.5 V each connected serially. |
{{ : | {{ : | ||
- | The open-circuit voltage ~ 6V | + | Vid 1. The open-circuit voltage ~ 6V |
Its role in this project is to keep the battery | Its role in this project is to keep the battery | ||
- | {{: | + | ==2.1.4 PIR module (infrared module) (Henrydon)== |
- | {{: | + | PIRs are basically made of a pyroelectric sensor, which can detect levels of infrared radiation. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output will swing high or low. The sensor has a wide input voltage range (4. 5V to 12V), a High/Low output voltage of 3. 3V TTL, capable of distinguishing between object and human movement, featuring two operating modes, covering a 120° angle and a 7-meter range, with low power consumption (65mA) and an operating temperature range of -20° to +80° Celsius. Below the frensel lenses, the IR sensor is housed in a hermetically sealed metal can to protect against intruding noise/ |
- | ==2.1.4 PIR module (infrared module) (henry)== | + | {{: |
- | PIRs are basically made of a pyroelectric sensor, which can detect levels of infrared radiation. The sensor | + | Fig 5. PIr sensor |
- | PIR sensors are more complicated than many of the other sensors explained in these tutorials (like photocells, FSRs and tilt switches) because there are multiple variables that affect the sensors input and output. To begin explaining how a basic sensor works, we'll use this rather nice diagram | + | ==2.1.5 Resistors + Transistors== |
- | The PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to IR. The lens used here is not really doing much and so we see that the two slots can ' | + | {{: |
+ | Fig 6. 1K, 10K resistors and 2N2222A NPN Transistor | ||
- | Below the dome: | + | The transistor here acts as a switch |
- | + | ||
- | The IR sensor itself is housed in a hermetically sealed metal can to improve noise/ | + | |
- | + | ||
- | PIR sensors are rather generic and for the most part vary only in price and sensitivity. Most of the real magic happens with the optics. This is a pretty good idea for manufacturing: | + | |
- | In the diagram up top, the lens is just a piece of plastic, but that means that the detection area is just two rectangles. Usually we'd like to have a detection area that is much larger. To do that, we use a simple lens such as those found in a camera: they condenses a large area (such as a landscape) into a small one (on film or a CCD sensor). For reasons that will be apparent soon, we would like to make the PIR lenses small and thin and moldable from cheap plastic, even though it may add distortion. For this reason the sensors are actually Fresnel lenses: The Fresnel lens condenses light, providing a larger range of IR to the sensor. | + | |
- | + | ||
- | OK, so now we have a much larger range. However, remember that we actually have two sensors, and more importantly we dont want two really big sensing-area rectangles, but rather a scattering of multiple small areas. So what we do is split up the lens into multiple section, each section of which is a fresnel lens | + | |
- | + | ||
- | The different faceting and sub-lenses create a range of detection areas, interleaved with each other. That's why the lens centers in the facets above are ' | + | |
- | + | ||
- | + | ||
- | {{: | + | |
- | + | ||
- | ==2.1.5 Resistors + Transistors== | + | |
- | + | ||
- | {{: | + | |
- | (10) | ||
==2.1.6 Battery + charge regulator (henry)== | ==2.1.6 Battery + charge regulator (henry)== | ||
- | Lithium-ion polymer batteries are thin, light, and powerful with an output range of 4.2V to 3.7V and a capacity of 2000mAh. The battery comes with a pre-attached genuine 2-pin JST-PH connector preventing snags, smooth insertion, and removal, as well as built-in protection circuitry to prevent overcharging, | + | Lithium-ion polymer batteries are thin, light, and powerful with an output range of 3.7V to 4.2V and a capacity of 2000mAh. The battery comes with a pre-attached genuine 2-pin JST-PH connector preventing snags, smooth insertion, and removal, as well as built-in protection circuitry to prevent overcharging, |
- | The Adafruit Universal USB/ | + | |
- | Adafruit | + | The Adafruit |
- | This charger | + | |
- | The bq24074 which powers this design is great for solar charging, and will automatically draw the most current possible from the panel in any light condition Even thought it isn't a ' | + | {{: |
- | Maximum Power Point Tracking is a family of control algorithms that aims at optimizing the use of a power source that possesses a fluctuating power profile. | + | Fig 7. Battery + LiPo Charger |
- | Indeed, some power sources, like solar panels, present power characteristics that strongly depend on the operating conditions. For instance, | + | The bq24074 which powers this design is great for solar charging, and will automatically draw the most current possible from the panel in any light condition with a near-MPPT characteristic |
- | Therefore, | + | Maximum Power Point Tracking |
- | For practically all real power sources, the power that can be extracted varies with the operating point. While electrical sources are related to the voltage/ | + | The charger has 2 LEDS: |
- | + | ||
- | In all cases, the inevitable internal resistance (or equivalent quantity) limits the maximum possible output power. Non-linear or more complex characteristics also exist, but with the same result: the maximum power point is not located at the [max. voltage · max. current] point (or equivalent quantity). Therefore, the operating point that delivers the maximum power must be constantly tracked by searching for the best voltage · current combination. | + | |
OUT - Regulated load output. This pin will provide a regulated output when the input voltage is below the over voltage protection threshold and above the regulation voltage. It will never be higher than 4.4V (but it may dip down to 3V or whatever the LiPo battery voltage is at, if USB/DC isnt plugged in) | OUT - Regulated load output. This pin will provide a regulated output when the input voltage is below the over voltage protection threshold and above the regulation voltage. It will never be higher than 4.4V (but it may dip down to 3V or whatever the LiPo battery voltage is at, if USB/DC isnt plugged in) | ||
PGOOD - Power Good Status (active low). PGOOD pulls to GND (open drain) lighting the connected led when a valid input source is connected. If the input power source is not within specified limits, PGOOD is disconnected from ground (high impedance) and the LED will be off. | PGOOD - Power Good Status (active low). PGOOD pulls to GND (open drain) lighting the connected led when a valid input source is connected. If the input power source is not within specified limits, PGOOD is disconnected from ground (high impedance) and the LED will be off. | ||
- | CHG - Charge status (active low) pulls to GND (open drain) lighting the connected led when the battery is charging. If the battery is charged or the charger is disabled, CHG is disconnected from ground (high impedance) and the LED will be off. | + | CHG - Charge status (active low) pulls to GND (open drain) lighting the connected led when the battery is charging. If the battery is charged or the charger is disabled, CHG is disconnected from ground (high impedance) and the LED will be off. (12) |
- | + | ||
- | OK so how do we fix this problem? The issue we have here is that the voltage collapses during high current draw. We need to find a way to keep the lipo charger from drawing too much current, and backing off when the voltage starts to droop. | + | |
- | + | ||
- | The bq24074 is designed to handle this sort of situation, calls it Input Dynamic Power Managemtn Mode (Input DPM) and basically, it does precisely what we want. When the input drops below 4.5V approximately, | + | |
===2.2 schematic (osama)=== | ===2.2 schematic (osama)=== | ||
- | |||
- | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum | ||
{{: | {{: | ||
- | made with KiCad | + | Fig 8. System schematic |
====3.0 Results (osama)==== | ====3.0 Results (osama)==== | ||
Line 138: | Line 118: | ||
===3.1 Arduino IDE C++ code(Osama)=== | ===3.1 Arduino IDE C++ code(Osama)=== | ||
- | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborumLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum | + | This code is adapted from Random Nerd Tutorials: |
- | (13) | + | |
< | < | ||
Line 275: | Line 254: | ||
</ | </ | ||
- | ===3.2 Python script to transfer photos (Osama)=== | ||
- | (14) | ||
The initial expriment ran for 1 week and did not attract any birds in fact, therefore a better location was chosen: GFL garden | The initial expriment ran for 1 week and did not attract any birds in fact, therefore a better location was chosen: GFL garden | ||
Line 286: | Line 263: | ||
The system should be optimized to consume the least power possible. This can be achieved by programming the ESP32-CAM to switch to several sleep modes, such as in the table: | The system should be optimized to consume the least power possible. This can be achieved by programming the ESP32-CAM to switch to several sleep modes, such as in the table: | ||
- | |||
as noted from the table, wireless communication requires a lot of power | as noted from the table, wireless communication requires a lot of power | ||
Line 295: | Line 271: | ||
{{: | {{: | ||
- | |||
Battery run time | Battery run time | ||
- | + | by using a tool to calculate how long the provided battery can provide power to the whole system, all while being charged by a 6V 1A solar panel | |
- | by using a tool to calculate how long the provided battery can provide power to the whole system, all while being charged by a 6V 0.8A solar panel | + | |
This can also be estimated manually: | This can also be estimated manually: | ||
Line 306: | Line 280: | ||
Generally, if a 5V battery has a 1 Ah capacity (or 1000 mAh), then it theoretically powers a 1 A consumer for 1 h based on the formula: | Generally, if a 5V battery has a 1 Ah capacity (or 1000 mAh), then it theoretically powers a 1 A consumer for 1 h based on the formula: | ||
- | Charge capacity = discharge time x charge consumption | + | Charge capacity = discharge time x charge consumption |
- | If 2000 mAh battery | + | If 2000 mAh battery |
- | + | 220 milli amperes x 6 seconds | |
- | 220 milli amperes x 6 x 10 = 13, | + | |
There are 86,400 seconds in a day, 60 of them are considered for operation = 86,340 seconds, multiplied by 10 microamperes = 863.4 milliamperes or 0.8634 amperes | There are 86,400 seconds in a day, 60 of them are considered for operation = 86,340 seconds, multiplied by 10 microamperes = 863.4 milliamperes or 0.8634 amperes | ||
- | |||
average daily current discharge = 13.2 + 0.8634 = 14 amperes | average daily current discharge = 13.2 + 0.8634 = 14 amperes | ||
average daily power consumption = battery operating voltage x average daily current consumption = 4.2 v x 14 = 58.8 | average daily power consumption = battery operating voltage x average daily current consumption = 4.2 v x 14 = 58.8 | ||
- | |||
to fully discharge a 2 Ah LiPo battery, assuming it is not charged with a solar panel, find the time t = battery capacity/ | to fully discharge a 2 Ah LiPo battery, assuming it is not charged with a solar panel, find the time t = battery capacity/ | ||
+ | For a more optimal design, some tips: | ||
In this case, birdfood is placed outside in front of the birdhouse, and the camera is placed facing the outside. Ensure that the PIR sensor is protected one way or another, since it is imperative for monitoring purposes | In this case, birdfood is placed outside in front of the birdhouse, and the camera is placed facing the outside. Ensure that the PIR sensor is protected one way or another, since it is imperative for monitoring purposes | ||
Line 332: | Line 304: | ||
temperature and humidity sensors can also be added on to the system, which can highlight behaviors and preferred conditions for certain avian species | temperature and humidity sensors can also be added on to the system, which can highlight behaviors and preferred conditions for certain avian species | ||
- | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum | + | ===3.2 Python script to transfer photos (Osama)=== |
+ | (14) | ||
{{: | {{: | ||
Line 338: | Line 311: | ||
{{: | {{: | ||
- | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum | ||
====5.0 Conclusion (Ismail)==== | ====5.0 Conclusion (Ismail)==== |
amc/ss2023/group-a/start.1690305495.txt.gz · Last modified: 2023/07/25 19:18 by osama-haiyl-attallah.attallah