01Designed, simulated, machined, glued and wound by hand

Custom Outrunner Actuator

Actuators are around 70 percent of the cost of a robot. I read a lot about why, but I wanted to feel why they are so hard to make. So I built one from scratch.

12 / 14
Slots and poles
240
Turns of wire, by hand
1.57N·m
Peak torque on the bench
2,605rpm
Top speed on 48 V
The finished outrunner motor clamped to a workbench
The finished motor on the test bench. Scroll down to take it apart.
01

Why build one

When I was reading about what the most important and most scarce things in robotics are, it was the actuators. They account for around 70 percent of the cost of each robot. I wanted to know why they are so hard to make, why they can't be customized easily, and why you need so much equipment to design, assemble and manufacture them.

I did a bunch of research and I kind of understood why. But I didn't fully understand, because I hadn't felt it. So I designed an outrunner motor, simulated it, had the round parts machined, and did the rest by hand.

I now feel why. I felt it gluing the plates together, and wrapping the stator by hand, and recoating the varnish, and turning the hub down on the lathe over and over until it fit. But the first time it spun was amazing. It isn't done. I'm still testing it, and I want to build a robot arm from scratch with this actuator.

02

How it works

Fourteen magnets are on the rotor outside and twelve coils are on the stator inside. The controller drives current through three phases in sequence, and the coils pull the magnets around. The drawing on the left is the actual cross section, from the file that was sent to the laser cutter. The one on the right is what the magnetic field looks like at the same moment.

Rotor, spinsStator, fixed
Magnets, N and SSteelCoils, three phases
Same motor, simulated field
0 TFlux density2 T
11°
Phase A
Phase B
Phase C
Both pictures show the same rotor position. On the left are the parts. On the right is the magnetic field from the simulation, at 6.5 amps and about 1.07 N·m. White lines are flux lines, and orange means the steel is close to saturating. The coils get brighter as their phase carries more current. The white dot marks the same spot on the rotor in both. Drag the slider to turn the rotor by hand.
03

Designing it in simulation

Before cutting anything I simulated the design in FEMM, a free 2D magnetics solver. I ran a few thousand solves to compare tooth widths, slot openings, air gaps and magnet sizes. That was slow on the CPU, so I moved the solve onto a GPU, which ran a batch about 27 times faster. The field picture above is one of those solves.

The first design fit 23 turns in each slot, but only with the wires packed the way a machine packs them. Wound as loosely as I can wind by hand, it would have held 14.

So I simulated 70 tooth shapes to find one with more room for wire that didn't lose torque. The one I picked has thinner teeth and a thinner back. I 3D printed it and wound it before cutting any steel, and I got 20 turns on. That is about 12 percent more torque for the same heat.

First design
14 turnsper tooth, by hand
19.9 mm² of room for wire · 6.4 mm teeth, 4.4 mm back
Final design
20 turnsper tooth, by hand
25.0 mm² of room for wire · 5.8 mm teeth, 3.2 mm back

One slot between two teeth, before and after. Each circle is one turn of wire, drawn at the spacing I can wind by hand. The dashed line on the right is the first design's outline. Thinner teeth and a thinner back left room for six more turns.

I also added a 0.5 mm fillet on the inside corner under each tooth tip to match the other corners. It doesn't take any winding space, and the simulated cogging dropped to about a third.

Simulated cogging torque

A 0.5 mm fillet cut the simulated cogging to about a third.

04

Making the parts

The hub, shaft, face plate and rotor can were machined. The stator plates were laser cut from sheet steel. I did the rest by hand.

Machined motor parts laid out on a marble table
Hub with a bearing pressed inA few loose platesShaftFace plateRotor can, 14 pockets inside
The machined parts the day they showed up.
A loose stack of steel stator plates on a printed alignment plug
The plates dry stacked on a 3D printed plug before gluing.

The stator plates have to be glued into one stack. I glued them one at a time on a 3D printed jig. I had to come up with a few different ways to do this before it worked.

This is where I learned how important it is to surface prep metal before epoxying it. Epoxy doesn't do anything if the surface isn't prepped.

A single stator plate sitting on a green printed jig
3D printed gluing jigPTFE tape so the epoxy doesn't stick to the jigFirst plate
The first plate on the gluing jig.
Glued stator stack clamped between printed plates with a bolt
One bolt does all the clampingPTFE tape so the stack comes off the jigStructural epoxy between every plate
The whole stack glued and bolted between two printed plates while the epoxy cures. The tan stuff sticking out is PTFE tape, so the epoxy doesn't stick to the 3D print and I can get the stack back out.

The magnets needed their own jig. They pull toward each other, so they won't stay in their pockets on their own. A 3D printed plug holds them against the steel while the epoxy cures.

North and south alternate all the way around.

