DIY Remote Watering System with ESP32 and Voice Synthesis

DIY Remote Watering System with ESP32 and Voice Synthesis

Video

Previously, I made a dual-axis servo gimbal with two servos, which can be adjusted remotely via a mobile phone. Now, I am adding two more functions to create a remote watering system. The voice synthesis chip allows it to speak. By sending text on a webpage, the voice synthesis chip receives the text and synthesizes it into a voice signal sent to a speaker, which then outputs the voice. To achieve remote watering of plants via a mobile phone, I use a microcontroller’s IO port to send a digital signal to a relay, which controls the on and off of the water pump.

DIY Remote Watering System with ESP32 and Voice Synthesis

The casing of the watering machine is made using 3D printing. To encapsulate all the chips, wires, speakers, etc., I designed a 3D model of the box and printed it with a 3D printer. The top of the box features a dual-axis servo gimbal that can rotate up and down or left and right to change the field of view.

DIY Remote Watering System with ESP32 and Voice Synthesis

When the water pump is powered, it can draw water from the tank and deliver it through pipes to water the plants. You can set the watering duration, for example, I set it to ten seconds. It can also be scheduled for regular watering. The camera data is transmitted to the backend via the ESP32, allowing real-time monitoring of the plants’ growth through a mobile phone. You can also send text for it to speak. There is a mini-program version and a web version for front-end access to experience the remote control effect. Webpage:http://www.fzlct.top/wlw/MO/dou2.php, Mini-program

Next, let’s take a look at the code for the ESP32 to implement remote watering.

When the command to water for 10 seconds is received, the SerialPort.println function sends the text “Start Watering” to the voice synthesis chip from the ESP32. The SerialPort is a serial port I defined myself, as the ESP32 has three serial ports, and the default Serial port is used for programming, so another port is needed for communication with the voice synthesis chip. The GB.get function converts Unicode characters to GBK characters, which is the character encoding supported by the voice synthesis chip. pinMode(14,OUTPUT) sets the IO port 14 to output mode, digitalWrite(14, HIGH); outputs a high level from IO port 14 to trigger the relay, activating the water pump. delay(10000); delays for ten seconds, allowing watering for 10 seconds. digitalWrite(14, LOW); outputs a low level from IO port 14 to stop the water pump.

Previous Recommendations

:DC Permanent Magnet Motor + Voltage Regulator Module + Inverter, DIY Low-Power Hydropower Generator

STC15 + ESP32 + 86 Stepper Motor: Making a Boxing Training Robot

ESP32-CAM + JQ8900 Making a Cat Teaser Robot, Producing Cute Cat Sounds

DIY Remote Watering System with ESP32 and Voice Synthesis
Waste Mainstream Culture Exchange Platform:
http://www.fzlct.top

Leave a Comment