All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is...

44
All-in-One Getting Started Guide for ADWSN: ADRadioNet Platform: EV-ADRN-WSN-1Z & EVAL-ADuCRF101MK ADWSN: ADRadioNet01-v2.0.1 IISET-GSG-ADRN01-v2.0.1, October 1, 2015

Transcript of All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is...

Page 1: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

All-in-One Getting Started Guide for

ADWSN: ADRadioNet Platform: EV-ADRN-WSN-1Z & EVAL-ADuCRF101MK

ADWSN: ADRadioNet01-v2.0.1 IISET-GSG-ADRN01-v2.0.1, October 1, 2015

Page 2: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 2

Table of Contents

ADRadioNet on ADuCRF101 Platform .................................................................................................................. 3

Things to Acquire before Starting ........................................................................................................................... 4

Installing the ADRadioNet01 EDK .................................................................................................... 5

Recommended ADRadioNet Demo Topology .................................................................................. 6

Preparing the ADRadioNet motes .................................................................................................. 12

(I). Loading the “Firmware” on to the boards ........................................................................................... 12

Using CM3WSD tool ....................................................................................................................... 12

Using IAR EWARM .......................................................................................................................... 16

(II). ADRadioNet Tools: Configuration, Control & Monitoring ........................................................... 18

(A) Configuring Devices (Center point, Router & End points): ................................................. 18

(B). ADWSN-UI-TOOL: Control & Monitoring: ............................................................................... 24

(C). ADRadioNet Demonstration .................................................................................................... 29

APPENDIX-A: ADRadioNet Pre-built Firmware .............................................................................. 31

APPENDIX-B: CREATING BINARIES ................................................................................................. 32

APPENDIX-C: IDE Workspace Configurations:................................................................................ 35

APPENDIX-D: IAR EWARM Project settings - Usage of Macros:.................................................... 36

APPENDIX-E: ADRadioNet supported PHY profiles, ISM bands ..................................................... 37

APPENDIX-F: Preparing the nodes on different platforms ............................................................ 38

APPENDIX-G: Sensor Data Representation in payload .................................................................. 39

APPENDIX-H: Powering options for Bunch board .......................................................................... 40

APPENDIX- I: Some Useful ADRadioNet API’s – Explained ............................................................ 41

APPENDIX- J: Loading firmware using CM3WSD Tool ................................................................... 43

FAQ & Troubleshooting ................................................................................................................. 44

Page 3: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 3

ADRadioNet on ADuCRF101 Platform

This “All-in-one Getting Started Guide”, is a chronologically ordered document intended to help users in all respects – right from the tools required to setting up ADRadioNet Wireless Sensor Network all by themselves without any handholding.

The ADWSN: ADRadioNet Evaluation Development Kit supports two hardware platforms from Analog Devices, Inc.

1. EV-ADRN-WSN-1Z (a.k.a Bunch board with several sensors populated) and 2. EVAL-ADuCRF101-MK (Rev-C), several sensors can be interfaced on to this.

This Evaluation Development Kit (EDK) contains software suite (tagged ADRN01_v2.0.1) with source code for Application, Protocol Stack, and PC based visual and debugger tools. The software suite is built in such a way that user can build and validate the ADRadioNet stack (a.k.a ADRN01_SLIM project) all by itself or ability to build with ADSensorApp (an application suite with required drivers and various sensor interface example code).

The EDK is completely functional in all respects with low power mode features and recommended optimized radio profiles.

Sensors Interfaced: (The first 4 are embedded in to EV-ADRN-WSN-1Z) ADT75 [12-Bit Digital Temperature Sensor with ±2°C Accuracy] [I2C]

SHT21 [Digital I2C humidity & temperature sensor, from Sensirion] [I2C]

ADXL362 [3-Axis, ±2 g/±4 g/±8 g/±16 g Digital Accelerometer] [SPI]

APDS9005 [ALS, Analog output ambient light sensor, from Avago] [ADC]

ADXL345 [3-Axis, ±2 g/±4 g/±8 g/±16 g Digital Accelerometer] [I2C]

AD7151 [Ultra-Low Power, 1-Ch, CDC for Proximity Sensing] [I2C]

ADT7310 [16-Bit Digital Temperature Sensor with ±1°C Accuracy] [SPI]

Nomenclature: o ADRadioNet uses the following 3 types of motes in the network.

o End Point (EP) Sensor mote, collects data from sensors and transmits to Center Point on Upstream PHY (via Router).

o Router (R↝) Routes data received on Downstream PHY to Upstream PHY. Can be placed in any orbit from 1 to 15 to extend the range.

o Center Point (CP) The data collector unit, destination node for all the data in PAN. Placed at the 0th orbit, receives data on the downstream PHY.

o Low Power Modes: Periodic low Power Mode: Hibernate mode with Wakeup Timer.

Event driven low power modes Wake up from Hibernate on the following events from sensors.

o Activity detection from ADXL362. o BOOT button press (only on EVAL-RF101). o Touch detection from AD7151 (only on EVAL-RF101).

Note: When no sensors interfaced, the potentiometer on EVAL-ADuCRF10-1MK (Rev-C) is used to send data to CP (Sec. C)

Page 4: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 4

Things to Acquire before Starting

Hardware:

1. Evaluation platforms a. EV-ADRN-WSN-1Z platform.

i. EV-ADRN-WSN-1Z (2 BUNCH WSN modules + 1 EVAL-ADuCRF101MK) http://www.analog.com/wsn

(or) b. EVAL-ADuCRF101MK platform

i. EVAL-ADuCRF101MKxZ (Rev-C) boards - 3 no’s min. ii. USB-SWD/UART modules - 1 min.

iii. Optional WSN-MBZ boards (to connect sensors) - 1 3.3V lithium battery (CR2032) (for WSN-MBZ board) - 2 no’s min. SEGGER J-link lite board -1 Sensor boards (ADT75, AD7151, ADXL345, SHT21, ADXL362, APDS9005)

