RT-MaG Project

Powering your robots

The open-hardware and software X4-MaG platform

X4-MaG is the first robot developped by the RT-MaG project, as the colaboration of the ISM (Marseille, France) and the GIPSA-lab (Grenoble, France) laboratories. It is a low cost open-hardware quadrotor ideal for research and academic use.

ID card


Complete overview

  • The hardware: As shown in figure 4 , the robot is equipped with the 20-cm span Nanoframe of Flyduino, four "5030" propellers, four 3800KV motors, four 6A ESCs (Electronic Speed Controller for the motors) and a 2200mAh Lipo battery. The flight endurance is about 12-15min in normal use, the total span (including propellers) is 30cm and the weight is about 307g with the battery pack. An exhaustive list of the components and the open-hardware sources can be found here.
  • Embedded sensors and computational resource available: The quadotor is equipped with three different electronic boards:
    • The NanoWii performs the stabilization in manual mode and acquires the accelerometer's and rate gyro's output data provided by a tiny 6-axis inertial sensor (MPU6050). This low-level controller consists in a 8-bits ATmega32u4 running at 16MHz. It is also equipped with a 6-axis IMU (the MPU6050) with three 16-bit rate gyros (with a maximum range of ±2000°/s) and three 16-bits accelerometers (with a maximum range of ±16g).
    • A rotor speed controller board controls in closed loop the rotational speed of each propeller. As a consequence, it is possible to finely control the robot thrust and then the body torques (see subsection IIIC). This controller consists of a 16-bits Microchip micro-controller (the dsPic33FJ128GP206) cadenced at 40MHz and was programmed with the MPLAB 16-Bit Device Blocks for Simulink. The thrust of each motor was controlled at 500Hz. The sources of this card (schematics, list of components, etc.) can be found here
    • A Gumstix Overo AirSTORM COM is the high level controller programmed via the RT-MaG toolbox. This powerful COM features a 1GHz 32bits ARM-Cortex-A8 with 512MB of NAND memory. The Operating System is a 3.5.0 Linux patched with PREEMPT-RT. With its breakout board (Pinto-TH), it features 4 PWM outputs, 1 SPI bus (with 2 Chip Selects), 3 serial ports, 1 Wifi interface (54 MB/s), 8 GPIO and 6 10-bits ADC.

Hardware description

The propellers speed controller board makes the connections between the NanoWii (low-level controller) and the Gumstix Overo (high level controller) and adapts the voltage levels. X4-MaG features 4 5V PWM outputs to control each rotor's rotational speed, and 2 additional 5V PWM to control for example a man-tilted camera.

The propellers controller

The propellers speed controller is the corner stone of the X4-MaG, it enables to:

  • Finely control each rotor's rotational speed, and therefore each rotor's thrust which leads to control the body torques,
  • Relay UART data between the NanoWii and the Overo by adjusting the voltage level,
  • Relay the 4 PWM ouptuts from the NanoWii to the ESCs by adjusting the voltage level,
  • Relay 2 PWM ouptuts of the Overo by adjusting the voltage level,
This electronic board is equipped with a dsPic33FJ128GP206 from Microchip, which can be programed through a MPLAB ICD3. The board features a serial connector (GND, Rx, Tx) to monitor the propellers' speed tracking. It is also possible, via this serial connection, to easily tune in real-time the parameters of the PI controllers for each propellers thanks to an interactive menu. The sources of this program are available here.
The propellers controller consists in a simple PI controller with anti-windup as shown by figure 2. As shown in this latter, control the rotor speed implies to control the rotor thrust, and therfore control directly the body torques.

The propellers speed controller board makes the connections between the NanoWii (low-level controller) and the Gumstix Overo (high level controller) and adapts the voltage levels. X4-MaG features 4 5V PWM outputs to control each rotor's rotational speed, and 2 additional 5V PWM to control for example a pan-tilted camera.

The NanoWii (Low level controller)

The NanoWii consists in a 8-bit controller which recovers the Inertial Data (3-axis gyros and 3-axis accelerometers) and implements the manual pilot. The manual pilot allows to simply control the X4-MaG quadrotor using a classic hobbyist transmitter. If the high level controller (i.e., the Gumstix Overo) is running, the NanoWii just transmits the Inertial Data, and the Rx data (from the receiver) to the Gumstix, and receives from the Gumstix the rotor setpoints. As a conclusion, the NanoWii plays three roles:

  • it controls the aircraft if manual mode is activated,
  • it relays the rotor setpoints computed by the Gumtix in automatic mode,
  • it takes the control of the quadrotor if the Gumstix (High level controller) does not respond for more than 100ms.
As a conclusion, this controller allows to pilot X4-MaG manually and to avoid the crash of the quadrotor in case of Gumstix failure.

In manual mode, the NanoWii receives attitude setpoints from the 5 channel RX receiver, computes the attitude correction and sends rotation speed setpoint to each rotor. When the Gumstix pilot is cativated, th NanoWii sends IMU data to the Gumstix and receives rotor setpoints from the Gumstix. In both case, the NanoWii monitors the battery level via the input A3.

The Gumstix Overo (High level controller)

The Gumstix Overo consists in a powerfull 1GHz high controller running an embedded Linux. The high level controller consists in a simulink model which is executed in real-time on the Gumstix thanks to the RT-MaG toolbox. This high level controller can be easily programmed from Simulink to control the robot. It is ideal for accademic or reasearch use because all the data can be monitored on a ground station and the controllers parameters can be tuned in real time. This controller was for example used in our flying arena to accurately control the position of X4-MaG. The robot receives its position from a motion capture system as a position setpoint via a wifi connection and reaches the automatically the desired setpoint.

The Gumstix Overo is plugged on the Pinto-TH which provides solder pin to access to the I/Os of the Overo. The Overo is powered by the Rotor Controller Board (RCB) and provides a 1.8V power supply for the level translater of the RCB. The Overo is connected via UART to the NanoWii through the RCB and can generate also 2 PWM outputs adapted to a 5V Voltage level by the RCB.

Software architectures

Control and estimations algorithms