fbpx

AIM

Ensuring the safety of the medical personnel such as doctors and nurses attending to corona affected patients and reducing their workload.

 

Background:

Given the alarming rate at which our frontline warriors – our medical staff – are succumbing to the deadly Coronavirus during care, it is critical that we ensure their safety. The scarcity of medical equipment and personnel are putting a lot of strain on medical personnel. Moreover, there are indisciplined patients and the virus’s extremely contagious existence. Most hospitals are understaffed, making it impossible to care for a large number of patients at once. This is where my proposed method comes into play. Centered on the Arduino MKR1010 Wifi and Arduino IoT Cloud, I want to make a ground wheeled bot to attend to and track patients.

 

General Idea:

Doctors and nurses put themselves in great danger to attend to corona patients for even minor tasks like giving them medication or monitoring their temperature. To avoid this, I propose a ground robot capable of locomotion inside a hospital setting, assisting patients and meeting basic needs, as well as setting off an alarm in the event of an emergency. Each bed will be allocated a unique identification number. The doctors or nurses will send the bot instructions wirelessly over Wi-Fi (if the hospital has a connection) from the comfort of their homes, using an app that links to a web application based on Arduino IoT Cloud.

Using a script for Arduino IoT Events, the app will provide instructions for monitoring the body temperature, administering medications, and providing other necessities. The bot’s central controller will be an Arduino MKR1010 Wifi, which would power the four-wheeled vehicle.

A calling button on the bedside allows the patient to summon the bot at any time. When the bot receives a signal to attend to a patient, it goes to that bed and, using the magnet attached to it, wakes up the IR LED on the bedside, which sends a coded message corresponding to that bed. If the codes match, the bot will move on to the next step.

This configuration was chosen specifically to ensure data protection, which is a significant concern these days. Furthermore, the wakeup mechanism ensures that the MKR module, capable of drawing less power when in sleep mode, does not over drain the battery. On the bedside, a panel of buttons would be given, from which the patient could request essential items such as water or summon medical assistance. If the doctor asks to see the patient, the bot can also provide audio and video footage from the MKR board and related peripherals. The patient will be given instructions through the Display shield on the monitor. The temperature data logged will be used to monitor the ward’s windows and air conditioning.

Besides, the sensor data from ventilators or other monitoring devices may be used by the module placed on the patient’s bed to activate warning messages for the doctors and assistance in an emergency. Suppose the attending doctor is not present on-site in a crisis. In that case, he will perform specific simple tasks using the external plug-and-play modules that can be placed on the bot, such as administering fluids or adjusting the settings of life-support modules like ventilators before qualified staff arrives.

The app would keep track of all willing, involved, and qualified doctors on the site and send out a warning if the doctor caring for that patient was unavailable (something like Ola and Uber). Enrollment will be voluntary and based on competence. This will help doctors in hospitals with a high patient volume minimise their workload while also allowing doctors in less affected areas to chip in and help out.

Through the software that integrates with AWS IoT Core, the doctor can keep track of all of the patient’s symptoms, including ECG and other vital sensor data, which may aid in providing life-saving orders to hospital staff remotely. Every patient’s data will be stored in the cloud, where it could be exchanged with medical and academic circles globally for drug discovery and the adoption of better medical practices.

The doctor will have power over the camera module in the app, which could track disobedient patients without putting themselves in danger. The platform can also be used to help patients with a variety of other issues.

 

Mechanical Design of the Bot:

A four-wheeled differential drive would power the bot. The camera module would be mounted on the arm, and the back would be used to install several modules for various types of medical work.

 

The modules will be plug-and-play and operated remotely by the doctors. ABS plastic will be the material. The majority of the chassis would be constructed from cutouts of standardised plastic sheets and boxes, saving time and money in the production process.

 

 

Overall Benefits and Unique Selling Points:

●      Efficient implementation of social distancing for medical personnel

●      Entities connected through IoT (bots, beds, equipment and application)

●      Remote access by staff to the patient and medical instruments

●      Low-cost design

●      Easy to prototype and implement, especially in remote environments

●      Constant monitoring of the patient with updates about patient condition

●      A unified platform for doctors to share the workload

