Design of Power Management System Based on AVR

Publisher:meilidaowlLatest update time:2012-04-07 Source: 计算机测量与控制Keywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

Nowadays, due to its wide application in many fields such as civil and national defense, aerial robot technology has been increasingly valued by people and has attracted the attention of experts and scholars from various countries. The small rotor robot is based on a model helicopter and is equipped with a sensor unit, a control unit, a servo mechanism and other devices to achieve autonomous flight. In order to improve the safety of the aircraft, it is necessary to design a set of equipment monitoring system to monitor the aircraft's attitude information, the status of the onboard equipment and the power supply in real time.

The power source used by the platform is a battery pack composed of two lithium batteries connected in series. Using the charging and discharging characteristics of lithium-ion batteries, a charging and discharging management system with mega16l as the core is designed. Lithium batteries have the advantages of small size, high energy density, no memory effect, long cycle life, high voltage battery and low self-discharge rate. Unlike nickel-cadmium batteries and nickel-metal hydride batteries, the safety during charging and discharging must be considered to prevent the degradation of characteristics. Therefore, in order to protect the safety of lithium batteries during system operation, a set of undervoltage protection circuits are designed to prevent the battery characteristics and durability characteristics from deteriorating due to overuse of the power management system.

1 Overall Framework of Power Management System

The UAV power management system is an important part of the aircraft's autonomous flight. Its general framework is shown in Figure 1. In this system, the 2212/34 model generator produced by AXI is used to convert kinetic energy into 220V AC power, which is then rectified and stabilized to output 11.6V DC voltage, which can be used to charge two lithium batteries. The controller of the power management system is a meg a161 microcontroller, which manages the battery charge and discharge by detecting the voltage of the two lithium batteries and controlling the relay switch.

Figure 1 Power management system framework

After the controller collects information from the power system, it transmits the data to the ground in real time through wireless transmission equipment. The ground monitoring platform can also send some instructions to the mega16l to control the battery charging and discharging by controlling the relay switch, thereby achieving the purpose of monitoring and controlling the aircraft.

The onboard power module is composed of two lithium batteries produced by Interman Battery Co., Ltd. When the battery pack is fully charged, the voltage is 8.4V. The charge of the battery is closely related to the reliability of the entire power supply system. The more remaining battery power, the higher the reliability of the system. Therefore, the remaining battery power can be obtained in real time during flight, which will greatly improve the reliability of the aircraft.

2 Implementation of Power Monitoring System

Adequate power supply is essential for a helicopter to successfully complete its flight mission.

According to the characteristics of lithium batteries, in the case of over-discharge, the electrolyte decomposes, causing the battery characteristics to deteriorate and the number of charging times to decrease. Therefore, in order to protect the safety of the battery, the power system must pass through the undervoltage protection module and the voltage regulator module before supplying power to the control system. In order to predict the remaining power in the power system, the method of detecting the power system voltage is used here. After measuring the power supply voltage of the system, the database established by the discharge curve is searched to estimate the remaining power in the power system. [page]

The power supply voltage required by the microcontroller is 2.7 ~ 5.5V, so the external reference voltage for mega16l can be designed to be 2.5V. The reference voltage regulator circuit is shown in Figure 2. Therefore, if the system needs to detect the battery voltage, the battery needs to be divided by resistors and the maximum divided voltage value cannot exceed 2.5V. After the voltage value measured by the controller is multiplied by the voltage divider, the real-time voltage in the power system can be obtained. Constantly monitoring the power consumption of lithium batteries and preventing battery overuse can achieve the purpose of effectively using battery capacity and extending battery life.

Figure 2 Reference voltage circuit

2.1 Hardware Design

2.1.1 Brushless DC Motor Circuit

The brushless DC motor is composed of a motor body and a driver, and is a typical mechatronics product. The brushless DC motor has the same working principle and application characteristics as the general DC motor, but its composition is different. In addition to the motor itself, the former also has a commutation circuit. The motor itself of the brushless DC motor is the electromechanical energy conversion part. In addition to the motor armature and permanent magnet excitation, it also has a sensor. The partial AC-DC circuit of the generator is shown in Figure 3.

Figure 3 Brushless motor AC-DC circuit

2.1.2 Charging Circuit

The charging characteristics of lithium-ion batteries are different from those of nickel-cadmium and nickel-metal hydride batteries. When charging lithium-ion batteries, the battery voltage rises slowly and the charging current gradually decreases. When the voltage reaches about 4.2V, the voltage remains basically unchanged and the charging current continues to decrease. Therefore, for the modified charger, the constant current charging method can be used first and then the constant voltage charging method. The specific charging circuit is shown in Figure 4. This circuit uses LM2575ADJ to form a chopper switching regulator with a maximum charging current of 1A.

Figure 4 Partial circuit of a high-efficiency switching constant current/constant voltage charger

