1 System Structure
The block diagram of the data acquisition and control system composed of ADuC845 single-chip data acquisition device and CH341 USB interface device is shown in Figure 1. ADuC845 completes analog data acquisition, switch input and output, control voltage and PWM control signal output, and CH341USB interface device completes data transmission between PC and ADuC845.
The data in ADuC845 is packaged and transmitted to the PC via the USB device. The data processing program of the PC is used to complete the data processing and analysis, and it is displayed on the designed system interface. At the same time, the control command is transmitted to ADuC845 through the USB interface to realize the control of the peripheral device.
2 USB communication interface circuit
The USB communication interface circuit uses the CH341 device, and Figure 2 is its circuit. In Figure 2, P3 is the USB port, and the USB bus includes a pair of 5 V power lines and a pair of data signal lines. Usually the +5 V power line is red, the ground line is black, the D+ signal line is green, and the D- signal line is white. The power current provided by the USB bus can reach up to 500 mA. CH341 and the low-power ADuC845 directly use the 5 V power provided by the USB bus.
The RXD pin and TXD pin of CH341 are connected to the RxD pin and TxD pin of ADuC845 respectively, because of data transmission. Crystal Y2, capacitors C13 and C14 are used for clock oscillation circuit. The frequency of Y2 is 12 MHz, C13 and C14 are monolithic or high-frequency ceramic capacitors with a capacity of 15 pF. VD1 is the working status indicator, and R3 is its current limiting resistor. R4 is a 0 Ω resistor (magnetic bead), which can achieve filtering and protection. C12 and C11 are monolithic or high-frequency ceramic capacitors. The capacity of C12 is 1 000 pF ~ 0.01 μF, which is used for decoupling the internal power supply node of CH341, and the capacity of C11 is 0.1 μF, which is used for decoupling the external power supply.
When designing the printed circuit board PCB, it is important to note that: the decoupling capacitors C11 and C12 should be placed as close to CH341 as possible; the D+ and D- signal lines should be laid parallel to each other, and ground wires or copper should be provided on both sides as much as possible to reduce external signal interference; the length of the signal lines related to the XI and XO pins should be shortened as much as possible. In order to reduce the interference of the high-frequency clock to the outside world, ground wires or copper can be placed around the relevant components. [page]
3 Data acquisition and control circuit design
The data acquisition and control circuit is based on ADuC845. The circuit is shown in Figure 3. The circuit provides 10 24-bit A/D converter input channels, and the input end is connected with a 1 kΩ resistor and a 0.1 μF filter capacitor. The 12-bit voltage output D/A converter is output after being buffered by the operational amplifier OP284; it can also provide dual 16-bit PWM output and 8-way switch input/output. The RxD pin and TxD pin of ADuC845 are connected to the RXD pin and TXD pin of CH341 respectively to realize data transmission. The crystal oscillator circuit uses 32.768 kHz crystal oscillator Y1, and capacitors C18 and C19 are adjusted and determined according to system needs. The power supply end of the digital circuit is connected to the ground with 0.1μF decoupling capacitors. The power supply end of the analog circuit is connected to the ground with 0.1μF and 10μF decoupling capacitors. The decoupling capacitor should be placed as close to the power supply as possible.
4 System Main Program Design
4.1 USB Communication Interface Circuit Driver
The USB port of the USB communication interface circuit is connected to the PC. For the PC, the data acquisition and control system is a functional component (or lower computer) with a USB interface. The PC directly transmits data to the lower computer through the virtual serial port device. The USB communication interface circuit driver code is as follows:
[CH341S98.9X. AddReg]; // Used to add the registry part
[page]
4.2 A/D sampling program
The following is part of the code of the A/D sampling program:
5 Conclusion
The data acquisition and control system uses ADuC845 as the core device, with high sampling resolution (20 bits), small system temperature drift (10 nV/℃), stable operation, and strong anti-interference ability; the USB interface is used as the communication interface of the system, which is flexible to install, fast in transmission speed, high in reliability, and easy to expand; the PC is used to complete data analysis and data processing. Therefore, the system design is suitable for data acquisition and control fields such as medical equipment and industrial control systems.
Previous article:Design of aging test system based on CAN bus
Next article:Design and research of cable continuity tester based on PC104
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- Improvements and updates to the forum's "Invite Netizens" function
- Using Mao Zedong Thought to Improve the Efficiency of Counter-inspiration
- 【ST NUCLEO-H743ZI Review】(3)Ethernet to Serial Port Test
- What is the relationship between the speed ratio of the reduction mechanism and the lever ratio? What is the relationship between the force of the first gear and the last gear?
- Question about ADC
- BlueNRG-LP related information
- Android boot execution shell script
- Detailed steps to add ALTERA simulation library in ModelSimSE (1)
- Python for Data Analysis
- A super electronic capacitor to replace the farad capacitor