WSN1120L / WNS1120CL Block Diagrams

 

wsn1120l_block_diagram

WSN1120L Hardware Block Diagram

 

wsn1120cl_block_diagram

WSN1120CL Hardware Block Diagram

 

Advertisements

Work in progress – New Micro

It’s  been a while  since we upgraded the microcontroller on WiSense nodes. The last upgrade was from the MSP430G2553 to the MSP430G2955.

The MSP430G2955 has 56 KB code memory (on chip flash) , 4 KB of  RAM and max clock speed of 16 MHz. The current  set of features  have  exhausted the code  memory so it is time to move to another member of the MSP430 family. This time we are upgrading to the MSP430F5419A. This is  a 100 pin micro with 128 KB  of  code  memory (again  on chip flash) and 16  KB of RAM. This micro can run at a  max  speed of 25 MHz. It has far  more  GPIO  pins (87 compared to 32 on the G2955). It has 16  12-bit SAR ADC  channels  compared  to 12 10-bit SAR ADC channels  on the  G2955. The  F5419A  has  4 “Universal Serial Communication Interface (USCI) blocks” compared to 2 on the G2955A. Obviously the F5419A costs more. So it is an upgrade on all fronts.

Since we chose to have separate PCBs  for the  micro and the  radio, changing either the radio or the micro is not a big effort.

Reduced  function devices can still use the MSP430G2955 but all FFDs and coordinator nodes will use the  MSP430F5419A going forward.

Board changes will include a 25 MHz crystal for the F5419A  and a  bigger external  EEPROM  to accommodate two 128 KB  images (for  firmware upgrade). Will add a JTAG  interface in addition to the 2 pin SPY-BI-WIRE. Debugging with the full JTAG  interface is far more convenient (and fast) compared to the SPY-BI-WIRE interface. I  have not yet decided on the PCB size and the number of GPIO pins which will be exposed.

The advantage of sticking with the MSP430 family is that all the code base (pretty big now) runs on the F5491A as it is. Peripheral register naming is slightly different between the F5419A  and the G2955. The F5419A has a highly configurable 12 bit ADC so all the device drivers using the simpler  10 bit ADC on the G2955 need to be modified to use  the new  12 bit ADC module.

I  was able to interface the CC1120 radio and  got the UART working on the F5419A. I tested both the FFD and Coordinator configurations. Looks good so far. Was not able to get the clock speed to 25 MHz maybe because I am currently using the MSP-TS430PZ5x100 Target Socket Module instead  of a PCB mounted micro.

Here are some pics of the eval setup.

img_1862

 

img_1863

 

 

For more information, please visit wisense.in.

WSN1120L/WSN1120CL with low profile radio boards

We reduced the size of the radio boards  on our WSN1120L and  WSN1120CL nodes. The earlier version (WSR1120 Rev 1.0) of the radio board had both a U.FL connector and a PCB antenna. The new version (WSR1120 Rev 2.0) only has a U.FL connector. The dimensions of the new radio board are 27.5 mm x  27.5 mm. These radio boards use the CC1120 radio from TI.

 

cc1120_latest_ffd

WSN1120L  with the new radio board (WSR1120 Rev 2.0)

 

 

cc1120_latest_coord

WSN1120CL with the new radio board (WSR1120 Rev 2.0)

 

wsn1120l

WSN1120L  with the earlier version of the radio board (Rev 1.0)

 

For more information, please  visit wisense.in.

Effect of temperature on WiSense nodes

All WiSense sensor nodes use low cost RF crystals for the radio (CC1120 or CC1101). The crystal oscillator generates the reference frequency for the radio’s frequency synthesizer, as well as clocks for the ADC and the digital part. For example, the WSN1120L/WSN1120CL nodes use a 32 MHz cystal (FA-128-32MHz from Epson).

If the crystal frequency is incorrect, the transmitter carrier frequency and the receiver LO frequency will also be incorrect. The crystal frequency error is due to  initial tolerance, capacitive loading errors, ageing, and temperature drift.

