The companion robot will provide multiple functions including biomechanical movement, heart rate measurement and visualisation and automatic 999 calling. This will involve software design, programming, 3D printing, electronics and mechanical engineering to provide a fully working prototype.
Once the companion robot was assembled i had the idea of adding a touch feedback element. this low cost solution allows patients to rub their finger against two different grains of sand paper and monitor how this feeling can change over time. Loss of sensation can be an early indicator of a MS episode and this low cost solution provides some feedback on how this changes.
Once the internal assembly is working and tested it can be inserted into the 'skin'. This proved a challenge and, in my case, is not perfect. The final output is functional and serves as a prototype proof of concept of what can be done with minimal experience and cheap components. The pulsesensor was attached to the paw of the companion robot and the screen sits on the chest of the companion robot secured by connections to the arms of the panda.
The initial part of the assembly attaches all the components we've used before to a laser cut board. This is completely decided by the internal structure of the 'skin' used and the space available to work with. The hardware is then screwed on to the board and wire extensions added. Much of this centres around tinkering and aesthetic appeal. for example a used fabric glue and electrical tape to attach fur over the mechanical tail and wrap wires together.
This project uses a basic GUI aimed at proving concept feasibility compared with actual usage. As a mechanical engineer by trade developing a commercially viable GUI is probably out of my wheelhouse so instead I settle with functional. the GUI screen allows the user to interact with 3 large simple buttons to enact the three different functions. Code will be found in the finalgui.py posted in the file log.
M.A.R.C refers to the Medically Aided Robotic Companion (yes I named him!)
The automatic calling function is facilitated by an online service called Twilio. Multiple similar services are available and most provide tutorials on how to make outbound calls. for this project I use only outbound calls so a trial account is sufficient however if you wish to receive calls and send multiple calls then a full account is required. The companion robot can be customised to say whatever is desired and is something that can be developed in-conjunction with patients needs.
The code for the pulsesensor draws on https://tutorials-raspberrypi.com/raspberry-pi-heartbeat-pulse-measuring/. The code is amended to provide use with the specific hardware used in this project and can be found as a file in this project. In addition a line of code was added to save the data as a csv file and a second python script to convert this csv into excel. Data visualisation tools are available however for this project is appropriate for doctors to have access to this sensor data retrospectively.
A transformer is required to convert the analog pulse signal to a digital signal since the raspberry pi has no analog pins. I tried two different connections.
ADS1015 connected to GPIO pins
MCP3008 connected to SPI pins in Spi-Dev library
I found that the second configuration was much easier to code for and overall more accurate. I compared the pulse values to those given by a garmin smartwatch. using GPIO pins the pulse varied wildly and gave a value of 138BPM compared to the gramins value of 78BPM. Using the SPI library The pulse was measured at 78BPM compared to 72BPM by the smartwatch. This is within the standard tolerances used in portable heart rate monitors at a commercial level.
The code and wiring diagram can be found in the file log and instructions.
The 7" touchscreen is a specially designed raspberry pi accessory. the Pi fits directly onto the back of the screen. The screen requires two GPIO pin connections and feeding the display tape into the raspberry Pi. set up is simple and then you can begin using the touchscreen.
The battery use din this project is a LiPo 850mAh. it is connected to a Adafruit PowerBoost 1000C. The battery cable directly connects to the powerboost which in turn connects via USB - MicroUSB to the Raspberry Pi. The USB adapter comes with the powerboost however it will need to be soldered to the Adafruit before use. The battery and rechargeable board will need to be charged.