●      Protects the medical staff from physical harm and indiscipline from a patient

●      Data storing and logging on the cloud for future analysis

●      Power-efficient, portable and scalable

 

Architecture

 

 

 

 

The Disinfection Mechanism

 

Ultraviolet light destroys the genetic material in pathogens that is DNA in bacteria and fungi, and RNA in viruses thus preventing them from reproducing.

Why UV-C is destructive

 

The lamp used

 

I used a 11W lamp for the disinfector. It was fixed vertically on the central vertical axis of the bot and mounted from the base on an MG995 servo motor.It was mounted from the base on an MG995 servo motor and fixed vertically on the bot’s central vertical axis. For improved reflection, I also added an aluminium sheet in the shape of a quadrant behind the bulb.

DC to AC convertor

 

It was difficult to get this thing to work because it needed a lot of power and had to be powered by an AC supply. Building my own inverter was my first idea, but I discovered that making a sine wave inverter would take a long time. So , I ordered a simple AC to DC converter, which will provide enough power for my UV C Lamp.

Calculations for the UV lamp rating requirement

While selecting a UVC lamp one has to be really careful as just selecting any random UVC lamp would not suffice, adhering to the medical guidelines was also important.

 

Final Circuit

Final circuit

 

Bill of Materials

This project was the most economically taxing project for me. I ended up spending 300$ the detailed breakup of which is given below:

https://docs.google.com/spreadsheets/d/1xxzlfJThkISSSLX-Ai6zzygMf7h-JJnN6emyjOt12Qk/edit#gid=0

I received some funding from the Tata Main hospital I was working with and this project is being used for something valuable.

 

 

 

The Cloud Connection

For the sake of brevity, I have uploaded the data collection and analysis procedure separately over here

https://drive.google.com/file/d/1eHk4JO2pSan4la0rFdM_tw8W3J-evHHp/view?usp=sharing

 

Future Work

  1. Getting the bot certified for use in healthcare facilities.
  2. I cannot rely on Arduino Cloud so the aim is to shift to a more configurable web service. An Android app was expected to be developed, but the hardware testing took so long that I was unable to complete it.

 

Conclusion

The cost of installing the system in a hospital with 40 beds is much lower than any of the cheapest ventilators!!!

Given the number of doctors we will be able to save as a result of this technology, I think it should at least be given a try. The cost is minimal, and the time required to build it is short.

Do watch out!! Till then – bye and thanks for reading.

 

 

 

References

https://forum.fritzing.org/

https://wiki.dfrobot.com/HUSKYLENS_V1.0_SKU_SEN0305_SEN0336#target_0

http://www.tatamainhospital.com/

https://create.arduino.cc/iot/

https://create.arduino.cc/projecthub/marcopass

 

Credits –

Moinak Ghosh

IIT Kharagpur

Fig 1 : Block Diagram

The figure below depicts the distribution of power and data lines in the robot and also outlines the signal flow.

The figure below explicitly shows which data is monitored, how it is sent, where it is sent.

The IoT Connect

Circuit

Now, let’s dive into each subsystem.

 

Locomotion Mechanism

The locomotion module was perhaps the most difficult element to create. The first thing I did was get some aluminium C channels and split them into 1m strips, which I then joined together in a square pattern. I used hot glue to secure the ends before bolting them together. Then I bolted L-shaped steel channels to the square frame and mounted the high-torque Johnson motors (60rpm). I connected 2A motor drivers and corresponding circuitry to the motors. The control lines were routed to a 20X30 zero board controller board that I designed for the MKR.

Control Board

I used a FLysky RF transceiver for wireless control and connected an 8000mAh LiPo battery pack to the power lines. This guide will show you how to configure the Flysky transceiver kit:

I slowly raised the throttle and saw that the bot moved but, due to the high torque motor the C-channel collapsed.

Bot Base

Mechanical Placement

Added 4 more motors for changing direction

After we concluded that the movement was sufficient, we added the LIDAR and line sensor arrays. This was a difficult challenge since fine-tuning control parameters was not simple. It took three days for me to get it to function properly. The final video is as follows:

Final video: https://drive.google.com/file/d/17Cbb-IQMIuLTcGxveTo5NY_0y1xGPGul/view

