Project overview:
Often this is applicable to under developed (N.Africa) and developing nations (like India) where the vaccines storage environment (temperature) tracking is a big problem. When the environment is not optimal(temperature is not within the expected range), the efficacy of these vaccines is lost. All the health worker carries is a portable box with some cold pads (door to door polio vaccine campaign). Our connected maraca has to help ensure the safety and efficacy of the vaccines. While the traveling health workers go around, based on the vaccine type and recommended environment setting, sensor data will be sent to the cloud.

Over the cloud using data analytics we can predict if a vaccine vial is about to get spoiled (predictive analysis), so that it can be moved to a safety spot on time. Also, the data will help us determine if a health worker has not followed the best practices, and take actions accordingly. Also, using smartphones and cloud, health workers can be prevented to administer spoiled vaccine. This idea can be extended to efficient storage and handling of other environment-sensitive medicines as well.

The unique and innovative attributes of your Project:

At present the commercially popular solution is to only monitor the cold chains (statically installed freezers) to ensure proper storage of the vaccines. But the health workers need to go around on the field most of the time to administer the vaccines. Our application offers a solution to monitor the storage and safe keeping of the vaccines on the move. The recorded data also serves as a very important input for the scientists and engineers working on creating more environment-robust insulation box and vials. Our solution is economic as well. In case, the health workers need to go to remote areas, where Internet connectivity is absent, all the recorded data can be stored in the IoT device, to be pushed to the cloud in a batch, once the worker is back to connected area. Also, in the absence of Internet, anomaly detection algorithm running in the kit, can give a forewarning to the health worker immediately by turning on the buzzer.

What is the target audience and available market for your Project?

Target Audience: Health workers administering vaccines on outdoor fields.

Available Market: Health Organizations, Government Offices, who are investing a fortune every year to vaccinate kids in the country. This is more applicable to developing countries, where at present, availability of high quality insulated portable boxes, fast and efficient travel means to different areas is a challenge.

How does your Project technically work?

Intel Galileo board with multiple sensors (temperature, light, air quality, gyro) attached to it, is running in a portable box with vaccines, which a health worker is carrying. The board can be connected directly to WiFi, or we can enable to Bluetooth to connect to the mobile phone of the worker. Sensor data recorded is processed in an anomaly detection algorithm inside the IoT board and if it detects environment anomaly, the buzzer starts sounding. The processed data is also periodically pushed to the cloud for further analysis. Analyzed data will send a live Push Notification to the mobile phone of the health worker, and his coordinator (a meaningful and informative message is displayed) to handle the crisis situation effectively.

How does your Project take advantage of

a. Cloud connectivity?

Crucial sensor data recorded inside the portable box is periodically pushed to the cloud. Cloud has enough resource to efficiently process the huge amount of data received. The data analysis done on cloud, is not possible to do in the IoT board. The insights received from the data analysis not only helps a health worker take corrective measures on time, but also promises the building of a better solution in the future.

b. Sensor utilization?

Multiple sensors are used to monitor the environment of the portable box carrying the vaccines. In the future GPS sensors can also be added to track the movement of the health worker, generating more insights. The amount of information gathered from the sensors in an absolutely non-intrusive way is very effective in such ground level scenarios.

Usage of each sensor data: .i. Temperature==strict temperature range should be maintained, otherwise raise alert .ii. Light==Over exposure to light can spoil the vials, raise alert .iii. Air Quality==degradation in air quality means, insulation is not working properly, raise alert .iv. Gyro==if the vial is not kept in a proper position and if it is moving too much, it can go bad, raise alert .v. Buzzer==raise alert

How does your Project make use of

a. Software components?

Components used: 1. Intel XDK for IoT to write JavaScript programs to run on Galileo 2. Putty to run setup commands and install npm modules on Galileo 3. Android SDK to write Android App to receive Push Notifications from the Cloud 3. Java to write Restful web services to receive data from Galileo 4. Linux programming on Amazon EC2 to setup Amazon cloud for data analysis 5. Apache Tomcat to run Restful web services to receive data from Galileo 6. Elastic search algorithm in Java setup to do data analysis for huge amount of data 7. NoSQL database setup to store the received data 8. HTML5 CSS programming to setup Kibana dashboard displaying real-time processed data with intuitive details 9. Java program to enable real time Push Notification to Android Phones using Amazon SNS and Google Cloud Messaging Service (GCM) 10. OS used: Windows 8, Linux. 11. We have done a full setup of Intel Analytics Cloud as well, but since the connectivity was intermittent, we moved to AWS.

