QuadriCopter - A flying robotics platform

After building a few robots, I was aching to build something that would give a challenge, and hasn't been done to death. This is the robot that the Build Your Own X Robot books tell you not to build until "you have some experience." This is the robot that you aren't sure will work. This is the robot that you think only NASA and big companies will think about building, 

because, like antennas, it seems like some black art that only big supercomputers with genetic algorithms can design. 

Of course, it's also not quite as cheap. My plan for this robot was a quadrotor helicopter, inspired (as all quadrotors are) by the fairly successful Draganflyer 

helicopters. It is intended to provide a "flying research platform" with room, in hardware and software, for sensors or anything else one might add to a

helicopter. It also should not be prohibitively expensive, have enough power to support additions and a small payload or have a pointlessly excessive

climb rate, and should be easy enough to make without power tools, with the exception of a hand drill or Dremel.

This tutorial will try to provide a source of information about the somewhat unfamiliar technology used, like brushless motors, as well as some practical

knowledge like hacking an ATX computer power supply to work as an electronics bench supply, and code I have written.

/* Pictures go here */

1. Parts

A simple list of all the parts needed. I'm missing a lot of things here, like glue, sensors and electronic components I have lying around, but they'll pop up in the tutorial. I'm also omitting stuff I shouldn't, such as

Electronics

4 - Brushless motor controllers ($18.79 each) $75.16
1 - Program card for controllers $1.89 - Optional, but useful if you use non-lithium batteries
3 - Microchip PIC16F88  $0 - free samples
1 - Memsic 2125 Dual-axis Accelerometer $29.95
1 - RF Link - 4800bps - 434MHz $16.95
1 - RF Link - 4800bps - 315MHz $16.95
1 - MAX233A Serial Level Converter $0 free sample - This is the same as the 232, but uses no external parts

Mechanics

4 - GBv 1.0 Brushless Outrunner Kit ($8.99 ea.) $35.96
1 - GBv Magnet Spacer $3.00
3 - 10x4.5 Counter Rotating Props (Pair) ($3.99 ea.) $11.97

Materials

3 - Midwest Carbon Fiber .125" 40" Tube ($4.99 each) $14.97
1 - Avia Pultruded Carbon Tube .3150" OD 48" 0.228" ID $7.26 

 

2. Making the motors

 

Finished motors 

The second most time consuming part of this robot so far was making the motors (the first being programming), but probably the most
rewarding. While the process is very tedious and boring, and often frustrating, you will end up with 4 extremely powerful and efficient
motors that can stand up to a lot of abuse.

 

These motors are brushless, that is, they do not switch between phases of commutation with mechanical brushes. Brushed motors have,
amazingly enough, brushes that contact the spinning part of the motor, the rotor, so that current flow through the brushes into the coils
on the rotor. This causes magentic fields to be generated that interfere with those of the magnets on the can (which doesn't move and
is thus called the stator) so that the forces cause the rotor to spin. As the rotor spins, the the magnetic fields must switch so that they
orient themselves in the right direction to effect the same forces again. The brushes stay still, but the contacts on the coils don't, so the
switching occurs mechanically. However, this is quite inefficient. As you can guess, having brushes touch against a very fast spinning rotor
causes a lot of friction, wearing down the brushes, generating heat, and wasting power. This mechanical switching would be like using
servos connected to a bank of switches to control a motor's direction. In other words, it is very inefficient and unreliable.

 

Brushless motors, on the other hand, use electronics to switch the currents in the coils. There are no parts aside from the shaft and
bearings that touch each other. For various reasons, however, they require at least three phases to easily guarantee that they spin in
the right direction without requiring sensors in the motor to sense position (two phases is possible, but more difficult to control).
Because the switching occurs from the outside, rather than the inside, it's more convenient to the have of the coils be stationary and the magnets be on the rotor. The kind of motors we'll be using are from CD-ROM drives, which have "outrunner" motors. These motors
have the rotor outside of the stator. The entire "can" of the motor, with the magnets glued to the inside of it, spins. These motors have
higher torque than "inrunners" because the the magnets, which do the real heavy lifting in brushless motors, are further away from the
axis of rotation.

 

But enough babble from me about motors, let's see how we make one. For now, I'll just covering the parts that are specific to this project,
the winding and the mounting, as all of the other parts of constructing these motors have been done to death. The tutorial that
GoBrushless gives for the motors do a good job showing how to assemble the motor, and this should show you how to glue in the
magnets for maximum efficiency. The motors I made have 22 winds of the 26 AWG wire that comes with the kits (number of turns of 
magnet wire on each arm of the stator), though I may have did 23 on the last two motors. This number was chosen because I thought it
should give good enough performance with the chosen propellers according the to Motor DB, and because it is much easier to pack into
a motor than the 25 wind motor list (I still can't get that many in, after the experience winding and rewinding about 10 times for the 4
motors). 

 

First of all, read the technique guidelines here. You might also want to look at the 17-wind motor tutorial at the same site. Check
out the motor winding videos at the Utah Flyers' site, on the left side. The following is about how the winds are fitted it, not how to wind.

 

This is the first layer of winding: 

The GB (GoBrushless) docs say that 9 winds of the included wire will fit on the first layer, but experience shows that 10 will sort of fit.
Just bend the wire as hard as you can (don't break the wire though) around the corners, pushing the winds together after each turn.

The GB (GoBrushless) docs say that 9 winds of the included wire will fit on the first layer, but experience shows that 10 will "sort of" fit.

By the way, a "wind" is a "wind" only if it's a whole turn, so I count it only when the wire actually crosses the side that it began on. You can
see in the picture that it began on the side that's facing the camera, so those in the picture are 10 (ten and a quarter, if you want to be 
pedantic).

Now you'll want to start winding "downwards" (towards the hole where the brass bearing assembly goes). So, after the 10th turn, cross the 
wire to under the 10th turn. Begin here, and you should get 8 turns going down on the second layer. This is probably the most difficult
part, especially on adjacent arms. That 17-turn motor with 2 layers is not 18 turns for a reason.

Layer 2 

Her you can see the 18 layers in all of its glory. I've found that you must cross the wire over to the top of the arm after the second layer
to pack in the third layer. It's less space-efficient, but necessary because the space between the arms gets greater as you get further 
away from the center. It's not very noticeable in this picture, but there's a big space between the 10th and 11th wind. You need to "hook"
the 18th wind into that space on the way up, and start winding upwards.

The 18.5th wind 

This shows the 18 and a half wind going up and into the gap. This shows the other side of the stator, not the side the first two showed. 

Now, you need to complete the 19th wind by fitting it into the gap on the side of the stator that you began on. Next, the 20th wind will 
actually go above the 10th wind. That will make the winds jut out more than the hammerhead of the arm. Be careful, don't slip. :D

20th Wind 

Some serious cramming with the 20th wind.

Now, begin winding downwards again. Two more winds, and you're there, and then instead of going to the other side after the 22nd wind
crosses the side you began on, cross the wire that went into the 22 winds and pull it towards the next arm to wind.

23rd wind... oops

Oops, I did it again. As you can see, there are two winds below the big "crown" formed by the 19th and 20th winds. However, I crossed the
beginning side again after the 22nd, so that's actually 23 winds. If you weren't neat when winding, this would be disastrous, because winds
on other arms would not fit later. Now, rinse and repeat on the next arm, 3 spaces away.

All done 

What I ended up with.