P-Helper , Physiotherapy Device

by enavelsasson in Circuits > Arduino

640 Views, 6 Favorites, 0 Comments

P-Helper , Physiotherapy Device

P HELPER - physical therapy with Arduino

Many people around the world have to deal with physiotherapy treatment for various reasons, our system allows to help the patient do the static and dynamic physiotherapy exercises for leg and hand problems and send the data to a physiotherapist.

With this guide, you can build P-Helper, a complete physical therapy based IOT technology which includes:

1. Indication by sound to the user in order to switch to rest or work in a particular exercise.

2. Indication by lights to the user in order to know the status of the exercises completed in the daily treatment set.

3. Send an email to the patient's therapist who presents a graphic analysis of:

  • The maximum angle reached by the patient in the dynamic hand and leg exercises.
  • The maximum angle reached by the patient in each set in the dynamic hand and leg exercises.
  • Number of repetitions reached by the patient in the dynamic hand and leg exercises.
  • Indication whether the patient has finished the static exercise or stopped in the middle.

4. In case of injury the patient will be able to call for help by calling into the device.

5. Indication by lights does the patient get better or worse from the last treatment set.

Supplies

5.jpeg
4.jpeg
1.PNG

In order to use P-Helper we need

To build the system:

1. Circuit Playground Express

2. ESP8266 connects to the Circuit Playground by UART

3. AAA Batteries - X3

4. Holds batteries

5. USB Cable

To program the backend:

1. Arduino - IDE

2. Blink user

3. Integromat user

4. Plotly user

For the treatment:

1. Sports mattress

2. Rubber strap

3. Pouch for cell phone

Preparations

7.jpeg
2.PNG
3.PNG
6.PNG

1. The UART connection to Circuit Playground:

- GND <-> GND

- VCC <-> VCC

- TX <-> RX

- RX <-> TX

2. Open an account on the Blynk platform using the following link: https://blynk.io

3. Open an account on the Integromat platform using the following link: https://www.integromat.com

4. Open an account on the Plotly platform using the following link: https://chart-studio.plotly.com/

5. Download Arduino IDE using the following link: https://www.arduino.cc/en/Guide

6. Download and install the driver to the board using the following link: http://bit.ly/adafruit-windows-drivers

7. Install the SAMD board manager using the following link: http://bit.ly/playground-arduino

Blynk

3.PNG
הגדרה.jpg
יצירה.jpg
11.jpg
make.jpg
make2.jpg
v1.jpg
v2.jpg
v6.jpg
webhook9.jpg
10.jpg

1. Log in to your account

