38- Simple fan control based on 51 single chip microcomputer

Specific realization function

The system consists of STC89C52 single-chip microcomputer + single digital tube + LED indicator light + LM298N chip chip + DC motor.

Specific functions:

(1) Simulate the rotation and shaking of the fan;

(2) Realize the key setting of 1 strong wind, 2 strokes, and 3 weak winds, and display them with a digital tube;

(3) Realize button control to shake head and stop shaking head.

design background

The design is based on DC motor control, based on sensor technology, and single-chip control technology as the core to realize the intelligent control of electric fans. At the same time, the design adopts a touch switch to have the function of adjusting the electric fan. Use the integrated circuit LM298N to complete the drive design of the electric fan. Through the timer 0 and timer 1 of the microcontroller STC89C52 to generate PWM waveforms with different duty cycles to control the electric fan motor drive chip to change the input current of the electric fan motor, and finally realize the electric fan motor The speed adjustment function makes the design more humane, more environmentally friendly and energy-saving.

hardware design

This design is based on the STC89C52 processor as the core, and the microcontroller is used as the peripheral detection and control circuit to design and implement a smart home system. Among them, the single-chip microcomputer system detects relevant information through sensors, sends corresponding information to the embedded platform, and the embedded platform makes corresponding judgments and processing, and at the same time informs the owner and property management personnel to make corresponding processing through the network to ensure the owner's property Personal safety.

The main design indicators of this design:

(1) Button input module, 4 buttons to adjust "sleep wind", "natural wind", "normal wind", "no wind" 2 buttons respectively control "shaking" and "timing";

(2) DC motor speed control, driven by LM298N chip;

(3) The current speed is displayed, the current motor temperature is displayed, and the status is displayed on the LCD.

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