Page 1

Project Number: P12005

Copyright © 2012 Rochester Institute of Technology

Page 1

Seated balance training game

Vinay Barde
Electrical Engineering / Alfred Lee
Computer Engineering
Jason Marks
Electrical Engineering / Alexis Reusch
Electrical Engineering

Copyright © 2012 Rochester Institute of Technology

Page 1

Abstract

The rehabilitation process of a patient who uses a wheelchair requires multiple physical therapists to achieve a successful functional reach test. The current functional reach test consists of the patient reaching for the physical therapists hands to strengthen their core muscles. The implementation of the Balance Tower Training Game can help reduce the stress and number of needed therapists during the rehabilitation process. By incorporating two towers, the patient will be able to stretch and strengthen both their abdominal muscles and obliques. This project is the continuation of P10005. The previous team constructed two towers and electronically populated one of them. This project entails, enhancing the patient interface to make use of capacitive touch technologies, making the usage of the system more flexible. To integrate the second tower to the system, one tower will be the master and one the slave. Essentially, the master will send commands and control the actions of the slave. The communication between the two towers will be done wirelessly. Due to unexpected obstacles, for this project, the second tower could only be electronically populated but not integrated to the games.

Introduction

The Balance Tower Training Game was originally created by a senior design team in 2009-2010 for the Nazareth Physical Therapy Clinic. The purpose of the project was to provide an interactive rehabilitation game based on capacitive touch technology. The current method of the rehabilitation process involves multiple therapists working with a single patient. The patient attempts to reach out to the therapist, or an object, to help strengthen their core body muscles.

The initial goal of the P12005 senior design team was to update and build upon the current balance tower system. This consisted of updating the wiring to a printed circuit board, modifying the code in the micro controller board (MCU), integrating a second tower and developing a wireless communication between the two towers. Also, one of the customer needs required a device attached to the tower that would measure the distance of the patient. In reality, the processor, which was currently being used, had to be replaced due to software licensing issues. The replacement of the MCU took up a majority of the concept selection process and a substantial amount of development/testing. As the previous code was dissected, in order to understand it, it was determined the programming did not function as expected. Due to this complication, it was decided to focus on completing one functional tower.

Design Process

The customer expects a functioning balance tower rehabilitation system that provides balance training, engages the clients and includes the same features from the previous team. The customer needs were modified to adhere to the current project requirements. The engineering specs were developed from the needs and highlight the major requirements that design should satisfy. Concept selection was focused on choosing a proper capacitive touch chip, wireless device, LEDs and a MCU. The replacement of the MCU was decided towards the end of the planning phase due to licensing issues and lack of proper commenting for the code. The design of this system is separated into three main functions: providing feedback to the user, accepting user input and providing difficulty of the functional reach test.

Figure 1.System Architecture

Figure 2.User InterfaceFigure 3.Functional Reach Tape Measure

Figure 4.Internal Wiring/Components Figure 5.Patient Interface

PCB Layout/Circuitry

The need to reduce clutter inside the tower led to the creation of a printed circuit board (PCB). The existing tower was built around two prototyping style boards with through-hole components, plus a processor board.Combined with the 7 buttons and 24 LEDs’ in each tower resulted in wiring management difficulties. To clean up the internal wiring and make the circuitry more reliable, a single PCB was created. On this PCB was a voltage regulator to provide 3.3V of power to all the circuitry in the tower, a capacitive touch chip to communicate with the external touch panels/processor, and transistor circuits to drive the LEDs. A 4.5” X 5” board was designed to fit inside the tower. Figures6, 7, & 8show the schematics used to create the PCB. In addition to the 3.3V regulator, a 5V regulator was required to run the LCD screen, figure 9. A separate small thru-hole component board was created to regulate a 9V battery.

After it was determined the current touch style aluminum panels could not be used with the selected capacitive touch chip, a simple comparator circuit was created, figure 10. The aluminum panels will be set to a value of 3.3V. When the patient touches the panel, they will be essentially grounding the plate. This will cause the comparator circuit to output a high value to an input pin on the MSP430 board, which then can be interpreted as a touch in the program.

Figure 6.Capacitive Touch Chip Schematic

Figure 7.3.3V Regulator

