Communication between APM and second arduino board

Hello,

for a school project me and some friends are trying to create a drone using the APM 2.5 and our own direction finding circuit.  We will be using a second arduino Mega 2560 board which is doing all the processing for collision detection around our quadcopter and will calculate which direction we should go.  I have been reading through the forums and it seems like we would just need to craft and send MAVLink packets from our arduino board to the APM, but we are a little lost on just how we should go about doing this. I was wondering if anyone had tried to accomplish something like this before and had any success? Or are there any tips that anyone could provide on how to make and send these packets to the APM?  If something like this isn't possible, are there any suggestion on what we could try to do?

Thanks,

Ben

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

Join diydrones

Email me when people reply –

Replies

  • hello Ben, i know this is way long after your project. just wanted enquire how you made the connection as i also need to do this.thanks

  • Developer
    I would recommend using the telemetry serial port. The MAV link protocol is already capable of sending the GPS information. Just connect it to your Arduino serial port or RPi or whatever board you are using.

    MAVLink is documented here http://qgroundcontrol.org/mavlink/start

    If you open the APM there is also serial port breakout on the bottom edge to easily connect.

    See bottom of this page and UART0 and UART2 (which can be enabled in the code)
  • I'm looking for something similar. I want the gps signal to be sent to an atmega and when the time is right (for example when i contact the atmega through a 3g shield) the atmega add waypoints to apm2.5 (or circle around, or return).

    So far, i figured that a viable solution is the I2C connection of the arduino. I hope it will work (the GPS module senting parallel data to apm and atmega).

  • This is a follow up to Ben's post above.  I am collaborating on this project with him and we think we found a solution by using the unused SPI port(6 pin header between GPS connector & UART0) on the APM.  After some research into this, we found that this SPI bus is used to program the bootloader on the APM.  Does anyone know if this will cause a potential conflict or is this SPI open for us to use for communication between APM and ArduMega Pro?

    Thanks for the help,

    Andrew B.

This reply was deleted.

Activity