2. PC with Windows 7 - 32/64-bit OS, and Mini USB to USB cables (3 no’s)

Software & Tools

ADRadioNet01_EDKv2.0.1.exe . Click-thru-installer for ADuCRF101 platform

IAR-EWARM_v7.10.3 (Optional in evaluation phase. Useful for development) http://supp.iar.com/Download/SW/?item=EWARM-EVAL Note: A 32k size-limited Kick-Start license (without any time limit) or full version of IAR IDE

time-limited can be downloaded from the vendor directly.

J-link lite_v4.86 (Optional. Useful for development), http://www.segger.com/jlink-software.html

The Virtual COM port (VCP) drivers for USB-SWD/UART. (This comes in handy, when unable to detect COM port). http://www.ftdichip.com/Drivers/VCP.htm

Demo Binaries:

EV-ADRN-WSN-1Z_BUNCH (Rev-A/B) PrebuiltBinaries\BUNCH\using_CM3WSD\ADRN01_SLIM.hex [EP, CP & R]. PrebuiltBinaries\BUNCH\using_CM3WSD\ADRN01_CP_ROUTER.hex [CP & R] PrebuiltBinaries\BUNCH\using_CM3WSD\ADRN01_EP_Periodic_LPM.hex [EP Periodic] PrebuiltBinaries\BUNCH\using_CM3WSD\ADRN01_EP_Evt_Driven_LPM.hex [EP EVT]

EVAL-ADuCRF101MK (Rev-C) PrebuiltBinaries\EVAL-RF101\using_CM3WSD\ADRN01_SLIM.hex [EP, CP & Router] PrebuiltBinaries\EVAL-RF101\using_CM3WSD\ADRN01_CP_ROUTER.hex [CP & Router] PrebuiltBinaries\EVAL-RF101\using_CM3WSD\ADRN01_EP_Periodic_LPM.hex [POT Periodic] PrebuiltBinaries\EVAL-RF101\using_CM3WSD\ADRN01_EP_Evt_Driven_LPM.hex [POT EVT]

Page 5: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 5

Installing the ADRadioNet01 EDK

The ADRadioNet package (ADRN01_V2.0.1) installs the evaluation development kit, along with required software, PC tools using ADRadioNet01_EDKv2.0.1.exe installer. User has to accept the license terms (Software License Agreement) to install the package.

Page 6: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 6

Recommended ADRadioNet Demo Topology

The simplest form of ADRadioNet topology for evaluation purposes is as shown below.

If you have the EV-ADRN-WSN-1Z evaluation kit (from www.analog.com/wsn), then you

can quickly setup the 3-node demo as shown, and monitor the sensor data (from endpoint)

on the center point using the PC tool (ref Sec. B). Please note the devices in this evaluation

kit are loaded with factory built firmware, and configured in a prescribed format.

The following picture shows example settings (PHY, Channel & Data rate) that the user can

change to setup their network of choice. We recommend you to go to this stage after

confirming the basic evaluation demo thoroughly. A quick glance through the PC

configuration and monitoring tool (as explained in Sec. II) is recommended.

Page 7: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 7

Although users can configure their network of choice from the beginning, it is recommended that the user first bring up the default evaluation demonstration setup. It is also recommended to go through this document to understand using ADWSN-UI-Tool.

To start the ADRadioNet 3-Node demonstration, the following need to be ensured:

The software EDK package is installed on the PC to be used for demonstration.

If factory configured devices are not available, then the devices require programming and configuration as explained in Preparing the ADRadioNet motes section.

Make sure to connect the WSN hardware device to the PC via USB-SWD/UART-EMUZ. (Center router device is connected first in this demonstration)

Then follow the steps as below:-

1. Open ADWSN-UI-Tool from windows start menu (under “Start All ProgramsAnalog Devices ADRadioNet01_EDK”).

2. Select 3 Node Demo Wizard tab, as shown in below picture.

3. A new window pops up showing the requirement and steps to setup the 3-Node demo (as shown in below picture), read the steps and click “Next” to proceed, or “Cancel” to exit from the 3-Node demo set up.

Page 8: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 8

4. Click on Find Devices button. Let say the device connected is a Center Point, then it

will be listed just under the “Find Devices” button.

5. Select the device from the PC tool (Center Point in this case) and click Connect button. The configuration details of selected device will be displayed in the corresponding device window (In the picture below, the Center Point is selected and its configuration is shown under Center Point window).

6. Next connect the Router and End Point, following the same procedure as above (both these devices will be shown in the list under Find Devices button, and user has to select the node and click on Connect button one by one to bring-in the configured devices in to the network demonstration as explained below).

Page 9: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 9

7. Now all the 3 devices will be seen as in below picture. The configuration of all the 3

devices with their MAC Address, PHY (operating mode), Channel number, ISM band are to be verified by user. If these settings are the intended ones, then user can validate by clicking “Validate” button.

8. After validating the configuration parameters of all the 3 devices, the result will be displayed as text between Back and Next buttons.

9. If the configurations of all the devices are valid for the 3 Node Demo, a message -“The device configurations are validated successfully… ” is seen as below.

Page 10: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 10

a. Click on the Next button to proceed to [Monitor and Control] window as below.

b. If validation failure message is seen, then it means the configuration is wrong. User can update this configuration by right clicking on the device, and set the correct configuration (shown below is an example where the 3 nodes Center Point, Router and EndPoint are configured and put for validation using 3 Node Demo, The tool points Center point Down Channel PHY is configured wrong, as it does not match the Router Up Channel PHY. This has to be set to Router Up Channel PHY).

10. To change the configuration of the incorrectly configured device: connect the device to the PC and follow the steps as described earlier - to find this device in the PC tool. Once this device is listed in the device window, right click on this selected device as shown below and go to Configure Device option.

Page 11: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 11

11. A configuration window opens upon clicking this “Configure Device” option. Edit this configuration as required (in this example, let say UP channel PHY of CP is to be changed from 300kbps to 38.4kbps. Change this to the desired value and update the configuration by writing to the device by clicking on the Write Config button as shown below).