Figure 8.Transistor Network for LEDs (24 in total)

Figure 9.5V Regulator, LCD Connections, and Push Buttons

Figure 10.Comparator Circuit for Touch Panels

Power Calculations/Battery Selection

The Physical Therapist would like the training game to be portable and to avoid the use of electrical cords on the floor. To achieve this, the power consumption of all the devices was calculated to determine how much supply current was needed from a battery source. Power calculations for the LEDs only considered six LEDs on for any given amount of time, as only two banks of LEDs should be on during rehabilitation games. Four nickel metal hydride rechargeable AA batteries were selected as the power source. A single NiMH battery can provide up to 2500 mAh of current. The LCD required a separate battery source to power it; a 9V battery was selected for this task. Using the balance tower on average of four hours per day, the balance tower should be able to last about seven days on a single charge.

Table 1.Typical Current Requirements of Components.

Component / Min Input Voltage (V) / Max Input Voltage (V) / Avg Supply Current (mA) / Max Supply Current (mA)
MSP-EXP430F5438 / 2.2 / 3.6 / 1 / 2
LEDS / 2.5 / 4 / 20 / 25
LCD / 4.7 / 5.5 / 5 / 15
Capactive Buttons / 2 / 5.5 / 5 / 10
Wireless / 1.8 / 3.6 / 18 / 22

Table 2.Total Power Consumption Calculations

Case / Usage (mAh) / Usage (mWh) / Total Power (mW) / Battery Life (%) / Total Hours of Life / Days
Definition / Supply Current*
Hours Used / Supply Current* Vout* Hours Used / Power Used/Hours Used / (Power Used/Battery Power) in hour / (Battery Power-Minimum Battery Req)/Total Power / Total Hours/Hours used per day
Avg. / 596.00 / 3166.8 / 791.7 / 6.33 / 56.15 / 7.27
Max. / 836.00 / 3958.8 / 989.7 / 7.92 / 46.52 / 5.82

Table 3. Minimum Supply Power

V / mAh / mWh / Hours Used per Day
Battery / 5 / 10000 / 50000 / --
MinimumBattery Req. / 5 / 791.76 / 3958.8 / --
Typical Voltage Output / 3.3 / -- / -- / 4

Micro Control Unit (MCU)

Reusing the MSP430 with Zigbee Wireless Transceiver (MSP430F1611/1612) from the previous senior team’s design would have been ideal,but RIT no longer had a license with IAR Workbench.An acceptable replacement was necessary. After researching various micro-controller boards and consulting with Dr. Becker-Gomez, the MSP-EXP430F543A evaluation board was recommended. It is similar to the board being replaced, with the exception of it being compatible with Code Composer Studio instead of IAR Workbench. The MSP-EXP430F543A board has enough input/output pins to control all the LEDs, along with GPIOs and UARTs for the LCD buttons and LCD. The board is also designed to work with the EZ430-RF2500 wireless communication device. This will allow communication between the two balance towers. In addition, the board has serial communication lines like I2C and SPI, which can be used to communicate with the capacitive touch chip.

Software

It was assumed the programming of the tower would go smoothly because the previous design team laid out a foundation. Upon digging into the code from the previous team, it was discovered the archived code did not correlate with the operation of the tower. Figure 11 shows the general flow of the software.For proper visual feedback, the LED code had to be reconstructed to function with the new MCU. The user interface was also modified to accommodate the new text layout.The most difficult portion of the software was to code the communication between the capacitive touch chip and MCU board. The I2C protocol was an issue because of a lack of understanding and experience with it. To deal with this, Dr. Becker-Gomez and Dr. Mondragon were consulted to shed light on the matter.This consultation led the team to decide this was not the proper path possible to complete in the given amount of time. To solve this problem a comparator circuit was designed.

Games were designed to provide difficulty and variation for the patientsduring the rehabilitation process. The two games were a random and sequence style, where the Physical Therapist can select the number of rounds to play and the time between each panel.The banks of LEDs would indicate the status of the panel, blue LEDs indicate the target, green indicates a correct touch, and red indicates a miss. At the end of the game, the display panel will indicate the number of correct and incorrect panels touched.

