Course design of analog electronics (adjustable dc regulated power supply)?

Introduction

Power technology, especially CNC power technology, is a highly practical engineering technology that serves various industries. Power electronics is one of the best applications of electrical energy. Today's power supply technology integrates many subject areas such as electrical, electronics, system integration, control theory, materials and so on. With the development of computer and communication technology, the modern information technology revolution, to the power electronics technology provides a broad development prospects, but also to the power supply puts forward higher requirements. With the common use of CNC power supply in electronic devices, the ordinary power supply in the work of the error, will affect the accuracy of the whole system. Power supply in use will cause a lot of adverse consequences, the world has put forward different requirements for power supply products and formulated a series of product accuracy standards. Only by meeting the product standards can they enter the market. With the development of economic globalization, products that meet international standards to obtain a pass to enter and exit. CNC power supply from the 80's before the real development, during the system of power electronics theory began to establish. These theories provide a good foundation for its subsequent development. In the subsequent period of time, CNC power supply technology has made great progress. However, its products have the disadvantages that the degree of numerical control does not meet the requirements, the resolution is not high, the power density is relatively low, and the reliability is poor. Therefore, the main direction of development of CNC power supply is to continuously improve the above shortcomings. The emergence of microcontroller technology and voltage conversion module for the development of precise numerical control power supply provides favorable conditions. The continuous development of new conversion technology and control theory, various types of special integrated circuits, digital signal processing devices developed and applied to the 90's, has appeared in the numerical control accuracy of 0.05V numerical control power supply, power density up to 50W per cubic inch of numerical control power supply. From the composition, CNC power supply can be divided into three parts: device, main circuit and control. Currently in the power electronics, almost all for the rotary switch to regulate the voltage, the regulation precision is not high, and often jump, the use of trouble

Digital intelligent power supply module is proposed for the inadequacy of the traditional intelligent power supply module, digitalization can reduce the uncertainty in the production process and the number of human involvement in the link, effectively solve the power supply module, such as reliability, intelligence, and product consistency The digitalization can reduce the number of uncertainties and human involvement in the production process, effectively solving the engineering problems of power modules, such as reliability, intelligence and product consistency, and greatly improving production efficiency and product maintainability.

Power supply using digital control, has the following obvious advantages:

1) easy to use advanced control methods and intelligent control strategies, so that the power supply module of a higher degree of intelligence, performance is more perfect.

2)Flexible control, easy system upgrade, and even online modification of the control algorithm, without having to change the hardware line.

3)The reliability of the control system is improved, easy to standardize, can be for different systems (or different models of products), the use of a unified control board, but only some adjustments to the control software can be done.

4) Convenient system maintenance, once the failure occurs, you can easily through the RS232 interface or RS485 interface or USB interface for debugging, fault query, history query, troubleshooting, software repair, and even online modification of the control parameters, debugging; can also be operated remotely through the MODEM.

5) The consistency of the system is good, low cost, easy to manufacture. As the control software is not as different as the analog devices, so, its consistency is good. Because of the software control, the size of the control board will be greatly reduced, and the production cost is reduced.

6)Easy to form a highly reliable multi-module inverter power supply parallel operation system. In order to get high-performance parallel operation inverter power system, each parallel operation inverter power unit module adopts full digital control, which is easy to carry out better equalization control and communication between the modules or realize complex equalization control algorithm in the modules (without communication), thus realizing high-reliability and high-redundancy inverter power parallel operation system.

Chapter 1 System Design

1.1 Design Tasks and Requirements

1.1.1 Design Tasks

Design a microcomputer-controlled, numerically-controlled DC voltage source to power electronic equipment.

During the design process, select 1 or 2 unit circuits to be simulated and debugged using simulation software (e.g. Multisim 2001, etc.).

Draw all the circuit diagrams and printed circuit diagrams by computer

1.1.2 Design Requirements

Output voltage range of 0-30v with a step value of 0.1V

Voltage adjustment rate Sv< 0.05%V;

Current adjustment rate Si< 0.03%A;

Ripple voltage < Peak<=5mA;

Over-current protection and short-circuit protection; digital display of the output voltage

1.2 Selection and justification of the program

1.2.1 Overall design program

Block diagram designed according to the topic requirements, as shown in Figure 1.1:

