Instructables

Homemade 100 HP Motor Controller for an Electric Car

Featured
This instructable explains how to build your own 100 HP (peak) motor controller for use in an electric car or motorcycle conversion.  It can take any voltage up to 144v, and the peak current is 500 amps.  The cost of the components is a few hundred dollars, which means you can save over $1000 by putting one together yourself.   At 144v, you can expect a top speed of around 75 MPH in a car. 
Check out  http://ecomodder.com/forum/open-revolt-open-source-dc-motor-controller.html
if you want to read about the whole story!

Experience in soldering is important.  If you want to really keep costs down, a mill is helpful, but that work can be outsourced to a local metal shop.
 
Remove these adsRemove these ads by Signing Up

Step 1: Get/Make a power board and control board.

You are going to need a control board and etched power board.  The power board needs to be at least 3 ounce copper.   Ebay is a good place to look for heavy cheap copper clad PCB.  For example:
http://cgi.ebay.com/25-shts-Copper-Clad-Laminate-FR-4-060-9-x-12-3oz-/310244821519?pt=LH_DefaultDomain_0&hash=item483c084a0f

You could print the picture from this link and somehow transfer it onto a piece of heavy blank PCB, and etch it with a dremel if you have a ver y steady hand.  The dimensions are 8"x6".  This link also has the G-code that you can use to etch with a CNC mill or you could give the G-code to a machine shop.
http://ecomodder.com/wiki/index.php/Open_ReVolt/Fab_Files

Picture 2 and 3 below is an example of an early power board I made with a Dremel.

You can get a control board from me or you can make the control board in your favorite PCB layout software using the schematic here::
http://home.cogeco.ca/~tkooistra/Cougar_Controller_Rev2C_Schematic.pdf
And here are some pictures of the PCB layers:
http://home.cogeco.ca/~tkooistra/bottom_layer_rev2C.pdf
http://home.cogeco.ca/~tkooistra/top_layer_rev2C.pdf
http://home.cogeco.ca/~tkooistra/component_layer_rev2C.pdf

A predone control board is Picture 1.

Pictures 7 and 8 are the power board top and bottom.  The 8 solder spots are just where vias were added.

Once you have the 2 boards, you can go to step 2. 

Step 2: Drill your metals and isolation strips

DSCF7956.JPG
DSCF7959.JPG
DSCF7949.JPG
Materials:
1/4" x 3/4" x 12" C110 copper bar.
Two 3/16" x 3/4" x 10" C110 copper bars.
3/4" x 1.5" x 8" aluminum bar.
3/8" x 8" x 11" aluminum plate.
3/16" x 3/4" x 8" steel bar.
Two 1/16" x 3/4" x 8" unclad FR4 used in making PCB.
1/16" x 6" x 8" unclad FR4 board.

5/16" drill bit (or 3/8" drill bit if you need slop)
1/8" drill bit.
3/16" drill bit. (Must allow a #6 screw to fit through)
Drill. 
Drill Press.

Do all the drilling!  It may help to take the big aluminum bar to a machine shop, since it's not easy drilling through 1.5" of aluminum accurately.   See all the pictures below for notes on hole locations and drill bit sizes.

Here's a video on how the power section pieces all get bolted together, without the electronics attached, just so you can see how it all fits:

Step 4: Solder the control board

Materials:
45 or 60 watt soldering iron.
0.032" diameter (or so) rosin core solder


This step takes about 3 or 4 hours.  It's very unforgiving.  If you have never soldered before, you should get help with this.  The ground plane doesn't have "thermals", so it takes some heat to melt the solder to it.  Check out this help file for soldering the control board.  See pages 2 through 19:
http://www.paulandsabrinasevstuff.com/EVstuff%20info/Kit%20Assembly%20Directions%20Updated%20March%204,%202010.pdf

Watch for solder bridges (when big globs of solder bridge isolation gaps).  Also, you may want to socket the ATMega168.  You can program the ATMega168 in-system.  So, you can solder it in, and then program it if you want to.  Or you can get one preprogrammed.

