Motor design

Well, just as I expected, no one can tell me where to buy an electric motorized car wheel. So, it’s off to the science lab. :)

I started out by measuring the real free volume inside my car’s rear wheels, and drawing up a CAD representation. I couldn’t find a free-software 3D CAD program, so I settled for the quite nice 2D “Qcad“.

Here you can see the wheel design (click to enlarge).

wheel_1.png

Next, I took a wild chance and just designed a motor around the available structure. I knew it had to have permanent magnets on the rotor and electric coils on the stator, as well as a reasonable thickness of steel for the magnetic cores, and that went OK, since my only worry was to fit the motor in the wheel. One suggestion that my buddies gave me was to design the motor as two parallel discs, instead of the traditional two concentric cylinders. This helped a lot in fitting all the stuff in, and also in simplifying the construction. One advantage of designing a specific motor for the application is that I can use the existing structure of the car as part of the motor. So this motor doesn’t need bearings or an axle, because I’m using the wheel’s own axle and bearings. The stator will be directly fixed to the suspension arm, and the rotor will be directly fixed to the wheel hub. Simple and neat. The wheel is the motor.

The tuning of the air gap width was and is one of my main concerns: it has to be as small as possible (ideally 0,5mm) to enable high efficiency, but we can’t have the rotor banging on the stator just because the car passes over a little rock. The Neodymium magnets are quite sensitive and will get broken if they take any beating. So I have this problem of ensuring that the air gap is stable under all mechanical conditions; for the time being, I’m solving that with 2 presumptions: 1 – the conical needle bearings of the car’s wheel axles are strong and tight enough to guarantee close to zero wobbling under vibration and banging; 2 – my design features a set of air gap tuning screws. Will it be enough? Right now, it’ll have to be. :) We’ll leave the real tuning for the prototype implementation and testing phase.

Here’s the CAD again, with the motor suggestion (click to enlarge).

motorizedwheel_1.png

This doesn’t have enough magnetic iron thickness to carry the flux… I’m still working on that, because there are other problems to solve first.

Then I started to think that maybe I should worry a little bit more about the electromagnetic part of the problem… ;) In order to finish the mechanical design, I have to know how thick the materials have to be, and that means I have to know all the forces involved.

The type of motor design chosen was the “LRK” DC-brushless design. It is a beautiful workhorse that is intensively used by radio modelists all over the world, and it’s as much a “hot item” as the lithium-polymer batteries right now. ;) Anyway, the (airplane, car, boat) radio models have practically the same application requirements for motors as a full-size electric vehicle: light weight, high efficiency, high power, good thermal management, small volume. Oh, and easy control of torque and speed. This design was found by a couple of friends that showed me the fantastic web pages of the German modelists… the Deutsch really take their modelling seriously! :)

My friend NJay took the time to build an electromagnetic simulator for this motor in his favourite scripting language, Tcl/Tk, and although it is still very much “work in progress”, it already gives us “ballpark figures” for motor torque.

ewheelmulator.png

Nevertheless, we had so many doubts about the magnetism calculation, that I set out to find something that we could use to validate our designs. Preferably a well-packaged set of know-how… So I found the wonderful “Finite Element Method Magnetics” (FEMM) free software (don’t know exactly how “Free as in Freedom” it is, the licence is weird, but at least it is kind of Open Source and it’s Freeware), and started to play around and try to model an LRK motor for my specific case. It’s been over 10 years since I last worked in the area of electric rotary machines at school, and I forgot the whole thing, but hey, you gotta bite the bullet some day.

The first challenge was that FEMM is a 2D representation program, and my motor design requires a 3D description, because the magnetic flux flows along the axial direction of the motor, instead of the usual radial direction. So I had to make a little sacrifice in precision and employ a small trick: instead of modelling the motor as a cut in a direction perpendicular to the axis of rotation (as is the universal convention), I modelled it as a cut in the direction parallel to the axis of rotation. This allows me to model the magnetic flux plane in detail, including the necessary interaction between several magnets and stator coils at the same time. It kind of resembles a linear motor, but I’m not sure how accurately. I only modelled half of the motor, so I didn’t have to waste too much CPU time. As far as I know, half motor is the only way to capture all the complexity of this model. Any lesser portion would give incomplete results. Here’s a snapshot of the motor model in FEMM, with the chosen finite element calculation mesh showing (click to enlarge).

femm_model_axial_flux_and_3_phases.png

The rotor with the magnets is on the top half, the stator with the coils is on the bottom half. There are 3 coils (from right to left: A, C, and B). The stator teeth are wound intermittently (one has a coil, the next one doesn’t, etc).

