Raspcopter - New test rig for the PID tuning
written by Florent Revest in 2014

Raspcopter - New PID Test Rig

After the lessons of the last article, the Raspcopter now has a brand new test rig. This time, the rotation is really blocked on an angle and the quadcopter can not lift anymore. It now becomes much easier than before to adjust the variables of the PID.

This new test rig consists of two trestles supporting a solid metal axis around which the drone is hooked and can rotate.

We can already observe much more satisfactory results while the PID gains in this video were selected coarsely.

Read more...

Raspcopter - Video of the first PID tuning tests
written by Florent Revest in 2014

Raspcopter - First series of test-flights

As we have seen, the UAV flight system is based on three separated PID controllers, one for each angle. However theses regulators must be tuned one after the other independently and safely before we can hope to achieve a flight to the open air. To set these values, it is convenient to block possible rotations to only one angle. This is accomplished by holding the UAV by a bar parallel to an axis of rotation.

The first idea was tested using two ropes tied to fences. If this idea has mainly led to failures, we can still note some interesting aspects and also learn from them. The video above shows a handful of tests.

Let’s start with the positive: we can rejoice because the quadcopter lifts o...

Read more...

Raspcopter - First crash
written by Florent Revest in 2014

</img>

The project progresses! Indeed, the code base is almost finished, logging functions are expected to come later but this is not a priority for now. This means that the rather technical articles that I have written so far should now let room for a serie of more practical, visual and general-public-oriented articles. But as we can suspect, the transition from theory to practice is always accompanied by small unexpected effects.

First test means invariably first crash. And that’s exactly what happened recently, when I added a non-null integral gain to the PID parameters of the quadcopter.

The UAV was in operation for more than an hour and half, the integral variables that contain the sum of the angles errors thus contained gigantic values. They suddenly found themselves multiplied by a gain. This produces a maximum engine speed and the drone o...

Read more...

Raspcopter - Network communication
written by Florent Revest in 2014

</img>

So far, the problems encountered during the development of the Raspcopter concerned only the embedded flight system on the Raspberry Pi. Then, more recently we have seen the ground control station. Those two projects are already equipped with several control functions, but without any interactive way to communicate between each other. The aim of this article is to explain the choices made about the ground <-> quadcopter communication and their implementation.

What we want

Firstly, it is important to remind the main objective of the project: to understand the inner working of a quadcopter flight system. Therefore, network-related issues are not the priority and ease of development and deployment is sought in priority. Yet, no concessions can be made :

The flight controls remain critical data that must neces...

Read more...

Raspcopter - Ground Control Station
written by Florent Revest in 2014

</img>

The network is a very big piece that delays the project quite a lot without necessarily visible results, so today we will talk briefly about the Ground Control Station PC software. This article is not intended to be as technical as the previous, but only informative.

A convenient tool

There are already countless complete ground control station softwares, like the Ardupilot’s one for example. Forking one of these projects was possible but ultimately the Raspcopter got its own flight client software.

It is developed in C++ using the Qt framework, so it is portable and easy to maintain or expand.

A controller

First, the task of this station is to act as a controller, ie to collect data from a joystick. The latter is a standard video games joystick bought for ten euros in a s...

Read more...

Raspcopter - First Video
written by Florent Revest in 2013

Raspcopter - Motors control

Now that the Raspcopter controls its engines, knows its angular position and can connect the two, there is finally enough to shoot something interesting !

Read more...

Raspcopter - Engines control
written by Florent Revest in 2013

</img>

The latest article gave the Raspcopter a powerful angular self-regulation algorithm. Yet, one detail was ignored and not the least, the “Feedback” shown at the bottom of the PID controller scheme ensuring the closed loop function. This feedback is of course the engines speed management, the subject of today’s article.

What we want

Like any flying machine, our little drone must have a sufficiently large vertical thrust force in order to release it of gravity. This strength is given by our old friend Newton in his third law of reciprocal actions. The propellers of the quadcopter push air downwards and by reaction, the drone is pushed up, it’s as simple as that.

But the drone introduced a constraint: the propeller must be driven at a fairly substantial rate and by rather light engines. A type of motors solves this ...

Read more...

Raspcopter - PID (Proportional Integral Derivative) controller
written by Florent Revest in 2013

</img>

In the previous article, we started studying a quadcopter flight system. The first step was to recover the attitude, that is to say the angular position of the drone in the air. Today we want to exploit these angle measurements in order to stabilize the quadcopter around values specified by the ground control station.

What we want

While it is true that the drone must be able to remain parallel to the ground when no command is received, it also must know how to rotate on its axis in order to move. These rotations are specified by the “ground control station”, a software running on a laptop and processing the data of a joystick. The joystick position reflects a desired angle which is the transported by WiFi and interepreted by the Raspberry Pi.

We would like to have a fluid flight despite the sudden changes in pos...

Read more...

Raspcopter - Attitude measurement
written by Florent Revest in 2013

</img>

I inaugurate today the suite of technical articles about my Raspcopter project by starting as promised with the attitude.

What we want

While this may seem naive it’s true: the first mission of a quadcopter is not to fall… Even when all four engines run at equal and constant speed, the drone ends up twisting and falls alone. This natural rotation is caused by the imperfection of the drone (center of gravity moved, for example) but also and especially by the various physical constraints applied by the environment (typically: the wind).

It is therefore essential to create a flight system dependent on the attitude of the quadcopter, that is to say, its angular position in space. A quote from Wikipedia is better than a long speech: the attitude is “the orientation of an object with respect to an inertial frame of re...

Read more...

Raspcopter - Frame building
written by Florent Revest in 2013

</img>

After two months of unbearable waiting, the package of the quadcopter parts ordered from HobbyKing was finally delivered. I started to build the X525 v3 frame with the Brushless motors FC 28-22 Outrunner 1200kv. I may flash the ESC 20A UBEC HobbyKing with the famous SimonK firmware before soldering the engines (however the procedure is delicate so uncertain). This whole assembly phase that is common to all quadcopters is already well documented, so I won’t detail those steps on this blog.

However, my programming work and documentation will cover the design of the flight control system integrated on the Raspberry Pi. I will start with the measure of the “attitude” (rotation in space) of the quadcopter in filtered Euler angles, then we will study the PID controller and speed reg...

Read more...