- Home >> Technical Service >> MCU
Intelligent watering system design
Design of intelligent watering system based on single chip computer
Nowadays, the concept of high-quality life has penetrated into all aspects of life, so whether it is at home or in work and study places, you will see some potted plants, which can not only improve air quality, but also improve the taste of life. However, due to the busy work in life, the flowers and plants will dry up and die if they are not watered in time, which will bring economic losses and spiritual unhappiness.
Existing intelligent flower watering products have high cost, poor practicability and low sales volume. This work starts from the perspective of smart home, based on the AT89C51 chip, using some simple components such as triodes, relays, and humidity sensors, to design this smart watering system. It is simple and reasonable, low in cost, high in practicability, and low in power consumption. It can work for a long time and has a good application prospect.
1. The composition and working principle of the intelligent watering system
The intelligent watering system for detecting soil moisture mainly includes a main control module, a sensing module, a power supply module, an input module, a pumping action module and a display module.
The main control module takes the AT89C51 chip as the core, and cooperates with the reset circuit and the clock circuit to form the minimum single-chip system; the sensing module is mainly composed of a soil moisture sensor, which can monitor the soil moisture in real time and has high accuracy; the power module is through The 5V power supply interface realizes the power supply to the system; the display module displays the soil humidity and the current mode through the LCD1602 liquid crystal screen, and the input module uses key input to realize the selection of automatic watering and manual watering modes and the setting of the upper and lower thresholds of humidity; the action module is controlled by pumping water Composed of motor and active buzzer. The system can detect soil humidity in real time, and has two modes to choose from—manual mode and automatic mode. In manual mode, artificial watering can be realized through buttons; When the water pumping motor does not operate, the buzzer will not alarm. When it is lower than the set lower limit, the buzzer will alarm. At the same time, the pumping motor will pump water for irrigation until the humidity reaches the set upper limit. The system will automatically stop the irrigation function, and at the same time The buzzer alarm is released.
2. Hardware design of intelligent watering system
(1) Single-chip microcomputer control module: AT89C51 is a low-voltage, high-performance CMOS 8-bit single-chip microcomputer produced by Atmel. At the same time, AT89C51 has a cheap price, and it has good compatibility with MCS-51 series. Therefore, AT89C51 is used as the control chip in this system. The main performance parameters of AT89S51 are completely compatible with MCS-51 series.
(2) Soil moisture sensor module: This work uses the YL-69 humidity sensor module. YL-69 is a simple soil moisture sensor. Its principle is a humidity-sensitive capacitor. When the humidity of the environment changes, the medium in the environment where the humidity-sensitive capacitor exists will change, resulting in a change in the capacitance value in the humidity-sensitive capacitor. , the capacitance value is proportional to the humidity value. Since the humidity sensitive capacitor has the characteristics of high sensitivity, fast response, and small hysteresis, the humidity sensitive capacitor is easy to miniaturize and integrate. In the system, the collection of soil moisture data is completed by YL-69.
(3) Key input module: S1 bit reset key, S2 bit set humidity value key, S3 humidity value adjustment plus key, S4 humidity value adjustment minus key.
(4) Liquid crystal LCD1620 display module: The display of liquid crystal display LCD1602 is realized through the principle of the physical characteristics of liquid crystal, and the use of voltage can control the display area. When there is electricity, the liquid crystal can display images.
3. Software Design of Intelligent Watering System
The software part is mainly based on the system design idea, clarifying the operation logic, and using keil for programming. The system software design includes soil moisture detection program, program for analog-to-digital conversion of collected data, program for setting upper and lower limits of humidity, display program, buzzer program, etc.
The idea of the whole program of the soil moisture detection device is: the soil moisture sensor collects the signal, performs analog-to-digital conversion, the single-chip microcomputer reads the value of the humidity, after processing, and then sends the humidity value to the liquid crystal display for display, when the value is less than the minimum value When the value is greater than the minimum value, the pump is turned on and the water pump is turned off.
On the basis of this system, functions such as temperature control, light control, remote control watering, and wireless control can also be added to further maintain plants, which can be used for subsequent expansion research.
4. Test of intelligent flower watering system
(1) Test conditions:
Under indoor room temperature conditions, power on the system, set the appropriate upper and lower thresholds for soil moisture, and place the soil moisture sensor in the soil of potted plants. At this time, observe the current value of soil moisture on the LCD display. The setting mode is manual mode, press the button, the motor pumps water, after pumping for a period of time, press the button to stop pumping, and realize the manual start and stop function. The setting mode is automatic mode, three situations. If the current soil humidity is within the set upper and lower limits, the pumping motor and buzzer will not act; if it is lower than the set lower limit, the buzzer will alarm, and the pumping motor will pump water until the soil humidity reaches the set upper limit; if the current If the soil humidity is higher than the set upper limit, the buzzer will alarm.
(2) Test results:
Set the upper limit threshold to 60% and the lower limit threshold to 30% to test the response of the system under different soil moisture conditions.
After multiple tests in manual mode and automatic mode, the system has zero error in action, which proves that the system can work normally, and has high reliability and strong practicability.
The above is the design technology of the intelligent watering system based on the single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
- TOP