Introduction: Yet Another Cheap Quadrotor - Submitted by BayLab for the Instructables Sponsorship Program
Like basically everyone these days, I wanted to build a quadrotor. Here's how I built mine for pretty cheap.
Step 1: Mechanical Design
I built my quadrotor with a friend. I used some thin aluminum angle bracket from Home Depot as the struts. The motors spinning will produce a moment about the center of the axis of the strut, so they will tend to torque to the side a bit. It gets worse when the struts get longer, so this approach will probably only work for smallish quadrotors. For the platform, I just used some scrap Lexan I had laying around. It's a bit too thick and adds a little too much weight, but the thing still flies.
My friend took a different approach and 3D printed a basket for his electronics and used some aluminum tubing with holes drilled to lower the weight.
We both ended up 3D printing motor mounts using a MakerBot. Mine were designed to slide on the angle Aluminum and be fastened down. The quad with tube struts had a small platform for each motor and two printed fasteners to hold on to the tube and get screwed into the motor platform. If you don't have a 3D printer, you can still order 3D prints of motor mounts from a 3D printing service and they won't be very expensive.
Step 2: Electrical Design
The motors, motor controllers, and battery I got from HobbyKing. You should first decide how much you want to spend (in my case, as little as possible) and then work out your weight budget. The motors, controllers, and battery all depend on how big you quadrotor is and how much you want to be able to lift. There are lots of guides already on how to select those parameters, so I won't rehash it here. With HobbyKing, you can get a surprising amount of lift for cheaper than you might think. I went with a brushless design, which I recommend.
Make sure to weight your frame and include the weight of any payload you will want (like a camera or basket or whatever). If you can drill holes in parts of your frame to reduce weight without compromising the structure, do it. One of the biggest weight adders that will creep up on you is wires. If you use thick wires for everything and they're longer than they need to be, it will add up faster than you think. Integrating your electronics can also save you a lot of weight. Rather than stacking an arduino and IMU module and a bunch of other parts, doing it on the same board goes a long way. I designed a board that's basically the minimal PCB you need to fly a quadrotor, and you can get one made for very cheap. We'll look at that in the next step.
Step 3: PCB Design
I know that Ardupilot exists and there are tons of tutorials for doing this with an Arduino, but I wanted to design my own board for the practice and because I wanted it to be really cheap. So, I made a board that is based on an ATMega328 and has a 3 axis gyro, 3 axis accelerometer, and magnetometer. You can either buy the MCUs and then flash them with the Arduino bootloader, or you can buy them preflashed from ebay and just solder them it, which is what I did because I didn't have a programmer.
Here's the schematics, layout, and code.
This boards dimensions were chosen specifically to be used with Itead Studio's PCB service. They will do 10 boards for $10, including silkscreen and soldermask. They're not as accurate as Advanced Circuits or another US board house, but they're great for small cheap projects when "good enough" is ok. The github repo includes gerber files, so it is ready to send off.
The code includes a control loop that uses a Kalman filter to do stabalization in a PD loop. You will almost certainly need to change the gains, and there's no other way to do that than experimentation. We sat outside with the quadrotors tethered to the ground for a couple of hours and tried different numbers until it worked. The code should work on boards other than the one I provided, but you'll probably need to edit it a bit depending on the kind of IMU you're using.
We have a be nice policy.
Please be positive and constructive.