12. Go to 3 Node Demo Wizard tab on the tool.

13. Select the re-configured device and then click “Update” button. This completes updating the new configuration for a successful 3-Node demo. Click Validate to authenticate this new configuration.

Page 12: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 12

Preparing the ADRadioNet motes

The suggested demo topology requires loading the firmware and configuring the CP, EP’s &

Routers, the procedures for which are as given below:

(I). Loading the “Firmware” on to the boards.

(II). ADRadioNet Tools: Configuration, Control & Monitoring.

(I). Loading the “Firmware” on to the boards

There are two ways to program ADuCRF101 nodes; Using CM3WSD tool & Using IAR

EWARM (v7.10.3).

Using CM3WSD tool

1. The CM3WSD is serial downloader via UART from Analog Devices for CortexM3

base microcontrollers. This is installed as part of the ADRadioNet01_EDK installer.

2. The binary files with “.hex” extension can be flashed using this CM3WSD tool.

3. Set the boards into serial download mode by following the procedure mentioned

below for each type of platform.

EV-ADRN-WSN-1Z_BUNCH (Rev-B) platform:

i) Connect the EV-ADRN-WSN-1Z_BUNCH board to the PC via USB-SWD/UART -EMUZ interface board using USB cables as shown below.

ii) The links A & B of LK2 in the above are to be shorted using jumpers.

EVAL-ADuCRF101-MK (Rev-E) platform:

i) Connect the EVAL-ADuCRF101-MK board to the (USB-SWD/UART-EMUZ) interface board.

ii) Using a USB cable, connect the interface board to the PC USB connector.

Page 13: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 13

Loading the Firmware through USB-SWD:

The ADWSN-UI-Tool is built with CM3WSD serial downloader to facilitate the user in loading the firmware easily.

1. Open ADWSN-UI-Tool and click ‘Find Devices’ button.

2. If the connected device has already programmed with any of ADRadioNet firmware, then tool lists the device as shown in below picture.

3. If the device is not programed, it is shown as “Unknown Device” as below.

4. To download new firmware or to update firmware, select device from the list and right click. An option “update firmware” appears as shown in picture below. Click on Update Firmware button.

Page 14: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 14

5. A new “Firmware Update” window pops up as shown below.

6. Under Select firmware update mode, select “Using COM port” option. 7. Select baud rate as 115200. 8. “<Install_Directory>\ ADRadioNet01\PrebuiltBinaries\EVAL-

RF101\using_CM3WSD folder and click Start to install the firmware. User will be prompted to put the device into serial download mode by following a procedure (mentioned in the following steps).

Note: The following “PrebuiltBinaries” are provided along with the supplied package. User can flash these binaries on to the target devices before configuring the nodes.

EP ADRN01_EP_Periodic_LPM.hex Endpoint with Periodic Low Power Mode ADRN01_EP_Evt_Driven_LPM.hex Endpoint with Event driven Low Power Mode

Router/ CP ADRN01_CP_Router.hex Center Point & Router

9. To prepare for serial downloading, the following is required on all the sensor nodes.

a. BUNCH board

i. Connect a wire from P0_6 tap point to ground (pin2 of J1 connector).

ii. Short the pins 1 & 2 of interface board connector (J2) for a while with a wire and remove. Short the pins on the rear side of the board as on the front side USB-SWD/UART-EMUZ is connected.

Page 15: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 15

iii. This will enable the sequence for downloading firmware to EV-ADRN-WSN-1Z_BUNCH (Rev-B) mote using CM3WSD tool.

b. EVAL-ADuCRF101-MK i. HOLD down the BOOT button on the ADuCRF101-MK.

ii. PRESS and RELEASE the RESET button on the ADuCRF101-MK.

iii. RELEASE the BOOT button.

iv. The BOOT & RESET buttons on the EVAL-ADuCRF101-MK board as shown below.

10. This initiates the download process and the status can be seen on Monitor Status

Window as shown below.

Page 16: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 16

11. Once the programming and verification is successful, you see the following:

12. Power down and power up the hardware unit to start the application run.

Note: If firmware download fails with the “Update Firmware” feature of the ADWSN-UI-Tool,

then, user may try using standalone CM3WSD tool as described in APPENDIX-J.

Using IAR EWARM The binary files with “.out” extension can be flashed through IAR EWARM.

EV-ADRN-WSN-1Z_BUNCH (Rev-A/B) platform:

1. Insert a 3V button battery in battery slot B1.

2. Connect the EV-ADRN-WSN1Z_BUNCH board to PC via USB-SWD/UART interface board using USB cables as shown below.

3. Make sure the links A, B & C of LK2 are shorted using jumpers on EV-ADRN-WSN-1Z_BUNCH (Rev-A).

Page 17: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 17

EVAL-ADuCRF101-MK (Rev-C) platform:

1. Connect the EVAL-ADuCRF101-MK board to interface (USB-SWD/UART) board.

2. Connect the interface board to the PC using a USB cable as shown below.

3. Open the workspace “ADRN01.eww” from “ADRadioNet01/Source/ADRN01_USE_SRC/IDE” folder under ADRadioNet package installation directory.

4. Go to “Project Download” and Click on “Download file…” option. A window will be opened as shown in following picture.

5. Choose binary file respective to the node from “ADRadioNet01/PrebuiltBinaries/BUNCH/using_IAR” directory

Or “ADRadioNet01/PrebuiltBinaries/EVAL-RF101/using_IAR” directory.

6. This would initiate the flash programming and status can be seen on debug window of the IAR EWARM tool.

7. Once the flashing is successful, power down and power up the board to start the execution. (To operate as a wireless mote, insert / connect the battery to the board and give a reset).

Page 18: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 18

(II). ADRadioNet Tools: Configuration, Control & Monitoring

The installation package contains the PC tool required for configuring motes. Once the ADRadioNet01 EDK package is installed, the ADWSN-UI-Tool can be found under “Start All Programs Analog Devices ADRadioNet01_EDK” as shown below.

