I2C Maxbotix range finder on Pixracer

ppoirier i get it connected to 2

I use this one

I get sonar range values but i also get bad lidar health in mission planer hud

Do you have the same pattern as @chris661 ?
I mean can you read OK using the USB ?

I have pixhawk version 1

I have a i2c splitter and i have connected external compass oled display and the maxbotic i2c range finder

I have conect them only with usb because i m on table testing hardware , havent mount electronics on multirotor yet

Do you think its power too low from usb?

@cookmangr, I bought this one before , but it appears that it is supported only in latest APM 3.2.1 firmware, never get it working with 3.5.x latest firmware.

I think we might be dealing with 2 differents issues here
@chris661 has an original Mavbotics that works ok on the PixHawk

The sensor you are using is an implementation of a HC-SR04 with an Arduino At Mega 168 based I2C interface. It seems to work according to the comment on the question-comment section ā€œā€¦ I get it work by choosing Maxbotix IC2 in range finder bookmark in mission plannerā€. .

1 Like

Ppoierier mine working too

I do get cm values and it looks very pecise, but it show me bad lidar health at mission planner hud

What i try is that i disconnected all extra devices from i2c splitter like the external compass and the osd screen and the bad lidar health disappear

Do you think that i2c conflict when one or more device connected?

What should i do?

Well the standard Maxbotic is at AP_RANGE_FINDER_MAXSONARI2CXL_DEFAULT_ADDR 0x70
An it does not seems to conflict with the SSD1306 or the HMC5983 according to this: https://learn.adafruit.com/i2c-addresses/the-list

So it might be a power issue, remember that the PixRacer is limited to 1 Amp for all devices. On my quads, I am using external BEC for the rangefinder and optical flow

1 Like

Ok , this is just a testing hardware on the table so when i start the building i will try to power the sonar from an external bec

Thank you very much

@ppoirier, hi, before testing with FDTI, I just get today by post from robotshop another MB1242. I proceed to the same tests and always same problem as described above. So, as I had to modify lot of times my serial values for telemetry and OSD purposes, I really suspect that I modified some parameters and this could be the cause for me. To resume, I have no problem when connected to USB, I get range value (and sometimes Bad Lidar Health message, I do not know why), but when connected WIFI UDP, I have no range displayed. Attached some printscreens of my SERIAL and RNGFND, maybe you will find there something badā€¦

Looks ok
If you really want to make sure , save , reset and just set the randefinder to type 2

1 Like

Thanks, I will do an all reset, it good sometimes, but do you know what I hate with Pixracer and MP? Doing Compass Calibrationā€¦ So easy to proceed with PX4 and QGCā€¦ But a nightmare in MP, compass stays in red zone, and you have to do it againā€¦ No problem with Pixhawkā€¦ Itā€™s out of topic, I know but is it a simple way to reset everything and keep the compass parameter? Copying manually the parameters? Which one? Thanks, Chris

Ok, with Compare Param, I can get my old parameters I choose, right? Now I have tested with the resseted parameters and I have always my problem. So for me, not possible at all to use Wifi UDP connexion and having range finder working. What do you suggest? Do you have the same config as me? I mean Pixracer with 8266 and range finder?

@chris661 wellā€¦ you convinced me to try to put the ESP8266 module back on the PixRacer and check on Mission Planner and I confirm there is NO sonar range being displayed on Mission Planner 1.3.49. on UDP

The RangeFinder signal is transported through MavLinl because I can read it with Qcgroundcontrol.

@Michael_Oborne do you have any suggestions ?

@ppoirier, @Michael_Oborne, I stay available for testing, and appreciate your help. A nice day, Chris

@ppoirier, now flying without any groundstation Wifi connected. One point, the value Alt that I get from frsky telemetry in my Taranis Display should be a calculation between baro and rangefinder values? Right? But Iā€™m not sure itā€™s doing it this way, how to check? I take off with Alt Hold Flightmode, I stabilised the Quad at around 1 meter, I read this value on my screen, ok. But then, I landed and took the quad by hand and place it over an 50cm object, but I saw no difference, Like the Alt indicated is only the Baro altitude. Whatā€™s your point of view? Thanks, Chris

If you want to fly with rangefinder as primary, you have to set http://ardupilot.org/copter/docs/parameters.html#ek2-alt-source-primary-altitude-sensor-source

sorry not sure to understand, I thought the range finder was used to improve measurements given by gps and baro, this is not the case? reading the link you provided me, I understand that a range finder can only be used in conjunction with an
EK2_GPS_TYPE = 3

yes it is, but by default it is the baro that is the main altimeter

And this parameter WPNAV_RFND_USE set to 1?

do you have some news about this or do I have to open an issue?