## The quadcopter part 1 : genesis of the project

When I was a student in my engineering school, we decided to build a drone. The project was abandonned after about one year, more or less because members of the robotic team didn't succeed to stabilize the drone. So with my bored engineer friend , we decided to give a second chance to this project. We took what the students made, which basically looks like this:

After a few tries, it turned out that the power of the 4 motors wasn't enough for the drone to fly. So, we decided to make another frame, using light materials: carbon tubes and balsa (it's a very light wood used by modelists for their aircrafts). The verdict was straightforward : old frame's weight : 350g, new one : 70g. Only half of the power was enough to make it fly.

We had here a nice frame to start our experiments. The first version came with an accelerometer and a gyroscope that we decided to keep. We also decided to use an Arduino because it's really easy to use, and there is out there a massive list of existing libraries. Implementing a PID controller, and gathering the commands of a 4 channels radio-emmiter, we were able to make it slighly steady. So this is how it worked. The 2 sensors (accel and gyro) are constantly read by the Arduino, which compute the angle of the 3 orientations of the drone. Why using a combination of a accelerometer and a gyroscope ? Because the accelerometer is nice for a static use of the drone (i.e. it flies at a constant speed), but as soon as it start to move, the accelerometer can't be used. The gyroscope gives us an angular velocity, which means that we have to integrate the value to retrieve the angle. The wrong part is that, due to the integration, the obtained angle will slowly drift. We compensate with a negative term in our equations, which is found experimentaly.

Basically :

Where, if the ADXL gives us a value between 0 and 1g:

And if the gyroscope gives us a value in ° per second, and $d$ the drift value.

Then, we use a PID to control each of the drone axis :

Now come the hardest part of that chemistry : find out $k_p$,$k_i$ and $k_d$; which can bring the drone to destruction (actually, it did).

But still, there is a lot of work there before this drone can fly on its own. We are currently working on a frame v2, which will be the object of a soon-coming article.