(A) Configuring Devices (Center point, Router & End points): The following is the configuration procedure to make the ADRadioNet WSN. It is assumed

that the required firmware is put on to the respective units. (Refer to APPENDIX-A for more

details on the firmware binaries and description).

(A.1). Preparing the boards for Configuration:

EV-ADRN-WSN-1Z_BUNCH (Rev-A/B) platform:

1. Insert a 3V button battery in battery slot B1. 2. Connect the EV-ADRN-WSN1Z_BUNCH board to PC via USB-SWD/UART interface

board using USB cables as shown below.

3. Make sure the links A, B & C of LK2 are shorted using jumpers on EV-ADRN-WSN-1Z.

Page 19: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 19

EVAL-ADuCRF101-MK (Rev-C) platform:

1. Connect the EVAL-ADuCRF101-MKxZ boards to PC via USB-SWD/UART interface board using USB cables as shown below.

2. Make sure the jumpers LK1 & LK2 are mounted on EVAL-ADuCRF101-MK.

(A.2). Node Configuration: 1. Click on ADWSN-UI-TOOL tool from the “Start All Programs Analog Devices

ADRadioNet01_EDK”.

2. Once the ADWSN-UI-TOOL opened, click on “Find Devices” button as shown below. (Initially it shows “No devices” till any device is found.)

3. If this status is not changing from “No devices”, then reset the device by pressing RESET button.

4. In few moments, upon detecting the devices, the following update is seen. (In the following example, the device is “Not configured” yet although the firmware is loaded)

Page 20: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 20

5. Click on the “Not Configured” device to pick the device to configure.

6. Choose the “Node function” (for which the device has to be configured)

Page 21: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 21

A.2.1. Configuring “CenterPoint”

1. Select the Node function as “Center Point”.

2. Click on “Get defaults”.

3. Choose ISM band (as European 868MHz ISM band).

4. Enter a valid MAC Address (as shown in picture below).

5. Choose PAN ID. (or leave it as default)

6. Choose data rate from “Downstream PHY” dropdown menu.

7. Choose the “Downstream Channel” from the given channels 0-8.

8. Under “Options” tab, write the device description and other settings (PHY parameters & Protocol options) as required.

9. Now, click on “Write Config”.

User can reset the device and check the settings by clicking “Get Config”, or close the tool, give hardware reset to the board, and restart the tool to check the configuration.

Hint: Make sure that the down-channel frequency & data rate matches with the up-channel frequency of the routers in the upper orbit, in order for the communication to happen.

Page 22: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 22

A.2.2. Configuring “Router”

1. Select the Node function as “Router”.

2. Choose ISM band (as European 868MHz ISM band).

3. Enter a valid MAC Address (as shown in picture below).

4. Select the Heartbeat in seconds (keep alive message interval to CenterPoint. Set this value around 30sec/1min).

5. Select orbit number between 1 and 14.

6. Choose Down-Channel data rate (should be same as the up-channel data rate of router/end point in the upper orbits) from Downstream PHY dropdown box.

7. Select the Down-channel (should be same as the up-channel of router/end-point in the upper orbits) from the given 9 channels under Downstream channel.

8. Choose Up-Channel data rate (should be same as the down-channel data rate of router/Center point in the upper orbits) from Upstream PHY dropdown box.

9. Select the up-channel (should be same as the down-channel of router/Center point in the upper orbits) from the given 9 channels under Upstream channel(s).

10. Under “Options” tab, write the device description and other settings (PHY parameters & Protocol options) as required.

11. Click on “Write Config”.

User can reset the device and check the settings by clicking “Get Config”, or close the tool, give hardware reset to the board, and restart the tool to check the configuration.

Page 23: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 23

A.2.3. Configuring “Endpoint”

1. Select the Node function as “End point”.

2. Click on “Get defaults”.

3. Choose ISM band (as European 868MHz ISM band).

4. Enter a valid MAC Address (as shown in picture below).

5. Choose Up-Channel data rate (should be same as the down-channel data rate of router/Center point in the upper orbits) from Upstream PHY dropdown box.

6. Select the up-channel (should be same as the down-channel of router/Center point in the upper orbits) from the given 9 channels.

7. Select the “Sleep time” in seconds (mote sleep interval, say 3 seconds).

8. Uncheck “Not sleepy” option to operate the mote in low power mode.

9. Under “Options” tab, write the device description and other settings (PHY parameters & Protocol options) as required.

10. Click on “Write Config”.

User can reset the device and check the settings by clicking “Get Config”, or close the tool, give hardware reset to the board, and restart the tool to check the configuration.

Useful Hint: When user need to re-configuring the endpoints, connect the ADWSN-UI-TOOL tool and write the new configuration. Then close the ADWSN-UI-TOOL tool and reset the unit to operate with updated configuration.

Page 24: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 24

(B). ADWSN-UI-TOOL: Control & Monitoring:

The Center Point device is used to control and monitor the entire network. Make sure the Center point unit is flashed with “ADRN01_CP_ROUTER.hex” file, with which the other motes (endpoints and routers) form the network as defined in the demo topology.

Connect Center point unit to PC via USB-SWD/UART daughter board to establish UART connection with ADWSN-UI-Tool.

Open ADWSN-UI-TOOL tool from “Start All Programs Analog Devices ADRadioNet01_EDK”.

Once the tool is opened, click on Find Devices button in Start window. This lists all the available devices connected to the PC as shown.

Select “Center Point”. It displays the device details as shown below.

“Messages from nodes” window displays the registration messages from the nodes (Routers & Endpoints) joined the CP.

The UART status is also updated under “UART status” window. If you see any error status in the UART status window, reselect the device “Center point”.

Once the EP starts sending data, user can see the payload under “Received packets” field as shown in following picture. Also the displays the keep alive messages from Routers.

Page 25: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 25

Make sure the Center point is selected always to see the live data under “Data packages” under Start tab.

To monitor the exact data from the node and node details, click on “Network overview” tab. It displays the data in a tabular format as shown below.

