Presence Radar for an Elevator Advertising Monitor: Module, Test App and Config Tool
I connected a 24 GHz radar sensor to the Android board of an elevator monitor (by reading the OS logs over the debug pins) and built the ready module, an Android test app and a desktop config program.
Overview
This project is for an elevator advertising monitor. The monitor must know if somebody is inside the elevator or not, so that it plays the ad at the right moment and pauses it when nobody is there. For that, a 24 GHz radar sensor for human presence was connected to the Android board of the monitor. My job was to connect this sensor to the board and build its software: a ready-made module that the client's team uses in their own application, a test app on the same board, and a desktop program to configure the sensor.
Why radar?
An elevator is a small closed space and a camera raises privacy questions. A radar takes no picture and no sound; it only senses motion and even still presence (someone standing without moving), and it works from behind a plastic cover. "Moving" and "standing still" are reported separately.
What I built
Connecting the sensor to the board. The Android board had little documentation for this. I connected a terminal to the debug pins (UART) on the board, read the logs of the operating system, and from them worked out which serial port of the board is free and how to connect the sensor to it. The result is a stable connection on a serial port of the board at 115200 baud.
The sensor software module. A JavaScript module that opens the port, understands the protocol of the sensor (command frames and report frames), turns the raw data into a usable state (is somebody there, the distance, moving or still), and reads the settings of the sensor. It is written separate from the interface so the client's team can use it directly in their own app.
The test app on the board. An Android app that runs on the same board and shows the module: "human presence" in colour and plain text (DETECTED or NOBODY), the distance in centimetres, the status (moving, still or both), the sensor settings, and the raw data stream with start and stop buttons. It was used to demonstrate the sensor to the client and to test on the real device.
The desktop program to configure the sensor. A program with a dark interface that connects to the sensor through a USB-to-serial adapter. With it you pick the port and speed, read the parameters from the sensor, set the maximum detection range (in steps of about 75 cm) and the "nobody" time, set the motion sensitivity and the still-presence sensitivity separately for every distance, and change the communication speed of the sensor itself.
Helper tools: Python scripts to program the settings in batch and to verify the settings on the sensor, and a diagnostic tool that shows the motion energy and the distance live.
The diagram below shows the parts.
Tuning for an elevator
The radar divides the distance into several "gates" and every gate can be set separately. In an elevator I keep the range short so that only the inside of the cabin is seen and someone walking by outside the door is not counted, and I lower the sensitivity of the far gates. The "nobody" time is also set so that, when the last person leaves, the ad does not switch on and off abruptly. During the installation study I also looked into how to build the cover in front of the sensor (the material, the distance and the thickness that suit this frequency).
Hardware comparison for production
For the next step I also wrote a technical proposal that compares the current board with industrial boards made for advertising monitors, for mass production, looking at stability, 4G support and cost, and with two proposed phases: a prototype on the current board and production on an industrial board.
Specifications
Sensor: a 24 GHz presence radar (LD2410C model), serial interface
Board: an Android board with LVDS and MIPI outputs and a serial port
App and module on the board: React Native (Expo) and JavaScript
Desktop program and tools: Python, Flet interface
Link: UART at 115200, binary commands with a header and a footer
Result
A complete presence-detection system for an elevator, from the hardware connection and finding the way to talk to the board, to a ready module for delivery, a test app on the device and a desktop configuration tool.
Gallery
BLOG
Related posts
Questions about this project?
If you have questions about this project, or a similar one in mind, I would be glad to hear from you.