Multidisciplinary Senior Design Conference Kate Gleason College of Engineering Rochester Institute of Technology Rochester, New York 14623

P16041: Smart Walker IV

Alex Synesael Alexei Rigaud Electrical Engineering Electrical Engineering

Danielle Stone Stephen Hayes Electrical Engineering Electrical Engineering

ABSTRACT Diagnostic medical technology in its current form is typically expensive and intrusive to a patient’s lifestyle. The purpose of the Smart Walker IV project was to finalize a robotic assistive walker prototype capable of collecting long-term diagnostic information about a patient’s health and activities. This gives care providers a more complete image of their health than can be achieved during a relatively short visit. In addition to the diagnostic features, Smart Walker is capable of autonomous motion such that it can provide emergency support in the event of a fall, or contact the appropriate third party support. Smart Walker IV is a culmination of three previous prototype versions spanning 2013 through 2015, and is intended to serve as the final revision before the platform is ready to be utilized as a graduate research platform for robotic assistive medical diagnostics. The goal of Smart Walker IV is to complete the build and integration phases from where the previous Smart Walker III team ended. The project progressed through analysis and completion of the existing systems, the design and testing of new diagnostic subsystems, and finally complete system integration and qualification.

BACKGROUND Smart Walker began as a diagnostic tool for elderly people, and has since evolved into a research platform. The Smart Walker can take diagnostic measurements, as well as measure vital signs and detect when a patient has fallen. There is also potential for the Smart Walker to have autonomous motion capabilities in order to assist patients if they have fallen. The Smart Walker measures heart rate through contacts in the handles, which is a simple vital sign that can be used for diagnostic purposes. The Smart Walker can also measure body composition, which when used as a comparative measurement across relatively short periods of time, can detect a particular condition that is common in the elderly. This condition causes the body takes on copious amounts of water, which can eventually lead to death if not treated as quickly as possible. The Smart Walker also measures the relative force being applied to each of the two handlebars. This feature can be used in a diagnostic setting in order to determine whether or not a patient favors one side over the other, which could be indicative of pain or various other ailments. The Smart Walker is able to detect the possibility of a user to develop bedsores as well. As people age, the impulse to shift one's’ position lessens. When a user sits down onto the seat of the Smart Walker, a measurement is done in order to determine the overall XY position of the user. Over time, the Smart Walker will continue to perform this measurement and will note how often the user shifts their position. If the user is not moving frequently enough, they may need to be more closely monitored in order

Copyright © 2016 Rochester Institute of Technology Proceedings of the Multidisciplinary Senior Design Conference Page 2 to ensure they do not develop bedsores. The Smart Walker also has the ability to track motion relative to a fixed point in order to provide for potential autonomous motion, as well as analysis of the gait of the user. The project received from Smart Walker III had the basic structure of the walker largely completed, and a walker that had sensors and controls partially integrated was received. The walker had an Xtion camera, strain gauges on each handle, four strain gauges on the seat, sensors electrodes on the handles, a body composition measurement sensor (BCM), and a Chronos watch. The electrical control system consisted of a PandaBoard microcomputer, an Mega, and custom PCB breakout boards. There were problems with some of the sensors as the PandaBoard had difficulties with SPI connections. The strain gauges on the seat and handles read values and sent them to the PandaBoard, but needed to be calibrated. The Chronos watch was programmed to detect steep changes in acceleration and sent a flag to the PandaBoard to indicate the subject had fallen. Mechanically, the walker had a semi-functional motor drive system that consisted of a 3D printed clutch and 12V DC motor on each of the front legs of the walker. The clutch could not disengage after being engaged, and there was an unbalanced moment being placed on the axis that caused grinding of the gears.

DESIGN The Smart Walker drivetrain consists of a three major components, the drive motor and gearbox, an electromagnetic friction clutch, and a high-resolution driveshaft-mounted rotary encoder. This subsystem was given a major design overhaul from that of previous Smart Walker revisions in order to fix fundamental functional issues as well as to improve the patient’s experience overall. The current design can be seen in Figure 1 below with all major components labeled.

Figure 1 - Overview image of drivetrain