(For information on data representation from End points, refer to APPENDIX-G)

To control or check the performance of a particular node, select node under “Network Overview” window and right click on it. It displays the options as shown below.

Click on “Get node performance”. The “Node Performance” window shows the performance factors like channel activity, message duration and signal levels of the selected node in graphical format.

Page 26: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 26

The same way user can click on “Send command to node”.

It opens “Config/Commands” window which allows the user to configure some parameters of the nodes and routers remotely from CenterPoint in runtime. (There are many commands available as can be seen on the right hand side of the tool window labeled as “Description”).

Page 27: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 27

Once the “Config/Commands” window is open, user can see the address of the node in Node address field of Destination node in “Message” box.

Select the required command from the right hand side table and click. It displays the command parameters under “Param” window below.

Once the proper command is selected click on “Post message” button.

Once the command is posted, user can see the generated string under “Command string” box. This command is passed to the CP mote via UART which will be attached to the acknowledgement of next packet received from the intended node (destination node).

In addition to these commands, the tool allows the user to add additional user level commands (device level software changes are required in the ADRadioNet software).

The same way user can go to “Sensor Data” window either by selecting Sensor Data tab (ensure to select the node address from the “Select Node” list) or by selecting node under “Network Overview” window and right click on it and select the Plot sensor data option, as shown in below picture.

Page 28: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 28

Once the “Sensor Data” window is open, ensure the address of the selected node is correct at the “Select Node”.

The sensor data window starts displaying the enabled sensor data on the Node, in the form of graphs as shown in below picture.

The X-axis represent the time the packet is received and the Y-axis represent the sensor values.

The “Clear Graph” button clears all the sensor graphs and start plotting afresh.

Page 29: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 29

(C). ADRadioNet Demonstration

(C1). With EV-ADRN-WSN-1Z_BUNCH (Rev-A/B) mote:

The BUNCH WSN mote has on-board sensors (ADT75, ADXL362, SHT21 & APDS9005) which are enabled in the firmware that is flashed in the section (I).

1. Connect EV-ADRN-WSN-1Z_EVAL-ADuCRF101-MK Center Point mote to PC and open ADWSN-UI-TOOL tool.

2. Connect EV-ADRN-WSN-1Z_BUNCH Router mote to PC to power it up.

3. Power up EV-ADRN-WSN-1Z_BUNCH End Point with the battery by placing the jumper in position C of LK2 as shown in below picture.

4. Data from ADT75, ADXL362, SHT21 and ALS sensors will be transmitted to Center Point and can be seen on ADWSN-UI-TOOL tool as show below.

In periodic mode, the data received gets updated for the period the Endpoint is programmed for using the ADWSN-UI-TOOL tool.

In event driven mode, the Endpoint sends data on each time an activity is detected by ADXL362 accelerometer.

(C2). With EVAL-ADuCRF101-MK (Rev-C) mote:

To quickly bring up the demo with just EVAL-ADuCRF101-MK (Rev-C) hardware (without the need of connecting external sensors), the on-board potentiometer reading is sent to the Center Point as default sensor data.

Page 30: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 30

1. Connect EVAL-RF101 Center Point mote to PC and open ADWSN-UI-TOOL tool.

2. Connect EVAL-RF101 Router mote to PC to power it up.

3. Power up EVAL-RF101 End Point mote.

The following picture shows the Potentiometer (is connected to ADC0 with 1.8V as reference) on EVAL-ADuCRF101-MK (Rev-C). The position can be changed to vary the resistance which will be converted to digital value and sent to CP.

Once the data is received on CP, user can check this data on “ADWSN-UI-TOOL” tool as shown below.

In periodic mode, the data received gets updated for the period the Endpoint is programmed for using the ADWSN-UI-TOOL tool.

In event driven mode, the Endpoint sends data on each time the “BOOT” button is pressed.

Page 31: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 31

APPENDIX-A: ADRadioNet Pre-built Firmware The firmware binaries for all the ADRadioNet motes are provided under “PrebuiltBinaries\” folder in the supplied package. Make sure to flash these binaries before configuring nodes.

Node Binary file Description ADRN01_SLIM ADRN01_SLIM.hex ADRN01 SLIM binary for EP,CP & router

EP

ADRN01_EP_Periodic_LPM.hex Endpoint with Periodic Low Power Mode ( Hibernate)

ADRN01_EP_Evt_Driven_LPM.hex Endpoint with Event driven Low Power Mode (Hibernate)

Router / CP ADRN01_CP_ROUTER.hex Center Point & Router

Page 32: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 32

APPENDIX-B: CREATING BINARIES

1) By default, the project is set to build for BUNCH (with USE_BUNCH defined). To build for EVAL-RF101 the macro EVAL_RF101 need to be defined.

2) Open the project workspace (ADRN01.eww) from ADRadioNet01\Source\ADRN01_USE_SRC\IDE directory with IAR-EWARM v7.10.3.

3) The IAR Project work space consists of 2 projects (see tabs in the IDE, as shown below)

ADRN01 ADRadioNet with ADSensorApp (Foot print ~33K).

ADRN01_SLIM ADRadioNet SLIM version (No Sensor App Footprint ~16K)

4) Select ADRN01_SLIM project tab to build binaries for ADRadioNet SLIM version. (When

this project is chosen, the ADSENSOR_MOTE macro is used to detach the ADSensorApp

from the ADRN01 project, resulting in SLIM version of ADRadioNet ~16k footprint)

5) Select ADRN01 project tab, if you wish to build ADRadioNet with ADSensorApp.

6) Select the required workspace configurations from the list shown below and rebuild all.

The project supports profiles for ADF7024 transceiver (The project supports usage of

different channel spaces like 200KHz, 400KHz & 600KHz. Binaries can be built by

selecting the corresponding workspace)

adrn01_CPR_chSpc200K

__adrn01_EP_chSpc200K_Periodic_LPM

__adrn01_EP_chSpc200K_Evt_Driven_LPM

adrn01_CPR_chSpc400K

