An AI System That Gets You Back on Your Feet

Those of us that were fortunate enough to have lived during the era of the epic infomercials of the early 1990s will always remember a certain Mrs. Fletcher who fell down, but most decidedly could not get back up. For the unfamiliar, Mrs. Fletcher pressed the button on a small device hanging around her neck, after which emergency dispatchers responded to send help and the day was saved. Popular culture phenomena of the past aside, safety devices of this sort serve an important purpose in the lives of many, especially the elderly. Each year, over three million older people in the US are treated in emergency departments as a result of a fall, according to the CDC. The cost of these fall-related medical treatments topped $50 billion in 2015.

The utility of simple push-button solutions is clear, but certainly there must be some improvements that can be made to Mrs. Fletcher’s technology 30 years on. Engineer and aspiring fall guy (in the literal sense) Naveen Kumar thinks so, and has identified specific areas for improvement. He recognized that a serious fall might make it impossible for the wearer of the device to actually press a button for help. Moreover, a fall can happen anywhere, not just at home within the range of a base station that is required for communication. With the goal of solving these problems, yet still keeping the functionality push-button simple, Kumar designed and built a new wearable device to assist those with a high risk of falling.

The fully assembled device

Kumar started with a Blues Wireless Notecard to add cellular connectivity to untether the device from a base station, and GPS to provide location information when the wearer is unable to provide it. He included a button that can be pressed to manually request assistance, but for the cases where that is not possible, with the help of Edge Impulse he designed a machine learning pipeline that can detect falls and automatically send a request for help. A Raspberry Pi Pico was included to provide the main processing horsepower, and a three-axis digital accelerometer provides environmental sensing information to the machine learning algorithm. A custom PCB was designed to tie all of the components together into a single, tidy, battery-powered package.

The first step in building a machine learning pipeline is collecting training data. Fortunately for Kumar, high-quality public datasets of accelerometer data from normal activities and falls already exist. This saved him the time (and pain) of building the dataset himself, and he was able to upload an existing dataset to Edge Impulse after some minor transformations of the data. The training examples were divided into “fall” and “activities of daily living” categories.

Uploading data

At this point, Kumar was ready to build the rest of the impulse to analyze and classify his device’s accelerometer data. He started with a spectral analysis preprocessing step, which is well suited to dealing with repetitive motion (as seen with accelerometers) and extracting the most relevant features from that data. Those features are then fed into a neural network classifier that distinguishes between normal activities and falls. After training the model, it was validated against a test dataset and found to have an excellent classification accuracy rate of 97.11%.

Designing a classification pipeline

Using Edge Impulse’s deployment tools, the classification pipeline was exported as an Arduino library, after which Kumar could easily include it in his own code that powers the basic logic loop of the device. He set aside one core of the Pico’s processor to continually sample accelerometer data, while the other core looks for either a fall classification from the neural network or a button press. In the event of either case, an SMS message, which includes the current GPS coordinates of the device, is sent over a cellular network with a request for assistance.

Model testing

Kumar’s project is a great example of just how far technology has come along in recent years. Using inexpensive, of-the-shelf hardware and simple tools like Edge Impulse, it is possible to build smart devices that can have a real, positive impact on the world. Circuit diagrams, code, and all the details on how you can build your own machine learning-powered wearables can be found in Kumar’s write-up.


Want to see Edge Impulse in action? Schedule a demo today.

Subscribe

Are you interested in bringing machine learning intelligence to your devices? We're happy to help.

Subscribe to our newsletter