Picture of Make Your Own Miniature Electric Hub Motor
In-wheel electric drive motors represent an effective method of providing propulsion to vehicles which otherwise were not designed to have driven wheels.

That is, they're great for EV hacking and conversion. They're compact and modular, require no support of rotating axles from the parent vehicle, and can be designed around the vehicle to be propelled. Pure DC electric hub motors, in fact, were used in some of the first electric (and hybrid electric) cars.

They are also not as complex and mystical as one might think. The advent of my project RazEr, a stock Razor scooter with a custom built electric conversion, has raised many questions from amateur EV builder looking to construct their own brushless hub motors. Until now, I have not had a single collective resource to point anyone towards, nor have I been confident enough to understand what I actually built to write about it for other hackers.

Hence, I will attempt to show that a brushless DC permanent magnet hub motor is actually relatively easy to design and build for the hobbyist, resource access considerations aside. I will first exposit some of the details of brushless DC motor theory as applied to hub motors. I will provide some thoughts and pointers about the mechanical construction of the motor itself and how to source major components. Finally, I will briefly glean over ways to control your newfound source of motion. The arrangement of this Instructable is designed for a readthrough first - because it relays theory and advice more than specific instructions on how to create one particular motor.

This is intended as a basic primer on DC brushless hub motors. Many assumptions, shortcuts, and "R/C Hobby Industry Rules of Thumb and Hand Waves" will be used. The information is purposefully not academic in nature unless there is no way to avoid it. The intention is not to design a motor that maintains above 95% efficiency across a thousand-RPM powerband, nor win the next electric flight competition, nor design a prime mover that will run at constant power for the next 10 years in an industrial process. Motor theoreticians avert thine eyes.

I will assume some familiarity with basic electromagnetics concepts in order to explain the motor physics.

Below is an exploded parts diagram of a prototype motor that I am in the process of designing and building. Let's clear up some of the vocabulary and nomenclature immediately. The can (or casing) hold a circular arrangement of magnets (electrically called poles) and is supported on one or both ends by endcaps. This whole rotating assembly is the rotor. Internally, the stator is a specially shaped piece of laminated iron pieces (the stack) which holds windings (or coils) made of turns of magnet wire on its projections (teeth). It is stiffly mounted to the shaft (a nonrotating axle) which also seats the bearings for the rotor assembly.

1-40 of 174Next »

how large a motor would I have to build to power a bike light consisting of approx 50 led lights?

nitrous26 days ago

Could you just clarify for me the "AC" part of this whole thing.

Does the controller simply emulate the commutator of a DC motor, energizing the coils in such a way as to create a rotating magnetic field or are you saying it also converts the supplied DC to a true alternating current which it distributes to the coils in such a way as to produce a rotating AC field?



Mou7amed3 months ago
hi. i'm from tunisia. good job man !. can you contact me on jakefouly@gmail.com i need some help. thank you
kasra_sa made it!3 months ago

hello guys. i am new member. hope to could find good things for better future for succeses. tx all

vasi1y3 months ago

Issues with your formula:

You pick Mevey's 2.30 equation:

T = 2 * N * B * Y * i * D/2

Where N is the number of turns per pahse, and '2' is the number of active phases. Then you redefine N as the number of turns per tooth, and define m number of teeth per phase. So (previous definition of N) = (new definition of N) * m. The result equation:

T = 2 * m * N * B * Y * i * D/2

Not four but two!!!

Next, in Mevey's 2.30 equation D is the diameter of the coil centers. Not stator's outer diameter, but diameter of the coil centers which is obviously smaller than stator's outer diameter.

P.S. Thanks for the article anyway. It is really motivating!

the most in depth view about brushless motors awesome saving this page for future guidence cheers


good math derivation, T = 4 * m * N * B0 * (t / (t + g)) * L * R * i,
but this is exactly the double the torque you calculate using what reported on
LRK Motor Analysis Worksheet
T = 4 * (rr+rs)/(rs-rr) * Br * N * L * t * ( I - I0)

where this formula is calculated taking into account that just two phase current are active on a trapezioidal drive, and that the current to be used should be just the active current (total current less free running current).

Which formula is the correct one???

asdqweasd2 years ago
Torque should definitely depend on current. So, it should be T = 4 * m * N * B0 * (t / t + g) * L * R * i instead of T = 4 * m * N * B0 * (t / t + g) * L * R

