Skip to main content

An Introduction to the OKdo IoT Air Quality Starter Kit

whats_in_the_box_527de8625bd0bb1a38f26b313ce2cee80e63b914.jpg

Setting up the kit to connect to the Okdo IoT Cloud and share air quality data with the world.

The Okdo Air Quality IoT Starter Kit (181-8207) is a really simple way to monitor and share air quality data via the Cloud. The provided sensors use a Wio Link board to connect to OKdo’s IoT Cloud, which is powered by AllThingsTalk, who I had already come across in a previous blog.

What is in the kit

unpacked_14a4be58274764468fc2b8d79c2a2dca0624a0cb.jpg

The Air Quality Kit contains of a Wio Link board (179-3745) , which is an ESP8266 based open-source Wi-Fi board developed by Seeed after a successful Kickstarter campaign about 5 years ago. It also includes 2 of Seeed’s Grove modules that I was familiar with from looking at their Starter Kit, Moisture Sensor, and Voice Recognition kit. This Air Quality Kit has a gas sensor and a temperature/humidity sensor. The TVOC/eCO2 Gas Sensor is based on Sensiron SGP30, which is a digital multi-pixel gas sensor that can detect harmful gases through TVOC (Total Volatile Organic Compounds) and CO2eq. The DHT22 temperature & humidity sensor is a high accuracy sensor used in indoor applications, the measurement range of which is 5% RH –99% RH for humidity, with a temperature a range of -40°C to 80°C.

Getting Started

OKdo_signup_49c41cf35f16afdca57451e581fe4a7fd3228368.jpg

According to the instructions on the card enclosed with the kit, the first thing I needed to do is to sign-up for an OKdo IoT Cloud Account at www.okdo.com/do-iot. In my case, I discovered that the AllThingsTalk account I had set up previously let me sign in, so I didn’t need to set up a new one.

connect_a_device_3c4e8da51bddbcfdeba9c4cee9112bbb487a84b7.jpg

The OKdo IoT Cloud organises members and devices into “Grounds”. When you create your account it automatically creates a Ground for you and names it Playground. If you click on the Playground link and then the +CONNECT A DEVICE button, you will see the OKdo Air Quality IoT Starter Kit listed.

connect_a_device_2_e88fb9bbbf25f9663958bee3da48c59599ea5730.jpg

Simply click on the image of the kit to add the kit to your Playground.

Getting the board and sensors up and running

adding_library_3dc43d43a0c4fcb85ef843a45ede33314ac6b54b.jpg
The next thing I needed to do is to load a sketch onto my Wio Link board using the Arduino IDE.

I downloaded the Air Quality IoT Start Kit library files and installed the library by opening the Sketch menu in IDE, going to Include Library and selecting Add ZIP Library, navigating to my Downloads folder and then selecting the newly downloaded library .zip file.

You will also need to add the Wio Link Board. Still in the Arduino IDE, go to File/Preferences and add the following URL to Additional Board Manager URLs:

http://arduino.esp8266.com/stable/package_esp8266com_index.json"

adding_board_0bc8b4a880c9dcb74e2093babf13a5f277330d6f.jpg

Next, open the Tools menu and select Board and the Board Manager in the pop-out menu. You can then search for and install the Wio Link board. Select and install the Esp8266 package by the ESP8266 Community.

connections1_0c7421ac8509c5b2297c1c5e780de9a66a7364ea.jpg
Once this was done I connected the two sensors to the WIO Link board using the supplied cables. The Temperature & Humidity sensor plugs into the socket marked “Digital2” and the Gas Sensor to the socket marked “I2C”. I then connected the board into a USB socket on my PC.

Back in the Arduino IDE, I selected the newly added Seeed Wio Link board in the Tools menu and the port for the USB my board was connected to. Then in the File menu under examples, scrolled down to Okdo AQ IoT Starter Kit in the Custom Libraries section and selected “Okdo_Air_Quality_IoT_Starter_Kit_V1”. I then needed to authenticate the device.

/*

* Enter your AllThingsTalk device credentials below

*/

#ifndef KEYS_h

#define KEYS_h

const char* DEVICE_ID = "5BroM9c13gfgjijfFHkWyr8B";

const char* DEVICE_TOKEN = "maker:4G8leAuDguYIW1VeVxnpDx9BZXwuSSNb7NaAOyS";

const char* WIFI_SSID= "myWiFi";

const char* WIFI_PASSWORD = "MyWiFiPassword";

#endif

Clicking on the keys.h tab will show the sketch that handles authentication. I needed to add the Device ID and the Device Token.

authentication_560abf654742973e200f9bb75a8f314b3c75f58d.jpg
Back in the OKdo Cloud application and in Playground I could see the Air Quality device I had created. Clicking on that brought up the asset overview where I could click on the Settings button in the top-right of the device screen and from there clicking on the Authentication section, this displayed the Device ID and Device Token that I could simply copy and paste into the relevant sections of the Keys.h sketch. I then next added my Wireless SSID and Password to the code.

I could now compile, upload and run the example sketch.

Following which on the device page of the OKdo IoT Cloud I could see the data from the sensors being displayed and updated each minute. Just to check that it really was working, I plugged the kit into a Power Bank Portable Charger (136-6473) and took the sensors out into the workshop.

workshop_data_9de8264fcb69e57cbe9c7b9614056bf9de57dcb9.jpg

Looking under the “Live” tab in my Playground I could soon see the temperature dropping and the humidity rising.

pinboard_2c8ffdf7f5a0330579d3b89363fc49db10e7e98e.jpg
I could display the data in a more appealing and accessible way by creating a Pinboard. Clicking on the Pinboard link on the left-hand column of the Playground page allowed me to easily create a new Pinboard and add graphs and a location map linked to my devices.

share_pinboard_67598c3c752790f731220a4ea47064e30992d269.jpg

The Pinboard can easily be shared by clicking the Share icon which generates a page with a URL to your Pinboard that is accessible to everyone. The one I created is called Air Quality.

I sent the link to my phone and created a shortcut on my Home Screen so I could check the conditions in the Workshop before I set off to work. There is an AllThingsTalk Android app that could, in theory, also give me access to the data on my ‘phone but I have not had any luck getting to work on my handset.

Further Possibilities

Having powered the kit with the portable charger it occurred to me I could make it properly portable by connecting it to the Cloud by using my mobile phone as a hot spot. There is also a battery connector on the Wio Link board and so it could also be powered that way with a suitable battery, or I could power it from the USB socket in my car, which could be interesting on longer journeys with the addition of a damp dog in the back!

I have a background in the arts, environmental conservation and IT support. In my spare time I do a bit of DJing and I like making things.