The prime mover of Smart Walker IV’s drivetrain is a Pololu-brand 12v DC motor with an integrated 50:1 metal gearbox. This motor was recycled from the previous drivetrain design and includes a 64 counts-per-revolution (CPR) hall-effect rotary encoder which is no longer used in favor of a higher-resolution shaft-mounted alternative. Powering the DC motor is a Pololu-brand 5A Arduino-compatible motor shield capable of driving both motors simultaneously. The rotational motion generated by the motor is coupled to the clutch armature/hub assembly via a set of hardened-steel bevel gears that provide another 2.7:1 gear ratio. This hub/gear assembly is let to freely rotate on the drive shaft by way of an oil-impregnated brass bushing until the clutch is activated with the requisite 24v DC. With the clutch engaged there is a friction-based interlock made between the drive shaft and motor that provides rotational

Copyright © 2016 Rochester Institute of Technology

Proceedings of the Multidisciplinary Senior Design Conference Page 3 action to the wheels. This design allows the patient to feel no perceivable resistance from the motor or drive gears when the clutch is disengaged and the drivetrain behaving in a passive state. A key feature of this revamped design is the ability to track the wheel rotation during both the active and passive clutch states, thereby allowing the encoder values to be utilized as high-reliability odometry data for both the analysis of a patient’s walking behavior and gait, and for future use in a SLAM algorithm. The encoder resolution of 720 CPR allows the actual wheel location change to be measured and tracked with under 1 millimeter of precision. These per-wheel measured distance change values are used in (Equation #) to extrapolate the walker’s location and angle with respect to a starting origin point. The Chronos watch is used in order to detect when a user falls or requires other immediate assistance. The watch contains an accelerometer, which is used in order to detect when the watch goes into freefall. When this occurs, a fall flag is sent over to the ODROID and the X, Y, and Z data from the accelerometer gets placed into a table in MySQL in units of gravitational force, or Gs, along with a timestamp. If the user requires immediate assistance, they can press any of the buttons on the Chronos watch. This button press will also send the accelerometer data, as well as a timestamp, to the MySQL table. The gripper rework was performed in order to enable the use of a metal contact for the heart rate and body composition measurements. The new contacts were designed in order to give maximum contact to the user’s hand, as well as appear clean and integrated with the system. The Smart Walker IV team made some changes in the hardware, therefore the enclosure used by the Smart Walker III team did not provide the cleanest housing solution for the components. A new enclosure was chosen that has a flip open lid that snaps shut, which allows for easier access to the internal components if need be. This new design also utilizes a mounting board inside of the enclosure, which enables all boards and components to be mounted cleanly without the need to drill holes through the overall enclosure. The handle strain gauges on the Smart Walker are used to detect balance or lean of the patient while they are using the walker; it can also be used as the primary detection method for when the walker is in use. The handle strain gauges are in a Wheatstone bridge configuration that provides linearity, improved output sensitivity and reduced thermal sensitivity. The Smart Walker III team had the strain gauges attached and measurable on the old PandaBoard control unit through an ADC.

Figure 2 - Strain Gauge Configuration for Wheatstone Bridge The Smart Walker IV team changed the control unit to an ODROID XU4, added to the data processing as well as created the data storage system in the form of a MySQL table that stores both handles raw data input as well as the processed percentages used to find patient balance with timestamps. The other goal of Smart Walker IV was to characterize the strain gauges, (see test results) and clean up the appearance of them. To have a clean look, the team will add a foam jacket with a heat shrink cover over the strain gauges. The four seated load cells underneath the seat can be used to find the center of gravity of the patient while sitting using statics and geometry. The use of this system would be to verify that the patient is making adjustments while sitting to prevent bed sores. The lack of that brain reaction could be indicative of something wrong with the patient,

Copyright © 2016 Rochester Institute of Technology

Proceedings of the Multidisciplinary Senior Design Conference Page 4 although they certainly wouldn’t provide a perfect diagnostic. The Smart Walker III team had the four load cells placed under the seat, and measurable on the PandaBoard control unit; as well as the x and y data processing completed.

Figure 3 - Theory Behind Center of Gravity Calculation for Load Cells

The Smart Walker IV team added further data processing to go with a characterization of the load cells for a future developer. The data is logged into MySQL table that stores the raw data gathered by each load cell as well as the x-y coordinate of the center of gravity. The ODROID now looks for shifts in the patient's center of gravity and logs the raw values associated with a timestamp. The body composition system is centered around the AFE4300 from . The AFE4300 is a low cost analog front end IC that has two chains for measuring weight and body composition. The body composition measurement is done by sending a sinusoidal current signal across two points on the body. The differential voltage between those points is put through a differential amplifier and captured by a 16-bit Analog-to-digital converter. The Smart Walker uses the IQ (In-phase, Quadrature) demodulator mode; and takes measurements of both the I and Q voltages and from that finds the magnitude and the phase of the complex impedance of the patient. The Smart Walker III team found the AFE4300 and did the layout; other than that they confirmed the communication was working across SPI. However, it was never properly connected to the PandaBoard. The Smart Walker IV team changed to ODROID XU4 mostly because of the issues that SPI had caused the previous team several problems in completing the integration on the PandaBoard. The ODROID comes with a level shifting shield that is compatible with SPI, that mounts nicely onto the unit. Smart Walker IV completed the integration onto the ODROID, characterization of the data gathered, all data processing and storage for this system. With further development this system will be useful to find the water percentage of the patient and other important data. The heart rate sensor was designed using an off-the-shelf heart rate analysis board produced by Sparkfun that utilizes the AD8232 chip to amplify the electromagnetic body signals created by a person’s heart, filter them, and then output their value. This value then would be further processed for accuracy, and stored in the ODROID. A Teensey was selected to collect the data output by the AD8232, process the data using peak detection, determine the beats per second, and output the data to the ODROID over an USB serial connection. The heart rate value was calculated by determining the time between each beat, calculating the frequency, and thus beats per minute. Every time the heart rate was measured it was added to a moving average of the last five measurements and then sent to the ODROID via serial communication. In order to record the data output by the sensors, a database on the ODROID is necessary. The database needed to be able to timestamp the measurements as they are received and store multiple values for each reading over a long period of time. MySQL was chosen as the architecture used to create the database for storing the sensor measurements.

Copyright © 2016 Rochester Institute of Technology

Proceedings of the Multidisciplinary Senior Design Conference Page 5

Figure 4 - Example MySQL Table, for the Strain Gauges

RESULTS For the drivetrain the The Chronos watch successfully sends a flag to the ODROID when a fall is triggered, as well as sending the acceleration data in the X, Y, & Z axes. A fall can be triggered by pressing the button on the watch or from the accelerometer detection algorithm.

The seated load cells each detect when force is placed on them, which gets processed after being sent to the ODROID over an I2C connection. The threshold values are still being calibrated to ensure accuracy in the force readings received by the load cells.

Figure 5 - ADC Readings vs Force Applied (y = 52.657x + 93.009)

The strain gauges in the handles each detect when force is applied to them, with reasonable decrees of accuracy. The value output is between 0 and 4095, and correspond to the force of a weight between 0 and 40 lb. being applied for the right handle and the force of a weight between 0 and 50 lb. being applied to the left handle.

Copyright © 2016 Rochester Institute of Technology

Proceedings of the Multidisciplinary Senior Design Conference Page 6

Figure 6 - ADC Readings vs Force Applied (Right y = 103.83x - 63.606, Left y = 91.393x - 250.7)

The BCM system measures and logs both the real and imaginary impedance values of the person touching the leads. Testing was done to determine the error of the impedance values. While the percentage error was found to be high for the phase values, but reasonable for the magnitude values.

Figure 7 - Table for Errors of Tested RC Networks From BCM

The heart rate board outputs a beats-per-minute heart rate value to the ODROID over a serial connection that then gets stored into the MySQL table. The heart-beat detection for the HR board is quite accurate and manages to detect a heartbeat 95% of the time. The beats-per-minute value output depends on the algorithm used, but the default algorithm is accurate within ±5 beats of the actual value. The MySQL measurements database on the ODROID has a separate table for the BCM, the load cells, the strain gauges, the heart rate, and the Chronos watch accelerometer. The scripts run by the ODROID capture the values output by each sensor as they arrive at the ODROID.

DISCUSSION The need to redesign Smart Walker IV’s drivetrain came about from the presence of a collection of critical flaws in the previous mechanical design. With only one drive wheel per leg there existed a cantilevered behavior on the drive shaft which when coupled with the incorrect style of bearing introduced a large axial load to the main drive gears, causing rapid tooth degradation and overall subsystem failure. Additionally, the previous clutch involved the use of a one-way solenoid to activate the mechanism, which possessed no ability to disengage without manual intervention. Lastly, the customer was not fully satisfied with the design as it involved the bevel gears to be constantly driven and produced mechanical resistance to passive use as well as generated noise, neither of which lend themselves to an unobtrusive system. Due to time and resource constraints there was great hesitation to direct a drivetrain redesign, however in the end the subsystem was completely redesigned and properly satisfied engineering requirements and customer preferences. The most difficult part of the work done with the Chronos watch was interpreting the Smart Walker III code and updating it to fit the new system requirements. The system functions as desired and meets the requirements of the Smart Walker IV project.

Copyright © 2016 Rochester Institute of Technology

Proceedings of the Multidisciplinary Senior Design Conference Page 7

The largest issue encountered with the gripper system was integrating the contacts with the grippers themselves. Many of the initial concepts would be “one-shot” type connections, meaning the margin for error would be extremely small. I2C took longer convert to the ODROID, due to the level shifting shield’s non compatibility with I2C; fixing this issue forced a reversion to the Smart Walker III level shifting board. This hindered attempts to integrate the seated load cells and handles strain gauges with the ODROID, despite them having previously worked with the PandaBoard. Configuring SPI to work correctly on the ODROID was troublesome due to having only a basic understanding of using Embedded Linux. Some of the key issues were updating the Linux kernel and editing the device tree blob, or alternatively building a custom kernel. Once configured correctly on the ODROID, the SPI works very consistently at any speed tested. Integrating the heart rate sensor took longer than planned due to a defective AD8232 board received from the manufacturer. Upon receiving a new board, the heart rate measurement system was successfully completed. Obtaining clean heart rate signals is highly dependent upon lead placement, therefore obtaining measurements is occasionally difficult. Implementing MySQL was relatively simple, aside from the learning curve associated with the associated programming language. MySQL runs continuously on the ODROID without causing any issues in overall performance.

CONCLUSIONS AND RECOMMENDATIONS The Smart Walker as is currently functions as desired by the customer’s requirements. All the sensors operate correctly, measurements can be reliably obtained and successfully logged onto the MySQL database without any difficulty. The physical presentation of the unit has been improved since the previous iteration and is aesthetically appropriate, with all electrical components sealed inside a plastic enclosure and the mechanics of the drive train having their own plastic cover. In a future revision the drivetrain could be redesigned to use custom hub-motors which would negate the need for a mechanical clutch system altogether. These motors exhibit near-silent operation and could even be used to dynamically brake the walker during use for safety and navigation assistance. The freefall detection, while great, is not how people actually fall. A better fall detection algorithm should be developed and implemented based upon a G threshold that is triggered when a patient falls, as opposed to freefall.

Copyright © 2016 Rochester Institute of Technology

Proceedings of the Multidisciplinary Senior Design Conference Page 8

Further algorithm development for the ODROID to be able to decide if a lack of movement is in fact troublesome, rather than only logging shifting events. Will require a more in depth understanding of how often someone should shift while sitting. The BCM system as is only measures the complex impedance, further algorithm development will be required to take that measurement and turn it into more useful functions like water percentage or a BMI alternative. The algorithm used by the HR sensor could be improved to create a more accurate reading, given sufficient time to experiment with the algorithms. In addition, it would be possible to have the Teensey pass an image of the heartbeat waveform to the ODROID over the serial communication.

ACKNOWLEDGMENTS The Smart Walker IV team would like to thank Dr. Ferat Sahin and RIT’s Multi Agent Bio-Robotics Laboratory (MABL) for supplying the project concept, supporting the team, and providing funding. The team would also like to thank professor George Slack for assisting the team throughout the MSD processes and David Malanga of Smart Walker III. David helped the team greatly with getting the SW4 team up to speed with where the Smart Walker III project left and provided great advice for how to proceed.

Copyright © 2016 Rochester Institute of Technology