To understand the autonomous traversal algorithm, I have removed the tray on which essentials are held and the robotic arm that delivers medicines.

I began working on the communication code after the locomotion mechanism was over.

For this we just needed to tweak the example Wifi server application on the Arduino MKR1010 and configure the ESP-12F boards to be the Wifi clients. Many tutorials are already available on Youtube and Hackster.io for this task.

 

 

Cleaning Mechanism

I mounted a servo head on top of a sprayer bottle handle that pushed down and sprayed sanitiser onto the floor and the sides of the robot. I purchased this sprayer bottle on Amazon (100 sprays per 50 ml) and filled 1L of water in it before installing a TowerPro 9g servo motor on top with mounting screws (M3 size). The servo was operated by the board’s main microcontroller, the MKR.

https://www.amazon.in/DEVICE-Handheld-Protection-Sprayer-Pressure-Gardening/dp/B08G1WKMJK/ref=sr_1_12?dchild=1&keywords=sprayer&qid=1598343405&s=garden&sr=1-12

Disinfectant flask

The Disinfection Mechanism

Ultraviolet light destroys the genetic material in pathogens that is DNA in bacteria and fungi, and RNA in viruses thus preventing them from reproducing.

Why UV-C is destructive

The AC lamp used

I used a 11W lamp for the disinfector. It was fixed vertically on the central vertical axis of the bot and mounted from the base on an MG995 servo motor.It was mounted from the base on an MG995 servo motor and fixed vertically on the bot’s central vertical axis. For improved reflection, I also added an aluminium sheet in the shape of a quadrant behind the bulb. 

It was difficult to get this thing to work because it needed a lot of power and had to be powered by an AC supply. Building my own inverter was my first idea, but I discovered that making a sine wave inverter would take a long time. So , I ordered a simple AC to DC converter, which will provide enough power for my UV C Lamp.

Calculations for the UV lamp rating requirement

While selecting a UVC lamp one has to be really careful as just selecting any random UVC lamp would not suffice, adhering to the medical guidelines was also important.

Final Circuit

Bill of Materials

This project was the most economically taxing project for me. I ended up spending 300$ the detailed breakup of which is given below:

https://docs.google.com/spreadsheets/d/1xxzlfJThkISSSLX-Ai6zzygMf7h-JJnN6emyjOt12Qk/edit#gid=0

I received some funding from the Tata Main hospital I was working with and this project is being used for something valuable.

The Cloud Connection

 Go to Arduino IoT Cloud

 Make an account and verify your email address(not helping you with that)

 Go to the Devices tab and connect your Arduino MKR1010 Wifi to your computer via a microUSBB

cable

 On successful detection, you should see this

• Give a name to your device(No spaces or special characters)

Device Setup

• Create a new Thing

Name the thing

• Go to the Add Property tab and add all the necessary data configuration

• Your device is all set to send data to the cloud

·       Edit the automatically generated Sketch and upload to your board using Arduino Create Agent which you will be prompted to download for your preferred browser

• Go to your Dashboards tab and view the incoming data

Connecting with Google Sheets for visualisation and easy cross-platform access

In the Web Editor we need to add some code to the template sketch that has been generated. First, before the setup function, we define three constants for the board pins that will be used:

#define PIN_TEMP A1

#define PIN_HUM A2

#define PIN_BATT 5



Next, in the setup function, we initialize pin modes:

pinMode(PIN_TEMP, INPUT);

pinMode(PIN_HUM, INPUT);

pinMode(PIN_BATT, INTPUT);



In the loop function we read analog values from the sensors:

int wd_temp = (analogRead(PIN_TEMP) * 3.3) / 1024.0 - 0.5) * 100.0;

int wd_hum = analogRead(PIN_HUM)*100*RHF;

float batt_percent = analogRead(PIN_BATT)/4.2 * constB;



Now we must fill the Secret Tab with our WiFi credentials and then upload the sketch to our Arduino board. When the sketch is uploaded, the board should connect to the cloud (we can check by opening the Serial Monitor) and we should see values changing every 30s in the dashboard view of IoT Cloud.

Google Apps Script

Now let’s put aside the Arduino part of this project and let’s concentrate on the Google app.

