Jump to main content

Wearable Limp Detection Device

Abstract

Have you (or anyone you know) ever sprained an ankle or broken a leg? It might have taken some practice to walk again after recovering from an injury. Some people might even need to work with a physical therapist. In this project you will program a wearable device to recognize when someone is limping instead of walking normally. 

Summary

Areas of Science
Difficulty
Method
Time Required
Very Short (≤ 1 day)
Prerequisites

None

Material Availability

micro:bit board required, see Materials section for details

Cost
Low ($20 - $50)
Safety

No issues

Credits
Science Buddies is committed to creating content authored by scientists and educators. Learn more about our process and how we use AI.

Objective

Use machine learning to train a micro:bit board to recognize when someone is walking with a limp.

Introduction

Most people walk with symmetry, meaning their gait (how their legs move when they walk) is the same on both sides. For a variety of reasons, including physical injuries like a sprained ankle, or neurological conditions like cerebral palsy, some people might walk with an asymmetric gait, or limp. For example, someone who has pain in one leg may try put less weight on that leg as they walk, taking shorter, quicker steps with the injured leg and longer steps with the uninjured leg. 

A physical therapist might work with someone to help them regain or maintain a symmetric gait. To do this, they may use gait analysis, or study how the person walks. This could simply consist of observing the person as they walk, but it could also include filming the person while they walk so the video can be analyzed in more detail, or even using a motion capture system to track the person's movements (Figure 1). This analysis can give the physical therapist more detailed information about the person's gait.

Two repetitions of a walking sequence of an individual recorded using a motion Capture SystemImage Credit: Lars Lau Raket / Creative Commons Attribution-Share Alike 4.0 International

Figure 1. Motion-capture data of a person walking.

Gait analysis with video or motion capture data can be useful, but time consuming. The physical therapist may require additional training to interpret the data, and needs to sit down and review the data after the appointment. What if you could design a wearable device that could detect in real-time whether a person is limping? In this project, you will do that using a little programmable device called a micro:bit. The micro:bit has a built in accelerometer, a type of electronic sensor that can detect motion. Phones and video game controllers use accelerometers to know when you tilt or shake them. The micro:bit's accelerometer can detect acceleration, or a change in speed, along three different axes, or directions, called X, Y, and Z. If you have a micro:bit sitting on the table in front of you as shown in Figure 2, then the X axis measures motion side to side, the Y axis measures motion forward and backward, and the Z axis measures motion up and down. Note that these directions are always relative to the micro:bit board itself. For example, if you tilt the micro:bit board up on its front edge, the Z axis will still point out of the board, which is now "forward and backward" relative to your body instead of "up and down." See the reference in the bibliography to learn more about how accelerometers work.

Figure 2. The X, Y, and Z axes of the micro:bit's accelerometer.

You can wear an accelerometer on your lower body (for example on your hip, thigh, or foot) to record data while you are walking (Figure 3). However, it can be difficult to interpret graphs of the accelerometer data to figure out what was going on and how someone was walking. Instead of trying to figure out the graphs yourself, in this project you will use machine learning to recognize different motions. You will provide training data to a computer model so it can learn the differences between accelerometer readings when a person is limping or walking normally. You can then program your micro:bit to react - for example by lighting up LEDs, making a sound, or even sending an alert to another micro:bit - depending on what type of movement the micro:bit detects. Imagine how your device could help monitor someone as they recover during physical therapy!

Figure 3. XYZ acceleromer data recorded while a person was jogging. The horizontal axis of the graph is time and the vertical axis shows the accelerometer values. 

Terms and Concepts

Questions

Bibliography

Materials and Equipment

Disclaimer: Science Buddies participates in affiliate programs with Home Science Tools®, Amazon.com, Carolina Biological, and Jameco Electronics. Proceeds from the affiliate programs help support Science Buddies, a 501(c)(3) public charity, and keep our resources free for everyone. Our top priority is student learning. If you have any comments (positive or negative) related to purchases you've made for science projects from recommendations on our site, please let us know. Write to us at [email protected].

Experimental Procedure

This project follows the Engineering Design Process. Confirm with your teacher if this is acceptable for your project, and review the steps before you begin.
  1. Watch the introductory video on the micro:bit CreateAI website.
  2. Click "Get Started" on that page then "New session."
  3. Follow the on-screen instructions to connect your micro:bit to your computer. 
  4. Once your micro:bit is connected, look at the "Live data graph" at the bottom of the screen. Wiggle your micro:bit around. You should see the lines for the x, y, and z accelerometer readings change. 
  5. Attach the micro:bit to your waist. The exact location (front, back, or side) does not matter, but make sure you keep it consistent throughout your experiment.
  6. Rename the default action "Walking" and choose an icon for it (like a smiley face).
  7. Click the "Record" button and start walking around normally. Make sure you keep walking until the micro:bit is done recording the sample. 
  8. Record two more samples so you have three total. 
  9. Click the "Add action" button. Add a new action called "Limping" and choose an icon for it. 
  10. Record three new samples while you intentionally walk with an exaggerated limp (even if you are not really injured!). After you are done, your screen should look similar to Figure 4.
