Skip to the content
PCBKitNew board
2 layers58 × 56 mmNIVA dock, the printed circuit board in 3D

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

Size
58 × 56 mm
Copper layers
2
Thickness
1.6 mm
Parts
24
Nets
14
Pads
63
Tracks, vias
166, 10
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 Mar 2026
Updated
6 Nov 2026

Overview

NIVA dock 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 58 × 56 mm with 24 parts on 14 nets, routed with 166 tracks and 10 vias.

It is built around the LM393 and MCP73831T-2ACI/OT-HXY. Its parts include 9 resistors, 4 capacitors, 2 ICs, 2 connectors and 1 diode.

Main components

2

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

24
QtyValueFootprintReferences
4M2MountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
2100nCapacitor_SMD:C_0603_1608MetricC3, C4
24.7u 10VCapacitor_SMD:C_0603_1608MetricC1, C2
25.1kResistor_SMD:R_0603_1608MetricR1, R2
1100kResistor_SMD:R_0603_1608MetricR9
110k 1%Resistor_SMD:R_0603_1608MetricR3
118k 1%Resistor_SMD:R_0603_1608MetricR8
11kResistor_SMD:R_0603_1608MetricR4
122k 1%Resistor_SMD:R_0603_1608MetricR5
12N7002Package_TO_SOT_SMD:SOT-23Q1
139k 1%Resistor_SMD:R_0603_1608MetricR7
143k 1%Resistor_SMD:R_0603_1608MetricR6
1AMBER 0805 (charging)LED_SMD:LED_0805_2012MetricD1
1LM393Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU2
1MCP73831T-2ACI/OTPackage_TO_SOT_SMD:SOT-23-5U1
1PTC 1206 hold 0.5 AFuse:Fuse_1206_3216MetricF1
1SPRING PINS TO CARTRIDGE (P+, NTC, P-)NIVA_power:SpringPins_1x03_P6.0mm_VerticalJ2
1USB-C 6P power-onlyConnector_USB:USB_C_Receptacle_GCT_USB4125-xx-x_6P_TopMnt_HorizontalJ1

Questions

How big is the NIVA dock PCB?

It measures 58 × 56 mm and has 2 copper layers, 1.6 mm thick.

What parts does the NIVA dock use?

24 parts, built around the LM393 and MCP73831T-2ACI/OT-HXY. 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 dock 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/dock/NIVA-dock.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 dock 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 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 layers217.5 × 234 mmNIVA insole R, the printed circuit board in 3D

    NIVA insole R

    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

  • 4 layers45 × 41 mmOsw, the printed circuit board in 3D

    Osw

    Open-Smartwatch/open-smartwatch-gps

    Hardware design files for the GPS version of the open-smartwatch

    70 parts243GPL-3.0
  • 4 layers38.4 × 128.5 mmPlantpal, the printed circuit board in 3D

    Plantpal

    teapotlaboratories/plantpal

    Your pal in plant care

    121 parts98MIT
  • 2 layers61 × 61 mmCo2-sensor, the printed circuit board in 3D

    Co2-sensor

    blinry/co2-canary

    An open-hardware, ultra-low power CO2 sensor

    57 parts78
  • 4 layers58.4 × 22.9 mmQuickfeather board, the printed circuit board in 3D

    Quickfeather board

    QuickLogic-Corp/quick-feather-dev-board

    100% open source dev kit for EOS S3 MCU+eFPGA SoC supported by fully open source SDK and FPGA Toolchain

    101 parts66CC-BY-SA-4.0
  • 2 layers40.2 × 19.6 mmCompact, the printed circuit board in 3D

    Compact

    jgillick/ThunderPack

    A self-contained microcontroller, battery, and power management system that fits in your pocket.

    59 parts44MIT
  • 4 layers100 × 100 mmV25Panel, the printed circuit board in 3D

    V25Panel

    maholli/SAM32

    Feather-sized SAMD51 with M4 core serving as UART bridge to WROOM ESP32

    211 parts43
  • 2 layers51 × 23.1 mmFeather rak3172, the printed circuit board in 3D

    Feather rak3172

    teapotlaboratories/feather-rak3172

    Teapotlabs Feather RAK3172: Low-cost Low-power LoRaWAN Development Board

    53 parts43MIT
  • 2 layers108 × 95.3 mmBlue Wizard, the printed circuit board in 3D

    Blue Wizard

    wizarddata/Blue-Wizard-Mod

    Bluetooth Controller for the Kinesis Advantage line of keyboards using the BlueMicro firmware

    47 parts38