Or better, using correct parenthesis position:
T = 4 * m * N * B0 * (t / (t + g)) * L * R * i
but furthermore:
- for "i" you have use the useful portion of total current, i.e. "i" - free running i zero (taking into account the eddy current and friction losses);
- for "R" you have to intend the medium radius between stator and rotor (where the magnetic force act) which is in the middle of (t+g)=magnet thickness + air gap zone.

jacobbloy6 months ago
Hi mate I'm making a hub motor for a skateboard, 100kv 15turns in wye dlark with 6 strands 0.34mm wire (this is all I can fit)
80mm diameter wheel, 50mm diameter motor, 40.7mm x30mm stator 12t 14p, with 40SH magnets 30x7x3, air gap between 0.5-0.7 depending on tolorance.
Will be using 29v batterys 8ah 30c.

I want to get up a hill of about 10-15% grade at about 20km/h
70-90kg. How much power do I need, is my wire cross section ok?
Iv been struggling with the math, and worried about the new winding not having the current capabilities I need, but it's hard to fit the copper inside of the stator, but maybe I'm just not good at it!
I'm also using hall sensors or optical sensors soon to get better start up as I seem to get a lot of cogging! From even a small push!

Each skateboard is using 2 motors on the rear.

I really need help!
My email is jacob.bloy(at)gmail.com

My build page.
Lord AntonH7 months ago

So I have a question about the equation to measure the theoretical torque. T = 4 * N * B * L * R * i in my case would be 10 turns per phase, 52 for the neodymium magnet and assuming you measure things using the imperial system the length of the stator would be 19.8 inches and the stator radius 3 inches. Putting through 42 amps would theoretically give me 5189184.0 torque. Now this can't be accurate because at 1500 RPM that would give me 1.4821e+6 horse-powers just to put things into perspective, which is a insane amount of horsepower.
t = 4 * 10 * 52 * 19.8 * 3 * 42 - Where did I go wrong in the equation?

KrzysztofK8 months ago

If we rewire series connection of coils to parallel i.a.w. http://www.thebackshed.com/windmill/FPRewire.asp without changing position of hall sensors, does it influence on steering algorithm? How to include this wiring difference in one equation(e.g. torque equation)?

r2maker9 months ago

Excellent instructable! Thanks for taking the time to document and share your work. I need clarification on (at least) one topic. In the section discussing Magnet Length the author states:

"Optimally, the magnet length is equal to the stator length (L)."

In the same section, magnet width is mentioned. Would someone clarify for me the magnet dimensions that should be used for a given stator? Specifically, what is the stator length (L)? A diagram would be especially useful.

Thank you.

Ian Paul9 months ago

Jah mahn, danke mahn, huge, this is monster info bro.

Thanks you!

Timonb11 months ago

Thanks a lot for publishing the new good stuff for us. I’ll really get the great advantage from your good stuff.


Timonb11 months ago

Waooow!!! Really very cool site of blogs. You can imagine what you have done for me.

<a href="http://www.findelectricalcontractors.co.uk">best electrical contractors</a>

Timonb11 months ago

Waooow!!! Really very cool site of blogs. You can imagine what you have done for me.

<a href="http://www.findelectricalcontractors.co.uk">best electrical contractors</a>

Timonb11 months ago

Waooow!!! Really very cool site of blogs. You can imagine what you have done for me.

<a href="http://www.findelectricalcontractors.co.uk">best electrical contractors</a>

Tanmcnew1 year ago

You mention that you used 2 x 22AWG wires instead of 1 x 18AWG wire because it was hard to wrap and bend for 25turns. You said "Use the wire gauge table to compare diameters!", now 22 AWG wire is 0.644mm in diameter and 18AWG wire is 1.024mm in diameter. So 2 x 0.644mm is 1.288mm and thats well over the diameter of the 18AWG wire. Now 24AWG wire is 0.511mm in diameter, and 2 x 0.511mm is 1.022mm which is a lot closer to 18AWG. I don't want to be annoying i'm just confused. If we compare the surface areas though 18AWG wire is 0.823mm^2 and the closest pair that would measure similar is a pair of 21AWG wires, at 0.411mm^2 x 2 = 0.822mm^2, BUT neither of those are the wire you said you were using. Should the diameter of the multiple strands not add up to close to the diameter of the single wire? Thanks for any help, just confused.


Hi, I thought I'd jump in here and clarify a few things for you: When doing anything with electrical wire, especially when said wire is going to be carrying a significant percentage of its maximum safe current, you should be aware that the determining factor in current capacity is the cross-sectional area of the conductor, not the outside diameter. Since the area increases faster than the diameter or circumference, a wire of half the diameter will have one fourth the cross-section and thus one fourth the current capacity. A wire 1.024mm in diameter has a section of 0.82 mm^2, where a wire of 0.511mm diameter has a section of only 0.20mm^2. A 0.644mm wire has a section of 0.32, which means a pair are up to 0.64, close to the original 0.82. If I were doing this, I'd use three strands of 22, for a section of 0.96, better than the 18 gauge.