Figure 4. The CreateAI interface after recording three data samples each for two different actions.
  1. Click "Train model" and wait for the model to train. 
  2. Now try walking around, both normally and with a limp, while watching the screen. The screen will now display a prediction of which action you are currently performing as a percentage between 0 and 100%. This percentage indicates the probability that you are currently performing that action. Is the prediction correct for each action?
  3. If the prediction is not very accurate, try adding more training data to improve your model. Click the "Edit data samples" button to go back and record more data. Record at least 10 more samples for each action.
  4. Train your model again, then walk around while looking at the new predictions. Are they better than they were before?
  5. Keep adding more training data and re-training your model until it can correctly predict the motion most of the time. 
  6. Click "Edit in Makecode." Here, you can edit the program to make it do different things when the model detects different motions. By default, it will simply show the icons you selected when creating the model.
  7. Think about how your micro:bit device could be used in a physical therapy setting or for someone recovering from an injury. How can you write a program to use your micro:bit? Figure 5 shows an example program. 
    1. For example, maybe it would be helpful for that person to have an alarm if they start limping too much. Can you add some Music blocks to play sound when the person is limping? If so, add a stop all sounds block somewhere in your program. Otherwise, if you start playing a sound in the background, it will never stop. 
    2. So far, you have only trained your model to recognize walking and limping. What if the person is doing something else, like standing still or sitting? You can use an on ML unknown start block to make your program react to other motions that were not included in your model. 
Figure 5. Example program to display different icons depending on the detected motion, and play a melody when limping is detected.
  1. Follow the on-screen instructions to download your program to your micro:bit. You may need to reconnect the micro:bit to your computer with the USB cable to do this.
  2. Make sure you put your micro:bit back on your body in the same place and orientation as when you collected your training data. Test your program. Does it work as you expected?
  3. What other improvements or changes can you make to your program? There are many other things you can try - see the Variations section for more ideas.

icon scientific method

Ask an Expert

Do you have specific questions about your science project? Our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Global Goals

The United Nations Sustainable Development Goals (UNSDGs) are a blueprint to achieve a better and more sustainable future for all.

This project explores topics key to Good Health and Well-Being: Ensure healthy lives and promote well-being for all at all ages.

Variations

  • Try wearing the micro:bit in different locations on your body, like on your hip, under your belly button, the small of your back, or even a wrist or an ankle. Create and train a new model for each location on your body. Which location works best for detecting the difference between walking normally and limping?
  • Test your device with different people. Does a program trained on one person work if another person wears the same device?
  • Try adding a new action for a "subtle" or slight limp instead of an exaggerated limp. Can the program tell the difference between walking normally, a slight limp, and a severe limp? 
  • Try training a model to recognize different motions related to a different type of injury. For example, someone might throw a ball differently if they have a wrist or arm injury. 

Careers

If you like this project, you might enjoy exploring these related careers:

Career Profile
If you are injured in an accident, suffer a stroke, heart attack, or loss of a limb, or are born with conditions that make it difficult to move your body, then you will often be cared for by a physical therapist. Physical therapists review a patient's medical history, test and measure his or her physical condition (things like range of motion, strength, flexibility, balance, coordination, muscle function), and then develop a treatment plan to meet some physical goals. They coach, motivate, and… Read more
Career Profile
Sports injuries can be painful and debilitating. Athletic trainers help athletes, and other physically active people, avoid such injuries, while also working to improve their strength and conditioning. Should a sports injury occur, athletic trainers help to evaluate the injury, determine the treatment needed, and design a fitness regime to rehabilitate the athlete so he or she is ready to go out and compete again. Read more
Career Profile
Think of all the things you do as you go about your day, like putting on your shoes, buttoning your shirt, turning on a faucet, typing on a keyboard, going grocery shopping, picking up laundry, making a sandwich, or using a spoon. Now imagine trying to maintain your independence if an injury or illness made it difficult for you to use your hands, move your arms, or even walk. Occupational therapists are the healthcare providers who help people regain independence by developing or restoring… Read more
Career Profile
Are you interested in developing cool video game software for computers? Would you like to learn how to make software run faster and more reliably on different kinds of computers and operating systems? Do you like to apply your computer science skills to solve problems? If so, then you might be interested in the career of a computer software engineer. Read more

News Feed on This Topic

 
, ,

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Finio, Ben. "Wearable Limp Detection Device." Science Buddies, 7 July 2025, https://www.sciencebuddies.org/science-fair-projects/project-ideas/HumBio_p080/human-biology-health/wearable-limp-detection-device?from=Blog. Accessed 10 June 2026.

APA Style

Finio, B. (2025, July 7). Wearable Limp Detection Device. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/HumBio_p080/human-biology-health/wearable-limp-detection-device?from=Blog


Last edit date: 2025-07-07
Top
Free science fair projects.