How to make the TFMINI rangefinder talk I2C

Hey there. So are you using a uart port (TX, RX) or I2C. Thats the first question

hi ricky, for now im using i2c coz on serial happen that the fc cannot boot

Does the FC boot now. Not sure why it would not boot.
So if your using I2C, have you set the command in the TF MINI to be compatible with the Arduino unit.

The command of standard output is 42 57 02 00 00 00 01 06 Arduino Compatible
The command of pix format output is 42 57 02 00 00 00 04 06 Pixhawl Serial

1 Like

Thank you for your reply, you are the one who is willing to help me, as i need to wire on the i2c of the pixhawk wich is the right connection scheme??
Do you have also experience with maxbotix sonar mb 1202 and 1242 coz im having also that for another drone
Can i use the .ino file of ppoirier or there is a link for a new .ino file

So to be clear the resident expert is ppoirier.
However if I can assist I am pleased to try. If your issue right now is connecting it to the I2C port of the Pixhawk thats easy to do. Are you using an I2C expansion unit as I would recommend it if you are.

The pinout on the Pixhawk I2C bus is easy

Pixhawk Bus
5VDC , SCL, SDA, GND

Arduino Pins
Vcc, AD5, AD4, GND

yes im using an I2C splitter connected on the i2c of the pixhawk,

Can i ask you also info about maxbotix sensor mb 1242 and 1202,

@Dave84 may I suggest that you open a new issue in the forum ?
This is a blog about TFMINI.

Thanks @rickyg32 for the support :slight_smile:

as im not so expert i need as much as possible info for make work the extra hardware on my drones,

@Dave84
No problem, just open a new topic into https://discuss.ardupilot.org/c/hardware-discussion/hardware-other

Explain what you try to do and we will help you there

One more question, for make it compatible with arduino i must connect the lidar with an ftdi cable on the program for the tf lidar??? only after this i can wire definitely on arduino right??

It comes preconfigured in binary output at 115200 Bauds and we can change the mode by issuing these commands through the Benewake console (http://benewake.com/en/down.html36) or using Realterm:
The command of standard output is 42 57 02 00 00 00 01 06

ok… as i have understood i must first set the sonar for arduino and after this i can wire it on it… right

Correct. Chances are it came the right way but be safe

@ppoirier very interesting, thanks. One question: is this a better option than the ultrasonic modules? If I ask this, this is because now we can find such modules for 8 USD on AE. Reference: GY-US42V2 Replace MB1242 / SRF02

@chris661 Wow … this is what we call a clone :slight_smile:

The major problem with sonar = the signal get ‘‘washed’’ when installed on a quadcopter.
And the infamous problems with EMI; I recommand everyone to read Maxbotix integration guide, it is an honest description of all the problems you might experience when dealing with sonar.

yes, the clone war…
and the VL53L0X, the problem is the short range?( 2 meters).

Yes , they claim 2 Meter but in effectively it is 1,70M , but as you can see in this blog, I used them succesfully in an avoidance system:
https://discuss.ardupilot.org/t/avoidance-experiments-with-the-poc-and-benewake-tfmini/25277

hi, to be sure to understand what you say, with one Arduino mini pro I can connect 2 sensors? or you say this is a way to use 2 couples of Arduino + sensor?

For your outside test, what was the max reliable altitude, 6 meters?