1 System Structure
This system has been put into use in the beacon station room of the Civil Aviation Shantou Air Traffic Control Station. The basic structure of the design is briefly described below.
The hardware part of the system is mainly composed of detection hardware circuits, AT89C51 microcontrollers and their related components and PCs. The software part is the keyboard encoding of power-off signals, the improvement of keyboard scanning algorithms and the design of PC monitoring software. The specific implementation is to send a power-off signal to the microcontroller through the detection circuit. The microcontroller obtains the keyboard code corresponding to the power-off circuit through the keyboard scanning algorithm. The PC monitoring software sends different key codes to the microcontroller through serial port communication for related alarm processing, as shown in Figure 1.
In the beacon station room, there are three power supply lines: mains input 1, mains input 2, and diesel generator input. Under normal circumstances, the two mains are in standby mode, and the diesel generator is on standby and does not generate electricity (when both mains are off, the diesel generator starts to generate electricity in an emergency). Therefore, there are four power supply states:
(1) Normal situation, two mains are in power supply and the diesel generator is on standby;
(2) Only one mains is in power supply and the other one fails, so the diesel generator is on standby;
(3) Both mains fail and the diesel generator starts to generate electricity;
(4) Both mains fail and the diesel generator does not start.
For the above four states, state A can be set as the initial state of the monitoring system, and the remaining four power-off states (state B has two cases). The keyboard is coded separately so that each power-off state has a unique key code corresponding to it. The circuit design uses a 2×4 keyboard, and the hardware circuit is shown in Figure 2. Through key code recognition, the monitoring software on the PC can judge the power-off line in real time and issue an alarm.
2 System Design
2.1 Hardware Design
As shown in Figure 2, the circuit uses a photocoupler for strong electrical isolation to play a role in lightning protection, and converts analog signals into digital signals to achieve A/D conversion. The input 220 V AC is rectified by the rectifier diode D1 and filtered by the capacitor C1 to form DC.
The current is divided into two paths, one of which passes through the current limiting resistor R1 to make the indicator LED light up; the other path is sent to the photocoupler 4N25 after current limiting by R2, lighting up the internal light-emitting diode, turning on the photosensitive transistor, and obtaining a high level at the 4th pin of the photocoupler. When the input 220 V AC power is cut off, the voltage at the input end of the photocoupler disappears, the light-emitting diode goes out, the phototransistor is cut off, and the 4th foot gets a low level. After being processed by the relevant logic circuit, the control relay is energized (the relay replaces the keyboard button). Thus, the power-off signal is simulated into the state of the keyboard being pressed, which is convenient for the next step of processing.
2.2 Improved keyboard scanning algorithm
of single-chip microcomputer For the case of multiple power supplies, the line power-off signal can be keyboard-encoded to make it possible to identify multiple power-offs. Due to the circuit's requirements for alarm real-time and accuracy, an improved keyboard scanning algorithm is adopted. Experiments have shown that the algorithm has a good effect in the application of the system. Real-time detection of power-off signals is an important indicator of system accuracy. Since the traditional keyboard scanning algorithm will shield the interrupt while the jitter algorithm is called, it is necessary to improve the keyboard scanning algorithm.
The algorithm improvement is mainly divided into three steps: First, set the interrupt variable in the interrupt running program and record the number of runs. Determine whether the number of interrupt executions meets the delay time, and then determine whether the keyboard is pressed (that is, whether the power-off signal is true). Secondly, each call to the keyboard scanning analysis program requires 10 ms synchronization. When the key is detected for the first time, only a flag is set. When the key is detected for the second time (10 ms apart from the first key), key analysis is performed to achieve alarm accuracy and improve the real-time performance of the system. Finally, the system encodes the signal according to different states. The three-way circuit is encoded into four unified and independent key codes due to four different states, which reduces the complexity of key code analysis and improves the real-time performance of the system.
2.3 Design of monitoring software based on VC++6.0
The monitoring software is designed on the VC++6.0 platform. The software mainly consists of three parts: system settings, operating status and status display. The interface is simple and convenient for monitoring. The system sets the function of resetting the system status display, selecting the communication serial port and the communication test.
The communication test is mainly used for daily maintenance. For this system, the communication link between the microcontroller and the PC is crucial. The communication test of daily maintenance can reduce the risk of the system going offline without alarm. In the operating status module, the monitoring software provides two-way mains operation report and oil engine status report, as shown in Figure 3.
The status display can intelligently show the power-off lines, realizing unmanned on-site supervision and remote monitoring, as shown in Figure 4.
3 Conclusion
This paper proposes a design of a multi-channel power failure alarm system based on an improved keyboard scanning algorithm. The simplicity and feasibility of the keyboard scanning algorithm are used to perform keyboard encoding on the multi-channel power failure line signals. The terminal monitoring alarm software identifies the corresponding keyboard code of the power failure signal and issues an alarm on the power failure line. This system simplifies the general power failure alarm system. In practical applications, the system is simple to implement, the power failure time is at the μs level, and the alarm is accurate. It has been put into practical use.
Previous article:Design of a missile-borne secondary power supply
Next article:Practical Design of Single-Supply Snubber Circuits
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- FPGA Entry Series Digital Tube
- Analog Dialogue Volume 55 Issue 3 is now online! Come and get your source of inspiration~
- 51 delay problem
- Get a gift for your evaluation! Hands-on experience: Recruiting TI millimeter-wave radar testers from all over the Internet
- How does Allegro's built-in package library identify which type of device it belongs to?
- STM8 Little Frog: Return to the Arena
- What are some good ways to transform various periodic waveforms into square waves that can be recognized by microcontrollers?
- General Design Considerations for Embedded Systems
- CH340 circuit improves working stability and anti-interference
- Schematic diagram of numworks