Skip to the content
PCBKitNew board
2 layers217.5 × 234 mmNIVA insole R, the printed circuit board in 3D

Live dashboard · Firmware · Rev C.1 hardware · Scoring rules

Size
217.5 × 234 mm
Copper layers
2
Thickness
0.12 mm
Parts
8
Nets
9
Pads
24
Tracks, vias
117, 8
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 Mar 2026
Updated
6 Nov 2026

Overview

NIVA insole R is an open-source printed circuit board by https-shubhamsahu, from the https-shubhamsahu/niva repository on GitHub. It is a 2-layer board of 217.5 × 234 mm with 8 parts on 9 nets, routed with 117 tracks and 8 vias.

Its parts include 2 connectors and 1 resistor.

README

README.md

niva: a right insole with heel, inner, outer and toe pressure pads. Load moves from heel to toe through one gait cycle while the matching phase rule lights up: HEEL_STRIKE, MID_STANCE, TOE_OFF, SWING.

Live dashboard · Firmware · Rev C.1 hardware · Scoring rules

Niva is a smart insole for gait screening. An ESP32 reads four force pads, a piezo disc under the heel and an MPU6050, then streams 20 frames a second to a React dashboard and a Flutter app. Each gait phase, score and alert comes from a threshold in one TypeScript file, so you can point at the exact reading that set off an alert. Niva was shown at Automation Expo in July 2026.

Status: the bench build runs today. The Rev C.1 wearable pod is designed, routed and DRC-clean in KiCad, but it hasn't been built or measured yet. Niva is a research and screening prototype. It isn't a medical device.

Bench build

Bench signal path: four FSRs on GPIO 32 to 35 and a piezo on GPIO 36 into the ESP32 ADC, MPU6050 and SH1106 OLED on I2C pins 21 and 22, one frame every 50 ms out over WebSocket port 81 and USB Serial at 115200 baud to niva web and niva flutter.

The active sketch is niva arduino/niva_hardware/niva_hardware.ino.

SignalESP32 pinNotes
FSR heelGPIO 32ADC1_CH4
FSR inner (1st metatarsal)GPIO 33ADC1_CH5
FSR outer (5th metatarsal)GPIO 34ADC1_CH6
FSR toeGPIO 35ADC1_CH7
Piezo heel discGPIO 36ADC1_CH0, the impact channel
I2C SDAGPIO 21MPU6050 at 0x68, SH1106 OLED at 0x3C
I2C SCLGPIO 22shared bus
Status LEDGPIO 2blinks during tare

What the firmware does each frame:

  • reads every ADC channel 16 times at 12 bits and averages the result
  • subtracts a zero-load tare (60 samples, saved in NVS, redone when you send calibrate or tare over WebSocket or Serial)
  • reads pitch, roll and accZ from the MPU6050
  • sends one frame every 50 ms to your WebSocket clients and the USB port
  • shows Wi-Fi state, tare progress and live channel bars on the OLED

You set up Wi-Fi through a WiFiManager captive portal (NIVA-GaitGuard-AP), and the board answers at ws://niva.local:81 over mDNS.