Program 1: This program adopts the traditional regulator tube program. The main feature lies in the use of a set of decimal counter to complete the control function of the system, on the one hand, to complete the voltage decoding display, on the other hand, its output as the address input of the EPROM, and the output of the EPROM by the D/A converter to control the error amplification of the reference voltage, in order to control the output step. The block diagram is shown in Figure 1.2

Figure 2.1 schematic block diagram

Figure 1.2 Regulated power supply controlled by adjusting tube

Program 2: adopts the 51 series of microcontroller as the control unit of the whole machine, and changes the value of the output voltage by changing the input digital quantity, which will make the base voltage of the output power tube change, and then indirectly change the size of the output voltage. In order to enable the system to have the ability to detect the size of the actual output voltage value, you can go through the ADC0809 analog-to-digital conversion, indirectly using the microcontroller real-time sampling of the voltage, and then data processing and display. Software methods to solve the data preset and current step control, so that the system hardware is more concise, all kinds of functions are easy to realize the system to the DC power supply as the core, the use of 51 series microcontroller as the main controller, through the keyboard to set the output current of the DC power supply, set the step level up to 0.1V, and can be displayed by the digital tube of the actual output voltage value and the voltage setting value. The use of microcontroller programmed output digital signals, through the D / A converter (DA0832) output analog, and then through the operational amplifier isolation amplification, control of the output power tube base, with the power tube base current changes and output different voltages. Microcontroller system also takes into account the constant voltage source for real-time monitoring, the output voltage after the current/voltage transformation, through the A/D conversion chip, real-time analog into data, analyzed and processed by the microcontroller, through the data form of feedback links, so that the voltage is more stable, constituting a stable pressure-controlled voltage source.

Figure 1.3 Microcontroller-controlled voltage regulator

1.2.2 Comparison and demonstration of the program

1.2.2.1 numerical control part

Program 1 adopts the medium- and small-sized devices to realize the numerical control part of the system, the use of a lot of chips, resulting in cumbersome control circuits and internal interface signals, the middle of the interrelated many, poor anti-interference ability. In program two uses a microcontroller to complete the entire numerical control part of the function, at the same time, 8031 as an intelligent programmable device, easy to expand the function of the system.

1.2.2.1 Output section

Program 1 uses a linear regulated power supply to change its reference voltage so that the output is not only increased/decreased, so that the rectifier filtered ripple can not be ignored on the output of the impact of the rectifier filtered, while Program 2 uses operational amplifiers as a preamplifier, due to the operational amplifiers have a large power supply voltage rejection ratio, can greatly reduce the ripple voltage of the output. ripple voltage at the output. In scheme I. In order to suppress the ripple in the linear regulator power supply output in parallel with a large capacitor reduces the response speed of the system, so that the output voltage is difficult to track the fast-changing input, the output voltage waveform in Scheme II and the D / A converter output waveforms are the same as the output waveforms, not only can be output to the DC level, but also as long as the pre-generation of the waveform of the quantization of the data, you can generate a variety of waveforms to output, so that the system Chen has a certain driving ability of the signal source.

1.2.2.3 Display Part

The display output in Program 1 is the quantized value of the voltage is directly decoded to display the output, the display value is the input of the D/A conversion, due to the error introduced by the D/A conversion and the power drive circuit, the display value and the power supply the actual output value of the display value and the actual output value of the power supply may appear a large deviation. Program two uses a three-and-a-half digital voltmeter to directly sample the output voltage and display the actual output voltage value, once the system works abnormally, there is a large deviation between the pre-programmed value and the output value, the user can deal with it according to this information. Program two also used in the keyboard / display interface controller 8279. not only simplify the interface leads, but also reduces the software to the keyboard / display query time, improve the utilization of the CPU.

In summary, the choice of scheme two, using a microcontroller to achieve.

1.2.3 Schematic Block Diagram and Circuit Diagram of the System

Figure 1.4 Overall Schematic Block Diagram

Chapter 2 Hardware Circuit Design of the System

2.1 Power Supply Part

2.1.1 Structural Composition of the Voltage Regulator Circuit

The voltage regulator consists of the power transformer, rectifier circuit, filtering circuit, and voltage regulator circuit as shown in Figure 2.1 shows

2.1 power supply box and waveforms

a. Rectifier and filter circuit: rectifier function is to transform the AC voltage U2 into a pulsating voltage U3. Filter circuit is generally composed of capacitors, whose role is to filter most of the ripple in the pulsating voltage U3, in order to get a smoother DC voltage U4.

