Drone Hardware For The Rest Of Us
Coming from a software background I learned a few things about hardware while working on my Arduino drone. Much of what I learned is probably very simple and obvious and often that means it is not discussed much online as it’s considered common knowledge. However the landscape is changing: with Arduino, the barrier of entry has been lowered and people (such as me) who are not electrical engineers or hardcore hobbyists are able to build things. In this post I’ll go over a few things I learned and I hope it can save a few people many hours of research and trial & error.
CW and CCW propellers
I always knew propellers could be designed to rotate either clockwise or counter clockwise.
However when I bought a set for 4 propellers on Amazon, I didn’t expect half of them to be clockwise and the other counter clockwise. It wasn’t mentioned on the listing at all. It is obvious now, quadcopter drones need to have two propellers rotating in one direction and the two others in the other. If we had four propellers rotating in the same direction, then the drone wouldn’t stay still, it would start rotating in the opposite direction partially due to precession but also because the propellers push the air sideways (Newton’s third law):
Illustration from Black Tie Aerial: http://blacktieaerial.com/the-physics-of-quadcopter-flight
What we want is this:
CW and CCW motors
When I found out I had two clockwise propellers and two counter clockwise propellers, I thought it should be no problem I’ll just change my code and reverse the direction of rotation of two of my motors. Electronic speed controllers support reversing direction. However it turns out most brushless motors are single direction. If you buy a pack of four brushless motors, then usually two will be clockwise and two counter clockwise. From my reading it doesn’t seem like brushless motors are ever labeled, you’ll have to spin them up to find out which direction they rotate.
Building a drone from scratch I found out about ESC’s, which stands for Electronic Speed Controller. ESC’s are required to control brushless motors, so here’s a primer on brushless motors.
In a traditional electric motor current flows through a coil, generating an electromagnetic field that reacts with permanent magnets surrounding that coil. This forces the coil to rotate along its axis. As it rotates, metallic brushes switch from touching the anode and the cathode of the input current, causing the electromagnet to switch poles and that keeps the motor rotating; more here.
There’s a couple great documents that explain how brushless motors work (and the simple version here), but the really simple version is: brushless motors ditch the brushes and use electromagnets. They rely on a micro controller that takes care of switching the electromagnets on and off, but it’s complex because the position of the motor needs to be “sensed” and that’s usually achieved with hall-effect sensors… yes it’s fancy.
Brushless motors usually come with 3 inputs and it expects low voltage alternative current. The ESC provides you with a simple interface you can communicate with as well as provide regular DC. It then converts your DC into AC and ensures the motor runs at the speed you want. ESC’s have many advantages, they also ensure that you don’t burn out your motor. So now you could actually build your own ESC and there’s very little doc on the web on this because nobody is interested in this, but if you’re an outlier and you’re interested then check this out. Here’s a schema from Microchip Technologies that shows what the circuit of an ESC should look like:
Flight Controller Boards
There’s a new booming market of flight controller boards. A flight controller board essentially takes care of everything for you. All you have to do is hookup the ESC’s, motors and power to it. I really hate those because the programming is definitely the most fun. These boards used to run up to $300 a couple years ago but now you can find them around $35. If you buy such a board, you’ll also want to buy a remote control.
References & Further Reading
- Read more about physics and math behind drone flight on Black Tie Aerial: http://blacktieaerial.com
- Illustrations from Black Tie Aerial: http://blacktieaerial.com/the-physics-of-quadcopter-flight
- How do electric motors work?: http://www.explainthatstuff.com/electricmotors.html
- Brushless DC (BLDC) Motor Fundamentals: http://ww1.microchip.com/downloads/en/AppNotes/00885a.pdf
- Brushless DC Motor Control Made Easy: http://ww1.microchip.com/downloads/en/AppNotes/00857a.pdf
- Make your own ESC: http://www.instructables.com/id/Make-Your-Own-ESC/