Thursday, May 22, 2014

Remote Controlled Quadcopter Based On Raspberry Pi

http://blog.oscarliang.net/remote-controlled-quadcopter-based-raspberry-pi/

Remote Controlled Quadcopter Based On Raspberry Pi

Remote Controlled Quadcopter using Raspberry Pi

Raspberry Pi Intro

We have seen a lot of remote controlled quadcopters based on many micro processors or dedicated flight controllers, but not many people would have thought of running a Linux machine on a quadcopter! Since Raspberry Pi has been very popular these years, and the it’s compact size and computation power compared to most micro-controllers, it would make a good flight controller.
The PiCopter is a remote controlled quadcopter based on a Raspberry Pi. The Raspberry Pi handles all the flight control without using a micro controller like Arduino.
However many people have doubt about Raspberry Pi doesn’t run in real time so might have trouble getting sensor data and sending commands to the motor in the right timing, eventually leads to instability. But Marlon explains “Hard real time” is not required (no need for real time kernel, only stardard Raspbian) as you only have to update the motors with at least 10hz.

Here is a video of the result.

Hardware Components on this Remote Controlled Quadcopter

There is no standard Quadcopter Board, the Raspberry Pi controls everything, and there is no arduino or any other micro controller for flight control. However he used an Arduino as an interface between the Radio transmission and the RPI.  The Radio System works on 433MHZ. Currently he’s using an PlayStation console for flying control, but he can also use his laptop.
The MPU6050 and special Motor controllers allows I2C communication protocol, there is no need for PWM signal.
  • 4x Robbe Roxxy 2827/34 Brushless Motor
  • 4x BL-Ctrl V1.2 (equivalent to ESC – electronic speed controller)
  • Raspberry Pi
  • Arduino+RFM12 for Radio transmission over ttyUSB0
  • MPU6050 Gyro and Acc Motion Sensor
  • 3-Axis Digital Compass HMC5883L (not in use)
  • ublox5 GPS (not in use)
  • WiFi Dongle to ssh into the RPi (not in use)
  • 2700 mAh 3S LiPo Battery
With all the Parts, the whole quadcopter weights about 1 KG including battery.

Quadcopter Software Programming

The software was written in C++, and Marlon is so kind to share with everyonehereThe Software is mostly written by himself therefore most Parameters, e.g. PID, are not comparable to other quadcopters.
The sensor sampling  frequency is about 300 Hz to 500 Hz and the motors are controlled at 50 Hz. Most of the Software processing time is spent on waiting for sensor data due to the slowness of I2C. The actual computation takes barely no time even though everything is down in floating point numbers.

Flight controller: Raspberry Pi VS Arduino

It is amazing that the Raspberry Pi is working so well without a real time kernel. But it might start to get a bit tricky when running video recording on the Pi at the same time, as it might be taking too much resources from the flight control process.
One thing quite a few people have done is to power the quadcopter real time stability with an Arduino Pro Mini or equivalent micro processor, and build an I2C or SPI connction with the Raspebrry Pi for control. This allows more room on the Raspberry Pi to run the expensive video recording. Also by doing that we can avoid those expensive I2C motor controller.
But one obvious advantage that Raspberry Pi has over Arduino is its much greater computation power, thus more complicated and better stabilization algorithms can be run on the RPi.

No comments:

Post a Comment