Design of WSN node based on MSP430 and NRF2401

Publisher:RadiantGlowLatest update time:2009-12-09 Source: 国外电子测量技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Wireless Sensor Network Architecture

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.

Wireless sensor network terminal nodes

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.

Schematic diagram of nRF2401 and MCU using SPI interface

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:

program

program

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.

Reference address:Design of WSN node based on MSP430 and NRF2401

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

Research on Debugging Programs in RAM of MSP430
Let me first talk about the IDE and hardware I use. The IDE is IAR integrated development environment. I have used IAR since I learned microcontrollers. I have also used CCS, but I don’t think it is as easy to use as IAR. If you are a CCS enthusiast, please study how to set up CCS to debug the MSP430 program in RAM. I
[Microcontroller]
Application of MSP430 microcontroller in power supply control
The MSP430 series microcontroller is a new generation of 16-bit microcontroller produced by TI in the United States. It is an ultra-low power mixed signal processor (MixedSignal Processor). It has the advantages of low voltage, ultra-low power consumption, powerful processing capability, stable system operation, ric
[Power Management]
Application of MSP430 microcontroller in power supply control
Use of MSP430 digital tube Ⅰ
First of all, you should understand the digital tube and its working principle. Understand whether you are using a common cathode or common anode digital tube, and secondly, understand the segment selection of the digital tube. Next is a routine #include msp430f149.h      typedef unsigned char uchar;      #define
[Microcontroller]
Summarize some alternative issues in developing and debugging the MSP430 series
Primitive level problems, usually the problems that the beginners will encounter. 1. After connecting the emulator, it is found that the download cannot be made. IAR prompts that the target cannot be found!??     Possible reasons: A. The parallel port drive capability is insufficient. Set it to ECP or ECP+EPP mod
[Microcontroller]
MSP430F149 MCU uses the serial port to send data to the PC
#include void Init(void);//Declare initialization function char Data ="a:bcd\n"; //The string to be sent usually has a default \0 terminator at the end void main(void) { unsigned int i,k; WDTCTL = WDTPW + WDTHOLD; Init(); //Call initialization function while(1) //Infinite loop { for(i=0;i 6;i++) { TXBUF0=D
[Microcontroller]
msp430 temperature measurement (debugged OK)
#include  MSP430x12x2.h   #define TEM_ADC_CHL 0x0a  void InitSys(void);  void Read_ADC(unsigned int INCH_channel);  void ADC_TO_TEM(void); unsigned int ADC_sample_val;  unsigned int long temp1,temp2;  unsigned int long IntDegC;  unsigned int long IntDegF;  void main(void)  {      InitSys();          while(1)      {   
[Microcontroller]
MSP430F5529/G2553 MCU frequency setting program
MSP430F5529/G2553 MCU frequency setting C language program: #include "msp430F5529.h" #define P15_H    (P1IN & BIT5); #define P15_L   (P1OUT & (~BIT5)); int tt=0,temp,kk,i; void delay(int ns) {   int kk;   while(ns--)     for(kk=0;kk 120;kk++); } //******A/D conversion function settings*****// v
[Microcontroller]
MSP430 SD card SPI read and write operations (1) —— SD card commands
This section introduces the commonly used SD card commands, including the commands for initializing, reading, and writing SD cards and their responses. First, attach the SD related document download address: https://www.sdcard.org Quick navigation: 1. SD card introduction 2. SD card register 3. SPI mode command forma
[Microcontroller]
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号