b. Voltage stabilizer circuit: as the output voltage U4 is influenced by the load, input and output voltage, the output voltage U4 is affected by the load, input and input voltage, and the output voltage U4 is affected by the load and input voltage, the output voltage U4 is affected by the load and input voltage. b. Output voltage U4: Since the output voltage U4 is unstable due to the load, input voltage and temperature, a voltage regulator circuit is added in order to get a more stable voltage so as to get a stable voltage U0.

2.1.2 Power supply design

The power supply part includes two major parts, namely +5V and 15V:

The +5V power supply is only needed to be used for the microcontroller part, and the schematic diagram is shown in Fig. 2.2.

For the filtering of the DC voltage U3, most of the ripples are filtered to get a smoother DC voltage U4.

For the selection of filter capacitors, you need to pay attention to the rectifier voltage drop; 7805 minimum allowable voltage drop fluctuations of 10%, so the maximum allowable peak-to-peak ripple U = 9 (1-10%) - 1.4-5 = 2.76V

C = = 3600Uf

Selected filter capacitance, so the filter capacitance selected C = 4700Uf/ 16V

15V power supply, whose power supply circuit is shown in Fig. 2.3

Allowable peak ripple U=18 (1-10%)-0.7-12-U=4.9V

Calculated according to the approximate current discharge, then

C= = = 1430Uf

Selected Filter CapacitorsSelected Filter Capacitors C=2200uF /30V

Figure 2.2 and Figure 2.3

2.2 CNC Part

2.2.1 AT89C51 Microcontroller

AT89C51 is a low-voltage, high-performance CMOS 8-bit microcontroller produced by ATMEL, with 4K bytes of repeatedly erasable read-only program memory (EPROM) and 128 bytes of read-only program memory. ) and 128 bytes of random data memory (RAM), the device uses ATMEL's high-density, non-volatile storage technology production, compatible with the standard MCS-51 instruction system, the chip built-in general-purpose 8-bit central processor (CPU) and Flash storage unit, powerful AT89C51 microcontroller can provide cost-effective applications, can be flexibly applied to a variety of control field. Therefore, here I choose AT89C51 microcontroller to complete.

Main Performance Parameters:

Fully compatible with the MCS-51 product instruction system

4K bytes of rewritable Flash memory

1000 erase cycle

fully static operation: 0hz-24hz

three-level encrypted program memory

128x8 bytes of internal RAM

32 programmable I / O Port Lines

2 16-bit Timer/Counters

6 Interrupt Sources

Programmable Serial UART Channels

Low Power Idle and Power Down Modes

AT89C51 Memory Space

1, Internal Program Memory (FLASH) 4K bytes.

2. External program memory (ROM) 64K bytes.

3, internal data memory (RAM) 256 bytes.

4, external data memory (RAM) 64K bytes.

2.3 Signal Processing Circuit

2.3.1 D/A Conversion

The power supply output voltage range is 0-30V, step 0.1V,*** there are 300 states, and 8-bit D/A conversion is only 256 states, which can not meet the requirements, so I need to choose a 10-word-long D/A converter to meet the design requirements.

MAX504 is a low-power, voltage output 10-bit serial digital / analog converter produced by Maxim (Maxim). MAX504 can be used both +5V single power supply operation, but also ± 5V dual power supply operation. The circuit uses a 14-pin DIP-type or SO-type package, Figure 2 shows its pinout, Table 1 describes its pin function.

Figure 2.5 MAX504 Package Diagram

Table 1 Pin Functions of MAX504

Pin Number Pin Name Pin Function

1 BIPOFF Bipolar Bias/Gain Resistor Terminal

2 DIN Serial Data Inputs

3 CLR/ Clear Terminal, Asynchronous Setting of All Bits of DAC Register

3 CLR/ Clear Terminal, Asynchronous Setting of All Bits of DAC Register

2 BIPOFF Serial Data Inputs

3 CLR/ Clear Terminals, Asynchronous Setting of All Bit

4 SCLK Serial clock input

5 CS/ Chip select, active low voltage

6 DOUT Serial data output

7 DGND Digital ground

8 AGND Analog ground

9 REFIN Reference voltage input

10 REFOUT Reference voltage output terminal, if not used, should be connected to VDD

11 VSS power supply negative terminal

12 VOUT DAC analog output ground

13 VDD voltage negative terminal

14 RFB feedback resistor terminal

2.4 Keyboard and Display Section

