In recent years, various low-power single-chip microcomputers have been widely used in various instruments, especially the 89C51/2 single-chip microcomputer with its excellent performance, low price, standard power-reducing characteristics and fast rewritable on-chip memory. Sex, etc. have won the majority of users. However, various test instruments are often required to be easily carried and used, so special batteries are often used for the power supply of the instrument.

Author: Jin Ping

In recent years, various low-power single-chip microcomputers have been widely used in various instruments, especially the 89C51/2 single-chip microcomputer with its excellent performance, low price, standard power-reducing characteristics and fast rewritable on-chip memory. Sex, etc. have won the majority of users. However, various test instruments are often required to be easily carried and used, so special batteries are often used for the power supply of the instrument. Generally, the voltage of the dedicated battery is 12V (or 12V connected in series), and the power supply voltage Vcc of the application system composed of 89C51/2 single-chip microcomputer is required to be within the range of 5×(1±0.1)V. Some instruments are often used in harsh environments and interference factors. more. Therefore, to make the single-chip microcomputer system work reliably, a power supply circuit with strong anti-interference ability is very important.

1 Design and analysis of anti-interference power supply circuit

The anti-interference power supply circuit consists of two parts, as shown in Figure 1. A DC step-down circuit is formed with MAX638 as the center, and the 12V DC voltage is required to be changed to 5V; the anti-jamming circuit is formed with TL7705AC as the center, and it is required that when the power supply has transient under-voltage, instantaneous pulse interference and power failure, the single-chip microcomputer enters the power outage. Operates in power mode.

Design of Power Supply Anti-jamming Circuit Based on 89C51/2 MCU and MAX638 Chip
Figure 1 Schematic diagram of anti-interference power supply circuit

1. 1 DC step-down circuit

MAX638 is a step-down product in the MAX series of monolithic switching DC-DC voltage conversion circuits produced by MAXIM Company in the United States. Its operating current is only 0.135mA, its output voltage is 5V, and the input voltage can be 5 V ~ 16 .5V. Since the MAX638 contains a MOS field effect Transistor with a peak switching current of 375mA, a +1.31V reference voltage source, a 65kHz self-excited oscillator and an error comparator, it is only necessary to connect an external energy storage Inductor L (this The system selects 220μH) and the output capacitor C (this system selects 100μF) and the freewheeling diode to form a step-down DC power converter.

MAX638 also has a low power supply voltage detection circuit, which provides a detection voltage after dividing the input power supply through resistors R1 and R2. When the input voltage is as low as Vmin, the second pin of MAX638 outputs a low-level undervoltage alarm signal. Change the resistance of R1 to change the size of Vmin. Due to the wide range of acceptable input voltage, when the input voltage is not lower than 5V caused by interference, the single-chip microcomputer application system can still work normally.

1. 2 Anti-interference circuit

The 89C51/2 microcontroller has two power-saving operation modes: standby operation mode and power-down operation mode. When the 89C51/2 microcontroller enters the power-down mode, the on-chip oscillator stops working, various activities stop immediately, and only the on-chip RAM keeps the original data. Using this feature, it is convenient to realize the anti-interference of the power supply. As shown in Figure 1, diodes D2, D3 and battery B realize the switching of the backup power supply when the main power supply is powered down. When the main power is normal, D2 is turned on, D3 is turned off, and Vout is powered through D2; when the main power is turned off, D3 is turned on, D2 is turned off, and the microcontroller is powered by battery B through D3. TL7705AC is a voltage monitor, and its detection standard value is 4.55V. When the main power supply drops to 4.55V for some reason, the 5th pin of TL7705AC outputs a low level and requests an interrupt to the microcontroller. The interrupt service routine can make the microcontroller enter the shutdown. Operates in power mode. In order to ensure that the single-chip microcomputer has enough time to deal with the power supply interference, the detection voltage of TL7705AC should be slightly greater than 4.55 V. For this reason, a 1.5 kΩ potentiometer P can be connected in series between the voltage detection terminal of TL7705AC and the main power supply. The length of the service program determines the appropriate resistance value, and the corresponding detection voltage can be obtained. TL7705AC has high detection sensitivity and can detect abnormal voltage drop of main power supply within 500ns, so it can also capture microsecond-level interference pulse or undervoltage, which can fully meet the requirements of anti-interference power supply of single-chip microcomputer.

2 Handling of power disturbances

Power supply interference can easily cause confusion in the single-chip microcomputer system. Therefore, when power supply interference occurs, the best solution is to respond to the interrupt request and make the computer system run in the power-down mode. After the interference is eliminated, restore the scene and switch to the normal mode. run under. There are the following solutions to exit the power-down mode, namely hardware reset or power-on reset or manual reset. In Figure 1, the reset circuit consists of R3, R4, C2 and the button Ks. The specific solution steps are shown in Fig. 2 and Fig. 3, Fig. 2 is the processing flow chart of the potential interference, and Fig. 3 is the reset program block diagram.

Design of Power Supply Anti-jamming Circuit Based on 89C51/2 MCU and MAX638 Chip
Figure 2 Handling of power disturbances

Design of Power Supply Anti-jamming Circuit Based on 89C51/2 MCU and MAX638 Chip
Figure 3 Reset program block diagram

3 Conclusion

The power supply is designed by the author for students’ field practice in the practical teaching link. Repeated experiments show that the power supply meets the ideal design requirements and has the following characteristics:

(1) Reliable work, small size, simple structure, stable output voltage (accuracy up to ±0.001V), and high conversion efficiency.

(2) The anti-interference ability is strong, which can effectively suppress the small transient undervoltage and transient pulse interference; for the larger interference, the single-chip microcomputer can be run in the power-down mode.

(3) It has certain versatility. Since 87C51, 80C51 and 89C51/2 have similar performance, this power supply can also be suitable for low-power single-chip microcomputers such as 87C51 and 80C51.

The Links:   NL6448BC26-26 G185XW01 V2 LCD-DISPLAY