Tutorials to .com

Tutorials to .com » Mechine » Rf » ATmega16-based wireless sensor network node design

ATmega16-based wireless sensor network node design

Print View , by: iSee ,Total views: 14 ,Word Count: 1883 ,Date: Mon, 15 Jun 2009 Time: 2:51 PM

1 Introduction

Wireless sensor networks are widely used in military reconnaissance, environmental monitoring, targeting and other fields. In general, wireless sensor network node design requirements with low power consumption, low cost, long life and so on. Based on ATmega16 AVR microcontroller core components to a common Radio Frequency module 315 as a wireless transceiver module designed a wireless sensor network nodes. The system makes full use of ATmega16-rich single-chip-chip module 315 resources and better anti-interference characteristics, and can meet the design requirements under the premise of effectively reducing hardware costs, with high practical value.

2-node wireless sensor network system

Wireless sensor network nodes usually constituted by the 4 sub-systems, the system block diagram shown in Figure l.

ATmega16-based wireless sensor network node design

2.1 Calculation subsystem

Subsystem is usually calculated by a microprocessor and the corresponding communication protocol, data collection procedures, such as the composition. Nodes in order to reduce power consumption requirements of the microprocessor in a burst program will send the collected data sent in order to turn into low-power mode as soon as possible to extend the work of the energy subsystem asked.

Design of selected Atmel Introduces Single Chip type the ATmega16. ATmega16 is a structure based on the AVR RISC Advanced Flash-based 8-bit CMOS single-chip microcomputer, the data throughput of up to 1MI/s/MHz, can effectively alleviate the system power consumption and processing speed in the conflict between the. At the same time, ATmega16 chip integrates a wealth of resources: 16 KB of programmable Flash, 512 bytes EEPROM, l KBSRAM, the overwhelming majority of applications to meet the development requirements of its internal re-write the number of flash in the more than 10,000 greatly facilitate product development and software modifications: 8 10 with optional programmable gain differential input stage of the ADC can be a number of different types of external sensors: Support for six kinds of sleep mode, in which power-down mode and provincial electric power consumption mode only lμA ~ 2.5μA, can effectively reduce node power consumption; three flexible timer / counter (T / C) In addition to common features of the regular count, but also with input capture pulse, pulse width modulation output function: highly flexible programmable serial US-ART can be completed with other serial communications equipment.

ATmega16-based wireless sensor network node design

2.2 Communication Subsystem

By a communication subsystem comprising wireless transceiver for communication between nodes. When the wireless transceiver is idle when it should be closed in order to reduce node power consumption.

Design uses a common wireless transceiver module 315 as a long-range wireless transceiver (due to a frequency of 315 MHz transceiver name). 315 wireless transmitter circuit schematic diagram shown in Figure 2, it is by the SAW resonator (SAW) and high frequency components of the three-point transistor oscillator circuit. TXD input pin through transistor Q2 to control high-frequency oscillator. When TXD is high, the 02 turn-on, high-frequency oscillator start-up; When TXD is low when, Q2 ended, high-frequency oscillator to stop vibration. OC0 will ATmegal6 the TXD pin and connected to the output data to complete OC0 launch of OOK modulation.

315 wireless receiver circuitselected frequency by the circuit, high-frequency amplifier circuit,detection amplifier circuit and low-frequency components. It has a simple circuit, high sensitivity. Send modulation signal frequency-selective frequency-selective circuit, the demodulation circuit detectionfriends. Low-frequency amplifier by the amplified output from the output pin high. If no signal received, then the output low. detection by the characteristics of the circuit, we can see thatreceiver modules receive the signal in the absence of a few milliseconds after the output of a large number of white noise, until once again receive the signal.

Wireless transceiver module 315 of the largest transmission distance can reach 700 m ~ 800 m. Its star-shaped design of hybrid sensor networks can be used as long-distance transmission node, the node directly with the convergence of communication and avoid the short-range wireless sensor nodes with the cluster node multi-hop style of communication. Extended the life span of sensor networks. At the same time, it also has low-cost and simple interface, the advantages of anti-interference ability, which is widely used in alarm, remote control, industrial data acquisition system. Figure 3 is a wireless transceiver module 315 interfaces with the ATmega16 diagram.

ATmega16-based wireless sensor network node design

2.3 Power Subsystem

Energy sub-system components are often made from a battery. It determines to a large extent the life of wireless sensor nodes. Reduce the power consumption of wireless sensor node wireless sensor network design is a key element of success.

