Skip to content

About

Open-source OBD2 logger and dashboard for the ESP32-S3, with TinyML on the chip. Bluetooth LE ELM327 adapters, SD card, desktop app. No phone, no cloud.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

124 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCarMind EdgeOS 2.0.0, new for the ESP-Mosaico: it decides what runs, when and how fast. A small operating-system layer for the ESP-Mosaico board. 2 models on one chip: CarMind R.E.V and E.V, switch in Settings, each admitted against its deadline. Measured on the board: boot health check rated good at 68 s, lowest free internal RAM 81 KB in any phase against a 60 KB target, model response 4.2 ms against a 1,000 ms deadline, 16 touch apps, a 128 MB NAND for the drive logs. On the board: boot health check, Wi-Fi held until healthy, internal RAM above 60 KB in every phase, battery protection. Firmware: Wi-Fi joined on the screen and used only for the clock, light and dark themes, the desktop app over USB, an alarm banner you clear with a tap or swipe, the graphics accelerator (PPA) on. Next: Active E.V, a model that learns more of your car, is in the works for the ESP-Mosaico.

New: OpenCarMind EdgeOS 2.1.0 for the ESP-Mosaico, with a Health app. Banner photo: Espressif Systems, CC BY-SA 4.0, so this banner image is shared under CC BY-SA 4.0 too. Screen: captured on the board.

CI OpenSSF Scorecard License: MIT ESP-IDF v6.1 ESP32-S3 and ESP32-S31

OpenCarMind is an open-source OBD2 logger and dashboard for the ESP32. It turns an ESP32 board and a Bluetooth OBD-II adapter into a car data logger that runs neural networks on the chip. It needs no phone, no account and no internet connection. Everything it records goes to the board's own storage (an SD card on the ESP32-S3 board, the 128 MB NAND on the ESP-Mosaico) and, if you pair the board, to the desktop app on your own computer.

It ships two on-board models, and you choose between them in the desktop app. CarMind E.V is fixed and tested. CarMind R.E.V is my first model that keeps learning in your car: the board itself updates part of the model from what your car reports while you drive, with no computer or cloud in the loop.

Licence: MIT. Website: https://alveeerahman.github.io/OpenCarMind/. Documentation: https://buildforpeople.dev/docs/opencarmind/ (also on GitHub Pages). Two release lines, both built from this main:

  • ESP32-S3 board: OpenCarMind 2.5.1. The firmware and the desktop app for Windows, macOS and Linux are on the latest release. A beta, 2.5.1b, has the S3 firmware with every change on main since 2.5.1. It is a pre-release, not yet checked on an S3 board as a whole.
  • ESP-Mosaico (ESP32-S31, early-access board): OpenCarMind EdgeOS 2.1.0. The board image is on the EdgeOS 2.1.0 release. Do not flash it on an S3.

The same firmware also runs on Espressif's ESP-Mosaico touch-screen board. Its newest version, OpenCarMind EdgeOS 2.1.0, adds a small operating-system layer (a boot health check, refusals of risky changes while you drive, model admission by response-time analysis and battery protection) and, new in 2.1.0, AI services for the battery and the radios with a Health app to show them. User manuals for both boards are in docs/manual.

Stats for nerds (the model and the EdgeOS scheduler)

The model on the chip is a pruned, knowledge-distilled multi-task 1D CNN that adapts its read-out on the device. The newest firmware, OpenCarMind EdgeOS 2.1.0, is an AI-first operating system for the chip. It runs on FreeRTOS's preemptive scheduler and treats every model as a soft real-time job with a deadline. A model is admitted only when every deadline on its core still holds. When deadlines slip, the board steps down in a fixed order (in EdgeOS 2.1.0 the AI services first, then the screen rate, learning and the model) so the drive log keeps running. Version 2.1.0 adds AI services that estimate the battery's charge and health, check it for faults and guard Bluetooth and Wi-Fi. It also adds a Health app that tells you in plain words what is wrong and what to do.

Contents

  1. Choose your model
  2. What you get
  3. Things people ask
  4. Local-first
  5. How it works
    1. On-board inference
    2. Scheduler and safety
  6. The screens
  7. Dashboard
  8. Desktop app
  9. Hardware
    1. Adapter compatibility
  10. Build and flash
  11. User manuals
  12. The models
    1. The test drives
    2. CarMind R.E.V results so far
    3. How the models are made
    4. What R.E.V learns
    5. How R.E.V learns on the board
    6. Looking inside R.E.V with explainable AI
    7. How R.E.V got better, step by step
    8. Edge learning: R.E.V picks what to learn
  13. In the works
  14. Status
  15. OpenCarMind EdgeOS 2.1.0 (ESP-Mosaico)
    1. What it is
    2. The parts and why each exists
    3. Services and runlevels
    4. Model admission by response-time analysis
    5. Scheduler budgets per core
    6. AI services in OpenCarMind EdgeOS
    7. Internal RAM at run time
    8. What you see on the board
    9. Changes after the board check
    10. Pairing safety (built, not yet checked on the board)
    11. Flash it, or go back to mossREV 1.2.0
    12. Prepared but off: A/B rollback and the battery as a UPS
    13. What is verified on the board
  16. Limitations and future work
  17. Planned
  18. References
  19. Repository layout
  20. Credits and licence

Choose your model

R.E.V suits older cars, roughly pre-2020, that have no fuel-rate PID and can lose the airflow (MAF) reading. E.V suits you if you want a fixed, tested model.

Stats for nerds (size, speed and what each model learns)
CarMind E.V CarMind R.E.V
Status released in 2.4.0, the default in the 2.5.1 release new in 2.5.0, improved in 2.5.1, the default on a new board with the firmware from main
Size on the chip about 89 KB about 66 KB
Parameters 38,679 19,815
Time per run on the ESP32-S3 about 3.5 ms in the car, 2.9 ms on the bench about 2.9 ms in the car (median), 2.2 ms on the bench
Learns in your car the model is fixed. The tank size and fill-up calibration learn with either model its fuel estimate and an airflow constant that also gives the engine size, so its torque estimate learns your engine too. Plus the tank size and fill-up calibration, like E.V
Steady cruising with your foot on the gas can be shown as braking corrected in 2.5.1
Fill-up calibration yes yes
Best for a fixed, tested model older cars, roughly pre-2020, that have no fuel-rate PID and can lose the airflow (MAF) reading
On the ESP-Mosaico (OpenCarMind EdgeOS 2.1.0, as in 2.0.0 and mossREV 1.2.0) included, switch in Settings > MODEL included, the default on a new board

Animated, from CarMind E.V to CarMind R.E.V in seven steps: E.V with 38,679 parameters, 89 KB and 3.5 ms per run. Structured pruning removes whole channels, down to 19,815 parameters. Knowledge distillation, E.V teaching R.E.V. Quantised for the chip: 66 KB and 2.9 ms. Learns in your car: fuel R2 from 0.709 to 0.867 on 31 unseen cars with the airflow hidden. Explainable AI fix: cruising called right on my drives from 10.7 to 87.5 percent. Shrugs off bad data: with 1 percent bad labels fuel R2 stays 0.867, where 2.5.0 fell to 0.696

From E.V to R.E.V in seven steps, each with the number it moved. How each was measured is in the detailed README.

Many older cars do not report their fuel rate, so the board works it out from the airflow sensor. When that reading is missing, a fixed model can only offer its factory estimate. R.E.V learns your car while a fuel-rate or airflow reading is there and uses what it learned when it is not.

To switch, connect the board to the desktop app with its USB cable while the car is parked, open the Board page and pick the model under "On-board model". The board keeps the choice after a restart, and what R.E.V learned stays on the SD card while E.V runs. More in What R.E.V learns.

Renders of what changes with R.E.V. Board page 5 with CarMind E.V and with CarMind R.E.V, which adds a Learning job. The desktop app's On-board model panel on the Board page and the CarMind R.E.V learning panel on the Fuel page

Renders, not photos, with example values. Left: page 5 with E.V. Middle: page 5 with R.E.V, which adds a third job, "Learning". Right: the model selector on the app's Board page and R.E.V's learning status on its Fuel page.

What you get

  • Every standard Mode 01 field the car reports (70 are decoded), battery voltage, the VIN, and stored, pending and permanent trouble codes. One CSV row per poll cycle.
  • A small neural network on the chip. It classifies the last 5 seconds of driving as stopped, braking, accelerating or cruising, and estimates three values the OBD port does not report: brake pressure, flywheel torque and fuel rate.
  • A save to the SD card every 10 seconds and a power-off line on page 3: green "Safe to turn off" once everything is on the card, red with the reason otherwise. The drive ends by itself 15 seconds after the engine computer stops answering.
  • Fuel economy in km/L, or mpg in the US and the UK, from the best source your car has. A car that gives nothing shows "--", never a made-up number.
  • Units that follow you. The first time the board joins Wi-Fi it reads the country of the access point and switches to miles and mpg in the US or the UK.
  • Fill-up calibration. Enter fill-ups in the desktop app, and the board corrects its fuel figures from what you actually pumped.
  • A fault engine that ranks trouble codes by severity and groups codes that share a cause.
  • Dark and light screen themes, by time of day or fixed.
  • A soft real-time scheduler that times every job against its deadline and restarts the board if a step hangs.
  • Optional Wi-Fi, for the clock only: one HTTPS request to one time server you can choose.
  • On the ESP-Mosaico, a Health app (OpenCarMind EdgeOS 2.1.0): the battery's charge and health, a battery fault check and a guard for Bluetooth and Wi-Fi, each explained in plain words with what to do.
  • A desktop app for Windows, macOS and Linux that imports drives, charts them, shows fuel per drive, switches the model and takes your fill-ups.

Things people ask

"Bro, just get Apple CarPlay."

CarPlay mirrors your phone. OpenCarMind reads the car itself over OBD-II, runs its models on the chip and logs every drive to the board's own storage. It needs no phone, no account and no internet connection, so your phone is free to do phone things.

"A neural network on an ESP32? Cute."

Cute, and quantised. R.E.V has 19,815 parameters, takes about 66 KB on the chip and runs in about 2.9 ms in the car (median). E.V is the bigger one, about 89 KB and about 3.5 ms. Whichever you pick runs in its own task, so logging never waits for it.

"So where does my driving data go?"

Onto a card you hold. Drives are plain CSV, JSON and text on the SD card (the 128 MB NAND on the ESP-Mosaico), plus the desktop app on your own computer if you pair the board. Wi-Fi is optional and only asks one HTTPS time server for the time. It sends nothing else and listens on no port.

"Will this work with my cheap Bluetooth adapter?"

If it speaks ELM327 over Bluetooth LE, it should. Only the LELink has been driven with this board, and the rest of the adapter table comes from vendor documents and other open-source OBD projects. Classic Bluetooth adapters will not, because the S3 has no classic radio. For a cheap ELM327 clone, buy one whose listing says Bluetooth LE for iOS.

"What does the AI actually do, though?"

With every OBD row it looks at the last 5 seconds and says whether you are stopped, braking, accelerating or cruising. It also estimates three values the OBD port does not report: brake pressure, flywheel torque and fuel rate. R.E.V goes further and refits its fuel read-out from your car's own readings, and a refit goes live only if it beats the current one.

Local-first

Local-first: no account, no cloud, AI on the chip, your SD card, optional Wi-Fi, your choice of dashboard

Most car loggers stream your driving to a server and do the thinking there. OpenCarMind does the thinking on the board, the way TinyML work runs networks on microcontrollers[1]–[3]. R.E.V's learning also happens on the board, and what it learns stays on your SD card. Your data is plain CSV, JSON and text on a card you hold.

Wi-Fi is optional and does one thing. While the car is parked on a known network, the board asks one HTTPS time server for the time. It checks the server's certificate, sends nothing else, and listens on no port. You can compile Wi-Fi out with OCM_WIFI_CLOCK_SYNC. On the ESP-Mosaico you can also search for a network and join it from the touch screen, for the same clock sync.

How it works

How it works: the engine computer answers OBD-II requests through a Bluetooth LE adapter, the ESP32-S3 board reads the car, runs the AI model and saves each drive to the SD card, and the desktop app imports drives

The board asks the engine computer for every field it supports, shows the live values on its screen and writes each drive to the SD card as its own session. At home, the desktop app imports new drives over the USB cable, or you take the card out.

On-board inference

On-board inference: an OBD row arrives, the last 5 s are binned, the model task runs E.V or R.E.V, and the answer goes to the .ml.csv file, the screen and, for R.E.V, its learner. The OBD task never waits

When an OBD row arrives, the board cuts the last 5 seconds into five one-second bins and runs the model in its own task, so logging never waits for it. Every row adds a line to the drive's .ml.csv file, and the newest answer shows on page 5. With R.E.V, the same run also feeds its learner.

