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.

Step 1: Hub motor design considerations

Is a hub motor the right choice for your electric vehicle? Answer these few simple ques...

I mean, read these few pointers which highlights some design tradeoffs and considerations involved in the use of hub motors! They are not perfect solutions to every drive problem, and some of the shortcomings are dictated by the laws of physics.

Hub motors are inherently heavier and bulkier than driven wheels.

Until we make magic carbon nanotube superconductors en masse, motors are essentially chunks of steel and copper, both very heavy elements. What happens when you increase the weight of a wheel two- or -threefold is a drastic increase in the unsprung weight of a vehicle, or weight that is not held up by a suspension. For those of you in the know about vehicle suspension engineering, unsprung weight negatively affects the ride and comfort of a vehicle. If you just drop hub motors into a vehicle previously endowed with indirectly driven wheels, expect a change in ride performance.

This is more of a concern for passenger cars and sport vehicles than anything else, as most small EVs such as bikes and scooter won't have suspensions at all. However, the keyword here is small. You might have gathered from my other instructable that some times it's all but impossible to simply fit a larger motor in an enclosed space. A hub motor will inevitably take up more space in the vehicle wheel. This matters less for larger wheels and vehicles. The MINI QED and Mitsubishi MIEV are example of car-sized hub motors that have been well-integrated into the vehicle design through some pretty serious re-engineering of how the wheels attach to the car frame. You might have to do the same for your scooter, bike, or couch.

A hub motor powertrain will generally produce less torque than an indirect-drive system

Don't expect any tire smoke from your hub motors. An indirect drive motor, such as one geared to the wheels through a transmission, has the advantage of torque multiplication. This is how a 400 horsepower diesel engine in a semi truck can haul itself and 80,000 more pounds up a mountain road, but a 400hp Corvette could not do the same - the semi engine goes through a painstakingly complex arrangement of gears to transmit many thousands of foot-pounds of torque at the drive wheels. A Corvette is light and fast, and hence the 400 horsepower in its engine is mostly speed.

From physical mechanics, power output is a product of both torque and speed.  Due to curiosities in the laws of nature, it is much easier to make a fast but low torque motor than a slow and high-torque one, power output levels being equal.

As it relates to motors, this is why your typical drill motor spins at upwards of 30,000 RPM, but you only get a few hundred RPM out at the screwdriver bit. The drill motor has been engineered to produce maximum power at very high rotational speeds, which is sent through a gear reduction to crank your drill bits hard enough to do this.

But your hub motor is direct drive. There's no bundle of pointy steel things to convert its rotational velocity into torque. A hub motor can only lose mechanical advantage because the wheel essentially must be larger in diameter than the motor. Comparatively few in-wheel motors have internal gearing - these are most often found on bicycles, since they have a large diameter, and hence loads of space, to work with. It is not that much more difficult to incorporate a gearset into your hub motor, but it is beyond the scope of this Instructable.

The bottom line is, while a 750 watt DC motor on your Go-Ped might let you perform a wheel-spinning launch, a 750 watt hub motor will probably not.

Hub motor drivetrains will generally be less electrically efficient than an indirect drive system

It is certainly true that hub motors bypass practically all the mechanical losses associated with a clutch, transmission, axles, and gears that you typically find in a vehicle powertrain. In fact, drive components alone can eat up 15 to 20% of the power produced by the engine. Imagine if that were gone - what could you do with 15 to 20% more power?

A hub motor will typically have a torque-produced to force-on-the-ground transmission of almost 1. The torque of the motor only has to go through the tire, with its rolling friction and deformation forces. But what hurts the hub motor is electrical efficiency.

A motor is a transducer. Input electrical power and out comes mechanical power - usually. Electrical power is defined as 

Pe = V * I

where V is the voltage across the motor and I is the current flowing into the motor. V has unit volts and I has unit Amperes. Mechanical power is

Pm = T * ω

where T is the torque output in Newton-Meters and ω is rotational velocity in radians per second (units 1 / time, because radians are unitless!)

It is perfectly within reason to be inputting electrical power to the motor but get no rotation out. This is called stall or locked rotor condition, and it kills motors. This occurs when T is not enough to overcome the forces pushing back against a motor - think of driving up a really steep hill.

In this case, your efficiency is precisely zero. Zilch, nada, nihil, nothing. Mechanical power out is zero, but electrical power in is nonzero.

While it is true that both motors must start the vehicle from standstill, and thus have zero efficiency for a split second, the fact that hub motors must operate continuously at high T and low ω is the distinguishing factor. Other laws of physics dictate limits of torque output, which I will get to shortly. A\ hub motor has to draw a higher current for the same torque output, and current is what causes heating in wires (not voltage). The more current there is, the more heat is generated.

