Embedded Systems & Product Development Consultancy · London, UK
Smart parking from sensor to cloud: nRF52840 firmware, Bluetooth mesh and Firebase
An automation company was developing a smart parking system: a thin sensor fixed to the middle of each parking bay that detects a vehicle with mmWave radar and reports it to the cloud. We wrote the firmware for the sensor and for the Bluetooth mesh network that carries its messages, extended the network’s range with Nordic’s nRF21540 front-end, made the solar-charged sensor work within the energy of a small battery, and connected the gateway to Google Firebase. The system was installed on site for a pilot.
At a glance
- Industry: Smart parking, remote monitoring
- Client: An automation company
- Location: London, United Kingdom
- Our role: Firmware for the parking sensor, mesh relays and gateway; Bluetooth mesh network; mesh relay with nRF21540 RF front-end; low-power design and energy measurement; gateway API to Google Firebase
- Platform: Nordic nRF52840 with Zephyr RTOS (nRF Connect SDK); Nordic nRF21540 RF front-end
- Key technologies: C/C++, Zephyr RTOS, nRF Connect SDK, Bluetooth LE, Bluetooth mesh, mmWave radar, nRF21540, Wi-Fi, Google Firebase, solar charging, Li-Po, battery analyser, RF measurement
- Services: Embedded software & firmware · Hardware/software integration · Embedded debugging & troubleshooting
- Outcome: Installed on site for a pilot, with bay sensors reporting over Bluetooth mesh and a Wi-Fi gateway to the cloud
The challenge
Each parking sensor is a thin, round unit about 15 cm across, fixed to the surface in the middle of a bay. There is no cable to it, so it runs on a small Li-Po battery charged by a solar cell, and every milliwatt counts. It has to notice reliably when a car arrives or leaves and report the change promptly, without spending the energy it needs to keep going through dull days.
The sensors are spread across a site, and a parking area full of cars and buildings is a hard place for low-power radio. The system needed a network that could reach every bay, carry each sensor’s messages to a single point, and pass them to the cloud, with no extra wiring on site.
Our role
We developed the firmware in C and C++ on Zephyr RTOS with Nordic’s nRF Connect SDK: for the parking sensor, for the mesh relays and for the gateway. We designed the relay with an nRF21540 RF front-end to extend the network’s range, worked on the sensor’s power budget with long-running energy measurements, and wrote the API that connects the gateway to Google Firebase. We also wrote the engineering references on the firmware architecture, validation, debugging and power consumption, so the client’s team could carry the product forward.
System architecture
Every parking sensor is a node in a Bluetooth mesh network. When its mmWave radar detects a change in the bay, the sensor sends a mesh message; relays across the site pass it on, and a gateway at the edge of the mesh forwards it over Wi-Fi to the client’s Firebase back end.
- Parking sensor: a Nordic nRF52840 running Zephyr, with an mmWave radar to detect a vehicle, a solar cell and a small Li-Po battery. It joins the mesh as a node.
- Mesh relays: several relays across the site forward messages through the network. The last relay before the gateway carries an nRF21540 RF front-end for extra range.
- Gateway: a mesh relay with its own nRF21540 front-end and Wi-Fi, running the API that sends parking data to Google Firebase.
- Cloud: the client’s Google Firebase back end, which receives the occupancy data.
Bluetooth mesh with Nordic’s engineers
The mesh runs on the Bluetooth mesh stack in Nordic’s nRF Connect SDK, which was new at the time. Our implementation was an early one, built together with Nordic Semiconductor’s field application engineers. Using a mesh meant that sensors anywhere on the site could reach the gateway through the relays, instead of each needing its own link to the internet.
Extending the range
The hardest links are the long ones at the edge of the mesh, so the last relay and the gateway carry Nordic’s nRF21540 RF front-end. Depending on how crowded the surroundings are, it extends the range by up to 500–600 metres. We measured and tuned the radios with RF test equipment, including the sensors’ Bluetooth advertising performance.
A small battery and the sun
With only a small Li-Po battery and a solar cell, the sensor’s energy budget leaves little room for error. We designed a firmware state machine that controls when the radar and the radio are active, and checked the budget with long-running measurements on a battery analyser, so the sensor can keep reporting on the energy it collects.
Results
- Installed on site and run as a pilot, from bay sensors through the mesh to Firebase.
- An early nRF Connect SDK Bluetooth mesh implementation, built with Nordic’s field application engineers.
- Up to 500–600 metres of extra range from the nRF21540 on the last relay and the gateway.
- A solar-charged sensor with its energy budget measured over long runs.
- Engineering references for the firmware architecture, validation, debugging and power consumption.
Need devices to talk across a whole site?
Tell us how far apart they are and what they have to report.
An engineer will read it and reply within one business day.
Latest from the blog
SLAM in a living room: how a robot vacuum builds a map
November 24, 2026
2.3K zones: what a robot sees in 3D with ST’s VL53L9
November 10, 2026
Ultra Low Power Microcontrollers: STM32L5 Series
March 7, 2020