Magnets being glued into the rotor can around a green printed plug
14 magnets, one per pocketPrinted plug pushes them outwardTape so the epoxy doesn't stick to the print
Gluing in the magnets. They pull toward each other, so a printed plug holds each one in its pocket until the epoxy sets.
Finished rotor can with fourteen magnets bonded inside
The rotor with the plug removed and all 14 magnets bonded in.
05

Insulating the stator

Magnet wire is copper with a thin enamel coating. The edges of the laser cut plates are sharp. If the wire drags across a sharp edge, the enamel comes off and the wire shorts to the stator.

So the stator has to be insulated before winding. It took me a few tries to get that right.

Rounding the corners of the stator stack by hand at a vise
Rounding the sharp corners on every tooth. Varnish doesn't stick to a sharp corner, so they have to come off first.
A toaster oven converted to a reflow oven with test plates inside
Controller holding 200 °CVery important signVarnish test plates
The reflow oven I built in high school from an old Black and Decker toaster oven, with bigger solid state relays and a thermocouple controller. I used it to hold the right temperature for curing the varnish.
Three test plates sprayed with teal insulating varnish on cardboard
Spare plates I used to test how thick the varnish needed to be.
Teal varnished stator curing in the oven above a tray of circuit boards
The stator curing in the oven.

The first coat of varnish wasn't thick enough, so I had to recoat it multiple times. I also learned that varnish doesn't stick to sharp corners, so I had to Dremel them down. For the slots I tried PTFE tape first, and it was not good at protecting the wire from the corners.

Varnished stator with tape lining each slot
PTFE tape slot linerVarnish on every outside faceBore has to stay clean to fit the hub
After varnish, with PTFE tape lining the slots. The wire cut through the tape at the corners.
Stator with black electrical tape lining the slots
Second try. Two layers of electrical tape, cut into thinner strips so it wraps the corners.
06

Winding

Stator being wound in a vise with labelled wire ends and a winding diagram on a laptop
Tally marks to keep count of turnsWinding diagramA flag on every loose end20 turns on each tooth
Partway through winding. Every wire end gets a labeled tape flag so I know which coil and phase it belongs to.

Twelve teeth with twenty turns each. Wrapping the stator took me around nine hours, because I kept ripping the enamel off and shorting the wire to the stator. Every time that happens the tooth has to be unwound and redone.

It is also really hard to keep track of how many turns you have done. When you are trying to do 20, you have internal battles with yourself about whether you are on 15 or 16. You end up undoing it and doing it again. Then you make a mistake and have to undo it again.

Direction matters too. Some coils are wound clockwise and some counterclockwise, following the winding diagram on the laptop.

Checking a freshly wound coil against the stator with a multimeter
Meter on continuityOne probe on the wireFirst few teeth done
Checking each coil for a short to the stator right after winding it. If it beeps, the enamel got scraped and that tooth has to be redone.
Finished wound stator on a workbench
All twelve teeth wound with no shorts. It took around nine hours.

Then the rotor went on for the first time. The magnets pull the rotor toward the stator, so as it slides on it gets pulled down and smacks into place with a really satisfying click.

PS. Turn on the audio for this one.

07

First spin

The euphoria when it first spun was amazing. I clamped it to the bench, connected an ODrive controller and an encoder, ran the calibration, and it worked.

Logged speed
300rpm
holding 300 · 0.63 A
0 sController log39 s
The motor stepping from 300 up to 1,800 rpm, about five seconds per step. The readout is the speed the controller logged during this same run, synced to the video.
Acceleration bursts on the 48 volt supply, 300 to 1,200 rpm and back. I was terrified.
One acceleration burst

300 to 1,200 rpm in 39 ms at about 11 amps, then back down.

Speed
Current

One burst as the controller logged it, at 8,000 samples a second, from a later run of the same test. Positive current speeds it up and negative current brakes it.

Motor clamped to a bench and wired to a controller and power supply
The motorODrive controllerRegen clamp48 V supply
The test setup. The motor is clamped to the bench and a laptop runs the test scripts.
08

Simulation vs. measured

I had a simulation of this exact motor, so I wanted to see how close it was. I ran 17 tests in one afternoon.

Most of it matched. The main difference is that the motor makes about 11 percent less magnetic flux than the simulation predicted. Most of the other differences come from that.

Voltage the magnets generate

Back-EMF is linear with speed, about 11 percent below the simulation.

SimulatedMeasured
Torque linearity

Acceleration rises in a straight line with current up to 11 amps, so the steel isn't saturating.