Example: If the crystal frequency has an error of +/- X ppm (parts per million) the RF frequency  also has an error of +/- X ppm. As an example, if the crystal error is say +10 ppm and the CC1120 is programmed for a carrier frequency of 866 MHz, there will be an error in the carrier frequency of 866 *(10^6)* 10 * (10^-6) = 8.66 kHz.

Carson’s rule states that  nearly all (~98 percent) of the power of a frequency-modulated signal lies within a bandwidth  “BWsig” where

BWsig = dr + 2*fdev

Where  “dr” is  the data  rate and “fdev” is the frequency deviation around the carrier frequency.

If both the transmitter and receiver crystal accuracy is ±10 ppm and the CC11xx is
programmed for a carrier frequency of 866 MHz ,

BWchann > BWsig + 4 * XTALppm * fRF = BWsignal + 4*10*(10^-6)*866*10^6 Hz.

Let us take a narrow band application with raw data rate of 1.2 kbps using 2-GFSK modulation and  frequency deviation of 4 kHz.

BWsig = 1200 +  2*4000 = 9.2  kHz

BWchann > 9.2 kHz +  4*8.66 kHz

BWchann > 34.64 kHz

You can easily see  that  the channel bandwidth requirement is  dominated by the +/- 10 ppm crystal tolerance figure !.  Note that as channel bandwidth (programmed as  the  RX  filter bandwidth parameter in radios  such as  CC1101  and  CC1120) increases, radio range decreases. So it is important to keep the channel bandwidth to the minimum required to carry the modulated RF signal.

 

Temperature has a significant effect on crystal frequency. In our  tests using WSN1120L nodes, we saw large carrier frequency drifts when subjected to different temperatures.

The snapshot below shows the carrier frequency (865.999687 MHz) at 21 deg C (room temperature).

rssi_866m_21degc

 

The snapshot below shows the new carrier frequency (866.5 MHz) at 6 deg C (node inside a refrigerator)

rssi_866m_6degc

Frequency drifts because of environmental conditions (such as temperature) are big problem for narrow band channels (channel bandwidth around 25 kHz or less).  If channel spacing is low, RF signal on adjacent channels can overlap. Frequency drift between two nodes (on the same channel) can cause the nodes to loose communication if the transmissions fall outside the programmed RX filter bandwidth (on each node).

In narrow band radio devices (such as WiSense nodes) are installed outdoors, they should be inside weather proof enclosures to minimize frequency drift due to environmental conditions.

One approach is to use a temperature sensor mounted near the RF crystal and tune the radio carrier frequency based on the temperature.

Another  (more complicated) approach is to use a tighter tolerance crystal on the coordinator node’s radio and let the other nodes  in the network track the coordinator’s frequency using the CC11XX automatic frequency compensation feature.

Why not use crystals with tighter tolerance across a wide temperature range? The simple reason is cost.

The CC1120 radio supports  low cost crystals (32 MHz) as  well as  temperature compensated crystal oscillators (32 MHz TCXO). On the CC1120, either a crystal can be connected to XOSC_Q1 and XOSC_Q2, or a TCXO can be connected to the EXT_XOSC input. The problem is that a TCXO  can cost more than the total  cost of a WSN1120L/WSN1120CL  node !!.

 

References:

 

WiSense Radio Configuration

The CC1120  radios on  the  WSN1120L  and  WSN1120CL  are configured to operate in the  865-867 MHz license free band in India. The modulation used is GFSK (Gaussian FSK).  The  data rate is configurable (example – 1.2 kbps, 10 kbps, 20 kbps and so on). Higher data rate translates to higher channel bandwidth (receiver filter bandwidth) which translates to higher channel noise (lower SNR) seen in the receiver resulting in reduced range.

Carson’s rule states that  nearly all (~98 percent) of the power of a frequency-modulated signal lies within a bandwidth  “BWsig” where

BWsig = dr + 2*fdev

Where  “dr” is  the data  rate and “fdev” is the frequency deviation around the carrier frequency.

Taking into consideration crystal inaccuracy, the minimum channel bandwidth “BWchann” required comes  to –

