Slogan: easy and awesome

FlyQuad

I started this project to give a joy my little boy Albert and myself. The FlyQuad is low cost (as much as possible) Quadro-Copter. I wanted a radio controlled toy. The mankind was fascinated since always with flight so I thought that a flight device will be nice to have.
A Quadro-Copter/Quadro-rotor mechanically is quite simple to construct. Even I can do that…So simple it is.



What do we need? For the first portotype of the FlyQuad I planned/buyed the following:

  • a light “+” or “x” frame from e.g. square-profile 10×10mm aluminium.
  • 2 central plates where the frames are mounted
  • 4 brushless motors, with propeller. The propellers must be 2 with CCW roation and 2 with CW. This is necessary to compensate the rotion moment over Z-axis.
  • 4 ESC (Electronic Speed Controllers) up to ~30A, Programming board for ESC
  • 1 Control Unit, for example Atmega microcotroller. I used a Teensy++ 2.0 board
  • 1 Motion sensor (triple axis accelerometer & Gyroscope) . I used the SparkFun brakeout MPU6050
  • 1 Remote control with receiver. I choose this one Flysky FS-CT6B 2,4 GHz 6 Channel
  • 1 Battery LiPo (LithiumPolymer) 3S (3 Cells) 11.1 V, 5000 mAh, Charge station
  • Planned for the second prototype: GPS and Camera to take air-snapshots or to film in the air.


The very first analysis/test I made was the remote controll. My remote (FlySky FS-CT6B) send the 6 channels as a PPM (Puls-Position-Modulation) signal. The 6 values of the stick setting will be send as 7 pulses with a period of 20ms and 6 pauses between pulses. The lenght of each pause is between 0,5-1,5ms. So smaller is the value of the channel the corresponding pause became shorter. The sum signal is shown here:

The receiver will decode the PPM signal into 6 PWM signals with base frecquency of 50Hz (period of 20ms) and a variable pulse width between 1 – 2ms.

The remote controll has a mini-DIN connector and came with an USB calble. The cable allows to configure the remote parameter form PC over the USB. On the mini-DIN connector on the pin 4 is sent the PPM signal. Now the question: can I controll a 3D modell on PC with remote controll in order to train the landing? Or to run a FlyQuad simulator with the microcotroller unit as a sort of Hardware-in-the-loop to find the controller flight parameter?

The answer is: YES! We can do all this thank to some people sharing their code. Now the art is to modify it to mach my needs.

Now in the Internet I found some vague indication how to connect the remote with the PC over USB. First you need an Animation for FlyQuad. I found a great OpenSource software Flying-Model-Simulator of Roman & Michael Möller.

Secondly I used the following programs:

  • a program that interprets the PPM signal of the remote from the “Train” port T6sim

  • a virtual joystick driver that catches the signal form T6sim as a normal joystick vJoy

FlyQuad – Simulation

You can see now how the FS-CT6B remote control is connected to the PC and a quadcopter is flying in FMS:

Now in the FMS there is no physics of the quadrotor so I would like to habe a possibility to test the computing unit software with no crash. A very nice work was done by the Team of DiY Drones. They connect the uController with Scicos with the arktoobox and JSBSim aerodynamic model in order to test the software. So I will modify/adapt their models to my FlyQuad.

The FlyQuad Computing Unit

The computing unit (Tennsy++2.0 board) should do cyclic, the following tasks:

FlyQuad – Firmware/Software

Now I'll tell you how I thought to stablize the flight of the FlyQuad. I use an accelerometer/gyroscope sensor (6DOF) MPU6050. This a small board around 30 € and can be found at SparkFun Electronics.

Filtering the accelerometer/gyroscope data

The accelerometer sensor give data with very quick changes and the values are jumping. The gyrosocpe insted give stable data but the have a drift (a value non zero) which grows. So in order to have a useful data we have to filter the sensors output.

I googled to see wich methods of filtering are appropriate to do this job. I found the following:

  • Kalman filter – complicated, agorithm intensiv
  • Complementary filter – low pass for accel and high pass for gyros, ok, simple algorithm
  • DCM (direct cosine matrix) with PI controller – ok, simple algorithm

I used for filtering the seonsrs data the DCM with PI controller, Mahoney et all. algorithm. You can see in action the filtering:

to be continued…some day


Eigene Templates sind besser - REDAXO