User Tools

Site Tools


amc2021:groupg: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
amc2021:groupg:start [2021/09/06 14:01] – [2.1.1 Espressif ESP32 DevKitC] marie001amc2021:groupg:start [2023/01/05 14:38] (current) – external edit 127.0.0.1
Line 27: Line 27:
 === 2.1.1 Espressif ESP32 DevKitC === === 2.1.1 Espressif ESP32 DevKitC ===
  
-[[https://www.mouser.de/datasheet/2/891/Espressif_Systems_01162019_ESP32-DevKitC-VB-1522974.pdf|ESP32]] is a low-power consuming, low-cost microcontroller board, with built-in Wi-Fi and Bluetooth that enable remote controlling and monitoring. ESP32 is also capable of handling other internal peripherals such as SPI (Serial Peripheral Interface) or I2C. Due its compatibility with Arduino IDE, it can be easily used by Libraries that can be installed. It can operate in a wide range of temperatures from -40°C to 125°C. +[[https://www.mouser.de/datasheet/2/891/Espressif_Systems_01162019_ESP32-DevKitC-VB-1522974.pdf|ESP32-DevKitC ]] is a low-power consuming, low-cost microcontroller board, with built-in Wi-Fi and Bluetooth that enable remote controlling and monitoring. ESP32 is also capable of handling other internal peripherals such as SPI (Serial Peripheral Interface) or I2C. Due its compatibility with Arduino IDE, it can be easily used by Libraries that can be installed. It can operate in a wide range of temperatures from -40°C to 125°C. 
  
 {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.51.jpeg?nolink&200|}} {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.51.jpeg?nolink&200|}}
Line 36: Line 36:
 === 2.1.2 Grove Temperature and Humidity Sensor(SHT31)  === === 2.1.2 Grove Temperature and Humidity Sensor(SHT31)  ===
  
-The Grove Temperature and Humidity Sensor is a highly reliable and accurate sensor with a quick response. The relative humidity has an accuracy of ±2% and ±0.3°C  for the temperature. The SHT31 is compatible with 3.3 Volts and 5 Volts meaning it can be used both with the ESP32 and the Arduino UNO and also supports I2C communication. Furthermore libraries are readily available which facilitates the use. Just like the ESP32, the SHT31 can operate under temperatures ranging from -40°C to 125°C. +[[https://media.digikey.com/pdf/Data%20Sheets/Seeed%20Technology/101020212_Web.pdf|The Grove Temperature and Humidity Sensor]] is a highly reliable and accurate sensor with a quick response. The relative humidity has an accuracy of ±2% and ±0.3°C  for the temperature. The SHT31 is compatible with 3.3 Volts and 5 Volts meaning it can be used both with the ESP32 and the Arduino UNO and also supports I2C communication. Furthermore libraries are readily available which facilitates the use. Just like the ESP32, the SHT31 can operate under temperatures ranging from -40°C to 125°C. 
  
 {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.52.jpeg?nolink&200|}} {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.52.jpeg?nolink&200|}}
Line 44: Line 44:
 === 2.1.3 Capacitive Soil Moisture Sensor === === 2.1.3 Capacitive Soil Moisture Sensor ===
  
