Haptic Aid for Parkinson's Patients

by SarahTaverniers in Circuits > Arduino

100 Views, 1 Favorites, 0 Comments

Haptic Aid for Parkinson's Patients

Schermafbeelding 2025-05-24 102937.png

Objective

Freezing of gait (FOG) is a disabling symptom affecting over 50% of people with Parkinson’s disease (PD), particularly in advanced stages [1]. It manifests as a sudden and temporary inability to walk, typically triggered by environmental changes such as turning, crossing doorways, or encountering obstacles [2]. These episodes significantly increase the risk of falling, reduce patients’ independence and overall quality of life [3]. As one of the most dangerous motor symptoms, FOG contributes heavily to physical and emotional burden for patients, and is often resistant to conventional treatment strategies.

Supplies

87201c97-01a2-41fd-b8ff-ebcdafe8fda9.jpg
Schermafbeelding 2025-05-29 225513.png

Creating a reliable and portable haptic feedback system for FOG detection involves integrating precise sensors, real-time processing, and tactile feedback. Below is the full bill of materials and the amount used of each component.

Components:

  1. 1 x Arduino micro
  2. 1 x Arduino Micro USB Cable
  3. 1 x MPU-6050 IMU sensor
  4. 2 x Drake Actuator
  5. 2 x Three-port Terminal
  6. 2 × DRV2605L Haptic Motor Controller
  7. 1 x I²C Multiplexer: TCA9548A
  8. 1 x Breadboard
  9. Jumper Wires


To make it portable:

  1. 1 x 9V Battery (6LF22-9V)
  2. 1 x 9V Battery Clip with Wires
  3. Velcro strap
  4. Brace ( Can be found in the local farmacist)
  5. 3D printed box (made to fit the breadboard)
  6. 2 x Screws M4

Research on Medical Challenge

Why more than medication is needed

Parkinson's disease is a progressive brain disorder that affects movement, perception and quality of life. Although it is the most common movement disorder worldwide, there is currently no cure for PD. However, several treatments are available to reduce symptoms and improve every-day functioning. The most effective medication is the levodopa/carbidopa combination, which restores dopamine levels and improves motor control. Other therapies, such as deep brain stimulation and rehabilitation techniques such as gait and balance training, can also provide relief in later stages of the disease. However, these treatments are not always sufficient, especially for symptoms such as FOG, and are often inaccessible or unaffordable in low- and middle-income countries [4]. This highlights the need for affordable and complementary tools that can help control symptoms such as FOG in a more practical and user-friendly way.


Why Haptics?

In our course on haptic interfaces, we learned quickly that touch is the most immediate and dominant human sense. Tactile stimuli are processed faster than visual or auditory signals, making haptic feedback particularly valuable for time-sensitive interactions. This is especially relevant for people with Parkinson's disease, where a quick hint can help interrupt episodes such as Freezing of Gait (FOG) and restore movement.

Managing Freezing of Gait (FOG) in Parkinson’s disease remains a significant challenge, primarily because of its unpredictable nature and the way it can vary from person to person, or even moment to moment. Standard clinical assessments such as the Timed Up and Go test or FOG questionnaires often fall short when the sensitivity and real-time responsiveness are needed for timely intervention [1]. With the development of wearable micro-electromechanical systems (MEMS), including accelerometers and gyroscopes, real-time gait monitoring has become more feasible, enabling continuous detection of movement irregularities [1]. However, detection alone is not enough; the next step is intervention, and this is where haptic cueing plays a crucial role. Haptic feedback offers a direct, discreet, and user-friendly method to provide real-time cues without relying on vision or hearing, both of which are often impaired in people with Parkinson’s. While many studies focus solely on detection algorithms, integrating haptics transforms passive monitoring into an active support system that can immediately assist users during FOG episodes.


Detection of FOG

Identifying Freezing of Gait (FOG) remains a significant challenge, largely due to its unpredictable onset and the considerable variability observed between different patients. Effective detection requires continuous monitoring of gait parameters such as stride length, foot acceleration, and rhythmicity. In recent research, Slemenšek et al. proposed an advanced method using inertial sensors combined with machine learning (CNN-RNN) to classify gait in real time with high accuracy [5]. Despite their impressive performance, these methods demand substantial computational resources and require individualized model training, rendering them impractical for use in low-cost, resource-constrained embedded devices. Therefore, we adopt a simplified strategy based on detecting abrupt changes in acceleration as a practical and lightweight indicator of potential FOG episodes.

