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.
Previous article:Breathing light made by MEGA8
Next article:AVR fuse configuration details
Recommended ReadingLatest update time:2024-11-16 23:31
- Popular Resources
- Popular amplifiers
- Learn C language for AVR microcontrollers easily (with video tutorial) (Yan Yu, Li Jia, Qin Wenhai)
- ATmega16 MCU C language programming classic example (Chen Zhongping)
- Debugging and application of Mitsubishi CNC system
- AVR MCU Principles and GCC Programming Practice: System Development of Smart Car
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 39 yuan purchase or free: RCSN's wireless serial port tool is coming~
- The world's largest computer chip
- [National Technology N32 MCU Development Package] --N32G457 Series
- [Nucleo G071 Review] Connect the serial port LoRa module to conduct experiments & remotely control relays
- Using ir2110 driver to make a buck circuit
- Methods for solving faults in FPGA design and development based on EDA simulation technology.pdf
- Tuya Sandwich Wi-Fi & BLE SoC NANO Main Control Board WBRU+ Simple Development (Zero Code Solution)
- Belling Products MEQ6310 Low Dropout Low Noise Voltage Regulator
- Super brain-burning question, about electric fishing? !
- Op amp applications - What are the main applications of op amp integration and differentiation circuits?