An automated functional reach test was discussed. The PING Sensor was selected originally to perform this task. The sensor would bounce a sonic wave off the knuckles of the patient to measure the distance. Due to time constraints and safety concerns, a simple tape measure was attached with Velcro to the side of the tower.

To include a second tower to the design, communication between them was determined. It was decided to go with the ez_RF2500 wireless device which is compatible with the MCU. Due to time constraints the wireless device was not used and it is suggested to be used for future use.

Figure 11.Software State Diagram

Test Plans

There were a series of five testing plans that were developed to test the functionality of the different parts of the tower. The first plan was used to test the setup and take down time of the tower between patients. It also made sure that the tower could be sanitized in a timely manner. The second test was to investigate the functionality of the PCB. The test was completed to confirm the connections on the board were correct. This would remove any shorts or opens that could potentially damage other components on the board. The third test was to check the physical input and output connections to the MCU. The pins needed to be looked over to eliminate the threat of loose connections. One of the most important tests was to extensively debug the software. This was done in parallel with hardware testing to verify the integration of the wiring and the code. The last test was to verify the operation of the games. Without this test the physical therapist interface would not be reliable.

Results and discussion

Due to the MCU replacement and the I2C communication failure the final product consisted of one functional tower. Because of the I2C incompletion, a comparator circuit was created to replace the concept of patient input. Towards the beginning of the design, it was decided to discard the ping sensor but add a simple tape measure to fulfill the customer need of measuring the distance of the patient from the tower. The final tower functions to satisfy the needs of a successful functional reach test.

Extensive testing provided feedback and brought up several problems. The trend of these problems dealt with either software or hardware issues.Debugging the MCU code had led to a variety of problems dealing with LED wiring, LCD communication and even user input interface troubles. LED wiring to the MCU and pin connections wasa common issue for game failure. Two games were programmed into the MCU,random and sequence. Using the user interface, the therapist can customize each game by changing the duration, rounds, time etc. The development of these games was highly dependent on a functioning internal clock.

After making these changes, one functioning tower was completed. It functions very close to the way the costumer had requested. The original tower structure had no changes and the large plates on the front will still act as the touch buttons. The concept of the capacitive touch buttons was very important to carry over from project to project. The capacitive touch plates were designed to accommodate the patients using the towers. The comparator circuit, while operating different from a code and circuitry stand point, will appear to work the same as the capacitive chip. The only difference is the patient will need to have a ground attached to them to make the voltage change enough for the comparator chip to sense the touch. In addition, while the original design was to include an automated functional reach measurement,the final design used a measuring tape attached to the side of the tower for the therapist to pull out and measure the functional reach of each patient. It will provide the therapist with the option to get accurate functional reach measurements for people of different heights and sizes. This will help the therapists increase the difficulty for the patients by adding more distance between the tower and patient.

The second tower will need more work to make it completely functional. The need to change the MCU, the coding, and having problems with the I2C line took up more time than anticipated and delayed work on the second tower. The wiring within the second tower was started; the LED banks are wired up but are not connected to the MCU. Once the code for the wireless and secondary MCU is completed, the functionality of the tower can be tested.

Conclusions and recommendations

The team has made a lot of changes to the original project. The scope of the project changed almost completely from when the assignment was given. Getting one fully functional tower proved to be a bigger challenge than was expected. The problems that were encountered along the way delayed the completion of the tower. Having to rewrite the code from scratch is where a majority of the time was spent. This included the code for the MCU and the communication with the capacitor chip. Once the MCU code was finished, the problems with getting the capacitor chip to work came to light. The comparator circuit was implemented to make the plates on the front of the tower work the same way as the capacitive chip would have from a patient stand point.

In the future if the client would like to have two working towers, then wireless communication needs to be added to the code for the MCU. The code for both towers will operate similarly to each other, except one tower will be set up as a master and the other will be a slave. The wiring within the second tower should be straight forward. Given a few more weeks, it would be possible to have both towers working and communicating with each other.

References

[1] Nazareth College.Physical Therapy Clinics.< [5/12/2012].

Acknowledgements

This material is based upon work supported by the National Science Foundation under Award No. BES-0527358. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect the views of the National Science Foundation.

Copyright © 2012 Rochester Institute of Technology