Stufin
Home Quick Cart Profile

APM 2.6 Flight Controller Board

Buy Now

GPS

uBlox LEA-6H module

Accelerometer/GyroscopeMPU-6000

Barometer

MS5611-01BA03

Magnetometer

HMC5883L

  • Communication: The APM 2.6 features multiple communication interfaces, including:

Serial ports (UART, USART, and SPI)

I2C and TWI buses

USB port for programming and debugging

Optional wireless telemetry modules (e.g., 3DR Radio, XBee)

  • Power Management: The board has a built-in power module, supporting a wide range of input voltages (4.5-12V) and providing regulated power to peripherals.
  • Expansion: The APM 2.6 has multiple extension ports, allowing users to connect and integrate additional components, such as:

Servo outputs (8 channels)

Relay outputs (2 channels)

Analog inputs (6 channels)

Digital inputs (12 channels)

  • Software: The board is compatible with various open-source autopilot software platforms, including ArduPilot, PX4, and DJI Naza-M.

Specifications

Dimensions

70mm x 45mm x 15mm

Weight

approximately 30 grams

Operating Temperature

-20C to 50C

Input Voltage

4.5V to 12V

Output Current

up to 2A

Communication interfaces

Serial, I2C, TWI, USB, and optional wireless telemetry

Applications

  • UAVs (Drones): Aerial photography, surveying, mapping, inspection, and more
  • Robotic Platforms: Autonomous ground vehicles, boats, and other robotic systems
  • Research and Development: Prototyping and testing of autonomous systems
  • Hobbyist Projects: DIY drone builds, robotic experiments, and innovative applications
The APM 2.6 Flight Controller Board is suitable for a wide range of applications, including

Pin Configuration

  • APM 2.6 Flight Controller Board Pinout Guide
  • The APM 2.6 Flight Controller Board is a popular open-source autopilot system designed for drones and unmanned aerial vehicles (UAVs). It features a range of pins that enable connections to various sensors, actuators, and other components. Here's a detailed guide to each pin on the APM 2.6 Flight Controller Board:
  • Power Pins
  • 1. VIN (Pin 1): Input voltage pin, accepts 5V to 12V DC power supply from a battery or power source.
  • 2. VCC (Pin 2): 5V regulated output pin, connected to the onboard voltage regulator.
  • 3. GND (Pin 3): Ground pin, connected to the power supply return and provides a common ground reference.
  • Serial Communication Pins
  • 4. UART1_TX (Pin 4): Transmitter pin for UART1 serial communication, used for telemetry and console output.
  • 5. UART1_RX (Pin 5): Receiver pin for UART1 serial communication.
  • 6. UART2_TX (Pin 6): Transmitter pin for UART2 serial communication, used for GPS and other peripherals.
  • 7. UART2_RX (Pin 7): Receiver pin for UART2 serial communication.
  • Sensor Pins
  • 8. BARO_CS (Pin 8): Chip Select pin for the onboard barometer (pressure sensor).
  • 9. BARO_SDI (Pin 9): Serial Data Input pin for the onboard barometer.
  • 10. BARO_SDO (Pin 10): Serial Data Output pin for the onboard barometer.
  • 11. BARO_SCLK (Pin 11): Serial Clock pin for the onboard barometer.
  • 12. ACCEL_X (Pin 12): Analog input pin for the X-axis accelerometer.
  • 13. ACCEL_Y (Pin 13): Analog input pin for the Y-axis accelerometer.
  • 14. ACCEL_Z (Pin 14): Analog input pin for the Z-axis accelerometer.
  • 15. GYRO_X (Pin 15): Analog input pin for the X-axis gyroscope.
  • 16. GYRO_Y (Pin 16): Analog input pin for the Y-axis gyroscope.
  • 17. GYRO_Z (Pin 17): Analog input pin for the Z-axis gyroscope.
  • External Interrupt Pins
  • 18. EXT_INT1 (Pin 18): External interrupt pin 1, used for triggering events or capturing signals.
  • 19. EXT_INT2 (Pin 19): External interrupt pin 2, used for triggering events or capturing signals.
  • PWM Output Pins
  • 20. PWM_OUT1 (Pin 20): Pulse-Width Modulation output pin 1, used for motor control or servo outputs.
  • 21. PWM_OUT2 (Pin 21): Pulse-Width Modulation output pin 2, used for motor control or servo outputs.
  • 22. PWM_OUT3 (Pin 22): Pulse-Width Modulation output pin 3, used for motor control or servo outputs.
  • 23. PWM_OUT4 (Pin 23): Pulse-Width Modulation output pin 4, used for motor control or servo outputs.
  • 24. PWM_OUT5 (Pin 24): Pulse-Width Modulation output pin 5, used for motor control or servo outputs.
  • 25. PWM_OUT6 (Pin 25): Pulse-Width Modulation output pin 6, used for motor control or servo outputs.
  • Miscellaneous Pins
  • 26. Buzzer (Pin 26): Output pin for connecting a buzzer or speaker.
  • 27. LED (Pin 27): Output pin for connecting an LED indicator.
  • 28. I2C_SDA (Pin 28): Serial Data pin for I2C communication.
  • 29. I2C_SCL (Pin 29): Serial Clock pin for I2C communication.
  • Connection Structure
  • When connecting components to the APM 2.6 Flight Controller Board, follow these guidelines:
  • Use high-quality, low-noise cables and connectors to minimize electromagnetic interference (EMI).
  • Ensure proper polarity when connecting power sources and sensors.
  • Use logic-level shifters or voltage dividers when connecting devices with different voltage requirements.
  • Implement signal conditioning and filtering as necessary to reduce noise and interference in sensor and UART signals.
  • Consult the datasheets and documentation for specific components and sensors to ensure correct connection and configuration.
  • Remember to handle the board with care, as it is sensitive to electrostatic discharge (ESD). Always ground yourself before handling the board, and use an anti-static wrist strap or mat when working with the APM 2.6 Flight Controller Board.

