# A parking sensor that spots free spaces on its own, in 15 milliseconds | OneStack

> Case study: a low-cost Edge AI parking sensor that detects free and occupied spaces on board, with accuracy well above ultrasonic sensors.

URL: https://www.onestack.it/en/case-studies/edge-ai-parking-sensor

[← All case studies](/en/case-studies)Smart buildings and parking

# A parking sensor that spots free spaces on its own, in 15 milliseconds

A low-cost device that processes the image on board and decides whether each space is free or occupied, with accuracy well above ultrasonic sensors. The network carries the state of the spaces and, where needed, one frame per second for basic video surveillance.

![3D render of the sensor board: microcontroller in the centre, signalling LEDs, two camera connectors and a power terminal block](/_astro/sensore-parcheggio.DeM-8RJd_6Eplz.webp)![](/_astro/sensore-parcheggio-xray.CxwkkiRl_L2cvg.webp)

≤ 15 ms

to decide on the device whether a space is free

2 cameras

handled by a single microcontroller

1 frame/s

only where basic video surveillance is needed

Sensor architecture

**Cameras**two per node · MIPI CSI

**ESP32-P4**per-space cropping · 32×32 network · decision in ≤ 15 ms

**Status LEDs**one per space

**Ethernet**where a cable can be run

**Radio chip**Wi-Fi where there is no cable · Bluetooth for ranging

**Management system**space status over REST · 1 frame/s on request

**Fleet management**dual-partition OTA · generated configurations

## The context

An indoor car park needed to know in real time which spaces are free, with signalling LEDs above each bay and data available to the management system. Ultrasonic sensors cover one space each; a camera sees several, but that usually means streaming video to a server for analysis.

## Constraints

-   **Low-cost hardware** with limited computing resources.
-   **A fast, reliable decision**, better than an ultrasonic sensor’s.
-   **Little bandwidth**: the network should carry the state of the spaces, not a continuous video stream.
-   **Connectivity wherever possible**: some sites can be cabled, others cannot.
-   **Many nodes on the same site**, installed and maintained remotely only.

## Technical choices, and why

**The decision on the device.** Each sensor processes its own image and decides in **15 milliseconds or less** whether each space is free or occupied. The server receives the result; it doesn’t have to analyse video.

**Crop before classifying.** Instead of analysing the whole image, the firmware crops every space in view, filters it and scales it down to 32×32 pixels. A tiny two-class neural network (free / occupied) is then enough, and it runs on the microcontroller in real time.

**Two cameras per node, one microcontroller.** With two cameras a single device covers twice the spaces and halves the installation points. In the first version the cameras were linked over UART to an ESP32-S3. In the current revision a single ESP32-P4 drives both cameras directly over MIPI CSI, with more computing headroom for processing.

**A chip dedicated to the radio.** The network runs over Ethernet where a cable can be run. Where it cannot, a secondary chip provides Wi-Fi, and the same chip offers Bluetooth for a range of ranging applications. The main microcontroller stays free for vision.

**One frame per second, only where needed.** Where the client wants a wider picture of what is happening, the node also sends one image per second for basic video surveillance. It is an option: space detection does not depend on the network.

**A fleet that configures itself.** Each node’s configuration (spaces, position, network) is generated automatically and written to non-volatile memory; nodes announce themselves on the network via mDNS. Firmware updates arrive via dual-partition OTA: if the new version fails to start, the node rolls back.

**A dataset-driven test bench.** Every new model version is checked against a set of reference images before being rolled out to the fleet.

## The result

Decisions on the device **within 15 ms**, with accuracy **well above traditional ultrasonic systems**, and sensors managed entirely remotely.

## What we bring to your projects

AI running on the microcontroller, image processing with limited resources, hardware with multiple connectivity options, firmware for device fleets and secure remote updates.

## Services

-   Firmware development
-   PCB design

## Technologies

-   ESP32-P4
-   ESP32-S3
-   MIPI CSI
-   ESP-IDF
-   FreeRTOS
-   TinyML
-   Image processing
-   Ethernet
-   Wi-Fi
-   Bluetooth
-   OTA
-   REST
-   mDNS

## More case studies

[

![3D render of the control board: microcontroller in the centre, connectors for the two isolated channels on the side, pluggable terminal blocks and power and service connectors](/_astro/interfaccia-rugged.CkQk4iYb_1A6Ozp.webp)![](/_astro/interfaccia-rugged-xray.CZb6dpZZ_Z1kxhOu.webp)

23 tests in ~75 s

Systems for harsh environments

### A rugged interface that updates in the field and never bricks

A portable, battery-powered unit that powers and controls two remote devices over isolated channels. The hard part was making it reliable far from any lab. Its firmware updates in the field and, if something goes wrong, rolls back on its own to the last working version.

Read the case →

](/en/case-studies/rugged-interface-secure-ota)[

![3D render of the measurement bench: the sensor under test and three boards inside a black anodised aluminium housing, with two BNC connectors and an M12 connector](/_astro/banco-sensore-capacitivo.DpjM9RDJ_2dpT9y.webp)![](/_astro/banco-sensore-capacitivo-xray.CdoncSBR_Z1LXalp.webp)

~1.4%

Test systems for high-reliability applications

### The test method would not have worked. We found out before building it

A bench that tells in seconds whether an electric-field sensor works, measuring capacitances of a few picofarads in air. The method planned at the start was ruled out with measurements, before any money went into hardware.

Read the case →

](/en/case-studies/capacitive-sensor-test)[

![3D render of the Bluetooth Channel Sounding anchor board: nRF54L15 SoC with chip antenna, accelerometer, power from USB-C or a 12–24 V terminal block](/_astro/ancora-ble.Ckke5SRn_1319HC.webp)![](/_astro/ancora-ble-xray.yah8tbey_Z2nf2oG.webp)

3 layers

Retail and large public spaces

### Indoor localization in shopping centres, without collecting personal data

Counting and following people flows in large public spaces, and locating with centimetre precision only what needs it. A three-layer architecture, each layer with the right radio technology.

Read the case →

](/en/case-studies/indoor-localization)

## Got a deadline?

Tell us about your project: within 48 hours you get a proposal with phases and dates. If needed, we sign an NDA before seeing your files.

[Request a proposal](/en/contact)[Urgent? Call +39 030 535 7183](tel:+390305357183)