2.4.1 Display Section

Display data is transmitted in serial mode from the 89C51 P12 to the 89C51 P12. The display data is output from the P12 port of 89C51 to the A and B terminals of the shift register 74LS164, and then the parallel data will be output from the output terminals Q0 to Q7 to control the collector of the switching tubes WT1 to WT3, and then the output of the LED segment selection code will be sent to the digital tubes LED1 to LED2 at the same time. the bit selection code is output from the P14 to P16 ports of 89C51 and sent to the switching tubes LED1 to LED2 through the decoder 74LS138. The bit selection code is output from the P14 to P16 port of 89C51 and sent to the base of switching tubes Y1 to Y8 via 74LS138 to control the bit selection of digital tubes LED1 to LED8. In this way, the four digital tubes take turns to display at an interval of 100ms. Due to the residual effect of the human eye, these four digital tubes appear to be displayed almost simultaneously.

2.4.2 Keyboard Section

A keyboard is a switching matrix with numerous keys, which is an inexpensive input device. A keyboard usually consists of data keys, letter keys, and some function keys. The operator can use the keyboard to enter data, addresses, instructions, or other control commands into the computer, realizing a simple human-computer dialogue.

There are usually two types of keyboards used in computer systems: one type is coded keyboards, that is, the identification of the closed keys on the keyboard is recognized by special hardware. The other is a non-coding keyboard, that is, the keyboard keyed and closed key recognition by the software implementation.

Keyboard interface should have the following functions:

Key scanning function, that is, to detect whether there is a key pressed

Key recognition function, to determine the position of the rows and columns of the built by the pressed

Generation of the corresponding key code

Elimination of key bouncing and deal with multiple keys

Here I want to choose the non-coding 3x3 keyboard structure, can be automatically eliminate the effects of key jitter, with protection against simultaneous key presses, the ability to store keyboard information on the stack, but also to send an interrupt request to the CPU, the response, so that the CPU to obtain the key information, but also to accept the query of the CPU inter-team information.

For each key we give a specific function:

0------Increase 10V per key press

1------Decrease 10V per key press

2------Increase 1V per key press 0 1 2

3------Decrease 1V per key press 3 4 5

4------Increase 0.1V per keystroke 6 7 8

5------Decrease 0.1V per keystroke

7-----Clear Display

8-----Start Display

AT89C51 and 8279 Keyboard and Display Interfaces

Figure 2.11 below shows the AT89C51, 8279 and the keyboard and display interface circuit, when a key is pressed, 8279 can be interrupted to notify the C51. programmed to achieve the function is: when there is a key 0-8 pressed to complete the acquisition of the value of health, and use the LED output to display the value of the key.

2.5 Output Circuit

2.5.1 Voltage Regulator Output Part

This part of the numerical control part of the voltage control word into a stabilized voltage output, the circuit mainly consists of D / A conversion, voltage regulator output, over-current protection indication and delayed start and so on a number of parts of the circuit diagram as shown in the figure

Voltage output range of 0-29.9V, the step size of 0.1V, *** there are 300 states, so the above mentioned selection of 10-bit D / A converter MAX504. design with two voltage control word on behalf of the 0.1V, when the voltage control since the 0, 2, 4 to 598, the power supply output voltage of 0.0, 0.1, 0.2 to 29.9V. When the MAX504 reference voltage is used when the reference voltage of +15V, the full width of the D / A converter circuit, the output is 15.0V (voltage). The output is 15.0V (when the voltage control word is 1023). Since the century's maximum use of voltage control word 598 , so the D / A conversion part of the maximum output voltage

V1 = (598/1023)*15 = 8.77

D / A conversion part of the output voltage as a voltage regulator output circuit reference voltage. The output of the voltage regulator output circuit is proportional to the reference voltage and ranges from 0-29.9V. The voltage regulator output part adopts a typical series feedback voltage regulator circuit, which can also be regarded as a DC power amplifier using the reference voltage as input. This part of the circuit is mainly composed of op-amp U3A and transistor T1, T2, T2 when the high-power transistor. D / A conversion circuit output voltage V1 received by the op-amp U3A in-phase terminal, the output of the regulated power supply by the R5, RW3 and R6 sampling circuit composed of voltage divider sent to the inverted end of the op-amp U3A, the op-amp comparison of the amplifier to drive the composite regulator tube composed of T1 and T2. When the circuit is balanced, the D/A output voltage V1 is equal to the sampling voltage V2, R5=500Ω,R6=340Ω,51Ω potentiometer RW3 is adjusted in the middle position, set the output voltage of the regulated power supply is VOUT, then