__adrn01_EP_chSpc400K_Periodic_LPM

__adrn01_EP_chSpc400K_Evt_Driven_LPM

adrn01_CPR_chSpc600K

__adrn01_EP_chSpc600K_Periodic_LPM

__adrn01_EP_chSpc600K_Evt_Driven_LPM

7) The binaries after building the projects will be available in following locations

ADRN01_USE_SRC\IDE\Output\CP_Router\Exe -> for CP and Router 200 kHz

ADRN01_USE_SRC\IDE\Output\EP\Exe -> for EP 200 kHz

The other binaries with different channel spacing will be available at

Page 33: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 33

ADRN01_USE_SRC\IDE\Output\otherChSpacing\CP_Router\Exe -> for CP & Router with 400 and 600 kHz

ADRN01_USE_SRC\IDE\Output\otherChSpacing\EP\Exe -> for EP with 400 & 600 kHz.

8) The binaries at “otherChSpacing” folder are :

Note: The binaries under “otherChSpacing\” are provided to evaluate the ADF7024 profiles

as recommended in the data sheet.

The typical Channel Spacing for 200kbps profile is 400kHz. It is suggested to use the

binaries tagged with ChSpc400 to test with 200kbps profile.

The typical Channel Spacing for 300kbps profile is 600kHz. It is suggested to use the

binaries tagged with ChSpc600 to test with 300kbps profile.

The data rate selection is done from the ADWSN-UI-TOOL,

9) To use ADF7023 transceiver profiles, following changes need to be made in the source.

Enable the profiles mentioned for ADF7023 in

“ADRadioNet01/Source/ADRN01_USE_SRC/ADRadioNet/inc/phy_profiles.h” file.

Enable the 7023 profile list in “ADRadioNet01/ADWSN-UI-

Tool/ADRadioNetISMChanTable.xml” file by uncommenting the section.

10) To build the project for the different hardware platforms, compile time switch macros

are provided as mentioned below. Define the relevant macro in “Project Options

C/C++ Compiler Preprocessor Defined Symbols” as mentioned below.

USE_BUNCH EV-ADRN-WSN-1Z_BUNCH (Rev-A) EVAL-RF101 EVAL-ADuCRF101-MK (Rev-C)

NOTE: Make sure to enable only one of these macros (the one corresponds to the hardware

platform the project is being built for) at a time while compiling the project.

11) To use particular sensor on an EP, build the binary by defining the sensor macro along

with these modes. Following are the definitions that need to be defined.

Binary Description

ADRN01_CPR_ChSpc400.hex CP and Router with channel spacing 400 kHz

ADRN01_EP_ChSpc400_Evt_Driven_LPM.hex EP Event Driven with Low Power Modes 400 kHz channel spacing

ADRN01_EP_ChSpc400_Periodic_LPM.hex EP Periodic with Low Power Modes 400 kHz channel spacing

ADRN01_CPR_ChSpc600.hex CP and Router with channel spacing 600 kHz

ADRN01_EP_ChSpc600_Evt_Driven_LPM.hex EP Event Driven with Low Power Modes 600 kHz channel spacing

ADRN01_EP_ChSpc600_Periodic_LPM.hex EP Periodic with Low Power Modes 600 kHz channel spacing

Page 34: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 34

12) Also the data is added to payload in the same order as mentioned in the table above based on the sensors that are defined (omitting the ones that are not defined).

13) Once “Rebuild All” is done, based on the configuration selected the output files will be generated under the directories mentioned below.

Project options to create HEX file as output :

Go to Project options Output Converter Output. Select “Generate additional output”. Choose Output format as “Intel extended” Select “Override default” under Output file and give the name for the output file under it and

Click OK.

Definition To use sensor

ADT75_Sensor ADT75 Temperature reading in °C

ADXL345_Sensor ADXL345 sensor acceleration readings on 3-axes

SHT21_Sensor Temperature (°C) and Relative Humidity (%RH) form SHT21 AD7151_Sensor Proximity reading from AD7151 (Capacitance in pF)

ALS_Sensor Ambient light sensor reading from APDS9005.

ADXL362_Sensor ADXL362 sensor acceleration readings on 3-axes ADT7310_Sensor ADT7310 Temperature reading in °C

EVAL_Pot_Sensor Potentiometer value from EVAL-ADuCRF101-MK (Rev-C)

Page 35: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 35

APPENDIX-C: IDE Workspace Configurations:

The comes with default workspace configurations to quickly build the

binaries for sensor motes, routers and CenterPoint. Details about each of these workspace configurations are provided here. (Refer to APPENDIX-D for additional help on choosing the user specified sensor combinations). User can create own workspace configurations with the intended settings.

Note: All the workspaces are built with ADF7024 profiles as default.

adrn01_CPR_chSpc200K Center point/Router configuration, for ADUCRF101 based ADRadioNet with channel spacing of 200 kHz. This is the default workspace configuration for ADRadioNet SLIM model for all the nodes (EndPoint, Routers & CenterPoint).

__adrn01_EP_chSpc200K_Evt_Driven_LPM Endpoint configuration, for ADUCRF101 based ADRadioNet with channel spacing of 200 kHz. With Hibernate mode as standby mode and wakes up the MCU on an interrupt from sensors (P0.3) or BOOT (P0.6) button.

__adrn01_EP_chSpc200K_Periodic_LPM Endpoint configuration, for ADUCRF101 based ADRadioNet with channel spacing of 200 kHz. With Hibernate mode as standby mode for the period user sets as sleep time

adrn01_CPR_chSpc400K Center point/Router configuration, for ADUCRF101 based ADRadioNet with channel spacing of 400 kHz.

__adrn01_EP_chSpc400K_Evt_Driven_LPM Endpoint configuration, for ADUCRF101 based ADRadioNet with channel spacing of 400 kHz. With Hibernate mode as standby mode and wakes up the MCU on an interrupt from sensors (P0.3) or BOOT (P0.6) button.

