Design of wireless acceleration measurement system based on nRF905

Publisher:RainbowPromiseLatest update time:2014-01-08 Source: 21icKeywords:nRF905 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

b.JPG


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.

c.JPG


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.

d.JPG


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]

e.JPG


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.

f.JPG


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.

g.JPG



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.

a.JPG



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.

Keywords:nRF905 Reference address:Design of wireless acceleration measurement system based on nRF905

Previous article:Research on Motor Control and Diagnosis Based on Ethernet
Next article:Design of intelligent seal machine based on STC89C52

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号