Building The ESN

Sam Billingham in Everyware

The Idea

Thinking of ways to make our world smarter is difficult especially when this workshop has been running a few years and everything seems like its been done before. We thought of improving vending machines, queuing council street bins and more before coming to the conclusion of increasing safety. We decided on creating a safety network for outdoor activities. The ESN as it became named increases safety by reading biometric data such as heart rate and body temperature from an individual which can be accessed via the web by emergency services, with such a system you may be able to tell when somebody is in trouble when they can’t call for help themselves.

We wanted to propose that we could integrate this technology and system into everyday life without people needing to do anything extra. We can use the current infrastructure as most outdoor sports and activities have specialised clothing and equipment. Jackets, wetsuits, thermals, gloves etc can come fitted with sensors and tech required for connectivity, the ESN can be offered as a free service automatically or upon request. Each person can have a multitude of sensors which relate to their health, each person then relates to an activity and in turn to a particular area or place, we felt this would work really well with the MQTT structure. ESN/PeakDistrict/Biker17/BPM for example this is looking at a particular persons heart rate while mountain Biking in the Peak District.

Building Our System

As I described in my earlier post on uses of MQTT, this system keeps it lightweight and low powered by only publishing when there is new data and then our web service subscribing and receives data when it is available. This tech would need to be powered either by a small rechargeable battery something like a Lithium-ion or a small solar powered system or maybe even something combining both, allowing a user to have no need to change how they use their equipment.

For our prototype we set up a number of things. We had the Really Small Message Broker (RSMB) set up and running on a local mac machine. An Arduino pulling GPS location data and temperature data (this was to represent body temperature) acting as an MQTT client publishing its data on set topics. For our prototype we used a wet-suit as our example ‘sensory unit/gear/clothing’, so we were publishing on topics such as ‘ESN/surf/suit1/temp’. We had a Java MQTT client setup on another local mac subscribed to the topics the Arduino was publishing on. Within the Java client we were publishing to Cosm data-streams I created. Cosm is an online service for connecting devices, publishing and handling real-time data it has multiple libraries and API support to connect many different devices and programming languages. We decided to use Cosm instead of creating a system that was fully self contained purely because of time, with less than 2 weeks we wanted to ensure we could build a working prototype. Once our data was being published to Cosm in real-time( whenever new data is available it is published) we could then uses a library within our website called Cosm.js this allowed us to subscribe to our Cosm data-streams via Javascript once again updating whenever new data is available. With our data being updated in Javascript we used these to create our web interface for the ESN, Mapbox.js was a great tool here and allowed us to make visually pleasing maps and plot on Long/Lat values in Javascript. All of these aspects work together over the local Wi-Fi Network to create a working MQTT system and prototype.

My Part

There were many links in the chain for building our prototype, I was responsible for creating and using Cosm, using Cosm.js to read our data-streams in javascript that could later be used for our visualisation and system in a browser. All of this updates when new data is available. As a group we worked on connecting MQTT Arduino and Java clients via the RSMB server and I have a solid understanding of how this works, how to set it up and how to adapt the clients to my needs. I created the video to showcase our prototype online. I had my first experience using JSON and Curl while testing and learning how to use Cosm, things that sounds scary until you give them a go.

The future and Additions for the ESN

This whole system we built uses Wi-Fi to connect the MQTT clients, this would be the first thing to change, The ESN would need a data connection with a much greater coverage HSPA or 3G would allow for wider application. 3G connectivity could be easily added either through use of a mobile phones 3G connection or by adding a 3G module to our system.

Emergency services could have access to all of this data to help with their work.

Two-way communication

Our system only implemented one way communication, data form the sensors is published to the server but there is possibility for our Arduino to also be subscribed to topics that are published from other clients. These could be topics that relate to other clients that are in you area for example if someone is in danger/hurt close by you could be alerted. There is also possibility for weather warnings or Tsunami warnings via early detection systems that the Arduino clients are subscribed to. Un-intrusive Alerts could be Buzzers or LED strips or adding more advanced functionality some systems could make us of LCD screens (LCD screens in your jacket sounds pretty Sci-Fi but if it saves you and others i’ll take it.).

Real world use and Implications

With a quick change to using 3G this system could be scaled and running as a real worlds solution very quickly especially for some of the easier activities such as horse riding or mountain biking. Reducing the size of our integration by building off an Arduino Mini or Nano and having custom sensors constructed that fitted within clothing would allow for easier/better finished product. Working out locations for sensors may be difficult but not impossible, a GPS needs to be pointing towards the sky to lock onto satellites and there would need to be some research on where to place heat sensors for reliable body temperature sensors. It would also be important to note that body temperature can differ within sports and would need to be tweaked for activities for example, surfers get really cold but are still functioning perfectly fine and on the wrong place on a mountain biker it may appear the person way on fire, but there just hot and sweaty. Am example could be a glove and would work well for heart rate and GPS, the GPS module could be located on the back of the hand often facing towards the sky and the heart rate monitor over a finger for semi accurate BPM analysis.

Some other activities may be a little more difficult, take surfing for example, first everything needs to be water proof ouch! If its not based around head/shoulders its going to underwater a lot and I’m pretty sure that won’t work to well, that and the fast you don’t have a mobile out to sea unless you have one of those ’life prof’ cases and I doubt many people do and actually use them. We thought of using Xbee and creating a mesh network, where as-long as you’re within 1km of another surfer it would be able to relay you’re position and data back to the beach which could have a Wi-Fi link. This Xbee mesh network works on surface and has some chance for expansion but leaves it obsolete if only 1 person is around or if someone drifts of into sea by themselves you’d still never know, i think some more thought is needed here.

Published December 17, 2012 by Sam Billingham in Everyware