I started a series of posts on how to build a Quadcopter from scratch and in the previous posts, I had explained the basic hardware build. I built up the wooden frame and mounted the motors, speed controllers and props and I also did a basic test. The brainless beast was able to takeoff but it cannot even stay straight. Hence we now need some sensors and a brain to control the quad and so in the next few posts, we will talk about designing the flight controller from scratch. Sounds complicated? In a related post, (Self Balancing Robot – Temporary Diversion from the Quadcopter Project – Demo )I demonstrated a self balancing robot that was based on the same principle. I discussed the math behind it and in this post, I tell you about the flight controller and remote. A picture of the frame with the ESC is given below.
The road more travelled
When I was researching about existing quadcopter projects, I came across a lot of information on the subject that I want to share. For people already experienced with RC hobby and quads, this may not be very exciting bits but its useful for the newbie.
There are a number of open source flight controller projects out there and the more popular names are as follows.
I have followed this project for some number of years and it started as a shield for an arduino which was called an ‘oil pan’ and later was upgraded to bigger hardware and is currently one of the most expensive hardware for RC airframes. The GUI is great and the performance is great as well. It has automated flight modes etc but to a beginner its just too much.
2. DJI NAZA
I have read good things about this one and the full featured version is called the DJI NAZA M V2 which is a costlier than the Ardupilot, is closed source but is the absolute best at what it does. Bucket load of features for a bucket load of money. There is also a DJI Naza Lite which is much cheaper but again closed source.
3. OpenPilot CC3D
The best open source hardware I have read about is the CC3D which is based on an STM32 based chip and has the MPU6000 and 6 channels. Its open source and you can install your own firmware on this one like base flight and clean flight(more on this later). It was originally a kickstarter project but is now available from a number of sources. I recently bought one of these and I have to say its the EASIEST to setup as the software has a wizard to guide you through all the steps the first time around. You can mess with the advanced controls later.
The NAZE32 is the next best thing to the CC3D and is a bit more flexible BUT its a bit more difficult to setup as opposed to the CC3D. Its used by advanced fliers who have control over the controls and want their quads to do more tricks.
This is one of the first boards you will find online when you search for quadcopter controllers. It has an LCD which allows you to set it up without a PC and is based on the AVR controllers. It used the MPU6050 as a sensor and you may write your own firmware for it but you will need a AVR ISP programmer since it does not have one on board. Its cheap but requires manual tuning and is better for the more advanced flier.
Yes! its different… well almost. Its based on the Atmel AVR (168p) as well but I think the support for this one has been discontinued. Their website kkmulicopter com is gone and I think the makers have moved to making 32bit flightcontrollers or something. Its a bit outdated and used Murata Gyros only for measuring the orientation. No sensor fusion and the gyros themselves are analog and you have trims to set the offsets. Pretty neat but highly outdated.
This is not actually a hardware for sale but rather a Hardware you build. Its a project where you use an arduino and sensors from the Nintendo Wii remotes to make a quadcopter. Pretty neat. There is a lot of detail on how to get/use other sensors and this is the project where I start from.
About a RC Transmitter and receiver
In order to control a vehicle remotely, we need a wireless method of sending commands. The most common method of doing this is to use an RC remote which has dedicated channels at the input via the remote control e.g. throttle, yaw, pitch, roll etc and correspondingly has receiver pins each with individual signals. These signals can be PWM which means the width of the pulse will vary with the variation in remote control stick position. Alternatively it can be PPM which means the position or time distance between pulses will vary with stick position. There are a bunch of other possibilities which are beyond the scope of this article. I am using a 6 Channel remote with PWM outputs at the receiver.
In a different article we will talk about making one ourself as well.
Using the CC3D
I have been working on this project for a long time and have had a mix of results with programming experiments and so instead of diving into the coding part, I decided to get a flight controller that works out of the box and a RC transmitter receiver as well. The reason why I chose the CC3D is because its the easiest to configure and setup and is not very expensive. I got mine off ebay and it came in a case with the necessary cables.
I used zip ties to fix the flight controller on top and used some sponge/foam to pad the controller and shield it from vibrations. The result is shown below.
You can see that I have used duct tape and some wires to ‘hang’ the battery below the frame. This can cause issue but I have not choice right now.
Calibration of the CC3D and testing
The CC3D needs calibration before we can take off. For this I followed this video…
I did everything as instructed and then tried to control the quad without the props attached. Everything worked out! What next?
Calibrating the Remote
This step depends highly on the type of remote. I am using a remote which has a PWM output which means that the width of the pulse output will vary with the position of the stick on the RC Transmitter. I mentioned before that I will be doing an entire post on how to make a remote your self and will go into more details there. For now, the calibration is more for the CC3D and less on the remote end.
The final step is to take flight and a word of warning. This thing is dangerous! I have received cuts and bruises in the past from this quad while testing so I suggest you be careful. I put the quad in an open area and well the video below is my second test flight. I am scared of this thing!
When you first activate the throttle, it will try and take off and in my case, it was leaning in a particular direction. To rectify this, I used the trims on the remote to make corrections until the quad was almost stable. My objective was to make it hover without using the sonar. I will probably add the sonar module to the project later but this first test made it clear that the response of the quad was very quick despite the fact that it was big and heavy.
Here is the video of a test flight.
In this post, I presenting the quick and dirty way of making a quadcopter and we saw that it can indeed take off. We used bought outs BUT we have a platform that we can modify. In the next post, I will be demonstrating a flight controller on an arduino based board the KKMulticopter 5.5 and hopefully we will implement the flight controller piece by piece in the next few videos.