This is called Joule heating and is governed by the power law Pj = I² * R. It is a square law: double the current, quadruple the heat. 

Now you see why hub motors are less efficient electrically than indirect drive motors. Hub motors are low speed creatures, and will inevitably spend much of their lives at or near stall condition. This occurs whenever the vehicle is moving at low speed or accelerating. A hub motor will see more moments of low or zero efficiency than an indirectly driven, geared motor.

The bottom line is, prepared to see a decrement in battery life if you swap your existing drive system with a hub motor.

Now that I have told you the reasons to not build and use hub motors, let's get on to how you can build and use hub motors.

<p>This looks so cool, but after I read the why not to build list it got a little stale. </p>
<p>how large a motor would I have to build to power a bike light consisting of approx 50 led lights?</p>
<p>Could you just clarify for me the &quot;AC&quot; part of this whole thing.</p><p>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?</p><p>Thanks</p><p>Doug</p>
hi. i'm from tunisia. good job man !. can you contact me on jakefouly@gmail.com i need some help. thank you
<p>hello body. i have not came here for a while , if you need help i am in, but ask what you want in my mail: pejman_22000@yahoo.com or skype: kasra_Sa2</p>
<p>hello guys. i am new member. hope to could find good things for better future for succeses. tx all</p>
<p>Issues with your formula:</p><p>You pick Mevey's 2.30 equation:</p><p><strong>T = 2 * N * B * Y * i * D/2</strong></p><p>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:</p><p><strong>T = 2 * </strong><strong>m * </strong><strong>N * B * Y * i * D/2</strong></p><p>Not four but two!!!</p><p>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><p>P.S. Thanks for the article anyway. It is really motivating!</p>
<p>the most in depth view about brushless motors awesome saving this page for future guidence cheers</p>
<p>Hi, </p><p>good math derivation, T = 4 * m * N * B0 * (t / (t + g)) * L * R * i, <br>but this is exactly the double the torque you calculate using what reported on <br>LRK Motor Analysis Worksheet<br><a href="http://www.femm.info/examples/lrk40/lrk-bldc.pdf" rel="nofollow">http://www.femm.info/examples/lrk40/lrk-bldc.pdf<br></a>T = 4 * (rr+rs)/(rs-rr) * Br * N * L * t * ( I - I0)</p><p>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).</p><p>Which formula is the correct one???</p>
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
<p>Or better, using correct parenthesis position:<br>T = 4 * m * N * B0 * (t / (t + g)) * L * R * i<br>but furthermore:<br>- for &quot;i&quot; you have use the useful portion of total current, i.e. &quot;i&quot; - free running i zero (taking into account the eddy current and friction losses);<br>- for &quot;R&quot; 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.</p>
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)<br>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.<br>Will be using 29v batterys 8ah 30c.<br><br>I want to get up a hill of about 10-15% grade at about 20km/h<br>70-90kg. How much power do I need, is my wire cross section ok?<br>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!<br>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!<br><br>Each skateboard is using 2 motors on the rear.<br><br>I really need help!<br>My email is jacob.bloy(at)gmail.com<br><br>My build page.<br>http://endless-sphere.com/forums/viewtopic.php?f=31&amp;t=65636&amp;sid=32c74875705d1d55d0801eeae1381c11
<p>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.<br>t = 4 * 10 * 52 * 19.8 * 3 * 42 - Where did I go wrong in the equation?</p>
<p>If we rewire series connection of coils to parallel i.a.w. <a href="http://www.thebackshed.com/windmill/FPRewire.asp" rel="nofollow">http://www.thebackshed.com/windmill/FPRewire.asp</a> 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)?</p>
<p>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:</p><p>&quot;Optimally, the magnet length is equal to the stator length (<em>L</em>).&quot;</p><p>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.</p><p>Thank you.</p>
<p>Jah mahn, danke mahn, huge, this is monster info bro.</p><p>Thanks you!</p>
<p>Thanks a lot for publishing the new good stuff for us. I&rsquo;ll really get the great advantage from your good stuff.</p><p>http://www.findelectricalcontractors.co.uk</p>
<p>Waooow!!! Really very cool site of blogs. You can imagine what you have done for me.</p><p>&lt;a href=&quot;http://www.findelectricalcontractors.co.uk&quot;&gt;best electrical contractors&lt;/a&gt;</p>
<p>Waooow!!! Really very cool site of blogs. You can imagine what you have done for me.</p><p>&lt;a href=&quot;http://www.findelectricalcontractors.co.uk&quot;&gt;best electrical contractors&lt;/a&gt;</p>
<p>Waooow!!! Really very cool site of blogs. You can imagine what you have done for me.</p><p>&lt;a href=&quot;http://www.findelectricalcontractors.co.uk&quot;&gt;best electrical contractors&lt;/a&gt;</p>
<p>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 &quot;Use the wire gauge table to compare diameters!&quot;, 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.</p>
<p>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.</p><p>TL;DR don't go by diameter, go by cross section. They don't equate directly.</p>
<p>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.</p><p>it is really 19.99 (19.986)</p>
<br> I really love your <br> write-ups guys continue the good work. <br><p>http://www.zapelectricianbrisbane.com.au/</p>
<p>Being one of the last electrical and electronic engineering graduates from my school, before they dropped the &quot;electrical&quot; part, electric machines have always been a favourite subject of mine. This 'ible is one of the best I've ever read. Excellent work. </p><p>Incidentally, you can get tyres made by the guys who can retread forklift truck wheels. They vulcanise the tyre onto your own hub. </p>
<p>Being one of the last electrical and electronic engineering graduates from my school, before they dropped the &quot;electrical&quot; part, electric machines have always been a favourite subject of mine. This 'ible is one of the best I've ever read. Excellent work. </p>
<p>Oh my, that's a lot of work and thanks for putting it all up here.</p><p>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: </p><p><a href="http://youtu.be/RV9fvg3C_fo" rel="nofollow">http://youtu.be/RV9fvg3C_fo</a></p><p>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.</p>
very interesting very ( ty iv bine tring to find info on moters like this )( o and I Quote &quot; Their large outrunner motors are inexpensive enough to consider cannibalizing for stators. &quot; <br>well LOL!!! ) thank you for this it was very help full. :)
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.
I wonder if a motorcycle stator from the magneto would make a nice stator for a brushless motor? Used they are not too expensive.
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.
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. <br><br>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&quot; - 6&quot; - 12&quot;) stators.
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 :-(
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.
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, &quot; It builds dexterity!&quot;
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
very nice and educative. learned a lot from this.
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. <br> <br>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? <br> <br>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. <br> <br>http://www.instructables.com/id/6-AXIS-ROBOTIC-ARM/ <br> <br>check it out. <br> <br>and vote for me <br>
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.
On this page you have a picture of some small car hub motors. Can you tell me where the came from?
how much cost for four wheeler hub motor?.
i have a question (yes, i read the entire instructables). If the thickness of my magnetic field isn't determinant can i build the stator as thin as i want? or there is some equation that relates the power (Pe) with the area of stator across each coil? <br>because when i study electronics there was a equation for transformers that related that. <br>i'm an electronic technician, but i never design a brushless motor (sorry for my english man, i do my best) <br>Thanks.
Has anyone investigated the use of motorbike / scooter magneto stators for converting the bldc motors? The smaller / basic bikes without alternators appear to have magnetos with stators that look very similar to what is needed for the centre of a bloc motor. There seems to be heaps of cheap 18 pole and 8 pole magneto stators and a few 12 pole stators. From the bike sites, it seems these fail fairly often on bikes, so there would be heaps of old stators being thrown away.
Absolutely - this has been done by a few people, most notably:<br><br>http://wattsdottime.blogspot.com/ (both as motor and as a generator)<br>http://amymakesstuff.com/2011/06/07/pf-hub-motor-complete-mostly/<br><br>The only downsides to the bike stators are their large bore and narrow teeth - can't stuff as many windings on it as you otherwise would be able to, and the teeth potentially will saturate earlier. But, those are all parameters you can design around.
Here's a (very simplistic) thought - just <em>how</em> important is it that these &quot;electrical steels&quot;/&quot;transformer steels&quot; <em>contain</em> silicon <em>as an</em> <em>alloy</em>?<br> <br> What I'm thinking is laminating&nbsp;very thin steel sheets with <em>very thin</em> sheets of silicon to mimic the effects you outline... Or maybe just laminate the steel with a silicon adhesive...<br> <br> There'd probably be a minimum size beyond which you'd lose too much efficiency, but would larger, slower-turning, motors be feasible?
Where would you get these &quot;very thin sheets of silicon&quot;?
Sorry, my bad. I put the idea down as it came, without&nbsp;checking up, so I don't even know if they exist... - that's partly why I mentioned the adhesive.<br> <br> Thinking about it now, anything thin enough would probably not be available in small-enough quantities to&nbsp;be affordable for the DIY'er (yet, anyway).<br> <br> So, we're back to the adhesive - and you'd probably need 100% pure silicon (like aquarium sealant is, I think).<br> <br> &nbsp;Maybe an idea for someone else to tinker with?

About This Instructable


950 favorites


Bio: lol robots
More by teamtestbot: How to Build your Everything Really Really Fast Chibikart: Rapid-Prototyping a Subminiature Electric Go-Kart Using Digital Fabrication and Hobby Components The New and Improved Brushless Electric Scooter Power System Guide
Add instructable to: