WorkSilicon
Oshkidar
Real-time AI on a $2 microcontroller: radar classification that flushes only for the cat.
- 62
- engineered radar features, each documented with the physics of why it separates a cat from a ghost
- 1,500
- gradient-boosted trees classify every window as cat, person, refill water, ghost or empty
- 1 Hz
- real-time inference on the chip, over a sliding 8-second window of 10 Hz radar frames
- 343 KB
- of flash holds the whole model; a Bayesian tracker and a state machine decide when to flush
Oshkidar started as a household problem: a toilet that should flush after the cat has used it, and only for the cat. We took it on as a technical challenge: how much real-time machine-learning classification can run on a $2 microcontroller?
A 24 GHz mmWave radar on the cistern reports reflected energy in nine range gates, ten times a second. Once a second, the ESP32-C6 takes the last eight seconds of frames, subtracts the empty room’s own baseline and computes 62 features. Each feature carries a physical reason it should separate a cat from a person, the tank refilling, an empty room or a “ghost”: someone moving beyond the wall whose reflections flicker at the seat’s range. Gradient-boosted trees, 1,500 of them in 343 KB of flash, score every window across those five classes.
A window is evidence, not a decision. A Bayesian tracker holds a belief about who is in the room, with minutes of memory, and knows that its own flush is followed by a refill. A state machine decides when to flush, after the cat has left, and enforces a cooldown and a flush-rate limit.
The model is trained offline in Python on recorded radar days, validated one held-out day at a time and exported to C, and tests confirm the chip and the trainer compute the same answer. The device replaced a Raspberry Pi prototype and is in daily use; since July, the learned model has had the final say on every flush.

