LD2450 Radar Sensor Library for Proteus Simulation: the LD2450 radar, an I2C LCD 16x2 and two LEDs on an Arduino UNO V4.0

LD2450 Radar Sensor Library for Proteus Simulation

1 View
40
700
60
25
60
PCBWay

Hello friends, I hope you all are doing great. Today, I am going to share the new LD2450 Radar Sensor Library for Proteus Simulation. Most presence sensors only tell you that somebody is there. The LD2450 is a 24 GHz radar that tells you where: up to three people at once, each with an x and y position in millimetres and a speed, ten times a second, over a simple UART. With this library you can run a full Proteus simulation of that radar, read its frames with an Arduino, decode its unusual sign format, send it commands and mask a fan with its zone filter.

LD2450 radar sensor Proteus simulation with an Arduino UNO: people tracked, the desk and room LEDs and the LCD
Figure: The LD2450 simulation running: people walk in, one sits at the desk, the LCD counts them.
Updates

LD2450 Radar Sensor Library for Proteus

Latest version: V1.0 (December 2026, this tutorial)

Helping Tools

The demo is a desk occupancy and room light controller: an Arduino UNO V4.0 tracks the people in a room, switches the room light while anyone is there, lights a desk LED while someone sits at the desk and shows the count and the nearest person on a 16x2 LCD.

NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the motion sensor board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the LD2450 Radar Sensor Library for Proteus Simulation:

LD2450 Radar Sensor Library for Proteus Simulation: the LD2450 radar, an I2C LCD 16x2 and two LEDs on an Arduino UNO V4.0
Figure: The LD2450 Radar Sensor Library for Proteus Simulation.

What Is the LD2450 Radar?

The LD2450 is a small 24 GHz FMCW radar module, 15 x 44 mm. On its front are three rows of patch antennas - one that transmits and two that receive - and the radar chip; on the back a microcontroller, a regulator and the connectors. Because it has two receive antennas a little apart, it can measure not only how far a reflection is but also from which angle it comes, and so turn every person into an x / y position. It sees ±60 degrees left and right and ±35 degrees up and down, and tracks people to about 6 m.

  • Supply 5 V; give it more than 200 mA (about 120 mA on average).
  • A UART at 3.3 V levels, 8N1, 256000 baud from the factory.
  • A 4-pin socket on the back: 5V, RX, TX, GND.
  • Mount it on a wall, upright, 1.5 - 2 m high, the antennas facing the room.

The coordinates are measured from the radar: y is the distance straight out into the room, always positive; x is left or right, positive to the right when you face the radar. The speed is positive when a person moves away.

The Data Frame

The radar sends a frame every 100 ms without being asked. It is always 30 bytes:

  • AA FF 03 00 - the header.
  • Three targets of 8 bytes each: x (mm), y (mm), speed (cm/s) and the distance resolution (mm), each 16 bits, low byte first.
  • 55 CC - the end.

An empty slot is all zeros. The surprise is the sign: x, y and the speed are not two's complement. Bit 15 = 1 means the value is POSITIVE and the number is the other 15 bits; bit 15 = 0 means it is negative. The manual's own example, 0E 03 B1 86 10 00 40 01, is x = -0x030E = -782 mm, y = 0x86B1 - 0x8000 = 1713 mm, a speed of -16 cm/s and a resolution of 320 mm.

Commands and the Zone Filter

Commands go the other way in frames of their own: FD FC FB FA, the length, a 16-bit command word, the value and 04 03 02 01. The radar answers each with an ACK - the command word with 0x0100 added and a status, 0 for success. Every session starts with 0x00FF (enable configuration) and ends with 0x00FE; in between the radar sends no data frames.

  • 0x0080 / 0x0090: single-target or multi-target tracking (three, the default).
  • 0x00A0: the firmware version; 0x00A5: the MAC address.
  • 0x00A1: the baud rate, from 9600 to 460800 - it takes effect after a restart (0x00A3).
  • 0x00C2: the zone filter - type 1 reports only targets inside the zones, type 2 ignores targets inside them; up to three rectangles, given by two corners in mm.