JSON over WebSocket (ws://<esp32-ip>:81):

json
{"heel":42.00,"inner":68.00,"outer":31.00,"toe":27.00,"piezo":176.00,"pitch":-2.40,"roll":1.30,"accZ":9.72}

CSV over USB Serial at 115200 baud:

text
H,I,O,T,Piezo,Pitch,Roll,AccZ

The simpler sketch, esp32_gaitguard_wifi_manager, uses hardcoded Wi-Fi credentials and doesn't drive the IMU or the OLED. BLE isn't in any sketch, and the IMU in firmware is the MPU6050 (you won't find BMI270 code here).

How a step gets scored

Both apps run the same engine on every frame: biomechanicsEngine.ts in the web app and biomechanics_engine.dart in Flutter, and there's no trained model in it. Here are the rules, with the default values from the code, so you can check any number on the dashboard by hand:

OutputRule
Tare checkThe first 30 frames must be steady: load range 8 or less, mean load 55 or less, tilt 7 or less, impact 60 or less. After 60 frames it carries on without a baseline.
SmoothingEMA with α = 0.1, a deadband of 2.5 on pressure and 0.8 on angles
Contactstance while the filtered total is above 45
Steppiezo above 200, heel above 80, heel rising by more than 8, and the foot was in swing
Cadence60 divided by the time between heel strikes (0.2 s to 3 s)
PhaseHEEL_STRIKE heel > 80 and toe < 40; MID_STANCE heel, inner and outer > 50; TOE_OFF toe > 80 and heel < 30; SWING total < 20
Centre of pressureload-weighted average of the four pad positions
Stability score100 - 9 × tilt - 30 × impact level, clamped to 0 to 100
Flagssupination risk when roll > 8 and outer > inner; heel-dominant gait when the heel carries over 70 % of the load for 5 frames; high sway when tilt reaches 6; ischemic pressure risk when the static-load integral passes 50

Rev C.1 wearable pod

The next build swaps the dev board for a pod you wear on the lower shin: ESP32-C3, an MCP3208 ADC, an LSM6DSO32 IMU, a removable battery cartridge, one button and one light. A desk dock charges the cartridges. Every part comes out of a script (FreeCAD 1.1, KiCad 9, Blender 4.5), so you can rebuild the whole design from hardware/work/.

Blender render of the Rev C pod exploded along its assembly axis: button and light pipe, cover, PCBA, cartridge, cradleKiCad 9 raytrace of the routed 34 by 48 mm pod PCB, top side, with the ESP32-C3-MINI-1 module and MCP3208
Blender render of the insole sensing flex laid on the 1:1 right medium insert, with five force regions and copper lanes to the heel tabBlender render of the charging dock with a cartridge seated and a spare cartridge beside it

These are CAD renders, not photos. The signal chain inside the pod:

Rev C.1 pod front end: five force regions and a PVDF heel film on the insole flex reach MCP3208 channels 0 to 5 through a 10-pin JST GH tail. Channel 6 is a tail-fault monitor and channel 7 reads the insert ID. VREF equals VEXC so readings are ratiometric. The ADC and LSM6DSO32 share SPI with an ESP32-C3-MINI-1; a MAX17048 gauge is on I2C.

BoardSize and layersRoutingKiCad ERC / DRC
Pod34 × 48 × 1.0 mm, 4 layers, In1 = GND planeGND fan-out, Freerouting signals, pours; 547 segments, 126 viasERC 0 errors; DRC 0 errors, 0 unconnected
Cartridge strip3.4 × 30 × 0.8 mm, 2 layershand-routed0 / 0
Dock58 × 56 × 1.6 mm, 2 layersFreerouting and GND pours0 / 0
Insole flex R and L0.12 mm polyimide, F.Cu only underfootgenerated paired lanes0 / 0

What's still open: nothing has been printed, built, powered or measured. RF, sealing, skin contact, cleaning and FSR characterisation are untested, and nobody outside the project has reviewed the design. A clean ERC and DRC is an automated check. It isn't a design review. The pod has a bare-PCB first-article Gerber set for bench bring-up; the rest are review-only. The full list is in VERIFICATION-PLAN.md and the hardware README.

Run it

Don't have the hardware? Open the live dashboard and switch to Simulation. It streams generated gait for six modes (Normal, Parkinson, Stroke, Neuropathy, Foot Drop, Ataxia) through the same engine. The simulated patterns are synthetic, so don't read them as patient data.

Install only what you need for the part you're running:

  • Web: Node.js 22+ and npm
  • Flutter: Flutter SDK (Dart 3.3+)
  • Firmware: Arduino IDE (or another ESP32 Arduino toolchain) with ESP32 board support

Web dashboard (niva web)

bash
cd "niva web"
npm install
# if peer dependency conflicts appear:
npm install --legacy-peer-deps
npm run dev

Other scripts:

bash
npm run build
npm run preview
npm run lint

Optional environment file, niva web/.env.local:

bash
VITE_ESP32_WS_URL=ws://<esp32-ip>:81
VITE_ESP32_WS_RELAY_URL=wss://<your-relay-domain>/ws
VITE_ESP32_WS_RELAY_TARGET_KEY=target
VITE_DATASET_UPLOAD_URL=https://your-api.example.com/upload
VITE_DATASET_UPLOAD_TOKEN=your_optional_bearer_token

Optional WebSocket relay, needed when an HTTPS dashboard has to reach a ws:// ESP32:

bash
cd "niva web/relay"
npm install
npm start

Flutter app (niva flutter)

bash
cd "niva flutter"
flutter pub get
flutter analyze
flutter test
flutter run

The ESP32 endpoint, relay URL and upload URL are runtime settings on the Device tab, not build-time env files.

Firmware (niva arduino)

Open a sketch in Arduino IDE, install the libraries listed in niva arduino/README.md (WiFiManager, WebSockets, U8g2), select an ESP32 board and upload:

  • Active hardware sketch: niva arduino/niva_hardware/niva_hardware.ino
  • Simpler hardcoded Wi-Fi sketch: niva arduino/esp32_gaitguard_wifi_manager/esp32_gaitguard_wifi_manager.ino

Open Serial Monitor at 115200 baud, note the printed IP, and point the Flutter Device tab or the web Settings page at ws://<ESP32_IP>:81.

Stack

  • Web: React 19, TypeScript, Vite, Tailwind, Recharts, IndexedDB, Web Serial
  • Flutter: Riverpod, Hive, web_socket_channel, fl_chart
  • Relay: Node.js and ws
  • Deploy: GitHub Pages through .github/workflows/deploy-pages.yml, which builds niva web

There's no application server or database. Your datasets stay in your browser (IndexedDB) or on your phone (Hive). CSV upload to an external research API is optional.

Repository layout

DirectoryContents
niva arduino/ESP32 firmware: ADC acquisition, tare, IMU, OLED, Wi-Fi and WebSocket
niva web/Clinician dashboard, biomechanics views, dataset export and upload, WebSocket relay
niva flutter/Patient-facing app: dashboard, device pairing over WebSocket, insights, trends, CSV export
hardware/Rev C.1 prototype: FreeCAD pod and dock, KiCad 9 pod, cartridge, dock and insole flex, verification plan, Blender scenes. Not reviewed or released for fabrication.
docs/brand/Logo source files
SIH2026-DECK-KIT/Smart India Hackathon 2026 deck pipeline (HTML slides rendered to PDF)
assets/readme/, scripts/README diagrams and the script that builds them from the insole template

Documentation

FileContents
niva arduino/README.mdSketches, pin map, libraries
niva web/README.mdDashboard setup, telemetry formats, Pages deploy
niva web/JUDGES_WALKTHROUGH.mdAlgorithm and data walkthrough
niva flutter/README.mdFlutter setup, architecture, run commands
niva flutter/DESIGN.mdFlutter design notes
niva flutter/BACKEND_LOGIC.mdData contract and storage
hardware/outputs/NIVA-3D-engineering-prototype/README.mdRev C.1 boards, CAD, renders, open items

Niva is an engineering and research screening tool. It is not a medical diagnosis device.

Parts

8
QtyValueFootprintReferences
14.7k 0.1%Resistor_SMD:R_0603_1608MetricR1
1CABLE TO POD J1 (JST GH 10)NIVA_insole:WirePads_1x10_P2.0mm_LaneOrderJ1
1P1 Big toe (shunt FSR, 12 mm)NIVA_insole:FSR_Interdigitated_D12mmFSR1
1P2 Medial forefoot (shunt FSR, 12 mm)NIVA_insole:FSR_Interdigitated_D12mmFSR2
1P3 Lateral forefoot (shunt FSR, 12 mm)NIVA_insole:FSR_Interdigitated_D12mmFSR3
1P4 Lateral midfoot (shunt FSR, 12 mm)NIVA_insole:FSR_Interdigitated_D12mmFSR4
1P5 Heel (shunt FSR, 12 mm)NIVA_insole:FSR_Interdigitated_D12mmFSR5
1V1 PVDF FILM (signal, return)NIVA_insole:PVDF_BondPads_2x6x2mmJ2

Questions

How big is the NIVA insole R PCB?

It measures 217.5 × 234 mm and has 2 copper layers, 0.12 mm thick.

What parts does the NIVA insole R use?

8 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the NIVA insole R KiCad files?

From the https-shubhamsahu/niva repository on GitHub, at the commit this page was made from: the board is hardware/outputs/NIVA-3D-engineering-prototype/electronics/insole/NIVA-insole-R.kicad_pcb and its schematic hardware/outputs/NIVA-3D-engineering-prototype/electronics/NIVA-controller.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the NIVA insole R design in my own project?

Its repository states no licence, so its author keeps all rights: ask https-shubhamsahu before reusing the design.

More from https-shubhamsahu/niva

4
  • 4 layers34 × 48 mmNIVA pod, the printed circuit board in 3D

    NIVA pod

    https-shubhamsahu/niva

    Live dashboard · Firmware · Rev C.1 hardware · Scoring rules

    65 parts
  • 2 layers58 × 56 mmNIVA dock, the printed circuit board in 3D

    NIVA dock

    https-shubhamsahu/niva

    Live dashboard · Firmware · Rev C.1 hardware · Scoring rules

    24 parts
  • 2 layers217.5 × 234 mmNIVA insole L, the printed circuit board in 3D

    NIVA insole L

    https-shubhamsahu/niva

    Live dashboard · Firmware · Rev C.1 hardware · Scoring rules

    8 parts
  • 2 layers3.4 × 30 mmNIVA cartridge, the printed circuit board in 3D

    NIVA cartridge

    https-shubhamsahu/niva

    Live dashboard · Firmware · Rev C.1 hardware · Scoring rules

    4 parts

Similar boards

  • 2 layers20.5 × 24.8 mmPi interface, the printed circuit board in 3D

    Pi interface

    opulo-inc/lumenpnp

    The LumenPnP is an open source pick and place machine.

    8 parts3.7k
  • 2 layers59.9 × 25.7 mmBuffer, the printed circuit board in 3D

    Buffer

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    8 parts1kGPL-3.0
  • 2 layers52 × 12.6 mmUSB, the printed circuit board in 3D

    USB

    shanteacontrols/OpenDeck

    A platform for building interactive control and sensing devices using MIDI and OSC built with Zephyr RTOS.

    8 parts960Apache-2.0
  • 2 layers87.5 × 48.5 mm7 input macropad, the printed circuit board in 3D

    7 input macropad

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    8 parts915
  • 2 layers36.2 × 63.1 mmPicoMemcard pico, the printed circuit board in 3D

    PicoMemcard pico

    dangiu/PicoMemcard

    Emulating PSX Memory Card (or controller) using a Raspberry Pi Pico

    8 parts694GPL-3.0
  • 2 layers36 × 10 mmPCB4-PWR BTN Rev.A, the printed circuit board in 3D

    PCB4-PWR BTN Rev.A

    OLIMEX/DIY-LAPTOP

    Do It Yourself Open Source Hardware and Software Modular Hacker's Friendly Laptop

    8 parts578Apache-2.0