2. Create a new template, fill out the details as the photo (photo #2):

3. Create a new device, from a template (photo #3)

4. Go to your device info, and save the information from the photo (photo #11).

4. Create a new device according to the template we created in step 2 - same name (photo #4)

5. Create 3 new Datastreams in the template we created (photo #5), fill out the details as the photos (photo #6, photo # 7, photo #8).

6. Go to step 3.

7. Go to settings, Webhook and "create Webhook" (photo #9)

7. Create a new webhook, fill out the details as the photo (photo #10)

  • In "DEVICE" fill out your device.
  • In "WEBHOOK URL" fill out the URL from step 3 (the URL webhook from integromat - step 5) .

Integromat and Google Sheet

22.jpg
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg
9.jpg
10.jpg
11.jpg
12.jpg
13.jpg
14.jpg
15.jpg
16.jpg
17.jpg
18.jpg
19.jpg
20.jpg
21.jpg
23.jpg

1. Log in to your account

2. Go to Scenarios and then "Create a new scenario" (photo #1) .

3. Add "custom webhook" module. (photo #2).

4. Add an arbitrary name to this webhook.

5. Copy the webhook url, add to the end of this url "?value=t", and confirm you get "Successfuly determined" (photo #3).

4. Add An arbitrary name to this webhook.

5. Add A router module to the webhook module (photo #4).

6. Add A Gmail module to the router (photo #5).

7. fill out the following details (photo #6).

  • Connection - connect integromat to your Google account with the guide.
  • To - add the physical therapist mail.
  • Subject - give an header that inform the therapist injured during executing the exercises.
  • Content - give a content that inform the therapist injured during executing the exercises (you can use HTML tags) - for example :
Hi, <br> <br>
We got inform that your patient hurted during preforming the physical therapy on {{now}}. <br> <br>
You may want to contact with your patient. <br> <br>
This mail sent by integromat, do not reply. <br> <br>


8. Set up a filter between the router and the Gmail module (photo #7).

9. Add "set multiple variables" module and connect this module to last router (photo #8).

10. Add the variables same as in the photo (photo #9).

11. Set up a filter between the router and the "set multiple variables" module (photo #10).

12. Connect router module to the "set multiple variables" module (photo #11).

13. Go to Google Drive and open new google sheet and call the new sheet "data from integromat", and a new sheet to this sheet, and call those sheets same as in the photo (photo #12).

14. Connect two google sheet modules to the last router module (photo #13) fill out the modules details same as in the photo, add your google connection on "Connection" (photo #14).

15. Connect six "Plotly" modulus to the last router (photo #15).

16. Fill out those values to every Plotly module (photo #16).

  • Connection - connect integromat to your Plotly connection with this guide
  • Format of the graph figure you want to generate - jpeg
  • Figure witdh - 1000
  • Figure height - 1000

17. Fill out the other fields for every Plotly module same as in the photo, from the left module to the right nodule (photo #17).

18. Connect Gmail module to the last Plotly module and fill out the next values (photo #18).

  • Connection - add your Google connection
  • To - add the physical therapist mail.
  • Subject - give an header that inform the therapist that the patient finished the exercises set.
  • Content - write content that describe the results of the patient exercises set with explanation on the graphs. for example -
Hi, <br> <br>
<b> We got inform that your patient finished the exercises on {{now}} </b>. <br> <br> 
Attached the results of the exercises with graphs. <br> <br> <br>
<u> "RaisingHandGraph.jpeg"</u> describe how many times the patient succeeded raise his hand (on exericse 1) above 45 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest). <br> <br>
<u> "MaxHandAngleGraph.jpeg"</u> describe what is the max angle the patient raise his hand (on exericse 1) on intervals of 30 seconds (15 seconds work, 15 seconds rest). <br> <br>
<u> "StaticHandGraph.jpg"</u> describe does the patient succeeded stay with the hand (on exericse 2) above 45 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest). <br> <br>
<u> "RaisingLegGraph.jpeg"</u> describe how many times the patient succeeded raise his leg (on exericse 3) above 75 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest). <br> <br>
<u> "MaxAngleLegGraph.jpeg"</u> describe what is the max angle the patient raise his leg (on exericse 3) on intervals of 30 seconds (15 seconds work, 15 seconds rest). <br> <br>
<u> "StaticLegGraph.jpg"</u> describe does the patient succeeded stay with the hand (on exericse 4) above 75 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest). <br> <br> <br>
This mail sent by integromat, do not reply. <br> <br>
  • Attachments - same as in the photo (photo #18)

19. Connect router and two google sheets to the last Gmail module, your flow should be the same as in the photo (photo #19).

20. Fill out the fields of the google sheet modules same as in the photo (except for your google connection) (photo #20).

21. Connect two "HTTP" modules to the last Google sheets modules, and fill out the fields same as in the photo (photo #21).

  • change the token value to the your token from "Step 2 : Blynk", photo #11.

22. Your final integromat flow should be like the first Photo (photo #22).

23. Schedule integromat to "listen" every 15 Minutes (photo #23).

Arduino + Code

6.PNG
1.jpg

1. Open the attached code using your Arduino IDE

2. Connect your CPX to the computer.

3. Paste the configuration you got from blink ("Step 2 : Blynk", photo #11) to the relevant place in the code, and change the Wi-Fi settings to yours, and then Compiling the sketch and upload to CPX (photo #1).

Downloads

Patient Side

1.PNG
2.jpg
3.jpg
4.jpg
5.jpg

preparation

1. Connect the battery holder to the CPX and Insert the CPX connected to the battery into the cell phone pouch

exercises

2. Slide the Slide Switch to the right - toward Push Button (photo #1)

3. Start exercise number one: Dynamic hand exercise - one press of the right button (Push Button #1)

  • lift your hand with the strip to the maximum degree you can get with the maximum fast for 15 seconds until you hear fast beep, and then pulled down your hand for 15 seconds until you hear fast beep etc. the all exercise takes 2 minutes, in the end you will hear long beep and 2 new bulbs will lit (photo #2).

4. Exercise Number Two: Static Hand Exercise - Press the Right Button (Push Button #1)

  • lift your hand above 45 degrees for 15 seconds until you hear fast beep, and then pulled down your hand for 15 seconds until you hear fast beep etc. the all exercise takes 2 minutes, in the end you will hear long beep and 2 new bulbs will lit (photo #3).

5. Exercise number three: Dynamic leg exercise - press the left button once (Push Button #2)

  • lie back and lift your leg to the maximum degree you can get with the maximum fast for 15 seconds until you hear fast beep, and then pulled down your leg for 15 seconds until you hear fast beep etc. the all exercise takes 2 minutes, in the end you will hear long beep and 2 new bulbs will lit (photo #4).

6. Exercise number four: Static foot exercise - press two buttons on the left button (Push Button #2)

  • lie back and lift your leg above 75 degrees for 15 seconds until you hear fast beep, and then pulled down your leg for 15 seconds until you hear fast beep etc. the all exercise takes 2 minutes, in the end you will hear long beep and 2 new bulbs will lit (photo #4).

7. In the end of the exercises Email will send automatically to your therapist with the exercises results.

injury

8. If during one of the exercises you injured, just shout close to the CPX and your therapist will get informed.

information about treatment process

9. If in the end of the exercises, you want to get information about the treatment process, Slide the Slide Switch to the left (photo #1).

  • The orange lights describes the leg process from the last time the patient was preforming the exercises. 1 light - significant decrease, 3 lights - no progress, 5 lights - significant progress (photo #5).
  • The yellow lights describes the hand process from the last time the patient was preforming the exercises. 1 light - significant decrease, 3 lights - no progress, 5 lights - significant progress (photo #5).

Therapist Side

1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg

1. Go to your Email and check the Emails you got from your patient.

2. Read the "physical therapy summary" mail (photo #1).

  • "RaisingHandGraph.jpeg" describe how many times the patient succeeded raise his hand (on exericse 1) above 45 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest) (photo #2).
  • "MaxHandAngleGraph.jpeg" describe what is the max angle the patient raise his hand (on exericse 1) on intervals of 30 seconds (15 seconds work, 15 seconds rest) (photo #3).
  • "StaticHandGraph.jpg" describe does the patient succeeded stay with the hand (on exericse 2) above 45 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest) (photo #4).
  • "RaisingLegGraph.jpeg" describe how many times the patient succeeded raise his leg (on exericse 3) above 75 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest) (photo #5).
  • "MaxAngleLegGraph.jpeg" describe what is the max angle the patient raise his leg (on exericse 3) on intervals of 30 seconds (15 seconds work, 15 seconds rest) (photo #6).
  • "StaticLegGraph.jpg" describe does the patient succeeded stay with the hand (on exericse 4) above 75 degrees on intervals of 30 seconds (15 seconds work, 15 seconds rest) (photo #7).

3. Read the "injury" mail (photo #8).