Design of digital controlled DC regulated power supply based on ATmega16

Publisher:Delightful789Latest update time:2016-08-25 Source: eefocusKeywords:ATmega16 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Since the late 1990s, with the demand for higher system efficiency and lower power consumption, the technological update of telecommunications and data communication equipment has promoted the development of DC/DC power converters in the power supply industry towards higher flexibility and intelligence. The DC regulated power supply designed in this paper is mainly composed of a single-chip microcomputer system, a keyboard, a digital tube display, an indicator light and an alarm circuit, a detection circuit, a D/A conversion circuit, a DC voltage stabilization circuit, etc. Among them, the digital control power supply uses a keyboard to set the output voltage and the alarm threshold in two ways, fast and slow. The output is output by the single-chip microcomputer through the D/A control drive module to output a stable voltage. At the same time, the voltage stabilization method is controlled by a single-chip microcomputer. The single-chip microcomputer samples the output voltage through A/D and compares it with the set value. If there is a deviation, the output is adjusted. If it exceeds the limit, an alarm signal is output and the current is cut off. During the working process, the working state of the regulated power supply (various working states such as output voltage and current) is driven by the single-chip microcomputer output to display on the LCD, and the keyboard is controlled for dynamic logic switching. With the single-chip microcomputer as the core, an intelligent high-precision simple DC power supply is designed. The power supply adopts digital adjustment and has high output accuracy. It is particularly suitable for various occasions with high precision requirements. It has the following obvious advantages: (1) higher intelligence and more perfect performance; (2) flexible control and convenient system upgrade; (3) improved reliability of the control system and easy standardization.


1 Basic principles of DC regulated power supply

The DC power supply circuit is generally composed of a power transformer, a rectifier filter circuit and a voltage stabilization circuit. As shown in Figure 1. The voltage stabilization circuit often uses a three-terminal voltage regulator. The application circuit is shown in Figure 2. As long as the positive input voltage U1 is added to the input terminal of the LM7805 and the common terminal of the LM7805 is grounded, its output terminal can output the chip's nominal positive voltage U2. In practical applications, in addition to connecting large-capacity filter capacitors between the input and output terminals and the ground, it is usually necessary to connect a small-capacity capacitor to the ground at the root of the chip lead pin. C1 is used to suppress self-excited oscillation, and C2 is used to narrow the high-frequency bandwidth of the chip and reduce high-frequency noise. As shown in Figure 2. 2 Implementation scheme of CNC constant voltage source




The traditional DC regulated power supply is adjusted by the coarse adjustment band switch and the fine adjustment potentiometer, and the voltage value is indicated by the potentiometer. This kind of regulated power supply has the disadvantages of non-intuitive reading, easy wear of the potentiometer, low precision, difficult to adjust, complex potential structure, and large size. The digital control DC power supply based on the single chip control not only realizes the function of DC voltage regulation, but also does not have the above disadvantages.

2.1 Design requirements

Output voltage range: 0.0 V ~ 9.9 V;
output voltage adjustment method: step, step value is 0.1 V;
display method: LCD1602 liquid crystal display;
monitor the output voltage value of D/A.

2.2 Digital control power supply scheme

Figure 3 shows the design block diagram of the digital control power supply, and its output voltage value is controlled by the keyboard. The voltage value to be output is input into the single chip microcomputer in a stepping manner through the keyboard. Here, the voltage is output by the PWM analog voltage of the single chip microcomputer. The display circuit can be used to display the output voltage value and the adjustment process of the keyboard circuit. If the output voltage requirements are not met, a voltage amplifier will need to be added. After the LM324 linear conversion, the required voltage value is obtained. In addition, the actual output voltage value of the monitoring voltage is sampled, and the sampled value is sent back to the single-chip microcomputer through the A/D sampling port of the single-chip microcomputer for processing and display. In this digital control power supply, the AVR chip is used to complete the system control key input judgment, voltage value display and various digital controls of external chips. 3 Digital control part ATmega16 is a low-power 8-bit CMOS microcontroller based on the enhanced AVR RISC structure; the data throughput rate is as high as 1 MIPS/MHz, which can alleviate the contradiction between the system power consumption and processing speed; it has 4 channels of PWM and 8 10-bit ADC. The D/A of this system selects the commonly used DAC0832. When it is connected to the single-chip microcomputer, the circuit and program are simple. It only needs to directly connect the data line of the single-chip microcomputer to the input end of DAC0832. The connection and periphery of each pin are shown in Figure 4. 3.2 Voltage amplifier circuit The operational amplifier usually works in a closed-loop state. By connecting the amplifier circuit of the operational amplifier to a certain feedback circuit and external components, various mathematical operations can be realized. There are various forms of operational amplifier feedback circuits. Different feedback circuits and different input methods can form operational amplifier circuits for various purposes. Figure 6 is a proportional operational circuit with the input signal added to the inverting input terminal. R1 is the input terminal resistor, and Rf is the feedback resistor. It feeds back the output voltage to the inverting input terminal in the form of parallel negative feedback. In order to output Uo=0 when the input signal Ui=0, the resistor selection should satisfy R2=R1//Rf. This ensures that the external resistance of the inverting input terminal and the non-inverting input terminal of the operational amplifier is equal, so that it is in a symmetrical and balanced state, so as to eliminate the influence of the bias current of the operational amplifier on the output voltage. Therefore, R2 is called a balancing resistor. From the two important conclusions of the ideal operational amplifier, it can be seen that Ii≈0 and U+≈U-. The current I1 passing through R1, that is: If=I1, and because the input terminal of the operational amplifier is grounded, U+=0, so U+≈U-, that is, when the in-phase terminal is grounded, U+=0, the potential of the inverting input terminal U-≈0, it is an ungrounded "ground", called "virtual ground". The existence of "virtual ground" is an important feature of the operation circuit in the closed-loop working state. 4 Software Design The control program is written in C language, compiled under the ICCAVR platform, and downloaded to the chip using the Ssangyong download software. When the key is pressed, the voltage can be adjusted, the maximum adjustable voltage is 1 V, and the step is 0.1 V. In the process of key addition and subtraction, the voltage displayed by the LCD module changes up and down. When the key is not activated, the PWM analog output voltage of the single-chip microcomputer is output through the secondary filter circuit, and linearly amplified to obtain the same voltage as the displayed voltage value. 4.1 Program Design Flowchart The design flowchart is divided into three parts, namely the main program flowchart, keyboard scanning flowchart and keyboard control flowchart. The main program flow chart is shown in Figure 8. 4.2 Debugging After preparation, the transformers are powered on and tested to see if they meet the design requirements. The items to be checked include the output voltage range, the step adjustment value within the entire output voltage range, whether the output voltage matches the preset voltage, and the accuracy of the digital voltmeter function. The power supply of the CNC power supply system is provided by a DC regulated power supply, which is provided by the ±15 V power supply and 5 V power supply of the hardware circuit. The voltage test results are shown in Table 1. The above are the voltage test results. Since the resolution of PWM is 0.2, its error range can be limited to about 0~0.2 V, and errors within this range are allowed. Therefore, the monitoring voltage is basically consistent with the output voltage. Because the PWM output is 8 bits, the resolution = PWM duty cycle/250, then when the duty cycle value changes by 1, its voltage changes by 0.02 V, and then the op amp amplifies the voltage by 0.04 V. Therefore, the voltage change accuracy can be achieved to 0.04 V. This system uses the high-performance AVR microcontroller ATmega16 chip and the 8-bit precision D/A converter DAC0832 as the core components, and utilizes the 5 V voltage characteristics of the common and output terminals of the commonly used three-terminal voltage regulator LM7805 to finally realize the digital display of output voltage and current values, achieving the expected goal.
































