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

- 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#

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:
- every sensel value equals the reference value exactly, with no tolerance;
- every IMU value equals the reference IMU row;
- 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.

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:
- Mapping. Place each raw reading on its cell of the foot grid. Left and right insoles use different maps.
- Gain correction. Correct each readout channel’s gain with the electronics’ own readout calibration.
- Calibration. Convert each corrected reading to pressure on that sensel’s own calibration curve, which the insole stores.
- 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
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:
- The sender hosts the insole electronics over USB and decodes every frame on the chip.
- 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.
- The receiver passes the stream to a computer, where a live foot-map viewer draws it in the browser.
Firmware and link benchmark for the IMU board#
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#

| 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,
and yc likewise. The clip below computes both for every frame of a recording.
The full 150 Hz rate#
On the high-rate recording, the decoder returns all 150 frames per second.

Wireless links for the IMU board#
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.