Scheduler and safety

Scheduler and safety: the OBD poll, the model and R.E.V learning are timed on every run and checked once a minute. A hung step makes the watchdog restart the board, and three bad restarts in a row start safe mode with logging still on

Every periodic job has a period and a deadline. The scheduler in main/sched_mon.c times each run and, once a minute, checks the load against the rate-monotonic bound[4] and each job's worst-case response time[5]. A step that never returns resets the board, and after three bad restarts in a row it starts in safe mode with logging still on. R.E.V's learning runs at the lowest priority on a small budget of about 2 % of one core, so it never holds up the OBD poll or the model.

The screens

Made for LCD, Feels like AMOLED: true black on a backlit screen

Page 1: dashboard Page 3: internals and recent events, including Safe to turn off Page 4: faults Page 5: system, jobs and AI

Page 1 in the light theme: dashboard Page 3 in the light theme: internals and recent events Page 4 in the light theme: faults Page 5 in the light theme: system

Pages 1, 3, 4 and 5 in the dark and light themes (renders, not photos). Page 2 is plain text and has its own picture at docs/images/details.png.

The dark theme is pure black, because on an LCD any tint in the background glows through the backlight. Text and colours are bright enough to read at a glance, and every status colour comes with a word.

Tap BOOT to change page. Hold it for 2 seconds to power off. The screen says "Turning off" while it saves and closes the drive, then "Off, safe to unplug", and the backlight and LED go dark. Hold it for 8 seconds to forget the saved adapter.

  1. Dashboard: RPM, speed, engine temperature, battery, fuel economy and fuel level, with a CPU bar and an estimated power bar.
  2. Details: adapter, VIN, protocol, trouble codes, clock, SD state and fuel used.
  3. Internals: twelve extra fields, up to eight custom PIDs, and recent events, including "Safe to turn off".
  4. Faults: ranked trouble codes with severity, description and likely cause, plus the connection and MIL status line.
  5. System: instructions per second on each core (hardware counters), PSRAM in use, chip temperature, uptime, the jobs and their deadlines, what the model sees and its three estimates.

The screen is light from 06:00 to 17:00 and dark otherwise. theme_mode, the hours and the time zone are set in config.json (see docs/CONFIGURATION.md).

Dashboard

tools/ocm_report.py turns a session folder from the SD card into one HTML report per drive, and Dashy shows them on your own computer or home server. Nothing is sent to the internet.

python3 tools/ocm_report.py /Volumes/<card name>/obd dashboard/site
cd dashboard && docker compose up -d      # Dashy on http://localhost:4000

Desktop app

Clock over Wi-Fi: parked on a known network, the board sends one HTTPS request to one time server, checks its certificate and reads the time. No upload, no open port

The app in desktop/ runs on Windows, macOS and Linux. Over the board's USB cable it pairs with the board (you type a code from the board's screen once), sets Wi-Fi, time zone, time server and settings, imports drives and flashes new firmware, so the SD card never has to come out. It also switches the on-board model and keeps your fill-up log. docs/DASHBOARD.md has the setup.

Hardware

  • Board: Waveshare ESP32-S3-LCD-1.47B (the pin map in main/board.h matches it).
  • Or the Espressif ESP-Mosaico V1.2 (ESP32-S31) with the OpenCarMind EdgeOS 2.0.0 build (called mossREV up to 1.2.0). It needs no SD card: see docs/MOSAICO.md.
  • Adapter: a Bluetooth LE adapter that speaks ELM327 commands (see below). Classic Bluetooth adapters will not work, because the S3 has no classic radio.
  • A FAT-formatted SD card.

Adapter compatibility

Only the LELink has been driven with this board. Many others are expected to work, and Classic-only adapters will not.

Stats for nerds (every adapter checked, with profiles and Amazon links)

The other rows come from vendor documents and other open-source OBD projects. docs/ADAPTERS.md has prices and sources. The Amazon links are plain product pages with no affiliate tag, all opened on 3 November 2026.