BWchann >  BWsig +  4*XTALppm*fRF

-Or –

BWchann >  dr + 2*fdev + 4*XTALppm*fRF

where “XTALppm”  is the total accuracy of the crystal including initial tolerance, temperature drift, loading, and ageing.

and

fRF” is the carrier frequency which will be 866 MHz (at the center of the 865-867 MHz license free India band) in our application.

Modulation index for  FSK modulation (h) is given by –

h = 2*fdev / dr

for example, if deviation is +/- 4 kHz and the data rate  is 1.2 kbps, then the modulation index is (2*4000) / 1200 = 6.666.

The chosen frequency deviation “fdev” will impact sensitivity and occupied bandwidth in opposing directions. For a fixed RX filter BW and data rate, higher deviation will give better sensitivity;

Theoretically, there is an optimum separation/data-rate setting if you simultaneously minimize the receiver filter bandwidth. Every halving of receiver filter bandwidth increases sensitivity with 3 dB whereas sensitivity vs separation/data-rate decreases with about 1.5-2.5 dB per halving down to a certain limit where the loss increases very fast.

The CC1120 operates well at modulations indexes of 0.5 and above.

Let us look at some settings for the CC1120 Radio in a WiSense LPWMN  node.

Crystal specs

  • Crystal frequency: 32 MHz
  • Crystal tolerance:  +/- 10 ppm @ 25 deg C
  • Crystal operating range: -40 deg C to +85 deg C
  • Crystal frequency vs temperature variation: +/- 20 ppm
  • Crystal frequency aging: +/- 1 ppm per year (max)

 

Setting #1:

Radio configuration

  • Modulation: 2-GFSK
  • Bits  per symbol:  1
  • Data Rate: 1.2 kbps
  • Frequency  Deviation: +/- 3.997803 kHz
  • Carrier frequency: 865-867 MHz
  • Channel  BW (RX filter BW): 25 kHz
  • Feedback to PLL feature: Enabled

BWsig = 1200 + 2*3998 = 9196

Taking crystal inaccuracy (+/- 10 ppm) in consideration,

BWchann = 9196+ 4*10*(10^-6)*866*(10^6) 

BWchann = 43836 Hz  or 43.84 kHz

Modulation index = (2*3998) / 1200 = 6.66 (Minimum for CC1120 is 0.5, higher the better)

TI recommended setting for this configuration is 25 kHz which is  less than 43.84 kHz. The  CC1120  has a feature called feedback to PLL (F2BPLL) which increases the effective RX filter bandwidth without degrading the noise bandwidth and hence  the sensitivity. Feedback to the PLL “increases the RX filter” and thus allow for a less accurate crystal to be used. The noise bandwidth, and hence sensitivity, will not increase when enabling this feature. Enabling feedback to PLL increases BW from “programmed RX filter BW” to “programmed RX filter BW +/- RX filter BW/4”. For example, when RX filter BW is configured as 25 kHz, the effective RX filter BW increases  to  25 +  (25/2) = 37.25 kHz. The only downside of using  the F2BPLL is the need for a longer preamble length (of 4 bytes) instead of say just 2 bytes.

For best sensitivity we need to use the lowest RX filter BW possible. So an effective RX  filter BW of 37.25 kHz is a good compromise for this application.

In addition, each WiSense node’s carrier frequency frequency  error (due to the crystal’s initial crystal tolerance  of +/- 10 ppm) is removed by

  • Configuring  the radio to output an un-modulated continuous  wave (CW) signal and
  • Using a spectrum analyzer to accurately measure the frequency of this CW signal and thereby the offset from expected value and
  • Configuring the static frequency offset register on the radio with the offset measured above
  • This offset frequency value (in  HZ) is stored on each node in an EEPROM

Now any variation from desired frequency will only be because of temperature changes and aging.

Setting #2:

Radio configuration

  • Modulation: 2-GFSK
  • Bits  per symbol:  1
  • Data Rate: 10 kbps
  • Frequency  Deviation: +/- 5.004883  kHz
  • Feedback to PLL feature: Enabled
  • Channel  BW (RX filter BW): 25 kHz
  • Carrier frequency: 865-867 MHz