__adrn01_EP_chSpc400K_Periodic_LPM Endpoint configuration, for ADUCRF101 based ADRadioNet with channel spacing of 400 kHz. With Hibernate mode as standby mode for the period user sets as sleep time

adrn01_CPR_chSpc600K Center point/Router configuration, for ADUCRF101 based ADRadioNet with channel spacing of 600 kHz.

__adrn01_EP_chSpc600K_Evt_Driven_LPM Endpoint configuration, for ADUCRF101 based ADRadioNet with channel spacing of 600 kHz. With Hibernate mode as standby mode and wakes up the MCU on an interrupt from sensors (P0.3) or BOOT (P0.6) button.

__adrn01_EP_chSpc600K_Periodic_LPM Endpoint configuration, for ADUCRF101 based ADRadioNet with channel spacing of 600 kHz. With Hibernate mode as standby mode for the period user sets as sleep time.

Page 36: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 36

APPENDIX-D: IAR EWARM Project settings - Usage of Macros:

Enable ADSENSOR_MOTE macro to build the project for Endpoints. (This will be enabled in EP workspace configurations by default).

Enable required sensor macros from the following list to enable the respective sensors under “Project Options C/C++ Compiler Preprocessor Defined Symbols”.

Define ADT75_Sensor, to enable ADT75 temperature sensor.

Define ADXL362_Sensor, to enable ADXL362 accelerometer sensor.

Define ADXL345_Sensor, to enable ADXL345 accelerometer sensor.

Define AD7151_Sensor, to enable AD7151 proximity sensor.

Define SHT21_Sensor, to enable SHT21 temperature & relative humidity sensor.

Define ALS_Sensor, to enable APDS9005 Ambient light sensor.

Define EVAL_Pot_Sensor, to send Potentio value on EVAL-ADUCRF101-MK (Rev-C).

Disable ADSENSOR_MOTE macro to build the project for CenterPoint or Router, as we don’t expect these devices to operate with sensors.

Page 37: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 37

APPENDIX-E: ADRadioNet supported PHY profiles, ISM bands

ADRadioNet supports a total of 6 radio profiles as recommended by Analog Devices

ADF7024 experts and these profiles by default are as listed in the PC tool as below.

ADRadioNet supports the 5 bands as listed above, including two supporting ETSI & FCC

compliance testing (European 863MHz ISM band/ETSI & USA 902MHz ISM band/FCC).

Note: This project supports ADF7024 transceiver profiles by default with support for

ADF7023 profiles as an option. ADF7023 profiles can be enabled by uncommenting the

ADF7023 profile section in the files “ADRadioNetISMChanTable.xml” and “phy_profiles.h”.

The file locations are given as below & are available in” under the installed package

directory.

ADRadioNet01/Source/ADRN01_USE_SRC/ADRadioNet/inc/phy_profiles.h

ADRadioNet01/ADWSN-UI-Tool/config/ADRadioNetISMChanTable.xml

Page 38: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 38

APPENDIX-F: Preparing the nodes on different platforms

EV-ADRN-WSN-1Z_BUNCH (Rev-A/B)

EV-ADRN-WSN-1Z kit comes with 2 BUNCH WSN boards and one EVAL-ADuCRF101MK. The 2 BUNCH boards can be used as Endpoints (or one as EP and other as router) and EVAL-ADuCRF101MK can be used as Center Point device.

Selecting External Interrupts using Switch:

