How to hook an LD8001B

Hello,

Just bought LD8001B ( https://hlktech.net/index.php?id=1214 ) but can not find the way to retreive information from that.

Anyone has already succeed ?

Under Linux, I use « CuteCom » to connect: nothing get out. Any other free software I should use ?

Thanks.

The page you link is full of drivers. I would guess it needs a driver.

The links given are PDF files (technical spec for so many variations of almost same components), not drivers.

Here, I copied the pinout

Does it help you to help me ?

Hi @Patriboom.

Did you configure the baud rate at 115200 in CuteCom?

CuteCom should be perfectly fine so there is no point in looking for an alternative terminal emulator at this point.

With this super simple code, I feel to receive some data from the device.

int sensorPin = A0;   // select the input pin for the potentiometer
int ledPin = 13;      // select the pin for the LED
int sensorValue = 0;  // variable to store the value coming from the sensor
int compte = 64;
float somme = 0;
float moyenne = 0;

void setup() {
  Serial.begin(115200);
  delay(250);
  Serial.println("Ready");
}

void loop() {
  // read the value from the sensor:
  for(int x=0; x<compte; x++) {
    sensorValue = analogRead(sensorPin);
    somme = somme + sensorValue;
    delay(2);
  }

    moyenne = somme / compte;
    Serial.println(moyenne);
    moyenne = 0;
    rendu = 0; 
    somme = 0;
    delay(2000); 

}

When the device is turned toward the table, the average (moyenne) is around 180.
When the device is turned toward the ceiling the average (moeynne) is around 350

That means, I hope, that the reading works.

Basic connexion only - under Arduino Uno
from device « TX » to Arduino « A0 »
According to
« LD8001B module can directly use UART0 to output the detection results » written in the datasheet.pdf

This is wrong. The LD8001B outputs the data using the serial protocol (UART). But you are trying to read it as if it was putting out an analog voltage!!!

You must read the serial data as serial data. Unfortunately this is going to be quite challenging to accomplish on the UNO because it only has one hardware serial interface (pins 0 and 1), which is already used for communication with the computer. You can add additional serial interfaces using the "SoftwareSerial" library, but it can only receive data at 57600 baud maximum, while the LD8001B transmits at 115200 baud.

You're right. So desperate to find how to read that component I forgot the basics

It is possible to use the UNO as a basic USB to serial bridge module, where the bridge chip on the UNO (e.g., ATmega16U2 on the official or clone Unos, CH340 on the Chinese derivative Unos) is simply passing the data from pins 0 and 1 to the computer, without any involvement from the Uno's primary ATmega328P microcontroller.

That approach is not terribly interesting for those of us who like to make projects based around microcontrollers, but it will at least allow you to see if the LD8001B is working, and perhaps would even be sufficient for an application where you don't actually need the Uno to do anything more.

If you want to try it, connect the TX pin on the LD8001B to pin 1 on the Uno. In addition, connect the "RESET" pin on the UNO to the "GND" to disable its ATmega328P so it can't interfere with the communication between the bridge chip on the UNO and the LD8001B.

The fact that I am instructing you to connect the pin on the UNO that is marked "TX" to the TX pin on the LD8001B might seem wrong since we must always make TX-RX connections. However, this is actually what is needed to make such connections. The reason is that the markings on the UNO board are referring to the pins on the ATmega328P, but in this use case you are communicating between the LD8001B and the UNO's USB to serial bridge chip so must make the TX-RX connections between those two chips. The bridge chip has an RX-TX,TX-RX connection to the ATmega328P, so the pin marked "TX" on the board is actually connected to the "RX" pin on the bridge chip.

Thanks a lot for that.
I tried it but still ... no data shown by CoolTerm

This is from the datasheet provided by maker:

5.4 Startup configuration

  • BOOT1, BOOT0 modules have internal pull-ups. BOOT1 must be held low before the
    module can be started.

This is the connection plan (from same document)

I did like that:

Arduino Uno -> LD8001B
3.3V -> 3.3V
GND -> GND
TX (digital 1) -> TX
RX (digital 0) -> RX

Arduino to arduino
Resest-GND

LD8001B to LD8001B
P19 - 4kΩ - GND

According to the schema, I should connect PO1 to P01

What is PO1 on Arduino Uno ?

Thanks

Hello everyone,
I've finally got something ... using TX1 & RX1 which did not have any pin welded on. I welded them and such is the resutL

[ 0 ]Bootloader V2.1
[ 1 ]Boot pin status is 1000
[ 2 ]Jump to flash
[ 3 ]User code length is 25072,code exists flag is 5a

Here are the connections to have such results, using FT232RL for TTL communications

FT232RL ----> LD8001B
3.3V ----> 3.3V
GND ----> GND
RX ----> TX1
TX ----> RX1

LD8001B ----> LD8001B
P19 ----> 2kΩ ----> GND

The LD8001B Pinout is here : http://cartefoi.net/archives/Informatique/pinout.html

Second trial:

Sarting as previously: same message:

[ 0 ]Bootloader V2.1
[ 1 ]Boot pin status is 1000
[ 2 ]Jump to flash
[ 3 ]User code length is 25072,code exists flag is 5a

It roles infintly with that
BUT
when I unplug the 2kΩ resistor pull down, something new shows up:

[ 0 ]Bootloader V2.1
[ 1 ]Boot pin status is 81000
[ 2 ]This is debug mode

Again, with no end.

So ... I pass from flash mode to debug mode.

What I want is the most simple: read the values.
I'll then try to pull-down both P19 (BOOT1) and P12 (BOOT0)

Both down pulled P19 and P12 :
I receive "C" ( HEX 43 ) infinitly almost every ½ second

If I unplug the P19 pull-down while it gives me "C" ... nothing : keep same pace ½ second of "C"

With only P12 pulled down, I receive:

[ 3 ]EEPROM code does no exist

Looks like the double pull-down (P12 & P19) set into programming mode, the HEX 43 be signal of « I'm waiting for RX »
I don't know ... only hypothesis.
If you think like me, what code should I try ?

The datasheet referes to a software I don't know (below)

This software has a « Distance view » item in top menu.
Do you know that software ?

Thanks for you help.

For now, that's the only information page I've found: https://bbs-elecfans-com.translate.goog/jishu_2354892_1_1.html?_x_tr_sl=zh-CN&_x_tr_tl=en&_x_tr_hl=fr&_x_tr_pto=wapp

Tranduit en français par Google: https://bbs-elecfans-com.translate.goog/jishu_2354892_1_1.html?_x_tr_sl=zh-CN&_x_tr_tl=fr&_x_tr_hl=fr&_x_tr_pto=wapp

The device is supposed to be ready for SPI communication.

This is what I've tried:

#include <SPI.h>

const int slaveSelectPin = 10;

void setup() {
  Serial.begin(9600);
  Serial.println("-----------------------------");
  delay(1000);
  SPI.begin();
  pinMode(slaveSelectPin, OUTPUT);
  delay(1000);
  Serial.println("Voici que nous irons nous coucher bientôt");
}

void loop() {
  digitalWrite(slaveSelectPin, LOW);
  SPI.transfer(0b01101000); // Commande pour lire le canal 0
  int result = SPI.transfer(0);
  digitalWrite(slaveSelectPin, HIGH);

  result = result & 0b111111; // masque pour supprimer les bits inutiles
  float temperature = (result * 5.0 / 1024.0) * 100.0;

  Serial.print("Température: ");
  Serial.println(temperature);
  delay(1000);
}

With these connections :

Arduino Uno ----> LD8001B
13 (CLK) ----> SCLK1
12 (MISO) ----> MOSI1
11 (MOSI) ----> MISO1
10 (CS) ----> CS1

Unsuccessfull

Also

Arduino Uno ----> LD8001B
13 (CLK) ----> CLK
12 (MISO) ----> RX1
11 (MOSI) ----> MOSI
10 (CS) ----> CS

Also value 63, even if I move the sensor facing me, facing a steel file cabinet, facing the seiiling (sheet rock).

Thanks for the updates on your findings. It looks like you are making some good progress at least!

Unfortunately I am not familiar with the LD8001B and don't have access to one. The support I provided so far was all based on the information I gleaned from the product page link you shared and the datasheet downloaded from that page. Sadly, the manufacturer was not kind enough to provide much information about this complex device so I am limited in how much assistance I can be. Hopefully one of the other forum helpers might be more knowledgeable on this subject.

I don't think that will work. From section 7 of the datasheet:

  1. The radar module has extremely high power requirements, requiring an input voltageof3.1~3.5V, power supply ripple ≤50mV, and current ≥1A.

The 3.3 V regulator on the UNO board isn't going to be able to provide anywhere near to 1 A.

It definitely could be. From the information I found, I assumed that the device just constantly transmitted the reading. However, it might be that the device sends it on demand after it receives a command.

However, I don't know why it would send the "C" repeatedly over and over again under that scenario. My hypothesis is that this might actually be the reading, or rather an error code. It might be caused by the insufficient power supply.

It is great that you got SPI communication working as well as the UART. This will allow you to use the LD8001B in an Arduino project with the UNO once you manage to get the LD8001B working.

Thanks for all that.
I've red the same (yes, from the same document :wink: ) about the power consumption. I did know about the arduino limitations. I'll provide 3.3V with enought Amp next time. I have power supply capable of providing upto 3A. Then, I'll give you news.