36-Based on 51 single chip microcomputer soil moisture detection and automatic watering system

Specific realization function

The system is composed of STC89C52 single-chip microcomputer + ADC0832 + LCD1602 liquid crystal + yl-69 soil moisture sensor + 5V pumping motor + button + buzzer.

Specific functions:

1. The first line of the LCD displays the actual humidity, and the second line of the LCD displays the upper limit of humidity and the lower limit of humidity;

2. Key description: minus key, plus key, set key.

3. Humidity upper and lower limit alarm range can be set, with power-off save function, no need to reset after power-on.

4. When the humidity is lower than the lower limit, the pump is turned on for pumping and the sound and light alarms. When the humidity is higher than the upper limit, the pump is automatically closed to stop pumping.

design background

In the current technological development, people's living standards are also rushing towards a well-off society. Growing flowers at home has gradually become a realm of people's interest, and growing flowers can cultivate sentiment. Therefore, potted flowers and flower gardens are accepted by more and more people.

The growth of flowers needs water to nourish, therefore. The amount of watering becomes the key to success in growing flowers. The society is constantly progressing. Work, business trips, and travel have also become part of people's lives, which will result in people not having time to care for these flowers and plants. These factors are the key to the failure of growing flowers. Regarding this question, we can’t help thinking: “If someone can help us take care of the flowers, how good it would be, how good it would be to water us when we are busy!” We can think of this idea. This is the "automatic watering device", therefore, design an automatic watering device that can detect soil moisture and alarm, so that users can take care of the potted flowers even when they are busy.

hardware design

This design uses the STC89C52 single-chip microcomputer, which uses the flexible programming characteristics of the single-chip microcomputer to realize the sprinkler irrigation function that the design needs to achieve. An external input keyboard is used to set the control of the humidity value of the sprinkler in the peripheral circuit of the single chip microcomputer, and an external LCD1602 display is used to display the humidity.

software design

The flow chart of the main program flow is that after the hardware is initialized, the value is set, and then humidity samples are collected, and after the humidity samples are sent to the single-chip microcomputer, the single-chip system processes the humidity value and judges whether the humidity value is within the set value range, and if it is high If the humidity is lower than the humidity value, stop irrigation. If it is lower than the humidity value, return to humidity sampling and judge the humidity value again until the humidity value is reached.

Schematic diagram

The system schematic design adopts Altium Designer19, as shown in the figure.

program

This design uses KEIL5 software to realize the program design, as shown in the figure.

Simulation implementation

This design uses protues8.7 software to realize the simulation design, as shown in the figure.

All information

All materials include programs (notes), AD schematic diagrams, protues simulation, reference papers, program explanations, simulation explanations, simulation videos, schematic explanations, introduction to the use of materials, etc., the most complete in the entire network!

For information, please follow the WeChat public account "Electronic Engineer Growth Diary", and reply the key word: "Information"!

Guess you like

Origin blog.csdn.net/weixin_41017942/article/details/114893728