General Questions for sonar implementation on Drone

Hello all,

I am a University student and I choose for Final Year Project to implement sonar sensors to a Drone and use those sensors to avoid obstacles.

I have bought one sonar sensor for a start. The sensor is MB1200XL-MaxSonar-EZ0.

My Drone is idea fly ifly-4.

  1. The Drone has an APM board. I want to determine for sure what version of APM I have and I don't really know how to do it.
  2. I am currently using a custom code from a Guide found that explains in really simple and good what each part of the code does and used for.I using this code because I have problems with the Arducopter 2.1 because I can't really arm my drone with all the ways I found online that explains how to arm it. Yes, i am calibrating the sensor trough Mision Planer and still nothing.Also, I don't know where and how to edit the Arducopter code because of its complexity, if anyone can provide anything that will give me a solid ground of starting or some useful tips would be grateful.
  3. I tried using the sonar sensor on my Drone to receive its readings.I used the analogRead command for normal Arduino programming.For APM, it doesn't accept the analogRead Command and I am wondering how to interact with the sensor while using APM / Hal  way of compiling. Also, I want to use the sensor in a digital way if it is possible because I read somewhere that the digital way is more accurate.
  4. I am wondering if I can use the input pin on the APM and if I can, how do it?
  5. I want to have the most accurate results from my sensor to be able to do a proper obstacle avoidance, any suggestion or tips on this one?
  6. I have connected the cable followed from this Guide, but a video tutorial show that is using a capacitor and a resistor. I just connect the cable straight to the sensor and the board without any other items used. Will it be a problem? Do I need to include the items from the video in the cabling of the sensor to get real and accurate results? I know the reading from the difference in the sensors voltages that is why I am asking.
  7. I was compiling the Arducopter Code normally until now that I face an error saying that the Sketch Is too Big. Any help on this error?

Thank you for your assistance, I am just a noob starting to get familiar with a whole new world.Show some mercy on me :)

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

Join diydrones

Email me when people reply –

Activity