TF Lidar Mini

Hello all,

In my stupidity, I bought a qwiic enabled TF Mini Lidar when I really wanted

the non-qwiic enabled version. What would be the easiest way of de-qwiic ifying

the sensor? Does Spark have a cable that would plug directly into the TF Mini and

give me 4 pins?. I tried support but didnt get a reply

Many thanks in advance!

Qwiic is just I2C with a convenient connector. This is probably what you want:

https://www.sparkfun.com/products/14425

There is one with female pins as well.

Hmmm, it’s a nice idea, but the power booster on the Qwiic Lidar doesnt have a female Qwiic connector!

I could splice the wires or use a Qwiic adaptor https://www.sparkfun.com/products/14495, but decided

to go the whole hog and buy the Qwiic Pi hat, which would, in theory, allow me to connect more than 1 Lidar

Unfortunately I couldn’t get it to work:

After installing the relevant software and attaching the Pi hat:

Ran i2cdetect -y 1 and device detected at address 10

Ran i2cget -y 1 0x10 with result Error : read failed (tried with both my TF Minis)

Ran ic2detect -y 1 and device No Longer detected

Tried with both Minis connected ic2dtect only shows 1 at address 0x10 (the other not detected)

Now I am at a loss and don’t want to buy any more kit in case the problem is at a lower level, e.g. the I2c programming

of the Lidar or the Pi Hat itself

Any advice welcome!

Are you plugging your I2C cable directly into the module, or do you have the boot board connected and you’re connecting to the module through that?

Here’s a link to how I have got it connected https://imgur.com/a/flv6OpA

OK, your connections look correct. I doubt that the Qwiic Hat is the issue though since it really doesn’t have anything on the board that could fail and cause trouble.

One thing that could be a problem though is that the Qwiic Hat can only provide up to 600mA of current and it looks like the TFMini needs up to 800mA to operate. What I think might be causing you trouble is there’s enough current to see the TFMini, but not enough to actually make it function. You’re probably going to need to come up with an external 3.3 volt power source for the TFMini that can provide the needed current. Sadly, we don’t have a board that does that.

I am not too sure that it is good practice to post a similar question on someone else’s thread. If I am trespassing, please excuse my ignorance.

I am having a similar issue with the TFMini qwiic where I am unable to get the device to work for me. I think that I am correctly connecting the device because I can issue a i2cdetect and I get a 0x10 from the address block. I am writing a simple C program that reads a distance and I have tried several different combinations of one of your Arduino examples (I am attempting to translate the code from Arduino sketch to C for the Raspberry Pi). I also looked at the datasheet for the qwiic device but I have not made it work. The Arduino sample sets the connection speed to 115,200 bouds but I have no way of doing that from my wiringPi library and perhaps that is the issue.

I am not directly connecting the TFMini qwiic to the Raspberry Pi. Instead, I am making this connections to a breadboard that is connected to both devices.

Here is what I do:

#define I2C_ADDR 0x10

int main()

{

if (wiringPiSetup () == -1) exit(1);

fd = wiringPiI2CSetup( I2C_ADDR);

wiringPiI2CWrite(fd, 0x01); // From your example and datasheet this should be setting MSB

wiringPiI2CWrite(fd, 0x02); // This should be setting up LSB

wiringPiI2CWrite(fd, 7); // Data length 7 bytes for distance

delayMicroseconds(500);

int x = wiringPiI2CRead(fd);

The x gets a -1 and the device stops working until I re-plug the power.

Any help will be greatly appreciated.

I have the exact same issue that agcoplay has but I should be able to supply power from a difference source to the TFMini (I have a buck converter). I will try it and let you know my results.

That wpuld be great! Thanks!

OK,

Broke out the power cables on the 5v side of the TF lidar and powered up directly from the 5v Raspberry rail (disconnected Qwiic hat from Pi and connected to i2c on Pi with some jumpers, allowing me connect to Pi 5v headers)…

Exactly the same result and the Pi 5v has no problem in supplying 800ma!

Ran i2cdetect -y 1 and device detected at address 10

Ran i2cget -y 1 0x10 with result Error : read failed

Ran ic2detect -y 1 and device No Longer detected

So the suspicion of TF-Chris is looking suspect.

Next step is to bypass Qwiic Pi hat completely.

Ok, bypassed qwiic hat completely, breaking out Gnd, 5v, SCL,SDA on the 5v side of the TF (eliminating booster)

and the result is still the same

Ran i2cdetect -y 1 and device detected at address 10

Ran i2cget -y 1 0x10 with result Error : read failed

Ran ic2detect -y 1 and device No Longer detected

I’m looking for some Sparkfun input here, becasue I am now at a loss

We’ve never tried to use the TF Mini with a Pi before so we don’t have any examples of how to talk to it or what to expect when you enter the commands you’re using.

I’d suggest testing the TF Mini with an Arduino according to the directions in our [hookup guide as a sanity check to see if the device is working. Let us know what happens with that and we will go from there.](https://learn.sparkfun.com/tutorials/tfmini---micro-lidar-module-qwiic-hookup-guide)

OK,

Tried with arduino 101 and sketch provided and with same result on Serial Monitor

‘read fail’.

Power all checks out with transmitter led visible in the TF. Basically these

are duds and I need to escalate this. Chris can you provide a contact in SParkfun so

I can get some resolution?

Thanks

Andrew

Have you tried with an Uno or SparkFun RedBoard like we use in the [tutorial?

That would be the baseline for determining if the sensor is working correctly.

If you duplicate the setup in the tutorial and you’re still having trouble, fill out the form on the right hand side of [this page and include your order number and in the “why do you want a RMA” box put a brief description of the issue and the URL to this page and we can get a RMA setup for you.](Return Policy - SparkFun Electronics)](https://learn.sparkfun.com/tutorials/tfmini---micro-lidar-module-qwiic-hookup-guide)

  1. 90 days have passed since my order (I have wasted 3 months trying to get a solution) so the RMA is no good for me

  2. It’ll cost me as much to send the units back as it cost to buy them

  3. All of your solutions seem to suggest buying more of your kit

  4. The basemark for the TF Lidar i2c is NOT that it only works with your setup (nowhere did I read this in your website). The device is i2c enabled or its not.

To sum up

I give up

Let me PM you, we may still be able to help out. :slight_smile:

Chris,

I´m at work so I don’t have access to the kit at the moment.

You can send me an email on my gmail with any suggestions you have