Professional Documents
Culture Documents
AMBULATORY BIOFEEDBACK
DEVICE TO IMPROVE WEIGHT-BEARING COMPLIANCE IN
PATIENTS WITH LOWER EXTREMITY ORTHOPEDIC
SURGERIES
BY
Name ID No.
Siddharth Mandar Gandhi 2019A8PS0448G
AT
YASHODA HOSPITAL
A Practice School-I Station of
1
CONTENTS PAGE NO
1. Student Details 3
2. Practice School Details 4
3. Preface 5
4. About Yashoda hospitals 6
5. Abstract 7
6. Acknowledgements 8
7. Introduction 9
8. Project Description 10
9. Project Solution 14
10. Learning outcomes 27
11. Summary and Conclusion 28
12. Reference 29
2
STUDENT DETAILS
AT
YASHODA HOSPITAL
A Practice School-I Station of
3
Practice School Details
STATION: Yashoda Hospital CENTRE: Somajiguda, Hyderabad
4
PREFACE
5
ACKNOWLEDGEMENTS
6
ABOUT YASHODA HOSPITALS
7
Abstract
We all are familiar with lower limb extremity injuries that could be
occurred well playing some sport such as football or any
orthopedics surgery or an accident.
The major problem in recovering from lower limb extremity injuries
is the patient's weight management. If the patient keeps more or
less weight, the condition can get worst or cure in a slow phase.
So, our team members are trying to create a micro process circuit
operated through a mobile app with Maximum weight bearing limit
set beforehand by the doctor. The sensors will be attached to the
area of the lower leg responsible for bearing weight while walking.
The role of the sensor is to detect the amount of extra weight put
through the injured part and display a warning on the connected
mobile.
8
INTRODUCTION
-For accurate partial weight bearing, our project helps the patient
and the doctor to set perfect weight bearing for accurate and fast
results.
9
PROJECT DESCRIPTION
Problem faced: -
-In the PWB process, generally it is associated with two problems
1- Application of more weight than the threshold. (May cause
severe extra damage to the fractured bone and leads to
unbearable pain to the patient)
2- Application of less weight/No weight than the threshold. (May
cause the fractured bone and supporting muscles to regrow brittle
and weak respectively.)
*Threshold weight: Desired amount of weight the patient has to
apply to the fractured leg prescribed by the physiotherapist.
-The two main bones of the leg are the tibia (‘shin bone’) located
medially and the fibula, which is located more laterally.
-The tibia is the largest of the two, hence it is responsible for weight-
bearing.
-Two joints hold the tibia and fibula together (the superior and
inferior tibiofibular joints), as well as an anatomical structure called
the interosseous membrane.
-First is the femur, the bone in your upper leg, which is the longest
bone. People who fracture this bone usually need surgery. The
other two bones are in your lower leg- the shin bone or tibia and
the smaller bone, the fibula.
(Fractures of the tibia or fibula require a period of
immobilization to allow the bone.)
Muscles
10
The leg is divided into three compartments: anterior, posterior, and
lateral. The anterior muscle group includes the tibialis
anterior, extensor hallucis longus, extensor digitorum longus, and
fibularis/peroneus tertius.
-The former opens into the femoral vein, while the latter into the
popliteal vein. The deep veins of the leg are named fibular and
tibial, with the tibial also finishing in the popliteal vein.
-The first two are branches of the sciatic nerve while the latter
stems from the femoral nerve. These three nerves divide further to
supply the various structures of the leg.
Sensations
3 Temperature
5 Vibration sense
6 2-point discrimination
-This was useful for our team members for making sensors for our
project model.
12
Force at the MTH of asymptomatic
volunteers during the stance phase.
13
PROJECT SOLUTION
14
weighing scale. We will finally display the measured weight in the
16x2 I2C LCD Display. We will send the obtained weight value on
the IoT Cloud platform called Blynk Application. Thus, weight can
be monitored from any part of the world simply by observation on
the Blynk app dashboard.
-load cell
-HX711 Module
15
The HX711 Weighing
Sensor uses a two-wire interface (Clock and Data) for communication.
Any microcontroller’s GPIO pins should work making it easy to read data
from the HX711
-Circuit: IOT Weighing Scale with HX711 Load Cell & ESP8266
Here is a circuit diagram for interfacing 40KG Load Cell and HX711
Module with NodeMCU ESP8266 12E Board
16
17
The connection between Load Cell & HX711 has been explained
above. Connect the DT & SCK Pins of Load Cell to ESP8266 D5
& D6 Pins respectively. I have used a push-button tact switch to
reset the weight to zero. Push-button Switch is a connected
digital pin D4 of ESP8266. I used a 16X2 I2C LCD Display to
minimize the connection. So, connect the SDA & SCL pin of I2C
LCD Display to D2 & D1 of Nodemcu respectively.
The PCB Board for the IoT Based Weighing Scale is designed using
EasyEDA online Circuit Schematics & PCB designing tool.
18
-Program to Calibrate the Load Cell
#include "HX711.h" //You must have this library in your arduino library folder
#define DOUT 2
#define CLK 3
//Change this calibration factor as per your load cell once it is found you may need to vary it in thousands
float calibration_factor = -109525;
//-109525 worked for my 40Kg max scale setup
//=============================================================================================
// SETUP
//=============================================================================================
void setup() {
Serial.begin(9600);
Serial.println("HX711 Calibration");
Serial.println("Remove all weight from scale");
Serial.println("After readings begin, place known weight on scale");
Serial.println("Press a,s,d,f to increase calibration factor by 10,100,1000,10000 respectively");
19
Serial.println("Press z,x,c,v to decrease calibration factor by 10,100,1000,10000 respectively");
Serial.println("Press t for tare");
scale.set_scale();
scale.tare(); //Reset the scale to 0
//=============================================================================================
// LOOP
//=============================================================================================
void loop() {
Serial.print("Reading: ");
Serial.print(scale.get_units(), 3);
Serial.print(" kg"); //Change this to kg and re-adjust the calibration factor if you follow SI units like a sane person
Serial.print(" calibration_factor: ");
Serial.print(calibration_factor);
Serial.println();
if(Serial.available())
{
char temp = Serial.read();
if(temp == '+' || temp == 'a')
calibration_factor += 10;
else if(temp == '-' || temp ==
'z') calibration_factor -= 10;
else if(temp == 's')
calibration_factor += 100;
else if(temp == 'x')
calibration_factor -= 100;
else if(temp == 'd')
calibration_factor += 1000;
else if(temp == 'c')
calibration_factor -= 1000;
else if(temp == 'f')
calibration_factor += 10000;
else if(temp == 'v')
calibration_factor -= 10000;
else if(temp == 't')
scale.tare(); //Reset the scale to zero
}
}
20
Once we upload the calibration code, open the serial monitor and adjust your scale
factor with known weight until you see the correct readings. We can press a,s,d,f to
increase the calibration factor by 10,100,1000,10000 respectively and we can press
z,x,c,v to decrease the calibration factor by 10,100,1000,10000 respectively.
Once we see the placed weight is the same as shown weight, note down the
calibration factor and use it in the final code for Weighing Scale.
21
-Setting Up Blynk IoT Application for Remote Weight Monitoring
22
-Source Code: Weighing Scale with HX711 Load Cell & ESP8266
on Blynk
#include <ESP8266WiFi.h>
#include "HX711.h"
#define BLYNK_PRINT Serial
#include <Blynk.h>
#include <BlynkSimpleEsp8266.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define BLYNK_PRINT Serial
const char *ssid = "Alexahome"; // replace with your wifi ssid and wpa2 key
const char *pass = "12345678";
char auth[] = "hePTG-hzhuAzU2h59R90SjQUc98u2Kpb"; // Auth Token in the Blynk
int rbutton = D4; // this button will be used to reset the scale to 0.
float weight;
float calibration_factor = -101525; // for me this value works just perfect 419640
void setup()
{
Serial.begin(115200);
pinMode(rbutton, INPUT_PULLUP);
scale.set_scale();
scale.tare(); //Reset the scale to 0
long zero_factor = scale.read_average(); //Get a baseline reading
Blynk.begin(auth, ssid, pass);
Wire.begin(D2, D1);
lcd.begin();
lcd.setCursor(6,0);
lcd.print("IOT");
lcd.setCursor(1,1);
lcd.print("Weighing Scale");
delay(3000);
lcd.clear();
lcd.print("Connecting Wifi");
WiFi.begin(ssid, pass);
{
delay(1000);
Serial.print(".");
lcd.clear();
}
23
Serial.println("");
Serial.println("WiFi connected");
lcd.clear();
lcd.print("WiFi connected");
delay(2000);
}
void loop()
Blynk.run();
scale.set_scale(calibration_factor); //Adjust to this calibration factor
weight = scale.get_units(5);
lcd.setCursor(0, 0);
lcd.print("Measured Weight");
lcd.setCursor(0, 1);
lcd.print(weight);
lcd.print(" KG ");
Blynk.virtualWrite(V3, weight);
delay(2000);
lcd.clear();
Serial.print("Weight: ");
Serial.print(weight);
Serial.println(" KG");
Serial.println();
if ( digitalRead(rbutton) == LOW)
{
scale.set_scale();
scale.tare(); //Reset the scale to 0
}
24
Results & Observations
➢ When no weights are placed the Display will show the weight
almost equal to zero.
➢ When some weights are placed the Display will show the weight
almost equal to
the weight of the object.
➢ Now we can power on your Blynk Application and you will see
the changes in weight parameters both in label display as well
as gauge.
25
-About Flutter
It’s a cross-platform tool intended for creating Android and iOS
apps from a single code
base by using a modern, reactive framework. Flutter apps are built
using Dart, a simple
object-oriented programming language. The central idea of Flutter
revolves around
widgets. The entire UI is made of combining different widgets, like
a button or menu, a
font or color scheme, a layout like padding, and so on. Flutter
provides its ready-made
widgets that look native either to Android or iOS apps. Some
features and qualities of the flutter are high productivity, fast and
simple development, and compatibility with open-source platforms.
-Progress
Since we have less knowledge about app development and UI
designing, we are in the learning process of the required skills and
are at a good pace of developing those skills and putting them into
practice. I am also following some tutorial videos and employing my
ideas and imagination to make them better and more elegant.
There are some of the app references I came across while I’m
surfing the web which is very similar to our project. So we also
need to come up with our ideas and creatively put them. We have
researched enough about our project and its background to
understand better and proceed further. After enough meetings and
discussions, we started with the app part of the project and wrote
basic code for the app
Basic dart code
Now, we need to develop a homepage for our app and add
necessary things to it, and also make it look good for the users. I
removed the redundancies I found in our code to make it more
efficient with less code. We haven’t added the firebase verification
and login page to the app, as our thought is to differentiate the app
between physiotherapists and patients, so we need to come up
26
with an idea for the login page for different users which again will
differentiate the main app as a physiotherapist will have more
features than the patient such as setting the threshold weight,
which the patient might not know at some times in particular. Here
is the dart code of the home page app.
Home Screen Dart code
And some snapshots of the app taken while testing the code.
Screenshots of the App
The interface of the app has almost completed, there are some
parts left with the frontend part such as the login page and adding
some extra options, and the backend part of the app has not yet
started such as management and storage of the data, analyzing
the data, connecting the app with the electronic device for data
input and output feedback
27
Learning Outcomes
28
SUMMARY & CONCLUSION
29
References
1. https://www.yashodahospitals.com/
2. https://www.yashodahospitals.com/specialities/orthopaedic-hospital-in-hyderabad/
3. https://www.healthgrades.com/right-care/bones-joints-and-muscles/orthopedic-
conditions, Orthopedic Conditions by Sarah Lewis, PharmD
4. Lower Limb Conditions by R. L Huckstep
5. https://www.infoworld.com/article/3224868/what-is-kotlin-the-java-alternative-
explained.html
6. Patterns of weight distribution under the metatarsal heads by E. J. Luger, M. Nissan, A.
Karpf, E. L. Steinberg, S. Dekel
7. https://www.sciencedirect.com/science/article/pii/S1877705816306531/pdf?
md5=d4c327dd3d14620572ea63f8d07aeca8&pid=1-s2.0-S1877705816306531-main.pdf
by Tkachenko Bril A.1 *, David V.1 , Scherer M.1 , Jagos H.2 , Kafka P.1 , Sabo A.1
8. https://api.flutter.dev/flutter/widgets/ListView-class.html
9. https://getstream.io/chat/docs/flutter-dart/?
utm_source={google}&utm_medium={cpc}&utm_campaign=GOO|S|NB|IN|ALL-EN|Core
%26utm_adgroup=DSA%26utm_custom%3D16899291777%26utm_content
%3D593073241663%26utm_term%3D%26matchtype=%26device=c
%26location=1007743&_bt=593073241663&_bk=&_bm=&_bn=g&gclid=CjwKCAjwq5-
WBhB7EiwAl-HEkikc0yhmOwSWxeulcDfo_YJ7VWpBdHyl-
6bfoivGB2c3Cid5QMYwKRoCLWIQAvD_BwE
10. https://www.geeksforgeeks.org/flutter-tutorial/
30