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.
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 Main Program Design of the System
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
4.2 A/D sampling program
The following is a partial 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; using the USB interface as the communication interface of the system, it is flexible to install, fast in transmission speed, high in reliability, and easy to expand; using the PC 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:Application of PMAC motion control card in AGV control system
Next article:Monitoring Historical Sites Using LabVIEW and NI Wireless Sensor Networks
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- FPGA technology introduction and FPGA application fields
- What is a recording digital pressure gauge? In what fields is it used?
- Basic learning of programming
- [Synopsys IP Resources] Automotive cybersecurity starts with chips and IP
- From design to market launch - how many batons are needed in this 5G terminal relay race?
- Ferroelectric Random Access Memory (F-RAM) and Device System Design
- 【FAQ】Secure Boot of Microprocessors | Microchip Security Solutions Seminar Series 7
- Application of “C2000+TMS570” dual-chip solution in automotive electric drive functional safety
- The role of capacitors and inductors in circuits
- I recently played with RTT's MicroPython on STM32407, and the IDE is really easy to use.