AT89C51 single chip computer power failure control system

Publisher:ArtisticSoulLatest update time:2011-03-23 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

There have been many studies on the detection and protection of power grid short circuit and line fault. The short circuit, overload and overvoltage protectors on the market have single functions. They are easy to damage, have no reminder function, and are not user-friendly. However, with the continuous improvement of people's living standards, the number of electrical equipment has also increased, resulting in blind electricity use. This poses a great safety hazard to people. Among them, there are three most harmful power failures: input voltage is too high, indoor line is seriously overloaded, and electrical appliances are short-circuited. The purpose of the single-chip microcomputer AT89C5l power failure control system designed in this article is to prevent the harm caused by these three failures.

2 Hardware Composition

The hardware of the single-chip power failure control system is composed of a step-down transformer, two phase-series induction coils, a step-up transformer, an electromagnetic switch, a 5V voltage-stabilized power supply, an overvoltage and overcurrent signal acquisition and comparison circuit, a programmable gate expansion chip 8255, a HD44780 character LCD display module, an ISD2650 voice chip, a speaker, capacitors and resistors, and other components. The system uses an 805l as the control chip. The basic circuit of the control and prompt system is shown in Figure 1.

Schematic diagram of single chip power failure control system

Figure 1 Schematic diagram of single-chip power failure control system

3 Working Principle

3.1 Obtaining Fault Detection Voltage

According to electromagnetic theory, an electromagnetic field is generated around a current-carrying wire. Two series-connected electromagnetic induction coils (rectangular in shape) are placed next to the power supply wire to obtain the signal voltage generated by the change in the wire current.

From the literature, the calculation formula for the induction coil voltage is:

official

Among them, μ0 is the vacuum magnetic permeability, W is the angular frequency of the alternating current, Im is the maximum rated current of the user bus (variable value), N is the total number of turns of the induction coil, l is the length of the induction coil, d is the distance between the induction coil and the conductor, and a is the width of the induction coil.

3.2 Working Principle of Overload Fault Protection Circuit

In order to improve the control effect and reduce the number of turns of the induction coil, the voltage is increased by using a step-up transformer T1 to increase the signal voltage. The ratio of the step-up transformer T1 is set to 10/1. When the electricity is overloaded, the current flowing through the household live wire increases greatly. According to the law of electromagnetic induction, the induced voltage at both ends of the induction coil increases greatly. By detecting this induced voltage, it can be determined whether there is an overload phenomenon at present. When the signal voltage reaches V (the secondary output of the step-up transformer is 1.5V), the alarm prompt is started. When the signal voltage exceeds 0.159V (the secondary output of the step-up transformer is 1.59V), it will immediately trip and alarm. In order to enable the control system to obtain the sampled voltage signal of overload control, the circuit shown in Figure 2 is used.

Overload fault signal voltage transmission principle network

Figure 2 Overload fault signal voltage transmission principle network

The integrated circuit TA7666 was originally a recording level LED display driver integrated circuit. It contains 5 voltage comparators inside. Pin 1 is the signal voltage input terminal, and pins 3, 4, 5, 6 and 7 are the signal voltage output terminals. The integrated circuit TA7666 is now used to obtain 5 different levels of signal voltage values. The reference voltage of the voltage comparator inside TA7666 is determined by the 8051 microcontroller chip according to the specifications of the user line, and is output to TA7666 through pin 8 (P17) of the microcontroller chip. When the voltage output by the step-up transformer exceeds 1.5V, the voltage greater than V is obtained after rectification. After the voltage is divided by R14 and R15, it still exceeds 1V. It is compared by the internal voltage comparator of TA7666. Pin 3 changes from high voltage to low level (low level is 0.3v), so the diode VD4 is turned on, and the voltage of about 2V obtained by the voltage division of R58 and R59 is added to the P22IO port of the 805l microcontroller. If the output voltage keeps getting higher, the 4, 5, 6, and 7 pins of TA7666 will change from high level to low level in turn. In this way, the IO 13 of the microcontroller: P22, P23, P24, P25, and P26 detect the low level input in turn, and the internal calculation of the 8051 microcontroller chip will identify the output of the overload signal from the P00~P07 pins, and input it into the 8255 expansion circuit from the DO~D07 pins, and then the 8255 will identify it internally, call out the overload character display signal from the memory, and output it from the PA0~PA7 pins of the 8255 to the 7~14 pins of the HD44780, and the HD44780 character display module will display the overload and unsafe text. At the same time, the PB0-PB7 pins of 8255 also output overload signals, which are input into ISD2560 through A0-A7 pins. ISD2560 calls out overload and unsafe voice signals from the memory and outputs them through pins 14 and 15 of ISD2560. Then, the speaker emits five consecutive "overload, unsafe" sounds.

