The system mainly includes matrix keyboard input module, numerical control module, constant current circuit module, current sampling module, serial communication module and PC monitoring interface. The constant current source is based on single chip microcomputer, high power field effect tube IRF530 is used as constant current device, 10-bit resolution A/D and D/A chips are used, the output current is 20~2000mA, the minimum resolution is 2mA, and local key control and PC remote control can be realized at the same time. The simulation results show that the design is feasible and can achieve good stability and high precision.
0 Introduction
Constant current sources are used in many industrial and scientific experimental fields such as test measurement and semiconductor performance testing. Researching and designing an intelligent high-precision constant current source has a wide range of application value. However, in the process of developing an electronic product, design, trial production and debugging must be repeated, and physical trial production and debugging are time-consuming and laborious work, which often results in half the effort and twice the result, resulting in a long system development cycle and high cost. With the rapid development of large-scale integrated circuits and computers, computer simulation technology has completely changed the traditional design method of electronic system design that completely relies on manual parameter calculation, circuit experiments, physical trial production and system debugging. Using EDA simulation software, existing systems or different design schemes in the imagination are simulated and analyzed on the computer, and combined with physical trial production and debugging, so as to optimize component parameters, improve system performance, minimize design costs, and shorten the system development cycle. Proteus is a powerful system design auxiliary EDA simulation software. Using this software to design, analyze, study and experiment on CNC constant current sources can achieve the purpose of developing and developing actual electronic products.
This paper studies the method of developing a CNC constant current source using Proteus simulation software and single-chip microcomputer technology.
1 System Overview
The popularity of single-chip microcomputer technology has brought electronic products into the era of intelligence. The overall design scheme of the CNC constant current source with the single-chip microcomputer as the core is shown in Figure 1. This system mainly includes a matrix keyboard input module, a CNC module, a constant current circuit module, a current sampling module, a serial communication module, and a PC monitoring interface. The output current range is designed to be 20~2000 mA, with a step of 2 mA.
Figure 1 CNC constant current source system structure
The system uses a matrix keyboard as a human-machine interface. The set current is input from the keyboard, the microcontroller reads the set value and displays it on the LCD. After corresponding data processing, the control signal is sent to the D/A, and the corresponding voltage value is output. The voltage is then converted into the corresponding output current through V/I conversion and provided to the load. The sampling circuit converts the actual output current into a voltage and displays it on the LCD through A/D conversion and data processing. The set current value and the sampling value are displayed on the LCD at the same time for comparison and corresponding control and debugging.
2 Hardware Design
2.1 Design of CNC part
The single chip microcomputer, matrix keyboard and D/A conversion circuit constitute a typical digital control unit circuit, and the 10-bit serial D/A conversion chip TLC5615 is used for digital-to-analog conversion.
Independent keys are easy to program, but they occupy I/O port resources and are not suitable for applications with many keys. This design requires 14 function keys, including 10 numeric keys from 0 to 9, "Cancel", "Confirm" and "Step Addition and Subtraction" keys. In this case, it is obviously too wasteful to use independent keys. For this reason, we introduced a matrix keyboard. Four I/O lines are used as row lines, and 4 I/O lines are used as column lines, for a total of 8 data lines and microcontroller interfaces.
A key is set at each intersection of the row and column lines. This matrix keyboard structure can effectively improve the utilization rate of the I/O port in the microcontroller system.
A short and efficient keyboard scanning program is given below in the form of a function.
Enter the set current value from the keyboard and display it on the first line of the LCD in mA. After pressing the "Confirm" key, the microcontroller converts the input value into a corresponding digital quantity and sends it to the D/A conversion chip TLC5615.
Assume that the corresponding digital value when the input current value is m is x, and the maximum control word of the 10-bit D/A is 1 023. For the convenience of calculation, assume that the maximum digital value corresponding to the full-scale 2 000 mA is 1 000, then there is a proportional relationship (1):
According to the above formula, the digital control word x sent to TLC5615 should be 0.5 × m, and the minimum output step value that can be achieved is 2 mA, that is, for every change of 1 in the current control word, the current changes by 2 mA. If a step value of 1 mA is to be achieved, a 12-bit D/A chip is required.
The control word 1000 corresponds to 2 000 mA current, and when the sampling resistance is 1 Ω, it corresponds to 2 V voltage output. Since the maximum output digital quantity of TLC5615 is 1023, according to the relationship between the control word and output voltage of TLC5615:
The reference voltage of the D/A converter should be U REF = 1.023 V.
TLC5615 uses a resistor string network buffered by an op amp with a fixed gain of 2 to convert 10-bit digital data into an analog voltage. Its output voltage range is 0 V to 2×V REFV, that is, the maximum output voltage is twice the reference voltage.
Here, the reference voltage of TLC5615 is 1.023 V, the full-scale output is 2.046 V, and when a 1Ω sampling resistor is used, the maximum output current is 2046 mA, which can meet the design requirements.
In order to improve the stability and accuracy of the measurement, a dedicated voltage reference chip TL431 is used to provide a reference voltage for TLC5615, and a simulation experiment is carried out in Proteus. The circuit is shown in Figure 2. When making the actual circuit, the adjustable resistor in the figure uses a precision multi-turn potentiometer.
Figure 2 Voltage reference circuit
2.2 Design of constant current circuit
The main function of the constant current circuit is to convert the voltage sent by the digital control part into a constant current output and provide it to the load. The conversion circuit is composed of a high-precision integrated operational amplifier LM358, a power field effect tube IRF530 and a sampling resistor, as shown in Figure 3. The analog output voltage Ui of the digital control part is used as the input of LM358, and the voltage of the sampling resistor is fed back to the inverting input terminal of LM358. This circuit constitutes a typical current series negative feedback. According to the feedback theory, since the open-loop gain of the integrated operational amplifier is very large, this circuit is a deep negative feedback, that is, the input voltage Ui is equal to the feedback voltage Uf on the sampling resistor R. It can be obtained from formula (3):
Figure 3 Current source circuit.
That is, the output current IO depends only on the numerical control output voltage Ui and the size of the sampling resistor R, but has nothing to do with the load, and the negative feedback has the function of stabilizing the output current. If a stable output voltage and a precise sampling resistor can be provided, a constant current with very small ripple can be obtained. The simulation results show that the circuit has a good constant current effect. When actually designing the circuit, in order to achieve a more stable output, RC filtering can be added between LM358 and IRF530.
The simulation experiment shows that the LM358 (U2:A) cannot reach the required current when powered by +5 V. To meet the design requirements, a +12 V DC power supply can be used. In addition, to achieve an output current of 2 000 mA, a sampling resistor with high power and small temperature coefficient should be used. For high-precision applications, constantan or manganese copper wire can be used as the sampling resistor. If the accuracy requirement is not high, cement resistors can also be used.
Since the integrated operational amplifier cannot provide very high current, the power field effect tube IRF530 is used for current expansion in the design. IRF530 can provide 14 A current under good heat dissipation conditions, and the on-resistance is only 0.18Ω, which meets the design requirements. At the same time, a high-power power supply is required to power it, and the power supply parameters are determined according to the maximum current and load value of the design. According to simulation experiments, if the load is 0~10Ω, the use of +24V power supply can meet the design requirements and have a certain margin, so the actual design can use a +24V/3A DC regulated power supply. Due to the existence of IRF530 leakage current, the minimum output current is not zero. The simulation experiment shows that the value is about 20mA.
2.3 Current sampling module design
Current sampling is to measure the actual output current and display it on the LCD. Its basic principle is to collect the voltage on the sampling resistor and convert it into the corresponding current according to the value of the sampling resistor. Here, the 10-bit serial A/D conversion chip TLC1543 is used to collect the voltage. In order to achieve high-precision measurement, TL431 is still used as the voltage reference, and the reference value is 2 V. It is worth mentioning that if the load is required to be grounded, the positions of the load and the sampling resistor should be swapped. At this time, when measuring the voltage across the sampling resistor, a differential amplifier is required to perform differential to single-ended conversion.
2.4 Overcurrent protection circuit
In order to prevent external interference from causing excessive instantaneous current to damage the device, an overcurrent protection circuit is designed, which is implemented using a dedicated voltage comparator LM311. The reference voltage of the comparator is determined according to the maximum current and the resistance value of the sampling resistor. The comparator outputs a low level when working normally and a high level when there is an overcurrent. The microcontroller triggers an interrupt based on the monitored level change to set the output current to zero.
3 Software Design
The software design includes two parts: C51 programming of the single-chip microcomputer and monitoring program based on LabVIEW on the PC side. The C51 programming of the single-chip microcomputer realizes the following functions. In Figure 2, press the numeric keys to enter the set current, and then press the "Confirm" key. If the input is wrong, you can press the "Cancel" key at any time to cancel this operation; the first line of the LCD displays the set value, and the second line displays the actual measured value. If the measured value does not reach the required value, you can press the step plus and minus keys to make fine adjustments so that the output value finally meets the requirements. The core of the software design is to identify the key value and complete the data input, display and current control functions through appropriate data processing.
Figure 4 Computer monitoring interface
Communication function has become one of the important functions of instruments. Using the serial communication function, the computer can monitor the output current of the constant current source and remotely control the constant current source on the PC. We used LabVIEW to write a computer monitoring program and used the virtual serial port and Proteus to perform communication simulation debugging. The control interface of the PC is shown in Figure 4. After setting the communication parameters, enter the set current and confirm it. The front panel also displays the current value actually output by the instrument.
4 Conclusion
Through simulation experiments, the feasibility of the numerical control constant current source design scheme described in this paper has been theoretically proved. Under the premise of successful simulation, we designed and produced the actual circuit. After actual testing, it was very close to the simulation result and met the design requirements. It can be seen that by using Proteus simulation technology to design electronic systems, design errors can be discovered in advance, which greatly improves development efficiency and reduces development costs.
Previous article:Make a USB universal charger for use with a mobile power bank
Next article:Introduction to the Bipolar Multi-String LLC Topology
Recommended ReadingLatest update time:2024-11-16 15:23
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Single-chip microcomputer C language programming and simulation
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- Questions about AD9361
- New breakthrough: Domestic chip BAC201 challenges small size, low power consumption, low cost and high integration
- CC2530 key flow
- (Repost) Introduction to MOS tubes - only talk about applications, not principles
- stm32g474 realizes 5 independent ADC synchronous sampling
- Classification and characteristics of power modules
- How to use the ratiometric characteristics of sensors and ADCs to improve accuracy
- Read and write SD card in Uboot with SIN-IMX6UL development board
- ARM multiplication instructions and multiply-add instructions
- MSP430 clock system problem