OpenCarMind EdgeOS is the build of OpenCarMind for Espressif's ESP-Mosaico touch-screen board. OpenCarMind itself is an open-source OBD2 logger for the ESP32 that runs a small neural network on the chip. EdgeOS adds a thin operating-system layer on top of FreeRTOS whose job is to keep that network, the OBD poll and the screen from getting in each other's way.
It sits alongside the other on-device tools in our guide to open-source AI software.
It is not a new kernel. FreeRTOS, as ESP-IDF 6.1 ships it, still schedules the tasks on the ESP32-S31's two cores. EdgeOS is a set of rules 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 board task, the screen task, the USB door and the scheduler monitor that were already there.
Why a car logger needs deadlines
A logger in a car has one job that can't slip: write the drive down. Everything else is a guest. The on-board model has to answer once a second, the learner updates part of the model while you drive, and the touch screen wants to stay smooth. On a microcontroller those all share two cores and a few hundred kilobytes of internal RAM.
The usual way to add a model to firmware is to start a task and hope. EdgeOS treats every model as a soft real-time job instead. A job has a period T (how often it runs), a deadline D (by when it must finish) and a worst-case CPU time C (the longest one run can take).
The admission check
When a model loads at boot, or when you switch models, the OS measures the model's self-test run and doubles it. One measured run is not a worst case, so the doubled figure becomes C. Then it runs the classic response-time analysis of Joseph and Pandya for every job on that core.
For a job i, its worst-case response time Rᵢ is its own CPU time plus the time stolen by every higher-priority job on the same core while it waits:
R_i = C_i + sum over j in hp(i) of ceil(R_i / T_j) * C_j
Here hp(i) is the set of jobs on that core with a higher priority than i. The ceiling term ⌈Rᵢ / Tⱼ⌉ counts how many times a higher-priority job j can be released while i is still waiting, and each release costs Cⱼ. Rᵢ appears on both sides, so the OS starts from Rᵢ = Cᵢ and repeats the sum until the value stops changing. Job i meets its deadline when Rᵢ ≤ Dᵢ.
If any job on the core would miss, the new model isn't admitted, and the switch is undone just like a failed load. You never end up with a model that quietly makes the drive log late.
What happens when deadlines slip anyway
Measurements on a real board drift. A busy Bluetooth link or a heavy screen can push timing past what the check predicted. When that happens EdgeOS steps down in a fixed order: first the screen refresh rate, then learning, then the model. The drive log is the last thing standing. Three bad restarts in a row put the board in a safe mode with logging on.
The new AI services in 2.1.0
EdgeOS 2.1.0 adds three small AI services that look after the board itself:
- A battery estimator. An extended Kalman filter on a one-RC cell model gives the state of charge. State of health comes from a full-to-cutoff count, or from a small regression on partial charges, because a board on the car's USB rarely runs flat.
- A battery fault check. A small autoencoder learns what normal looks like for your cell over its first 24 hours and raises an alarm when 60 seconds of readings stop looking normal. It never cuts power by itself.
- A network guard. An unsupervised detector watches for floods of new Bluetooth addresses and rotating Wi-Fi access points. It only learns for its first 2 hours in a place, and a block only does safe things, such as narrowing the scan to your paired adapter.
All three share one worker task at FreeRTOS priority 1, below the screen, the learner, the model and the OBD poll, and the same response-time check admits that worker. When the board is busy, the services are the first thing it slows. A Health app shows each one as a single card with a colour, a word and what to do.
What it costs
Against the previous Mosaico build, EdgeOS 2.0.0 added 25,840 bytes to the app image, which is 76% of the 6 MB app slot, and 2,074 bytes of static internal RAM. It added no tasks. The rules live in one plain C file with no ESP-IDF calls, so host tests on a computer check every rule: 41,719 checks with the latest pairing change.
The project is honest about what is still open. Of 28 checks from two board passes, 21 are verified by a board log line, and a third pass is running on the 2.1.0 build. The full tables, the figures and the flashing steps are in the OpenCarMind repository.
Try it
OpenCarMind is free and MIT-licensed. The ESP32-S3 firmware and the desktop app for Windows, macOS and Linux are on the releases page, and the OpenCarMind page has the features, the screens and what hardware you need.