This video walks you through soldering the control board from start to finish:

Step 5: Program the ATMega168 Microcontroller

Once the ATMega168 arrives with all the other stuff, you need to program it with the motor controller code.  Either make your own code, or use/modify the code below.  

You can make a very cheap ATMega168 programmer, or buy an AVRISP MK2:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Cat=2621880&k=avrisp

And download the free AVR Studio development environment:
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725

The hex file of the code is available here.  Use "coug-unified-16k.hex":
http://www.adambrunette.com/firmware/cougar-v1.11b/hexfiles-m168/

Here's the code:
http://ecomodder.com/wiki/index.php/Open_ReVolt/Software

The fuse bits are Extended High Low = F8 DC F7.  But if you are using Ponyprog, the fuse bits are 08 DC F7.

If you don't want to bother to program it yourself, then you can buy a preprogrammed one.

Step 6: Assemble the Power Section

DSCF4147.JPG
DSCF4146.JPG
There are quite a few parts to this process.  The short version is, you need to bolt together all of metal parts, and solder the 10 MOSFETs, 10 freewheel diodes, 16 large electrolytic capacitors, and 3 snubber capacitors to the power board.   Please see pictures below and the assembly help file, pages 20 through 43 for all the gory details.  You will need a 200 or 250w soldering gun:
http://www.paulandsabrinasevstuff.com/EVstuff%20info/Kit%20Assembly%20Directions%20Updated%20March%204,%202010.pdf


Step 8: Drive Away!!!

Picture of Drive Away!!!
This is me driving with my car at 72v.  Notice that this one had all 3 copper bus bars coming out the same way.  That doesn't affect the functionality of the controller.


And here's a video of Joe in Phoenix using that same controller at 144v:
And here's Ben Nelson, the guy on here that made the plug-in hybrid, doing a gravel burnout with his.  He's always had a flair for the dramatic:


Now go out and build one!  Doing it yourself can save you over $1000.
1-40 of 58Next »
afbcom3 years ago
Hey,

Just a thought, you could eliminate a lot of voltage spike issues by mounting the controller as close to the motor as possible. Any time the length of the wire between the motor controller exceeds the diameter of the wire, the collapse current becomes significant. Since Vpeak = di/dt, and you have a peak current of ~500 amps, if your switching time is <1ms which I'm guessing it is, this will result in a spike of 500 000 volts! These voltage spikes can damage the control circuitry. This is assuming that you are having voltage spike issues to begin with. Regardless it is typically a good idea to mount the power control board as close as possible to the motor.

-alex
MPaulHolmes (author)  afbcom3 years ago
I've done some voltage spike tests, and at 500amp, the spikes are about 20 or 25v, so it's not too bad. I'm using 200v components, so at 144v, I'm still a fair distance away from danger. The nice thing is, under heavy current, the battery pack voltage sags, so the net result is that the voltage spikes are about 20 or 25v above like 135v in the worst case.

To clarify - 500KV spikes are real but only open loop, where the input impedance is very high. You are are clamping the spikes to 25V with your protection circuit.

Cool!

Not that I doubt you, but where are you measuring the spikes. The ones that I am referring to is the reverse against the driving fets from the motor and supply cables to it. If you're getting results around 25 volts then you have done a damm good engineering job and kudos to you sir.

--alex

ps awesome response time
MPaulHolmes (author)  afbcom3 years ago
Hi afbcom! I measured the voltage spikes from drain to source of the mosfets. Every time the mosfet turns off, the voltage from drain to source goes from nearly zero to full pack voltage, and it wants to keep going past pack voltage. I also use some polypropylene metal film capacitors to help snub the spikes. My friend in Phoenix has a video of the spikes on his oscilloscope. I'll find it. When I tested it in my car, I just used a peak voltage detector (like a crab trap. but instead of crabs, it traps electrons. haha):
I can't see exactly where you're connecting your measurement probe, but it is necessary to connect both the probe and the ground as closely as possible to the place you're actually measuring, because inductance is playing a huge part in what you're dealing with, and even an inch of wire can have an effect. The voltage spikes are a danger inside the MOSFETs so thats where the probe should be.