The zone filter matters more than it looks. A radar sees everything that moves: a pedestal fan swinging its head, a curtain in the draught, a plant, a pet. Draw a rectangle around the fan with type 2 and it disappears from the frames. Note that the zone corners are ordinary two's complement numbers, unlike the frame's coordinates.

Features of the LD2450 Library

  • A real-looking module: the radar at its true size with its transmit and receive antennas and the chip; the transmit antenna glows while it runs.
  • The protocol of the manual: the 30-byte frame every 100 ms with the bit-15 sign, and the command frames with their ACKs.
  • The commands: configuration, single / multi target, query, firmware, baud with a restart, factory reset, Bluetooth, MAC and the zone filter.
  • Three slots: each person keeps a slot while seen; moving people come before still ones when there are more than three.
  • The field of view: ±60 degrees and the range edge.
  • A pop-up: the room from above with the field of view, the zones and every target; the last frame byte by byte and decoded; graphs, an event log and a check page.
  • A complete package: about 2.4 MB with the library, our I2C LCD, resistors and LEDs, our Arduino UNO V4.0 and the demo, without the source code of the model.

The LD2450 in Proteus

The device is LD2450TEP in TEPLD2450.LIB, under Modules > Sensors, with the model TEPLD2450.DLL. Search LD2450 or radar in Pick Devices. Its four pins are the module's socket. Its properties: PROFILE (DEMO or STEADY), BAUD - the rate the module is set to, 256000 from the factory - and X and Y for one steady person.

LD2450 24 GHz radar module from the LD2450 Library for Proteus Simulation, with its patch antennas and the 4-pin socket
Figure: The LD2450 radar.

Download LD2450 Radar Sensor Library for Proteus Simulation

Click the button below to download LD2450-Radar-Sensor-Library-for-Proteus-v1.0.zip (about 2.4 MB, without the source code of the models):

LD2450 Radar Sensor Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
  • Proteus Library Files: TEPLD2450.LIB, TEPI2CLCD16X2.LIB, TEPRESISTOR.LIB, TEPLED5MM.LIB and ArduinoV4TEP.LIB.
  • Proteus Model Files: TEPLD2450.DLL, TEPLCD.DLL, TEPRESISTOR.DLL, TEPLED5MM.DLL and TEPARDUINO.DLL.
  • Arduino Code: the demo sketch (Wire and AltSoftSerial).
  • Proteus Simulation: the demo project, its HEX file and copies of the DLLs.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install LD2450 Radar Sensor Library for Proteus Simulation

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
  3. Copy the files from Proteus Model Files into the MODELS folder.
  4. Delete TEPLD2450.IDX from the LIBRARY folder if it is there.
  5. Start Proteus, press P and search for LD2450.

Proteus Simulation of Desk Occupancy and a Room Light

The demo uses an A4 sheet with our Arduino UNO Library for Proteus V4.0. The radar (U1) talks to the UNO through AltSoftSerial: its TX to D8, its RX to D9. 256000 baud is far too fast for a software UART, so this module was set to 9600 once with command 0x00A1 and a restart - the BAUD property stands for that. A 16x2 LCD from our I2C LCD 16x2 Library for Proteus sits on the I2C bus at 0x27; a green LED on D5 shows the desk occupied and a yellow LED on D6 is the room light. The Arduino's monitor is built in, the same window as our TEP Serial Monitor Advance for Proteus. Open LD2450-Desk-Light-ArduinoUnoV4.pdsprj.

The DEMO is a recorded room, played in fast time: one person walks to the desk and stays, a second comes in, crosses the room and leaves, a third stops for a moment and leaves - and all the while a pedestal fan swings its head in a corner.

LD2450 simulation in Proteus: the LD2450 radar, an I2C LCD 16x2 and two LEDs on an Arduino UNO V4.0, A4 sheet
Figure: The whole simulation on an A4 sheet.

The Sketch

The sign rule is one line:

int decode(uint16_t raw) { return (raw & 0x8000) ? (int)(raw & 0x7FFF) : -(int)raw; }   // bit 15 = 1: positive, 0: negative

