51 single-chip closed-loop PWM DC motor speed control system design
Hardware circuit DC motor closed-loop system using the speed control is in practice for many years, the complexity of the hardware components, adaptation, flexibility, lack of supervision. This article describes a closed-loop PWM DC motor control system speed, the use of low-cost 89C2051 chip microcomputer as the core to achieve closed loop control, and speed can be set to a digital display, easy to use. The motor speed using pulse width modulation, compared to control how fast the Thyristor with advanced technology, can reduce the strength of pollution. The system was used to speed up the treadmill condition, reliable, with favorable results. Figure 1 shows a diagram of this system the main PWM signal, closed loop control for your computer speed DC motor of several parts.
development board
The PWM signal generating circuit
PWM waveform output PWM microcontroller (such as the 80C198, etc.) produced by the program can also be used to achieve the PWM ASIC. Wave of the PWM frequency is too high, the DC motor drive
Power control requirements are too high, too low electromagnetic noise generated over. Practical application of the PWM frequency of 18 kHz wave about better. After complete analysis, the system uses two 4-digit and 12-bit comparator 4585 against the 4040-series form of the circuit produces a PWM signal. Two of the control group U3, U2 4040 count as a group, then the output Q2 ~ K9-hand, group B received a single-chip microcomputer port P1. Change the output port P1, the use amount of the PWM signal can produce changes in speed. 4040 account from the CLK input crystal oscillator output connected to the XTAL2 microcontroller 2051. When using a 18MHz crystal, ~ QO Q2 divided by 8, Q2 ~ Q9 frequencies 256, resulting waveform for the PWM frequency of 17.6kHz, connector and power switch on fieldwork reasonable.
4040-8 received per pulse, the output Q2 Q9 ~ 1, if the number is less than or equal to the value of the output port of the microcontroller X, P1, U2 (> B) to maintain production at a low number of large X, U2, (> B), output is high. As the count increases, Q2 Q9 ~ all "1" for all "O" in (> B), then output goes low, so that U2 (> B) side of the PWM signal duty cycle (255-X/255) × 100%, change the value of X can change the amount of use of the PWM signal, the continuous control of engine speed. Use this method to set the Chip output below the value of X, the PWM signal to the three multi-purpose digital circuits, software to make a very simplified, single-chip system favors the work. As a single chip power reset output port P1 to all "1", use the B-group, and 4585 connected to port P1 or port speed of the Directorate-General X of certain rules to reduce the production of more time for deceleration according to certain rules.
Figure 1 Closed-loop DC motor PWM speed control schematic
2 single-chip microcomputer closed-loop speed control
Back to the embedded system is used for low-cost microcontroller 89C2051, 80C552 and 80C198 and the PWM output is compared to the expansion of the external EPROM, and the price is much lower. 2051 micro-chip is a 2K Flash Program Memory, 15 I / O ports, two 16-bit timer / counter, instruction, and interrupt system is compatible with 8031, the speed control loop is closed very flexible.
Closed speed control sensor Hall effect sensor selection, a small magnet attached to the shaft under test pulse for each revolution of the output signal. Speed pulse signal through a Schmitt trigger U6 1, U6-2 Reconstructive Surgery, 2051 MCU in the interrupt input port port P3.2. The software, which was abandoned in the interrupt service routine is a timer / counter synchronization S in terms of revolutions per cycle is controlled by the software to calculate the value of X, P1 to the PWM output port number of service cycle control. The software can also display the track or the angular velocity of the conversion calculation, eight-yard drive LED digital tube display. As the key cruise S1, S2 input, "+" "-" control, but also pre-qualified LED digital display.
It uses a series of highly integrated MAX7219 LED display driver for driving eight LED digital tube, the first four shows of the current speed, constant speed after the show.MAX7219 is a 24-pin narrow package of the chip, the serial port for a maximum operating frequency of 10MHz, eight LED display, via the disassemble mode register programming, you can control the display (BCD code or decoding) display of on-chip scan mode dynamic resistance and can be programmed to control the brightness and shows up more than 64-bit chips in series by a common cathode LED digital tube. MAX7219 DIN input data, a clock terminal CLK, a data latch half liter, respectively, and the 2051 microcontroller P3.0, P3.1, P3.5 phase ports. The adjustable resistor R6 resistance to change screen brightness, R6 values between 3.9 ~ 10kQ. Using the MAX7219 not only reduces the system hardware, such as on-chip dynamic display, scan, and can reduce energy consumption and simplify software design.
2051 single-chip microcomputer is reset by the function of password * MAX812 voltage equipment, power of about 200 ms of delay, so the normal reset. To avoid loss stop after the preset number to use a battery backup to protect the value of the 2051 MCU on-chip RAM. To repair the transformer, through the AC-DC switching power supply output 5V DC supply voltage of the microcontroller system throughout the three-terminal regulator component 7812 to the output voltage of 12V to drive the switch power to use them. Power single-chip and the drive circuit of isolation, to improve system reliability and security.
DC motor drive circuit 3
DC motor system in Figure 2
没有评论:
发表评论