|
Forum Index : Microcontroller and PC projects : Pico Radar
| Author | Message | ||||
| Wolfgang Regular Member Joined: 03/11/2021 Location: GermanyPosts: 74 |
That's good to hear. Then I can also start my attempts to get this component to work. Wolfgang |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 366 |
If anybody wants to play around with a LD2450LD sensor ... The program attached covers the basic functionality and is designed to be extended easiyl. I've put in some comments to make it more understandable what I've done and what has to changed for specific hardware. The whole thing is more or less interrupt driven, so it may seem a bit complex at the first glance. I'm awfully sorry, but I love interrupts ... they are so powerful once you are used to them. I have this currently running on a RP2350 with a ILI9488 display attached. The display is not required, as the measured coordinates are also printed on the console if needed. Some features can be switched on and off at will. LD2450LD-V2.zip Gerald 73 de OE1HGA, Gerald |
||||
| Wolfgang Regular Member Joined: 03/11/2021 Location: GermanyPosts: 74 |
Wow, that must have taken a big amount of engineering and preparations and it is excellently commentated and explained. I didn't think it would require such great expertise, I can learn and understand a lot from it. Wolfgang |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 366 |
Wolfgang, thank you, but wasn't that much of an effort, maybe a bit more than 2 days work all in all. I'm used to program very modular. Just make sure the modules work properly and then you can, a bit Lego-like, plug together bigger programs as much of the lower level functionality is then available as building blocks. You can concentrate on the problems that you have to solve first hand and not deal with a lot of details again and again. And yes, it induces some overhead in the program execution. But the Picos are quite fast and MMBasic is a real performer. And most of the routines can be reused in other projects or at least as basis for similar functions. You refine over time and keep them in kind of a source-library, just copy and paste into your actual code. I think a basic funtionality giving similar results for the radar sensor can be written in less than 1/3 of the code I needed (see my first version). But I have already implemented some flexibility to cover similar sensors later without massively rewriting the code. Gerald 73 de OE1HGA, Gerald |
||||
| v.lenzer Regular Member Joined: 04/05/2024 Location: GermanyPosts: 89 |
I'll try this out as soon as my delivery arrives. Edited 2025-11-19 23:15 by v.lenzer Best wishes! Joachim |
||||
| Wolfgang Regular Member Joined: 03/11/2021 Location: GermanyPosts: 74 |
Hello ville56 Today I started my first attempts getting contact to LD2450C but unfortunately I'm hanging with the print output shown in the picture. I'll further looking, but maybe you already have a tip. ![]() Wolfgang Edited 2025-11-21 04:09 by Wolfgang |
||||
| Wolfgang Regular Member Joined: 03/11/2021 Location: GermanyPosts: 74 |
Apologies, I made a mistake in the description of my radar module. It is an LD2410C and not an LD2450C as stated in my previous message. Wolfgang Edited 2025-11-21 19:25 by Wolfgang |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 366 |
I will get my LD2410 today and then I have the opportunity to adapt the code to this sensor. May take one day or another, but I will do it and post the code here. But first I have to understand what the LD2410 really is capable of. If someone wants to play with the LD2450, there are some improvements in the code now. Initially all features are disabled (no display at all) and you have to type "P" to toggle the printing of the radar data. "D" to switch the output on the LCD panel on/off "Z" to display also "zero" data from the sensor (sensor has no lock on a target) LD2450LD-V2.1.zip Gerald Edited 2025-11-21 20:36 by ville56 73 de OE1HGA, Gerald |
||||
| v.lenzer Regular Member Joined: 04/05/2024 Location: GermanyPosts: 89 |
Hooray – it works! I received the LD2450 today and immediately connected it to GPOs 0 and 1. Then I flashed your program. Everything is working perfectly! Now I just need to figure out how to align the antenna and/or the circuit board so that the room being monitored and the display (I'm using a 2.4" color display) are properly aligned. Thank you so much for the source code!! Best wishes! Joachim |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 366 |
Joachim, I've packed some of the documentation into a .zip file, there are also parts on how to mount the sensor as well as the protocoldescription. Maybe it can help you. Btw, there is also a PC app available, but too big to put into the zip, and there is also a working app for Android (link in some of the dokuments) that I've used to upgrade the sensor firmware. Works well via Bluetooth (if your module has it integrated) but should also do via USB-serial adapter but I haven't tried that under Android. HLK-LD2450 Documentation.zip Have fun, Gerald 73 de OE1HGA, Gerald |
||||
| v.lenzer Regular Member Joined: 04/05/2024 Location: GermanyPosts: 89 |
Thank You very much, Gerald!! Best wishes! Joachim |
||||
| Wolfgang Regular Member Joined: 03/11/2021 Location: GermanyPosts: 74 |
ville56 I also ordered the LD2450. Wolfgang |
||||
| v.lenzer Regular Member Joined: 04/05/2024 Location: GermanyPosts: 89 |
Hi Gerald! One more question: In the manual, I saw how the circuit board needs to be aligned so that the radar beam matches the display. Did you also use the antenna offered by AliExpress (https://de.aliexpress.com/item/1005009279562050.html?spm=a2g0o.order_list.order_list_main.41.1d9e5c5firxxa5&gatewayAdapt=glo2deu), and if so, how did you align it? The antenna seems to be part of the package, as it has a specific connector on the circuit board. It's not described separately in the manual. Best wishes! Joachim |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 366 |
Joachim, the external antenna is only for bluetooth. The radar antenna is on the module itself. If you want to connect the sensor via bluetooth it may be an option depending on range, otherwise it is probably worthless. btw, I've rewritten the code for the pico in major parts. It makes it more flexible and stable. I want to make some tests and also some further extensions and I will post the code here in case someone wants to play around with it. I'll also try to document all the functions and subs and the program logic so that it can also be understood by others ... but the beast is getting bigger and bigger and sometimes the flexibility does not make it easier to understand. I will also use it as basis for the LD2410C which I want to play around with as well. 73 de OE1HGA, Gerald |
||||
| Pluto Guru Joined: 09/06/2017 Location: FinlandPosts: 406 |
Thanks Gerald! I have LD2410 and LD2450 ordered (should arrive later today). I am very eager to start testing. I have seen these modules earlier on AliExpress and decided that I don't need them, but after following your developments I decided that I certainly need to have them. Pluto |
||||
| v.lenzer Regular Member Joined: 04/05/2024 Location: GermanyPosts: 89 |
Thank you so much, Gerald, for your hint and patience. I can imagine using it to control various lamps and other devices. I also have an LD2410 here. Once your routines for it are finished, I'll experiment with them as well. Best wishes! Joachim |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 366 |
I've created V2.3 for the LD2450LD to play around with ... changes: - more modularized - check for header and trailer in return data from sensor - header/trailer definition function - return data field definition function - graphical display now shows up to 3 targets the down side ... it eats up more cpu time side effects: when switching from single to multiple target mode, some characters are lost sometimes and even the serial interrupts are sometimes not delivered anymore. Despite heavy testing I could not tie down what causes it. Currenty it takes the brute force method then by resetting to the defaults and resynching. Maybe I will add features to support area filtering later. have fun LD2450LD-V2.3.zip 73 de OE1HGA, Gerald |
||||
| Wolfgang Regular Member Joined: 03/11/2021 Location: GermanyPosts: 74 |
Hello ville56, Thank you very much for this new update. Am I correct in understanding that a request is sent up to 10 times in the init sequence? |
||||
| Pluto Guru Joined: 09/06/2017 Location: FinlandPosts: 406 |
Gerald, you are using the model code LD2450LD. Is this different from the model LD2450 (without ending LD)? Pluto |
||||
| ville56 Guru Joined: 08/06/2022 Location: AustriaPosts: 366 |
Pluto, TBH, the LD postfix seems to be my fault. I think it was the partnumber I ordered on Aliexpress some time ago but I'm not sure anymore. The only difference I can think of is that at the time I bougth it there was also a Variant without bluetooth antenna connector. Looking at ALi there seem to be only the variant with external antenna available anymore, at least the connector seems to be on the board. Softwarewise there should not be any difference. So if you need bluetooth at "longer" range, make sure you have the external antenna. What you should get in any case is the pigtail with the connector for the pcb and DoPont headers on the other end. Tough there is also a pin array onboard, the spacing is very tight and, at least for me, with an unusual pitch and very small pins. So the standard DoPont headers do not fit and directly soldering wires could be a challenge. Gerald 73 de OE1HGA, Gerald |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |