- Knowledge of embedded systems and microcontroller programming.
- Familiarity with C for STM32 and ESP32.
- Understanding of UART communication.
- Understanding of ADC.
The purpose of AquaRegulate is to efficiently water plants or crops without the need for manual intervention. The system can deliver precise amounts of water, reducing wastage and conserving this valuable resource, promote healthy plant growth and development, it saves time for gardeners and farmers, allowing them to focus on other tasks while ensuring plants receive the necessary hydration. By monitoring soil moisture levels and adjusting watering accordingly, the system helps prevent both underwatering, which can stress or kill plants. Finally, the system can result in long-term savings by optimizing water usage and potentially increasing crop yields.
- Soil moisture sensors to measure the moisture level in the soil.
- Controlling solenoid valves to regulate the water flow to the plants based on the moisture sensor values.
- When the soil moisture is above a certain threshold, the system opens the solenoid valves to water the plants.
- Once the moisture level reaches the desired level, the system closes the solenoid valves to stop watering.
- The system continuously monitors the soil moisture level and adjusts the watering accordingly to maintain optimal hydration for the plants.
STM32 Microcontroller with ADC
- By utilizing DMA for ADC to handle the data, the STM32 microcontrollers acquire ADC samples, making well-suited for the application which gives us high-speed and continuous data acquisition.
- The ADC converts analog signals from the soil moisture sensor into digital signals that are processed by the microcontroller.
Transmitting Data to ESP32
- The STM32 microcontroller sends the digital sensor data to the ESP32 microcontroller. This data transmission occurs through UART the communication protocol.
- The ESP32 microcontroller engages in logic processing to determine the appropriate actions for irrigation control.
Logic Processing
- The ESP32 microcontroller performs the logic logarithm to determine the appropriate action, deciding whether watering is needed based on the received sensor readings.
Relay Driver
- The schematic shows a setup where an ESP32 microcontroller is set up to operate five relay (RZ03-1C4-D012) modules allowing for the control of electrical appliances.
- Each relay is controlled by a TIP120 Darlington transistor acting as a switch, which is managed by the ESP32 using its GPIO pins.
- The relay circuits include 1N4001 diodes to prevent voltage spikes, from loads and LEDs that light up to show relays.
- The relay coils receive power from a shared +12V line while the ESP32 itself is powered by a +3.3V source.
- This configuration enables the ESP32s signals to handle power circuits effectively making it an efficient solution, for automating or remotely controlling multiple devices at once.
Solenoid Activation
- When the relays are activated, they energize the solenoids, allowing water to flow through the irrigation pipes and reach the plants.
Add a file structure here with the basic details about files, below is an example.
.
├── Core
│ ├── Inc
│ │ ├── main.h
│ │ ├── stm32f0xx_hal_conf.h
│ │ └── stm32f0xx_it.h
│ └── Src
│ ├── main.c
│ ├── stm32f0xx_hal_msp.c
│ ├── stm32f0xx_it.c
│ └── system_stm32f0xx.c
├── Drivers
├── Images
│ └── logo.jpeg
├── MDK-ARM
└── Relay
└── main
├── main.c
├── CMakeLists.txt
├── influxDB.c
├── relay_logic.c
├── relay_logic.h
├── sensorsData.h
├── time.c
├── uart.c
├── wifi_cred.h
└── wifi.c
- Jeniffer Limondo: u1063824@umail.utah.edu
- Khoi Nguyen: khoi.nguyen@utah.edu
- Seoin Kim: seoin.kim@utah.edu