3 base-band pulse with coding schemes

315-type receiver modulereceived signals in the absence of a few milliseconds will produce white noise, the nature of the base-band pulse-code program can not be non-zero coding, or else send 0 in a row, the receiver module will be output white noise. In this paper, a category of Manchester encoding. With 50% duty cycle square wave that the integrity of the information symbols and the special control symbols. Square-wave cycle in order to distinguish between different information spaces of 0 and l, as well as other symbolic spaces. Baseband square wave shown in Figure 4, the symbol of the cycle as shown in Table l.

ATmega16-based wireless sensor network node design

ATmega16-based wireless sensor network node design

When the signal arrives, the receiving of data frames to receive the first module will be generated by the impact of white noise, white noise in order to eliminate the need in the data frame by adding a certain number of pre-code. The number of pre-code environment and with the wireless transmission module 315 of the component parameters. In general, more than a dozen pre-code to achieve better reception. Pre-Code immediately after the initiation of the sequence that started receiving data.

Hexadecimal number to send 0xAA (binary 10101010) for example, the data frame structure shown in Figure 5.

ATmega16-based wireless sensor network node design

4 Software Design

Wireless sensor nodes AVRX embedded operating system used. AVRX is an open source, specifically for AVR series microcontroller embedded operating system. Although difficult to transplant to other AVRX microprocessor, but occupy their own space program (including all the features of the version only with l 000 bytes), less consumption of SRAM and is conducive to the development of applications. Therefore, the design to give up portability, but its large consumption of the SRAM of the embedded operating system μCOS-Ⅱ.

4.1 launch of the software sub-module design

Sent to the data, first of all to the data symbols and control symbols into variable pulse width of the square wave. There are three types of its methods:

(1) PB3 pin as a general-purpose output pins, the use of AvrXDelay generate corresponding pulse width delay, the control of OC0 have a variable pulse width square wave. The disadvantage is that this method can not produce sufficiently accurate pulse width of the square, which is due to RTOS task scheduling overhead generated by the different.

(2) PB3 pin as a general-purpose output pins, the use of the preparation of the 50μs delay the achievement of the subprogram. Subroutine in the delay in the closure of the overall disruption of IE, stop the task scheduling and AVRX on ATmega16 interrupt response. This method can produce accurate square-wave pulse width, but the system in the launch of the data can not be dealt with during the other events, reducing the flexibility of the system.

(3) the use of the CTC model T/C0 pulse, when compare match PB3 pin as output pin OC0. When T/C0 in CTC mode, the settings TCCR0 in the COM01: 0 = l, then whenever the counter value TCNTO = OCR0 when, TCNT0 cleared to compare home match Interrupt Flag bit, at the same time the logic output pin OC0 Automatic reversal level. In comparing the match interrupted OCR0 values to modify, you can have a precise square wave pulse width. This method have delayed the use of hardware counters with accurate delay, occupying less system resources advantages. Therefore used in the design of a third possible way. Figure 6 shows the T/C0 flow chart of the interrupt service subroutine.

ATmega16-based wireless sensor network node design

Receiving sub-module 4.2 software design

ASK modulation signalfirst receiver module 315 into a square wave pulse from the data output pin attractive to the ICP pin ATmega16. ICES1 home to the TCCR1B after l, whenever a rising level .T/C1 when ICP pins to reach the total value will be copied to capture registers capture interrupt ICR1 and produce. In the capture interrupt service subroutine will occur next rising edge of cycle symbols can be obtained by T. In fact, as a result of capture in the interrupt service routines will be the end of the Federation of ICR1 cleared, so the time of interruption ICR1 value captured is the corresponding symbol cycle T.

receiver module 315 in the absence of signal will produce white noise, constant interruptions caused ICP, an increase of system costs. Design, there is no receiver module has been in a working state, but to take the sleep - monitor - receive (if any data) - the work of sleep mode to reduce system overhead. Figure 7 is the capture interrupt service subroutine of the state transition map.

5 Conclusion

Test the use of the PC-access network environment data generated through the wired network and wireless sensor nodes to send / receive data. The results showed that the ATmega16 mcu and the design of wireless communication module 315 of the wireless sensor network node with low power consumption, transmission distance and the advantages of anti-interference ability, is the formation of a wireless sensor network solutions for better .


Radio Frequency Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.