Each data frame is checked by its last two bytes, then the three slots are decoded; a slot whose resolution is 0 is empty:

  } else if (fb[28] == 0x55 && fb[29] == 0xCC) {            // a data frame: three targets of 8 bytes

At start-up the sketch sets the zone filter: type 2, ignore, with the fan's corner as zone 1. The corners are plain two's complement:

  putInt16(zone, 2);                                        // type 2: ignore targets inside the zones
  putInt16(zone + 2, 1300); putInt16(zone + 4, 2700); putInt16(zone + 6, 2300); putInt16(zone + 8, 3700);   // zone 1: the fan's corner

Then for every frame it counts the people, switches the room light while anyone is there and checks its own desk zone - x from -0.7 to 0.7 m, y from 1.3 to 2.7 m. The desk is the sketch's own logic; the radar's zone filter only decides what the radar reports.

LD2450 Simulation Results

Open the project and press Run. The demo runs 11.9 simulated seconds and took about 2 minutes 42 seconds on our PC with the pop-up open and the pictures being taken. Click U1 for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.

Set-Up

The sketch talks to the radar first. The Event log shows the whole session: configuration enabled at 511.2 ms (the frames stop), multi-target tracking at 603.6 ms, the zone filter at 662.7 ms - ignore inside (1300, 2700) - (2300, 3700) mm - and configuration ended at 694.7 ms. Every command got its ACK; the monitor prints "Radar: protocol 1, buffer 64, firmware V2.02.23090617" and "multi-target; zone filter ignores (1.3, 2.7) - (2.3, 3.7) m, the fan". The pop-up at 0.8 s shows the room from above: the radar at the bottom, its ±60 degree field of view, the red ignore zone and the fan inside it - present, but never reported. On the sheet the transmit antenna glows.

LD2450 Proteus simulation pop-up: the radar configured, the fan masked by its ignore zone
Figure: The set-up.
LD2450 Proteus simulation: the radar module on the sheet with its transmit antenna glowing
Figure: The radar at work.
The LD2450 radar sensor simulation running in the Proteus workspace
Figure: The simulation in the workspace.

Walking to the Desk

At 1.0 s the first person comes in through the door at the back left and walks to the desk. The monitor follows: T1 at (-1.9, 4.0) m with -130 cm/s at 2.00 s, (-0.9, 3.0) m with -124 cm/s at 3.00 s - the negative speed means approaching. The pop-up at 2.5 s shows T1 at (-1491, 3620) mm and the frame byte by byte with each slot decoded.

LD2450 Proteus simulation pop-up: one person walking to the desk, the frame decoded
Figure: Walking to the desk.

Two People

From 4.0 s the first person sits at the desk, x 0, y 2.0 m, speed 0 - a still person - and the green desk LED lights. A second person comes in at 3.5 s: at 5.0 s the pop-up shows T1 at (10, 1980) mm and T2 at (-792, 3476) mm, walking at -140 cm/s. The yellow room light has been on since the first person came in.

LD2450 Proteus simulation pop-up: one person at the desk, a second coming in
Figure: Two people.

Out of the Field of View

The second person walks over to the right-hand wall and stops at (2.2, 1.2) m. That is 61 degrees off the radar's axis - just outside its ±60 degree field of view - so slot 2 empties: the monitor at 7.00 s shows only T1 and T3, a third person who has just come in. The pop-up at 7.2 s draws person 2 in grey, "out of view". At 7.6 s, walking back into the room, person 2 is seen again and gets a slot.

LD2450 Proteus simulation pop-up: person 2 at 61 degrees, just outside the radar field of view
Figure: Out of view.

Three People at Once

At 9.0 s all three are tracked: the LCD reads "People 3 DESK" and the pop-up's frame decodes T1 at (-16, 1987) mm, T2 at (-289, 3124) mm moving at +138 cm/s - leaving - and T3 standing at (-1501, 3508) mm. The raw bytes show the sign rule: T2's x is 0x0121, bit 15 clear, so -289 mm; its y is 0x8C34, bit 15 set, so 0x0C34 = 3124 mm.

LD2450 Proteus simulation pop-up: three people tracked at once, the fan still masked
Figure: Three people.

Alone at the Desk

The second person leaves at 10.5 s and the third at 11.5 s. The pop-up at 11.9 s shows one target left, the person at the desk at (-7, 2003) mm - and the fan still masked by its zone.

LD2450 Proteus simulation pop-up: one person left at the desk, sitting still
Figure: Alone at the desk.

The Graphs, the Event Log and the Check Page

The Graphs page plots the number of targets and each slot's distance. The Event log lists every command with its result and every change in the number of targets. The Check page sums up the run: the supply at 5.00 V; the UART at 9600 baud 8N1 with 118 frames sent, 88 bytes received and no framing errors; the configuration off after 5 commands and 5 ACKs; the zone filter ignoring inside zone 1 and masking a target right now - the fan; and 1 target reported in multi-target mode, the person at the desk.

LD2450 Proteus simulation graphs: the number of targets and their distances
Figure: The Graphs page.
LD2450 Proteus simulation Event log: the commands and the targets
Figure: The Event log.
LD2450 Proteus simulation Check page after the demo run
Figure: The Check page.

The Arduino's built-in serial monitor prints the set-up in three lines - the radar's protocol and firmware, the tracking mode and the zone filter - then a line every second with the number of people and each target's x and y in metres and speed in cm/s, and "desk" while someone sits there. Its times come from millis(), which starts when the sketch starts, a few hundredths of a second after the simulation does.

Arduino UNO V4.0 serial monitor in the LD2450 Proteus simulation: the set-up and the people tracked every second
Figure: The Arduino's monitor.

LD2450 or LD2410?

The LD2410 in our LD2410 Radar Sensor Library for Proteus is a presence radar: it tells you whether somebody is there and how far, moving or still, with an OUT pin you can use without any code. The LD2450 is a tracker: positions and speeds of up to three people, but no OUT pin and no gate sensitivities. For one distance to one object, a time-of-flight sensor such as our VL53L1X Distance Sensor Library for Proteus is simpler.

Try It Yourself

  • Click U1 while the simulation runs and use the chips: Empty room, One at the desk, Three people.
  • Remove the zone filter command from the sketch: the fan appears as a "person" at about (1.8, 3.2) m and the room light never goes off.
  • Change the zone type to 1 (report only inside) with a rectangle around the desk: the radar reports only the person at the desk.
  • Send 0x0080 instead of 0x0090: single-target tracking - only one slot is ever filled.
  • Set BAUD to 256000 and keep radar.begin(9600): no ACK, no frames - the baud rates must match.

Ideas to Extend the Demo

  • Count people in and out of a door by watching y cross a line.
  • Use the x / y position to switch only the light above the person.
  • Hold "present" for a few seconds, so a very still person does not switch the light off.

Your Own Sketches

The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.

Things to Know Before Using a Real LD2450

  • 3.3 V UART: put a divider between a 5 V TX and the radar's RX.
  • Power: more than 200 mA at 5 V.
  • Baud rate: 256000 needs a hardware UART; for a software UART set it lower with 0x00A1 and a restart.
  • Still people: they can drop out now and then, especially beyond 2 m.
  • Moving objects: fans, curtains, plants and pets are seen too - use the zone filter.

Troubleshooting

  • No ACK: TX and RX swapped or the baud rates differ.
  • No frames: configuration is still on - send 0x00FE.
  • Coordinates like 33000: the bit-15 sign was read as two's complement.
  • A "person" who never leaves: something moving in the room - mask it with a zone.
  • The part is not simulated: TEPLD2450.DLL is missing from MODELS and from the project folder.

Limitations of the Simulation

  • The frame, the sign format, the commands and their ACKs, the zone filter, the field of view and the baud rates follow the instruction manual and the serial protocol manual; the module is our own drawing.
  • Our own figures: the firmware number and the MAC, ±25 mm of jitter, the speed from the change of distance, the resolution 320 mm, moving targets before still ones, 120 mA.
  • The DEMO is a recorded room in fast time.
  • Not modelled: the radar's own detection probability (a still person dropping out), reflections, Bluetooth itself.
  • Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or the maker of the LD2450.
  • Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.

So, that was all about the LD2450 Radar Sensor Library for Proteus Simulation. I hope it helps you build rooms that know where you are. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!


Comments

0

Join the conversation