1 Introduction
Power supply technology, especially digital control power supply technology, is a very practical engineering technology, involving many disciplines such as electrical, electronic, system integration, control theory, and materials. The development of computer and communication technology has provided a broad development prospect for power electronics technology, and at the same time has put forward higher requirements for power supply. Ordinary power supplies can no longer meet the actual needs due to their shortcomings such as low precision. It was not until the emergence of single-chip microcomputer technology and voltage conversion modules that the development of precise digital control power supplies became possible. The digital control current source designed in this paper uses the PIC16F877A single-chip microcomputer as the core component, and the keyboard, display, D/A, switching power supply and other modules as peripheral circuits.
2 Design requirements and overall design ideas
2.1 Design requirements
The design requirements are: input 220V, maximum output 12V; output current controlled by keyboard, step size 0.01A; output current displayed by LED, accuracy 0.02A; current source steady current range is (0.2-1)A.
2.2 Overall design ideas
This design uses a switching power supply to achieve the output range, accuracy and ripple requirements. According to the system requirements, after D/A conversion, the power amplifier composed of an operational amplifier is used to control the D/A input, thereby controlling the current value. This system is mainly composed of a numerical control part, a power supply part and a keyboard display circuit. The system principle block diagram is shown in Figure 1.
3 Hardware circuit design and software selection
According to the design requirements of digital controlled current source, the system is mainly composed of control module, power module, D/A module and keyboard display module.
3.1 Selection of control module
This design uses the PIC16F877A single-chip microcomputer control. Compared with the AT89C51 single-chip microcomputer, the PIC16F877A adopts the Harvard structure, can realize the single-finger instruction, has a reduced instruction set technology, simple addressing mode, strong I/O port driving ability, and has I2C and SPI serial bus ports. The peripheral circuit is simple, which is not only convenient for development, but also can save users' circuit board space and manufacturing costs. The program has strong confidentiality, low power consumption, wide voltage design, can combine a considerable number of peripheral devices together, is easy to use, and has improved anti-interference performance.
3.2 Selection of power module
The power supply module generally adopts full-bridge rectifier plus capacitor filter circuit, three-terminal voltage regulator integrated circuit external expansion tube and switching power supply circuit. The full-bridge rectifier plus capacitor filter circuit is widely used in some DC current sources with low requirements. Its driving ability is related to the filter capacitor of the later stage. The remarkable feature of this circuit is that it can better meet the transient response of the current. If the load requires continuous large current output, the circuit will be powerless. The three-terminal voltage regulator integrated circuit external expansion tube not only utilizes the good voltage stabilization performance of the voltage regulator integrated block, but also has a certain current output. It is widely used in some high-precision linear voltage regulator power supplies, but the effect is poor. The power device of the switching power supply works in the switching state, with low power loss and high efficiency. The size of the matching heat sink is greatly reduced, and the size of the pulse transformer is much smaller than that of the power frequency transformer. Therefore, the current source using the switching power supply has the advantages of high efficiency, small size and light weight.
Since this design has high requirements on the power supply, especially on the power and ripple voltage of the power supply, a switching power supply circuit is used here.
3.3 Selection of D/A conversion module
TLC5615 is a product launched by Texas Instruments in 1999. It is a digital-to-analog converter with a serial interface. Its output is voltage type, and the maximum output voltage is twice the reference voltage. It has a power-on reset function, which resets the DAC register to all zeros. It is a 10-bit high-precision D/A converter with serial input, so the final output voltage after conversion can reach 0V~10V. 10-bit D/A, with a resolution of 1/2048, the sampling resistor is selected as 15kΩ, and the resolution of the D/A output can achieve a step of 0.01A.
3.4 Software Selection
Protel 99 SE software design system is an EAD circuit integrated design software platform built on IBM PC compatible environment. It has functions such as circuit schematic design, PCB (printed circuit board) design, circuit hierarchical design, report making, circuit simulation and logic device design.
MICROCHIP has equipped the PIC series of microcontrollers with a powerful software integrated development system, Mp lab, which is a full-featured software package that integrates a variety of microcontroller application development tool software.
This paper uses Protel 99 SE software design system to design the PCB board and Mp lab to perform system simulation
4 MCU Program Implementation of Digital Control Current Source
The PIC16F877A microcontroller used in this article is a new product developed by MICROCHIP. It has the function of FLASH programming and can perform operations such as pausing CPU execution and observing register contents directly on the microcontroller. It is currently the most widely used PIC microcontroller.
The functions to be realized by the microcontroller program are: the independent keyboard inputs data to the PIC16F877A microcontroller, the PIC16F877A microcontroller processes the obtained data and sends it to the 10-bit digital-to-analog converter TLC5615 to realize the control of current.
C language programming is used here, which has the advantages of high code writing efficiency, intuitive software debugging, convenient maintenance and upgrading, high code reuse rate, and convenient cross-platform code transplantation. The main program flow chart is shown in Figure 2.
5 System Testing
This design requires the output current range to be 0.2A-1A, and the voltage across the sampling resistor of the constant current source module is 200mV-2000mV. From the voltage value, it can be inferred that the reference voltage |Vref| of the digital-to-analog conversion module is at least 2V (Vref<0). The Vref of this design is -2.15V, and the analog voltage range of the output end is (0-12)V, so the output current is 0.2A-1A. The design requires any preset value within 0.2A-1A. This design inputs the current value through the keyboard and sends it to the microcontroller. The microcontroller converts the analog quantity into a digital quantity and sends it to the digital-to-analog conversion circuit according to the input key value, and then outputs the analog quantity. Some current values and their corresponding theoretical and actual digital quantities are listed in Table 1. The corresponding theoretical code value is the code value required for the digital-to-analog conversion corresponding to the input current, and the actual code value is the code value sent to the digital-to-analog converter by the microcontroller after processing the input current value.
The test results listed in Table 1 show that the maximum error of the output of this design is 33mA when the input current is 32mA, and the error is 1mA. The exercise part of the question requires that the absolute value of the output current change is ≤ 0.1% of the output current + 1mA, that is, 1.032, so the error value measured by this design reaches the error value specified in the design requirements.
6 Conclusion
The digital current source designed in this paper uses PID algorithm to realize the functions of selectable range, adjustable output, precise stepping, and extremely small ripple current, and the preset value and measured value of the output current can be displayed on the LED at the same time. The human-machine interface uses an independent keyboard and LED display, and the control interface is intuitive and concise, with good human-machine interaction performance. It has the advantages of flexible control, convenient system upgrade, improved reliability of the control system, easy standardization, convenient system maintenance, good consistency, low cost, and convenient production and manufacturing.
Previous article:Solar and mains complementary lighting system controller based on PIC
Next article:Design of digital virtual surround sound controller based on PIC microcontroller
Recommended ReadingLatest update time:2024-11-16 22:29
- Popular Resources
- Popular amplifiers
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
- No doubt! Real-time measurement can also be done with low power consumption
- Read the good book "Electronic Engineer Self-study Handbook" + Advanced Edition
- 【Based on Gizwits AIoT development platform + Gokit】+ X-ray dose monitor
- See the circuit and eat the circuit to verify the circuit
- How to multithread?
- Software and hardware design of Mitsubishi PLC based on STM32
- Analysis of the Principle of Micro-control Circuit for Plasma Color TV
- [Zero-knowledge ESP8266 tutorial] Quick Start 8-Reading analog values
- Invitation | Visit the Avnet Artificial Intelligence Cloud Exhibition, read useful information online, and win gifts!
- In this circuit, why does the PMOS turn on as soon as it is powered on?