Another issue is that the voltage spikes are a result of firing into a reactive load, which is more like a motor prevented from spinning. A freewheeling motor (which I heard) will not cause inductive kickback as much as if you lock the parking brake and do it, you should try that.

A wise teacher of mine who makes giant stepper-motor controllers (and Aerco pre-amps) says that the key to protecting your fets is a combination of small and large diodes (they have different properties) and resistor-capacitor snubbers and most importantly, MOV (Metal Oxide Varistors) which are your first line of defense.

But i definitely know that the spikes are worst when the motor is stalled.
In the EV community, we use freewheeling diodes to take care of all the inductive kickback from the motor. Ususally rated at LEAST the same as the switching device. My IGBT controller(inspired by Paul's MOSFET controller) will be built for 1200 amps, with 1200 amps of freewheeling diodes, AND be run at 750 amps. Should last a while XD

It's my senior project for college. Great excuse to rip around campus with a less than legal electric car!
MPaulHolmes (author)  jerkey3 years ago
I didn't make that video. It was actually my beta tester. I've done testing with a locked rotor, and the spikes were around 25v, at least with my peak detector, which was a diode and capacitor. electrons could get in and not back out. That was the crab trap I was referring to above. A locked rotor has almost no resistance, so the current is huge, and the voltage spike is di/dt*L_stray, so a larger change in current definitely gives a larger voltage spike. The nice thing is, there may be optimal ways of doing things, but his controller has run for over a year and a half in sometimes 110 degree weather and it's still going strong, and that was not withstanding my crappy assembly process, since it was the first or 2nd one I put together.
This just goes to that what you read in a textbook doesn't necessarily apply to the real world! Nice scope. There are commercial products that aren't as well designed as yours... friggin cool!
You could also include a TVS diode to protect against the spikes if they are too large
MPaulHolmes (author)  killersquirel113 years ago
Hi Killersquirel11! Great minds think alike! haha. I'm using the P6KE20A-T transient voltage suppressor. Nothing goes over 20v from gate to source, and gate to source is rated for up to 30v, so it's kept safe.
"Any time the length of the wire between the motor controller exceeds the diameter of the wire"

I'm pretty sure every wire I've ever used was longer than it's diameter.
megapix afbcom3 years ago
Just a little correction on the math for the voltage spike. The voltage is V = L * di/dt where L is the inductance of the wire. For a couple of feet of wire this could be around 1uH (microHenry = 10e-6). So for a 1mSec switching time you would have 0.5V, and for a 1uSec switching time you would have a 500V spike. So it is worth being careful about, but not as severe as your calculation.
afbcom megapix3 years ago
thankyou for the correction. Now that I think about it, 500kvolt is a bit large sounding eh?
mihnea19702 years ago
Hi,
I can not download the schematics for the control board. Please help.
kairala1 year ago
hi,
i am from india, want to build electric car as well as a bike.
for electric bike - requires a 36v controller circuit diagram with components specified.
for electric car- i was not able to download circuit diagram of 144v-500amps controller version.
so i hereby request to help me for the above project.
email id- kairala27@rediffmail.com
kairala1 year ago
hi, i am from india. want to build electric car as well as a bike.
for electric bike i require 36v controller circuit diagram with components specification.
for electric car i was not able to download the circuit diagram of 144v-500amp version.
so i request to help me for the above.
thanking you.
What is the price for one 144Volt 500Amp already built. Ready to use.
My email address is anriocarver@yahoo.com
I leave in Mauritius.

Does this work for all ev conversions under 144 volts?
MPaulHolmes (author)  jimmerforpoy2 years ago
Yes.
As a follow-up, Is it possible to "scale down" the design if I'm never getting near the 144V/500A power requirements? Do I just use fewer mosfets and caps?
Nav2 years ago
Okay so I am a novice in all things electric car, but I'm wondering if throwing 4 of these controllers into a car with 4 forklift motors somehow connected to the axle would result in a 400HP car? I'm sure it doesn't work like that but could someone please explain the pros/cons of this to me? Thanks and awesome instructable!
MPaulHolmes (author)  Nav2 years ago
Yes you could.
DieCastoms2 years ago
Ok, so.. I have what used to be a small-sized 3-wheeled 24-volt "Mobility Scooter". I am building a large RC vehicle out of it.

I need a motor controller for 24 volts that will run the thing either from a wired throttle or eventually a servo output from an RC receiver OR an actual servo mechanically coupled to a pot that is wired to the controller (This should give perfectly isolated power from the vehicle's 24 volt system and the RC's 6 volt system, yes?)

I WANT to have the option to run it via RC or to be able to plug in a wired controller because the vehicle will be large enough to sit on when complete.

Can someone please suggest a source for such a controller? I DO NOT have the original controller from the Mobility Scooter, or I would gladly just use it. I know I could buy another controller for the chair or a similar model, but I would like to see what else gets suggested, first.

Thank You!

DieCastoms.
abdellah3092 years ago
good job Paul, can you post the schemetic of Mosfet stage.
I'm working on electic car project in Algeria.
Many thanks,
epuneet2 years ago
Is this circuit work for lower power ratings i.e. for 20 Hp motor
bertzie2 years ago
What kind of modifications would need to be done to make it take 170v 2000amp?
IT BITz3 years ago
COOL
I have a 36v forklift motor, I was wondering if this would suffice for a electric car?
MPaulHolmes (author)  Donotmatthews3 years ago
Probably! If it weighs at least 60 pounds, and has a 1 hour rating on the name plate of at least 100 amps it should work fine. The voltage rating is almost meaningless.
How many quadrants is this thing ?

Steve
MPaulHolmes (author)  steveastrouk3 years ago
I don't know what that means. All I know is that it's for a DC motor. There's a single PWM. Reverse happens by putting the car in reverse, and you go forward by putting the car in 1st, 2nd, ...
Hi,
A quadrant is the measure of motoring and generating, in forward and reverse.

1st quadrant. is motoring forward, 2nd quadrant is motoring backwards, 3rd is generating backwards, and 4th is generating forwards.

You can implement 1st and 2nd quadrant with a relay, you can't do 3 and 4th without a full bridge.

So essentially, can you do regenerative braking ?

Steve
MPaulHolmes (author)  steveastrouk3 years ago
It's intended to just run series wound DC, which I think usually has problems with regenerative braking, since the brushes are usually advanced, so I didn't make it to do regenerative braking.
By "advanced", do you mean the brushes are angled onto the comm. ?

Steve
MPaulHolmes (author)  steveastrouk3 years ago
No, there are different sorts of brush timing. neutral mean forward and reverse can be done basically the same, and I think regen is easier then. When you physically move the brushes more one way or the other around the rotor, it helps to reduce arcing and lets you run at a higher voltage, but then you can't run the motor very well in both directions, and you can't do regen.
Thanks for that briefing. Traction motors are not my usual area of expertise - I usually work with precision servo motors, with very low inertias, gold commutators etc !
bumsugger3 years ago
What an absolutely stunning project.............I'm blow away by the ingenuity of it all despite not being into all the "save the planet c*ap" thats floating around at the moment.My one reservation is that,with these electric vehicles all being so bloody silent,just what wattage of horn do you need,'specially if'n youve a motorcycle,lighter and faster than a car,and how do you know that you're not going to "flatten" the battery with all the horn tooting?
There are off the shelf very low power consumption "noise makers" that can make an electric vehicle sound like anything you want. Tesla uses it on their cars.
Lets not let small things like that derail a movement to the right direction
1-40 of 58Next »