Measured
QuantitySimulatedMeasuredDiff
Torque per amp0.165 N·m/A0.145 N·m/A−12%Peak phase amps. Follows directly from the flux.
Magnet flux linkage15.6 mWb13.8 mWb−11%The biggest difference. See below.
Phase resistance0.281 Ω0.256 Ω−9%My end turns are shorter than the model assumed.
Phase inductance0.299 mH0.308 mH+3%Close, so the turn count is right.
Speed per volt50.5 rpm/V57.3 rpm/V+13%Less flux means it spins faster on the same voltage.
Torque droop at high current−1.4%−1.5%matchThe steel is not saturating, same as the simulation.
Cogging, peak to peak9 mN·m39 mN·m4×The extra comes at 12, 14, 24 and 28 per turn, from parts that aren't identical.
Drag at 1,000 rpmnot modelled14 WnewLoss in the thick mild steel plates.

Why is the flux low? I don't know for sure yet. The simulation is 2D and assumes a 1.2 mm air gap, a full height stack and magnets at their datasheet strength. The real motor is probably a little short on each. A few tenths of a millimetre of extra air gap would account for most of it. The plates being shorted together could also play a part, but the back-EMF stays in a straight line with speed, so I think that shows up more as loss than as missing flux.

Cogging is about four times what the simulation predicted. An ideal 12 slot, 14 pole motor only cogs 84 times per turn, and that part is small, like the simulation said. Most of what I measured is at 12, 14, 24 and 28 times per turn. Those show up when the teeth or magnets aren't identical, which makes sense for something glued together by hand.

Cogging over one turn

Measured cogging is about four times the simulated range.

Measuredsimulated range
No-load loss

It takes 14 watts to spin at 1,000 rpm with no load.

Measured

That loss is mostly from the steel. Proper motor laminations are thin silicon steel. I used plain mild steel more than twice as thick because it was easy to get laser cut. The simulation predicted about the same torque with more loss at speed, and that is what I measured.

The plates also aren't insulated from each other like I thought they would be. When I checked with a multimeter, I measured continuity between the top plate and the bottom plate. So the epoxy didn't isolate them, and current can flow from plate to plate. That is exactly what laminations are supposed to prevent, so some of this loss is probably from that.

I also ran heating tests. Holding 8 amps with the rotor stalled took the winding from room temperature to 75 °C in five minutes. At 11 amps it went up 56 degrees in one minute. There is no temperature sensor in the motor, so the test script calculates the temperature from the change in the copper's resistance.

Winding temperature, stalled

It can hold about 8 amps continuously. 11 amps is only good for a few seconds.

8 A11.3 A

One thing went wrong. After the heating tests, the motor needed more and more current to hold the same speed and then couldn't hold it at all. The encoder offset had shifted by 82 electrical degrees, so the controller was driving the coils at the wrong time. I don't know yet what moved. I adjusted the encoder, checked that the offset stayed within a degree, and reran the test.

09

Spec sheet

Layout
12 slot, 14 pole outrunner
Size
82 mm across, 25 mm stack
Winding
20 turns per tooth, 21 AWG, star
Magnets
14 × N42SH, 25.4 × 12.7 × 3.2 mm
Core
0.76 mm mild steel plates
Air gap
1.2 mm, as designed
Phase resistance
0.256 Ω
Phase inductance
0.31 mH
Torque constant
0.145 N·m per amp
Speed constant
57 rpm per volt
Peak torque
1.57 N·m at 10.9 A
Continuous torque
about 1.15 N·m
Top speed
2,605 rpm on 48 V
Rotor inertia
6.2 × 10⁻⁴ kg·m²
Cogging
39 mN·m peak to peak
Drag
14 W at 1,000 rpm

Everything electrical is measured on the bench. Torque figures come from current and the measured torque constant, since I don't have a torque sensor yet. Currents are peak phase amps.

10

What I learned

01

Surface prep before epoxy

Epoxy doesn't do anything on metal that hasn't been surface prepped first.

02

PTFE tape doesn't protect corners

It is not good at protecting wire from a sharp corner. The wire goes right through it.

03

Varnish doesn't stick to sharp corners

You have to Dremel the corners down before the varnish will stay on and actually protect anything. One coat was also too thin, so I recoated it several times.

04

One layer of tape isn't enough

Electrical tape needs two layers, cut into thinner strips so it wraps the corners.

05

Counting to 20 is hard

When you are trying to do 20 turns you end up arguing with yourself about whether you are on 15 or 16. Eventually you just undo it and do it again. Then you make a mistake and undo it again.

06

Epoxy doesn't insulate the plates

I measured continuity from the top plate to the bottom plate after gluing. The epoxy held the stack together but didn't isolate the plates like I thought it would.

07

Fit takes several passes

I had to turn the hub down on a lathe multiple times before the stator would fit over it.

I kind of understand all these steps now. It makes a lot more sense to me why actuators are hard to make and why they cost what they do.

It's not done yet. I'm still doing a lot more testing, and I really do want to build a robot arm from scratch with this actuator. But so far this motor has been a lot of fun.

Next project · 02
Anduril AI Grand Prix