0 Introduction
Wireless sensor network (WSN) is a self-organizing network that consists of a large number of low-cost, resource-limited sensor node devices that work together to achieve a specific task. Due to the characteristics of easy scalability, self-organization, distributed structure and real-time performance of wireless sensor networks, the application of wireless sensor networks has expanded from the military field to many other fields, such as environmental monitoring, climate monitoring, target tracking, industrial automation, etc., and also provides a large application space for future telemedicine and space exploration.
The architecture of wireless sensor network is shown in Figure 1, which usually includes sensor nodes, sink nodes, external network and user interface. A large number of sensor nodes are randomly deployed inside or near the sensing area (SensoRField), and can form a network through self-organization. The sensor nodes transmit the collected data along other sensor nodes hop by hop. During the transmission process, the collected data may be processed by multiple nodes, and then reach the sink node after multi-hop routing. The sink node then transmits the data to the processing center through the external network for centralized processing.
1 System Hardware Design
The hardware of the terminal node of the wireless sensor network generally includes a data processing unit, a wireless transmission unit, a sensor collection unit and a power supply unit. As shown in Figure 2, the sensor collection unit can select the corresponding sensor for measuring physical quantities according to the application background. Since most of the system is in low power mode, the power supply unit can use No. 7 batteries. The following focuses on the data processing unit and the wireless transmission unit.
1.1 Data processing unit
MSP430 is a 16-bit microcontroller with ultra-low power consumption. This solution uses MSP430F148, whose power consumption has reached the μA level. 16-bit CPU and efficient RISC instruction system, no external data address bus, can reach 125ns instruction cycle at 8MHz, with 16 fast response interrupts, can handle various emergency events in time. Rich on-chip peripheral function modules: 12-bit A/D converter ADC12 includes ADC core with sampling/holding function, conversion storage logic, internal reference level generator, multiple clock sources, sampling and conversion timing circuits. There are 8 external channels, 4 internal channels, up to 200kbps sampling rate, and multiple sampling methods. Two USART communication serial ports can be used in UART and SPI modes; there are precision hardware multipliers, two 16-bit timers, 6 parallel ports P1~P6, 48 I/O lines on the chip, and it has 64KB flash memory for storing collected data.
1.2 Wireless transmission unit
This system uses the 2.4GHz wireless single-chip transceiver chip NRF2401, which has the characteristics of small size, low power consumption, and few peripherals, and is very suitable for wireless transmission application systems. nRF2401 can be connected to the microprocessor via the SPI interface, and the setting and data transmission and reception are completed through this interface. Many microcontrollers have integrated SPI controllers, such as MSP430, which can easily set up to 40-bit addresses through software. Data will only be output when the local address is received (an interrupt indication is provided), and point-to-multipoint operation is supported, which is very convenient for programming. nRF2401 is connected to the microcontroller using the SPI interface, and the schematic diagram is shown in Figure 3. SPI bus interface technology is a high-speed, high-efficiency serial interface technology, mainly used to expand peripherals and exchange data.
2 Software Design
The software development is based on IAR Workbench V3.1 and is written in C language. The basic idea of software programming is: first initialize the SPI and nRF2401 control ports; enable the SPI and UART ports, enable ADC, and initialize the nRF2401 chip; after turning on the receiver, you can run the task program to receive or send data. The operation process for nRF2401 is as follows:
nRF2401 has 4 working modes: transceiver mode, configuration mode, idle mode and shutdown mode. The working mode of nRF2401 is determined by three pins: PWR_UP, CE, TX_EN and CS. The operation of nRF2401 is mainly to configure its working mode and read and write data. All configuration command words and data are completed through the CLK and DATA pins of the synchronous serial port. To set nRF2401 in ShockBurstTM mode, first make the PWR_UP pin high and the CE pin low. The configuration word is sent to nRF2401 in sequence starting from the highest bit, and the data is locked on the falling edge of CLK. After the configuration command word is sent, it starts working according to the setting of the new configuration word on the falling edge of CS. When using nRF2401 to send data, the following steps are used: 1) CE is set high to start nRF2401; 2) write the address of the receiver bit by bit; 3) write the data to be transmitted bit by bit; 4) CE is set low to stimulate nRF2401 to perform ShockBurstTM transmission. The ShockBurstTM transmission process of nRF2401 is: power the RF front end, package the RF data (add header, CRC check code), transmit the data packet at high speed, and after the transmission is completed, nRF2401 enters the idle state. The interface module pins of nRF2401 include CE, DR1, CLK1 and DATA (receiving channel 1). The receiving end receives data according to the following process: 1) Configure the local address and the size of the data packet to be received; 2) Enter the receiving state, and set CE high; 3) After 200μs, nRF2401 enters the monitoring state and waits for the arrival of the data packet; 4) When the correct data packet is received, nRF2401 automatically removes the header, address and CRC; 5) nRF2401 notifies the microcontroller by setting DR1 (which can be used as an interrupt signal) high; 6) The microcontroller shifts the data out of nRF2401 bit by bit; 7) After all the data is moved, nRF2401 sets DR1 low. At this time, if CE is high, it waits for the next data packet. If CE is low, start other work processes.
Some of the codes used in the program are as follows:
Considering the reliability of point-to-multipoint communication, necessary protocol specifications need to be added in the underlying wireless transmission of data. In the design, valid data is packaged in the following format: preamble, address, valid data payload, checksum.
3 Conclusion
The wireless sensor network node design based on MSP430 and NRF2401 has shown good results in the experiment, and can realize the acquisition, transmission and processing of signals in the monitoring area. However, due to the RF chip itself, the transmission distance will be affected by obstacles and the setting frequency. These problems need to be further studied. With the maturity of wireless network technology, the application of wireless sensor networks will be widely used in various fields such as environmental monitoring, target tracking, and industrial automation.
Previous article:Design of infrared communication interface based on Lingyang SPCEO61A
Next article:Design of using 51 single chip microcomputer to control LED dot matrix
Recommended ReadingLatest update time:2024-11-16 22:56
- Popular Resources
- Popular amplifiers
- MSP430 series single chip microcomputer system engineering design and practice
- oled multi-chip calling program
- Microcontroller Principles and Applications Tutorial (2nd Edition) (Zhang Yuanliang)
- Getting Started and Improving MSP430 Microcontrollers - National Undergraduate Electronic Design Competition Training Course
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
- Technical article: The magic of energy monitoring in DC systems
- Please give me some advice on the previous interview questions.
- cc2640 details display
- Powering a Boost Topology Battery Charger with a Solar Panel
- [RISC-V MCU CH32V103 Review] USB flash drive read and write test
- NI Special Month, enjoy up to 40% off on software and more!
- Help: About the ESP32 Anxinke integrated environment project import compilation error
- Various PCB onboard antennas and PCB design points
- 【Silicon Labs Development Kit Review 06】_Transplanting freertos+Vcom+LED
- Agilent fully supports TD-SCDMA testing and increases R&D investment in China