b. Hardware components?

1. Intel Galileo board 2.Grove kit and sensors (temperature, light, air quality, gyro) 3. WiFi card

c. The Dev Kit?

All the hardware components listed above came in the Dev Kit

Future Work:

a. Connect the Galileo board directly to the phone using Bluetooth. In remote areas, where Internet connectivity is absent, the data from the sensors will be stored inside the phone's SD card over Bluetooth. Also, the data can be stored inside the IoT board itself. Later when the health worker is in Internet zone, the data will be pushed to the cloud.

b. An Android app for the health worker: Each health worker gets money for administering a vaccine. This is one of his biggest incentive. After administering the vaccine, he will be using the app to register the administration. These registrations will be used to calculate his incentive. As soon as the IoT board detects a vaccine going bad, it will disable the registration of administering of that vaccine. This way, the health worker won't administer a spoiled vaccine, just for incentive.

c. One box can be made to carry different kinds of vaccine vials to reduce luggage. Each type of vaccine has a different set of optimal environmental thresholds. The IoT kit should be able to monitor each of the different vaccine vials, based on their different set of optimal thresholds, and not using one common set of thresholds for all the vials in the box.

Our Learning:

a. Intel Galileo board is way more reliable, powerful and easy to program with compared to Raspberry Pi.

b. Using JavaScript in Intel XDK for IoT is really amazing. We are working with five different sensors, a buzzer, making rest calls to the cloud -- all are done with less than 110 lines of codes! Learning curve is steep, but once you are familiar with the system and the libraries, running a fully working app on the Galileo board is really quick and easy.

b. Spark Core seems more compact than Galileo board. We have heard Intel Edison board is at par with Spark Core, but we haven't worked with it yet.

c. Uploading programs to Galileo board over WiFi is not very reliable when many people are sharing the WiFi and pairing up their laptops with the Galileo board. Hence, we had to use the Ethernet cable to upload the code to Galileo. But, once code started running, the board was working fine and efficiently over the WiFi.

d. Sometimes, the board becomes unresponsive, and we had to reboot it and restart our app. As per our experience, it is the same with all the boards we have worked with. These boards need sometimes before the app execution is stabilized. We hope if proper logging can be done, this issue can be addressed more effectively.

e. The sensor value reading by Galileo board and data push over the WiFi card is very fast. Really useful for hard real time critical applications.

f. We had done a full setup of the sensor recorded data on Intel Analytics Cloud as well. But since the connectivity was intermittent, we moved to AWS.

What more we would like to know about the Intel IoT Kit:

a. What kind of battery backup it needs, and how long on an average it can run continuously on battery. This is an important factor to determine what are the apps it is suitable for.

b. How reliably the Intel IoT kit can withstand extreme environment conditions?

c. Performance benchmark

d. Fault tolerance features

e. Can we add addition flash storage to it?

f. What all computer peripherals (other than Ethernet, power cable) we can attach?

Step 1: Setup Intel Galileo Gen 2 Board (Arduino Sketch 6.1) on Windows 8.1 64 Bit

1. Get the Latest guide from https://software.intel.com/en-us/iot/hardware/gal...

2. Software Download - http://www.intel.com/support/galileo/sb/CS-035101...

3. Do the following before connecting SD card to the board --

a. Install Arduino Driver - ....\IntelArduino-1.6.0-Windows\arduino-1.6.0+Intel\drivers

b. Follow the latest guide above till the Blink LED example.

4. Do the following after connecting SD card to the board --

a. After you connect the SD card, the Galileo COM port will disappear in Device Manager, and a CDC Serial Driver will appear in Unknown Devices

b. Install CDC Driver -

b1. In 'My Computer' you will see SD Card has appeared as a Removable Disk -> GoTo folder win-driver, copy iotdk-serial-external.zip into your local, unzip it.

b2. In Device Manager, right click on CDC Serial Driver --> Click Update driver --> Choose 'Browse Computer ..' --> Browse to the folder, where you have unzipped the above file.

b3. Refresh Device Manager - Action Menu - Scan for Hardware changes

5. Connect to Internet:

a. Using Terminal (Putty) - https://software.intel.com/en-us/articles/getting...

b. Connect to Internet - https://software.intel.com/en-us/articles/getting...

c. Connecting to WiFi - https://software.intel.com/en-us/articles/getting... (If it is not working, you will need to disable any Internet proxy you have turned on)

Step 2: Connecting Grove Sensors to Galileo Board - How to and Tips & Tricks

