Hi-Link HLK-LD2410B+BLE 24GHz FMCW Proximity Detector

mortifyu

New Member
Hello Forum users & Ultimate PICAXE Guru's (I know YOU are here! :))



I am wondering if ANYONE here has had a dabble with these fancy little devices.

HLK-LD2410B

They really are quite impressive (and extremely cheap).

Configuration and communication can be done via either the HLKRadarTool (Android or iPhone App (BLE)) or via UART.

Default UART speed is 256000baud, however using the App I reduced this back to 38400 and successfully connected it to a 14M2 running at 32MHz

I am here to see whom may have interfaced them with PICAXE via UART and what your results/conclusions have been?

For whatever reason their English PDF DATASHEET I was given a link to was incomplete/corrupted, however I have purchased a substantial amount of these modules directly from the manufacturer and requested they supplied me with a Full GOOD English DATASHEET in which they happily obliged.

The below link is a shared link on my personal SYNC.COM account as I couldn't upload it here for some reason (presumably it's size?!? Only 1.2MB) for the purpose of this thread.

HLK-LD2410B - Full Datasheet

Also attached here is the Serial Communications Protocol DATASHEET.


Eager to hear from other people's experiences with interfacing to PICAXE.

Regards,
Mort.
 

Attachments

mortifyu

New Member
Really? 18 days, 122 views and NIL responses? Not even a brief sigh or similar from Alley Cat, Hippy or Technical or anyone of that nature?

This is most unexpected.


Regards,
Mort.
 

AllyCat

Senior Member
Hi,

Yes, I did look at the data sheet, etc., but my thoughts were rather "negative" so I decided to see if anybody else had anything to offer. In particular, obtaining a couple of trial samples didn't seem "extremely" low-cost and one of the reviews suggested that they are tiny (for my rather aged eyes). What at first sight appears to be a standard 0.1 inch header actually has pins spaced nearer to 1 mm ? Also I was unsure whether (or how) the PICaxe (alone) could change the serial baud rate to a more useful frequency?

Personally, I question whether it really uses a "Radar" principle (which usually involves reflections from a metallic object) of if it is just a highly sensitive "Stray Capacitance" detector (Variable Frequency Oscillator), with distance ranges normalised to the size of a typical human body? However, I might be interested if it could detect Pigeons (which have taken a liking to our PV panels on the roof), or Squirrels or Cats which are very determined to eat our (small, garden) Birds' food (or the birds themselves). :(

Cheers, Alan.
 

hippy

Ex-Staff (retired)
Really? 18 days, 122 views and NIL responses? Not even a brief sigh or similar from Alley Cat, Hippy or Technical or anyone of that nature?
I looked at the datasheet and thought "sounds pretty neat", and a "sensitive enough to detect breathing/slight motion; de-sensitized enough to detect motion" sales pitch, made it seem like it could have multiple applications. But given "Eager to hear from other people's experiences with interfacing to PICAXE", and having none, I didn't post anything.

If I had one sitting in front of me my first thought would be; can I configure it for PICAXE use from a PICAXE, without faffing about with a Bluetooth app ?

I guess you're the 'nominated expert', perhaps the only PICAXE user who has actually used the module. If you wish to be an evangelist for the module, tell us more about your experiences with it, ease of use or difficulties, want to post example code, I can't see us having any problem with that.
 

mortifyu

New Member
Thanks for the responses boys. Given that I am very grateful to both of you for your rapid help ANY time I have had queries/questions with PICAXE, in this instance I am prepared to create a suitable breakout board with a basic 1K/2K level shifter (5V to 3.3V) for the proximity module UART input 100% free of charge and post one of these modules to each of you ready to play/experiment with. I can make the required UART alteration here for you to 38400 baud so Bluetooth mucking about isn't necessary. Additionally, I have liased with the manufacturer and they have confirmed these modules can/could be preconfigured to be 38400 from the factory upon request. There are two versions available: LD2410 & LD2410B with "B" being Bluetooth. If only using via UART, for security reasons the LD2410 would be more suitable as Bluetooth broadcasting wouldn't exist, although the modules I would like to send you guys will be "B" versions.

I am currently in the middle of writing PICAXE software to configure these modules and will POST the code here once I feel it is going to be of benefit to the forum.

In the meantime, the following code successfully enables the Configuration Command...
Code:
'Hi-Link HLK-LD2410/B Proximity Module - UART Communications

'This program simply confirms successful UART communications with the module
'by Enabling Configuration Command

#PICAXE 14M2
#TERMINAL 38400
#NO_DATA

Symbol Prox_Tx = b.4
Symbol Prox_Rx = c.1

Symbol Frame_Length = b0
SYMBOL  value  = b1
SYMBOL  first  = b2
SYMBOL  second = b3
SYMBOL Rx_Display = b4

init:
setfreq m32                    'Set PICAXE oscillator to 32MHz

sertxd("Booted. Allowing time for Sensor module to settle upon power up...",cr,cr)
pause 12000

bptr = 28                    'Set RAM BYTE pointer to start of receive data

main:
sertxd("Enable Configuration Command",cr,"Tx: FD FC FB FA 04 00 FF 00 01 00 04 03 02 01",cr)
serout Prox_Tx,T38400_32,($FD, $FC, $FB, $FA, $04, $00, $FF, $00, $01, $00, $04, $03, $02, $01)
serin [160], Prox_Rx, T38400_32,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,_
@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc,@bptrinc

'** Expected response from module should be: FD FC FB FA 08 00 FF 01 00 00 01 00 40 00 04 03 02 01


bptr = 32                    'Set RAM BYTE pointer to the 5th BYTE received (Intra-frame data length)
Frame_Length = @bptr            'Acquire Intra-frame data length
Frame_Length = Frame_Length + 10    'Add Frame header(4 bytes), Intra-frame length & End of frame (4 bytes)

bptr = 28                    'reset RAM BYTE pointer to start of received data (location 28)

sertxd("Rx: ")
for Rx_Display = 1 to Frame_Length    'Convert DECIMAL to Hex and display in serial monitor window
    value = @bptrinc            'Conversion code compliments of Hippy (Thanks mate!)
    first = value / 16 + "0"
    If first > "9" Then
          first = first + 7
    End If
    second = value & $0F + "0"
    If second > "9" Then
          second = second + 7
    End If
    sertxd(first,second," ")
next

sertxd(cr,"Done!",cr,cr)
Result:
Code:
Booted. Allowing time for Sensor module to settle...

Enable Configuration Command
Tx: FD FC FB FA 04 00 FF 00 01 00 04 03 02 01
Rx: FD FC FB FA 08 00 FF 01 00 00 01 00 40 00 04 03 02 01 
Done!
Now... How to DM you guys so as to get some postal info to send some modules?


Regards,
Mort.
 
Top