First thing first, go to Google Sheets and create a new blank spreadsheet. Rename the sheet to something like “RoboData”, then click on Tools > Script Editor to open Google Apps Script

·       Go to Tools > Script Editor to open Google Apps Script

·       In the window that appears we can write some code that will be executed whenever a message is sent from the IoT Cloud using webhooks. Our goal is to read incoming data from the cloud and write them in a spreadsheet as a table. We want to write not only the properties’ values but also the date and time at which they are updated.

·       First, we define variables for our spreadsheet and for the sheet which will contain numerical data:

var sheet = SpreadsheetApp.getActiveSheet().getSheetByName(‘RoboData’);

Here we define some constants:

var MAX_ROWS = 1440;  // max number of data rows to display

var HEADER_ROW = 1;   // row index of header

var TIMESTAMP_COL = 1; // column index of the timestamp column



·       We define MAX_ROWS because we want to maintain constant the number of rows of our table, i.e. each time an extra row is written, we delete the last one. In order to define MAX_ROWS we have chosen a total buffer time of 12 hours, then considering that the Cloud updates properties every 30 seconds, we can calculate MAX_ROWS = 3600s / 30s * 12h = 1440.

The function doPost(e) {} receives post request from the IoT Cloud and stores the incoming data into the variable e. Inside this function, we will automatically update our spreadsheet.

·       In order to get sensible data from e, we have to interpret it as a JSON object:

var cloudData = JSON.parse(e.postData.contents);

cloudData is now a JSON object with the following structure:

{webhook_id: 312064b8-ea32-5711-959b-6643b8ce8d2c,

 device_id: 268a4d5e-d882-4961-9fff-abc42b641142,

 thing_id:  d161b2f0-a830-4c01-b0d7-6cdf0d9f6456,

 values:    [{id:        1552695e-50b8-4cd3-b2c7-826bdeedb0ec,

              name:      power_switch,

              value:     true,

              persist:   false,

              updated_at: 2019-02-25T09:59:52.14Z,

              created_by: f5d24652-25f8-4295-abce-d056ac47b3d8},...,{}]}



Notice that the values field is itself an array of JSON objects!

We can extract parameters from cloudData in the following way

var webhook_id = cloudData.webhook_id; 

var device_id = cloudData.device_id;

var thing_id = cloudData.thing_id;

var values = cloudData.values;



·       Next, we store names and values in separate arrays just to make things more manageable:

var incLength = values.length;

var incNames = [];

var incValues = [];

for (var i = 0; i < incLength; i++) {

 incNames[i] = values[i].name;

}



·       Now we read the timestamp of the incoming message and we turn it into a javascript date object. Since the timestamp is already formatted as yyyy-MM-ddTHH:mm:ss.mmmZ, we can use the Date.parse() method:

var timestamp = values[0].updated_at;

var date = new Date(Date.parse(timestamp));



·       Due to inconsistency and presence of duplicate messages, we add some checks so to accept messages in ascending order with respect to time:

if (date.getYear() > 2018) {

 // discard all messages that arrive 'late'

 if (sheet.getRange(HEADER_ROW+1, 1).getValue() != '') { // for the first time app is run

   var now = new Date(); 

   var COMM_TIME = 5; // rough overestimate of communication time between cloud and app

   if (now.getTime() - date.getTime() > COMM_TIME * 1000) {

     return;

   }

 }

}



Important note: adjust COMM_TIME based on the WiFi connection quality of your board! Moreover, COMM_TIME must be smaller than the update interval chosen in the IoT Cloud (30s in our case).

·       If the incoming message gets through previous checks, we can start writing data into our spreadsheet.

·       The following code block automatically detects properties’ names and writes them in the header row.

sheet.getRange(HEADER_ROW, 1).setValue('timestamp');

 for (var i = 0; i < incLength; i++) {

   var lastCol = sheet.getLastColumn();

   if (lastCol == 1) {

     sheet.getRange(HEADER_ROW, lastCol + 1).setValue(incNames[i]);

   } else {

     // check if the name is already in header

     var found = 0;

     for (var col = 2; col <= lastCol; col++) {

       if (sheet.getRange(HEADER_ROW, col).getValue() == incNames[i]) {

         found = 1;

         break;

       }

     }

     if (found == 0) {

       sheet.getRange(HEADER_ROW, lastCol+1).setValue(incNames[i]);

     }

   }

 }