-The Capacitive Soil Moisture Sensor Module is a low-power sensor that measures the difference in capacitance caused by the changes in the dielectric that is formed by the soil and the water. The sensor’s capacitance is measured by the use of a 555 based circuit (that is, it  provides a single pulses over a long time) that produces a voltage proportional to the capacitor inserted in the soil. This voltage is after that measured by means of an Analog to Digital Converter which produces a number that we can then interpret as soil moisture. Due to the capacitive probe, corrosion is minimised and there is no electrical current flowing in the soil and no electrolysis is induced.+The [[https://www.sigmaelectronica.net/wp-content/uploads/2018/04/sen0193-humedad-de-suelos.pdf|Capacitive Soil Moisture Sensor Module]] is a low-power sensor that measures the difference in capacitance caused by the changes in the dielectric that is formed by the soil and the water. The sensor’s capacitance is measured by the use of a 555 based circuit (that is, it  provides a single pulses over a long time) that produces a voltage proportional to the capacitor inserted in the soil. This voltage is after that measured by means of an Analog to Digital Converter which produces a number that we can then interpret as soil moisture. Due to the capacitive probe, corrosion is minimised and there is no electrical current flowing in the soil and no electrolysis is induced.
 It consists of 3 connectors; namely Ground, Voltage common connecter, VCC (3.3V – 5.5V DC) and the analog output that is usually connected to the analog input in the microcontroller. It consists of 3 connectors; namely Ground, Voltage common connecter, VCC (3.3V – 5.5V DC) and the analog output that is usually connected to the analog input in the microcontroller.
  
Line 53: Line 53:
 === 2.1.4 Submersible water pump === === 2.1.4 Submersible water pump ===
  
-The 5V water pump was used together with the relay module and a battery pack that is being used to power the pump. +The 5V [[https://www.amazon.de/gp/product/B0814HXWVV/?th=1|water pump]] was used together with the relay module and a battery pack that is being used to power the pump. 
  
 {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.52_1_.jpeg?nolink&200|}} {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.52_1_.jpeg?nolink&200|}}
Line 61: Line 61:
 === 2.1.5 Relay Module === === 2.1.5 Relay Module ===
    
-A Relay HLS8L-DC5V-S-C with a coil voltage(primary voltage) of 5V was used as an electrical switch to control when the pump turns on and off as the water pump has a higher voltage than the ESP32. The relay module acts like a bridge inbetween the water pump and the ESP32.+[[http://www.dipmicro.com/?datasheet=HLS8L.pdf|Relay HLS8L-DC5V-S-C]] with a coil voltage(primary voltage) of 5V was used as an electrical switch to control when the pump turns on and off as the water pump has a higher voltage than the ESP32. The relay module acts like a bridge inbetween the water pump and the ESP32.
  
 {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.53.jpeg?nolink&200|}} {{:amc2021:groupg:whatsapp_image_2021-09-05_at_13.36.53.jpeg?nolink&200|}}
Line 89: Line 89:
  
 ==== 3.1 Code ==== ==== 3.1 Code ====
 +
 +The code below includes the libraries used and shows how it was connected to Wifi and to MQTT for data transmission.
  
 <file c++ Automatic watering system.ino> <file c++ Automatic watering system.ino>
Line 214: Line 216:
 </file> </file>
  
 +
 +The code below is about the measurement readings and MQTT publishing.
  
 <file c++ MQTT publishing.ino> <file c++ MQTT publishing.ino>
Line 264: Line 268:
 **Why the pump should be turned on when the soil moisture value is above 2800?** **Why the pump should be turned on when the soil moisture value is above 2800?**
  
-   * Dry in open air =  590-600 / 3500 +   * Dry in open air = 3500 
-   * Dry soil needing water > 380 / 2800 +   * Dry soil needing water 2800 - 3100
-   * Ideal soil moisture =  277 – 380+
    * Moisture in a just watered soil =  1800    * Moisture in a just watered soil =  1800
    * Moisture in a cup of water =  1640    * Moisture in a cup of water =  1640
Line 273: Line 276:
  
    * Value < 1500 implies that the soil is too wet.    * Value < 1500 implies that the soil is too wet.
-   * Soil moisture between 2700 – 3100 is the target range.+   * Soil moisture between 1900 – 2600 is the target range.
    * Soil moisture value >  3300 implies that the soil is dry enough and it should be watered.    * Soil moisture value >  3300 implies that the soil is dry enough and it should be watered.
  
Line 298: Line 301:
 === 4.1 Limitations & Improvements === === 4.1 Limitations & Improvements ===
 At first, we tried using the DHT 11 and DHT 22 sensors for the measurement of the two parameters namely temperature and humidity which unfortunately did not give us any results and it seemed to be unreliable. We then switched to the Grove Temperature & Humidity sensor (SHT31) which gave us accurate results for the measurement of these two parameters. At first, we tried using the DHT 11 and DHT 22 sensors for the measurement of the two parameters namely temperature and humidity which unfortunately did not give us any results and it seemed to be unreliable. We then switched to the Grove Temperature & Humidity sensor (SHT31) which gave us accurate results for the measurement of these two parameters.
-We also wanted to use the ultrasonic sensor to measure the water level but it required a voltage of 5V which is not supported by the ESP32 as it has a maximum of 3.3 V.+We also wanted to use the ultrasonic sensor to measure the water level but it required a voltage of 5V which is not supported by the ESP32 as it has a maximum of 3.3 V.  
 +In our project, we have a drip water system which waters one small pot at a time and the water tube has to be placed in each of the pots in order to water them. As an improvement for a better watering system, a sprinkler could be used instead to water the plants. 
  
 +To conclude, the aim of this project which was to develop an automated watering system for plants in indoor greenhouses was achieved, regardless of the limitations, using the code, materials and methods mentioned above.
 ===== 5.0 Video showing the project ===== ===== 5.0 Video showing the project =====
  
amc2021/groupg/start.1630929669.txt.gz · Last modified: 2023/01/05 14:38 (external edit)