In the field of industrial control, it is often necessary to collect a large amount of field data, such as voltage, current, temperature, humidity, air pressure, etc., and transmit the data collected by these data acquisition modules to the host for processing. The host transmits the control signal to the field execution module for various operations based on the processing results. At present, data transmission usually uses networks such as RS485 or CAN. These networks are all based on wired transmission. The wired transmission method has problems such as difficult wiring and high maintenance costs. Wireless communication technology solves these problems and is therefore widely used in many occasions. With the rapid development of information technology, people need to be able to obtain a large amount of data accurately, quickly and portable, and transmit the collected data to the remote main control room through wireless transmission. Wireless transmission has certain advantages, with relatively low cost and less interference in transmission, which also improves the reliability of transmission to a certain extent. This paper combines single-chip microcomputer technology with data acquisition technology and wireless transmission technology to design a high-speed wireless data acquisition system.
1 Overall structure of wireless data acquisition system
The wireless data acquisition system first conditions the analog signal collected by the sensor through the signal conditioning module, then enters the A/D conversion port of the ADuC845 microcontroller for analog/digital conversion, and finally sends the data out through the PTR2000 wireless transceiver module. The hardware structure block diagram of the wireless data acquisition system is shown in Figure 1. It includes a signal conditioning module, a power module, an LED display and keyboard circuit module, a reset circuit module, a PTR2000 wireless transceiver module, an LCD display module, and a buzzer circuit module.
2 Selection of main chips
2.1 ADuC845 microcontroller
ADuC845 is a highly integrated microcontroller. The chip mainly consists of two multi-channel A/D converters that can both reach 24-bit resolution, a dual D/A converter, and an 8-bit programmable microcontroller. In the dual-channel ADC circuit of ADuC845, the main channel is used to convert the input of the first-stage sensor. The channel has buffering capabilities and can be programmed to 8 input ranges. The operating voltage is ±20~±2.56 mV and can be driven by one of the five differential input terminals. ADuC845 uses △-∑ conversion technology to achieve excellent performance of up to 24 bits without missing codes.
2.2 Wireless transceiver PTR2000
PTR2000 is a small, ultra-low power wireless data transceiver module. This module combines transmission and reception into one; it adopts FSK modulation/demodulation, can directly input/output, has strong anti-interference ability, and is particularly suitable for industrial control occasions; it adopts DDS+PLLL frequency synthesis technology, so the frequency stability is excellent; it has low power consumption and two channels, and is widely used in occasions where multi-channel work is required.
3 Hardware Circuit Design
3.1 Signal Conditioning Circuit Design
The design of the signal conditioning circuit is to use the amplifier circuit, buffer stage circuit, filter circuit, etc. to condition the non-electrical weak signal collected by the sensor into a measurable digital signal, so as to facilitate the subsequent processing or display of the detection system. The signal conditioning circuit is shown in Figure 2.
The signal collected by the temperature sensor AD590 is amplified by the amplifier circuit OP07, and the zero drift is performed by the addition proportional circuit. The amplification factor is adjusted by adjusting R1 to make the V1 voltage output between 0 and 2.5 V. Then it passes through the voltage follower OP491 and the filter circuit, and finally inputs into an AIN1 input channel of the single-chip microcomputer ADuC845.
The HIH3610 relative humidity sensor connects the collected signal voltage V2 to the signal conditioning circuit, and at the same time, the voltage signal is conditioned to meet the channel input voltage of ADuC845, and then enters the AIN2 input channel of ADuC845 through the voltage follower and filter circuit for data collection.
The 26PC pressure sensor is a differential pressure, gauge pressure, non-amplified and temperature-compensated pressure sensor produced by HoNEYWELL Company in the United States. After the input voltage (0-16 V) passes through the voltage follower circuit and the filter circuit, it is connected to the AIN3 input channel of the single-chip microcomputer ADuC845 for data collection. [page]
When the PTR2000 wireless transceiver module is connected to the microcontroller ADuC845, the D0 and D1 of the PTR2000 module are connected to the RXD and TXD of the ADuC845 respectively. The microcontroller can directly control the transmit/receive state of the transceiver module through the high/low level of the P3.2 position. The interface circuit of ADuC845 and PTR2000 is shown in Figure 3.
When the PC and PTR2000 are connected, the level conversion must be performed to convert the TTL level into the RS-232 level using MAX232. The level conversion circuit of PTR2000 and MAX232 is shown in Figure 4.
[page]
3.2 LED display and keyboard circuit design
The design of LED display and keyboard circuit is mainly used for acquisition, display, printing and other operations. ZLG7289 is an intelligent display driver chip with a serial interface that can simultaneously drive 8-bit common cathode digital tubes. The chip can also be connected to a keyboard matrix with up to 64 keys. A single chip can complete all the functions of LED display and keyboard interface without occupying the system resources of the single-chip computer.
The two pull-down resistors R1 and R2 of the circuit have a resistance value of 100 kΩ, and the 8 resistors connected to the 8 buttons and the bit selection lines DIG0~DIG7 are bit selection resistors. The SG~DP pins are row scan outputs, and the DIG7~DIG0 pins are column scan outputs. The LED display and keyboard circuit is shown in Figure 5.
4 Software Design
According to the functional requirements of the data acquisition system, the system software is designed. It includes the main program part and the subroutine part. The main program part mainly completes the system initialization work for each hardware, and the subroutine mainly completes the interaction with the microcontroller and realizes the functions of this part. The main program flow is shown in Figure 6.
The subroutines include A/D conversion, LED display and keyboard, communication module and wireless transceiver module. The data acquisition subroutine is used to start A/D conversion, store the collected values in the internal RAM and send the sampled values to the display buffer. The setting and control of ADC is realized through a group of registers in the special register. When collecting data, the method of collecting once at a certain interval and taking the average value after collecting multiple times can be adopted to reduce the error brought by the system. The A/D data acquisition process is shown in Figure 7.
The main functions in the ADC program are:
◆ void InitTIATION(), the main function is port initialization, mainly including initializing ADC, RAM, and reading and writing initialization;
◆ void ADC_Int(), ADC initialization function;
◆ void Delay(), delay function;
◆ void Extern_Interrupt_Open(), open external interrupt function;
◆ void Extern_Interrupt_Close(), close external interrupt function;
◆ void ADC_Conversion_Start(), A/D conversion start function.
The display subroutine is responsible for displaying the data in the display buffer. The monitoring subroutine is responsible for the normal operation of the system, as well as calling various subroutines and managing interrupt service programs. The communication sending subroutine of the system is responsible for communicating with the PC and sending the collected data. The communication receiving subroutine of the PC is responsible for receiving and processing the data sent by the single-chip microcomputer.
5 Conclusion
The data acquisition system makes full use of the multi-channel high-speed data acquisition characteristics of ADuC845 to realize the acquisition and processing functions of temperature, humidity, pressure and other signals; ADuC845 has two independent high-resolution (24-bit) A/D converters, and the temperature drift and offset coefficient are very small, which meets the requirements of high-speed data acquisition systems. The PTR2000 wireless data transmission module is an ultra-small, low-power, high-speed wireless transceiver transmission module. Through the PTR2000 wireless transmission chip, a wireless data acquisition system integrating data acquisition, processing, display and control is constructed. The system has the advantages of high accuracy, high speed and low cost.
Previous article:Brief Introduction to the Design of Single Chip Microcomputer Power-off Protection Circuit
Next article:Microcontroller controller improves TV image quality for large-screen LCDs
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
- Selection of power supply decoupling capacitors
- 【Anxinke NB-IoT Development Board EC-01F-Kit】3. Serial port networking test
- STM32 DCMI driver OV2640 project source code
- Embedded USB driver-free device communication method based on WinUSB
- Generate random 0,1 signal
- Problems using Saber to simulate SPWM driving H-bridge via 2110
- Espressif ESP32-Korvo Audio Development Board Review Summary
- STM32mini MCU external clock method high-precision frequency capture
- TI DSP Bit Field and Register-File Struc...
- Analysis of the amplifier circuit of the photoelectric smoke detector