Help Requuest for Parkinsons glove development

stevewidget

Member
Licensed User
Hello,
I am a volunteer engineer with Remap charity (https://remap.org.uk/) who make and modifies aids for the disabled in the UK. One of our members who suffers from Parkinsons brought this to my attention,
which shows a remarkable transformation for someone with severe Parkisons. It may be 'fake' news, so much is these days, but there are a lot of links where other people have built a unit based on the open source software available here and several other sites
.
I have built a unit, and am awaiting feedback on how effective it is, but I would like to make this an open source project for all. As it is not FDA approved I am planning on making a batch of these boards and giving/lending to Parkinson's patients ( who make a voluntary contribution if they find it useful)) but I need to monitor usage and its effectiveness. I have looked at data logging on an arduino, but this would put up unit cost.
I would like to do this with what should be a really simple mobile app that
1. Select period for motor 30 mins to 4 hrs in 30 min increments and start micro.
2. Records date and time together with an optional comment box or maybe 0-10 effect no. (0= no effect , 10 running marathon!)
3. email results on monthly basis
4. should issue warning if used ,or attempt to use for more than 6 hours a day.
My problem is that I really don't have any experience with B4x and I really want something ASAP that is reliable without my Newbie bugs.
I intend to use an ESP32-C3 with Battery backup and BLE for communication with Mobile ( both Android and IOS) and either BLE or USB to connect to PC/Mac.
I know that this is the business page, but I really would like this to be a voluntary contribution from the community and didn't know where to post, please move if another forum is more suitable.
Testing should be really easy, just connect four LED's to pins on any ESP 32. I think this should also be written in B4R rather than Arduino.
Many thanks for your interest.
Steve
 

hatzisn

Well-Known Member
Licensed User
Longtime User
What are these motors? Vibration motors or something else?
 

stevewidget

Member
Licensed User
Hi,
Thank you for your interest.
They are small disc vibration motors for phone etc. Full details are in the second link I think, I got these
They draw around 100mA so going to use a ULN2803 or similar to drive them. I'm not a newbie to electronics if you were worried about blowing ESP up! But flashing LED's in specified order should be fine for testing
Steve
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Hi, I cannot see the picture:

1715139899270.png
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Ah, I have found the github project. It really is an interesting project. I did some research in Google Gemini and I do not know how the shield of the motors work for the Arduino but if it can drive the vibration motors just with power (as it seems in the suggested motors in Github) I would use what Gemini suggested (MCP23017 GPIO Expander - I2C capable - 16GPIOs - Checked in components pinout app and AllDatasheets - Used with an external 3,3 power source) in conjuction with BJT transistors 2N2222A and an external power source to vibrate the motors regardless if the vibration motors are driven by 3,3 or more volts. I would use the 2 microcontroller configuration for freedom of movement and in one of the microcontrollers I would run an MQTT server (see appropriate post in the forum with the guy that has done this) and in the other an MQTT client. This would define a proper communication between the Gloves and make sure the motors are activated approprietely. With the MCP23017 you can also use the one controller configuration obviously. I could also help you in this but as said in a A.S.A.P. manner since I have an on-going project right now which is ending soon. Send me a private message on what you want if it is more than what you describe...

Edit - Also since they are motors do not forget to use also the reverse diode (like this).



 
Last edited:

stevewidget

Member
Licensed User
Thank you for reply Hatzisn,
I am an electronics engineer, not a programmer, and am comfortable handling a variety of micros. As I said I have already built an arduino (Used a Leonardo, but works on Pico and ESP32 using Arduino IDE. I use a ULN2803 and pair up the inputs to give me 8 outputs to drive 8 motors for both hands..
Yes this chip is old-fashioned (probably like me) and has a >1v drop which is useful as I am overrunning the motor which is nominal 3V from the USB. It is also designed for inductive loads, so has the required protection diode. I really don't think I need a gpio port expander. I could run my current code on an 8 pin ATTiny or a 20cent CH552, but these I can't control from a mobile.
What I don't have is any experience with the B4X environment, yes I have used many flavours of basic over the years (lets just say >40years), but am finding it harder to learn new dialects as I get older. I am sure I could do it given a few months or so but I really would like to get some usable units out for testing as soon as possible. I could produce a bunch of the Arduino non-connected units now. The only problem is that they are to be used by people with Parkinsons, which often leads to memory loss, and my guinea pig can't tell me how often he has used it, hence the requirement for Mobile app control and database.

There is a lot of information on the hardware and requirements for the pulse timing in the github page ( though an option to change that timing via the app could be useful), and various people have built versions of it, follow links under the YouTube or google Parkinsons gloves.
I don't want or need a very sophisticated solution, the current solution uses delay loops for timing, but there is nothing else to do when driving one motor,so why not (I see that B4R supports delays, and under most circumstances quite rightly doesn't recommend)

I have seen on the forum that there is an example for sending a command over BLE to an ESP32 from Android and IOS, so hopefully adding the timing and database function is probably not that difficult for someone familiar with the environment. Parkinsons is a horrible debilitating disease, and this device may only help a small percentage of sufferers, but that's still hundreds of thousands of people worldwide. so please if you have the skills consider spending a few hours of your time to get this out as an open source project to help as many people as possible.

Many thanks
Steve
 

stevewidget

Member
Licensed User
Sorry Hatvisn,
just worked out where your thoughts on a GPIO expander come from. Ii is not necessary to use an H-bridge to control the motor, a simple switch will do , as you don't need to reverse the motor, and it really doesn't matter which way it rotates, as it will still vibrate. I know that's what they suggest on github, but not required.
Thanks again for your interest. I want this project to be completely open , so would rather not PM thank you.
Steve
 

stevewidget

Member
Licensed User
Sorry that github is not mine, and I don't have ANY software to put into it even if I start my own Github (which is something else Ive never used!)
I really need help with the whole project on the software side, electronics , enclosures, gloves etc I can handle.
I was really hoping that someone in the community would have been touched by Parkinsons, and willing to help me.
There has been quite a lot of interest on the web, and searching for Parkinsons Gloves will reveal many different versions built around the world. Heres one that is closer to what I intend making.


Once again thank you for your interest. Maybe I need to raise some money to pay someone to do this, and not rely on charity. Is there anyone who will help me for money, and how much?
Thanks
Steve
 

aeric

Expert
Licensed User
Longtime User
Sorry that github is not mine, and I don't have ANY software to put into it even if I start my own Github (which is something else Ive never used!)
Github is FREE to create an account.
You can fork other's people source code (repository) or create a new one.
If you don't have code yet, you can just add a README page and write all your ideas. It doesn't need to have a lot of things.
Then do things by baby steps.

Even if you know nothing about github, try it today. It doesn't bite.

Edit: It also provide a way for sponsorship to fund your project.
 
Last edited:

stevewidget

Member
Licensed User
Thank you aeric,
I am trying hard not to learn too many new things at once, but concentrate more on what I do know, and that's the electronics and manufacturing side of this project, as I said learning gets harder with age, and I think it is important to get this project started sooner rather than later. I don't see me having a great need to program mobile devices, or for that matter PCs in the future, no matter how interesting it may be.
Steve
 

aeric

Expert
Licensed User
Longtime User
Thank you aeric,
I am trying hard not to learn too many new things at once, but concentrate more on what I do know, and that's the electronics and manufacturing side of this project, as I said learning gets harder with age, and I think it is important to get this project started sooner rather than later. I don't see me having a great need to program mobile devices, or for that matter PCs in the future, no matter how interesting it may be.
Steve
Well, if you are planning to lead the project then at least you need to manage a team.

Start recruiting your people.
Set up a communication channel like Discord or WhatsApp group.
Once everything is setup, everyone has their own roles and you can concentrate on your parts.
 

stevewidget

Member
Licensed User
Thanks Aeric,
actually, I was trying to 'recruit' someone with this posting, I thought it might be an interesting and rewarding project for someone with the knowledge I lack.
I was hoping for a few more questions and some dialog on what the software should do, not particularly on project management or hardware which after 20 years as MD of a technical company, and a further 20+ years as an independent consultant and volunteer engineer I think I have enough experience to get by managing a project, even without Github.
PLEASE somebody ask me about the software requirements.
Thanks
Steve
 

aeric

Expert
Licensed User
Longtime User
Thanks Aeric,
actually, I was trying to 'recruit' someone with this posting, I thought it might be an interesting and rewarding project for someone with the knowledge I lack.
I was hoping for a few more questions and some dialog on what the software should do, not particularly on project management or hardware which after 20 years as MD of a technical company, and a further 20+ years as an independent consultant and volunteer engineer I think I have enough experience to get by managing a project, even without Github.
PLEASE somebody ask me about the software requirements.
Thanks
Steve
Since you said you have years of experience managing projects, I feel I am not a right person to advise. (In fact, initially I just passed by and to fix the broken link)

My problem is that I really don't have any experience with B4x
I think this should also be written in B4R rather than Arduino.

I am still not clear what is your objective.

I think if you have the prototype working in Arduino, just continue working on it. Unless you really see there is a need to port to B4R where members here are more familiar with it so it would help you with the development on the board. But I see you can manage it on your own.

even without Github.
It is fine. Use whatever you feel comfortable. For simplicity, just create a new thread for the project.

I need to monitor usage and its effectiveness. I have looked at data logging on an arduino, but this would put up unit cost.
I would like to do this with what should be a really simple mobile app
Do you mean instead of giving away each user with the "glove" (board+connected motors+battery) and the arduino as a data collection server, you want to eliminate the arduino server by replacing it with the user's own mobile phone, so you can save the cost? The data is send to the mobile app directly from the glove.

So the question is how B4X can give the solution?
The advantage of using B4R instead of arduino is there are some libraries that can be use between B4R and other B4X projects, such as B4rSerializator.

a really simple mobile app that
1. Select period for motor 30 mins to 4 hrs in 30 min increments and start micro.
2. Records date and time together with an optional comment box or maybe 0-10 effect no. (0= no effect , 10 running marathon!)
3. email results on monthly basis
4. should issue warning if used ,or attempt to use for more than 6 hours a day.
I intend to use an ESP32-C3 with Battery backup and BLE for communication with Mobile ( both Android and IOS) and either BLE or USB to connect to PC/Mac.
So not only the mobile app (B4A and B4i) is required but also a B4J app need to be develop.

The PC/Mac version is used by your users or you alone?

If the latter, does that mean you need to collect the data from the mobile app in the same local network when they meet you or remotely through Internet?

This is in real scenario. How about the contributors of this project? They need to have the same equipment and setups.

You mean they also need to volunteer and use their own money to buy all the stuff?
 

stevewidget

Member
Licensed User
Hi Aeric,
Thank you for the response.
I am obviously not explaining myself clearly enough. I wonder if you have watched any of the You Tube?
I don't have a problem with the the arduino based device, I have a problem with collecting data to determine its efficacy usage, for example does it need to be used every day, and for how long? I looked at using a data logger shield (RTC and SD Card) , but this puts the cost up considerably as it also really needs a simple display and keys, and then there is a problem transferring data for analysis. Added to this the user or carer is unlikely to be computer literate, the simpler the process, the more likely to get valid data.
I saw an example of BLE talking to ESP32 and IOS and Android to turn an LED on or off in the forum
(though I think there was an update that showed B4i as well )
, which is the only control I REALLY need ( being able to set up different time sequences would be a bonus, but not for phase one) and a method on the mobile of recording date and start/stop time, and a comment field. This would then be emailed on a regular basis, which means on the internet not locally. I probably dont need the PC/Mac version very often, but several users have to use a computer with accessibility aids, they do have Parkinsons. I said in my first post if the contributor can control 4 LEDs thats enough, vibrating the motors is meaningless if you dont have Parkinson's.
The ESP32-C3 I am planning on using costs >$2 from Aliexpress, if they don't have a compatible ESP I would happily re-imburse for this or other reasonable expenses, but yes in an ideal world I would like them to volunteer a little of their time to help, but if they really need the money then I guess within reason that could be arranged. Any code contributed would be open source and published with credit unless paid for.
I have attached my Arduino code for reference, this is basically the code for Random167.ino from the Github page, with the AF motor library taken out. Not very sophisticated or optimised I know.
I hope this clarifies my requirements.
Steve
 

Attachments

  • parkyc3.zip
    1.3 KB · Views: 13

emexes

Expert
Licensed User
There are two flavours of Bluetooth:

- "original" Bluetooth Classic, which includes emulation of a UART-style serial byte-by-byte connection, and
- Bluetooth Low Energy (BLE), where information is read and written to attributes, which look like hardware registers

example of BLE talking to ESP32

That example uses a HM-10 module which is a combination of the two: it provides a Classic-like serial byte-by-byte connection but over BLE.

On the device side, it is a regular 3-wire serial connection (ground, tx, rx);

on the Bluetooth side, it is two attributes ("registers"),
a writable attribute for transmitting bytes (in chunks of up to 20 at a time, I think), and
a readable attribute for receiving bytes (again, in chunks of up to 20 at a time)
(the received bytes are delivered by notifications, which push the bytes to you, rather than you having to poll for them)

But (most?) ESP32s can be a regular BLE server (look like hardware registers) with no extra hardware required.

It is possible to automatically search for and connect to a BLE device. I am not sure that this is possible with a Bluetooth Classic serial device.

This project here seems to be doable within the Arduino IDE:


It is to connect an ESP32 BLE server with an ESP32 BLE client, but you only need the server side. Once you've got that working, even just transmitting dummy static test data like "Steve was here" or live data like the current Millis() reading, then you can test it using the nRF Connect mobile app.

Are you thinking to have a switch on the glove to turn it off and on, or to do it from the app? Or both? As in, are we commanding the glove to start and stop, or is the glove going to be telling the app when it starts and stops?

If app is in command, what happens if the phone battery runs out, or the operator can't find their phone? Is the glove then unusable?

If the glove is in command, then what happens if the app is not around to log the usage? Or again, if the phone battery runs out?

Also, what about elderly people who are bamboozled by computers, including smartphones? I didn't appreciate how complicated these devices are to use, until I did a work-placement in aged care. Even just switching devices on using a long-press on the power button is a challenge - the full procedure being: pick up the device, if the screen is black, it might be asleep or it might be off, so click the round button once to see if it wakes up, if that doesn't work, click the power button on the side to see if it wakes up, and if that doesn't work, press and hold the power button on the side for a few seconds, and if that doesn't work then the battery is probably flat or some joker has turned the brightness right down.

Double-lol years ago I spent a good half-hour on the phone with mum diagnosing why "the computer isn't working properly". It turned out that at the local library computer course, she'd been told that it's ok to experiment in settings, you can't break anything. So mum had experimented with swapping the left and right mouse buttons.
 
Last edited:

aeric

Expert
Licensed User
Longtime User
I wonder if you have watched any of the You Tube?
I did. But the discussion I want to bring not focusing on the practical side, I am talking on the technical side which I think is the main focus of this thread.

I have a problem with collecting data to determine its efficacy usage, for example does it need to be used every day, and for how long? I looked at using a data logger shield (RTC and SD Card) , but this puts the cost up considerably as it also really needs a simple display and keys, and then there is a problem transferring data for analysis. Added to this the user or carer is unlikely to be computer literate, the simpler the process, the more likely to get valid data.
I saw an example of BLE talking to ESP32 and IOS and Android to turn an LED on or off in the forum
If I understand correctly, looking at the arduino code, I just make a guess, it is trivial to rewrite it into B4R.

To summarize what I understand, the whole program is using a random number function to generate the output and write to the LED/Motor pins. So there is no sensors or automatic data to send. All the data is generated by the program or sketch inside the board or ESP. The only parameters or control I can think of are whether the user manually turn it on or off, the time when the board is triggered if there is a timer set and which pin was triggered.

Not sure a data logger shield is required but I think the real-time data can be sent directly to a collection server, be it a mobile app or a remote server. But a data logger that work without Internet or BT connection might be a good upgrade.

The concept is much like a fitness tracker or smart watch which is connected to a mobile phone for synching of data when available, except for the glove does not use any sensors.

Yes, there are some examples on the forum about using BLE or Bluetooth connecting to ESP boards. So there are less challenge here.

Your real challenge here is the other solution on the B4A, B4i and B4J side. While you can learn it by yourself the B4X language, it is in fact a very easy to learn BASIC variant language; you want to get assistant from the fellow B4X members to build it for you. So the project that going to be built is a data collection app, from the ESP. With the examples mentioned, it is good to start.

Then to proceed further with your requirements, the developer need to add the required functionality, such as
  1. recording the data into a database,
  2. do data processing and analysis,
  3. perhaps presenting the data on a table or graphical chart,
  4. consolidate the data into a central server for further analysis, in your case using an email on monthly basis,
  5. sending notification or message to the board/app for long duration usage,
  6. making a user friendly user interface
 

stevewidget

Member
Licensed User
Thank You for your responses, Taking Emexes first
I have to apologise as that was not the example I meant to post, but for the life of me I cant find it again, so maybe I imagined it, but it was basically an example using B4R on ESP32 to talk to B4A and B4I using BLE. My (mis)understanding is that IOS doesn't talk nicely to Classic BT and BLE is the way to go.
Your points about the elderly are noted ( I probably qualify in that category for 99% of the forum) , and especially the dementia side of Parkinsons, however my logic is that anyone who needs these gloves is unlikely to live alone , or not have a carer. I could provide my dumb Arduino solution for the really technically challenged , and forget about data collection, as long as I got sufficient numbers of the other.
Your concerns about phone battery dying etc Im sure could be addressed.
BOTH
The only data I want to record is the date time and duration of the "ON" period and perhaps a user input on effect. This could be saved in a CSV file on the mobile, and transmitted periodically via email. I don't need real time data, more the efficacy over a period.
Aeric Thank you, you've pretty much got it right.
The only thing I would question is how easy it is to program in B4X, I have had several goes over the years (apparently I joined in 2018) The problem is I don't do much (almost no programming, other than Arduino based, and a few other Micros). I could argue that Solidworks is "Easy" as I have used it frequently over the past 15 years, and if you had never seen CAD before you wouldn't want to design an F1 car, or an 8 Layer BGA board in an EDA program (I use Pulsonix mostly, and that's EASY).as your first project. The problem as a casual user is that there are so many Libraries, to understand the relationships of that unless you use regularly you struggle to work out whats happening. I have written enough software to know that no matter what you do , your end user will break it. This project is too important for me to make it my first serious attempt to use B4X. Hence my request for some help to get this project going, and give me time to concentrate on the manufacturing side.

Regarding your final comments.
1, I think a CSV file would be sufficient, and no need to analyse on the phone, could always import into Sheets/EXcel on the phone if you wanted,
2. Data processing not required in app other than checking that you are not exceeding recommended daily use, but as there is very little data available, cant really define maximum daily usage. Various studies have suggested 4 hours a day maximum so use that as start.

3. A graph of usage would be a nice feature, but not essential
4 Yes
5 Dont need to send anything to the board, within app check that daily usage < daily limit and warn, if are you sure then allow.
6. Simpler the better.

Many thanks for your interest guys
Steve

There's no such thing as a hard question if you know the answer, or a simple question if you don't!!!
 
Top