A constant current source is a power source that can provide a constant current to a load, also known as a steady current source or current source. At present, the application of CNC constant current sources is becoming more and more widespread with the development of electronic technology. Constant current sources are widely used in high-tech fields such as electronic measuring instruments, lasers, sensor technology, superconductivity, and modern communications, and their development prospects are relatively good. At the same time, it is not limited to this. At present, the urgent industrial demand is to digitize the analog signal quantity collected in industrial production, use it as a constant current of the control signal, and participate in the control of the next level of production.
1 System structure and principle
The digital control constant current source consists of transformer rectification, microcontroller control part, D/A and A/D conversion circuit, power supply part, display or keyboard interface circuit, constant current source circuit, etc. The system can also realize human-computer communication, which is mainly realized through LED digital tube and keypad. The LED digital tube displays the current value and some corresponding functions, and the keypad can realize artificial control of the constant current source output, that is, when it is not under the control of the keypad, the user's input status will be displayed, and when it is A/D sampling control, the main control parts include: analog-to-digital conversion chip, keyboard display interface chip, microcontroller, driver chip, 8-digit module brick and chip, etc. The core control chip adopts AT89C51 general-purpose microcontroller, mainly because of its complete functions, relatively stable performance, and low cost, it is the preferred core control chip of small control system. By using A/D sampling and processing and handing it over to D/A output, the keyboard and circuit can communicate with each other, and 8279 manages the keyboard and circuit, which reduces the burden on the processor and solves the problem that the microcontroller's port lines and time are occupied too much by the display circuit and keyboard. The overall system block diagram (as shown in Figure 1)
2 Circuit Design of System Hardware
2.1 Power supply and transformer rectification
The power supply part mainly provides power for the D/A conversion chip and the numerical control part, and also serves as the main power supply for the voltage-stabilized output circuit. Output 50Hz, 200-240V AC power, through the transformer rectification, voltage transformation, filtering, to obtain +12V, +5V, -12V, the voltage required by the three systems (as shown in Figure 2). The voltage drop of the rectifier tube should be considered to select the filter capacitor. The power grid fluctuation is 10%, and 7912/7805/7812 is selected. Since 7812/7912 has high power and heavy load, a heat sink needs to be installed. Therefore, 4700UF/16V is used as the filter capacitor. A filter is added to the output end of the voltage regulator to make the output current ripple ≤ 0.2ma.
2.2 Constant current source circuit simulation
Current-controlled constant current source and voltage-controlled constant current source are two control forms of constant current source. The one introduced in this article belongs to the voltage-controlled constant current source, with a current range of 4-20ma, that is, the output current of 4-20ma. The change of control voltage can make the current change, but once the input voltage is determined, the output current will remain constant. The system can provide a constant current determined by the input voltage, which is mainly manifested in the change of load resistance within a certain range. The characteristic curve of the analog constant current source circuit is shown in Figure 3.
When the load resistance of this voltage-controlled constant current source circuit is between 29-10008Ω, we can see that the linearity with input voltage change is relatively good, and the output current changes very little with load resistance.
2.3 Principle of keyboard display circuit
The connection circuit diagram of the keyboard display circuit and the single-chip microcomputer only needs to read and write to complete the corresponding operations of the display and keyboard. When the keyboard is pressed, the keyboard display interface chip will send an interrupt request to the single-chip microcomputer through the external interrupt of the single-chip microcomputer. After the single-chip microcomputer makes a judgment, it will decide whether to execute the next task.
2.4 Principle of A/D sampling circuit
The connection circuit diagram of the A/D converter sampling input and the microcontroller. In a single-channel sampling input, when the sampling is completed, an interrupt request will be issued in the form of an external interrupt of the microcontroller, requiring the microcontroller to interrupt processing. At this time, the microcontroller must judge and process the input data of the A/D converter in order to perform the next control operation.
3 Circuit Analysis and Testing
3.1 Test Method
External 220v AC power supply, digital multimeter, low frequency millivoltmeter, the above instruments are required for testing. Specific test method (as shown in Figure 4). In the figure, the sampling resistor is RS and the load resistor is RL.
The values at 1 and 2 are measured by a multimeter as the actual current value, and the values at 3 and 4 are measured by a low-frequency millivoltmeter as the output ripple voltage value. In order to compare the error between the actual value and the measured value, we selected eight values from 20 to 2000ma for comparison, and the error calculation formula is:
In the formula, the measured value is I2 and the displayed value is I1.
3.2 Test Results
The error between the set value and the measured value, when measuring ten times with changing the load resistance, is: RL=8Ω, the set value is I3, C1=(I2-I3)/I3 is the measurement error. The standard deviation of the measurement error: RL=18Ω, S1=0.0036ma, S1=0.0031ma. The error between the set value and the displayed value is: RL=8Ω, C2=(I1-I3)/I3 is the measurement error, RL=20Ω, S2=0.0041ma, S2=0.124ma, is the standard deviation of the measurement error. The percentage of error varies between 0.017 and 0.36.
4 Control section
The system introduced in this article performs dual-channel control on the output current, that is, there are two sources of control signals. One is to obtain the control signal through A/D sampling according to the needs of industrial applications. According to the data measured many times in the assembly program, a fixed table is designed, and the control data is output to the D/A through table lookup, so that the corresponding stable current generated by the constant current source unit can be controlled. The ideal current value input by the user is judged by manual input, and then the D/A realizes the output of the control data according to the table lookup to obtain the current of the corresponding size. This function can also allow the user to preset the initial value of the current. The above two control methods cannot work at the same time. The program can realize automatic switching between the two different control methods of automatic sampling and keyboard. When using LED interactive display at the same time, when it is A/D sampling control, the size of the output current should be displayed in real time; when it is keyboard control, the user's input status should be displayed.
Refer to the relationship between input voltage and constant current source output current to make a table, and some nonlinear problems can be corrected in the index process. In the process of making a table, it is also necessary to consider the situation caused by the difference between the application of A/D and the initial value of keyboard input. Take the initial value of keyboard as an example: if 10ma is the current input by the user, 1v is the corresponding control voltage, (00110010)2=(50)10 is the indirectly corresponding 8-bit binary number, then (00110010)2 is the corresponding value in the software table.
The A/D sampling control is basically the same as the keyboard method, except that there is an additional judgment on the sampling value.
5 Software Program Design
First, the whole system is initialized, including: initialization of 8297 working status; initialization of automatic sampling control flag and identification keyboard manual operation; interrupt initialization; initialization of some used registers. It is stipulated that when F0=1, it is A/D sampling control, and when F0=0, it is keyboard control. The initial setting state is written initially, which is the keyboard state. The LED digital tube displays P, which also indicates the keyboard state, and starts D/A conversion. And wait for the keyboard to be pressed, and start the loop waiting. Some interactive displays such as: A/D sampling control displays A; keyboard control state is P, and the confirmation button display is E.
6 Summary
This CNC constant current source in this article is designed based on a single-chip microcomputer. It has the characteristics of real-time sampling control in industrial production and applications. The application needs to use a corresponding constant current as a signal for the lower-level control to achieve dual control of keyboard manual input and sampling automatic input, and can freely switch between the two control modes of the CNC constant current source circuit. This CNC constant current source has good linearity and stable current output. In the dosing link of sewage treatment, the opening degree of the dosing valve can be controlled to achieve the effect of controlling the dosing amount. After identification, after the necessary software is adjusted accordingly, some industrial application needs can be fully met.
Previous article:Design of inverter power supply controller based on TMS320F2812
Next article:Design of battery performance monitoring system based on DS18B20
- 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
- What happened to Microsoft's underwater data center that sank to the bottom of the sea for 2 years?
- [GD32L233C-START Review] OLED screen display driver
- Questions about op amp TIA circuit
- Deping Technology Shenzhen Co., Ltd.
- I have never understood several parameters of MOS tubes. Please help me explain them.
- Luminous flux of LED after aging
- Image storage and display system based on SDRAM——Study record
- The smallest Arduino board
- Wi-Fi 6E front-end module: Perfectly demonstrates all the performance of the 6GHz band
- Design of wireless intelligent air conditioning control system peripheral circuit using ZigBee technology