Keywords:ATmega16 Reference address:Design of digital controlled DC regulated power supply based on ATmega16

Previous article:Breathing light made by MEGA8
Next article:AVR fuse configuration details

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

Wireless temperature monitoring system based on ATmega16 microcontroller
0 Introduction With the development and progress of society, the requirements for temperature in more and more occasions are becoming increasingly stringent, and the application of temperature monitoring systems has received increasing attention. In the field of agricultural development, temperature measurement techn
[Microcontroller]
Wireless temperature monitoring system based on ATmega16 microcontroller
Design of solar powered refrigeration system based on ATMEGA16
At present, most refrigeration equipment is driven by electricity. Traditional refrigeration equipment not only consumes a lot of electricity, but also pollutes the environment because of the use of refrigerants such as Freon. Therefore, energy saving and environmental protection in refrigeration have become the focus
[Microcontroller]
Design of solar powered refrigeration system based on ATMEGA16
Design of remote temperature difference cycle controller based on ATmega16
O Introduction The integration of solar energy and buildings is an inevitable trend in the development of urban buildings, and split-type pressurized solar water heaters are the basic direction of solar energy development. Since the heat collection part of the split-type solar water heating system is separated f
[Industrial Control]
Design of remote temperature difference cycle controller based on ATmega16
Design of CAN bus to RS232 based on ATmega16 microcontroller
CAN (Controller Area Network) bus is a serial data communication protocol developed by BOSCH of Germany to solve the data exchange between many controls and tests in modern automobiles. It is a multi-master serial communication bus. CAN bus is an open, digital, multi-point communication control system local area netwo
[Microcontroller]
Design of CAN bus to RS232 based on ATmega16 microcontroller
ATmega16 Development Board Tutorial (7) - LCD1602
8. LCD1602 LCD1602 is the most basic character LCD display, which can display 16x02=32 characters. So the operation of timing - reading and writing is the most important content. Today, I will take you to read the timing. Before looking at the timing diagram, you need to understand the pin functions of the LCD to be
[Microcontroller]
ATmega16 Development Board Tutorial (7) - LCD1602
ATMEGA16 IO Ports Summary
There are three ATMEGA16 IO port related registers: DDRX, PORTX and PINX. If you want to operate the IO, you basically need to operate these three registers. DDRX is also called the data direction register, PORTX is called the data register, and PINX is called the port input pin. Functions of DDRX: When DDRX = 0, it
[Microcontroller]
ATMEGA16 IO Ports Summary
Comparison of ATmega16 timers 0, 1, and 2
The CTC mode of timers 0 and 2 can generate a square wave with any frequency and a duty cycle of 50%. Fast PWM and phase correction PWM modes can generate square waves with arbitrary duty cycle. However, its frequency is only related to the frequency division coefficient, so the frequency cannot be adjusted, only the
[Microcontroller]
Design of indoor lighting control system based on Atmega16
Lighting is an important part of interior design, and the role of light is particularly important for human visual function. However, for a long time, the way to combine natural light with indoor intelligent lighting systems has been ignored by designers. Most indoor places still use a single traditional lighting me
[Microcontroller]
Design of indoor lighting control system based on Atmega16
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号