When the overload exceeds the rated value by 5%, a safety prompt will be given, which is divided into five levels (each level difference is 10%), with the highest being 145%. When the overload is not too much, there are only voice and text prompts, but the power is not cut off. If the overload is very serious (such as 145%, the high level of the 7-pin of the integrated circuit TA7666 becomes a low level. The control pin of the 8051 microcontroller is at a high level, and VD2 is turned on to protect the instrument from damage. The IO port P26 pin of the chip in the circuit diagram obtains a low level input), it can be seen from the power protection circuit schematic diagram 3 that the input of the AND gate circuit U8 is low, and the output is also low, the control tube Q1 is turned on, and the electromagnetic switch trips due to current passing through.

Overpressure fault signal transmission principle diagram

Figure 3 Overpressure fault signal transmission principle diagram

When the load is short-circuited, the current in the wire suddenly rises greatly, and the induced voltage of the magnetic coil is also very high, which will burn the household power fault indicator. In order to prevent this from happening, the instrument is designed with two fuses, and the instrument is also designed with two overvoltage protection circuits. When a short-circuit fault occurs, the 7th pin of TA7666 is low level, and the control end of the protection diode is high level through the gate circuit. Then the diode is short-circuited and turned on, ensuring the safety of the instrument.

When the load is short-circuited, the current in the wire becomes very large, causing the induced voltage on the magnetic induction coil to rise very high. At this time, the voltage obtained by the magnetic induction coil is much greater than 0.15V. The 3, 4, 5, 6, and 7 pins of TA7666 simultaneously output low level. The control process is the same as above, and the electromagnetic switch immediately cuts off the power supply to ensure the safety of the user's electrical equipment. 3.3 Working principle of overvoltage protection circuit

If the ratio of step-down transformer T2 is 1/50, the voltage across the secondary winding of step-down transformer T2 is set to a safe value of Ur2=5.5 V. Therefore, the phase voltage of the input user cannot be greater than 265V. When the main line voltage is too high, the signal voltage obtained exceeds 5.5V. In this way, the voice prompt of the power failure of the chip application machine will not only prompt, but also cause the circuit to trip and cut off the power supply.

The minimum voltage for the safety warning is 250V. The overvoltage is divided into four levels, each with a difference of 5V, and the highest is 265V. When the voltage is below 265V, it is just a safety warning. There is no tripping and power off. Only when it is greater than or equal to 265V will it immediately trip and power off and lift the claw safely. The working principle is:

When the mains voltage is too high, the voltage output by transformer T2 exceeds 5V, and after rectification and filtering, it is added to TA7666. The output of pin 3 is high level. PC3 is input to 8255, and 8255 obtains the signal of the mains voltage being too high. The information of the voltage being too high originally stored is called out from the character memory. It is output from PA0 to PA7 to the HD44780 character LCD display module. Then, the HD44780 character LCD display module starts to display the sentence "the voltage is too high and it is unsafe". At the same time, 8255 also calls out the voice information of the mains voltage being too high from the memory. It is output from PB0.PB7 to the ISD2650 voice chip. At this time, the ISD2650 voice chip drives the speaker to emit 5 sentences of "the voltage is too high". "Unsafe" alarm sounds to remind users to pay attention to the safety of electricity use. But this is only a reminder, not to cut off the power. When the main voltage exceeds 270V, the secondary output of the transformer is 5.6V, and then the 5th pin of TA7666 changes from the original high level to a low level. At this time, in addition to the characters and voice prompts, the OR gate circuit also outputs a control signal to cut off the power supply, and the main current is cut off by the electromagnetic switch.

When the main line voltage changes from 220V to 380V, the 5V output of the transformer changes to 8.5V. TA7666's 3, 4, 5, 6, and 7 are all low level. The electromagnetic switch immediately cuts off the power supply to protect the electrical equipment. In addition, since the 7th foot of TA7666 is high level, the control foot of VD2 is high level, VD2 is turned on, and the instrument is protected from damage. C1 and C2 in the circuit diagram are large electrolytic capacitors, and their function is to keep the signal of instrument 7 for a certain period of time, that is, the delay effect, because Cl and C2 are charged with voltage after the main line is cut off.