1. We have used Grove Starter Kit Plus - Intel® IoT Edition: http://www.seeedstudio.com/depot/Grove-starter-kit...

2. This video from YouTube will show you how to set it up -

3. Understand the Grove shield and sensor in more detail: http://www.seeedstudio.com/wiki/Grove_-_Starter_Ki...

4. One important thing to understand when connecting a sensor to the Grove Base Shield and the sensors: There are two types of sensors: Analog and Digital. Depending on this, the sensor needs to be connected to the Analog or the Digital pin. If you connect the sensor to the wring ping, the program won't complain, and you will get results back from the sensor as well. But the result won't be accurate. Hence, you need to very careful about connecting the right sensor to the right pin.

5. Reading from the sensors and Writing to the sensors: Arduino Wiring and the Intel XDK SDKs have made writing code for these very simplified. You need just one line of code to do reading and writing. But doing this in the proper way can be tricky.

Reading and writing the sensor values - With sensors we are monitoring the environment. That means, we are reading/writing the sensor values at regular intervals. Setting this interval of reading/writing is tricky.

Reading - If you set the interval too short, for reading some values will be captured by your program, but not all. This is because, the speed the reading loop in the program is much higher than the physical capacity of the sensor to read environment parameter (temperature, motion, sound, etc.). But, skipping one or two values won't affect your program logic much. Hence, you won't even understand this is happening.

Writing - But when you are trying to write to an output device (buzzer, LED, etc.), if the interval is too short and you are running a code toggling the value (ON in one round, OFF in the second) to be written, the device may not behave properly. This is because of the hardware speed limitation. By the time the device, say buzzer, get the command of on turning ON, before even it triggers the physical sounds, the OFF command reaches it. Hence, you may need to do some trial and error to set the interval here.

Step 3: Writing Code in Intel XDK IoT to Read Sensor Value and Write to Peripherals

The entire project zip is attached in this post - CloudComm.zip

1. Guide to use Intel XDK IoT - https://software.intel.com/en-us/intel-xdk-iot-edi...

2. Create a new Node.js project and write your code in main.js. You don't have to edit any of the other project files. Your entire code will be in main.js. We have used the node.js template from the above link.

3. We used the sample code from the Grove Intel Stater Kit Page (shared in the previous step). Here, I have attached the project files as a zip. Let me explain some parts of the code here -

4. To install libraries you need to run commands on the board:

(a) Do a putty to the board. Keep the baud as 115200, 8 and 115200

(b) Do an ls in / to confirm the yokto is installed

> cd /

> ls

(c) You may need to update the packages to ensure the sensor reading and device writings are working fine:

> opkg update

> opkg upgrade

(b) To install ndoejs modules:

> npm -g install

> npm link

4. Code Snippets -

(a) MRAA Library to read sensor values and write out to the pins - MRAA is a Low Level Skeleton Library for Communication on GNU/Linux platforms. In the Intel XDK IoT template, the main.js files has detailed instructions how to install the libraries.

var mraa = require('mraa'); //require mraa
console.log('MRAA Version: ' + mraa.getVersion()); //write the mraa version to the Intel XDK console

(b) Load Grove module -

var groveSensor = require('jsupm_grove');
var upmBuzzer = require("jsupm_buzzer");

(c) Connect to Analog/Digital pin -

var temp = new mraa.Aio(1); //analog data at pin A1
var led = new mraa.Gpio(2); // digital data at pin D2

(d) Read value of Analog/Digital pin -

tempValue = temp.read(); //read the value of the digital pin
airValue = air.read(); //read the value of the analog pin

(e) Write to Digital pin -

var led = new mraa.Gpio(2);



Step 4: Setting Up Amazon Web Services (Amazon Cloud) - Rest Service on EC2

We have set up a Rest Service on AWS EC2, to communicate between the Galileo Board and Cloud. main.js in CoudComm project contains the code to send HTTP POST request to cloud. Here is code snippet -