Bunch board is equipped with a switch to choose the interrupt source for sensors – PIR, ADXL & PGOOD. The S1 DIP-switch as shown in the picture below facilitates selecting the interrupt source for a specific sensor (for example of ADXL sensor is to be selected, then turn on the switch #6 of S1 DIP-switch).

EVAL-ADuCRF101-MK (Rev-C)

Preparing Center Point & Router units:

EVAL-ADuCRF101-MK unit can be directly used as Center point & Router units with the required firmware flashed & with minimum configuration from the tools.

Preparing End point with EVAL-ADuCRF101-MK + External Sensors:

The WSN-MBZ daughter board (optional, to connect sensors) can be connected to

ADuCRF101-MK board as shown in flowing pictures.

EVAL-ADuCRF101-MK (Rev-C) INTERRUPT PIN ECN:

Connect wire from J1-6 to J2-14 on WSN-MBZ to use the Event Driven Low Power mode functionality.

Page 39: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 39

APPENDIX-G: Sensor Data Representation in payload The sensor data is represented on the CenterPoint in the same sequence that is added to

payload on that particular sensor mote using the sensor macros. Following is the pre-order

that is defined. If any sensor is not defined in the sequence, its place will be taken by the

next sensor that is defined. A sensor mask field (denoted as INT[0]) is added to the payload

to represent the sensor data the payload consists and the order in which it’s placed in the

payload.

Position Definition To use sensor

FLOAT[0] ADT75_Sensor ADT75 Temperature reading in °C

FLOAT[1]

ADXL362_Sensor acceleration on X-axis (g) from ADXL362 sensor

FLOAT[2] acceleration on Y-axis (g) from ADXL362 sensor

FLOAT[3] acceleration on Z-axis (g) from ADXL362 sensor FLOAT[4]

ADXL345_Sensor

acceleration on X-axis (g) from ADXL345 sensor

FLOAT[5] acceleration on Y-axis (g) from ADXL345 sensor FLOAT[6] acceleration on Z-axis (g) from ADXL345 sensor

FLOAT[7] SHT21_Sensor

Temperature (°C) from SHT21 FLOAT[8] Relative Humidity (%RH) from SHT21

FLOAT[9] AD7151_Sensor Proximity reading from AD7151 (Capacitance in pF)

FLOAT[10] ALS_Sensor Ambient light sensor reading from APDS9005. FLOAT[11] PIR_Sensor Passive Infrared sensor data from OMNIDT2000

FLOAT[12] EVAL_POT_Sensor Potentiometer value from EVAL-ADuCRF101-MK FLOAT[13] ADT7310_Sensor ADT7310 Temperature reading in °C

FLOAT[14] PmodJSTK_Sensor

Joystick X-axis FLOAT[15] Joystick Y-axis

FLOAT[16] Joystick buttons

Page 40: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 40

APPENDIX-H: Powering options for Bunch board

Follow the settings as shown in the below table to power up the “Bunch” board using different power input options.

Link settings LK1 LK2 A B A B C D USB Power Open Open Short Short Short Open

Battery Power Open Open Open Open Short Open PV Cell Open Open Short Open Open Short NOTE: PV Cell or Battery should be connected when boards are powered using USB power this is to power the controller to trigger the LDO when power reset. To power reset the Cluster boards when using USB power after removing the USB connection also remove LK2-C if battery is used or remove the LK2-D if PV cell is used.

It is recommended to use USB power option while “Configuring motes / Monitoring & Controlling Network via CP”.

Measuring current consumption of Bunch WSN motes:

Current consumption can be measured by connecting an ammeter on Link-C of LK2.

Make sure the battery is placed in the battery slot (B1).

Page 41: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 41

APPENDIX- I: Some Useful ADRadioNet API’s – Explained

Following are some of the important API’s used in this application. Application users are recommended to browse through the project, start in the “main.c” file and explore to get a better feel for how simple it is to work with this code.

adsAPI_Init_Devices()

Initializes the peripherals and ports used in the application.

ANode_Start((unsigned char*) MEM_LOC_ADINET_PARAMS);

Reads externally stored (at the address mentioned by pointer MEM_LOC_ADINET_PARAMS) configuration parameters into the stack and starts the stack if the configuration is correct.

ANode_SetPowerDownState(POWERDOWN_MODE);

Set the Power state for the stack to apply (PDS_NO_POWERDOWN or PDS_FULL_POWERDOWN). This API is used to check the power state chosen and applied to MCU and Radio power states accordingly.

adsAPI_ADSensInit();

This API contains the functionality for initialing the resources used by ADSensorsApp. This function internally calls routines for detecting, configuring & initializing sensors. This has to be called from main() at the application startup.

SendBackSRDData();

This function sends the data received OTA to the data monitor via UART. Mostly used in Center point unit.

ANode_CheckIfJoined()

Checks the device joined the network or not in-order to send data. If not joined, the following API is called to join the network

JoinNetworkExample()

Sends out information of node on Up-stream PHY to register the device with Center point

adsAPI_Read_ADSensorData()

Reads data from all available sensors and places data in a global structure SensData

adsAPI_Shutdown_System()

This API sets the ADuCRF101 into SHUTDOWN mode, which is the most pwer saving mode of the MCU.

SendDataObjADSens()

This API is used to package the sensor data acquired and send to the Center point

ANode_Main

The ANode_Main() is the main API in ADRadioNet© , this is a non-blocking procedure that is must be regularly called* when the stack is active. This API returns the current state of the stack. The following table shows all possibly states whereby not all states are possible in every device.

Page 42: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 42

State Node type Meaning ANS_GOING_TO_SLEEP End point This state is issued just before the transceiver

powers down and the stack becomes inactive ANS_ASLEEP End point Transceiver is powered down and the stack is

inactive. ANS_WAKING_UP End point Transceiver is about to be powered-up and the

stack will become active. ANS_AWAKE End point The stack is now active. ANS_DOWNSTREAM_DATA End point

and Router A valid data package has been received from a node in a lower orbit.

ANS_UPSTREAM_DATA Router A valid data package has been received from a node in a higher orbit.

ANS_BIND_DATA Router A valid data package that is bound to this router has just been received.

ANS_LOST_CONTACT End point and Router

Node has lost contact with the network

ANS_HW_PROBLEM All Problems with the transceiver could indicate an invalid configuration.

ANS_NOT_CONFIG All Configuration data invalid ANS_SELFORGANISING All Device is searching for it’s position in the

network.

ANode_SendMessage(Len, U16 Port, AckType)

This API is used to send the messages to other nodes in the network.

Page 43: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 43

APPENDIX- J: Loading firmware using CM3WSD Tool

1. Open CM3WSD tool from “Start All Programs Analog Devices ADRadioNet01_EDK”

2. Choose the COM port the board is connect to, from “Serial Port” drop down list.

3. Choose the baud rate as 115200. Check “Autorun” checkbox.

4. Select the Flash Action as Program and Verify and click Start.

5. Set the boards into serial download mode explained in the section- Loading the “Firmware” on to the boards.

6. This would initiate the download process and the status can be seen on Monitor Status Window. Once the programming and verification is successful, power down and power up the unit to start the application run.

Page 44: All-in-One Getting Started Guide for ADWSN: ADRadioNet · This All-in-one Getting Started Guide, is a chronologically ordered document intended to help users in all respects – right

ADRadioNet01_v2.0.1 All-in-one Getting Started Guide Page 44

FAQ & Troubleshooting

1. PC failed to detect the RF101 unit when connected?

a. The drivers for USB-SWD/UART boards are available in the CD that comes with EVAL-ADFuCRF101-MK hardware. Install the drivers and reconnect the board.

2. Not able to connect node to ADWSN-UI-TOOL?

a. Make sure the USB is detected (by checking the device under device manager)

b. Node cannot be connected to both the tools simultaneously. Make sure to close the tool before connecting to another tool.

c. Make sure the node is not connected to any other tools (teraterm or any other serial communication tool).

3. If the ADWSN-UI-TOOL tool shows “UART_ERROR” message in the UART status

window, the tool needs to be closed and opened again.

4. EP programmed with event driven binary is not sending data when an event is generated, but sending data periodically. Why?

a. The reason could be the board is configured as “Not sleepy”. Enable sleep

mode by either deselecting “Not sleepy” option on ADWSN-UI-TOOL tool or

by sending an “Enable Low Power mode” command from CP.

5. The ADWSN-UI-Tool label will be displayed as “ADWSN Demo” when the tool is not able to detect any valid ADRadioNet devices (node which is not flashed). Once a valid ADRadioNet device is detected the label will change to “WSN ADRadioNet Demo”