TL;DR don't go by diameter, go by cross section. They don't equate directly.

Thanks for the formulas to make my motor, but your math was off by .01 on 3.66/(4*4*10.9*0.03 *0.035)=19.98.

it is really 19.99 (19.986)

juliajohn1 year ago

I really love your
write-ups guys continue the good work.


Being one of the last electrical and electronic engineering graduates from my school, before they dropped the "electrical" part, electric machines have always been a favourite subject of mine. This 'ible is one of the best I've ever read. Excellent work.

Incidentally, you can get tyres made by the guys who can retread forklift truck wheels. They vulcanise the tyre onto your own hub.

Being one of the last electrical and electronic engineering graduates from my school, before they dropped the "electrical" part, electric machines have always been a favourite subject of mine. This 'ible is one of the best I've ever read. Excellent work.

Oh my, that's a lot of work and thanks for putting it all up here.

I was looking for a motor I could pass my leg though instead of using a ring gear and a small motor to rotate it off to one side. The open motors would be used to rotate segments of a leg roughly depicted here:


I'm still working out how many segments and at what angle and speed each segment should rotate at for the maximum comfort of the rider while still providing a good, natural leg motion. Seems making the motor would be beyond my capabilities and I'll have to settle on the ring gear driving by a motor or the like.

very interesting very ( ty iv bine tring to find info on moters like this )( o and I Quote " Their large outrunner motors are inexpensive enough to consider cannibalizing for stators. "
well LOL!!! ) thank you for this it was very help full. :)
ckizer12 years ago
Can the stator core be plastic? Does it need to still be magnetic at all? I dont' understand why you wouldn't build it out of something completely non-magnetic
No not plastic. The material has to have a high permeability to concentrate the magnetic fields and at the same time reduce Eddy Currents.
valveman2 years ago
I wonder if a motorcycle stator from the magneto would make a nice stator for a brushless motor? Used they are not too expensive.
colt012 years ago
Is it possible to melt down many cores in a foundry and then cast my own core? The core I need is huge and would cost a lot of money to have it machined and cast by a specialized group. Especially when I will need at least 3.
teamtestbot (author)  colt012 years ago
Stators are not cast. If you look at one, you'd notice they are many thin and fine layers. Each of those actually are insulated from each other.

A cast stator would basically be a big magnetic brake and would be extremely inefficient and heat up quickly due to eddy currents. I think you should look into motorcycle alternators and washing machines for large-ish (5" - 6" - 12") stators.
ckizer12 years ago
Where can we buy one of these motors (not the wheel) as a kit to put together and learn? It's easy to get the wire, but not the pieces the wires get wrapped around :-(
lgabor2 years ago
it looks to me that the torque should be proportional to the square of the radius. At constant magnet induction and current density the force per unit circumference length would be constant so the torque would be proportional to the radius and the length of the circumference, in turn proportional to the radius , hence the radius square.
Ottoclav2 years ago
Im an electrician, and house wiring is done in 14, 12 and 10 gauges mostly. Winding a motor in 18 gauge must be a chore! But im sure chris farley would say, " It builds dexterity!"
mb inventor2 years ago
That's a lot to read but I read it anyway I can't make one of these. Because I don't have the tools nor the supplys to build it but awesome job
antoniraj2 years ago
very nice and educative. learned a lot from this.
ElvenChild3 years ago
So there is probably something stupidly wrong with what I am about to write, but I am tired and can not get this idea out of my head, so on with it.

What is to stop you from taking a standard dc motor, like the ones used in toy scooters, and reinforcing the !#$@% out of it, namely in the (casing? or is it a shell?) itself and the axel, welding a rim to the (reinforced) casing of the motor and using that as a hub motor with the motors axel acting like the axel of a bike wheel, with everything revolving around it?

Would the motor just plain not have enough torque?, or is there some other blatantly obvious issue that I can't think of?
here is a mild example of your concept and a solotiuon using a standard dc brushed motor as an axle or pivot point. and having to add a gear reduction to it to get it to move.


check it out.

and vote for me
You would not have enough torque, even on scooters with small diameter wheels the motor is usually geared down at least one to five, on a bike you will need a gearing of at least four times that! I hope this helps.
Sort of like this, or this.
image.pngImage 2.png
1-40 of 174Next »