A note to the wise: careful selection of mesh size is critical… I started out by setting 0,25 mm for all areas of the problem and my dual-core AMD 5200+ machine took over 10 hours to solve the problem (!). After choosing more wisely the areas of interest and the ones I didn’t care about so much, the solution time dropped down to 2 minutes! :) Without much loss of precision in the most critical areas, of course. I settled for 0,25mm at the air gap, 1mm at the stator and rotor “teeth” and magnets, and 2,5mm for the straight stator and rotor cores.

After spending a lot of time manually building and changing the motor model in FEMM, I decided to learn the LUA scripting language and have the computer design the motor for me! :) The productivity and precision both raised an order of magnitude after this. Actually, the productivity raised at least two orders… ;) Now I have a couple of scripts that draw the motor at any desired rotor position, and with any useful combination of coil phase currents, solve the magnetic problem, measure the forces involved, and take a snapshot of the magnetic flux. This is a pretty sweet setup, except that the FEMM program crashes every 28 iterations of my script!… I don’t know if it is the Wine compatibility layer or the program itself, but what the heck… someday I’ll catch the bug.

I used those scripts to make this movie:

And more importantly, to build this force graphic (once again, click to enlarge):

locked_phases_rotate_force_xy_graph.png

The graphic was built in the following manner: I set the coil currents to have always the same polarity and value (i.e. +A, -B, C=0), which corresponded to a real phase switching step if I was using the motor with an electronic controller. Then I force the motor to rotate in steps of 1mm, and collect the values of X (tangential) and Y (axial) forces at each of the 455 steps that it takes to rotate half-way.

What is the wisdom that can be gained from this? Three things jump out:

  1. We can see the real final step width of the tangential force: 32,5mm (12,8 degrees) in my case (911,12mm circumference). This is probably the maximum “advance angle” that we can use to control the motor electronically.
  2. Both forces (axial too) vary in a sinusoidal fashion; this means the stator and rotor will be subject to mechanical stress in both directions.
  3. The axial force is over 10 times as strong as the tangential!!!

