Object Avoidance system with sonar (Maxbotix I2C), problems with I2C addressing

I have successfully implemented ONE Maxbotix I2C sonar as object avoidance in my multi rotor, which works with a Pixhawk. Nevertheless, I am having trouble to implement MORE THAN ONE sonars. I thought the problem was that all the sonars have the same default I2C address (224), but I changed the address of one of them (to 100) and still not being recognized by the controller. I am using a I2C splitter to connect more than one I2C device.

Thanks for your time,

Deepansh Dhawan

1 Like

Hello, did you make any progress.I am strugling with same problem.I2c sensors from banggood though.I solved temporary with one i2c and one analog sensor.
Best regards

Good day @deepanshidrone

Just joined the group. Busy building my 3rd drone.
Testing my F450 drone with pixhawk 2.4.8 ( coptor 3.5.5 )
I have implemented most of the functions that I want. Busy with “Object avoidance”.
I am battling a bit and I see that you have had some success with it.

I am using Maxbotix but using the analog signal.
I have configured the sonar parameters and when I test it on the sonar-test-page
( Mission PLanner ) I get accurate readings.

the problem is, when I fly , it does not actually do anything when I fly towards an
obstacle. I have googled and found a page that lists parameters about “avoidance” but
I do not find those parameters in my “Full parameter” lists ??

One example which I do not have in my list is “AVOID_BEHAVE” ??

I would appreciate it if you could offer some advise ?!
Best regards
John

Have you read the wiki?
http://ardupilot.org/dev/docs/code-overview-object-avoidance.html

Did you configure a switch (object avoid 40) to enable avoidance?
http://ardupilot.org/copter/docs/parameters.html

Have you read the other related posts like this one?
https://discuss.ardupilot.org/t/help-with-object-avoidance/17143

I am still having the same problem. With one sonar works properly, but the controller can’t recognize more than one sonar, even if I change de I2C address of the rest of the sonars.

Currently I can’t see my paramater list, but I remember I had the same problem and solved it my changing one of the AVOID_ parameters. I think it was some parameter wich had 3 options and the last one was “3.Both refering” to the first 2 options (one of this 2 options maybe was “Object avoidance”) .

Now I remember it was probably AVOID_ENABLE parameter that 3 options: “Use proximity sensor”, “Stop at fence”, “Both or all”. The right option is the last one.

Hey, thanks for the tip.At the latest firmware there are seven options.I have enabled all on 7.But unsure if correct.Will try 3.Best regards.

Many thanks deepamshidrone

I tried setting the AVOID_ENABLE parameter, but before I could test it, I noticed something else … I only get sonar values reported on the “status” screen , when I select the direction for my sonar as pointing “DOWN” … (RNGFIND_ORIENT). So , even though it is mounted such that it points to the front, I only get values reported if I select it as “25” . Am I missing something ?