4 Main Program Design

The main program design is shown in Figure 4.

Main program flow chart

Figure 4 Main program flow chart

5 Conclusion

According to the laboratory and dozens of households installed single-chip multifunctional power failure indicator test, the detection voltage of overvoltage, overload and short circuit faults is obtained through the induction coil and the transformer output voltage. The signal voltage is divided into 5 levels by the TA7666 voltage comparison integrated circuit, the voltage PID control is performed by the 8051 single-chip chip, the HD44780 character liquid product display module and the ISD2650 voice chip are used to give text and voice prompts for power failures, and can automatically trip in time, proving that the single-chip multifunctional power failure controller has stable, safe and reliable performance and is a desirable power protection indicator. It can be applied to various low-voltage power occasions.

Innovation of the paper: A multifunctional power fault controller is realized with 8051 single-chip microcomputer, which has character prompt and voice prompt functions, changing the shortcomings of the factory's current leakage protector and overload protector, which have single functions and no prompt when a fault occurs.

Reference address:AT89C51 single chip computer power failure control system

Previous article:Research on a new intelligent refrigerator thermostat
Next article:Design of multi-chip microcomputer DC power supply control board

Recommended ReadingLatest update time:2024-11-16 23:35

Analysis of the Problems of Implementing RTOS on MSP430 Microcontroller Chip Using uC/OS-II
As an important application of embedded information products, the use and design of single-chip microcomputers are facing new challenges. On the one hand, people have higher and higher requirements for embedded products, and stable, reliable, feature-rich, high-quality and low-cost information products will become p
[Microcontroller]
Analysis of the Problems of Implementing RTOS on MSP430 Microcontroller Chip Using uC/OS-II
Design of wireless charger based on MSP430 microcontroller
  At present, the charging of portable electronic devices such as mobile phones, MP3 and laptops mainly adopts the traditional charging method of connecting one end to the AC power supply and the other end to the portable electronic device rechargeable battery. This method has many disadvantages, such as frequent plug
[Microcontroller]
Design of wireless charger based on MSP430 microcontroller
STM32 and NRF24L01 realize wireless transmission
Since I was very new to writing, I put the h file and c file together. But when I added it to the project, I could use the wireless module. Although it is not standardized, it works fine. The microcontroller is STM32104VC, and the wireless module is NRF24L01 bought from Taobao. It is simple and practical, and the effe
[Microcontroller]
Application design of active RFID tag based on MSP430F2012 and nRF24L01
  This article introduces the design concept of active tags, and designs RFID tags based on the principles of low power consumption and high efficiency in response to the needs of RFID positioning in a small space in coal mines. The system uses a low-power combination of MSP430F2012 microcontroller and nRF24L01 radio c
[Microcontroller]
Application design of active RFID tag based on MSP430F2012 and nRF24L01
MSP430 Tutorial 11: MSP430 MCU Low Power Structure
After the basic functions of the system clock generator are established, the SCG1, SCG0, CPUOFF, and OSCOFF bits of the CPU status register SR are important low-power control bits. As long as any interrupt is responded to, the above control bits are pushed into the stack for storage, and the previous working mode can b
[Microcontroller]
NRF24L01 wireless module multi-machine communication MCU program host computer + slave computer
I recently took on a project that required each device to be able to be controlled by networking (not the Internet). nrf24l01 happens to have this function. But I have only done one-to-one communication before, and that was the kind that used routines. I thought that it should be possible to use two addresses and shar
[Microcontroller]
The two major series of microcontrollers are PK_MSP430 and AVR
  There are many types of microcontrollers, and many manufacturers have launched their own MCUs. Among the many brands of microcontrollers, I prefer the MSP430 and AVR series. The following is a PK analysis based on their respective characteristics and several aspects.   Since we are doing a PK, just like a sports c
[Microcontroller]
The two major series of microcontrollers are PK_MSP430 and AVR
MSP430 MCU key program
MSP 430 MCU key program #include msp430x14x.h   #include "key.h"  void Init_Port(void)  {      //Set all pins of P1 port to input mode during initialization      P1DIR = 0;        //Set all pins of P1 port as general I/O ports      P1SEL = 0;            //Set P1.4 P1.5 P1.6 P1.7 as output direction      P1DIR |= BIT4
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号