Pixhawk Mini + MaxBotix Sonar

I am having difficulty determining how to connect my Pixhawk Mini to my two MaxBotix MB 7062 senors. The mini does not have any “aux” outs, only “main” outs. Any help on this issues is appreciated!


For input to the Pixhawk mini, you will have to use the I2C input bus.

This being said, I have not been able to enable MaxBotix I2C sensors vai Mission Planner yet. It seems to be trivial on the original Pixhawk and I have read post saying that they work with the mini. Could be that I am using the rover firmware.

I2C set up:

Would be interested to hear if you have the same problems.

Good luck!

Thanks Glen,
I am using the Rover firmware as well. I have yet to find a good wiki or how-to for properly connecting the I2C bus board. Are there any special tricks? I was not aware of all the extra fuss that would be required for using the Pixhawk mini. Due to this I am serisouly considering purchasing a “regular” Pixhawk, even a clone if I have to…

Which sensor module are you using? How long have you been trying to get to work? Your issue sounds like I might have the same issue.

Thanks for your help, will let you know how it goes.

I am using the MB1242. I have only been working on this for about two weeks and not always focuses on the sonar. Our group is considering buying a different range finder sensor and seeing if the issue also exists there. If it does, maybe switching to a linux based board.

I am going to have more time over the next week to play with it. Hopefully get the sonar working. If I do I’ll post what I had to do.

I don’t have a Pixhawk Mini - I’ll be testing on a regular Pixhawk.

Thanks, Grant.

I’ve noticed I think our doco isn’t quite right. On this page
It says to set the RNGFND_TYPE to 4. That is incorrect I believe. You should set it to 2. Once set to 2 and you have rebooted you should see values starting to appear in the “sonarrange” value on the Status tab.
I’ll update the doco.

Thanks, Grant.

I have tried values of 2 and 4 for RNGFND_TYPE and am still getting a constant value of 0 for “sonarrange”.

What version of the firmware did you test on?

I am wondering if there is some issue that exists for the Pixhawk mini, but not for the original Pixhawk.

Have you tried this yet? If so what were your results?


No intention to jack your post…but I think the problem lies with the mini itself and not the sensor and you might be spinning your wheels for no reason.

There seems to be a issue with a combination of the mini and the lack of development for the firmware development on this particular board type.

Just to be clear I’m not blaming anyone except 3dr themselves for pushing the mini into production and not having all the bugs sorted out prior or even having a fully operating FC for that matter…plus you put into consideration all the effort is being put on the pix 2…that may or may not ever make it into full production before the technology becomes obsolete lol…so who knows how long it will be before there is a consolidated effort to having the mini up and running.

Your best bet is to try and get your hands on a full sized pixhawk and save yourself weeks of frustration…unless you know your way around git hub and the code in which case I would gladly be a tester for you!!

Wish you all the best.

Where can I get my hands on a full size board? I would much rather use a full size than a mini? Ideally I do not want a clone, but will buy one if I can be shown a reputable brand.

Thanks for all your posts. I am almost at the soldering stage for my sensors. I havent gotten there yet… Will update when I can.

If its a 3DR Mini then its designed for the PX4 code base - not ArduPilot. They don’t test it with ArduPilot. That being said it mostly works on ArduPilot - perhaps you have just found a corner case issue.

Thanks, Grant.

Here you are Colin, this is the real deal pixhawk made and supported by one of the original developers of the board.


This site is the closest you will ever get to purchasing an authentic pixhawk board from a company online.

Ok. So I might just ditch the Pixhawk Mini and get the Pixhawk… Does anyone have a suggestion for which method is best to connect multiple sensors. I2C or Analog. Maxbotix has a wiring diagram on how to fire the sensors sequentially. So reading the two analog sensors should follow other discussions. Any thoughts on multiple sonars I2C vs Analog?


I’m about to get 4 I2C Maxbotix MB1202’s going so I’d recommend I2C shortly. The problem with the Analog is the number of sensors you can have is limited to 2 I think.

Note you have to change the address’s of each of the I2C sensors - they MUST have a different I2C address. So if you are ok to do that then I2C is the go.

Thanks, Grant.

@Colin_M I cannot get to deep into details because the whole computer side of things is not my particular expertise. But what I can tell you is that I was involved in a project about 2 years ago and we were doing exactly what your requiring to accomplish.

maxbotics has a readily available arduino script on their website that you can use to easily change the i2c address with. There is also a few good writeups online that detail how to use available open source software programs to build a GUI that displays the readings of multiple sensors.
We had connected 10 sensors to a mega and had all the reading being displayed on a pictue of our UAV as actual ranges on the user interface but we never moved any further with the project because of a change in direction with that project.

I’m currently trying to get the Pixhawk mini on 3.5.0rc2 to work with an MB1242 and I’m curious if anyone has had any progress with this issue. When I’m connected and use both parameters for RNGFND_TYPE as 2 and 4, the “sonarrange” parameter does not even show up in the list of values (as in it doesn’t exist in the list; even as 0) in both qGC and APM Planner 2.0. Any insight or recommendations at all would be greatly appreciated.

Are you using beta versions of QGC or APM Planner? At least QGC stable doesn’t support 3.5 correctly.

I have tried using qGC daily build and it works ok. When running qGC stable, it works but it just throwing an error about the frame type because in 3.5 the parameter name has changed (is my understanding).

Today, I did find that the sonar is working when I moved over to a PC running mission planner, and when I went back to qGC, I found that it is called “distance” instead of “sonarrange”, so I believe it is working. Does that sound right to you?

Yes, it is quite possible that names vary between GCS.

In 3.5 not only frame type parameter changed name, but there is also frame class - only QGC daily can handle that now, it will be out with QGC 3.2, but there’s no timeline on that.

Hi Collin, i need your help for connect two maxbotix i2c sonars, can you share pls the scheme of the correct wiring coz in the datasheet of maxbotix i cannot understand well