Urban infrastructure
Parking sensors: the small magnet under the tarmac
A parking sensor is one of the least glamorous devices in the smart-city catalogue and one of the most consequential. It answers a single binary question — is there a car above me — and cities have found that knowing the answer, in aggregate and in real time, changes how traffic behaves.
How a sensor knows a car is there
The puck set into the tarmac is typically 10–15 cm across and sealed against water and crushing loads. Inside, one or two detection methods:
- Magnetometer — the workhorse. A car is a tonne and a half of steel, and it measurably distorts the Earth's magnetic field. The sensor holds a baseline of the undisturbed local field and watches for deviation. Cheap, very low power, entirely passive.
- Radar — a low-power radar looks upward for a reflecting surface. It handles the magnetometer's awkward cases: vehicles with little ferrous content, and bays beside steel structures that skew the baseline.
The hard part is not detection, it is drift. The local magnetic field changes with temperature, nearby construction, a new steel bollard, even a passing tram. Firmware therefore re-learns the empty-bay baseline continuously — which is also why a sensor can lose calibration if a car parks on it for a fortnight and the baseline slowly follows.
Getting the data out
Power is the binding constraint. These devices are battery-powered and buried in asphalt, so replacing a battery means cutting the road. Designs target five to ten years, which rules out anything power-hungry and dictates a low-bandwidth long-range radio and event-driven reporting: transmit on state change, not on a schedule. A bay nobody uses transmits almost nothing.
Why cities install them
The motivation is rarely parking itself — it is the traffic that searching for parking generates. Studies in dense urban centres have repeatedly attributed a substantial share of local traffic to drivers circling for a space. Cruising traffic is uniquely wasteful: slow, distracted, and concentrated exactly where pedestrian density is highest.
- Guidance — signs and apps directing drivers to blocks with availability, cutting cruising distance.
- Demand-responsive pricing — the influential idea, from San Francisco's SFpark programme, that price should be tuned to keep roughly one space free per block. Too full and drivers cruise; too empty and kerb space is wasted. Occupancy data makes that loop measurable.
- Enforcement — overstay detection without patrolling, which changes enforcement economics.
- Planning — long-run occupancy by hour and day is the evidence base for converting parking to bike lanes, loading bays or outdoor seating.
The trap in the data
Anyone consuming public parking feeds hits this, usually after the numbers stop making sense. Feeds that look interchangeable carry three genuinely different meanings:
- Bay occupancy — one sensor, one bay, value 0 or 1. Averaging across bays gives an occupancy ratio.
- Spaces available — a count of free spaces in a facility, often hundreds. Higher is emptier: the opposite polarity to bay occupancy.
- Spaces occupied — the same facility counted the other way. Higher is fuller.
Mixing them produces confident nonsense. Averaging a 2,000-space garage's free-space count with twenty single-bay street sensors lets the garage swamp the street entirely. The rules that avoid it are simple and worth stating plainly:
- Normalise to a ratio before aggregating anything. Never average a raw count with a binary state.
- Take the median across bays for a time slot, not the mean — one stuck sensor moves a mean and barely touches a median.
- Treat free + occupied = 0 as a dead feed, not as 0% occupancy. It is the most common way a broken sensor is read as a real reading.
- Weight by capacity when rolling up across sites, or a car park with six bays counts as much as one with six hundred.
Every parking dataset looks like a number until you ask which direction it points.
What comes next
In-ground sensors are increasingly complemented by cheaper approaches: camera-based bay detection covering dozens of spaces per unit, and inference from payment and permit systems. Each has a different failure profile — cameras struggle with occlusion and raise privacy questions a magnetometer never does; payment data misses anyone who parks without paying, which is precisely the population enforcement cares about.
The in-ground puck survives because it measures the physical fact directly, cheaply, and without seeing anything. For a device whose entire vocabulary is one bit, that is a durable position.
