EVident Battery: EVB-01 Pro firmware
EVident Battery, Associate Engineering Manager
The Pro runs on EVB-01's board with its own ESP-IDF firmware. I led the program that took it to production, and designed the test bench and AI workflow behind it.
The problem
EVB-01 Pro is a vibration sensor on the same board I designed for EVB-01, with its own firmware (product page). It records both of its IMU’s sensors at up to 6,666 Hz with no gaps, and serves a browser app with live waveforms and FFT, with nothing to install.
The firmware runs on ESP-IDF, Espressif’s own framework: Arduino is for prototyping, and ESP-IDF reaches the whole chip. A teammate built its core runtime in early 2026. From October 2026 I led the program that took it to production, released in November 2026.
What I did
I led the firmware, in C++20 on ESP-IDF and FreeRTOS. Both sensors at 6,666 Hz now run on a register-level I2C driver and an interrupt-driven FIFO drain. I led the rebuild of the web app, and designed its stream decoder, which runs in a Web Worker off the page’s main thread.
The firmware’s design, and how each fix was found and measured, are not on this page. I can walk through them in an interview.
Explore the app and the tests
Two layers: the web app and the tests. Click a block to see what it does and what I changed. The Web app layer is a working sample of the app the sensor serves, with made-up data. The board is EVB-01’s, on that page.
Loading the sample app.
Use the sample app: each card you use opens what it does.
The web app
The sensor serves this app from its own flash. This is a working sample of its layout as shipped in November 2026, with made-up data; use it, and this panel explains the part you touched.
In this layer
- Capture Stream or record, timed or until stopped, and on the sensor whether a full store stops or loops.
- Capture parameters Sample rate, range and filter for the accelerometer and the gyroscope. They go to the sensor when you press Start.
- Start and Stop Starts or stops a stream or a recording. If a recording is already on the sensor, the app asks once: download it first, replace it, or cancel.
- Waveform The accelerometer and the gyroscope on their own charts, live or from a stored capture.
- FFT and Spectrogram The spectrum of a capture, and how it changes over time.
- Data Storage Every capture, from the sensor or kept in this browser, with a filter and a storage card.
- Export One dialog for every capture: CSV or a compact binary, with the expected size shown before you start.
Testing
Every change showed a failing test first and then proved itself on real boards. I designed this setup in early October 2026, before the first firmware change.
In this layer
- Baseline Before any change, the Pro's starting point was measured on the bench.
- Failing test first A fix gets in only with a test that fails on the old code and passes on the new.
- Host suites The firmware's core compiled for a PC and run against fakes of FreeRTOS, the network stack and the NOR flash.
- Test picker Maps the files a change touches to the tests that cover them, in tiers from quick checks to bench boards.
- Bench boards Sensors on USB across three machines, some on shakers and one on a power profiler, each leased to one agent or person at a time.
- Soak runs A harness I designed that runs for hours or days, picks its own cases, resets a sensor that stops responding, and keeps every result as evidence.
- Web app checks Lint, type checks, import-layer rules, accessibility, an offline check and a first-paint budget, on every change to the web app.
- UI driver Drives the web app in a headless browser, the way a person would.
Capture settings
Stream or record, timed or until stopped, and on the sensor whether a full store stops or loops.
What I did
In the rebuild I designed the rail as two sections, Capture and Capture parameters, with Start pinned at its foot, and the choice to stop or loop when the sensor's storage is full.
One card per sensor
Sample rate, range and filter for the accelerometer and the gyroscope. They go to the sensor when you press Start.
Both at full rate
Both sensors can run at 6,666 Hz at once.
Start, Stop, and no erase step
Starts or stops a stream or a recording. If a recording is already on the sensor, the app asks once: download it first, replace it, or cancel.
What I did
I designed that one question in place of separate erase controls.
The live waveform
The accelerometer and the gyroscope on their own charts, live or from a stored capture.
What I did
I designed how it draws: a playout clock, each pixel column's minimum and maximum (as this sample draws them), and each sensor on its own sample times.
Spectrum views
The spectrum of a capture, and how it changes over time.
Who built them
A teammate built these views in mid-2026.
What changed
In the rebuild they became cards like the rest, each with its own toolbar, and the FFT gained a note on what lost samples do to a spectrum.
Data Storage
Every capture, from the sensor or kept in this browser, with a filter and a storage card.
In the browser
Captures are kept in 10-minute segments up to a limit you set, 4 GB by default, and the oldest go first, with a warning.
What I did
In the rebuild I designed the filter and the storage card. A teammate built the first browser cache.
One Export dialog
One dialog for every capture: CSV or a compact binary, with the expected size shown before you start.
What I did
I designed the single dialog in the rebuild. A recording comes off the sensor as compact binary and is decoded in the browser.
Measure first
Before any change, the Pro's starting point was measured on the bench.
First
Before any change, the Pro's starting point was measured on the bench, and firmware changes waited until the test tools were in place.
A failing test first
A fix gets in only with a test that fails on the old code and passes on the new.
The rule
The test is committed before the fix and shown failing. Then the exact repro runs 3 times on the final image, 5 if the fault was intermittent, plus one 10-minute soak per session.
Root cause, no bandages
No deeper queue or longer timeout goes in without a measurement that shows why.
Host suites
The firmware's core compiled for a PC and run against fakes of FreeRTOS, the network stack and the NOR flash.
How
The FreeRTOS fake runs tasks as threads, a fake scheduler delay mimics a loaded machine, and every wait is bounded, never a fixed sleep. A sanitizer build catches memory errors.
Test picker
Maps the files a change touches to the tests that cover them, in tiers from quick checks to bench boards.
Tiers
Schema and type checks first, then host suites, firmware builds, scripts on leased boards, and end-to-end runs of the web app.
Verdict
Its last line is exactly TESTS PASS, TESTS FAIL or TESTS INCOMPLETE, and incomplete counts as a fail. Agents and people read that line, never an exit code.
Bench boards and shakers
Sensors on USB across three machines, some on shakers and one on a power profiler, each leased to one agent or person at a time.
Shakers
A signal generator drives one shaker at a fixed 3 kHz, and a motor drives the other at set speeds. Every board hears the same tone, so each board's sample clock is checked against the drive and against the other boards.
Budgets
Every bench command has a time budget and prints OVER BUDGET when it runs past it. One command flashes and checks every free board in parallel.
Soak runs
A harness I designed that runs for hours or days, picks its own cases, resets a sensor that stops responding, and keeps every result as evidence.
The rule
A reply of 200 OK means queued, not applied, so every command waits for the event that confirms it.
Stress mode
After every case it checks each board for an unexpected reboot, its memory floor and its drop counters, and ends with one verdict line.
Web app checks
Lint, type checks, import-layer rules, accessibility, an offline check and a first-paint budget, on every change to the web app.
Layers
Seven import layers, from foundation to app, and a dependency checker fails any import that goes the wrong way.
UI driver
Drives the web app in a headless browser, the way a person would.
Why
It runs the same steps a customer would, on real sensors, so a change to the app is checked end to end.
Capture
Capture parameters
Sends at Start.
How I used AI
I have used Claude Code since early 2026, and from October 2026 I ran the Pro as a structured multi-agent workflow. I set the scope, the targets and the contracts, and agents wrote much of the code to briefs of 1.5 KB or less. A change merged only when a test that failed on the old code passed, and real boards agreed.
Who does what
Blocks: Me, the owner (scope, behavior, contracts; every merge); Orchestrator (checks each round's evidence; writes the next briefs); Implementers (one git worktree each; briefs of 1.5 KB or less); Failing test (fails on the old code, passes on the new); Bench runner (proves on leased boards; never edits); Reviewer (read only; REVIEW PASS or FAIL).
- Me, the owner to Orchestrator: scope.
- Orchestrator to Implementers: brief.
- Implementers to Failing test: code.
- Failing test to Bench runner: image.
- Bench runner to Reviewer: verdict.
- Reviewer to Me, the owner: verdict.
The guards
| Guard | What it does |
|---|---|
| Safety hooks | Block irreversible device operations, raw flash writes and direct edits of the build configuration, and ask before any commit to the main branch. |
| Time budgets | Every command has one, and prints OVER BUDGET when it runs past it. |
| Handoffs | A session near its context limit writes its progress and the next session’s prompt. |
| Lookup agent | A cheap agent finds things, and answers ESCALATE rather than guess. |
The bench
The bench spans three machines: my laptop and two build hosts. Each build host compiles firmware and runs the host suites in parallel slots, and each has sensors on USB. I designed the bench tools from 6 October 2026: a lease coordinator hands out boards, build slots, Wi-Fi adapters, the shakers and the power profiler, so several agents and I could test at once.
Three machines, one lease coordinator
Blocks: My laptop (agent sessions; sensors on USB); Lease coordinator (boards, build slots, Wi-Fi adapters, shakers, power profiler); Build host 2 (builds and host suites; sensors on USB); Build host 1 (builds and host suites; the shaker and power benches); Shaker bench (sensors on shakers); Power profiler (one sensor).
- My laptop to Lease coordinator: lease.
- Lease coordinator to Build host 1.
- Lease coordinator to Build host 2.
- Build host 1 to Shaker bench.
- Build host 1 to Power profiler.
Four sensors sit on two shakers: one driven by a signal generator at a fixed 3 kHz, the other by a motor at set speeds. Every board hears the same tone, so one run checks each board’s sample clock against the drive and against the other boards.
The long tests are soak runs. The harness I designed runs for hours or days, picks its own cases, waits for each command’s confirming event instead of sleeping, and resets a sensor that stops responding. Every result is kept as evidence that I or an agent read afterwards.
The loop
One change, from target to merge
Blocks: Set the target (a number the change must hit, on real boards); Brief and code (an agent writes it in its own worktree, to a short brief); Prove it on the bench (a test that fails on the old code, then leased boards); Accept or send back (merged only when the boards agree).
- Set the target to Brief and code: brief.
- Brief and code to Prove it on the bench: build.
- Prove it on the bench to Accept or send back: numbers.
- Accept or send back to Set the target: misses (dashed).
Results
- Both sensors at 6,666 Hz stream for 30 minutes with no lost sample.
- A recording at full rate fills all 16 MB of flash with no gaps.
- The host suites run the firmware’s core on a PC, against fakes of FreeRTOS, the network stack and the flash.
- It shipped in the production release of November 2026, with the rebuilt web app.
Credit
A teammate built the core runtime; I led the work that brought it to production, directing AI agents for much of the code. Another teammate built the web app’s first FFT, spectrogram, WAV export, measure tool and browser cache, and the time-sync feature. The board is the one I designed for EVB-01.