The working principle of this circuit is as follows: When the battery is connected to the charger, the circuit outputs a constant current to charge the battery. The constant current control part of the charger consists of half of the dual op amp LM358, gain setting resistors R3 and R4, current sampling resistor R5 and 1.23V feedback reference voltage source. Just after the battery is connected, the op amp LM358 outputs a low level, the switching regulator LM2575-ADJ outputs a high voltage, and the battery starts to charge. When the charging current rises to 1A, the voltage drop across the sampling resistor R5 (50m ohms) reaches 50mV. After the voltage is amplified by the op amp with a gain of 25, it outputs a 1.23V voltage, which is added to the feedback end of the LM2575 to stabilize the feedback circuit. [page]

When the battery voltage reaches 8.4V, LM3420 starts to control the feedback pin of LM2575ADJ. LM3420 makes the charger enter the constant voltage charging process, and the voltage across the battery is stabilized at 8?? 4V. R6, R7 and C3 form a compensation network to ensure that the charger works stably under constant current/constant voltage state. If the input power supply voltage is interrupted, diode D2 and the PNP input stage in the op amp LM358 are reverse biased, thereby isolating the battery and the charging circuit, ensuring that the battery will not discharge through the charging circuit. When the charging enters the constant voltage charging state, diode D3 is reverse biased, so no current is generated in the op amp.

2.1.3 Power undervoltage protection

Power supply undervoltage protection is easy to know from the battery discharge characteristics of lithium batteries. When the battery is at 3.5V, the battery power is about to run out. The battery should be charged in time, otherwise the battery voltage will drop sharply until the battery is damaged. Therefore, a set of undervoltage protection circuits is designed as shown in Figure 5. The voltage obtained by resistor voltage division is compared with the reference voltage designed by TL431. The comparison result is sent to the LM324 amplifier circuit to trigger the switch system composed of triodes, thereby controlling the resistance of the load circuit. The experiment proves that when the system voltage reaches the critical dangerous voltage of 7V, the output current of the system is only 4mA, thereby preventing the occurrence of excessive discharge of the system lithium battery.

Figure 5 Undervoltage protection circuit

Due to the high energy density of lithium-ion batteries, it is difficult to ensure the safety of the batteries. In the overcharged state, the battery temperature rises and the energy becomes excessive, so the electrolyte decomposes to produce gas, and the internal pressure rises, which may cause the risk of spontaneous combustion or rupture; conversely, in the over-discharged state, the electrolyte decomposes, causing the battery characteristics and durability to deteriorate, thereby reducing the number of recharges. The charging circuit and the management system can effectively prevent the overcharge and overuse of lithium batteries, thereby ensuring the safety of the battery and increasing the service life of the lithium battery.

2.2 Software Design

The software design of the power management system is mainly that meg a16l detects the voltage status of the battery through its 8-channel 10-bit ADC port, and takes corresponding measures according to different situations. Once a battery is lower than 7.0V, the microcontroller switches the battery to the charging state and ensures that at least one group of batteries supplies power to the load, and battery 1 has a higher priority than battery 2. The main program flow chart is shown in Figure 6. The program is in an infinite loop. The microcontroller always monitors the voltage status of the two groups of batteries and memorizes the current charging status. Once the discharged battery reaches below 7V, the microcontroller drives the relay switch to switch the charging circuit to the battery and switch the other group of batteries to the power supply of the load circuit.

Figure 6 AVR main program flow chart

During the program's running, timer 1 generates an interrupt every 1 second, receives command information from the monitoring platform through the serial port, and sends the real-time voltage status of the aircraft's two power supplies, the status of the relay, and other information to the ground station through the wireless radio frequency module so that the ground can understand the aircraft's power supply status in real time. [page]

2.3 Host computer design

2.3.1 Wireless RF module

The host computer hardware of the power management system is mainly composed of wireless RF module, level conversion circuit and PC computer, and the general block diagram is shown in Figure 1. Because the RF module receives data at TTL level, it converts it to RS232 level through max 232 level conversion and transmits it to the computer, thus realizing communication between the aircraft and the ground.

The system is able to monitor aircraft at long distances mainly due to the long-range and high-accuracy characteristics of the wireless RF module. Its main features are as follows: (1) Long-range characteristics: Indoor/urban distance up to 450 meters; Outdoor visual range: up to 11 kilometers with 2.1dB dipole antenna, up to 32 kilometers with high-gain antenna; receiver sensitivity is -110dBm. (2) Advanced network and security: 7 frequency hopping channels, each channel can obtain 65k addresses, recovery and confirmation mechanisms to ensure reliable packet transmission; support peer-to-peer network structure (no master/slave dependency), support point-to-point, point-to-many and multi-point access network topologies.

It can be seen that the XTend OEM wireless RF module provides the longest range among low-cost wireless data communication solutions. The module is easy to use, has low power consumption, provides reliable data transmission for important data packets between devices, and is compact to save valuable circuit board space. Figure 7 shows a system block diagram of wireless connection between hosts composed of XTend OEM wireless RF modules.

Figure 7 System block diagram of wireless connection between hosts

2.3.2 Ground monitoring platform