BWsig = 10000 + 2*5005 = 20010 HZ

Taking crystal inaccuracy (+/- 10 ppm) in consideration,

BWchann = 20020 +  4*10*(10^-6)*866*(10^6)  

BWchann =  54660 =  54.6 kHz 

Modulation index = (2*5010) / 10000 = 1.002 (Minimum for CC1120 is 0.5)

Since feedback to PLL feature is enabled, effective rx  filter bw is  25000 * 1 .5 = 37.5 kHz.

In addition, the carrier frequency frequency  error (due to the crystal’s initial crystal tolerance  of +/- 10 ppm) has been removed as explained  above. We tested this configuration and it is  working well.

Setting #3:

Radio configuration

  • Modulation: 2-GFSK
  • Bits  per symbol:  1
  • Data Rate: 20 kbps
  • Frequency  Deviation: +/- 10.009766 kHz
  • Channel  BW (RX filter BW): 50 kHz
  • Feedback to PLL feature: Enabled
  • Carrier frequency: 865-867 MHz

BWsig = 20000 + 2*10009 = 40020 HZ

Taking crystal inaccuracy (+/- 10 ppm) in consideration,

BWchann = 40020 +  4*10*(10^-6)*866*(10^6)  

BWchann =  74660 =  74.6 kHz

Modulation index = (2*10009) / 20000 = 1.0009 (Minimum for CC1120 is 0.5)

Since feedback to PLL feature is enabled, effective bandwidth is  40020 * 1 .5 = 60.03 kHz.

In addition, the carrier frequency frequency  error (due to the crystal’s initial crystal tolerance  of +/- 10 ppm) has been removed as explained  above. We tested this configuration and it is working well.

References:

 

WiSense Coordinator Node (WSN1120CL / WSN1101CL)

Here are some pics of our coordinator node in a nice enclosure. A USB cable provides both power and serial connectivity to the  coordinator node. The antenna is a half-wave dipole omni-directional antenna with 3 dBi gain.

 

img-20160914-wa0002

 

The enclosure can be wall mounted as shown in the  pic below.

img-20160914-wa0003

 

For more information, visit  www.wisense.in

WSN1120L current consumption

The current consumed by a WiSense  LPWMN  wireless sensor node in sleep mode determines how long the power source will last if the node is configured to operate in RFD (reduced function device) mode and is running on limited energy supply such as a pair  of  AA/AAA batteries.

The WSN1120L  has a bunch of  ICs  (micro, radio and two serial EEPROMS).  When the WiSense  stack puts the node into sleep mode, all of these ICs are put into their  respective sleep modes (usually the mode  with the lowest power consumption). The node’s total sleep mode current is the sum of the sleep mode currents of all these chips.

The pic  below shows the total current (2.2  uA) consumed by a WSN1120L node in sleep mode.

cc1120_rfd_i_1

 

The pic  below shows the current (0.1  uA) consumed just by the radio (in sleep mode) on a WSN1120L node. This matches the number (0.12  uA) given in the CC1120’s datasheet. The  CC1120 retains all of the important configurable registers  in sleep mode so no need to reprogram these registers after waking up the CC1120.

cc1120_rfd_i_2

 

More more information, please  visit http://www.wisense.in.

 

Hardware Update: New Multi-Sensor Board

We assembled and tested our latest sensor board which supports 7 different sensors.

The different sensors on the board  are:

  • TEPT5700: Ambient light Sensor (Analog)
  • NXFT15XH103:  Thermistor (Analog)
  • LM75B: Temperature Sensor (I2C)
  • CC2D33S: Relative Humidity and Temperature (I2C)
  • MS5637: Barometer/Altimeter (I2C)
  • LIS2DH12:  Accelerometer (I2C)
  • TSL45315CL:  Ambient Light  Sensor (I2C)

In addition there is a buffer IC (SN74LVC1G125DBVR) for interfacing with flow meters with pulse output.

