I2C Maxbotix range finder on Pixracer

Ok, as I thought, my wiring with my splitter was OK. Now when USB connected with MP, my Maxbotix sensor works perfectly! (I was in UDP before). But when connected through UDP it doesnā€™t provide any range values. 0. So I assume there is a conflict between the 8266 Wifi module and the Maxbotix I2C module, sharing something together? Is this a parameter in the SERIAL things I can adjust somewhere?
Iā€™m sure it will help also other people.
Thanks, Chris

Looks like a power supply issue for me
Leaving the USB plugged in, try connecting with UDP

thanks, just did the test 1st usb connected, I get the range value, then I clicked on disconnect and selected UDP, without disconnecting usb cable and range value was on 0 again. I also did the procedure with 11.1V battery connected, same result.

We are gerring close to the sourceā€¦ what release have you loaded on the PixRacer?

yes, hope so! yesterday 3.5.2 and this morning the latest 3.5.3.

Thats pretty up to date :wink:
Do you have a ftdi serial to usb or a telemetry radio to check if this signal is corretly fed through serial telemetry?

yes, have FTDI to usb, or FrSky Telemetry Taranis Q X7 can try this Monday, if you have any instructions. a nice weekend, Chris

Basically you set the serial port on the PixRacer as a mavlink with the desired speed and on Mission planner you connect to the FDTDI-USB port at the same speed.

Chris what type do you put on range type?
In wiki it says 4 but there is no 4 on mission planner values

http://ardupilot.org/copter/docs/common-rangefinder-maxbotixi2c.htmll

Hello,

wiki might be outdated, look here:
http://ardupilot.org/copter/docs/parameters.html#rngfnd-type-rangefinder-type

1 Like

@cookmangr, I opened an issue some days ago for this error, the right value is 2 https://github.com/ArduPilot/ardupilot_wiki/issues/942

1 Like

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ā€¦