Adapter Bluetooth Built-in profile Status Amazon
LELink², LELink LE FFE0 / FFE1 tested B0755N61PW, B00QJRYMFC
Veepeak OBDCheck BLE+, BLE LE FFF0 / FFF1 / FFF2 expected B076XVQMVS, B073XKQQQW
OBDLink CX (sold as the Bimmercode edition, which is the only CX model) LE 5.1, encrypted FFF0 / FFF1 / FFF2, pairs on demand expected B08NFLL3NT
Carista OBD2, Carista EVO LE FFF0 / FFF1 / FFF2 expected B00YVHGTBM, B0CM9W4MCW
Vgate iCar Pro BLE 4.0 LE 18F0 / 2AF0 / 2AF1 expected B06XGB4873
Vgate vLinker MC+ LE and Classic E7810A71 / BEF8D6C9 expected B088LW211V
Vgate vLinker FS, MS LE and Classic E7810A71 / BEF8D6C9 switch to "BLE+BT" in the VgateFwUpdater app first B0BZTXV6MZ, B0D6YQX4R8
Panlong OBD2 Scanner (PL-B04) LE, works with Car Scanner on iOS generic fallback expected for the "For iOS Android" option only. The "For Android Only" option is likely Classic. The page title does not name the model B0C1GDJ9ZJ
DA200 (Bluetooth 5.4, "AI Repair Tips") LE, PIC18F25K80 ELM327-type chip (maker's spec sheet) generic fallback expected. The page title does not name the model, check for DA200 on the box B0FH2GJTP8
ELM327 BLE clones (for example RODEDIO) LE on iOS FFF0 or FFE0 expected for most. Buy one whose listing says Bluetooth LE for iOS B0GWQKLTMR
Adapters running the Deep OBD firmware LE FFE0 / FFE1 / FFE2 expected not sold on Amazon. Layout from the Deep OBD source, BtLeGattSppAndroid.cs
FIXD Bluetooth unknown unverified B013RIQMEO
BlueDriver Bluetooth private protocol not expected B00652G4TS
V800 full-system scanners (Panlong PL-V800 and white-label copies) Bluetooth private app (INNOOBD+) not expected. The title says "Engine Transmission ABS SRS", not V800 B0GQ3D57PK
OBDLink MX+, OBDLink LX, KONNWEI KW902 Classic only (LX: Bluetooth 3.0, KW902: Android and Windows only) none will not work. The KW902 listing showed "currently unavailable" on 3 Nov 2026 B07JFRFJG6, B00H9S71LW, B073F57QT3

Build and flash

You need ESP-IDF v6.1 and Python 3.

. $IDF_PATH/export.sh
idf.py set-target esp32s3
idf.py build
idf.py -p /dev/cu.usbmodemXXXX flash monitor

For the ESP-Mosaico, build with idf.py --preview set-target esp32s31 and flash as docs/MOSAICO.md describes (no buttons, esptool 5.6.0 or later).

The first build downloads ESP-DL, LVGL, led_strip and cJSON through the IDF component manager. If you built an earlier version in the same folder, delete sdkconfig first. If the board stays in download mode after flashing, reset it with python -m esptool --chip esp32s3 -p <port> --after watchdog-reset chip-id.

On first boot the board connects to the strongest nearby adapter that looks like an OBD adapter and remembers it. If yours is not found, add its name to OBD_BLE_NAME_PREFIXES in idf.py menuconfig under OBD Logger Configuration. Settings, SD card files, the Wi-Fi list and the CSV columns are in docs/CONFIGURATION.md.

Stats for nerds (the pairing prompt coming to the S3)

A later S3 release will ask first. It will offer a new adapter only at -70 dBm or better and save it only when you tap BOOT within 5 s. It is in this source but off for the S3 by default (CONFIG_OBD_BLE_PAIR_CONFIRM). To try it, add CONFIG_OBD_BLE_PAIR_CONFIRM=y to sdkconfig.defaults.esp32s3 and delete sdkconfig before you build. It is host-checked, not yet tested on a board.

User manuals

User manuals for drivers and test users, each as Markdown here and as pages in the documentation, one page per chapter:

The Markdown files are the source. Sphinx builds the documentation site in docs-src from them, so the web pages and the Markdown cannot drift. The old manual addresses, manual/esp32-s3.html and manual/edgeos-2.0.0.html, now open the new pages.

The models

Animated, CarMind E.V in four steps: five seconds of driving from 10 OBD signals cut into one-second bins, one shared trunk of 1-D convolutions, two heads (a manoeuvre class of stopped, braking, accelerating or cruising, and estimates of brake pressure, torque and fuel rate), and the answer for every OBD row on the road

Both models are small quantised 1-D convolutional networks run by ESP-DL[6]: 8-bit weights and 16-bit activations, which makes them small and fast enough for a microcontroller. With every OBD row the selected model classifies the last 5 seconds and estimates brake pressure, flywheel torque and fuel rate. They were trained on public data, the HCRL Driving Dataset[7] and the Vehicle Energy Dataset[8], plus drives from my own car. Scores on held-out drives and unseen cars are in the detailed README.

The model card puts every step from E.V to the final R.E.V in one table: size, speed, classifier and fuel-learner scores, before and after, with a key to each metric and where it was measured.

The test drives

Two additional drives are a held-out test set. They cover frequent stops, an extended idle, steady cruising with and without cruise control, and hard acceleration and braking. No model on main saw these drives during training or tuning. They are scored as data from an unseen vehicle: no per-vehicle settings carry over, and every learner starts from its factory state.

Two held-out test drives: speed, throttle, accelerator pedal and engine rpm over time, with bands for stops, an extended stop, steady holds and holds with the pedal released

Method and a comparison with routine driving: docs/TEST_DRIVES.md.

CarMind R.E.V results so far

CarMind model leaders: the models on main, tested on two drives they never saw, scored as an unknown car. R.E.V: 94.5 percent of windows right, cruising 88.9, braking 98.4, accelerating 87.7, stopped 99.4, earlier held-out drives 95.1, KIA test 87.1, fuel R squared 0.867 learned on 31 cars. R.E.V (old): 71.8 percent, cruising 7.9. E.V: 73.5 percent, cruising 14.6, does not learn

R.E.V's learners have been tested in replay on recorded drives from public test cars, through the firmware's own code with faulty readings mixed in, and on two drives in my car. On cars it never saw, learning in the car made its fuel estimate clearly better than the factory one when the airflow reading was missing. The tables are in the detailed README.

Stats for nerds (on-board benchmark and fuel-learner leaderboard)

On-board benchmark on two unseen test drives, 1,119 labelled windows, every number measured on the ESP32-S3. Accuracy, average recall over the four classes, macro-F1 and ROC-AUC: CarMind R.E.V 93.8 percent accuracy, 92.9 average recall, macro-F1 0.917, ROC-AUC 0.995. MLP 81.0. TCN 80.2. CarMind E.V 73.5. CarMind R.E.V (old) 71.8. GRU 40.7

Fuel learner leaderboard on 31 unseen VED cars with the airflow hidden, ranked by R squared with 1 percent bad labels: Huber RLS (R.E.V) 0.867, ANIL 0.774, no learning 0.709, Plain RLS (R.E.V old) 0.696, Meta-SGD 0.151

How the models are made

How the models are made: drive data trains E.V with quantisation-aware training. R.E.V starts from E.V's design, is compressed by structured pruning to about half the parameters, fine-tuned with knowledge distillation with E.V as the teacher, quantised to int8 weights and tested on unseen cars

E.V is trained so that the version on the chip scores like the one on a computer. R.E.V starts from E.V's design, is pruned to about half the parameters, and learns from E.V as its teacher on a wider set of public drives. The training code and data stay in a private repository. The shipped files are in ml/onboard and ml/onboard/rev, and docs/MODEL.md lists their inputs and outputs.

What R.E.V learns

How CarMind R.E.V keeps learning in the car. The frozen network gives 64 features. Manoeuvre class and brake pressure are fixed, engine torque is a physics estimate sized from the airflow constant, and the fuel rate's read-out is refit on the board and goes live only if it is better on held-back rows. An airflow constant is learned from load and rpm, fill-ups give one calibration factor, and the tank size is learned from the fuel level

The network itself never changes in the car, which protects it from forgetting what it learned in training[9]. Small parts on top of it learn, each only from something the car gives it to check against.

Stats for nerds (what each output learns from)
Output In the car Learns from
Fuel rate learns the car's own fuel rate, or fuel worked out from the airflow sensor
Airflow constant (also the engine size) learns airflow, engine load and rpm while the airflow sensor works
Fill-up calibration, both models learns the litres you pump, entered in the app
Fuel tank size, both models learns the fuel used against the drop in the fuel level
Engine torque learns, through the engine size the energy in the fuel minus friction, using the engine size R.E.V learns. Planned: a learned torque read-out on cars that report torque (see Limitations)
Manoeuvre class fixed nothing yet: the car gives no label for it
Brake pressure fixed nothing: no car reports it

How R.E.V learns on the board

Animated, R.E.V's fuel learner in five steps: the network stays frozen and only the 65-weight fuel read-out learns, every label passes a gate that drops implausible ones, unusual labels count less and old drives fade, a refit every 30 windows goes live only if it wins on the last 150, and the learned estimate follows the true fuel rate better than the factory one

The last layer, which turns the network's features into a fuel rate, is refit from your car's own readings. A refit goes live only if it beats the current one on recent driving. If learning ever makes things worse, the board goes back to the factory version.

Stats for nerds (bad readings, fallbacks and saving)

Since 2.5.1 the learner ignores implausible readings and gives less weight to unusual ones[10], so a faulty sensor cannot spoil what it learned. When the car reports neither fuel rate nor airflow, the board uses whichever estimate has been most accurate on your car so far and shows it in amber. What R.E.V learned is saved to the SD card while you drive.

Looking inside R.E.V with explainable AI

On R.E.V's first drives in my car, the screen said "braking" while I held a steady speed with my foot on the gas. E.V does the same. I looked inside R.E.V with explainable-AI methods, Grad-CAM[11] and a probe on its internal features, and found that the network's features already told cruising from braking. Only the last layer that picks the class had it wrong. Correcting that one layer fixed it, and everything R.E.V had already learned in the car stayed valid.

R.E.V's 64-value embedding of my drives drawn with PCA, with the first and the corrected classifier head side by side. Accelerating, braking and foot-on-gas cruising sit in their own regions. The first head gets most of the cruising region wrong, and the corrected head gets few windows wrong

Each dot is a 5-second window of my driving, placed by what the network sees. The points are the same on both sides. Only the layer that reads them changed. The Grad-CAM maps and the scores are in the detailed README.

How R.E.V got better, step by step

  1. 2.5.0. R.E.V ships: half of E.V's size, and it learns your car's fuel use, airflow and tank in the car.
  2. First drives. The learners worked, and the classifier called steady cruising "braking".
  3. Explainable AI showed the error was in the classifier's last layer, not in what the network sees.
  4. A corrected last layer fixed it without touching what R.E.V had learned.
  5. Fault tests showed that a few bad sensor readings could stop the fuel learner.
  6. A fuel learner that shrugs off bad readings, checked on public cars and against two published meta-learning methods. It came out ahead, so it ships in 2.5.1.

The numbers for each step are in the detailed README.

Edge learning: R.E.V picks what to learn

Edge learning, in preparation. Every second R.E.V scores a window and the board computes its margin, the gap between the two highest class probabilities, and holds the window in a small buffer. About 5 s later a physics judge gives a verdict or stays undecided. When it decided, the board learns from the window if the margin is under a threshold or the board was wrong, with a ridge refit of the class read-out behind a holdout gate. When it did not decide, the board keeps the lowest-margin windows, at most 40 per drive and 5 s apart, on the SD card for a label sheet. The threshold adjusts itself to a learn budget, and a drift alarm raises the budget

R.E.V's classifier does not learn in the car yet. Edge learning is how I plan to change that, and I am preparing it now. It is active learning that runs on the board itself: the board decides which windows are worth learning from, and which few are worth your time later. Nobody in the car labels anything, and no computer takes part while you drive.

Status: the rules run in simulation only. The board code, the buffer in PSRAM and the drift alarm are not written, and none of this is in the firmware on main.

Stats for nerds (how the four rules work)

The phrase "edge learning" already exists as a broad term for training models on edge devices[15]. Here I use it as the name for one specific method, four rules built for a microcontroller whose teacher is free, late and sometimes silent.

The teacher is a physics judge. About 5 seconds after a window, what the speed, throttle and rpm did next usually shows whether the car was stopped, braking, accelerating or cruising. Sometimes it cannot tell, and the window stays undecided. ESP-DL runs the network but does not train it[6], so the learning happens in the class read-out, refit by least squares in C, the way the fuel read-out learns today.

The four rules:

  1. Score every window by its margin, m = p₁ − p₂, the gap between the two highest class probabilities. A small gap means R.E.V is torn between two answers, most often braking and cruising. Margin is a standard active-learning score[16], and the board already logs the probabilities in every .ml.csv line.
  2. Keep the learn rate on budget with a threshold that moves itself, $\tau \leftarrow \tau + \eta,(b - \mathbf{1}[m &lt; \tau])$. Here b is the share of windows to learn from, η is a small step, and the indicator 1[m < τ] is 1 when a window's margin is under the threshold. If the board learns too often, the indicator is 1 more than b of the time and τ shrinks. If it learns too rarely, τ grows. It settles where a share b of the margins fall below it. This is Robbins–Monro stochastic approximation[17] with a constant step, so τ keeps following the margins as the car or the driving changes. Žliobaitė et al. move an uncertainty threshold after every decision in a similar way for drifting data streams[18], with a multiplicative step and no target rate. The rule stores two numbers.
  3. Learn from a window when its margin is under τ, or when the judge's verdict shows the board was wrong. The update is a ridge refit of the class read-out, with a holdout gate and one saved state per car, like the fuel learner.
  4. Keep undecided windows by margin. These are the only windows where a label costs anything, because a person has to give it. The board will write up to 40 per drive to the SD card, at least 5 s apart because windows overlap, and the desktop tools turn them into a label sheet.
Stats for nerds (the simulation, and three ideas that failed)

To test the rules before writing them for the board, I copied the board's read-out learner into Python and streamed seven drives from a second car, one R.E.V never trained on, in the order they were driven. It started from the shipped R.E.V. Each window was scored first and learned from afterwards, so no window graded a model that had already seen it.

Rule, at a 10 % learn budget Judged windows learned Macro recall over the stream
No learning 0 % 0.857
Learn every judged window (stopped ones 1 in 10, as on the board) 56 % 0.954
Random, 5 seeds 5.8 % 0.935 ± 0.008
Margin only 5.5 % 0.944
Margin or mistake (edge learning) 5.7 % 0.953

Margin or mistake matched learning from every judged window while learning from about a tenth as many, so the board runs the solver about ten times less often. Two cautions. This is one stream of seven drives with one run of each margin rule, so the gap to random is about two standard deviations. That is a good sign but not a settled result. And a read-out adapted to the new car scored lower on other cars' validation windows, KIA from 0.778 to 0.728 and my car from 0.969 to 0.935. One saved state per car is there so that this adaptation never reaches another car's read-out.

Three ideas of mine failed, and each was meant to be the new part:

  • Posterior flip probability. A ridge read-out is a Bayesian linear model, so I computed in closed form the chance that a read-out drawn from its posterior would change the board's answer. At ranking the board's real mistakes it scored an AUROC of 0.874, against 0.942 for plain margin. The mistakes here were systematic, such as a throttle that reads high at idle, not windows the read-out was unsure about.
  • A loss predictor after Yoo and Kweon[19], trained on the board by the judge's late verdicts. AUROC 0.908, still below margin.
  • Learning only from high-loss windows, which are mostly the board's mistakes. At a 5 % budget it reached 0.927 against 0.943 for margin. A learner that sees mostly its own errors gets a skewed sample, the sampling bias Dasgupta describes for active learning[20].

In the works

Three things run on my ESP-Mosaico in test builds. None of them is in a release or on main yet.

  • Active E.V (A.E.V). The next model for the ESP-Mosaico: a student of about 28,000 parameters that learns more of your car than E.V. Its classifier head got a targeted correction for cars it had not seen, and on the board its answers match the desktop simulation on 95 to 97 % of windows.
  • Brake pad wear. The Brakes app estimates how much of the pads is used from the friction energy of your braking, the way pad wear is usually modelled: wear grows with the work the pads do. You tap Record pad change when new pads go on. Each change you record turns the guessed pad life into a measured one for your car and your driving. Until you record a change it is an estimate, and it has not been checked against a real pad measurement yet.
  • A neural health check. One small network of about 25,000 parameters reads the last 64 seconds of the battery gauge, the Bluetooth and Wi-Fi guard's counters and the car's readings together. It is a second opinion next to the EdgeOS 2.1.0 AI services and does not replace them. It never raises a banner or acts, and the Health app's AI page shows it as experimental. Its battery-fault output is not reliable yet, and before a release it still has to pass real drives and a run on battery.
Stats for nerds (how the brake estimate and the health network work)

Brake pad wear. From the car's speed the board works out how hard you slow down, takes away what drag and engine braking do on their own, and adds up the rest while you brake. The app shows the share used, kilometres since the change, hard brakes and an estimate of the kilometres left, with Check soon at 70 % and Replace soon at 90 %.

A neural health check. Every 16 seconds it gives the battery's health, the guard's state and the current manoeuvre, in about 6 ms on the board. Its battery-health output got a targeted correction so that a running guard no longer pulls the reading down. On my board it now reads 93 to 101 % where the board's own estimator says about 98 %, and the guard reads normal with no false alarms. At each start, the board checks the network against the quantised reference on a test input before it uses it.

Status

Checked on the bench or in code: the build, the host unit tests (including R.E.V's learners with faulty readings), the switch to miles and mpg, the 10-second save, "Safe to turn off" and the time server rules. CI builds the desktop app on Windows, macOS and Linux. I have driven the board with the drive-end, power-off, fuel economy and units features, and R.E.V on two drives in my car.

Not checked yet: R.E.V over many drives and other cars, the corrected R.E.V on the road, the HTTPS clock on the board, other boards, and any adapter other than the LELink. The checks that need a car are in docs/FIELD_CHECKS.md, with tables for you to fill in. Known security limits are in SECURITY.md.

OpenCarMind EdgeOS 2.1.0 (ESP-Mosaico)

Animated, OpenCarMind EdgeOS 2.0.0 on the ESP-Mosaico in six steps: a layer of rules on top of FreeRTOS, under the models and apps. Boot health check: each part checked once after a start, health good at 68.0 s, safe mode with Wi-Fi held if bad. Wi-Fi held until healthy: no radio at boot, released at 68.0 s with 131,975 B of internal RAM free. Model admission: CarMind R.E.V answers in 4.2 ms against a 1,000 ms deadline and is admitted with a margin of 995.8 ms, and a model that would miss its deadline is refused. Parked or Driving: during a drive a model switch, the clock and a format are refused because a drive is running, while the model keeps running. Degradation ladder, in a forced test with extra load: UI slowed at 110.6 s, learner paused at 122.6 s, model paused at 134.6 s, back to normal at 348.6 s, and the model is never swapped. Battery protection, in a board test at lowered limits: hot at 34.2 C sheds load, cooled at 33.7 C restores it, and over-voltage at 4188 mV saves the logs and stops. Internal RAM stays above 60 KB in every phase, lowest about 81 KB

OpenCarMind EdgeOS 2.0.0 on the ESP-Mosaico, rendered from the 2.0.0 screen code with example values: three 480 by 480 screens in the dark, light and dark themes. Drive at 64 km/h and 2350 rpm with the AI seeing Cruising 87 % sure, brake 6.3 bar, torque 85 N m and fuel 4.1 L/h, and the tank at 46 %, about 310 km. AI with the four class bars and its estimates. Learning with 14 updates kept, the air constant, a 50 L tank from 3 fill-ups and the model card

New in OpenCarMind EdgeOS 2.1.0

Version 2.1.0 adds small AI services that look after the board itself, and a Health app that tells you about them in plain words.

  • Health app. Three pages: Battery, Guard and AI. Each page opens with one card that gives a colour and a word ("Check soon" or "Act now"), what is wrong, what it means and what to do. The header counts the open issues, a dot on the Health icon shows that something needs a look, and a banner with Open Health appears when a new issue starts. While you drive, a "check soon" issue is only logged.
  • Battery charge and health. An extended Kalman filter on a one-RC cell model gives the charge. Health comes from a count from full charge to cutoff, or from a small regression on parts of a charge, because a board on the car's USB rarely runs flat. The board learns your cell from its first 10 charges.
  • Battery fault check. A small autoencoder learns what normal looks like for your cell over its first 24 hours. When 60 s of readings stop looking normal it raises an alarm, and the card names the likely reason, for example "warms up more than usual" or "loses charge while resting". It never cuts power by itself.
  • Network guard. An unsupervised detector watches for floods of new Bluetooth addresses and rotating Wi-Fi access points. For the first 2 hours after every start it only learns and blocks nothing. After that a block only does safe things: no new adapter offers, the scan narrows to your paired adapter, and the Wi-Fi time round is skipped. It never cuts your adapter during a drive, and you can switch blocking off in Settings.
  • Pairing safety. The board keeps a fingerprint of your adapter and asks you before it pairs again or uses an adapter that behaves differently. It also refuses a Wi-Fi time that jumps more than 24 hours ahead or 10 minutes back.
  • Services that stay out of the way. All of them share one worker task below the screen, the models and the OBD poll, and the same response-time check that admits the models admits them. When the board is busy, they are the first thing it slows.

Health app, Battery page, captured on the board: a blue Learning card says Learning your battery, needs 10 more full charges to judge its health, now and then run it low and charge it full. The header says All good. Health app, Guard page, captured on the board: the network guard is learning this place in the first 2 hours after a start and blocks nothing yet. Health app, AI page, captured on the board: every AI feature on time.

The Health app on the board, OpenCarMind EdgeOS 2.1.0, in its real state after a fresh start: the battery still learning, the guard learning the place, every AI feature on time.

Health app, Battery page with a red Act now card: Battery warms up more than usual, it runs warmer than its load explains, let it cool and keep it out of the sun. The header says 1 thing to check. Health app in the light theme, Battery page with an amber Check soon card: Battery is wearing out, holds 76 % of its rated charge and runs shorter on battery, plan to replace the cell. An amber banner over the launcher says the battery is wearing out, with an Open Health button, and a dot sits on the Health icon.

Issue cards and the banner on the board. A test build wrote each state into the Health screen only, so the battery and its gauge were never touched.

The release build 81017a5 passed its board check. Pairing your own adapter, a drive, a run on battery and the guard's first 2 hours in a car park are still to check in real use.

Stats for nerds (the 2.1.0 board check in numbers)

Checked on the board with the release build 81017a5: boot health good at 68.8 s, the battery estimator, the fault check and the guard all admitted (worst-case response 5.00 ms against a 1,000 ms deadline), a 614 s soak with 0 crashes, 0 screen misses and 0 AI misses, internal RAM never below 78,003 B, and the button-free download door working from the new build. Still to check in real use: pairing your own adapter, a drive, a run on battery with USB unplugged (the first charge and health readings), and a car park for the guard's first 2 hours. The worn, fault, block and changed-adapter cards have only been shown by the test build so far.

Field fix after the first drive (proposed as 2.1.1)

The owner's first drive with 2.1.0 ended in a restart loop, caused by a stack overflow in the task that talks to the car. The fix uses less of that task's stack, keeps the pattern layer off in safe mode, and writes the reason for every restart to obd/resets.csv on the board.

Stats for nerds (the core dump, the cause and the fix)

Decoded against the release ELF, the core dump left on the board says "A stack overflow in task obd". The task that talks to the car had used 5,104 B of its 8,192 B stack in its own frame, and the first logged row after every start loaded the pattern model file through a function with a 4,016 B frame. The bytes found past the end of the stack are the board's own pattern centroids, value for value. Once that file existed, every start with the car answering crashed about 14 seconds in, and the boot-loop safe mode did not stop it, because the pattern layer was not one of the parts it switches off. On the bench, with a simulated car and the same file, 2.1.0 crashed on every start, five in a row. The fix keeps the connection helpers off that task's stack and reads the pattern file in place: the deepest path inside the firmware dropped from 9,168 B to 4,416 B (tools/stack_check.py). The pattern layer now also stays off in safe mode, and every start writes one line to obd/resets.csv with the reset reason, how long the run before it lasted and the crashed task, so the next problem leaves evidence on the board.

End drive, Settings > Stop logging and Turn off now share one stop. It latches the car link off, writes the summary, closes the drive files, pauses the battery log and checks that nothing more is written. It always ends in Safe to unplug or in a named failure, within 35 seconds, and logging stays off until you tap Start logging or the board restarts. In 2.1.0, End drive saved the drive and then let the next one start at once, and a busy link could leave the drive open. The ESP-Mosaico's POWER key switches the board off at once without saving, so Turn off comes first. Details are in the user manual.

OpenCarMind also runs on Espressif's ESP-Mosaico[12], an ESP32-S31 board with a 480 × 480 AMOLED touch screen, 32 MB of PSRAM and a 128 MB NAND for the drive logs. Up to version 1.2.0 that build was called mossREV. Version 2.0.0 is called OpenCarMind EdgeOS 2.0.0. It is not related to Ubiquiti's EdgeOS router software.

OpenCarMind EdgeOS comes from the same source tree as the S3 version and keeps everything mossREV 1.2.0 has: both models (CarMind R.E.V, the default on a new board, and CarMind E.V, each re-quantized for the S31), the 16 apps on the touch screen with Wi-Fi search and join, a light and a dark theme, and per-drive event logs. Version 2.0.0 adds a small operating-system layer, described below. The image above is rendered on a computer from the 2.0.0 screen code (tests/host/uishot, the same LVGL code the board runs) with example values. It is not a photo of the board. The OS layer does not change the S3 build.

Stats for nerds (how the S3 image stays the same)

Up to 4aeff43, every byte the S3 chip loads was the same as in the mossREV 1.2.0 tree. The pairing change merged after the board check is behind one switch, CONFIG_OBD_BLE_PAIR_CONFIRM, which is off for the S3 by default. With it off, the S3 image built from this source equals the 4aeff43 S3 image except the build time, the ELF SHA-256 and the image's checksum and hash (see Changes after the board check).

OpenCarMind EdgeOS 2.0.0 finished its board check, including a 10-minute soak, and 2.1.0 passed the checks listed above. The 2.1.0 image is on the EdgeOS 2.1.0 release, built from main at 1053f9d. You can also build it from this repository with the steps in docs/MOSAICO.md. The board results at the end of this section say what the board showed.

The full guide is docs/MOSAICO.md: the hardware, flashing, every app, the two models, Smart swipe and Smart UI, the storage, the NAND, the OS layer and the known limits. The OpenCarMind EdgeOS user manual explains every screen and message for a driver.

What it is

OpenCarMind EdgeOS is not a new kernel. FreeRTOS, as ESP-IDF 6.1 ships it, still schedules the tasks on the S31's two cores. The OS is a set of rules on top of it that decide what may run, when and how fast, and what happens when something goes wrong. It adds no task of its own. Its code runs inside the tasks that already exist: the board task every 2 s, the screen task, the USB door and the scheduler monitor.

The rules live in one plain C file, main/os_core.c, with no ESP-IDF calls in it, so the host tests on a computer check every rule. main/os.c connects the rules to the firmware. Files that the S3 build shares call the OS through macros in main/os_hooks.h, which turn back into the old S3 statement on the same line. That is how the OS layer leaves the S3 image as it was.

The parts and why each exists

The OS layer decides what may run in each state of the board and rates its own health after every start. It refuses a model that would make jobs miss their deadlines, slows the least important work first when the model misses deadlines, and watches the battery.

Stats for nerds (what each of the 11 parts does and why it is there)
Part What it does Why it is there
One service table Eight services (model switch, clock, format, Wi-Fi edit, Wi-Fi radio, the USB door's commands, the model, the R.E.V learner) each have a mask of the runlevels they may run in. Each model and learner also declares its period, deadline, stall limit, CPU share, self-test and fallback model in one contract table. Before 2.0.0 these rules were separate if checks spread over the screen, the USB door and the board task. Now one table holds them, and a source audit in the host tests fails if a file decides a refusal by itself.
Runlevels Boot, Safe, Parked, Driving, Saving and Update. Several can hold at once, and a service runs only if every active runlevel allows it. In the middle of a drive, a model switch would mix two models' answers in one log, a clock change would break its timestamps, and a format would erase the drive being written. The board refuses them in one place and says why.
Boot health check About 65 s after a start the board rates itself good, degraded or bad from the model self-test, the flash FAT check, the NAND, the first screen update, the touch controller and the scheduler's misses, stalls and response times. It gives you one line to read on the Board page. It is also the signal an A/B rollback needs to keep or reject a new image.
Model admission A model loads only if response-time analysis says every job on its core still meets its deadline (see below). A model that is too slow would make the OBD poll or the learner miss deadlines. The check refuses it before it loads, and the old model stays.
Degradation ladder When the model misses deadlines, the board steps down: first the AI services slow to a tenth of their rate with their learned heads off (new, being checked on the board), then the screen refreshes every 33 ms instead of 16 ms and the AI services pause, then the R.E.V learner pauses, then the model's inference pauses. A minute without misses steps back up, in reverse order. Misses of the screen or the AI services alone reach the first rung only. Estimates such as the battery SoC, screen frames and learning are worth less than the log and the model during a drive, so they go first. The ladder never swaps models.
AI services Small periodic AI jobs, the battery SoC and SoH estimator first, in one worker task below the screen and the models, admitted by the same response-time analysis (see below). On build 13757fd the board admitted the worker on core 1 with R 2.00 ms. The estimates are being checked. In EdgeOS 2.1.0 the battery fault check and the network guard (the Bluetooth and Wi-Fi intrusion detector) joined the battery estimator. Each one gets a deadline, a CPU budget and a place on the ladder, instead of its own task and its own rules.
Battery protection Every 2 s it reads the gauge's voltage, current and temperature. At 45 °C on USB it sheds load, at 60 °C it stops safely, and at 4.25 V or more it reports a charger fault and stops. The TP4057 charger has no enable pin and no thermistor input, and its supply comes from USB through diodes. The firmware cannot stop charging, so it watches and stops cleanly instead. The thresholds are placeholders until the cell's datasheet is known.
Wi-Fi boot hold No Wi-Fi starts at boot. The automatic start waits for the health verdict and goes ahead on good or degraded. Your own start in the Wi-Fi app is never held. On mossREV 1.2.0 rc3 the boot window was the internal-RAM low point, 57.7 KB free while the Wi-Fi driver started (measured on the board).
One reset path Every reset the firmware asks for goes through sys_reset(reason): mark it as asked for, flush and lock the flash FAT and the NAND, then reset. The screen stall guard and the hung-job restart skip the mark, so three of them in a row still start safe mode. A reset between a sector's erase and its write had torn the FAT and lost the whole volume twice on the bench, before the storage fixes. Now no asked-for reset skips the flush.
Feature gate One OS service runs the A/B test for Smart swipe and the Smart UI prefetch: the 50/50 split, the Mann-Whitney test, the Holm correction and the verdict per firmware version. Each feature had its own copy of the same statistics. Now the thresholds sit in one place that no feature can change, and Smart swipe gave back 776 bytes of internal RAM.
PPA and 2D-DMA graphics The launcher slide's window copies, the page pictures' byte swap and large opaque LVGL fills and image copies run on the S31's pixel-processing accelerator and 2D-DMA, with a CPU fallback. The CPU did these copies row by row. The chip has engines for them. A full frame still needs 23.6 ms on the panel's QSPI link, so the gain is in composing, not in sending.

Services and runlevels

How the OS decides what may run, drawn as a hand-drawn flow. Step 1, inputs the OS reads: fresh on every check, from start-up, the count of abnormal resets, the drive log and the car link, the battery gauge and USB power, and the reset path and the format, read in rl_inputs() in main/os.c. Step 2, it sets the active runlevels: Boot when start-up has not finished, Safe after 3 abnormal resets in a row, Driving when a drive is recorded or the car's computer answers, Saving when the battery is hot or over-voltage or USB is lost (UPS option, off), Update when a reset, a door entry or a format is running, and Parked when none of these holds. Several can hold at once, for example Safe while Driving. Step 3, a service asks to run: model switch, clock, format, Wi-Fi edit, Wi-Fi radio, USB door, model or R.E.V learner, one mask each in MASK[] in main/os_core.c. Step 4, os_allows(service): every active runlevel must allow the service, and one that does not is enough to stop it. Step 5, yes: the service runs. No: refused with the phrase of the highest blocking runlevel, highest first: Update, an update or format is running. Saving, the board is saving power. Driving, a drive is running, or the car link is up when only the link is on. Safe, safe mode is on. Boot, the board is starting. Parked never blocks, because every service allows it. Separately, once per boot: step 6, boot health at 65 s rates the board good, degraded or bad. Step 7, good or degraded: the Wi-Fi task starts. Bad: Wi-Fi is held until you start it, and a start you make yourself in the Wi-Fi app is never held.

Model admission by response-time analysis

A model is a real-time job. It has to answer once per second while the OBD poll and the learner share its core. If loading it would make any job on that core miss its deadline, the board refuses it.

Stats for nerds (the response-time test, its equation and the board log)

When a model loads at boot or on a switch, the OS takes its self-test run time, doubles it (one measured run is not a worst case), and uses that as the model's worst-case CPU time C. Then it runs the response-time analysis of Joseph and Pandya[5] for every job on that core:

$$ R_i = C_i + \sum_{j \in hp(i)} \left\lceil \frac{R_i}{T_j} \right\rceil C_j $$

Ri is job i's worst-case response time, the longest it can take from its release to its finish. Ci is its worst-case CPU time. The sum runs over hp(i), the jobs on the same core with a higher priority. Tj is the period of such a job j, so ⌈Ri / Tj⌉ counts how many times j can start, and take its Cj, while job i waits. Ri appears on both sides, so the OS starts from Ri = Ci and repeats the sum until the value stops changing. Job i meets its deadline when Ri ≤ Di. If any job on the core would miss, a switch is undone like a failed load and the screen says, for example, "Not switched: CarMind E.V refused: ml would miss its deadline." (ml is the models' job.) A boot load that fails leaves the model off, with an error event.

On the board, the first boot of a 2.0.0 build before the rename (09ec8f5) logged admission CarMind R.E.V: C 4472 us (self-test 2236 us x 2.0) on core 1, R: ml 4.5/1000 ms, margin 995.5 ms (ml): admitted. The log lists only the ml job: the other jobs on core 1 had no measured run yet at 4.3 s, so this first check held the model alone. Host tests pass for the textbook three-job set (C 3, 3, 5 and T 7, 12, 20 give R 3, 6, 20) and for 90,013 random job sets compared with the scheduler monitor's own loop.

Scheduler budgets per core

Scheduler budgets per core, drawn as Gantt lanes. Core 1, one 1,000 ms window on an axis broken at 40 ms: obd_poll, priority 5, period 1,000 ms, deadline 30,000 ms, not run on the bench. The ml job, priority 3, period and deadline 1,000 ms, self-test 2.1 ms doubled to a budget of 4.2 ms, admitted with R 4.2 ms on 4aeff43. The rev job, the R.E.V learner, priority 2, period 1,000 ms, deadline 30,000 ms, a 2 % share of 20 ms per second with bursts of at most 30 ms, no run on the bench. Core 0, one 100 ms window: the ui screen job, priority 2, period and deadline 50 ms, worst response 7.8 ms and worst CPU 4.98 ms over 9,597 runs in the 10-minute soak on 06ddf1d, 0 misses. The LVGL refresh every 16 ms. Slow jobs over the first 120 s: boot on 4aeff43 with Wi-Fi held from 4.3 s, the health verdict due at 65 s and good at 68.0 s, the Wi-Fi driver up from 88.1 to 106.5 s and the clock synced at 98.0 s. The learner's 30 s deadline windows and 60 s stall limit. The model's 10 s stall limit. The link_search, obd_poll and ecu_pick deadlines are of 90, 30 and 10 s. The board task every 2 s and the scheduler summary every 60 s.

Every timed job registers a period T and a deadline D with the scheduler monitor. Its core and priority come from the task it runs in. The chart takes those from the code and puts the board's measurements inside them.

Stats for nerds (how the chart is drawn and what was measured)

The model gets 1,000 ms and its admission budget is 4.2 ms, so the first 40 ms of the core 1 axis are drawn 23 times wider, or the bar would be thinner than a pixel. No car was connected on the bench, so the OBD jobs, the model and the learner never ran as periodic jobs there. Their bars are the code's budgets. Two were measured. The model's self-test at admission took 2.1 ms, doubled to that 4.2 ms budget, and the model was admitted with a response time of 4.2 ms. The screen job ran 9,597 times over the soak with no missed deadline. Its worst response, the wall time from the start of a run to its end, was 7.8 ms, while the screen task itself used at most 4.98 ms of CPU. It spent the difference waiting for other tasks on core 0. The response-time analysis counts only registered jobs, so it reports 4.98 ms for ui. The board task (every 2 s), the Wi-Fi task and the scheduler monitor run on core 0 outside the registered jobs.

AI services in OpenCarMind EdgeOS

OpenCarMind EdgeOS runs its small AI models as services. Since 2.1.0 there are three: the battery estimator, which gives the cell's state of charge (SoC) and state of health (SoH, now with the partial-charge regressor), the battery anomaly detector, and a network guard for Bluetooth and Wi-Fi. The Health app shows all three in plain words. Each of its pages opens with one status card: a colour, an icon and a word (Good, Learning, Check soon, Act now), a headline such as "Battery is wearing out", what it means and what to do. The header counts the issues ("All good", "1 thing to check"), a new issue raises the banner with Open Health, and the Health icon on Home gets an amber or red dot. The scores and counters stay below the card for experts.

No service acts on power, and none cuts the car link during a drive. When the model misses deadlines, the AI services are the first thing the board slows. The estimates themselves, the new ladder rung and the pairing rules are built and being checked on the board now.

Where the AI services run, hand-drawn. Step 1, who preempts whom, FreeRTOS fixed priorities: obd_poll 5, the ml model 3, the ui screen 2 on core 0, the R.E.V learner 2, the AI worker 1, on core 1 on build 13757fd with R 2.00 ms, then idle. Step 2, the worker's release table, deadline-monotonic: bat_est for battery charge and health, T 1 s, D 1 s, budget 2 ms, self-test 570 microseconds, on the board. ids, the network intrusion detector, T 5 s, D 1 s, about 60 integer ops, shadow mode first, validated on the Mac, firmware service next. Future services plug in as one table entry each, with no new task. Admission treats the worker as one job with C the sum of the budgets, T the shortest period and D the shortest deadline. Step 3, in: snapshots of the gauge's V, I and T and the radio counters, one writer and a seqlock, so a reader never waits. One service step takes no mutex, waits on no queue, does no I/O and allocates nothing. Step 4, out: a lock-free result struct the screen reads, and log rows into a ring the board task writes to the NAND. The ladder when the model misses deadlines: 1, AI services slowed to a tenth of their rate with learned heads off, new in this build and being checked on the board. 2, UI slowed to 33 ms and AI services paused. 3, learner paused. 4, model paused, while the drive log keeps running. An overrun finishes and skips its next release. Board, build 13757fd: boot health good at 68.9 s, worker admitted on core 1 with R 2.00 ms and a 998 ms margin, battery self-test 570 microseconds, Wi-Fi released with 130,623 B free.

Stats for nerds (where the services run, and each model's cost and status)

All services share one worker task at FreeRTOS priority 1, below the screen, the R.E.V learner, the model and the OBD poll, so any of those can preempt a service at any instruction. The worker is admitted by the same response-time analysis as the models. On build 13757fd the board admitted it on core 1 with a worst-case response of 2.00 ms against a 1,000 ms deadline, and the battery estimator's self-test took 570 µs of its 2 ms budget. A service reads copies of its inputs and writes its results without a lock, so it cannot hold up the jobs above it. On 13757fd the boot health check rated the board good at 68.9 s and released Wi-Fi with 130,623 B of internal RAM free.

Model What it does Cost per step Status
Battery charge (SoC): extended Kalman filter on a one-RC cell model counts the charge and corrects it with the voltage, once a second 111 flops and 1 exp, 324 B on the board with placeholder parameters. Self-test checked on 13757fd, estimates being checked
Battery health (SoH): counted capacity and resistance trend capacity between two charge anchors, and a DC resistance flag a few ops, inside the charge estimator on the board, being checked
Battery health: partial-charge regressor SoH from the shape of a deep charge, with no full count 8 multiply-adds and 16 ops, 100 B in the firmware since 2.1.0 (C matches the Mac to 1.3e-7). Needs 10 deep charges of this cell to learn its reference, so not yet seen working on the board
Battery anomaly detector an alarm when 60 s windows stop looking normal for this cell. The Health card names the feature with the largest error in plain words, for example "warms up more than usual" under 400 ops a window, 920 B in the firmware since 2.1.0 (1.05e-6 against the Mac). Admitted on the board, in its 24 h warm-up
Network intrusion detector: rotation detector scores each 5 s of Bluetooth and Wi-Fi traffic for address-rotation floods about 60 integer ops, 552 B per head in the firmware since 2.1.0 as the network guard (bit-exact against the Mac). Admitted on the board, in its 2 h shadow
Pairing rules R1, R2 and R6 adapter fingerprint, no silent re-pair, clock jump guard (Pairing safety) one compare per link or clock sync, 48 B in NVS on the board, being checked
Residual MLP, 3-state EKF, neural ECM, KalmanNet-lite, pure MLP, general IDS learners learned replacements or corrections tested, not shipped
For experts: how the battery charge estimator works (figure, equations, test results)

How the battery charge estimator works, hand-drawn. On the board with placeholder parameters. The gauge gives voltage V, current I and temperature T from the sample the board task already reads, with no new I2C traffic, and the gauge is never written. The cell model is one RC pair: an open-circuit voltage source OCV(z), a series resistance R0, then R1 in parallel with C1, so V equals OCV(z) plus v1 plus R0 times I. OCV is a 41-point table over the charge z from 0 to 1, and tau equals R1 times C1. The filter runs one step per second on the state z and v1 with covariance P. Predict: z minus equals z plus eta I delta t over 3600 Q SoH, v1 minus equals a v1 plus 1 minus a times R1 I with a equal to exp of minus delta t over tau, P minus equals F P F transpose plus W with F equal to diag 1, a. Expect: V hat equals OCV of z minus plus v1 minus plus R0 I, with H equal to dOCV/dz and 1. Correct: K equals P minus H transpose over H P minus H transpose plus R, x equals x minus plus K times V minus V hat, P equals P minus minus K H P minus. Anchors: after 300 s at rest z equals the inverse OCV of V, and at the end of a CV charge z equals 1. Tried on top of it and not shipped: a residual MLP with 11 inputs, 12 tanh units and one clamped output, and an EKF with a third state for the current offset. Results on the Mac: on the 18650 NMC cycling set RMSE 0.33 to 0.53 percent and worst 2.4 to 4.0 percent. Start 20 percent wrong: EKF 0.75 to 2.0 percent, coulomb counting 8.6 to 10.5 percent. NASA cells with the 18650 OCV curve: 7.9 to 21 percent. Cost 111 flops and 1 exp, 324 B.

The cell is modelled as a voltage source that depends on the charge, OCV(z), in series with a resistance R₀ and one resistor-capacitor pair R₁ ∥ C₁. R₀ gives the instant drop when current flows. The RC pair gives the slow part, with time constant τ = R₁C₁. The filter keeps two states, the charge z (0 to 1) and the voltage v₁ on the RC pair, and a 2 × 2 covariance P that says how sure it is of them. Plett laid out this use of the extended Kalman filter for battery management systems[21].

Every second it predicts. It counts the charge and lets the RC voltage decay towards its new level:

$$z_k^- = z_{k-1} + \frac{\eta, I_k, \Delta t}{3600, Q, \mathrm{SoH}}, \qquad v_{1,k}^- = a, v_{1,k-1} + (1 - a), R_1 I_k, \qquad a = e^{-\Delta t/\tau}$$

Here I is the current in amps (positive while charging), Δt the seconds since the last step, Q the capacity in Ah, η the charge efficiency, and SoH the share of the capacity the cell still has. The covariance grows by the process noise W: P⁻ = F P Fᵀ + W, with F = diag(1, a).

Then it predicts the terminal voltage and compares it with the gauge:

$$\hat V_k = \mathrm{OCV}(z_k^-) + v_{1,k}^- + R_0 I_k, \qquad H_k = \left[, \frac{d,\mathrm{OCV}}{dz}\bigg|_{z_k^-} ,\quad 1 ,\right]$$

The gap V − V̂ is the innovation. The Kalman gain K decides how much of it goes into each state:

$$K_k = \frac{P_k^- H_k^{\top}}{H_k P_k^- H_k^{\top} + R}, \qquad x_k = x_k^- + K_k \left(V_k - \hat V_k\right), \qquad P_k = P_k^- - K_k H_k P_k^-$$

R is the variance of the voltage reading. Where the OCV curve is steep, the voltage says a lot about z, and the filter follows it. Where the curve is flat, dOCV/dz is small, K shrinks, and the filter trusts the charge count. That is how a wrong start fixes itself: with the start 20 % off, the EKF's error stayed at 0.75 to 2.0 % RMSE, where plain coulomb counting stayed at 8.6 to 10.5 %.

Two anchors reset the charge outright. After 300 s at rest the voltage is the OCV, so z = OCV⁻¹(V). At the end of a CV charge, z = 1. Until the first anchor the Board page says "learning". Two anchors at least 30 % of charge apart give a capacity sample for the health estimate.

In the firmware (main/bat_est.c, math in main/bat_est_core.c, model in main/bat_model.h) the step matches the Mac reference to within 1.1e-6 over 370 test steps (make -C tests/host bat BAT_MODEL=<fitted header>). It reads the gauge sample the board task already takes every 2 s, so there is no new I2C traffic, and the gauge is never written. The learnt values and the last SoC go to NVS at most every 10 minutes and on the safe-shutdown path. Every 10 s a training row (V, I, average I, T, the gauge's SoC and remaining capacity, the estimator's SoC, SoH and mode) goes to obd/bat/bNNNNNN.csv on the NAND, at most 2 MB in all, oldest file first out. Those rows are what the cell's own OCV curve will be fitted from. Until then the firmware runs placeholder parameters for a 4.2 V cell, and the nominal capacity is CONFIG_OCM_BAT_NOMINAL_MAH, 65 mAh from the cell's label (UNVERIFIED).

Tested on the Mac, held out from fitting:

Test 2-state EKF (shipped) For comparison
An 18650 NMC cycling data set, held-out early, middle and late life RMSE 0.33 to 0.53 %, worst 2.4 to 4.0 %
Start 20 % wrong RMSE 0.75 to 2.0 % coulomb counting 8.6 to 10.5 %
NASA cells[26], with the 18650 cell's OCV curve RMSE 7.9 to 21 % the OCV curve is specific to the cell, so it has to come from this board's logs
Current offset of +0.01C (0.65 mA on 65 mAh) RMSE 5.3 % the 3-state EKF: 0.27 to 0.79 %
Cost per step 111 flops and 1 exp, 324 B

I checked where the EKF's remaining error comes from. It is a slow drift of about ±0.3 % from counting charge, and it does not sit at the low-charge knee, in the CV taper or with heat. An unscented Kalman filter[22] with one or two RC pairs gave the same RMSE. Neither the linearisation nor the model order is the limit. The biggest risk is a current offset, which the 3-state EKF is kept ready for.

For experts: how the battery health estimate works (figure, features, test results)

How the battery health estimate works, hand-drawn. State of health is the capacity the cell still holds as a share of its label capacity. Card 1, counted capacity, on the board: two anchors at least 30 percent of charge apart give one capacity sample, and SoH equals the learnt capacity over the label capacity. A full charge counted to the cutoff: 0.12 percent error on the 18650 set and 1.2 percent on the NASA cells. Card 2, DC resistance trend, on the board: a current step gives the DC resistance over 120 s, with r of minus 0.88 against capacity, used as a flag, and 6.42 percent off as an SoH estimate on its own. Card 3, partial-charge regressor, validated on the Mac: features from an ordinary charge relative to the cell's first 10 cycles, the charge added between 3.9 and 4.1 V, dQ/dV peak height and position, CV duration and taper constant, DC resistance over 120 s and mean temperature. Ridge regression, 8 multiply-adds and 16 ops, 100 B, picked by forward cross-validation over a GBDT and an 8-unit MLP. Held-out cycles: on the 18650 set the ridge 1.45 percent, the DCIR trend 6.42 percent, the full-charge count 0.08 percent with a full cycle. On the NASA discharge-only cells the ridge 13.9 to 25.0 percent and the DCIR trend 8.5 to 19.2 percent.

SoH is the capacity the cell still holds divided by its label capacity. The board gets it two ways.

The firmware counts it. Two anchors (a rest, or the end of a CV charge) at least 30 % of charge apart give one sample: the charge counted between them divided by the change in z. A full charge counted down to the cutoff was off by 0.12 % on the 18650 set and by 1.2 % on the NASA cells. Current steps also give a DC resistance (DCIR) over 120 s. It rises as the cell fades (r = −0.88 against capacity on the 18650 set), but as an SoH estimate on its own it is off by 6.42 %, so the board uses it as a flag.

A count from full to the cutoff needs the board to run its cell flat, which a board on the car's USB rarely does. So I trained a regressor on what an ordinary charge shows. Its features are taken relative to the cell's first 10 cycles: the charge added between 3.9 and 4.1 V, the height and position of the dQ/dV peak (the charge added per volt of rise), the CV duration and its taper constant, the DCIR over 120 s and the mean temperature. Ridge regression won the forward cross-validation (0.83 % against 1.96 % for a tree ensemble (GBDT) and 20 % for an 8-unit MLP). It costs 8 multiply-adds and 16 ops, in 100 B.

Held-out cycles, forward in time (MAPE) Partial-charge ridge DCIR trend Full-charge count
18650 NMC cycling set 1.45 % 6.42 % 0.08 %, needs a full cycle
NASA cells[26], discharge only 13.9 to 25.0 % 8.5 to 19.2 % not compared

The regressor passes on the cell it learned and does not transfer to cells it never saw charge. It needs the board's own first charges as its reference. The plan is the count when there is a full cycle and the regressor otherwise. The regressor has been in the firmware since 2.1.0, where its C matches the Mac to 1.3e-7. It has not run on the board yet: it needs 10 deep charges of this cell as its reference, and in the 2.1.0 board check the cell stayed full (0 of 10).

For experts: how the battery anomaly detector works (figure, features, fault tests)

How the battery anomaly detector works, hand-drawn. Validated on the Mac, in the firmware since 2.1.0. Card 1, every 60 s, 9 features from the EKF and the gauge: innovation mean and RMS as slow averages, voltage drift and current at rest, temperature against a one-node heat model, voltage sag per C-rate against R0 at that temperature, the DC resistance ratio at a current step, load level and gauge read glitches. Card 2, three detectors: a 9-4-9 tanh autoencoder raises the alarm from its reconstruction error, a z-score with a frugal median and MAD and an online Gaussian are diagnostics only. False alarms on 388 h of held-out normal data: autoencoder 0.0026 per hour with a 95 percent upper bound of 0.012, z-score 0.245 and Gaussian 0.126, which drift with ageing. Card 3: a 24 h warm-up, learning only from clearly normal windows, an alarm after 3 windows in a row, a banner and a log line, and it never acts on power. Under 400 ops per window, 280 B of state and 640 B of parameters. Injected faults caught and median time: resistance plus 100 percent 92 percent in 72 min, temperature plus 15 C 83 percent in 164 min, soft short 5 percent per hour 75 percent in 176 min, resistance plus 30 percent 25 percent, soft short 0.5 percent per hour 8 percent, current offset 8 percent, intermittent reads 0 to 8 percent, temperature plus 5 C, current gain error and extra drain 0 percent.

The detector learns what normal looks like for this cell and raises an alarm when 60 s windows stop looking like it. Nobody labels a fault for it. Each window has 9 features from the EKF and the gauge: the innovation's mean and RMS as slow averages, the voltage drift and the current at rest, the temperature against a one-node heat model, the voltage sag per C-rate against R₀ at that temperature, the DC resistance ratio at a current step, the load level and the gauge's read glitches.

Three detectors ran side by side. One is a z-score against a frugal streaming median and MAD[25], one an online Gaussian, and one a 9 → 4 → 9 tanh autoencoder whose score is its reconstruction error. All three warm up for 24 h, learn only from clearly normal windows, and alarm after 3 windows in a row. On 388 h of held-out normal data the autoencoder gave 0.0026 false alarms per hour (95 % upper bound 0.012). The z-score gave 0.245 per hour and the Gaussian 0.126, because the cell's ageing moved them. So only the autoencoder raises alarms, and the other two only log.

Injected fault Caught Median time to the alarm
Resistance +100 % 92 % 72 min
Temperature +15 °C 83 % 164 min
Soft short, 5 % of capacity per hour 75 % 176 min
Resistance +30 % 25 %
Soft short, 0.5 % per hour 8 %
Current offset 8 %
Intermittent reads 0 to 8 %
Temperature +5 °C, current gain error, extra drain 0 %

It catches large faults only. The thresholds were learned on public cell data, so they have to be learned again on the board's own cell before an alarm means anything there. An alarm shows a banner and writes a log line. It never acts on power: the fixed battery protection above stays in charge of that. The cost is under 400 ops a window, with 280 B of state and 640 B of parameters. It has been in the firmware since 2.1.0, within 1.05e-6 of the Mac, and the 2.1.0 board check admitted it and started its 24 h warm-up. A real fault has not been seen in use yet. The worn and fault cards shown so far come from a test build that writes a state into the Health screen only.

For experts: how the network intrusion detector works (figure, rules, attack tests)

How the network intrusion detector works, hand-drawn. Rotation detector validated on the Mac, rules R1, R2 and R6 on the board. Card 1, radio callbacks: BLE adverts and link events, Wi-Fi round events, counters and three 1,024-bit bitmaps per head, no locks and no allocation. Card 2, the scan head every 5 s window: three features that measure rotation, not crowd size: single-use new transmitters, churn and adverts per address. Score: a frugal streaming median m and MAD per feature, m moves by eta times s times the sign of x minus m, z equals x minus m over 1.4826 MAD, one-sided, plus a fixed prior of 15 or more single-use new transmitters in one window. Block when 3 of the last 6 windows exceed, learning only from clean windows with clamped medians, after a 2 h shadow. Below it, the link head for relay timing is advisory only, the Wi-Fi head looks for floods of rotating access-point addresses with the fixed prior only, and the fixed rules on the board are R1 adapter fingerprint, R2 no silent re-pair and R6 clock jump guard. Step 6, a block does only safe, reversible steps: no pairing offers or re-pair requests, the scan narrowed to the paired adapter, the Wi-Fi round aborted with the current time kept, rows kept out of the learner, lifted 10 min after the last bad window or from the banner. It never cuts the paired adapter while driving, transmits, or pairs on its own. On the Mac: 0 false blocks in 446 h of BLE adverts, 2 times 120 h of a crowd shift and 769 h of Wi-Fi traffic. Advert floods at 100 ms and 20 ms 80 of 80, the stealthy 500 ms flood 71 of 80, a slow poisoning ramp blocked at 4.9 adverts per second, Wi-Fi floods with rotating access-point addresses 15 of 15. Cost 40 B of state and 512 B of bitmaps per head, about 60 integer ops a window. A stealthy flood inside a crowd of 150 or more devices was not caught.

The detector looks for a transmitter that changes its address on almost every advert, which is how Bluetooth spam floods and prompt-spam tools look. Each radio callback only sets bits and adds to counters. Every 5 s the IDS service turns three 1,024-bit bitmaps (seen this window, seen twice, seen last window) into three features:

  • single-use new: transmitters seen once that were not there in the last window,
  • churn: the share of transmitters that are new,
  • adverts per address, which falls towards 1 in a flood.

A crowd of real phones repeats inside a window and keeps each address for minutes, so these features stay low in a busy car park. A raw count of adverts would not.

For each feature the board keeps a frugal streaming median m and median absolute deviation (MAD)[25]. After each window the median moves one small step towards the new value, m ← m + η·s·sign(x − m), where η is the step and s the feature's scale. Over time m settles where half the values lie above it, and it costs one number per feature. The MAD follows the same rule on |x − m|. Scoring is one-sided, z = (x − m) / (1.4826·MAD), so only more rotation counts. With the factor 1.4826 the MAD equals the standard deviation for Gaussian data. A fixed prior adds that 15 or more single-use new transmitters in one window is a flood whatever the board has learned. A block starts when 3 of the last 6 windows exceed. The first 2 h are a shadow that learns and never blocks. After that the baseline learns only from clean windows, and its medians are clamped, so a slow poisoner cannot drag them into flood territory.

A block only stops what the board would do on its own. It offers no new adapter and asks for no re-pair, narrows the scan to the paired adapter, aborts the Wi-Fi clock round with the current time kept, and keeps the rows out of the learner. The block lifts 10 minutes after the last bad window, and you can clear it from the banner. It never cuts the paired adapter while you drive, never transmits, and never pairs on its own. Cloned adapters, silent re-pairs and clock jumps are left to the fixed rules R1, R2 and R6 in Pairing safety. A link head that watches for relay delay is advisory only: it marks rows unverified and blocks nothing.

The data: a public BLE scanner data set, used for local testing only (nothing fitted on it ships), the UJI Probes[27] and IPIN2021[28] Wi-Fi probe-request captures, and a synthetic crowd of 5 to 300 devices for the busy car park. Attacks were injected into them.

Test on the Mac Result
False blocks on normal traffic 0 in 446 h of BLE adverts, 0 in 2 × 120 h of a crowd shift, 0 in 769 h of Wi-Fi management traffic. Target ≤ 0.05 per hour
Advert floods at 100 ms and 20 ms 80 / 80 each, blocked 10 to 15 s after the start
Stealthy flood at 500 ms 71 / 80. Inside a synthetic crowd of 150 or more devices: 0 / 15
Slow poisoning, 0 to 50 adverts per second over 6 h blocked at 4.9 adverts per second, and the block held at full rate
Wi-Fi floods of fake access points with rotating addresses 15 / 15 on both captures
Cost 40 B of state and 512 B of bitmaps per head, about 60 integer ops a window

On the Mac the detector is bit-exact against its Python reference on 21,601 test windows. It has been in the firmware since 2.1.0 as the network guard (T 5 s, D 1 s), and after every start it spends 2 h in shadow mode, logging and never blocking. In the 2.1.0 board check it scored 0 to 34 of 256 over 112 shadow windows with 0 blocks. A real block has not been seen in use yet. The block card shown so far comes from the test build, and a week of logs from real car parks will show its false-block rate on the board.

For experts: why the AI services meet their deadlines and cannot deadlock (the scheduling argument)

The AI services are soft real-time jobs. A late result is worth less, never dangerous, so a miss is counted and fed to the ladder, never fatal.

Each service is one table entry with a period T, a relative deadline D ≤ T, a CPU budget C and four hooks (main/ai_svc.c, rules in main/ai_svc_core.c). Inside the worker, a release table picks the due service with the shortest deadline first (deadline-monotonic order), and a step runs to its end. One worker instead of one task per service saves a stack and a scheduler slot per service. The cost is that one service can wait for one step of another, and the admission covers that. The worker is analysed as one job:

$$C_w = \sum_{s} C_s, \qquad T_w = \min_{s} T_s, \qquad D_w = \min_{s} D_s$$

and its response Rw comes from the same response-time analysis as the models[5], with every measured job above it on that core. If Rw ≤ Dw, every service is released at most once inside any window of length Rw, so the sum of the budgets bounds all the work the worker can face, waiting for another service included. On 13757fd that gave R 2.00 ms on core 1, a margin of 998 ms. Admission runs when the boot health verdict is formed, about 65 s after a start, once the scheduler monitor has measured the other jobs, on the core with the lower measured load first. A service whose self-test takes longer than its budget is refused on its own. If both cores refuse the worker, the board runs without AI services and the Board page says why. In safe mode they stay off.

Overruns do not pile up. A step that runs past its budget may finish, and that service's next release is skipped. A worker that comes back late runs only the newest release and counts the older ones as skipped. No job ever waits in a queue behind another, so overload cannot build a backlog. make -C tests/host ai simulates the release table under overload (a step 3.5 periods long, budget overruns, a blocked worker) and checks that no service ever has more than one job outstanding, and that the ladder sheds in the order AI services, screen, learner, model, and comes back in reverse.

The worker cannot deadlock either. A deadlock needs a cycle of tasks, each holding something the next one waits for. A service step takes no mutex, waits on no queue, does no I/O and allocates nothing. Its input is a copy of the latest sample in a single-writer seqlock: the reader retries a torn copy at most four times, then keeps the last good one, and never waits. Its result goes out the same way, and the screen reads it without a lock. Rows for storage go into a single-producer, single-consumer ring that drops and counts when full. The board task drains it, since it already owns NVS and the file writes. The only lock on a step's path is the scheduler monitor's spinlock, held for a few field copies and never nested. So the worker never holds one resource while it waits for another, and the cycle cannot form through it.

On the Board page, the AI SERVICES card shows each service's period, deadline, budget, runs, misses, skips and worst response.

Internal RAM at run time

The target for internal RAM at run time is more than 60 KB free in every phase. The lowest is 82,883 B, about 81 KB, with an adapter search and a clock sync running at once. Every phase stays above 60 KB.

Stats for nerds (RAM per phase, and a fix to the Board page's figure)

This was measured on the board, OpenCarMind EdgeOS 2.0.0 4aeff43, with a debug build of that code that adds a RAM monitor. Each figure is the lowest free internal RAM in that phase, all internal heaps added up:

Phase Lowest free internal RAM
The first minute after a start, before Wi-Fi 127,407 B
The first Wi-Fi round, with the automatic adapter search 82,907 B
An adapter search alone 112,935 B
An adapter search and Sync clock now together 82,883 B
Sync clock now alone 82,907 B
Wi-Fi search 88,791 B
A theme switch 112,799 B
A switch to E.V 102,383 B
A launcher slide 112,599 B

Two parts of that total were never used in any phase: the 32 KB internal reserve (32,031 B free) and the LP RAM (31,948 B free). The main heap alone went down to 18,900 B.

Before 4aeff43, the Board page's "lowest" read 32 KB too low. A photo showed 49 KB. ESP-IDF sets the minimum of a heap added after start-up to 0 (heap_caps_init.c, lines 325 to 332, in ESP-IDF 6.1). The 32 KB internal reserve is added that way, so the summed minimum always counted that pool as empty. 4aeff43 restarts the minimum count early in the boot. RAM use stays the same. Only the figure changes.

What you see on the board

  • The firmware reads "OpenCarMind EdgeOS 2.0.0" on the boot line, in Settings and on the Board page. The desktop app sees fw=EdgeOS-2.0.0.
  • The Board page's header shows the runlevel and the health at the top right, for example "Parked, health good" in green. Degraded is amber and bad is red. The events list gets "Boot health: good" or the reasons, such as "Boot health: degraded: NAND not mounted".
  • Wi-Fi stays off for about the first minute after a start. Then the automatic clock sync runs, and on a board whose clock is not set the first sync follows about 20 s later.
  • A refused change says why. During a drive: "A drive is active. End the drive first, then switch models." For other actions during a drive: "Not now: a drive is running. Try again later." When the car's computer answers but no drive is recorded yet: "Not now: the car link is up. Try again later." The USB door answers "ERR busy: a drive is running, try again when parked".
  • The ladder and the battery write events such as "Model deadlines: UI slowed", with the miss count, or "Battery hot (45.0 C on USB): load shed".
  • The Board page's battery card shows the current, "on USB" or "on battery", the gauge temperature, and "uncalibrated" with the cycle count until the gauge is set up for the 65 mAh cell.

The user manual lists every message with what to do about it.

Changes after the board check

Four changes were merged after the board check, at 06ddf1d. Each is built and host-checked, not yet seen on the board. Pairing now asks you first and only at a strong signal, Driving starts only when the car's computer answers, the screen names the models instead of showing a hash, and no text is smaller than 16 px.

Stats for nerds (the four changes in detail)
  • Pairing asks you first, and only at a strong signal. On the bench, the board kept trying a neighbour's adapter at -88 to -90 dBm: 35 connect attempts in about 16 minutes, all failed. With no saved adapter, the old rule took any device that looked like an OBD adapter at -90 dBm or better and saved the first one that answered. Now a new adapter is offered only at -70 dBm or better (CONFIG_OBD_BLE_PAIR_MIN_RSSI), and nothing is saved until you say yes. The Mosaico shows "OBD adapter found: , signal strong. Use this adapter?" with "Not this one" and "Use this adapter", and counts down 30 s. The automatic search never replaces a saved adapter. The paired adapter still connects down to -90 dBm, so it works at the edge of range. All of this sits behind one Kconfig switch, CONFIG_OBD_BLE_PAIR_CONFIRM. It is on by default for the Mosaico and off for the ESP32-S3, which keeps its tested rule until the owner tests the new prompt on an S3. With the switch off, the pairing code is compiled out, and the S3 image equals the 4aeff43 S3 image except the build time, the ELF SHA-256 and the image's checksum and hash (host-checked on the Mac by a section-by-section compare, 68 bytes of the .bin differ, all in those fields). For the S3 the prompt is planned for a later release: "Use ?" and "Strong. Tap = use it", with a BOOT tap within 5 s as the yes. To try it, add CONFIG_OBD_BLE_PAIR_CONFIRM=y to sdkconfig.defaults.esp32s3. make -C tests/host pair checks the rule with the switch off and on.
  • Driving starts only when the car's computer answers. The same neighbour's adapter kept putting the board into Driving for short spells, a median of about 4 s and at most 14 s, because connect attempts counted as Driving. Now the board is Driving only once the car's computer answers and rows are logged. Searching, connecting and an adapter in a parked car with the engine off keep it Parked.
  • Model names on the screen. The model's file shows as "ev-frozen" for E.V and "active-estimator" for R.E.V, where the screen showed a 12-character hash before. The hash stays in the logs, the session files and the USB door.
  • No text smaller than 16 px. The screen used 12 px and 14 px text in places. NHTSA's driver-interface guidance (DOT HS 812 360)[14], following ISO 15008, asks for capital letters of at least 16 arcminutes for urgent text and 12 arcminutes for the rest, with 20 arcminutes as the best size. On this 2.16 inch, 480 × 480 screen, 16 px text has capitals about 1 mm tall. At about 65 cm from your eyes, that is about 5 arcminutes. So 16 px is the smallest size the screen uses, and even that is small for a driver. That is why the Drive screen and the alarm banner keep a few big items. The alarm banner's headline is now 32 px. The Board page now scrolls.

Pairing safety

The saved adapter used to be known by its Bluetooth address alone. A device that copies that address could connect with no question, and the Bluetooth stack paired it again by itself when it claimed to have lost its key. Three rules close that on the Mosaico. The S3 build does not change. The board keeps a fingerprint of your adapter, asks you before it pairs again, and refuses a Wi-Fi time that jumps more than 24 hours ahead or 10 minutes back.

Stats for nerds (the three rules and their tests)
  • Adapter fingerprint. On the first link after you say yes to an adapter, the board saves a fingerprint in NVS. It is one 32-bit hash each for the address type, the advertised name, service UUIDs and maker id, the serial line it uses, and the ATI and AT@1 replies. The car's protocol is kept too, as a soft field. The VIN is not part of it. No raw reply is stored or logged, only an 8-digit hash id. On every later link the board compares. A match changes nothing. A difference keeps the drive logged, marks it "adapter_check": {"result": "changed"} in its session file, and gives the R.E.V learner and the pattern model none of its rows. When parked, the board asks "This adapter looks different. Use it?" Use it saves the new fingerprint. Not this one drops the link and leaves the saved adapter alone for 10 minutes. While driving the link is never cut, and the question waits until you park. Fields that change on their own are left out or compared only when both sides have them: the signal, the advert flags, the bytes after the maker id, which packet kind carried a field (advert or scan response), case and spaces in the replies, and a missing AT@1 reply. A different protocol alone (the adapter moved to another car) is noted, not counted as a change.
  • No silent re-pair. In ESP-IDF 6.1 the NimBLE stack starts a new pairing by itself when the adapter refuses the saved key (BLE_RESTART_PAIR is fixed at 1 in esp_nimble_cfg.h), and the BLE_GAP_EVENT_REPEAT_PAIRING event the old code handled never reaches a central. So the board copies the saved key when the link comes up and compares it after encryption. A new key is a re-pair. When parked, the board holds the link with no data and asks "The adapter asks to pair again. Allow?" Allow keeps the new key. Don't allow, or no answer in 30 s, puts the old key back, drops the link and waits 10 minutes. While driving, the board puts the old key back, keeps the link, marks the rows and logs "Re-pair refused (driving)". The event handler follows the same table. The session file counts the events.
  • Clock jump guard. When the clock came from Wi-Fi, a new network time more than 24 hours ahead or more than 10 minutes behind is refused, and the events say "Clock sync refused: N min ahead" (or behind). A clock set by hand, an estimated clock and no clock at all are not guarded. The 2026 to 2099 range check stays.

make -C tests/host guard checks the fingerprint, both decision tables and the question, and audits the glue in the sources. make -C tests/host clock checks the jump guard.

Pairing with a real LELink has not been checked on this board yet.

Flash it, or go back to mossREV 1.2.0

Flashing needs no buttons. Open the board's USB port at 1200 baud, then write the merged image with esptool 5.6.0 or later. docs/MOSAICO.md has the commands. The merged image erases the NVS partition, so the pairing with the desktop app, the saved Wi-Fi networks and the settings go, and you pair again. It does not write the drive logs on the NAND or the flash FAT's state files.

The released image is OpenCarMind-EdgeOS-2.1.0-ESP-Mosaico-ESP32-S31-merged.bin on the EdgeOS 2.1.0 release, with an app-only image and SHA256SUMS beside it. To keep the pairing and settings, write only the app parts, as the release notes say. The 2.0.0 board check ran on EdgeOS-2.0.0-esp32s31-merged.bin, built from 4aeff43 (SHA-256 starts a225125d27f3906c), which was never published.

To go back, flash the mossREV 1.2.0 merged image the same way. Going back is not yet verified on the board.

Prepared but off: A/B rollback and the battery as a UPS

Two parts are built into 2.0.0 and switched off by default. A/B rollback waits for a change to the flashing flow, and the battery as a UPS waits until the board's real draw and the gauge's current sign are measured.

Stats for nerds (how each would work and why it is off)
  • A/B rollback (CONFIG_OCM_APP_ROLLBACK). The flash has two 6 MB app slots. With ESP-IDF's app rollback, a new image gets one boot to confirm itself. A good or degraded health verdict would confirm it, and a bad one would reset into the other slot through sys_reset. It stays off because today's flashing writes slot 0 with esptool and leaves otadata erased, so no image is ever in the state that arms the rollback. Turning it on needs a change to the flashing flow first, and that is the owner's decision.
  • The battery as a UPS (CONFIG_OCM_UPS). Two gauge readings in a row at or below −20 mA would mean USB is gone: flush the logs, dim the screen, refuse changes, and wait 15 s, because cranking the engine drops the car's USB for a few seconds. Then quiesce the storage and pull GPIO57 low, the board's power-switch request. At 3.4 V on battery it would act at once. It stays off until the board's real draw and the gauge's current sign are measured. The power-off through GPIO57 for the battery protection (CONFIG_OCM_BATSAFE_POWER_OFF) waits for the same check.

What is verified on the board

Two board passes ran. VERIFIED means a board log line shows it. Of the 28 rows from those two passes, 21 are VERIFIED (6 of those on a scratch build), 3 PARTLY and 4 NOT: not run yet, or switched off in this release. The three figures below show the main results. A third pass is running on build 13757fd, which adds the AI services and pairing safety. Of its 8 rows, 4 are VERIFIED so far, 3 are being checked, and 1 is for the intrusion detector, which was not in the firmware at that build. It ships in EdgeOS 2.1.0 as the network guard.

Stats for nerds (the builds checked, their hashes and the host tests)

The first ran on OpenCarMind EdgeOS 2.0.0 4aeff43 (SHA-256 a225125d27f3906c...), the second on 06ddf1d, which adds the pairing change, the 16 px text and the model names (merged image SHA-256 4cc402a76a53edc2...). The release image in this branch is rebuilt from its tip, whose Mosaico code equals 06ddf1d apart from the Home card fix in ce58ca7. Some rows ran on a scratch build of the 2.0.0 code with one test switch on, and the row says so. A scratch build is never shipped. Host tests pass for every part: make os (41,635 checks at 4aeff43, 41,719 with the pairing change), make pair, make ppa, make uimetrics and the source audits in tests/host/os_audit.sh.

Boot and runlevels on the board. The release boot on 4aeff43, in seconds after power-on: running at 4.3 s with Wi-Fi held, boot health good at 68.0 s with Wi-Fi released and 128.9 KB of internal RAM free, the Wi-Fi driver up at 88.1 s, the clock synced at 98.0 s, the driver down at 106.5 s. If health is bad, on a scratch build forced bad: safe mode, Wi-Fi held, and Sync clock now still starts it by hand. The runlevels seen in the tests: Parked. Driving on a forced drive. Saving when the battery was hot at 34.2 °C, back to Parked when it cooled to 33.7 °C. Safe mode on a forced bad health check. Refused while Driving: the USB door answered ERR busy, and the screen said Not now: a drive is running for the clock sync and Format.

The release boot holds Wi-Fi until the health check says the board is good, then joins, syncs the clock and stops the radio again. The runlevels in the lower half come from forced tests on scratch builds.

Degradation ladder and battery protection, both forced tests on scratch builds. Ladder with extra model load, in seconds after power-on: UI slowed at 110.6 s after 2 misses, learner paused at 122.6 s after 6, model paused at 134.6 s after 10, then one rung back at a time: model back at 214.6 s, learner back at 278.6 s, normal at 348.6 s. Battery protection at test limits: at boot on USB, 34.2 °C sheds load into Saving with Wi-Fi off, the learner paused and the screen dimmed, and 33.7 °C returns to Parked. 4,188 mV from Parked stops the board as a charger fault with the logs flushed and the storage stopped. With the limit lowered to 26 °C, 28 °C stops it as critical, with no power-off. The real limits of 45 °C, 60 °C and 4.25 V were not reached.

In this EdgeOS 2.0.0 test the ladder dropped the screen rate first and the model last, and climbed back one rung per minute without misses. In EdgeOS 2.1.0 the AI services slow before the screen. The battery figures are test limits, and the real 45 °C, 60 °C and 4.25 V were not reached.

Internal RAM per phase, the lowest free internal RAM in each of 9 phases on a debug build of 4aeff43, in KB: first minute before Wi-Fi 124.4, first Wi-Fi round with the adapter search 81.0, adapter search alone 110.3, adapter search and Sync clock now together 80.9, Sync clock now alone 81.0, Wi-Fi search 86.7, theme switch 110.2, switch to E.V 100.0, launcher slide 110.0, all above the 60 KB target. Below it, the 28 rows of the board table: 21 verified, 3 partly, 4 not run or off in this release.

Every phase stays above the 60 KB target. The lowest is 80.9 KB, with an adapter search and a clock sync running at once.

Limitations and future work

  • Torque is a physics estimate, not a measurement, checked against one public car and for petrol engines only. R.E.V learns the engine size it uses, about 2.1 L from my car's last two drives, but not the torque itself. Cars that report torque (PIDs 0x62 and 0x63) could give a learned torque read-out its label, the way the fuel read-out learns now, and then the physics would not be needed. That is planned, not built or tested. My Sentra and most pre-2020 cars report no torque, so there is no label, and physics, or the ESP-Mosaico's accelerometer as a label, stays needed there.
  • The classifier and brake pressure do not learn in the car yet. Accelerometer labels on the ESP-Mosaico and a self-check that forecasts the next moment are the routes being worked on.
  • No Wi-Fi upload yet. It is being reworked so a lost packet on weak home Wi-Fi does not stall every file, as in QUIC[13]. Until then drives come over the USB cable.
  • The clock is only as exact as one second, and it needs a known Wi-Fi network within reach.

Planned

  • A build without a display.
  • Code-signed installers.
  • A test drive of the corrected R.E.V, and learning each car's closed-throttle position on the board.
  • A manoeuvre forecast as a self-check, so the classifier can learn in the car.
  • More regularised models, to fit more cars.

References

[1] J. Lin, W.-M. Chen, Y. Lin, J. Cohn, C. Gan and S. Han, "MCUNet: Tiny deep learning on IoT devices," in NeurIPS, 2020. arXiv:2007.10319

[2] R. David et al., "TensorFlow Lite Micro: Embedded machine learning on TinyML systems," in Proc. MLSys, 2021. arXiv:2010.08678

[3] C. Banbury et al., "MLPerf Tiny benchmark," in Proc. NeurIPS Datasets and Benchmarks Track, 2021. arXiv:2106.07597

[4] C. L. Liu and J. W. Layland, "Scheduling algorithms for multiprogramming in a hard-real-time environment," Journal of the ACM, vol. 20, no. 1, pp. 46–61, 1973. doi:10.1145/321738.321743

[5] M. Joseph and P. Pandya, "Finding response times in a real-time system," The Computer Journal, vol. 29, no. 5, pp. 390–395, 1986. doi:10.1093/comjnl/29.5.390

[6] Espressif Systems, "ESP-DL: Espressif deep-learning library for AIoT applications." github.com/espressif/esp-dl

[7] B. I. Kwak, J. Woo and H. K. Kim, "Know your master: Driver profiling-based anti-theft method," in Proc. PST, 2016, pp. 211–218. arXiv:1704.05223

[8] G. Oh, D. J. LeBlanc and H. Peng, "Vehicle Energy Dataset (VED), a large-scale dataset for vehicle energy consumption research," IEEE Transactions on Intelligent Transportation Systems, 2020. arXiv:1905.02081, data and licence (Apache-2.0) at github.com/gsoh/VED

[9] J. Kirkpatrick et al., "Overcoming catastrophic forgetting in neural networks," PNAS, vol. 114, no. 13, pp. 3521–3526, 2017. arXiv:1612.00796

[10] B. Kovačević, Z. Banjac and I. Kostić Kovačević, "Robust adaptive filtering using recursive weighted least squares with combined scale and variable forgetting factors," EURASIP Journal on Advances in Signal Processing, 2016. doi:10.1186/s13634-016-0341-3

[11] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh and D. Batra, "Grad-CAM: Visual explanations from deep networks via gradient-based localization," in Proc. ICCV, 2017. arXiv:1610.02391

[12] Espressif Systems, "ESP-Mosaico," esp-dev-kits documentation. docs.espressif.com

[13] J. Iyengar and M. Thomson, Eds., "QUIC: A UDP-based multiplexed and secure transport," RFC 9000, IETF, 2021. rfc-editor.org

[14] J. L. Campbell et al., "Human factors design guidance for driver-vehicle interfaces," Report DOT HS 812 360, National Highway Traffic Safety Administration, 2016. nhtsa.gov

[15] J. Zhang, Z. Qu, C. Chen, H. Wang, Y. Zhan, B. Ye and S. Guo, "Edge learning: The enabling technology for distributed big data analytics in the edge," ACM Computing Surveys, vol. 54, no. 7, art. 151, 2021. doi:10.1145/3464419

[16] T. Scheffer, C. Decomain and S. Wrobel, "Active hidden Markov models for information extraction," in Proc. Intelligent Data Analysis (IDA), LNCS 2189, 2001. doi:10.1007/3-540-44816-0_31

[17] H. Robbins and S. Monro, "A stochastic approximation method," The Annals of Mathematical Statistics, vol. 22, no. 3, pp. 400–407, 1951. doi:10.1214/aoms/1177729586

[18] I. Žliobaitė, A. Bifet, B. Pfahringer and G. Holmes, "Active learning with drifting streaming data," IEEE Transactions on Neural Networks and Learning Systems, 2014. doi:10.1109/TNNLS.2012.2236570

[19] D. Yoo and I. S. Kweon, "Learning loss for active learning," in Proc. CVPR, 2019. arXiv:1905.03677

[20] S. Dasgupta, "Two faces of active learning," Theoretical Computer Science, 2011. cseweb.ucsd.edu

[21] G. L. Plett, "Extended Kalman filtering for battery management systems of LiPB-based HEV battery packs: Part 3. State and parameter estimation," Journal of Power Sources, vol. 134, no. 2, pp. 277–292, 2004. doi:10.1016/j.jpowsour.2004.02.033

[22] S. J. Julier and J. K. Uhlmann, "Unscented filtering and nonlinear estimation," Proceedings of the IEEE, vol. 92, no. 3, pp. 401–422, 2004. doi:10.1109/JPROC.2003.823141

[23] G. Revach, N. Shlezinger, X. Ni, A. L. Escoriza, R. J. G. van Sloun and Y. C. Eldar, "KalmanNet: Neural network aided Kalman filtering for partially known dynamics," IEEE Transactions on Signal Processing, vol. 70, pp. 1532–1547, 2022. arXiv:2107.10043

[24] S. C. Tan, K. M. Ting and T. F. Liu, "Fast anomaly detection for streaming data," in Proc. IJCAI, 2011, pp. 1511–1516. ijcai.org

[25] Q. Ma, S. Muthukrishnan and M. Sandler, "Frugal streaming for estimating quantiles: One (or two) memory suffices," 2014. arXiv:1407.1121

[26] B. Saha and K. Goebel, "Battery data set," NASA Prognostics Data Repository, NASA Ames Research Center, Moffett Field, CA, 2007. nasa.gov

[27] T. Bravenec, J. Torres-Sospedra, M. Gould and T. Fryza, Supplementary materials for "UJI Probes: Dataset of Wi-Fi probe requests," Zenodo, 2023. Licence CC BY 4.0. doi:10.5281/zenodo.7801798

[28] T. Bravenec, J. Torres-Sospedra, M. Gould and T. Fryza, Supplementary materials for "What your wearable devices revealed about you and possibilities of non-cooperative 802.11 presence detection during your last IPIN visit," Zenodo, 2022. Licence CC BY 4.0. doi:10.5281/zenodo.6798302

The UJI Probes and IPIN2021 probe-request captures are © T. Bravenec, J. Torres-Sospedra, M. Gould and T. Fryza, used under CC BY 4.0. Only windowed counts derived from them were used, on the Mac, and nothing from them is in this repository.

Repository layout

Path What it holds
main/ firmware source
ml/onboard/ the shipped models (CarMind E.V, and CarMind R.E.V in rev/)
samples/replay/ two replay sessions from a public dataset, in the board's file format
schema/ JSON schema of the session files
tests/host/ unit tests that run on a computer, including R.E.V's learners
tools/ ocm_report.py and the model header generator
desktop/ the desktop app (Rust and Tauri)
dashboard/ Docker Compose file and Dashy configuration
docs/ configuration, model notes, field checks, screen designs and figures
docs/manual/ the user manuals in Markdown, the source of their pages on the documentation site
docs-src/ the documentation site (Sphinx, MyST and pydata-sphinx-theme), built from the Markdown in this repository

Credits and licence

OpenCarMind is released under the MIT licence (see LICENSE). ESP-IDF, ESP-DL, LVGL and NimBLE keep their own licences. The training data of the shipped models is not part of this repository. The replay samples also use the carOBD dataset, https://github.com/eron93br/carOBD. See samples/replay/README.md for its terms.

About

Open-source OBD2 logger and dashboard for the ESP32-S3, with TinyML on the chip. Bluetooth LE ELM327 adapters, SD card, desktop app. No phone, no cloud.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages