Skip to content
LPRDev1 edited this page May 15, 2016 · 4 revisions

Dronekit

Dronekit will use the mav-link protocol to communicate between the Raspberry Pi and the APM 2.6. However we will need to select a communication port to select from. The option available on the Rover-Sentry platform are:

Port/Module Port Description Raspberry Pi APM Notes
USB Universal Serial Bus (USB), is a current industry standard for serial communications and providing small amounts (<300 ma) of power. Pi2 has 4 USB connectors, 1 used for a wifi dongle. Micro usb is used for power Used for programming flash on APM 4" USB is the cable can handle the connection
UART A universal asynchronous receiver/transmitter (UART) is a computer hardware device that translates data between parallel and serial forms. UARTs are commonly used in conjunction with communication standards such as RS-232, RS-422 or RS-485. GPIO 14 and 15 UART 0 is shared with USB, UART 2 is open. UART pins are NOT exposed on APM2.6 Would require hardware hack to expose UART 2 pins on APM

References

http://python.dronekit.io/guide/connecting_vehicle.html

Notes on Pi Communication Port Options

Both the Raspberry Pi 2 and APM 2.6 have several I/O ports that can be used to send commands/status (comport). Some have existing uses that will be difficult to use as a dedicated comport. The Raspberry Pi has single 40 pin GPIO port that allows dual use of the some of the pins for mapping ports as shown in the connector diagram below. The APM has several ports mapped into several connectors as shown in the APM diagram below:

Below is a comparison chart of the available ports.

Port/Module Port Description Raspberry Pi APM Notes
USB Universal Serial Bus (USB), is a current industry standard for serial communications and providing small amounts (<300 ma) of power. Micro usb is used for powering the Pi Used for programming flash on APM The USB is often used for communicating with PCs, so existing functionality may be effected if this port is used.
SPI Serial Peripheral Interface (SPI) bus is a synchronous serial communication interface specification used for short distance communication, primarily in embedded systems. GPIO 7,8,9,10, and 11 Top port right two rows Synchronous comms is not a first choice proposition.
I2C Inter-Integrated Circuit (I2C) is a multi-master, multi-slave, single-ended, serial computer bus typically used for attaching lower-speed peripheral ICs to processors and microcontrollers. GPIO 3 and 5 dedicated I2C port cureently used for the GPS Initially created for serial memory. Can be used for comms, but would take some work. GPS uses the port so this cant be used.
UART A universal asynchronous receiver/transmitter (UART) is a computer hardware device that translates data between parallel and serial forms. UARTs are commonly used in conjunction with communication standards such as RS-232, RS-422 or RS-485. GPIO 14 and 15 UART 0 is shared with USB, UART 2 is open. UART pins are NOT exposed on APM2.6 Would require hardware hack to expose UART 2 pins on APM
GPIO General purpose I/O pins. GPIO 1-22 Many pins are shared as noted on the respective diagram. A0-12 (analog) and Input 1-8 and output 1-8. Arudpilot uses Outputs 1 and 3 and Inputs 1,2,5 and 6 Note the us e of power rails on the APM The use of shared as noted on the respective diagrams may imply that some of shared pins require software or hardware modifications to use them as GPIO. At least 4 of the GPIO pins (possibly more) will need to be dedicated to the sensors.
Clone this wiki locally