Although my first study turned out useful results, it is obvious this design is not good. Point 3 is a big show stopper: if there is going to be a continuous force of around 8.000 N (800 Kg) between stator and rotor, then the materials have to be really strong. And even if I did manage to design and build such a motor, it would be very heavy and once it was installed, impossible to remove by hand!!! Besides, it would increase the mechanical demands on the wheel bearings… no, this one won’t do. Back to the drawing board. :(

The funny thing is: I never heard any of my teachers ever referring to this while studying electric machines. Not once. Not even a small reference in books. Because “all” motors are cylindric and concentric, this force normally cancels itself (it pulls the inner cylinder towards the outer cylinder in all directions at once), so it’s not even worth mentioning, I guess… :/

Explore posts in the same categories: Motors

19 Comments on “Motor design”


  1. Olá. Só para dizer que estou totalmente em sintonia consigo sobre o facto de os carros hoje não serem totalmente eléctricos ou no mínimo híbridos “decentes” só porque os construtores e mais alguns não o quererem. Tenho seguido o seu blog sobre o projecto híbrido desde o inicio. E estou ávido pelo desenvolvimento. Acho fantástico usar Open Source porque eu mesmo sou um apologista do mesmo. Aliás tenho um blog que se quiser pode visitar. É o opensourceportugal.blogspot.com. Espero que consiga o objectivo de mostrar aos construtores que são só tretas o que nos dizem. Já agora isto era bom para o seu projecto não? http://ptnik.blogspot.com/2007/12/baterias-scib-nova-revolucao.html .

  2. Vasco Névoa Says:

    Thanks a lot for your support, Helder, and also for the battery link! :)
    I’m way too busy with the motor to bother with batteries, but I will certainly look into it when the time comes!
    As to the Open Source aspect, I try to use it everytime and everywhere. Free SW rules!!! :) But those issues are left to my personal blog; I’m trying to keep focused on the hybrid in this one (trying!…).

  3. Mário Costa Says:

    Hi Vasco,
    I’ve been looking for some CAD SW, I found some here http://en.wikipedia.org/wiki/Category:Free_computer-aided_design_software
    3D CAD SW
    AutoQ3D – http://en.wikipedia.org/wiki/AutoQ3D
    Blender – http://en.wikipedia.org/wiki/Blender_%28software%29
    Did u tried any of these?

    Regards

  4. Vasco Névoa Says:

    Thanks Mário.
    Those programs may be good for 3D CAD, but they lack the Finite Element computation part, which FEMM does. I need that to simulate the magnetic forces.
    There are other Finite Element 3D programs, but I’ve seen no one that’s not proprietary and expensive… If you find any of those, let me know! :)

  5. Haryo Says:

    Hey, It was great and awesome tutorial.. I have my own project to build my axial flux generator for my final task, but i couldn’t deal with the FEMM. I use FEMM only to simulate a magnetostatic condition, so perhaps it would be need a lot of computation to find how flux change in a stator teeth. It need to be resolved by (i think) lua script.
    If, you had some literature about Lua Script I would be delighted to received.

    Please send to my mail : disiniharyo@gmail.com

    Otherwise, how long did you took to learn FEMM with it’s lua script? Seem so hard?

    Regards,

    Haryo Agung Wibowo

  6. Vasco Névoa Says:

    Thanks Haryo! :)
    It’s not good enough to be a tutorial, but I guess you can call it a good introduction. ;)

    The Lua scripting language is very easy to learn and use. For an experienced programmer, one or two hours of training are enough to almost get the maximum out of it. If you are new to the art of programming, then one or two days should get you going.

    As to the FEMM Lua API (the collection of functions that you can call in Lua to manipulate FEMM models), that is also relatively simple. Just remember that each function is the equivalent to a button or menu option in the FEMM program, and that’s it. You program your script exactly the same way you would control FEMM with the mouse: you give a sequence of commands in the right order, and the model appears.

    FEMM author, David Meeker, maintains the documentation on his site: http://femm.foster-miller.net/wiki/Documentation/
    There you find both the LUA 4.0 manual, as well as the manuals for the FEMM versions (which also contain the API info).

    Also take a look at
    http://femm.foster-miller.net/wiki/Examples
    and
    http://femm.foster-miller.net/wiki/Contrib

    Good luck!

  7. Guy Says:

    Hi Vasco,

    I am in Belgium and try to develop a wheel motor too.

    1 big problem I see in your approach is that you are actually encapsulation the brake drum inside your Wheel Motor. This will heat up the motor unacceptably in case of serious (but within the design limits) braking. Also potential pollution by break dust.

    It’s a neat design, but how you think to solve that problem ?

    Best Regards
    WM

  8. Vasco Névoa Says:

    Hi Guy.
    My mechanical design depends on a different approach to system usage: the mechanical brakes will not function except for parking. This solves the problems you mentioned and increases overall system efficiency by enhancing regenerative breaking. This, however, poses different problems: how to harness the enormous amount of electric power coming from a “panic stop”? But I rather face that problem than do what everybody else is doing: mixing brake technologies.
    As to the design itself, I have given up on this “axial flux” version; see my more recent post “The motor, in ASCII art” for the most recent “radial flux” version.

  9. Guy Says:

    Vasco,
    I have great and cheap possibilities for casting and plasma cutting in Egypt. I am in Belgium, but have a factory in Egypt. I want to commercially produce a wheel engine.

    I also agree with your radial aproach (never really considered the axial version). I am ready to prototype but am a bit blocked at the heating problem. To get rid of the “enormous amount of electric energy” of a panic stop we can use a Super Cap. In case this is to expensive ( see below) we can always connect it to a 30kw electric egg cooker (no energy waisting here!) However, braking electrically only on the back-wheels … That put great responsibility on this electric system and for commercial applications in Europe: We can forget it! In Belgium for example: Forbidden by the government and in case of an accident the insurance will cancel it’s cover, so 2 x NO. Than we have the problem of balancing. You have to regulate the brake force according to the front breaks or your back tires will block and that you really don’t want.

    Super Caps:
    If we want to store 200 amps produced during 10 seconds at 100 v in a capacitor … ai ai ! Than we need to store 0.6 AMPs/Hour. 1 AH is 3570 Farad ! But The big caps are sold only in for example 70F at 2.1 V package. To get to 105 V you need 50 in serie. But the capacity will than be only 70/50 = 1.4 Farad . so you will need 2600 of these 50 packs to make 1F at 105 V To store our 0.6 AH we need 130,000 caps in a serie parallel network = 800000$ I hope I made a mistake somewhere but lets go for the egg cooker :)

    http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=P11349-ND

    Please contact me at my email address and join forces !

  10. Guy Says:

    Sorry I went a bit in the clouds with my calculation !

    1.4 farad / “50 pack”

    1AH is 3600 F and we need 0.6 AH so we need 2160 F

    so we need 2160F / 1.4F = 1542 “50 packs” That makes 77100 caps

    Still very impossible !

  11. daveinsingapore Says:

    hey Vasco, I got to this site from a Link in DIY Electric Car Forum and I am so glad I found your and your work. I have one favour, who is Nuno and more importantly could you share the ‘electromagnetic simulator’ programme with us so we can work on our projects at ‘DIY Electric Car Forums’, more importantly our ‘open source hub motor’ group….just asking…nothing ventured, nothing gained…and keep up the good work Vasco…I hope your second and third and fourth motor all work out better than your first….they always do for me…lol

  12. Guy Says:

    Before we do the math with the LifePo batteries, we must consider something else.
    A battery doesn’t like to be charged quickly. It is a slow chemical proses. A capacitor, when empty, can pull a very high current. It is a static electricity proses, like lightning is and we don’t say for nothing that something is “lightning fast”. The capacitor (when empty) looks to the source as a 0 ohm load. For this reason car manufacturers like GM look for ultra caps for the their EVs (like the Volt) in addition to the batteries.

    I see that for example the Li-Fe-POS4 has a max charge current of (only) 4.5A . So in order to get rid of several 100s of amps when performing an emergency stop on electric reg braking only we will again need a big quantity of batteries. Not from a AH capacity perspective, but because of the limitation in the charge current. On top of that are they only 3.3 volt and it is explicitly mentioned that they “must be cut-off at 3.8V/cell condition when charging”

    In my opinion they are not suitable at all for the task of super fast charging in Reg Braking conditions.

  13. wunigga Says:

    Hi, do uo think you could provide the “eWheelMulator” for download? I have been looking for a similar program / tool but there are no free toll that can do this.

    thank you

  14. Vasco Névoa Says:

    Sure, no problem. This software is licensed under GPLv3, so please make sure to share your enhancements with as many people as possible.
    Here is the link to the file.
    Please note that you have to change the file extension from PDF to ZIP in order to open it correctly. So, right-click on the link, choose “Save link as…” and change the extension to “.zip”.
    It is a shame, but wordpress.com does not let us upload just any kind of file, even if we buy their “extended storage” we are still limited to media types, which is pretty stupid.
    Warnings:
    1 – this is not a finished product, and has no guarantee of usefulness or fitness for a purpose – you are entirely responsible for it’s usage;
    2 – you need some kind of TCL/Tk interpreter installed in your system to run it (try this page);
    3 – you must obey the license.
    Enjoy! :)

  15. george markey (Australia) Says:

    We have designed a new engine to take a starter motor about 8″ in diameter and 2′ to 3″ thick…… I am desperately in need of someone who can solve this problem without needing the world Bank to fund it… can you help or can you advise me the best way forward….. Thanks……Geo…..

  16. Vasco Névoa Says:

    Well, Geo… when it comes to prices, my guess is as good as yours, since I haven’t actually bought anything yet.

    Your friends “down under” should be able to help you, they’ve got a super nice design, at least contact them and see if they are open for customization.

    If you don’t mind going accross the ocean, John from DMS Design is just the man to solve your problems, he knows his axial motors like any guru and specializes in custom jobs.

    That’s about it, I’m afraid. I’m not personally in the market yet.
    Good luck!


  17. Hi Vasco,

    Just ran across your site here.

    I’ve done a motor I call the Electric Hubcap. I made it to go on the outside of a car wheel. Perhaps you might be interested. Counterintuitively it seems to run best with a very wide air gap, eg 7-10 mm, so the bearing load shouldn’t be a problem.

    More torque is needed.

    The manual for making them is on my web site.

    I’ve re-done the motor controller/wiring & equipment box – just finished testing it to make sure it worked! A new/update manual for that should be on line soon.

    http://www.TurquoiseEnergy.com

    –Craig

    • Vasco Névoa Says:

      Congratulations Craig! I see you’ve managed to actually build a functioning PMS motor from scratch! Way to go! :D
      And you’re publishing everything, too. Nice!… You didn’t get distracted with peripheral considerations like I did, and you have something to show for it – that’s priceless. ;)
      If you could get someone with a little more time and love for web publishing into the project, maybe you could put up a page that’s a little more friendly to navigate? I tried to get some insight on your motor to find out why your air gap has to be large, but I kinda got lost in the middle of so much text… If you allow my comment, a bit of cleaning up and better layout and pictures would go a long way in turning your site into a real usable DIY manual. Have you considered http://www.instructables.com and other like that? You’d get the good layout without the hassle.
      Keep doing what you’re doing – we really need more inventors/DIYers on this race! :) Just be careful when going commercial, you’re not alone out there – Poulsen surely has a few patents for US & Canada…


Comment: