With the development and application of Internet of Things technology, A/D data acquisition is one of the important research topics. There are many implementation schemes for A/D multi-channel acquisition system. By comparing three implementation schemes, the STM32 series ARM chip is finally used for design. STM32 is a 32-bit processor based on ARM Cortex-M3 core. It has excellent power consumption control and numerous peripherals, and has a very high cost performance. It is gradually seizing the market of the original 51 and AVR in the electronics field. In this design, STM32F103RBT6 is used as the main controller. The chip has rich configuration and is convenient for future system function expansion.
1 Comparison and demonstration of schemes
In order to achieve the requirements of multi-channel data acquisition, the following three design schemes are proposed:
(1) Data acquisition system based on single-chip microcomputer
This scheme adopts the method of dual single-chip microcomputer, that is, single-chip microcomputer control is used at the far end and near end of data acquisition. The far end completes data acquisition, sampling, and transmission; the near end completes data reception, verification, processing and display, etc. The keyboard controls data display. In the communication between the near end and the far end, the RS 485 differential interface is used to improve the communication speed and transmission distance. The shortcomings of this solution are: the A/D interface and RS 485 interface are not convenient to program, the frequency range and rate of the collected signal are low, and the practicality is not great.
(2) Data acquisition system based on CPLD
The CPLD is used to collect and control the A/D chip, and transmit it to the host computer through the USB interface. The advantage is that it can achieve high collection rate and collection accuracy, and has great practicality, but the difficulty lies in the control of the A/D module by the CPLD and the configuration of the USB by the single-chip microcomputer.
(3) Data acquisition system based on ARM
The main controller of this solution uses the ARM chip of the STM32 series, and the solution is shown in Figure 1.
In this solution, the A/D converter is built into the ARM chip. The acquisition mode, start time and duration are controlled by the host computer through the RS 232 port, and the data is transmitted to the host computer through the USB interface for storage. Considering that there is no 232 interface when using a laptop as a control host computer, a USB to 232 cable is used to provide RS 232 control information.
Since the A/D chip is built-in, the chip price is also cheap, the circuit design is simpler than the previous one, and the ARM's own A/D acquisition methods are diverse, and can be realized by configuring the corresponding registers in the ARM chip, so it is easy to implement. Considering the subsequent expansion needs and the wide application and practicality, this design adopts this solution.
[page]
The circuit design principle is shown in Figure 2.
[page]
The circuit is mainly composed of power module, main controller module, display module, SD card module, USB to 232 module and other parts.(1) Main controller
The STM32F103RBT6 is used as the MCU, which has a high cost performance. The chip has 20 KB SRAM, 128 KB FLASH, 3 ordinary 16-bit timers, 1 16-bit advanced timer, 2 SPI, 2 I2C, 3 serial ports, 1 USB, 1 CAN, 2 12-bit ADCs, and 51 general I/O ports. Because the main controller STM32 is powered by 3.3 V, the 5 V voltage of the USB needs to be converted to 3.3 V. Here, the power linear regulator chip AMS1117-3.3 is used to convert 5 V to 3.3 V.
(2) Liquid crystal display
The circuit uses a universal LCD interface to support 8-bit or 16-bit bus or SPI LCD screen. The module uses a TFTLCD panel (thin film transistor liquid crystal display) to display 16-bit true color images, improve data display effects, and also can display the collected data in the form of graphical curves. The module has two screen sizes: 2.4'/2.8', with a resolution of 320×240, 16-bit true color display, and a built-in touch screen. The interface uses an 80 parallel port to connect to the outside and uses a 16-bit data line.
(3) JTAG
uses the standard JTAG connection method. The SWD interface of STM32 is shared with JTAG. As long as JTAG is connected, SWD mode can also be used to download and debug code. In most cases, SWD is used to download and debug code, which saves resources and has a fast download speed.
(4) SD card
Use SD card to expand the capacity storage device to save collected data in real time, which can make up for the situation where there is no host computer, and it is more convenient to analyze and process a large amount of data afterwards.
(5) A/D acquisition
STM32 itself has 1 to 3 ADCs, which can be used independently or in dual mode (to increase the sampling rate). The ADC of STM32 is a 12-bit successive approximation analog-to-digital converter. It has 18 channels and can measure 16 external and 2 internal signal sources. The A/D conversion of each channel can be performed in single, continuous, scan or intermittent mode. The result of ADC can be stored in a 16-bit data register in left-aligned or right-aligned mode. The maximum conversion rate is 1 MHz, that is, the conversion time is 1μs.
3 Comprehensive debugging results of software and hardware
Write the main modules of data acquisition, touch screen control, host computer control program and LCD display module program, download the program and perform system debugging, and the final effect is shown in Figure 3 and Figure 4.
The system can select single-channel or multi-channel loop acquisition mode for 8-channel data through the touch screen. The data acquisition results can be displayed on the LCD screen, transmitted to the host computer or saved in the SD card. By comparing the measured voltage and the voltage value acquired by the data, the measurement accuracy meets the design requirements.
4 Conclusion
This system has a simple circuit, low cost, and certain scalability and practicality. ARM's own A/D acquisition methods are diverse, which can be achieved by configuring the corresponding registers in the ARM chip, so it is easy to implement. The main controller STM32 chip is a 32-bit processor based on the ARM Cortex-M3 core. It has outstanding power consumption control and numerous peripherals. It has a very high cost-effectiveness. It has broad application prospects in many fields such as industrial control, consumer electronics, communication systems, network systems, wireless systems, etc., so it is worth studying and promoting.
Previous article:Fire control system signal acquisition test based on STM32 microcontroller
Next article:Application of ARM in GPS Navigation System
Recommended ReadingLatest update time:2024-11-16 22:38
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
- Does anyone have the schematic diagram of jmb366?
- If the clamp meter (multimeter) does not measure but there are still numbers, is it a malfunction?
- RK3399 open source motherboard hardware and software information released - free download
- Low Noise Amplifier LNA——ATF54143
- EEWORLD University Hall - Digital Oscilloscope Operation Digital Oscilloscope Operation_National Taiwan Normal University_Teacher Zhang Guowei
- [ESP32-Audio-Kit Audio Development Board Review] Part 1: Building esp-idf and esp-adf development environments based on vs code
- [Raspberry Pi Pico Review] Pico power supply part
- Live broadcast has ended | Microchip's latest SAM and PIC32 microcontroller software development platform - MPLAB Harmony V3
- [GD32E503 Review]——07.LCD Part 2: Drawing Custom Patterns
- Xiaozhi Science Popularization丨Why do instruments generally have set values and readback values?