Code Examples

APM 2.6 Flight Controller Board Documentation
Overview
The APM 2.6 Flight Controller Board is a popular open-source autopilot system designed for drones and other unmanned aerial vehicles (UAVs). It is based on the Arduino Mega 2560 platform and features a range of sensors, interfaces, and expansion capabilities. This documentation provides an overview of the board's features, specifications, and examples of how to use it in various contexts.
Features and Specifications
Microcontroller: ATmega2560
 Sensors: 3-axis accelerometer, 3-axis gyroscope, 3-axis magnetometer, barometer, GPS
 Interfaces: UART, I2C, SPI, ADC, PWM
 Expansion capabilities: I2C, SPI, UART, ADC, PWM
 Power supply: 5V to 12V
 Dimensions: 70mm x 45mm
Code Examples
### Example 1: Basic Setup and Sensor Reading
This example demonstrates how to initialize the APM 2.6 Flight Controller Board, read sensor data, and print it to the serial console.
```c
#include <AP_Common.h>
#include <AP_Progmem.h>
#include <AP_Mavlink.h>
void setup() {
  // Initialize the board
  AP_HAL_BoardInit();
// Initialize the serial console
  Serial.begin(115200);
// Initialize the sensors
  init_sensors();
}
void loop() {
  // Read sensor data
  sensorsoup_t sensors;
  read_sensors(&sensors);
// Print sensor data to the serial console
  Serial.print("Accelerometer: ");
  Serial.print(sensors.accel.x);
  Serial.print(", ");
  Serial.print(sensors.accel.y);
  Serial.print(", ");
  Serial.println(sensors.accel.z);
// Wait for 10ms before reading sensors again
  delay(10);
}
```
### Example 2: Motor Control and PID Tuning
This example demonstrates how to control motors using the APM 2.6 Flight Controller Board and tune the PID controller for stabilization.
```c
#include <AP_Common.h>
#include <AP_Motor.h>
#include <AP_PID.h>
// Define motor pin assignments
#define MOTOR1_PIN 3
#define MOTOR2_PIN 5
#define MOTOR3_PIN 6
#define MOTOR4_PIN 9
// Define PID gains
#define P_GAIN 0.5
#define I_GAIN 0.2
#define D_GAIN 0.1
void setup() {
  // Initialize the board
  AP_HAL_BoardInit();
// Initialize the motors
  init_motors();
// Set motor pin assignments
  motor_set_pin(MOTOR1_PIN, MOTOR2_PIN, MOTOR3_PIN, MOTOR4_PIN);
// Initialize the PID controller
  pid_init(P_GAIN, I_GAIN, D_GAIN);
}
void loop() {
  // Read sensor data
  sensorsoup_t sensors;
  read_sensors(&sensors);
// Calculate PID output
  float pid_output = pid_control(sensors);
// Set motor speeds
  motor_set_speed(pid_output, pid_output, pid_output, pid_output);
// Wait for 10ms before updating motors again
  delay(10);
}
```
### Example 3: GPS Navigation and Waypoint Navigation
This example demonstrates how to use the APM 2.6 Flight Controller Board with GPS navigation and waypoint navigation.
```c
#include <AP_Common.h>
#include <AP_GPS.h>
#include <AP_Navigator.h>
// Define GPS serial port
#define GPS_SERIAL_PORT Serial
void setup() {
  // Initialize the board
  AP_HAL_BoardInit();
// Initialize the GPS module
  gps_init(GPS_SERIAL_PORT);
// Set home location
  set_home_location(37.7749, -122.4194);
// Set waypoint navigation
  nav_set_waypoint(1, 37.7859, -122.4364);
  nav_set_waypoint(2, 37.7969, -122.4574);
}
void loop() {
  // Read GPS data
  gps_info_t gps_data;
  gps_read(&gps_data);
// Update navigation
  nav_update(gps_data);
// Check if at waypoint
  if (nav_at_waypoint()) {
    Serial.println("Reached waypoint!");
  }
// Wait for 10ms before updating navigation again
  delay(10);
}
```
Note: These examples are for demonstration purposes only and may require modifications to work with your specific setup and requirements. Additionally, ensure that you have the necessary hardware and software setup, including the APM 2.6 Flight Controller Board, sensors, motors, and GPS module.