Research
On this page

ResearchEPIC Lab

Decoding a pressure insole for a wireless sensor suit

My decoder turns a commercial capacitive pressure insole's raw stream into calibrated pressure maps and IMU data, matching the reference output exactly, and runs on an ESP32-S3.

Role
Undergraduate researcher
Period
January 2026 – present
Context
EPIC Lab, Georgia Tech
Status
Ongoing
Eight foot-shaped grids of rounded cells in a row, labelled 0 to 3500 ms; dark cells at the heel give way to dark cells under the forefoot and toes, and a line follows the centre of pressure forward.
A person standing on the right insole shifts weight from heel to toes: eight consecutive decoded frames, 500 ms apart. The centre of pressure (line) follows the load forward onto the forefoot.
  • 100%exact match on 7.1 million sensel values
  • 15recordings validated, IMU data included
  • 150Hzfull insole frame rate, decoded
  • 235sensels in every decoded pressure map

Problem#

What the insole measures#

Two foot-shaped grids of rounded cells, a left and a right insole seen from above, with dark cells under the heels and the big toe and lighter blue across the forefoot.
Standing frames from the left and right insoles, decoded from separate recordings. The left frame sums to 930 N, with its highest pressure, 251 kPa, under the big toe.

A capacitive pressure insole is a thin grid of sensels (sensing elements): each is a capacitor whose reading changes with the pressure on it. The insole the lab uses has 235 sensels under the foot and an IMU in its electronics.

One frame is a reading of every sensel plus one IMU sample. Decoded, a frame becomes a pressure map: the pressure on each sensel in kilopascals, one cell per sensel in the figure.

Why the suit needs its own decoder#

EPIC Lab is building a wireless sensor suit for exoskeleton research, and foot pressure is one of its inputs. The insole offers two ways out:

Readout path Frames per second
Built-in Bluetooth about 50
USB, raw readings up to 150

The full rate leaves the insole as raw readings, and the conversion from raw readings to pressure runs inside the vendor’s Windows software. A microcontroller on the suit therefore needs its own decoder to use all 150 frames per second.

Approach#

The test: exact agreement#

I recorded the raw USB stream and the reference software’s output for the same sessions. The reference output is the answer key: for every frame it gives each sensel’s pressure and the IMU sample. A decoded recording passes when:

  1. every sensel value equals the reference value exactly, with no tolerance;
  2. every IMU value equals the reference IMU row;
  3. both hold on every recording, across left and right insoles of several sizes.

An exact test keeps every mismatch visible. A tolerance would let a stage that is almost right pass unnoticed.

Twelve foot-shaped pressure grids in two rows, six left insoles above and six right insoles below, each loaded in a different pattern.
One decoded frame from every insole in the 15 test recordings, left insoles above and right below, smallest size first. Each insole carries its own calibration; one decoder reads them all.

One frame in, one pressure map out#

The decoder is a stateless function of one frame: its output depends on that frame and the insole’s calibration, nothing else, so frames decode in any order and on any processor. It runs four stages:

  1. Mapping. Place each raw reading on its cell of the foot grid. Left and right insoles use different maps.
  2. Gain correction. Correct each readout channel’s gain with the electronics’ own readout calibration.
  3. Calibration. Convert each corrected reading to pressure on that sensel’s own calibration curve, which the insole stores.
  4. Line repair. Repair faulty sensor rows and columns the way the reference does.

The calibration curve is piecewise linear. For a sensel whose reading a falls between two calibration points (ak, pk) and (ak+1, pk+1), the pressure is

p = pk + (a − ak) · (pk+1 − pk) / (ak+1 − ak)

Exact agreement also depends on the arithmetic. I evaluate this line in single precision with the reference’s rounding, so each pressure matches to the last digit.

What I built#

A reference decoder and its scoring tools#

I wrote the decoder in Python together with scoring tools that compare its output with the reference sensel by sensel and IMU row by IMU row, and list every value that differs.

A C++17 library with its own USB driver#

I ported the decoder to a dependency-free C++17 library with its own USB driver for the insole electronics. The driver reads each insole’s calibration from the insole itself, so no vendor software runs at any point. A Python wrapper gives analysis code the same library.

Decoding on the ESP32-S3#

For the suit, I wrote firmware for a pair of ESP32-S3 boards:

  1. The sender hosts the insole electronics over USB and decodes every frame on the chip.
  2. It sends the decoded frames over ESP-NOW, a direct board-to-board Wi-Fi link that needs no access point, at about 107 kB/s.
  3. The receiver passes the stream to a computer, where a live foot-map viewer draws it in the browser.

I also wrote the application firmware for the suit’s ESP32-S3 IMU boards. One FreeRTOS task samples the IMU; a second sends each sample in a CRC-checked binary protocol over USB serial, BLE, Wi-Fi TCP or Wi-Fi UDP.

A Python harness steps the requested output rate from 200 to 1600 Hz and records, for each link, the received rate, the loss and the sample age: the time from sampling on the board to arrival on the computer.

Results#

Exact agreement on every recording#

Three foot-shaped grids side by side: the reference output and the decoder output, identical, with the forefoot loaded, and a third grid of empty outlined cells labelled 0 on all 235 sensels.
One frame of a standing recording, left insole: the reference software's pressure map, my decoder's, and their difference, which is zero on every sensel. The table below holds the same check over all 15 recordings.
Check Compared Matching
Python decoder vs reference: pressure 7,123,790 sensel values in 15 recordings 7,123,790 (100%)
Python decoder vs reference: IMU every IMU row in 15 recordings every row
C++ library vs Python decoder 10,764,347 pressure codes 10,764,347 (100%)

The largest recording, at 150 Hz, holds 28,122 reference frames.

What a decoded stream gives the suit#

Each decoded frame is a 235-sensel pressure map plus an IMU sample. Two quantities follow directly from the map: the total force F, and the centre of pressure (xc, yc), the pressure-weighted centre of the loaded area. With pi the pressure on sensel i, Ai its area and xi its position,

F = Σi pi Ai,  xc = Σi pi xi / Σi pi

and yc likewise. The clip below computes both for every frame of a recording.

Standing with weight shifts on the right insole, a 2 Hz recording played at 5× speed. Each shift of weight appears in the map and, in the same frame, as a step in total force and in the centre of pressure's distance from the heel.

The full 150 Hz rate#

On the high-rate recording, the decoder returns all 150 frames per second.

Four left-insole pressure maps above a wavy force curve; a pressed spot sits at the toes, the forefoot, the midfoot and the heel at four marked peaks. (open the full-size figure)
Hand presses along the left insole, toes to heel, decoded at 150 frames per second: total force over 6.4 s and the pressure map at four marked peaks. At this rate the force trace resolves the rise and release of every press.

On the IMU board, every link delivered 100% of samples at its passing rates:

Link Highest passing rate Median sample age
USB serial 1600 Hz 0.3 ms
Wi-Fi UDP 800 Hz 3.4–4.8 ms
Wi-Fi TCP 200 Hz 4.5 ms
BLE 200 Hz 13.6 ms

The three wireless links showed worst-case delays of 50 to 150 ms, which set the next design for the suit’s IMUs.

What’s next#

Next, the ESP32-S3 sender will power the insole electronics from its own board, and the reader will record inside the sensor suit. For the IMUs, several ESP32 adapters will forward samples over ESP-NOW to a Jetson, replacing BLE and Wi-Fi on the suit.