0 Introduction
The development of microelectronics and micromechanical (MEMS) technology has made modern sensor design develop in the direction of miniaturization, intelligence, integration, and low power consumption. MEMS technology has broken through the technical bottlenecks of mass, volume, power consumption, etc. in traditional sensor design, and has been widely used in various measurement fields. With the development of wireless technology, sensor technology and wireless technology are increasingly integrated. The use of wireless technology to develop signal acquisition wireless transmission modules can overcome the disadvantages of wired transmission.
This paper combines the three-axis linear MEMS inertial sensor LIS331DL and the single-chip wireless transceiver nRF905 to build an acceleration measurement wireless transmission system to avoid the adverse effects and inconvenience caused by the use of transmission wires. The system is characterized by integrating power supply, acceleration sensor, microcontroller, and RF transceiver. It has a small size and low power consumption, and can measure the acceleration of moving objects in three directions. The designed system device can be easily fixed on the moving object, especially suitable for measuring the acceleration of moving objects in close and complex environments.
1 System composition and working principle
The overall composition of the system is shown in Figure 1. The system is divided into two parts: master and slave. The slave is responsible for measuring the acceleration of the moving object and transmitting the measured data through radio frequency transmission; the host is responsible for receiving the data transmitted by the slave, displaying the data in real time, and saving the data results to the PC through the RS 232 serial port for analysis.
The system is powered by a battery and is in standby mode when not in working mode. The switch between working mode and standby mode is realized by controlling the buttons to further save power consumption and ensure long-term battery operation.
2 Hardware Design
The hardware design mainly includes the design of the peripheral connection circuit between the sensor and the microcontroller, the design of the peripheral connection circuit between the RF transceiver and the microcontroller, etc.
2.1 Microcontroller
After comparison, the high-speed C8051F310 microcontroller is selected as the microcontroller of the system. C8051F310 is a fully integrated mixed-signal system-on-chip MCU chip with a truly independent working system-on-chip with on-chip power-on reset, VDD monitor, watchdog timer and clock oscillator, and rich on-chip peripherals.
2.2 LIS331DL sensor circuit design
LIS331DL is a three-axis linear acceleration sensor with the smallest package (LGA16 package, 3 mm×3 mm×1 mm) and the lowest power consumption (less than 1 mW) in the ST nano motion sensor family.
The logic block diagram is shown in Figure 2. There are three sensitive mass blocks placed perpendicular to each other inside the LIS331DL. When there is external acceleration, the sensitive mass block will deviate from its equilibrium position by a certain displacement. The greater the external acceleration, the greater the displacement. Since the sensitive mass block is located between the capacitor composed of two electrodes, the change in the displacement of the mass block will cause the change in the amount of charge at both ends of the capacitor electrodes. The change in the amount of charge is converted into a change in voltage through the capacitor/voltage converter. The A/D converter converts the analog voltage value into a binary digital value and outputs it in the form of binary complement from the three output axes of the I2C/SPI serial interface. The chip can measure the linear acceleration of a moving object in three-dimensional space. The vector sum of the accelerations on the three output axes is the acceleration of the moving object.
The chip has a standard I2C/SPI serial bus interface and built-in embedded functions, providing users with two dynamically programmable ranges of ±2g/±8g to adapt to different applications, and the data output rate can be programmably selected as 100 Hz/400 Hz to adapt to the rate requirements of different peripherals. When the external acceleration value exceeds the programmable acceleration threshold of at least one of the three output axes, the chip can be configured to generate an inertial wake-up/free fall interrupt signal. LIS331DL can withstand 10,000g acceleration shocks while maintaining performance.
The circuit connection between LIS331DL and C8051F310 is shown in Figure 3. C8051F310 has a standard SPI serial interface inside. Through the cross switch, the four-wire SPI external pins of C8051F310 (host) are configured on the four pins P0.0 (bus clock SCK), P0.1 (master slave output MISO), P0.2 (master output slave input) and P0.3 (slave SPI chip select CS). LIS331DL acts as the slave of the SPI bus. The host and slave transmit data through the SPI bus. The bus clock is determined by the host. The two interrupt flag output pins of the slave are connected to P0.6 and P0.7 of the host. The cross switch in the host configures the two external interrupt flag input pins to P0.6 and P0.7, which are connected to the two interrupt flag output pins 9 and 11 of the slave. In this way, the functions of LIS331DL can be expanded (free fall interrupt detection, internal wake-up, etc.).
2.3 nRF905 MCU Wireless Transceiver Circuit Design
The nRF905 RF chip is used as the RF transceiver in this measurement system. The nRF905 uses Nordic's VLSI ShockBurst technology. ShockBurst technology enables the nRF905 to provide high-speed data transmission without the need for expensive high-speed MCUs for data processing/clock coverage. By placing high-speed signal processing related to the RF protocol into the chip, the nRF905 provides the microcontroller with an SPI interface, the rate of which is determined by the interface rate set by the microcontroller. The nRF905 reduces the average current consumption in the application by reducing the rate of the digital application part when the RF is connected at the maximum rate through the ShockBurst working mode. [page]
The circuit connection between nRF905 and C8051F310 is shown in Figure 4. The SPI synchronous serial port of C8051F310 has been used as the communication interface with LIS331DL. In order to make full use of the pin resources of C8051F310, the four IO ports P1.0, P1.1, P1.2 and P1.3 of C8051F310 form an analog SPI serial port and connect it to the SPI port of nRF905. The data is transmitted in a single-byte shift-by-shift manner.
C8051F310 is used as SPI master and nRF905 is used as slave. The master provides the master analog SPI clock at P1.0 pin, P1.1 pin is used as the master analog MISO line, P1.2 pin is used as the master analog MOSI line, and P1.3 pin is used as the slave SPI chip select line. The master configures the slave related registers in the configuration mode through this analog SPI serial port; transmits the transmission data and reads the reception data in the RF transmission and reception mode. The working status interface of nRF905 consists of CD, AM and DR; the working mode control pins consist of PWR, TRX and TX. C8051F310 sets the working mode of nRF905 through P1.4, P1.5 and P1.6. The specific mode settings are shown in Table 1.
After entering ShockBurst RX mode for 650μs, nRF905 continuously detects and waits for receiving data. When a carrier of the same frequency band is detected, the carrier detection pin CD is set high. When a matching address is received, the address detection pin AM is set high. When a correct data packet is received, nRF905 automatically removes the header, address and CRC check bits, and then sets the DR pin high to notify the MCU to read the data. After the data is read, the DR pin is set low.
When there is data to be sent, the MCU transmits the address of the receiver and the data to be sent to the nRF905 in sequence. The SPI interface rate is determined during the communication protocol and device configuration. After entering Shock Burst TX mode for 650us, the RF register is automatically turned on, data is packaged (adding header and CRC check code), and the data packet is transmitted. When the data transmission is completed, the DR pin is set high to notify the MCU that the data has been successfully sent.
3 Software Design
The software adopts a structured programming method and consists of a main program and each task subroutine. After the system is powered on, C8051F310 completes the initialization of itself, LIS331DL sensor and RF transceiver nRF905, and decides whether to enter the working state according to the key value level.
After the slave enters the working state, C8051F310 reads the values of the X, Y and Z axis registers of the LIS331DL sensor through the SPI synchronous serial port, calculates the acceleration value based on the three values, and then transmits the value together with the host address through the analog SPI port to nRF905, which automatically completes the data transmission; after the host enters the working state, it continuously detects the effective carrier. When the carrier carrying effective data appears, nRF905 automatically completes the removal of the address, CRC check bit and acceleration data extraction operation in the data packet. After this operation is completed, it notifies C8051F310 to read the data until the data is read. C8051F310 displays the data on the LCD1602 liquid crystal display first, and then saves the data to the PC through RS232. The system program flow is shown in Figure 5.
4 System Debugging
The system was tested on a rotating test bench. The test plan is: the slave is fixed at a certain distance from the center of the rotating table, and different normal accelerations are obtained by adjusting the rotation speed of the rotating table. The slave measures the normal acceleration, and the measurement results are transmitted to the host in a radio frequency manner for display and storage. The system operates reliably in the test, and the measurement results are highly accurate. The use of digital radio frequency transmission makes the data transmission bit error rate extremely low. The principle prototype is shown in Figure 6.
5 Conclusion
The wireless digital transmission method avoids the influence of the internal resistance and stray distributed capacitance of the transmission wire, ambient temperature, electromagnetic interference, etc., and is particularly suitable for measuring the acceleration of moving objects in complex environments. This feature is unmatched by wired transmission methods.
Previous article:Research on Motor Control and Diagnosis Based on Ethernet
Next article:Design of intelligent seal machine based on STC89C52
- Popular Resources
- Popular amplifiers
- Evaluating Roadside Perception for Autonomous Vehicles: Insights from Field Testing
- CVPR 2023 Paper Summary: Efficient and Scalable Vision
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- Based on NRF905 wireless transmission module RF design including schematic diagram and source program
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
- Qinheng CH579M-R1 development board free evaluation activity is coming soon, tell us what you think of this board~
- MPS Bonus Sharing | Which problem gives you the most headaches in inductor applications?
- Let's take a look at the 3D SmithChart made by experts
- RVB2601 development environment setup and the first program
- 15 "Wanli" Raspberry Pi car - photoelectric encoder learning (forward and reverse judgment)
- A TOF "image" sensor that is worth playing with, VL53L5CX
- ARM immediate number explanation--the difference between LDR and MOV
- i.MX283 latest virtual machine system guide
- TI C5000 compiler error message list
- TI Award-winning Live Broadcast: Talking about "packaged antenna" smart millimeter wave sensors, even novices can handle industrial robots