Design of digital control power supply with 51 series single chip microcomputer as control unit

Publisher:DreamBig123Latest update time:2014-08-28 Source: cecb2b Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    introduction

    Currently, most DC adjustable power supplies use a knob switch to adjust the voltage, which has low adjustment accuracy and frequent jumps, making it difficult to use. Using a digital control power supply can achieve an accuracy of 0.1V per step, an output voltage range of 0~15V, and a current of up to 2A.

    System Structure

Design of digital control power supply with 51 series single chip microcomputer as control unit

    Figure 1: Hardware system structure diagram

    Description of the selected chip

    DAC0832 is a commonly used digital-to-analog converter. It has two connection modes, one is voltage output mode and the other is current output mode. For the convenience of design, the voltage output mode is selected. As shown in the circuit diagram, a reference voltage is connected between Iout1 and Iout2, and VREF output can control the voltage signal. It has three working modes: unbuffered working mode, single buffer working mode, and double buffer working mode. This circuit adopts single buffer mode. As can be seen from the circuit diagram, since /WR2=/XFER=0, the DAC register is in a pass-through state. Since ILE=1, as long as the address of the chip (/CS=0) is selected, the digital quantity is written (/WR= 0), the digital signal is immediately transmitted to the input register and directly passed to the DAC register. After a short setup time, the corresponding analog voltage can be obtained. Once the write operation is completed, /WR1 and /CS immediately become high level, and the written data is latched by the input register until it is written and refreshed again.

    AT24C02 is a commonly used ROM that can save data when power is off. It has a 2K-bit capacity and uses the I2C bus for operation. For its specific operation methods, please refer to relevant materials.

Design of digital control power supply with 51 series single chip microcomputer as control unit

    Figure 2: Main hardware circuit diagram

 

Design of digital control power supply with 51 series single chip microcomputer as control unit2

    Figure 3: Reference voltage circuit diagram

    Hardware circuit design

    The commonly used 51 chip is used as the controller. The P0 port is directly connected to the data port of DAC0832. The /CS and /WR1 of DA are connected to P2.0, and /WR2 and /XEFR are grounded, so that DA works in single buffer mode. The 11th pin of DA is connected to the reference voltage. The reference voltage circuit is shown in Figure 2. The output voltage of LM336 is adjusted to 5.12V by adjusting the adjustable resistor, so the resolution of the output voltage at the 8th pin of DAC is 5.12V/256=0.02V, that is, the voltage increases by 0.02V for every increase of 1 at the DA input data end.

    The voltage output terminal of DA is connected to the input terminal of amplifier OP07. The gain of the amplifier is R8/(R8+R9)=1K/(1K+4K)=5. The voltage resolution output to the voltage module LM350 is 0.02V×5=0.1V. Therefore, when the MCU output data increases by 1, the final output voltage increases by 0.1V. When adjusting the voltage, the voltage can be increased or decreased by 0.1V each time.

    This circuit is designed with three buttons, KEY1 is a page-turning button, the most recently set voltage is saved in the EEROM, for example, if there are 10 voltages, press KEY1 once and the voltage changes to the next one, eliminating the trouble of repeatedly setting the voltage, KEY2 is voltage +, KEY3 is voltage +, press KEY2 once and the current voltage increases by 0.1V, press KEY3 once and the current voltage decreases by 0.1V.

 

Design of digital control power supply with 51 series single chip microcomputer as control unit

    Due to space limitations, the digital tube display circuit is not drawn. The system uses 3 digital tubes, which can display three digits and one decimal place, such as 12.5V, and adopts dynamic scanning drive. The principle of this main circuit is to control the output voltage of DA through MCU, amplify it through the amplifier, and give the voltage module as the reference voltage for the final output. The real voltage and current are still output by the voltage module LM350.

    In order to achieve an output current of 2A, the LM350 must be packaged in a metal case with a slightly larger heat sink.

    Software Process

    Software System

    The software is designed to accomplish three main functions:

    1. Set the voltage and save it, which is mainly the operation of EEROM.

    2. Send the set voltage to DA, mainly for the operation of DA.

    3. Interrupt the display and display the set voltage on the LED digital tube.

    This digital voltage source can save the last 10 voltages. When the power is turned on, it must display and output the voltage used last time. Therefore, 11 addresses are used to save data in the EEROM. The first address saves the current voltage number, which is 1 to 10. The second address to the 11th address save 10 voltage data in succession. The voltage number corresponds to the voltage at the corresponding address.

    Here is an explanation of the software flow: When the power is turned on, the MCU is reset and the registers are cleared. Then the power supply should display and output the voltage before the last shutdown. At this time, the MCU first reads the voltage number saved in the EEPROM, reads the corresponding voltage according to the voltage number, sends the data to DA, and then converts it into BCD code and sends it to the display part. At this time, the program loop detects whether there is a key signal. If KEY1 is pressed, the voltage number points to the next one, saves the voltage number, reads the corresponding voltage, sends it to DA and displays it. If KEY2 is pressed, the current voltage data is increased by 1, and the corresponding output voltage (POWER-OUT pin) increases by 0.1V, and the set voltage data is saved. If KEY3 is pressed, the voltage data is reduced by 1, and the output voltage

    Decrease by 0.1V and save the set voltage data.

    Conclusion

    The digital voltage source has been used for a long time and has the characteristics of high precision, easy use, simple hardware circuit, etc. If you want to make a product, you need to add current measurement and display parts. Please refer to relevant materials for this part of the circuit. This article mainly gives an example of how to control the power output voltage. This circuit can be expanded to the measurement field and motor speed regulation.

Reference address:Design of digital control power supply with 51 series single chip microcomputer as control unit

Previous article:Colorful mini music box based on STC89C52 microcontroller
Next article:Overall design of multi-way calling system

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号