·       Next, we delete the last row, if the maximum number of rows has been reached:

var lastCol = sheet.getLastColumn();

var lastRow = sheet.getLastRow();

if (lastRow > MAX_ROWS + HEADER_ROW - 1) { 

 sheet.deleteRow(lastRow);

}



·       We insert a new row, specifying its style:

sheet.insertRowAfter(HEADER_ROW);

var range = sheet.getRange('A2:Z2');

range.setFontColor('#000000');

range.setFontSize(10);

range.setFontWeight('normal');



·       And finally, we write the timestamp and all other values:

sheet.getRange(HEADER_ROW+1, TIMESTAMP_COL).setValue(date).setNumberFormat("yyyy-MM-dd HH:mm:ss");

   // first copy previous values

   // this is to avoid empty cells if not all properties are updated at the same time

   sheet.getRange(HEADER_ROW+1, col).setValue(sheet.getRange(HEADER_ROW+2, col).getValue());

   for (var i = 0; i < incLength; i++) {

     var currentName = sheet.getRange(HEADER_ROW, col).getValue();

     if (currentName == incNames[i]) {

       // turn boolean values into 0/1, otherwise google sheets interprets them as labels in the graph

    if (incValues[i] == true) {

         incValues[i] = 1;

       } else if (incValues[i] == false) {

         incValues[i] = 0;

       }

       sheet.getRange(HEADER_ROW+1, col).setValue(incValues[i]);

     } 

   }

 }



·       In order to actually use this code we first need to publish it, thus go to Publish > Deploy as web app. If you’ve never saved the project before you will be asked to name it. In the popup window select a new project version and make sure to give access to the app to “anyone, even anonymous”, then click on deploy.

Select New Project Version and give access to anyone

Copy the web app URL that appears and click OK.

Copy the web app URL

The copied URL will be our webhook the IoT Cloud will use to access the Google app. We must copy this URL in the IoT Cloud edit view under webhook and click Update.

Paste the URL under webhook in the IoT Cloud

At this point, let’s power our circuit! If everything is working correctly, after the board is connected to the cloud we should see rows appearing in our spreadsheet once every 30 seconds. Remember that there is a bit of delay between the cloud and the spreadsheet updates, so don’t worry if the timestamps don’t match up perfectly with the actual time: they should have a delay of some seconds, depending on the quality of the WiFi connection.

Making Sense of the Data – with Charts

The only thing that remains to do is to create cool charts and add some style to the spreadsheet. For example, we can make the header text bold, change its color and set alternating colours for other rows. We can also choose specific date and number formats for each column by going to Format > Number.

In order to add a chart, select the timestamp column and another column (you need to select the entire column, not a limited range), then click on the chart icon, and a new chart will be created. To avoid problems due to scrolling of the sheets when a new row is added, click on the three dots on the top right of the chart window and click on Move to own sheet. This will move the chart into a new sheet and from there we can customize it as we want by clicking the Edit button.

Future Work

  1. Getting the bot certified for use in healthcare facilities.
  2. I cannot rely on Arduino Cloud so the aim is to shift to a more configurable web service. An Android app was expected to be developed, but the hardware testing took so long that I was unable to complete it.

 

Conclusion

The cost of installing the system in a hospital with 40 beds is much lower than any of the cheapest ventilators!!!

Given the number of doctors we will be able to save as a result of this technology, I think it should at least be given a try. The cost is minimal, and the time required to build it is short.

Do watch out!! Till then – bye and thanks for reading.

 

 

 

References

https://forum.fritzing.org/

https://wiki.dfrobot.com/HUSKYLENS_V1.0_SKU_SEN0305_SEN0336#target_0

http://www.tatamainhospital.com/

https://create.arduino.cc/iot/

https://create.arduino.cc/projecthub/marcopass

 

Credits –

Moinak Ghosh

IIT Kharagpur

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

or

Log in with your credentials

or    

Forgot your details?

or

Create Account