Technical Solution

To address the issue of Freezing of Gait in Parkinson’s Disease, To address this, we developed a real-time, wearable haptic interface designed to restore walking rhythm and disrupt freeze episodes as they occur. The device is worn on the lower leg and knee, and is designed to be portable and minimally intrusive.

We use a sensor on the knee that detects movement using an accelerometer and a gyroscope. From the article by T. Huang [1], we can conclude that most FOG studies utilize a sensor on the lower limb. Additionally, it is stated that most studies use IMUs to analyse movement. This has further supported our choice of materials and positioning.

The system consists of:

  1. MPU6050 IMU Sensor
  2. Tracks leg movement using a 3-axis accelerometer and gyroscope.
  3. Provides continuous acceleration data that is used for detecting walking and freezing patterns.
  4. Arduino Micro
  5. Serves as the central processing unit.
  6. Analyzes incoming IMU data to distinguish between normal steps and freeze-like motion.
  7. DRV2605L Haptic Motor Drivers (x2)
  8. One driver for step vibration feedback and the other for freeze alerts. ( later we used one motor for both because this one had the best frequency)
  9. Each controlled independently using an I2C multiplexer.
  10. Portable Power Source
  11. A 9V battery powers the whole system.
  12. All electronics are housed in a custom 3D-printed enclosure secured to the leg with Velcro straps and a brace.

In this setup, the Arduino continuously acquires motion data from the MPU6050 sensor at a baud rate of 115200. The system processes this input to compute total acceleration, subsequently distinguishing between typical step activity and abnormal movement patterns. A step is operationally defined as a distinct acceleration event exceeding 13.0g, provided that at least 500 milliseconds have elapsed since the previous detection, this prevents erroneous multiple counts from a single movement. Conversely, a freeze episode is identified if six or more accelerations above 12.0g are detected within a 350 millisecond window, indicating rapid, repetitive motion. This dual-criteria detection strategy allows us for clear differentiation between normal gait events and pathological tremors.

