Developing an Application of Wireless Sensor Network in Autonomous Systems

We are surrounded by Autonomous Systems. Whether it is self-driving cars or home automation system, autonomous systems is the essence of new age technology.

One of the key factors while developing an autonomous system is the exchange of data between different modules. This data exchange takes place over a sensor network and since these networks are wireless, they form Wireless Sensor Networks (WSN).

WSN consists of a collection of individual nodes that interact with their environment to sense or control physical parameters and they collaborate with each other to fulfill the task. Single nodes are incapable of performing all the tasks own their own and hence multiple nodes are required to collaborate with each other by using wireless communication.

As useful WSNs are, they come with their set of challenges. The most important being that of energy efficiency. Long duration of operation is desirable for sensor nodes in a wireless network. Since these devices operate on batteries, energy efficiency becomes even more important. Nonetheless, in the age of autonomous systems, the significance and importance of WSNs cannot be emphasized enough

There are ample opportunities to build multiple projects or varying scale to demonstrate the application of WSNs in autonomous systems. The availability of a wide variety of development boards make it easy for hobbyists and developers to bring their ideas to reality.

We developed a simulator to control the an autonomous vehicle simulated in a ROS environment using 6LOWPAN or IPv6 over Low -Power Wireless Personal Area Networks. The aim was to demonstrate the application of sensor, communication and actuation in a wireless fashion.

Hardware used:

  1. SimpleLink™ Multi-Band CC1352R Wireless MCU LaunchPad™ Development Kit
  2. SimpleLink™ ULP Sense BoosterPack™

Software used:

  1. TI Code Composer Studio (latest version available)
  2. A SimpleLink SDK for the development board being used

PS: These softwares are free for use and versions are available for Windows and Linux OS variants. Unfortunately variants are not available for macOS but we managed by using Virtual Machine with an Ubuntu 18 image on it.

Hardware Features:

  1. CC1352R is priced at 40 USD on the TI website. It is essentially a wireless MCU development kit. It comes with a 32 bit ARM Cortex processor core and contains 2.4 GHz and Sub-1GHz radio for wireless applications. It supports IEEE 802.15.4g, 6LOWPAN (Thread), broad band antenna supports both 868 MHz ISM band for Europe and 915 MHz ISM band for US with a single board. The best feature of this launchpad is the fact that different TI sensorboards like the ULPSense Booster pack can be directly plugged in to the launchpad and with the available TI SPI drivers can be very easily interfaced. Availability of extensive documentation and tutorials are very helpful too. More features of the board can be deciphered from the layout as shown below.
CC1352R Functional Diagram

2. Sensor boosterpacks are an easy and convenient way of adding digital sensors to your launchpad. There are multiple variants of sensor boosterpacks that can be used in tandem with CC1352R like SimpleLink™ ULP Sense BoosterPack™ and BOOSTXL-SENSORS that TI has developed with Bosch-Sensortec. We chose to use ULPSense over BOOSTXL even though BOOSTXL has a gyroscope while ULPSense only has an accelerometer because BOOSTXL interfaces with CC1352R via I2C protocol and because CC1352R doen’t have SCL and SDA needed for I2C, the same needs to be implemented in software via bit banging. On the other hand, ULPSense interfaces with the launchpad via SPI and these pins are available on both boards and hence the interfacing becomes much easy. For our application, simple tweaks in the accelerometer values could give us gyroscope like features (anyways we were not looking for roll or yaw!). That is the reason we chose ULPSense.

ULPSense comes with following sensors: light sensor, potentiometer, flow meter, capacitive touch sensors, accelerometer, reed switch for use with CC1352R.

What we did-

  1. We used 2 CC1352R launchpad and one ULPSense. A combination of launchpad with ULPSense was named “sensor” because it was used to sense the accelermeter value. The other CC1352R was named “collector” because it collected the accelerometer value communicated via 6LOWPAN.
  2. In this way the “collector” acted as a border router and we used TCP to communicate or control the autonomous car in the ROS environment.
  3. OpenThread Border Router (OTBR) was implemented by using OpenThread’s Docker. The sensor and collector connect to each other via thread network and communicate via IPv6. The OTBR running on the system connected to the collector acted as a gateway to allow communication of a thread network with an external network ie. in our case the ROS environment.

Useful Resources:

The advantage of using TI boards is the availability of tutorials and various support packages. You need not write the code for entire BLE stack or 6LOWPAN (believe me, it’s not easy!). Code Composer Studio provides many preexisting modules that can be configured as per our requirement and we’re good to go. Debugging is easy as well. The resources and tutorials can be found at these links:

P.S: This is a very small application of WSNs and we could implement this in 4 hours (developing, testing and debugging). The development board supports BLE amongst many other features and can be used to interface multiple sensor nodes with each other wirelessly. To give an example, a Google home or an Amazon Alexa can be used to interface and communicate or control various appliances in the house by using WSN — well, just saying!

Happy Coding!

The demonstration (with explanation) of this project can be found here:

Video Demo of the Project

Student for life. An aspiring researcher in CV and ML. Here to share all I’ve done or learnt.