Servers by jDrones

Multiple MaxBotix I2C Pixhawk 2.1 problem


I have multiple MaxBotix I2C sonars, my idea is to use one as obstavcle avoidance on the front and the second one pointing down to measure the high. Each one will work fine alone, but when i plug the sencond to the i2c riel seems like to interfer each other. So I have change the address of one of the sonar, but any address different to the 224 make the sonar stop working on the pix.

Another thing I realize is the PixHacwk 2.1 only get the rngfnd and never the rngfnd2.

Im missing something? Any one did sonmethin similar?


I have not used more than one but I know that one mode they operate in is a free-running mode. The sensors are continuously firing the ultrasonic sensor and taking readings. So, they interfere with each other. The solution is to control when they each fire. The link below is about this, but may not apply to your model:

Thanks, I think this is not the problem, because beside the reading, the P2.1 doesnt recognize the 2second sensor as the rngfnd2, both try to work on rngfnd.

Thanks anyway!

1 Like

may be this picture will help you to help me to uderstand what IM trying to do

You need to do 3 things to make it work:
A) Set different address for second the Maxbotic:
I cannot tell if this change would be permanent
B) Use a different driver tnah Maxbotic because it is limited to one device at this adress
You may use LightWare I2C sensor driver that allow for multiple sensors on different addresses.
C) Change the lightware code in order to convert imperial to metric as the Maxbotic spit values in inches.

This is a little bit ‘‘adavced stuff’’ as you need to work with developping and Arduino stuff


I already have change the address of the maxbotic, and any address different from the original, make the Pix cant read it. May be have to be with your B comment, I will try it today

I really appreciate your help! I´ll let you know the results!

1 Like

Maybe I am wrong about the Imperial range, looking at the specs it is metric.
The imperial apply to serial type:

thanks! But I think the metrics are ok, when I plug just one the measures I get are in meters.


Can you tell me how to use the driver? Where do I have to put that code? Can you give ma a hand with that? I will appretiate it.


Actually you dont have to change the driver
Just use lightware I2c driver and put the I2C addresss range as in the wiki

  • RNGFND_TYPE = 7 (LightWareI2C)
  • RNGFND_ADDR = 102 (I2C Address of lidar in decimal). Please note that this setting is in decimal and not hexadecimal as shown in the lidar settings screen. The default address is 0x66 which is 102 in decimal.


I have change the MaxBotic i2c sensor address to 102 (decimal), they I have change the type to 7 and the address to 102, but no change.

May be im doing something wrong?

Did you changed the Adress on the Maxbotic using the arduino sketch ?
Other thing you can do is keeping the maxbotix to original 070x that is 112 on Mission planner (That is what I did for my test)


Yes I did.

I have try to do what you told me, to test with the default address, so I have change the addres again:

Then I have change the address again un MP, but no result

any other idea??

073 = is 115 then

sorry, im a little confuse with the address. In the arduino sketch the address are decimal, from 2 to 254, just pair numbers.

you have told me about hexadecimal numbers and how to convert. But I dont understan why did you take the 073 for example. the MP address are in hexadecimal?
I think im missing something, but I really dont know. Can you enlight me pls?


Sorry for confusion , I just took the number showned on the Arduino screen 73… :wink:
BAsically if you can read with arduino at adress 70hex, you should be able to read on mission planner at 112 decimal.
Please note I never tried with Maxbotic, I made it work with my I2C TFMINI Maxbotic emulation:

As I can see, wont work the same way. I think the next step is the MaxBotic Driver. Can you tell me how to load that driver to the pix?


First: Can you make the Maxbotic work ok with the native driver on the Pix ?

yes, rngfnd_type=2 and works like a charm…

yuhuuu, dont foget meee plss


Servers by jDrones