Pixhawk & Sonar

My pixhawk came in the mail today for my APMRover!

I have 2 MB1240 Sonars and was wondering where I can find a cable to hook them up to the PixHawk. I am assuming I will need to power it one way and then connect the other pins 2-5 to the I2C bus. 

Has anyone done dual sonar with Pixhawk yet?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Admin

    @theclam,

    Try here Link

    As far as I know, the MB1240 is an analog output sonar and not an I2C output sonar.

    Regards,

    TCIII AVD

  • Hi LouDogg,

    My "buddy" Dave is not answering to my emails anymore, so I did not go forward (yet), but I'm still eager to do it this year. Would you make a "developing team" with me ? I know roughly the method, but do not even have a pixhawk yet. I will not start such a project alone.

    Kind Regards,

    Guillaume Fabre
  • Have you tried it without the sonar?  I was using sonar on my custom hex with APM2.6 and auto landings were very shaky.  I think it was because of the sonar signals going a little crazy as it approached the ground.  I upgraded to the pixhawk and the sonar was not supported.  I flew without sonar and auto landings are a smooth as melting butter now.  I won't be putting the sonar back on unless I can find a good reason.

    • On the APM 2.6 I used the sonar properly filtered and it worked great. On the pixhawk apparently the sonar is not implemented yet on the current 3.1.5 code, it will be on the 3.2 when it will be released.

      The landings with the barometer only are spot on, amazing how precise, so we might not need sonars for this at all.

  • Admin

    @Oxxy Fx,

    You can start here for a single sonar Link and here for dual sonars Link 

    I used CDROM shielded audio cables to connect the sonars to the Pixhawk.

    Here is a blog post concerning filtering the sonar power Link

    My dual sonar is used on a rover. 

    Regards,

    TCIII AVD   

    • Thanks Thomas. I used sonar before on the APM 2.6 with success. I filtered the cable and added the cap and resistor. However all your links seems to refer to a rover setup - while I am trying to fly a copter.

      Is it possible that as according to the post from David above the sonar code is not working on the arducopter?

      • Hi !

        Stupid question (not at all in fact), but can I use a sonar and APM / Pixhawk not in front of the ground but relatively to a wall instead ? (so as to respect a certain distance).

        Thanks in advance ;-) 

        • Newtoon, 

          Did you figure out a good way to use the sonar as a proximity sensor?  I might try messing with the config etc. because I would like the copter to slowly approach the wall.

          Any help apreciated,

          LouDogg

          • Hi LouDogg,

            My "buddy" Dave is not answering to my emails anymore, so I did not go forward (yet), but I'm still eager to do it this year. Would you make a "developing team" with me ? I know roughly the method, but do not even have a pixhawk yet. I will not start such a project alone.

            Kind Regards,

            Guillaume Fabre

  • I am trying to use te sonar for the arducopter (quad) configuration.

    I tried connecting the Maxbotix 1240 to all available ports on the Pixhawk but I get no response from the sonar. I have the latest firmware, updated September 20th.

    While all the documentation talks about setting the sonar pin to x or y - there is no Sonar_Pin parameter in the advanced parameter list.

    What am I missing?

This reply was deleted.

Activity

DIY Robocars via Twitter
Videos from the ICRA autonomous racing workshop are now available: https://linklab-uva.github.io/icra-autonomous-racing/
Jun 10
DIY Robocars via Twitter
RT @SmallpixelCar: Prepared race track for Warm Spring Raceways @wsraceways and looking forward to test my new car at RAMS RC @ramsaicar fa…
Jun 6
DIY Robocars via Twitter
RT @f1tenth: Trying out some nasty blocking maneuvers 🏎️🤖 #f1tenth #autonomousracing https://t.co/nMTstsaogM
Jun 5
DIY Robocars via Twitter
May 27
DIY Robocars via Twitter
RT @araffin2: I will talk this Saturday from 18:00 to 19:00 Paris time for the @diyrobocars community about learning to race in hours using…
May 27
DIY Robocars via Twitter
RT @a1k0n: Luckily the infeasible hairpin problem was easily reproducible in simulation and I could test the fix before bringing the car ba…
May 26
DIY Robocars via Twitter
RT @a1k0n: Another problem was that I was over-constraining the car's allowed accelerations, so it didn't think it could turn as tight as i…
May 26
DIY Robocars via Twitter
RT @a1k0n: Breaking the map up into two halves worked, but I had to be more careful about separating the inner track from outer. There's se…
May 26
DIY Robocars via Twitter
RT @a1k0n: Here's a datalog for my fastest lap of the day. Lap timer is tiny window lower-left. https://t.co/myrlWWrKUY
May 26
DIY Robocars via Twitter
May 26
DIY Robocars via Twitter
RT @a1k0n: Here was my car's POV. Man this track is confusing in first-person! After the incident my camera was all scuffed up and I was af…
May 23
DIY Robocars via Twitter
RT @circuitlaunch: Loved seeing so many familiar (masked) faces at Circuit Launch today for our first in person @diyrobocars in over a year…
May 22
DIY Robocars via Twitter
RT @circuitlaunch: Last but not least, mystery guest @BostonDynamics Spot took to the track @diyrobocars He enjoyed the #brazilianbbq too 😂…
May 22
DIY Robocars via Twitter
RT @SmallpixelCar: Today’s race @circuitlaunch for @diyrobocars with @a1k0n Was busy in the morning and did not get a chance to tune camera…
May 22
DIY Robocars via Twitter
RT @a1k0n: This was epic. My car was barely working this morning, had to make a lot of changes and extremely dirty hacks. Post-race analysi…
May 22
DIY Robocars via Twitter
DIY Robocars @ Circuit Launch, 3/7/2020 https://twitch.tv/diyrobocars
May 22
More…