26-Simple temperature control fan based on single chip microcomputer

 

Specific realization function

 

The system consists of STC89C51 single-chip microcomputer + LCD1602 liquid crystal display + L298N control module + DC motor + DS18B20 temperature sensor.

Specific functions:

(1) LCD1602 displays the temperature value measured by DS18B20 in real time;

(2) The fan stops rotating when there is no one;

(3) In the presence of people, the temperature can adjust the fan speed. The lower the temperature, the slower the fan speed; the higher the temperature, the faster the fan speed.

 

design background

In recent years, with the rapid development of the air-conditioning industry, the electric fan industry has been hit to a certain extent. However, household electric fans have not faded out of the market with the popularity of air conditioners. Instead, market sales have recovered in the past two years. Compared with the air conditioner, on the one hand, the air conditioner has a powerful cooling function, which can quickly and effectively reduce the ambient temperature, but the wind of the electric fan is gentler, which is more suitable for the elderly, children and people with weaker physique. On the other hand, electric fans have a price advantage, are cheap and relatively energy-saving, and are very simple to install and use.

However, traditional electric fans are mostly controlled by mechanical means, with few functions, high noise, and large wind speed changes in each gear. With the development of science and technology and the improvement of people's living standards, household appliances products tend to be automated, intelligent, environmentally friendly and humanized, making the appearance of smart electric fans controlled by microcomputers.

In life, we often use some temperature-related equipment. For example, although many urban households now use air conditioners, electric fans are still used as cooling and heatstroke prevention equipment in rural areas, which account for most of China’s population. During the spring and summer (summer and autumn) seasons, the daytime temperature is still high, so the electric fans should be high. The rotation speed and large air volume make people feel cool; at night, the temperature drops. When people fall asleep, the rotation speed should be gradually reduced to prevent people from catching a cold. Although electric fans have the function of adjusting different gear positions, they must be manually shifted, which cannot meet the automatic switching of the fan speed due to temperature changes.

To solve the above problems, we designed a temperature-controlled automatic fan system based on a single-chip microcomputer. This system uses a high-precision integrated temperature sensor, controlled by a single-chip microcomputer, can display real-time temperature, and adjust the rotation of the fan according to the temperature, control the size of the wind, and enhance the intelligence and humanization of the fan.

hardware design

The figure shows the hardware design of this system. Specifically, the hardware circuit is composed of the following modules:

(1) The smallest single-chip microcomputer system. It is used to drive and control other modules to realize the overall function. It uses AT89C51 single-chip microcomputer as the core chip, supplemented by reset circuit and crystal oscillator circuit.

(2) Button module. Consists of a button, because it realizes the switch of manned/unmanned state;

(3) Display module. Display the real-time temperature value measured by DS18B20 through LCD1602 liquid crystal display;

(4) Fan motor and its drive module.

software design

According to the design requirements of this article, on the basis of hardware circuit design, specific functions that need to be realized through software programming:

(1) Drive each module to work and realize the clear display of LCD1602;

(2) Button setting function. Realize the switch of manned/unmanned mode;

(3) Realization of temperature detection function. Realize real-time detection and display of ambient temperature;

(4) Drive and control of fan motor. Realize the fan motor speed control based on the temperature.


The specific design process is shown in the figure.

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/114457933