Servers by jDrones

How to make the TFMINI rangefinder talk I2C


(David ) #21

hi rickyg32,you have post a very good scheme…easy to understand, me im already weeks trying to set up and make work tf mini lidar with my pixhawk and also pixfalcon, but without success. I hope you can help me to solve that


(rickyg32) #22

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


(David ) #23

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


(rickyg32) #24

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


(David ) #25

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


(rickyg32) #26

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


(David ) #27

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


(David ) #28

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


(ppoirier) #29

@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:


(David ) #30

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


(ppoirier) #31

@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


(David ) #32

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??


(rickyg32) #33

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


(David ) #34

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


(rickyg32) #35

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


(chris rey) #36

@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


(ppoirier) #37

@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.


(chris rey) #38

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


(ppoirier) #39

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


(chris rey) #40

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?