RC Autopilot – R1


Notes Started: March 2011

Updated: 25-July-2015

Due to the improvements in hardware and reduced cost of simple and very good basic autopilots for RC there is not point designing another one. So this page is now here just for reference.

Introduction:

An autopilot for small RC planes that can fly the plane based on GPS position information. It’s main purpose is to make RC flying safer and prevent the plane from flying away in the event of a radio control failure or temporary pilot confusion. Also to simplify flying when carrying a camera etc.

Features:

  • Main function = Stability Control, Autopilot, GPS, fpv OSD
  • Minimal setup for basic Stability, Return To Launch and OSD
  • Optional telemetry and special-purpose RC connections
  • Optional RC module – provides low-power lost model tracker
  • All on one main circuit board with 2 daughter boards
  • Designed to simplify installation – minimal wiring
  • 1st daughter board allows easy upgrade of IMU sensors
  • 2nd daughter board for telemetry/RC module
  • Voltage, current and two temperature sensors
  • Will control external functions including a Pan-Tilt camera
  • 3 LED drive outputs
  • Supports control mixing, flaps and individual ailerons/elevons
  • Provides 10 PPM outputs and I2C bus for multi-rotor control
  • Operates from 2, 3 or 4 cell power supply – flight battery
  • Electronic main power switch on-board
  • Three STM32 processors for IMU, Autopilot, OSD
  • Open source software and documentation
  • USB interface for configuration and data access
  • eeprom on-board for configuration storage
  • SD card data storage/logging
  • IMU supports 3x gyro, 3x accel, 3x mag, GPS, baro-alt, pitot-airspeed
  • OSD supports 2 cameras, overlay and PAL generation
  • Provides antenna tracking data via fpv-audio, video or telemetry

Hardware:

A single circuit board module: to simplify installation and use and reduce wiring complexity.

Sub-miniature is not the primary goal, at least not with this version. The PCB must be of a shape that will fit into the fuselage of a typical small-medium RC plane, typically 1 to 2 meters wing span. This requires a module that is 55mm wide by 20mm thick and long enough as required; possibly 150mm.

Connectors will be of the IDC ribbon type. These are not the smallest but are commonly available, low cost, reliable and easy to work with.

IMU and other sensors on a small daughter board allow easy upgrading without having to replace the whole unit.

Basic layout consist of power-supply, IMU CPU, Autopilot CPU and OSD on one circuit board. IMU/AHRS sensors including gyros, accelerometers, magnetometers, GPS and pressure sensors for altitude and air-speed are on a daughter board that sits parallel on top of the main board. A second daughter board can support telemetry/RC. The main board mounts the SD card, support and power supply components.

The IMU communicates with the AP-CPU via serial (uart) and shares a main clock with the AP-CPU. The AP-CPU has a USB port for data access, configuration and programming. The AP-CPU also communicates with the OSD-CPU via serial (uart). The IMU-CPU flies the plane. It takes sensor data and drives the PPM and I2C outputs to maintain level flight. It receives direction from the AP-CPU which handles RC decoding and way-point management. The AP-CPU receives position, attitude, speed etc. info from the IMU-CPU some of which is passed to the OSD. The AP-CPU reads data or a PPM stream from the Radio Control receiver or telemetry receiver. The AP-CPU manages the micro-SD-Card for data storage and logging.

The AP will only accept a serial PPM stream from an RC receiver. This requires the use of a small add-on module to take the output channels from most standard RC receivers and produce the serial PPM stream. The alternative is to use the optional telemetry/RC module.

Unlike some systems, the IMU is separate from the AP. This splits the computing load and leaves the IMU to handle basic flight independent of the AP and OSD. By having the IMU drive the servos directly the amount of data transfered between IMU and AP is greatly reduced. The AP has the USB connection, SD card, RC input and manages the flight overall. The IMU stores little information itself and receives commands from the AP such as “rc-lost return to launch” or “go to xxx,xxx and loiter”.

Schematic: drawn in KiCad

OSD:

The 3rd processor on the board is dedicated to OSD and camera control as this is a timing critical function. The OSD can overlay data onto a composite video signal from a camera using the sync provided by the camera. Two cameras can be connected, eg. one forward and one down looking. Should the camera fail, theĀ  OSD can generate the sync and overlay to provide a blank screen with instrumentation allowing assisted manual flight.

White, black and DC levels are adjustable to provide the best overlay with the camera being used. The video output circuit is DC adjusted and buffered for best level output. This requires a more complex video interface circuit and occupies slightly more board space but the best overlay image is most important.

The OSD-CPU can return data to the ground station in unused video lines. This allows telemetry and antenna tracking data can be returned to the ground station without occupying an audio channel. The disadvantage is that this requires a special decoder at the ground station.

The OSD also provides audio to the video transmitter for alerts and status information. This may include voice messages.

Optional Telemetry – RC:

On the main board is a header that supports a telemetry and/or RC daughter board. This allows direct attachment of a 433MHz or similar telemetry/RC module or connection to a 3rd parts link system.

A 433MHz low power transceiver could provide a more reliable bi-directional control link with the ground station pilot.

This can provide a lost model tracking signal that can transmit for many days and provide a last known gps location and rough distance information through varying power transmitted tone pulses.

Power Supplies:

This is a relatively complex area as it impacts CPU, radio and video reliability.

Assuming an electric powered RC plane: The R1 can be powered from the main flight battery or a separate battery. My preference is the flight battery with a smaller backup avionics battery (not sure yet how I will achieve this).

Power is required for the electronics and radio equipment and for running servos. Servo power is considered hostile and kept separate from the electronics supply. The difficulty is in keeping all ground/common connections at one point. Servo power can come from a BEC or regulator fed from the main battery while servo control comes from the electronics. The electronics board may be used to distribute servo power.

The incoming power supply is switched and then switchmode regulated to 5V for the main components including cameras, GPS, telemetry and the RC receiver. The 5V is linear regulated down to 3.3V for the on-board electronics.

The electronic main power switch allows the plane to be fully connected to the batteries but switched off. This is useful before, between and after flights.

Power supply cooling may be required if the unit is well insulated or there is no airflow. The on-board heat sink is a brass tube that can be ducted in and out using silicon tubing to provide external forced cooling air while maintaining water proofing.

 

To be continued