Benewake TF-Luna distance LiDAR sensor not giving any signal

Hey community,

I have the wires of a Benewake TF-Luna sensor soldered to a Wemos D1-Mini.
The connections are the following:

Pin 1 (red) -----> 5V
Pin 2 (black) ---> D2 (SDA)
Pin 3 (yellow) --> D1 (SCL)
Pin 4 (white) ---> GND
Pin 5 (green) ---> D4
Pin 6 (blue) ----> unused

Here are specs of the TF-Luna:

I use this library to communicate via I2C:

When I try to run its contained TFLI2C_simple.ino example with the D1-Mini connected to my Mac, I get no signal in the serial monitor but the error message.

/* File Name: TFLI2C_simple.ino
 * Developer: Bud Ryerson
 * Date:      4 NOV 2021
 * Version:   0.1.2
 * Described: Simplified Arduino example sketch for the Benewake
 *            TF-Luna LiDAR sensor configured for the I2C interface
 */

#include <Arduino.h>  // every sketch needs this
#include <Wire.h>     // instantiate the Wire library
#include <TFLI2C.h>   // TFLuna-I2C Library v.0.2.0

TFLI2C tflI2C;

int16_t tfDist;                // distance in centimeters
int16_t tfAddr = TFL_DEF_ADR;  // use this default I2C address or
                               // set variable to your own value

void setup() {
  Serial.begin(115200);                              // initialize serial port
  Wire.begin();                                      // initialize Wire library
  Serial.println("TFLI2C example code simplified");  // say "Hello!"
  Serial.println("4 NOV 2021");                      // and add date
}

void loop() {
  if (tflI2C.getData(tfDist, tfAddr))  // If read okay...
  {
    Serial.print("Dist: ");
    Serial.println(tfDist);     // print the data...
  } else tflI2C.printStatus();  // else, print error.

  delay(50);
}

I will use the D1-Mini in a WiFi Network to send OSC Data to SuperCollider. So I was able to also try it with a 5 V power supply and modified WiFi/OSC code. Still no signal but the error message.

I also unsuccessfully tried it with another TF-Luna which is soldered in the same way to a D1-Mini.

It is kind of strange because I used the same setup ~1 year ago and at that time everything worked out...

What possibilty could I miss?

Thank you for your answers!

I didn't dive in your problem, just a suggestion:
If there is a red wire in the colourful cable - it must be a power "+", and also if there is a black one - it must be GND.

Choosing a white colour for GND line while there is a black in the cable - probably a way to fail.

You can come up with your own rules for other colors for your own convenience (for example, in my circuits I try to always use green for the clock signal) - however, red and black are strictly not recommended to be assigned to other lines than power and ground.

Thank you for suggestions, but in this case, the connector was delivered with the sensor, which means that I didn't had any choice (expect soldering/crimping new connectors) to determine the colors of the wires...

Regarding my problem:
We also checked the voltage with a multimeter and renewed the solderings but this also made no change. I believe it has sth to do with the microcontroller itself but I won't continue this since the project is completed...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.