V2=[(R6+51/2)/(R5+R6+51)]* VOUT

=[(340+25.5) /(500+340+51)]* VOUT

=0.294VOUT

Because V1=V2

VOUT=V1/0.294=3.4V1

So VOUT=3.4V1=3.4*8.79V=29.9V

2.5.2 Output Voltage Display Circuit

In order to realize the real-time monitoring of the output voltage, the use of ICL7107 lap digital voltmeter on the output voltage sampling and measurement, and the output display, the user can see two voltage values from the display: one for the microcontroller set the value of the voltage, that is, the expected value, and the second for the measured value of the output voltage. The difference between the two is very small during normal operation. Once an abnormal situation occurs, the user can see the expected value does not match, so as to take appropriate measures.

Output voltage measurement/display circuit as shown in Figure

Chapter III Software Design

Software to achieve the function is: the keyboard to the microcontroller input data, the microcontroller on the data obtained by the processing, sent to the 10-bit digital-to-analog converter (MAX504), and then sent to the digital voltmeter, to achieve the digital amount of control of the voltage.

Figure 3.1 Block Diagram of Microcontroller Module

3.1 Main Control Program

The main control program first initializes the system, then reads in the preset voltage value, outputs the corresponding voltage control word, and waits for the keyboard input. According to the different inputs from the keyboard, the application program is transferred to the corresponding application program in a scattered way. After the execution, if the user inputs "clear the display", it will output the voltage control word 0, return to the initial state, and wait for the next time to press the key. The block diagram is shown in Figure 3.2.

Figure 3.2 Main Program Flowchart Figure 3.3 Interrupt Service Program Flowchart

3.2 Interrupt Program

Overcurrent protection is realized by interrupt, in the interrupt service program to carry out the various alarms and protect the operation, the interrupt service program block diagram shown in Figure 3.3.

The keyboard interrupt program will be a flag set to "1", indicating that a key is keyed in, and the keyboard code will be read in and assigned to a variable. In the main program and the brother application program to read this flag and the value of the variable, as the basis for various operations, after reading the flag will be cleared to zero.

3.3 Keyboard Display Program

Figure 3.4 Key Interrupt Flowchart Figure 3.5 Display Flowchart

Chapter 4 Circuit Expansion

4.1 Suppressing Ripple

This question is very demanding in terms of ripple, and for this system, the main factors that contribute to the ripple are the industrial frequency interference, load fluctuation, and the overshooting noise of digital regulation. The third one is inevitable and unavoidable for digital control system; therefore, the ripple is mainly suppressed by suppressing the industrial frequency interference and improving the load capacity.

◆Filtering at the power supply side. The industrial frequency interference of the system is mainly introduced by the power supply transformer, so the filtering at the power supply side is very necessary and very effective in suppressing the industrial frequency interference. The two power supplies of this system are triode active filtered at the output side.

4.2 protection circuit

Protection circuit consists of T3 and R8, set Lm for the protection of the action current, when the power supply output current I increased to Im, the voltage drop Im * R8 on the R8 makes the T3 tube conduction, divided off the base current of the composite tube, so that the output of the I is no longer increased. Im in the circuit is set to 2A, T3 conduction voltage of 0.6V, then R8 = 0.6V/2A = 0.3Ω.

Over-current interrupt application by the op-amp U3B generated. When overcurrent occurs, the voltage V2 obtained after sampling the output of the voltage regulator is lower than the D/A conversion output voltage v1, the U3A output is positively saturated, which makes the inverse end of the U3B potential rise, and the U3B outputs a low level, generating an interrupt application signal.

4.3 Delay Start

5.3 System Error Analysis

From the schematic block diagram of the circuit, it can be seen that the main error of the system comes from three aspects:

(1) Quantization Error of MAX504 The MAX504 is a 10-bit D/A converter, and the quantization error for a full scale of 30V is 1/2LMBS = (1/2)* (1/210)*30V=14.65Mv. The relative error normalized to full scale is

(1/2)*(1/210)=0.05%

(2) The error introduced by temperature drift of the reference voltage The LM336 drifts no more than 4Mv over the range of 0-40OC,

so the relative error= 2mV/5V=0.04%.

Conclusion

Appendix

Program List