''+date.getTime().toString()+'&temp='+tempValue+'&air='+airValue+'&light='+lightValue+'&gyro='+gyroValue, function (error, response, body) { //console.log("cloud response: "+response.statusCode); console.log("data sent to cloud"); //if (!error && response.statusCode == 200) { //console.log("success!!"); //} } );

Steps to setup Rest Service on EC2 --

1. Setting up EC2 - http://docs.aws.amazon.com/AWSEC2/latest/WindowsGu...

2. Start a Windows Instance - http://docs.aws.amazon.com/AWSEC2/latest/WindowsGu...

3. Create a Rest Web Service - We created a J2EE REST Webservice (Spring MVC Framework) using Eclipse, and ran it on Tomcat. Follow the tutorial here to setup the service - http://codetutr.com/2013/04/09/spring-mvc-easy-res...

4. Attached Zip File VaccineService.zip contains the java and jsp code for the REST service for this project.

Step 5: Push Notification Service to Android Phone - Amazon AWS SNS and GCM

We have used Amazon SNS to take values from the rest service in EC2, and push it to Android Phone using GCM (Google Cloud Messaging Service)

1. Setting up SNS: http://aws.amazon.com/sns/getting-started/

2. Setting up GCM: http://docs.aws.amazon.com/sns/latest/dg/mobile-p...

We added the SNS project in the same workspace as that of the Rest Services. The SNS Java code is attached as the zip file Vaccine-SNS.zip.

To use the sample given by Amazon with minimal changes, we passed the message from Rest Service as a parameter 'msg_EC2'.

In the java file SNSMobilePush.java, we read the message from the Rest Service into the variable 'msg_EC2'. To account for this extra parameter, we edited the method signatures in couple of the files imported (AmazonSNSClientWrapper.java, SampleMessageGenerator.java) by SNSMobilePush.java. The rest of the sample code given by Amazon is kept as is.

The method setData() inside SampleMessageGenerator.java, is used inside the rest service java code to set the message to be sent to the phone:

public static void setData() {

this.msg_EC2 = msg_EC2;


Note: In the Rest Service code I uploaded here, VaccineService.zip, the setData() call is not added. You can add this method directly in the controller, or create files in /service and /repo folders as per MVC convention to read the sensor data from the Controller and then let SNS copy it from the setData() method inside the /service file.

<p>I have added the source code to the project now. Hope it will you of use to you all. Please contact me if you have any questions.</p>
<p>Nice and well explained project</p>
<p>Hi,</p><p>I have done a DIY Project of a weather station based on Intel galileo and built with a 3D printer pushing the probe data to wunderground.com. My wish is to also collect the data into the cloud to do analytical work, as well as been able to push the info using web rest services to an iOS device.</p><p>You work will help me with some/all of this second step; is there is any chance to have a llok at the source code of your Project?</p><p>Thank you. </p><p> Carlos</p>
<p>Sure. Let me message you my email id. Please send me an email there and I will share with you all the detail. Thanks!</p>
<p>Hi! I have uploaded the code at last!! Sorry for the delay! Please check it out!</p>
Hello mam...u have done a great work.<br>I m working with Intel iot...and want your help regarding ur project....it wud be really helpful if u send me your code and other generic details of ur work.<br>I have to give my project name soon and sector....plz try to reply me as soon as possible.<br><br>Thanks <br>Kirti
<p>nice work!</p>
<p>Hi,</p><p>It's a piece of really nice work you've done here! However - if you'd like to avoid millions of hours implementing this, you can use ready solution - Intel IoT kit agent (built-in in Edison) &amp; dashboard (dashboard.us.enableiot.com). It also allows sending alerts and has quite robust Analytics. <br>Regards, <br>Joanna</p>
Hi...I m using ths Intel gallileo gen 2 fr my project....want to work in sum health,education,and providing more smartness in lives.....I m new does nt have enough information abt hw shud I work...<br><br>Can u plz help me out...with some projects...and hw these agents and dashboard r helpful...can u plz provide ur email id also.<br><br>I wud be really thankful to u.<br><br>Thanks<br><br>Kirti
Hi...I m using ths Intel gallileo gen 2 fr my project....want to work in sum health,education,and providing more smartness in lives.....I m new does nt have enough information abt hw shud I work...<br><br>Can u plz help me out...with some projects...and hw these agents and dashboard r helpful...can u plz provide ur email id also.<br><br>I wud be really thankful to u.<br><br>Thanks<br><br>Kirti
Hi...I m using ths Intel gallileo gen 2 fr my project....want to work in sum health,education,and providing more smartness in lives.....I m new does nt have enough information abt hw shud I work...<br><br>Can u plz help me out...with some projects...and hw these agents and dashboard r helpful...can u plz provide ur email id also.<br><br>I wud be really thankful to u.<br><br>Thanks<br><br>Kirti
<p>Thanks for the tip! Let me check this out, and I will let you know if this was really helpful!</p>
<p>Thank you for sharing this!</p>
<p>Thanks!! I am glad you find this useful!</p>

About This Instructable




Bio: Computer Researcher, Software Engineer
More by kajarigd:Mobile Vaccine Monitor (Intel IoT) 
Add instructable to: