Building a Motor from Scratch: An adventure in retrospect
This was my first true Electronics class. My entire life theretofore, I had only studied the virtual world of software. I finally had a chance to get my hands dirty!
And get dirty, I did.
The first few months, we learned ohm’s law, reverse engineered black box circuits, wired LEDs to batteries, and read resistor color codes. In all honesty, this wasn’t the most exhilarating unit. However, we didn’t spend that time wastefully memorizing equations, but instead we developed the tools to attack more complex problems & build circuits of our own. (Thanks Mr.Zachry!)
With that in hand, we advanced upon our next challenge. Building a motor from scratch.
A brushed motor is the easiest motor to build. Any student can build one with a ceramic bar magnet, two paperclips, some magnet wire, a battery, and a pair of scissors! That is exactly what we did.
This kind of basic ‘toy’ DC brushed motor works as follows
- When building the motor, the straight ends of the coil must be shaved of their enamel on one side(magnet wire has a thin layer of insulation known as enamel.)
- If done correctly, one side of the magnet wire is conductive, the other insulated.
- Current flows through the paperclips, into the coil, creating an electromagnetic field that opposes (pushes away) the magnet’s field.
- The coil spins away from the magnet, aligning its other side with the magnet.
- Before the coil aligns itself, the conductive part of the coil breaks contact with the paperclips, the current stops, and the magnetic field collapses (disappears).
- The kinetic energy of the coil spins it past alignment.
- The coil, now in the same position as it was when it started, regains contact with the paperclips.
- Jump to step 3.
We cut, we hammered, we shaved, we tweaked, and we balanced. We all built this simple ‘toy’ motor in a week. Sure, a few got it spinning nearly 1000RPM with 10 volts worth of AA batteries and 6 magnets, but the motors were unreliable, weak, and generally finicky. The toy motor is not designed for anything more – it’s a toy. I wasn’t satisfied.
What I needed was a paradigm shift.
What I needed was a brushless motor.
While a brushed motor typically has a stationary magnet and a rotating coil, a brushless motor typically has a stationary coil and a rotating magnet. This circumvents the need for exact mechanical tolerance & tweaking needed for the coil to maintain contact with its power source, mitigates the wear and tear of the insulating surfaces, and completely avoids many of the moving parts – the most likely point of failure.
This also requires a completely new design, so I dumped the ‘toy’ design and began looking for a more attractive, more dependable replacement.
Rewind six months.
It’s my fourth year working as a student aid at Marymount Summer Science & Technology camp. This year’s theme is Biomimicry – an incredible field, that is certainly worth a good look. Jaymes Dec, our head teacher, former adjunct professor at NYU’s Interactive Telecommunications Program, GreenFab program manager, Marymount FabLab coordinator, and TEDxNYED speaker, was teaching the kids how to build an Ornithopter (think: wing-flapping airplane), as featured in MAKE Magazine (PDF). This design utilizes very strong (yet extraordinarily light) balsa wood, some very thin 16lb paper, and Cyanoacrylate glue(CA), and yields a very well-engineered, reliable, and sturdy Ornithopter!
I had an ‘Aha!’ moment. I’d use the same materials that we used to build the ornithopter, to build some kind of frame, I didn’t know what it’d end up looking like, but that didn’t matter right then. First I needed to source the materials. Where to look? The expert himself.
Now off to building. First, I experimented with a few electromagnet designs:
I tried several different gauges of magnet wire (i.e. 14 AWG, 18 AWG, 25 AWG, 34 AWG) before settling on 25 AWG. For the magnet’s core, I used nails/screws found in my dad’s ancient toolbox, settling on (what appeared to be) the most magnetically permeable screw.
After some brainstorming, I decided that I’d build a rectangular frame with King Post trusses, designing for stability while under the strain of a large, vibrating, rotor.
After alot of experimentation, I removed that single wooden beam through the center, among several structural changes.
Now how to mount the rotor? I have been fascinated by cars for as long as I can remember, so I knew what the axle-holding component of a car looked like, but I couldn’t name it, and therefore certainly wouldn’t be able to buy one on the internet.
I spent several days brainstorming. Then one day, I was in the store, checking out. I see a pack of Lifesavers. I have another ‘Aha!’ moment.
Next, I had to find something to actually rotate (and of course, attach magnets too). First I tried gluing two magnets to a piece of thick magnet wire. That did not work (at all). Then, out of nothing but coincidence (or maybe the grace of god), I found something in the class junk box. It’s hard to describe, but it looks like the exterior shell of an industrially manufactured motor, with a bottle cap inexplicably glued thereto. There is a long piece of sturdy wire that penetrates it, and is quite sturdily mounted. I used CA to glue 2 pairs of magnets to the new rotor, all with the same polarity facing outward, and carefully inserted it in between the Lifesavers, into the holes for the axle.
What I didn’t mention was that it took two tries to properly glue the magnets. On the first try, I glued two pairs on with the wrong polarity :). The second try involved a large hammer, and ended with a single pair of magnets attached.
Next, I needed a switching method. This is where the Reed switch comes in.
If I were to let current constantly flow, then the motor turns 180° and holds (while the electromagnet overheats). The Reed Switch however, senses the location of the rotor, and completes or breaks the circuit accordingly.
Time to buy some Reed Switches. Fast forward one week. Reed Switches glued on.
And lastly, to hook up the electromagnet, then try it out!
The end?? Nope. That would be too easy.
When current flows through an electromagnet (an inductor), a magnetic field forms. This field will resist any change in the current that created it. If the circuit is suddenly broken, the magnetic field begins to collapse, and its energy is converted to voltage. In an electromagnet like the one on my motor, these voltages can be as high as 400V!! This is known as back EMF – and we’ll come back to that later.
To understand why this is a problem, let’s first review how a Reed Switch works.
The Reed switch, circuit now broken, suddenly has 400V across it. Even in an atmosphere of inert gas, a spark will jump across the contacts. For an individual spark, a small part of the Reed Switch will reach a very high temperature, but the heat will rapidly dissipate. However, if the spark is repeated – say 10 times a second for a minute – that heat quickly accumulates. In addition, there is a constant resistive heat imparted by the high currents flowing through the switch. Eventually there’s enough heat to melt the metal, and weld the two tiny contacts together. Once welded, the switch is no longer a switch, but a closed circuit element – much like an alligator cable. Of course, projects were due for grading, and presentations to be given, that week. But at this point, it wasn’t for the grades. Now that I had a taste of engineering, I couldn’t simply ‘stop‘. I took it on as a challenge. How in the heck could I supply the Reed Switch with just enough current to function, yet still supply the vast flow of current to the electromagnet necessary for it to create torque? I spent nearly a week thinking about this single problem. Remembering what my dad taught me when I was little, I realized that what I needed was the ‘and‘ logic gate! (i.e. If/When the Reed Switch is ON, AND the power is ON, turn the electromagnet ON) This was my biggest ‘Aha!’ moment heretofore! Off to RadioShack, I went. I bought a pack of generic NPN transistors.
Next, I connected the collector to +12v, a 10kΩ resistor (and Reed Switch in series) to 12v, the Reed Switch to the base, and the emitter to the electromagnet.
The resistor limits the current flowing through the Reed Switch, keeping it much cooler, and greatly extending its life. Before testing, I inserted an LED so that I could actually see when the Reed Switch was engaging.
Now it was time to test! (’twas well after midnight)
It works! But there’s a catch. The generic transistors I was using were not designed to carry a current load as large as my motor. What you didn’t see was the magic smoke from many transistors burning. Enter the Darlington transistor. The Darlington allows me to reduce the current flowing through the Reed Switch, while switching even more current through to the motor! I bought a few Darlingtons on the internet, transfered the whole circuit from the mess of aligator clips to a breadboard, and then I had a fully working Brushless DC motor. Cue video.
Later I went on to miniaturize it, but the design remains untouched.
I’ve kept up work since then. The project started the ~beginning of April 2012. Now, 8 months thereafter, I’ve found some time to ruggedize & finalize the design. I replaced the Lifesavers with two random bits of hardware I found in a closet, using a TON of CA to securely attach them exactly where the lifesavers were. I soldered the transistor to an Adafruit Perma-Proto, attached a comically oversized heatsink with arctic silver, tape, and even more CA, and lastly, secured all the wires.
Shortly before Christmas, I found some time for stress testing. I set the motor on my desk, connected it to a handy 8AA battery holder, and watched. I had expected it to run for a while, but also for the batteries to drain quickly. Six hours later, the motor was still casually clicking away somewhere between six-hundred & a thousand rpm, and the batteries at ~11.5v – ’twas a good thing I started testing shortly after I woke up! Ten hours in, The motor was still clicking away! Right about then recorded a short clip of its progress:
It kept going for, twelve, eighteen, twenty, nearly 24 hours! The batteries weren’t even fully drained when the motor stopped, with ~8v remaining. Albeit that’s towards the end of a AA’s discharge curve, it’s still impressive. The Energizer bunny better watch out. As a matter of fact, only 3 of the batteries were Energizer brand (the others: 3 Duracell, 1 Amazon, 1 Rite Aid.)
….and thus concludes my journey.
In short: building a motor was an incredible experience
An afterword: I made great many mistakes in building this motor, and have learnt as many a lesson in retrospection. I have already ordered the parts for another, improved, motor.