When a step is detected, a short pulse (effect #3) is sent to the motor to reinforce rhythm. During a freeze, a more intense feedback pattern (effect #47, five repetitions) is sent to the other motor to break the frozen state and encourage forward movement. These feedback patterns were carefully selected from the DRV2605L’s built-in library for maximum tactile clarity.

All detections and their corresponding actions are transmitted over the serial port to a Unity interface for real-time visualization. In Unity, the system listens for strings such as "STEP DETECTED" and "FREEZE DETECTED" to trigger changes in the avatar’s behavior. When a step is detected, the avatar moves forward and turns green. When a freeze is detected, the avatar turns red, and triggers a sound cue for immersive feedback.

This combined hardware and software solution offers several advantages. Its modularity allows easy upgrades and part replacements. The system operates in real time with minimal latency, and its compact, the wearable format supports the mobility we wanted to focus at. Finally, integration with Unity enables both visual monitoring for researchers and an engaging feedback loop for patients, potentially useful in clinical or rehabilitative settings.

This setup successfully applies principles from haptic interface design, sensor data processing, feedback control, and embedded programming to create a comprehensive and functional tool for Parkinson’s patients dealing with gait disturbances.

Expected Impact

The proposed device is designed to be discreet, operating without visual or auditory cues, while aiming to decrease both the frequency and duration of freezing episodes experienced by individuals with Parkinson’s disease. By addressing these symptoms, the device has the potential to significantly improve patient safety, foster greater independence, and support enhanced mobility in daily life.

Concept

b704f7b0-7d2d-40f5-9bfa-fed12c47a3a8.jpg
b250ad12-c9a4-4737-bad2-d9e062b76a33.jpg
54361483-b091-4504-b0bf-29053b625985.jpg
2c91d32b-550e-47d0-871e-1bb9ab798579.jpg

The image above shows our initial concept.

Our conceptual design focuses on wearability, discretion, and modularity. The system is mounted on the user’s dominant leg, where freezing of gait (FOG) most often originates. The entire device is mounted on a soft leg brace, which can be comfortably worn under clothing to maintain a low-profile appearance in public settings. This ensures that the device is not only functional but also socially acceptable and comfortable for long-term daily use.

At the heart of the system is a custom 3D-printed enclosure that houses the electronics: the Arduino Micro, MPU6050 motion sensor, TCA9548A multiplexer, and two DRV2605L haptic motor drivers. The enclosure is securely fixed onto the brace using two screws and velcro straps, allowing for easy attachment, removal, or repositioning.

For optimal haptic performance, two small cutouts on the back of the enclosure allow the vibration motors to protrude and make direct contact with the user’s skin. This design choice is critical, it ensures strong and localized vibration feedback without dampening.

The brace keeps the motors firmly pressed against the leg, enhancing sensory feedback during both normal and freezing events. If repairs or updates are needed, the enclosure can be opened quickly without dismantling the full system and a small cut-out is made for the connection with a laptop.

Circuit

broadboard.png

This schematic shows a wearable haptic feedback system built around an Arduino Micro, integrating multiple sensors and haptic actuators via I²C through an I2C multiplexer (TCA9548A). Below is a detailed explanation of the circuit:

Main Components in the Circuit

  1. Microcontroller: Arduino Micro (far right)
  2. Central controller managing sensor input and actuator output.
  3. Connected via I²C (SCL, SDA), power (VCC), and GND to the I2C multiplexer and MPU6050.
  4. Additional control signals may go to the DRV2605L (not shown explicitly).
  5. Multiplexer: TCA9548A (center-left, blue board)
  6. Enables multiple I²C devices with the same address to coexist on the same bus.
  7. Connected to:
  8. SCL and SDA from Arduino
  9. VCC and GND
  10. Multiple output channels going to DRV2605L drivers and possibly the MPU6050.
  11. IMU Sensor: MPU6050 (center-right, black board)
  12. 6-DOF Inertial Measurement Unit: measures accelerations and angular velocity.
  13. Communicates directly with the Arduino Micro via I²C (SCL/SDA).
  14. Provides motion data used to detect movement or gait freezing.
  15. Haptic Drivers: 2 × DRV2605L (left side, black boards)
  16. Two identical vibration driver boards for haptic feedback.
  17. Each is connected to:
  18. Its own output channel of the I²C multiplexer (yellow and blue wires for SDA/SCL).
  19. Power via VCC (red) and GND (black).
  20. A small vibration motor attached to the output of each DRV2605L.
  21. Vibration Motors (left bottom)
  22. Actuated by the DRV2605L modules.
  23. Provide tactile feedback to the user in response to detected motion events or interruptions.


Wiring Logic

Each DRV2605L module communicates over I2C, which typically only supports a single address. Since both drivers use the same address, we route them through a TCA9548A I2C multiplexer, which allows switching between different I2C “channels.” This enables us to independently address each motor driver.

The MPU6050 is connected directly to the I2C bus (SDA/SCL) of the Arduino Micro, while the two DRV2605L boards are assigned to Channel 1 and Channel 2 of the multiplexer. Power lines (VCC and GND) are shared among all components. The motors are powered directly through their respective DRV2605L boards, which include built-in waveform triggering and intensity modulation.


Functional Flow

Sensor Reading: The MPU6050 continuously captures accelerometer and gyroscope data.

Decision Logic: The Arduino processes movement patterns and classifies them as either steps or freezing episodes.

Feedback Output:

  1. For steps: short pulse via DRV2605L (Channel 1)
  2. For freezes: burst of pulses via DRV2605L (Channel 2)

Unity Serial Logging: The Arduino sends a string message (STEP DETECTED or FREEZE DETECTED) via USB serial to Unity for visual and audio feedback

Coding and Online Setup Arduino

screen tools.png
screen library manager.png

Below, we walk through how we configured, uploaded, and tested the code that controls step and freeze detection.

Find the total arduino code below, ready to download!

Libraries Required:

Before uploading the sketch, the following libraries were installed through the Arduino Library Manager:

  1. Adafruit_MPU6050
  2. Adafruit_Sensor
  3. Adafruit_DRV2605
  4. Wire (pre-installed)

Follow the steps on the pictures above to upload this libraries.

Core Logic of the Code:

At the core of the system is a continuous feedback loop that:

  1. Receives motion data from the MPU6050 sensor
  2. Analyzed that data to identify walking steps or freezing episodes
  3. Activates the appropriate motor feedback based on the detected movement pattern
  4. Sends a message to Unity via serial communication

Reading motion data:

The MPU6050 is a 6-axis sensor that provides acceleration and gyroscope readings. In our loop, we primarily use the acceleration data:

mpu.getEvent(&a, &g, &temp);

We then calculate the total magnitude of acceleration (a scalar value) from the x, y, and z components:

float totalAcc = sqrt(

a.acceleration.x * a.acceleration.x +

a.acceleration.y * a.acceleration.y +

a.acceleration.z * a.acceleration.z

)

This gives us a single number that represents the overall intensity of leg movement of that moment in time.

Detecting a Step:

A step is defined as a sudden, strong leg movement. This is detected when the totalAcc exceeds a threshold (13.0 in our case), and at least 500 milliseconds have passed since the last step. This debounce prevents one movement from being counted multiple times.

if (totalAcc > STEP_THRESHOLD && (now - lastStepTime > 500)) {

selectI2CChannel(1); // Switch to motor 1

triggerSinglePulse(drv_step, 3); // Play a single vibration pulse

Serial.println("STEP DETECTED");

lastStepTime = now;

}

This works because Parkinson’s steps typically involve sharp bursts of motion. By setting a threshold and cooldown, we avoid false triggers and ensure each step is distinct.

Detecting a Freeze:

A freeze is trickier: it doesn’t always involve a full stop. It may begin as a cluster of rapid, hesitant mini-steps. To capture this pattern, we monitor for small-to-moderate movements (>12.0 acceleration) that occur frequently within a small time window (350 ms).

Each time such a peak is detected, we increase a peakCount. If six such peaks are seen in succession, we interpret that as a freeze episode:

if (totalAcc > PEAK_THRESHOLD) {

if (now - lastPeakTime < PEAK_WINDOW) {

peakCount++;

} else {

peakCount = 1;

}

lastPeakTime = now;

if (peakCount >= FREEZE_STEP_COUNT) {

selectI2CChannel(2); // Switch to motor 2

triggerMultiplePulses(drv_freeze, 47, 5, 200); // Vibrate 5 times, 200ms apart

Serial.println("FREEZE DETECTED (fast small steps)");

peakCount = 0;

}

}

This works because these quick spikes represent the instability and shuffling that often precedes a full freeze. Reacting early gives the patient a chance to break the pattern.

Triggering Haptic Feedback:

We use Adafruit’s DRV2605 haptic motor controller. It plays predefined vibration effects. We call either triggerSinglePulse() for steps or triggerMultiplePulses() for freezes:

void triggerSinglePulse(Adafruit_DRV2605 &drv, uint8_t effect) {

drv.setWaveform(0, effect);

drv.setWaveform(1, 0); // End of waveform

drv.go();

}

void triggerMultiplePulses(Adafruit_DRV2605 &drv, uint8_t effect, int count, int interval) {

for (int i = 0; i < count; i++) {

triggerSinglePulse(drv, effect);

delay(interval); // spacing between pulses

}

}

Effect IDs like 3 or 47 are based on the DRV2605’s built-in waveform library. We experimented with these for different tactile sensations and looked for the best possible frequency.

Serial Communication with Unity:

Every time a step or freeze is detected, a message is sent to the computer over USB via the serial port at 115200 baud:

Serial.println("STEP DETECTED");

Serial.println("FREEZE DETECTED (fast small steps)");

These messages are parsed by Unity, which controls the avatar, visuals, and sounds in the simulation.

Troubleshooting:

Also in this part we did a lot of troubleshooting. Here you can find the most common problems we tackled.

  1. “Serial port not found”: Ensure that the Arduino IDE’s Serial Monitor is closed when using Unity (only one program can access the COM port at a time).
  2. Noise or inconsistent triggers: Added smoothing delays and adjusted thresholds through trial and error during user testing.
  3. MPU not detected: Checked wiring and addressed brownout voltage drops with decoupling capacitors.
  4. Not all libraries where installed correctly what costed us a lot of time finding the problem and solving the error.

Addition of Unity

We use Unity to test our device. In Unity, we import a character that takes one step forward for each short vibration. When the movement indicates a freeze, the character turns red and stops moving this also generates 3 buzzes. By using Unity, we can visually observe when a FOG occurs, and we can also check whether each step is correctly registered.

attached video: “Unity Setup video.mp4” for full visual walkthrough


Unity Setup:

  1. Restart Unity and Arduino
  2. Upload your working Arduino code ( file above in step 6 )
  3. Disconnect the Serial Monitor!!!!!!!!!!!!!!! Only one can run at the same time so the moment Unity is opened close the serial monitor.
  4. Launch Unity
  5. Create a New Unity 3D Project
  6. Launch Unity Hub → New Project → 3D Core Template → Name it “ParkinsonUnity”
  7. Prepare the Scene
  8. Delete the default “Main Camera” and “Directional Light” if needed
  9. Add a plane (GameObject → 3D Object → Plane) → this is the ground
  10. Add a Directional Light (GameObject → Light → Directional Light)
  11. Import Your Avatar
  12. Download a humanoid character from [Mixamo.com] ( file attached named Walking)
  13. Drag the .fbx file with animation into your Unity “Assets” folder
  14. Then drag the model into the Hierarchy
  15. Rename it: Change the name to Avatar (important for scripting)


Add Materials and Color feedback:

  1. Find the Mesh to Color
  2. Expand the Avatar in the Hierarchy
  3. Locate Beta_Surface (or similar name)
  4. Right-click in Assets → Create → Material (name it SkinMaterial)
  5. Assign the new material to the Beta_Surface
  6. Add AudioSource to Avatar
  7. Select the Avatar in the Hierarchy
  8. Click “Add Component” → search AudioSource
  9. Drag in your vibration sound (e.g., .wav file)
  10. Uncheck “Play On Awake”


Add the SerialReader Script:

  1. Create the Script
  2. Right-click in Assets → Create > C# Script → name it SerialReader
  3. Double-click it to open in Visual Studio
  4. Replace the entire contents with this (matches your video setup):


using System.IO.Ports;

using UnityEngine;

public class SerialReader : MonoBehaviour

{

SerialPort sp = new SerialPort("COM6", 115200); // Replace COM6 with your actual port

public GameObject avatar;

private float freezeCooldownUntil = 0f;

private float lastColorChangeTime = 0f;

private Color defaultColor;

private AudioSource stepSound;

void Start()

{

try

{

sp.Open();

sp.ReadTimeout = 50;

Debug.Log("Serial port opened!");

var renderer avatar.transform.Find("Beta_Surface")?.GetComponent<SkinnedMeshRenderer>();

if (renderer != null)

defaultColor = renderer.material.color;

stepSound = avatar.GetComponent<AudioSource>();

}

catch (System.Exception e)

{

Debug.LogError("Serial port failed to open: " + e.Message);

}

}

void Update()

{

if (!sp.IsOpen) return;

try

{

string message = sp.ReadLine().Trim();

Debug.Log("Received: " + message);

var renderer = avatar.transform.Find("Beta_Surface")?.GetComponent<SkinnedMeshRenderer>();

if (message.Contains("FREEZE"))

{

if (renderer != null) renderer.material.color = Color.red;

freezeCooldownUntil = Time.time + 2.0f;

lastColorChangeTime = Time.time;

PlayStepSound(3); // Play 3 pulses

}

if (message.Contains("STEP") && Time.time > freezeCooldownUntil)

{

avatar.transform.position += new Vector3(0.3f, 0f, 0f);

if (renderer != null) renderer.material.color = Color.green;

lastColorChangeTime = Time.time;

PlayStepSound(1); // Single pulse sound

}

if (renderer != null && Time.time - lastColorChangeTime > 1.0f)

renderer.material.color = defaultColor;

}

catch (System.Exception e)

{

Debug.LogWarning("Serial read error: " + e.Message);

}

}

void PlayStepSound(int repetitions)

{

if (stepSound != null)

StartCoroutine(PlayPulse(repetitions));

}


System.Collections.IEnumerator PlayPulse(int count)

{

for (int i = 0; i < count; i++)

{

stepSound.Play();

yield return new WaitForSeconds(0.25f);

}

}

}


Connect Arduino:

  1. Upload Your Arduino Code
  2. Ensure Arduino is sending "STEP DETECTED" and "FREEZE DETECTED"
  3. Close the Serial Monitor so Unity can connect to the COM port
  4. Back in Unity:
  5. Assign the Avatar to the SerialReader script (drag and drop)
  6. Press Play in Unity
  7. When Arduino sends data, the avatar:
  8. Moves forward on STEP
  9. Turns red on FREEZE
  10. Plays sound for both

First Prototype

41fbd30f-5850-4be2-aa12-f6d4b0dc7169.jpg

After completing our Unity environment and Arduino-based haptic detection logic, we transitioned from concept to physical reality by building our first working prototype. Before diving into a polished wearable version, we built a quick and flexible prototype to validate the technical feasibility of our concept.

In the initial phase of the device, it looked like the setup shown in the photo above. When we used it to simulate a stepping motion, we noticed the following issues:

  1. The vibration was barely noticeable
  2. Wires came loose easily, preventing the vibration from being transmitted
  3. The fabric with Velcro detached quickly
  4. It was difficult to distinguish between the two different vibrations

Based on these observations, we will focus on addressing these points in the design of our next portable device.

Optimization

a00dcbcf-adbe-4d4e-9d69-f04bf77b6ca5.jpg
b250ad12-c9a4-4737-bad2-d9e062b76a33.jpg
54361483-b091-4504-b0bf-29053b625985.jpg
2c91d32b-550e-47d0-871e-1bb9ab798579.jpg

After validating the technical core of our system with the first prototype, we focused on addressing its practical limitations by building a fully wearable and robust version. Our goal was to design a system that was discreet, reliable, and comfortable enough to be worn in real-life scenarios by patients with Parkinson’s disease.

Issues in First Prototype (Recap):

During testing of our early prototype (see Step 8), several usability flaws became clear:

  1. The vibration was barely noticeable, due to poor contact between motors and skin.
  2. Wires came loose during walking, which interrupted the haptic feedback.
  3. The Velcro attachment failed, making the setup unreliable.
  4. It was hard to distinguish between step and freeze feedback.

These shortcomings were critical to solve to ensure that the device could be trusted for real-world use.

Improvements in the Final Build:

  1. Robust 3D-Printed Enclosure
  2. We designed and printed a custom casing that fits tightly against the leg.
  3. The enclosure holds all electronics securely: the Arduino Micro, MPU6050 IMU, TCA9548A I2C multiplexer, and both DRV2605L haptic drivers.
  4. The enclosure includes two dedicated back slots, allowing the vibration motors to extend outward and make direct contact with the skin.
  5. A separated place for the battery so this can easily be changed.
  6. In case of mistakes also a slot for the USB cable is made so a connection to a device can easily be made without breaking down the hole setup.
  7. Dual-Motor Layout
  8. We positioned two ERM vibration motors at distinct points, at the back of the device so close to the skin.
  9. Stable Mounting with Brace
  10. We mounted the full system onto a soft orthopedic leg brace that wraps around the thigh and lower leg. The enclosure is connected via two screws.
  11. Motors are attached under the brace for skin contact while the box sits flush against the thigh, making the system wearable under clothing and discreet.
  12. Portability and Power
  13. The device is now powered using a 9V battery, so no need for a physical connection anymore.
  14. The user can wear it completely standalone — no laptop or external computer is needed once programmed.


The assembly components:

3D-Printed Enclosure

Houses and protects electronics

File will be attachted and can be downloaded.

Leg Brace

Holds enclosure and motors firmly against the leg

Enclosere connected with 2 bol schroeven.

Can be bought in the pharmacist

Assembly Steps

  1. Print and Prepare Enclosure:
  2. Use a 3D printer to produce the custom enclosure with two motor exit slots.
  3. Ensure enough internal space for wires and drivers.
  4. Make holes in the design for power and motor exit points.
  5. Mount Components:
  6. Place the Board with all the components in the encloser. Make sure the two DRV2605L are on the right side, near the motor exits.
  7. Thread the motors through the side slots, ensuring direct contact with skin when worn.
  8. Mount to Brace:
  9. Attach the enclosure to the leg brace using 2 bold screws.
  10. Power On & Wear:
  11. Plug the USB cable into the computer and start the device.Upload the code. Next delete the USB cable and attach the Battery.
  12. Secure the brace to the leg and ensure both motors make skin contact.
  13. The device is now fully wearable and operational.


Sensor Visualisation

Step Graph.png
Freeze Graph.png

Interpreting the Graphs

To ensure the reliability and functionality of our freeze detection and haptic feedback system, we closely analyzed raw sensor data using the Arduino Serial Plotter. This stage was crucial to calibrating our thresholds for both step and freeze detection and validating that our system behaves as expected during real walking trials.

Live Motion Graphs: Walking vs Freezing

In this experiment, we employed the MPU6050 accelerometer to record real-time acceleration data along the X, Y, and Z axes. The resulting graphs, presented below, are direct captures from the Arduino IDE’s Serial Plotter, configured at a baud rate of 115200. This approach enabled precise observation of motion patterns associated with both walking and freezing behaviors.


Figure A: Repetitive Step Detection Pattern

This graph represents normal walking motion. As seen, the green curve shows clean, periodic peaks reaching values above 19 units. These peaks correspond to consistent foot lifts and impacts with the ground. Based on this pattern, we established a step detection threshold of 13.0, ensuring that each intentional stride reliably triggers a vibration through the calf motor.

Such clear periodicity confirms that the system is capable of isolating step motion while ignoring background noise or posture shifts.


Figure B: Irregular Freezing Behavior

In contrast, this plot captures a moment of freezing or shuffling behavior. Here, the amplitude stays lower (~6–9 units), but includes rapid micro-peaks that occur in tight intervals. This is representative of hesitant, unstable motion, common when patients experience a freeze episode.

Our logic defines a freeze as six or more of these smaller movements within a 350ms time window, exceeding a secondary threshold of 12.0. When this happens, the system delivers a burst of five strong vibrations through the thigh motor to refocus attention and stimulate gait reinitiation.

Further Improvements of Arduino Code

Real-Life Testing and System Optimization

To refine our Arduino-based haptic feedback system, we conducted real-world walking trials. During a 50-step test, we experimented with various sensor thresholds to fine-tune the detection logic. This allowed us to optimize both step recognition and freeze detection, ensuring accurate haptic feedback for each condition.

Step Detection Logic

A walking step is detected when one of the following conditions is met:

  1. Horizontal acceleration (X or Z) exceeds the STEP_THRESHOLD.
  2. Cumulative rotation around the Z-axis exceeds ROTATIONZ_THRESHOLD.
  3. A sudden spike in vertical acceleration (Y-axis) above 13, mimicking a heavy footfall.

To avoid false positives, a debounce mechanism ensures at least 1 second between detected steps. Upon detection, a short vibration pulse is triggered on the step motor.

Freeze Detection Logic

Freezing behavior is detected based on tremor-like movement patterns, often seen in Parkinson’s patients:

  1. The Z-axis acceleration alternates in sign, indicating oscillatory motion.
  2. Detected peaks must exceed the PEAK_THRESHOLD.
  3. A minimum of FREEZE_STEP_COUNT peaks must occur within a 300 ms window (PEAK_WINDOW).

When such a pattern is recognized, the freeze motor provides rapid, successive haptic pulses to alert the user or observer.

Utility Functions

  1. selectI2CChannel(channel): Activates a specific I2C bus on the TCA9548A multiplexer.
  2. triggerSinglePulse(drv, effect): Triggers one haptic feedback pattern.
  3. triggerMultiplePulses(drv, effect, count, interval): Sends repeated pulses for emphasis.

Testing & Results

The system was successfully validated through real walking experiments. Fine-tuning the thresholds improved detection accuracy significantly.


Conclusion

Future Work

Although our current prototype is already functional and shows successful results in detecting freezing of gait (FOG) and providing immediate haptic feedback, we still see several key areas for improvement and expansion opportunities for future iterations of this project:


  1. Improving sensor accuracy
  2. Currently, we use the MPU6050 sensor for measuring acceleration and angular velocity. Although this is a widely used and accessible IMU, a more advanced sensor (such as the Bosch BNO055 or LSM9DS1) could provide more accurate measurements and less noise. This would lead to better detection of FOG episodes and a lower risk of false positives.
  3. Optimization of haptic feedback
  4. The vibration of the current motors is sufficient for test use, but in practice it was found that the tactile response under clothing or in certain areas of the leg is less convincing. By using stronger or better focused actuators (such as linear resonance actuators - LRAs or piezo elements), the feedback can be experienced more powerfully, consistently and subtly.
  5. Machine learning for more accurate detection
  6. Currently, the system works based on threshold values for acceleration. In the future, based on collected test data, it will be possible to train a simple machine learning model (such as decision trees or SVM) that will make the distinction between normal walking and an FOG episode much more accurate. This will also allow the system to adapt to the individual patient.
  7. Validation with Parkinson's patients
  8. So far, we have tested our system on healthy subjects to ensure basic functionality and reliability of detection and feedback. In the future, we want to conduct tests with individuals with Parkinson's to validate whether the system is effective in real-world situations. This will require ethical approval and collaboration with medical institutions.
  9. Improved portability and integration
  10. Our current 3D printed housing works well, but is still relatively large and visible. A next version could use custom PCBs and more compact design so that it can be worn completely under clothing without compromising comfort or effectiveness.
  11. Software extension in Unity
  12. The current Unity environment provides visual and auditory feedback on movements. In the future, we want to extend this to a training module or game environment in which patients can playfully improve their gait. Gamification can contribute to motivation and compliance.

References

[1] T. Huang, M. Li, en J. Huang, “Recent trends in wearable devices used to detect freezing of gait and falls in people with Parkinson’s disease: A systematic review,” Frontiers in Aging Neuroscience, vol. 15, 2023. doi: 10.3389/fnagi.2023.1119956.

[2] D. Sweeney, L. R. Quinlan, P. Browne, M. Richardson, P. Meskell, and G. ÓLaighin, "A Technological Review of Wearable Cueing Devices Addressing Freezing of Gait in Parkinson’s Disease," Sensors, vol. 19, no. 6, 2019, doi: 10.3390/s19061277.

[3] Gondola Medical, "Parkinson’s Disease: A Few Tips to Prevent and Overcome Freezing of Gait," Gondola Medical, 13 Mar. 2019. [Online]. Available: https://www.gondola-medical.com/news/parkinson-disease-symptoms-how-to-manage-freezing/. [Accessed: 28 Mar. 2025].

[4] World Health Organization, “Parkinson disease,” WHO, Aug. 9, 2023. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/parkinson-disease. [Accessed: 28 Mar. 2025].

[5] J. Slemenšek et al., “Wearable Online Freezing of Gait Detection and Cueing System,” Bioengineering, vol. 11, no. 10, p. 1048, 2024. doi: 10.3390/bioengineering11101048.

[6] A. Nieuwboer, N. Giladi, I. Rochester, et al., “Cueing for freezing of gait in Parkinson’s disease: a review,” Journal of Neuroscience Methods, vol. 167, no. 2, pp. 240–248, 2008. doi: 10.1016/j.jneumeth.2007.04.034.

[7] A. J. Nutt, B. R. Bloem, N. Giladi, et al., “Freezing of gait: moving forward on a mysterious clinical phenomenon,” The Lancet Neurology, vol. 10, no. 8, pp. 734–744, 2011. doi: 10.1016/S1474-4422(11)70143-0.

[8] American Physical Therapy Association (APTA) and Academy of Neurologic Physical Therapy (ANPT), Strategies for Thawing Freezing During Walking, NeuroPT.org, Dec. 2022. [Online]. Available: https://www.neuropt.org/docs/default-source/default-document-library/freezing-strategies-in-parkinson-disease---patient-final.pdf. [Accessed: Mar. 28, 2025].

[9] R. Khatavkar, A. Krishnan, and H. Ghasemzadeh, “Investigating the Effects of a Kinematic Gait Parameter-Based Haptic Cueing Device on Toe Clearance in Parkinson’s Disease,” Annals of Biomedical Engineering, vol. 52, 2024. doi: 10.1007/s10439-024-03501-4.

[10] Parkinson’s Community Los Angeles (PCLA), “Vibration Therapy for Parkinson’s: Does it Help?,” PCLA.org, 2023. [Online]. Available: https://www.pcla.org/blog/vibration-therapy-parkinsons. [Accessed: Mar. 28, 2025].

[11] National Library of Medicin, "Triggers for freezing of gait in individuals with Parkinson's disease: a systematic review" ,pmc.ncbi.nlm.gov , Dec.2023. [Online]. Available : https://pmc.ncbi.nlm.nih.gov/articles/PMC10771308. [Accessed: Apr.4, 2025].