The monitoring platform is an important part of the entire equipment monitoring system. Duplex communication is required between the monitoring platform and the control program. On the one hand, the controller on the aircraft platform sends the real-time information of the aircraft to the ground using digital transmission, and on the other hand, the ground station sends instructions to the aircraft to complete the required tasks.

The ground software is developed based on Microsoft's VC++ 6.0 platform with the help of the MFC class library it provides. The specific software development process adopts an object-oriented design method and is implemented using the C++ language. Each functional module corresponds to a class. In this way, the final software implementation structure is clear and reasonable, and it is easy to maintain and upgrade. The program uses MFC technology combined with MSComm controls and is written in C++. The program functions include: manually setting serial port parameters, serially receiving data and sending instructions, displaying received data information and saving received data, etc.

3 Experimental results analysis

After obtaining information such as power supply voltage, relay status, and charge and discharge status, the controller transmits this information to the ground and saves it on a PC. Figure 8 shows the data collected by the aircraft during flight.

Figure 8. Battery 1 charge and discharge data.

As can be seen from the figure, first, battery 1 is used as a load to power the system. After a period of use, it drops from 7.5V to 7.0V. At this time, the microcontroller detects that the battery is low on power and drives the relay, and switches the battery to the charging circuit. After 10 minutes of charging, because the voltage of battery 2 is also less than 7V, the microcontroller switches the system's power supply to battery 1 again, and repeats this process until the task is completed. It can be seen that the system can convert kinetic energy into kinetic energy and effectively manage the system's power cycle, which increases the system's operating time, thereby improving the practicality and reliability of the entire system.

4 Conclusion

This paper designs a UAV power management system, which has the functions of automatic control of charge and discharge management, real-time monitoring of battery voltage, etc. The system has been debugged and tested to verify its feasibility, but in order to ensure the safety of the aircraft, more tests are needed to ensure the safety and stability of the autonomous flight of the UAV. In addition, high and low frequency filtering, battery power prediction, etc. are also important directions that require in-depth research. Nowadays, the scope of use of lithium batteries is becoming wider and wider, and their prices are relatively moderate. If you master advanced scientific methods of use and make lithium batteries play their due maximum utility, it will save a lot of resources and wealth.

Keywords:AVR Reference address:Design of Power Management System Based on AVR

Previous article:Design of indoor lighting control system based on Atmega16
Next article:Design of high-precision low-voltage reactive power compensator system based on ATMEGA16

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

AVR MCU Learning (IV) Flow Light Verification in C Language
Introduction to AVR IO ports and the concept of registers 1. What is a "register"       Registers are special units in RAM that map the special functions of on-chip peripherals. 2. What is "IO port"       A port that can convert "0" and "1" into voltage signals       The most commonly used TTL level in micr
[Microcontroller]
AVR MCU Learning (IV) Flow Light Verification in C Language
This is the AVR watchdog timeout
Reset detection and watchdog control of AVRATMEGA16     System control and reset     Detection of reset source       JTAG reset indication       Watchdog reset indication       BOD reset indication       RESET pin reset indication       Power-on reset indication     Watchdog control In order to simplify the
[Microcontroller]
Method and application example of adding EPROM data into AVR assembler
In fact, a virtual instruction can achieve this purpose. The ESEG directive defines the start of an EEPROM section. An assembly source file can contain several EEPROM sections, which are concatenated into a single EEPROM section when assembled. An EEPROM section usually consists only of the DB and DDB instructions (an
[Microcontroller]
Research on AVR microcontroller used in power management system
Introduction: This paper designs a UAV power management system, which has the functions of automatic control of charge and discharge management, real-time monitoring of battery voltage, etc. The system has been debugged and tested to verify its feasibility, but in order to ensure the safety of the aircraft, more tests
[Microcontroller]
Research on AVR microcontroller used in power management system
AVR external interrupt experimental program
Introduction: Use a button to control the 1-digit LED digital tube display, just a simple test of the response to external interrupts. The program does not add button debounce processing, and it really shakes violently. /***************************************************** This program was produced by the CodeWizar
[Microcontroller]
Study AVR (VI) CPU Status Register
The status register contains information about the result of the most recently performed arithmetic operation. This information can be used to implement conditional operations to change the program flow. Note that the status register is refreshed after all ALU operations are completed. In many cases, this will replace
[Microcontroller]
Proteus—AVR microcontroller (ATMEGA16 microcontroller) system clock and clock option settings
Before setting it up, I have to talk about the information in the ATMEGA16 datasheet, of course, about the system clock and clock options. 1. System clock and clock options (here we mainly introduce the principle, and 3 will introduce how to set it. In fact, if you know 1, then the following 2 and 3 will be quite simp
[Microcontroller]
Proteus—AVR microcontroller (ATMEGA16 microcontroller) system clock and clock option settings
Application of AVR microcontroller in diesel engine speed measurement
   Abstract: ATMEL's new generation AVR microcontroller (AT90S2313) is used to realize the measurement of diesel engine speed. The concept of message is introduced in C language programming. Finally, a comparison of the effects of AT90S2313 and AT89C2051 in speed measurement is given. Keywords: Single-
[Test Measurement]
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号