The pics below show the sensor board mated to a WSN1101L wireless mesh node through two 2×7  connectors.

We have  written drivers for each sensor on this  board. All the digital sensors are accessed over a single  I2C bus. We  made sure there is no address conflict. Each sensor responds to a unique 7 bit address.

Each of these digital sensors has a sleep mode to conserve battery life. The analog sensors  are connected to different 10 bit ADC channels on the WSN1101’s  MSP430 micro-controller. Power to each analog  sensor is  gated by a MOSFET which can be  switched off to cut off power to the corresponding sensor and  associated  signal conditioning circuit. Each MOSFET is controlled by a separate GPIO on the WSN1101’s  MSP430 micro-controller.

The  thermistor and the analog  ambient light sensor can be  mounted outside a weather proof enclosure while the rest of the node and battery etc can stay inside.  These  two sensors are connected  to the sensor PCB  through two terminal blocks.

A  U.FL to SMA  RF cable assembly is  used to connect the  WSN1101L’s radio board  to an external bulk-head mounted  antenna.

sns_v3_snsr_brd_pic_1

 

 

sns_v3_snsr_brd_pic_2

 

sns_v3_snsr_brd_pic_3

 

 

For more information, please  visit http://www.wisense.in.

New Sensor Update – Ambient Light Sensor

We recently evaluated an ambient light sensor (TEPT5700) which can be used outside an enclosure. Our requirement is to keep the sensor outside  while the rest of the electronics  stays inside a  weather  proof  enclosure. This allows us to use the light sensor in the outdoors. The other option is to use a PCB mounted light sensor inside an enclosure with a transparent lid.

We chose a through hole photo-transistor which is sensitive to visible light (just like the human eye).  The  current through a photo-transitor  is  directly proportional to the intensity of  light falling on it.

tept5700_ckt

We used used  an op-amp in negative feedback amplifier configuration to amplify the voltage across a current limiting resistor (between the photo-transistor’s  emitter and ground). To increase the supported range (of light intensity) we used an analog switch to change the  gain of the op-amp between two  values  (low gain (2) and high gain (102)). The amplified output (of the  op-amp) was hooked up to a 10 bit ADC channel on the WSN1101L wireless mesh node. The software driver (for this sensor) gets  the ADC output for  both gain values but selects one for  calculating the photo-transistor current depending  on the two values. If the photo-transistor current is low (low light conditions), the ADC output (measured) in the high gain configuration gets  used.  If the photo-transistor current is high (bright light) causing the op-amp output to get clamped at the positive rail in the high gain configuration, the ADC output (measured) in the low gain configuration gets  used.

Here  is a pic of the circuit built on a WiSense  proto board (PB-200).

th_als_eval

 

References:

 

For more information, please visit http://www.wisense.in

WSN1120L Range Test

We did a quick range test of our new CC1120 radio based sensor nodes. We did this within Pruksa (community in east Bangalore).  This  was a non line of sight test in which one WSN1120L node was  configured to send packets to a  coordinator node (a WSN1120CL) once every second. The nodes  were around 526 meters apart with lots of houses in  between.  The nodes were at a height of  around 5  feet above ground. The walls in these houses are fully concrete  (no bricks). Even at this distance the signal strength was pretty good (around  -75  dBm). The nodes were  configured  to  transmit at +14 dBm at a data rate of 1.2  kbps (GFSK modulation) with channel bandwidth configured to 25  kHz.

non_los_test

Map showing location of non-LOS range test

We tried to do a line  of sight test along a nearby highway but we could not find a  flat  stretch longer than 1.1 kilometers close by. The two nodes  were able to communicate up to a distance of 1.1 kilometers. The signal strength  was  again very good (around -80 dBm). We will be doing further  tests to find out the max range  under line of  sight and non line  of  sight conditions.

Here  is a  pic of one of the nodes used in the range test. The node was powered by two AA batteries.

wsn1120l_rt_pic

WSN1120L Sensor Node 

 

For more information, please visit wisense.in.