IoT Kite building at the Makerversity

3 July 2016 // Marineterrein Amsterdam

The marine-terrein in Amsterdam has become home to an eclectic bunch of companies and artists since it opened its doors to the public in January 2015. This weekend they held an open day for the locals to see what was going on behind the 16th century military walls — In my role as co-organiser of the sensemakers (IoT Amsterdam) meetup group I happily agreed to help out Makerversity at their kite making workshop by making the kites ‘IoT connected’.

Kite Flying at Makerversity

Makerversity is a co-working space for makers and rents an iconic building at the marineterrein and allows sensemakers to meet there twice a month where we try to educate and entertain the IoT / maker community. Sensemakers has been operating since 2011 and has 3500 members around the world with a few of hundred active members in and around Amsterdam.

The kite workshop is something Tom, the founder or Makerversity, and his better half Aimee love to run but the organisers of the marineterrein asked that they spice it up a bit by making the kites internet connected. There was limited time to play with as the workshops were planned at 2 hrs and we had to leave enough time to fly the kites so I thought that it would be a quick win to connect some Ti Sensortags to the kites and show people how to make web dashboards using Freeboard.io.

Ti Sensortag & MQTT

The sensortags are packed with sensors including air temperature, air pressure, and a 9 way accelerometer/gyroscope, they also connect via bluetooth which meant that I could use my phone to download the realtime data from the sensortags and to upload the data onto the web.

TI Sensortag capabilities

After using the default app from the appstore I realised that this has some limitations which I wanted to work around namely that the connection to the bluetooth device seemed pretty shakey and that the data is pushed to the IBM bluemix IoT foundation platform with a random ID each time you use the app and that means that I would have to continually switch the data source on the dashboard.

In the end I managed to download the IOS code which was freely available from Texas Instruments once I registered for a free account at their “GITORIOUS” website, and I switched the MQTT end point in the code to my own server which is illustrated in this screenshot. (1) is the file you have to edit, (2) is the MQTT endpoint and (3) is the topic which I also adapted

Adaption of the IOS code

Once this was installed on the phone I found that the connection was amazingly stable , it did not seem to matter how many times my phone went back to the lock screen or that the sensortag went out of range the connection always either continued or reconnected automatically, this was a great asset for the day.

In the source code I could also see the names of the sensors that I would have to use later on to build the dashboard.

I connected to the sensortag and checked that the MQTT endpoint was working using MQQTLENS and everything looked pretty solid.

MQTTLens

node red & dweet.io

The next step was to get the data prepared for freeboard using a dweet.io stream. For this I returned to IBM Node Red which I always find fantastic for IoT projects and set up a listener on the MQTT endpoint and a simple “post to Dweet.io” node. In the screenshot you will notice some debug endpoints, the MQTT listener, a function to transform the incoming data to dweet.io format and then a “http request” node to post the data to dweet.io.

Node Red flows

Those of you with experience of MQTT will remark that the posting to dweet.io is un-necessary but I wanted to use freeboard.io and this service does not have MQTT included in its list of incoming feeds so I use dweet.io as a link to freeboard.

It is possible to post JSON directly to dweet.io which makes life much easier so the transformation is quite simple as you see in the illustration. For a rather obscure reason I wanted to also store the last value in a global context so if you are duplicating this experiment you can skip these lines of code, you only have to remember that the data from the sensortag is in an object named “d”.

node red function to post to dweet.io

Once this was done I tested the endpoint in dweet.io to make sure there was some data there.

dweet.io feed

Freeboard.io

Now I shifted my attention to freeboard.io and created a new board online and added the dweet as an incoming datasource which is pretty easy as you only have to mention the stream name you are using , in my case mtkite01 (Marine Terrein Kite number 1).

freeboard.i data source

The nice thing about freeboard and dweet is that to select the data on the gauges there is an autofill, based on the format of the data that has been read so in this case I set up a few demo gauges so that I could show people the principles involved, just enough that they could make their own dashboard.

Kite flying

Now we were ready for take off. In the morning we had done some experiments mounting the sensortag at various places on the kite and even though the sensor is very light we found that fixing it to the kite structure itself un-balanced the kite, so we decided to let the sensor dangle on a small piece of string tied at the same point that the chord was connected. The first customer we found that wanted to fly a connected kite was a member of Makerversity and also a member of “Creative Coders” which was perfect for us because she could not only build the kite very well but also decorate it and she was super enthusiastic to add to her knowledge of animation coding — all in all a perfect client.

I can tell you that it worked and worked well. all the values updated in real time via the app to the cloud and then to the dashboard. Here are some pictures of the sensortag attached the the beautiful kite.

Credits

There are a few people to mention and thank :

Tom, founder of makerversity, and his “other half” who were running the workshop

Pascal and Dennis who donated their sensortags for the day

Anush and Adrian at Makerversity for hosting the event

Liesbeth, the project manager transforming the marineterrein from its military purpose into an urban space and who initiated the open day

All at Sensmakers meetup group — this is just the sort of thing we like to do

Links

Sensortag links

  • sendortag GATT documentation
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.