Eclipse Open IoT Challenge 2.0 - Update #9 "Monitor your health with IoT Vaidya"

It's been an amazing week on the Tumblr, have seen some amazing projects so far.Through this post we would also like to throw some light on our work throughout this Open IoT challenge.

Our last post was about the cloud end of our project, this time it is about the Medical Gateway.


As we proposed in the beginning of competition for building a health monitoring system for patients in rural India, since then we have come a long way.

Components of the Medical Gateway:

Sensors which we are using in the medical gateway:
1.Heartbeat
2.Temperature
3.Galvanic Skin Response
4.ECG 

Along with the above sensors, we have also connected following accessories to make the device a full proof solution:

1.Camera: Camera is used for taking patient's relevant photos , which would be useful for doctor to diagnose the disease.

2.Speaker: As we are building this device keeping in mind patients of rural India , It's obvious that we keep it simple.As a result of this, all the instructions given to the patient while operating the device, would be in the form of audio in his/her regional language.

3.Keyboard:
It would be used to enter the primary information about the patient,
such as :
  • Name of the Patient
  • Age
  • Contact Number
  • Village

4. Display: For making the device more user friendly and convenient , we are using a Touch screen TFT display.



5.Power Bank:
To make the device portable, we are powering it using a 5V power bank.


Last But not the least :
6.Raspberry Pi(Heart and Brain of the Device)


How does the health monitoring system work:

1.Taking the Image and sending it to the Bluemix IOT service:

Note: As IBM Bluemix only allows maximum of 4096 bytes of MQTT packet size, it became complicated for us to send image using the MQTT. Hence we have used HTTP post request to send the image to cloud. 
Posting Image to IBM cloud

Application starts from the initial node

  1. The credentials of IBM Bluemix IOT device is passed using createParams operation. IoTFoundation block starts the IBM Bluemix session, using the credentials provided in the createParams , where all the sensor data would be send.
  2. Speech block converts the string into an audio.
  3. The Photo block captures the image and pass it to the Convert Image block where it is converted to JPEG.
  4. The makepost operation provide the URL for post .
  5. The HTTP Post block posts the image , after converting it to the json.It also gives the response. 

Once all the relevant images of the patient is send to the doctor, it is time to extract the data from bio sensors using ADC MCP3008 and deliever it to the IBM Bluemix Service using MQTT.
Here we have used Eclipse Paho project for MQTT.

2.Fetching all the data from bio sensors and sending it to Bluemix IOT service.

Note :Raspberry pi doesn't have its own ADC. For interfacing analog sensor ,you need to attach external ADC.We have used MCP3008.


Sending the sensor data to IBM cloud using MQTT
  1. Provide the credentials , to start a session with IBM Bluemix IoT cloud.
  2. "samprate" operation sets the sampling rate for ADC.
  3. The sensorBlock block gets the ADC values of all the sensors connected to various analog channels of MCP3008. The data from each sensor is recorded and stored in the form of array.This array is then converted to string.
  4. The string  is passed to Event block where it is converted to JSON and send to the registered IBM Bluemix cloud.
After building the project in eclipse ,we used kura to deploy it on the raspberry pi.Reactive blocks provide various target platforms such as Java source code, Java standard Edition, OSGI bundle project and Kura bundles.

To get the source code of our project , visit the Github repository.
Follow us on twitter too, to get constant updates.

Comments