Sunday, September 12, 2010
Great success!
I have determined why my mosfets were failing and found a solution.
Thanks to the friendly people over at ecomodder.com.
Permalink to my forum thread: http://ecomodder.com/forum/showthread.php/why-my-homebrew-controller-blowing-mosfets-solved-13805-2.html#post183057
There's a fair bit of detail covering a few weeks of work on the project there. Pretty pictures of my oscilloscope, too.
The reason my mosfets were failing was a large voltage spike on the drain (M- buss bar) causing a high voltage V_DS across the fet. This particular fet (IRLS4030-7PPBF) has a breakdown V_DS (aka V_(BR)DSS) of 100V. Now some sources I have read say this may not kill the fet. Since it seems to be the direct cause, I tend to disagree.
To reiterate, the failure mode is a direct short across drain and source. Once, the gate also shorted to the other two blowing the mosfet driver in turn.
The voltage spike is simply caused by V = L * di/dt. The inductance should be fairly low; the circuit is built with heavy wires and huge buss bars. As it turns out though, you need only a small inductance to generate huge voltages when large currents are involved.
Historically I have been switching 380 amps in 30ns to 50ns, or 12.6A/ns to 7.6A/ns.
I have read that a good buss bar system will have 10nH per inch of bar. Even with just one inch of bar I would get a spike of (12.6A/ns*10nH) = 126V.
To reduce the voltage spike, the answer is simple - reduce dt - by slowing down the mosfet switching.
I put a 100ohm pot between the mosfet driver and the mosfet's gate. Using an oscilloscope to watch the fall time of the drain terminal I could see exactly how fast the mosfet was turning on.
(Turning on the mosfet shorts M- to B- thus powering the motor. This is why the drain terminal falls when the mosfet turns on)
I tuned the pot to get a falltime of 200ns. This gives a di/dt of 1.9A/ns.
It is important to note that I needed to perform this tuning with the starter motor connected! Remember before, turning the controller on with the starter connected would fry the mosfet. I needed to be able to make tiny tiny pulses of power to the motor, so I replaced the microcontroller software with a test program! Instead of outputting PWM to the mosfet, I drove the line high, performed 'x' "nop" opcodes to make a short delay, and drove the line low again, then going to an infinite while loop with the line held low.
This allowed me to pulse the motor, and ensure I was not going to hit a spike high enough to fry the fet.
The initial experiments were only microseconds long, not even enough time for the motor current to be established - preventing me from getting the full brunt of di/dt since the current was too small :)
Eventually I worked my way slowly increasing 'x' for longer pulses of power, all the way to 6 milliseconds. The motor would rotate slightly with this long of a pulse, so I then tried 6ms on, 6ms off, 6ms on again. Long story short, I verified that no pulse would (probably) fry the mosfet, so I reprogrammed my motor controller application to the uC.
Lo and behold, the motor worked first try! At 20% duty cycle the motor begins to turn, and it runs merrily all the way up to full speed at 100%, screaming like a fury :)
At this point I still have only one mosfet installed, which will provide 120A continuous. However the fet is capable of handling much higher currents as long as the duration is short. That's why I'm able to start a motor that draws 380A under locked-rotor conditions (i.e. starting from stationary) When it is turning full speed only draws 70A. The fet would fry and probably explode if I actually locked the rotor before turning the power on. Now I need to add the remaining parts - two mosfets and one diode.
The B+ and M- rails were noticably warmer after running the starter for 30 seconds or so. I'll have to watch for overheating and possibly add forced air :(
Thanks to the friendly people over at ecomodder.com.
Permalink to my forum thread: http://ecomodder.com/forum/showthread.php/why-my-homebrew-controller-blowing-mosfets-solved-13805-2.html#post183057
There's a fair bit of detail covering a few weeks of work on the project there. Pretty pictures of my oscilloscope, too.
The reason my mosfets were failing was a large voltage spike on the drain (M- buss bar) causing a high voltage V_DS across the fet. This particular fet (IRLS4030-7PPBF) has a breakdown V_DS (aka V_(BR)DSS) of 100V. Now some sources I have read say this may not kill the fet. Since it seems to be the direct cause, I tend to disagree.
To reiterate, the failure mode is a direct short across drain and source. Once, the gate also shorted to the other two blowing the mosfet driver in turn.
The voltage spike is simply caused by V = L * di/dt. The inductance should be fairly low; the circuit is built with heavy wires and huge buss bars. As it turns out though, you need only a small inductance to generate huge voltages when large currents are involved.
Historically I have been switching 380 amps in 30ns to 50ns, or 12.6A/ns to 7.6A/ns.
I have read that a good buss bar system will have 10nH per inch of bar. Even with just one inch of bar I would get a spike of (12.6A/ns*10nH) = 126V.
To reduce the voltage spike, the answer is simple - reduce dt - by slowing down the mosfet switching.
I put a 100ohm pot between the mosfet driver and the mosfet's gate. Using an oscilloscope to watch the fall time of the drain terminal I could see exactly how fast the mosfet was turning on.
(Turning on the mosfet shorts M- to B- thus powering the motor. This is why the drain terminal falls when the mosfet turns on)
I tuned the pot to get a falltime of 200ns. This gives a di/dt of 1.9A/ns.
It is important to note that I needed to perform this tuning with the starter motor connected! Remember before, turning the controller on with the starter connected would fry the mosfet. I needed to be able to make tiny tiny pulses of power to the motor, so I replaced the microcontroller software with a test program! Instead of outputting PWM to the mosfet, I drove the line high, performed 'x' "nop" opcodes to make a short delay, and drove the line low again, then going to an infinite while loop with the line held low.
This allowed me to pulse the motor, and ensure I was not going to hit a spike high enough to fry the fet.
The initial experiments were only microseconds long, not even enough time for the motor current to be established - preventing me from getting the full brunt of di/dt since the current was too small :)
Eventually I worked my way slowly increasing 'x' for longer pulses of power, all the way to 6 milliseconds. The motor would rotate slightly with this long of a pulse, so I then tried 6ms on, 6ms off, 6ms on again. Long story short, I verified that no pulse would (probably) fry the mosfet, so I reprogrammed my motor controller application to the uC.
Lo and behold, the motor worked first try! At 20% duty cycle the motor begins to turn, and it runs merrily all the way up to full speed at 100%, screaming like a fury :)
At this point I still have only one mosfet installed, which will provide 120A continuous. However the fet is capable of handling much higher currents as long as the duration is short. That's why I'm able to start a motor that draws 380A under locked-rotor conditions (i.e. starting from stationary) When it is turning full speed only draws 70A. The fet would fry and probably explode if I actually locked the rotor before turning the power on. Now I need to add the remaining parts - two mosfets and one diode.
The B+ and M- rails were noticably warmer after running the starter for 30 seconds or so. I'll have to watch for overheating and possibly add forced air :(
Friday, July 9, 2010
Controller Part 6
My apologies for leaving the blog for so long. I've spent some time at the summer cottage with family and might be spending some more.
I have had some minor successes but regular failures with the mosfet in the controller.
I decided to turn to the community for help because I no longer have any ideas on how to proceed.
So far they have been helpful in confirming my suspicions and I'm hoping their expertise will lead me to a solution.
No point in rewriting things in two places, so for now look here for updates:
http://ecomodder.com/forum/showthread.php/why-my-homebrew-controller-blowing-mosfets-13805.html
I will return to the blog once the mosfet problem has been resolved. :)
Catch you on the flipside
I have had some minor successes but regular failures with the mosfet in the controller.
I decided to turn to the community for help because I no longer have any ideas on how to proceed.
So far they have been helpful in confirming my suspicions and I'm hoping their expertise will lead me to a solution.
No point in rewriting things in two places, so for now look here for updates:
http://ecomodder.com/forum/showthread.php/why-my-homebrew-controller-blowing-mosfets-13805.html
I will return to the blog once the mosfet problem has been resolved. :)
Catch you on the flipside
Thursday, June 17, 2010
Controller Part 5
Made my #6 cables today and attached the copper pipe terminals I made earlier.
This is starting to scare me just a little! It's a tiny battery though, as batteries go I guess. . .
Colour scheme: red is positive, black is negative, and white is M-, which is pulled to ground by the mosfet.
Below are the results: two blown mosfet drivers :(
I blew the first one. I replaced it, thinking the driver was the only thing broken.
The driver output looked weird, so I pulled off the connection to the gate lead.
A short time later, it turned cherry red and cracked open.
Thankfully I had moved the e-stop to be the driver's power supply (the wall wart) after the first driver went, and I had to run around the table to shut it off - not fun at all.
Very strange that this driver blew with no real load on it, just picofarads of wire. Perhaps it was weakened by the abuse of driving a shorted mosfet for some time before hand :P
So further troubleshooting shows that there is no resistance between any of the three leads of the mosfet. Lesson learned: Videotape the oscilloscope, to see what the heck happens!
Since I wasn't watching the scope, I didn't see the failure. The starter motor spun up quickly, then slowed down over several seconds. A few seconds after it stopped turning, the driver let it's smoke out.
Either the inductance of the starter is causing spikes on the drain that are not being absorbed by the freewheeling diode, or my gate input has large spikes which directly fried the gate insulation.
Usually mosfets fail short gate-drain, but I haven't heard of them failing short across all the terminals before!
I graduate tomorrow! Yay! I was hoping to have something useful to show off to my classmates, but such is life.
One last thing: that silver epoxy I used? totally useless. It couldn't even hold the components down, and certainly not maintain an electrical connection. I scraped it off, and soldered the components down with real solder and a blowtorch. Now I get to do it again, to remove the mosfet, sigh.
Wednesday, June 16, 2010
Controller Part 4
I had a busy day today on the project. I made up a single sided PCB to hold my controller capacitors.
3 x 10mF 63V electrolytic capacitors. Quite a bit of capacitance for such a small volume.
3 x 4.7uF 200V metallized polypropylene capacitors, with a low ESR and more importantly a high ripple current rating. One of the three is not installed, it's on my driver board for the moment (see a previous entry).
Making the traces for this board was a huge pain. I don't have PCB etchant, or PCB tinning solution. I tried cutting out traces with a box cutter, but they didn't peel off the PCB well, and heating the thin strip with an iron didn't release the strip as nicely as it does to small pads (when you don't want it to!)
So I resorted to using a small grinding wheel in the drill press. I then tried tinning the board with my iron. Even my trusty Weller isn't up to soldering pads this big.. so I used a blow torch. This board can't repel firepower of that magnitude! (hehe Admiral Ackbar)
Flux for copper pipes worked well in allowing the solder to flow, I got all sorts of nasty fingerprints on this board that not even alcohol could remove. (the triple distilled kind, not the isopropyl kind lol)
And as you can see in the first picture I tinned the buss bars as well. Just the top where the components will be mounted. I used a *lot* of propane today.
Today I also used my "silver epoxy" to mount one diode and one mosfet to the buss bars. That epoxy is remarkably hard to work with, it does not flow - at all. Nasty looking joints but they should be solid. The capacitor PCB is also epoxied to the buss bars, though that looks respectable.
The kapton tape is under the Gate lead (there are 5 source leads) and I wired that to the mosfet driver from before. The 'scope trace is below.
10ns rise and fall times with this mosfet is pretty respectable, I was expecting a lot more. And this is with haphazardly strung wires that are waay too long.
Rehashing my dV/dt calculation from before, we have 12V rise in 10 billionths of a second.
12/10 billionths = 1.2 billion volts per second (1,200,000,000 V/s)
I recently realized that I lost a few zeroes last time, whoops!
Testing:
Safety note: When you have large capacitors in a circuit like this controller, you have to remember that it now poses a safety risk even when unplugged from the power source. Currently this is 12V, so it is totally safe. Even with wet fingers it's not going to do much to you. In the end it will be a 48V controller, which is apparently still safe to touch (according to a random person in telecom I read on the internet - take with a grain of salt). But if you are working on a 60V+ system, it is a recipe for death.
I precharged the controller with some wire wound resistors I bought for the 48V system.
3 x 125 ohm 13W resistors. So in parallel, that's 41.2 ohms, 39W.
Power dissipation at 48V is V^2 / R or 48*48/41.2 = 55.9W
Yes, they are undersized, but this is a very intermittent load. I could have gotten away with a smaller wattage rating but I've read a great way to test is running your motor with the precharge resistors *not* bypassed as you would in typical use. This limits the maximum current to a sane value. They may be too small to work in this application, we shall see.
So I attached the small test motor to the buss bars, and it worked first try! yay!
One thing I noticed immediately was that the motor squealed much more than with the junky mosfet. I am still not sure why. I've changed from Phase Correct PWM , 10 bit to the 8 bit equivalent. So I have 256 duty cycle options now, at 16kHz (rather than 1024 at 4kHz). I can still hear it, but it is extremely faint.
The best news so far: The copper buss bars haven't heated up at all (that my fingers are capable of resolving, anyways).
To do:
Interface current sensor
Make leads for the starter motor and battery
Speed control a starter motor!!!!!
Friday, June 11, 2010
Controller Part 3
Here's a mockup of my controller layout. In all these pictures I only have 1 transistor unpackaged since I don't want to ESD damage them! A quarter shown is for scale. The blue box on the buss bar is the LEM current sensor (hall effect).
And here is the real thing, mounted with 5/16" bolts near the cable attachment points and a pair of 3/16" bolts at the far end. My copper was too short so I kept extra space by using smaller bolts :P
I've left the bolts longer than necessary until I pin down the final arrangement. Measure a thousand times, cut once!
Here it is with components placed for reference. Note only one diode's leads are bent correctly. From another angle:
So the biggest problem I see is one of heat dissipation, apparently copper is very bad at it. I didn't really grasp that until I felt >100°C copper. Very cool with your hand nearby, very painful to actually touch. So these heat sinks I have may be invaluable. Instead of the placement in the picture, I am debating putting them between the copper and acrylic, then making slits in the acrylic to place an 80mm fan underneath to help dissipate heat. Perhaps I should buy other heatsinks, these are slightly too tall to fit, and would require a lot of bending. Anyways I plan on testing it out, seeing how hot the bars get, and going from there.
Next steps:
1. Epoxy one diode and one mosfet to the bars, after using copper pipe flux to clean them.
2. Mount a capacitor bank. This will ride a piece of copper clad, extending out from the 3/16" bolts, mechanically connected to all three bars (electrically only between the outer two).
3. Connect the driver circuit to the mosfet and test with the tiny motor.
Shopping on the cheap
Today my Dad and I went to an old place that him and his dad went 20 years ago.
Called Triple-M Services
http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=triple+m+near+canfield+ontario&sll=41.504464,-81.070862&sspn=1.308199,2.158813&ie=UTF8&hq=triple+m&hnear=Canfield,+Haldimand-Norfolk+Regional+Municipality,+Ontario,+Canada&ll=42.994949,-79.759369&spn=0.019963,0.050082&z=15&iwloc=A
it's a scrap yard for all sorts of interesting things. Lots of big stuff (2000 pounds and up) and small stuff too. 20 acres of scrap; everything under the sun.
In the end, I didn't walk away with very much. What I did get though was a very good deal.
Yes ladies and gentlemen, that is 3/0 gauge cable, aka 000. Tables of ampacity indicate this stuff is rated for 260A continuous. My motor is only 80A continuous, so I'm well in the clear.
Called Triple-M Services
http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=triple+m+near+canfield+ontario&sll=41.504464,-81.070862&sspn=1.308199,2.158813&ie=UTF8&hq=triple+m&hnear=Canfield,+Haldimand-Norfolk+Regional+Municipality,+Ontario,+Canada&ll=42.994949,-79.759369&spn=0.019963,0.050082&z=15&iwloc=A
it's a scrap yard for all sorts of interesting things. Lots of big stuff (2000 pounds and up) and small stuff too. 20 acres of scrap; everything under the sun.
In the end, I didn't walk away with very much. What I did get though was a very good deal.
Yes ladies and gentlemen, that is 3/0 gauge cable, aka 000. Tables of ampacity indicate this stuff is rated for 260A continuous. My motor is only 80A continuous, so I'm well in the clear.
This was my other great steal! It's from an industrial panel, manufactured by AB. Looks like a DPDT switch though I haven't verified that with my meter. Yay safety! Still need a contactor to make the e-stop useful, but I needed it anyways.
Now you ask, what did this heavy cable and handsome e-stop cost?
Twenty five dollars. I nearly fell over! I'd have paid $40 to this guy without blinking.
Maybe I don't know what reasonable prices are?? Anyways, I was happy with the deal :)
Readers: Where do you get your surplus supplies?
Thoughts on Application Engineers
An aside:
In my dealings with application engineers in the workplace, they are almost guaranteed to be very helpful and generous with their time. However, when doing a project on your own, it is much more difficult to get assistance from them.
I found some really cool chips from Texas Instruments that would have changed the design of the controller significantly. It was a predictive chip for driving synchronous rectifiers, allowing me to get rid of the freewheeling diodes. I called up TI to find out what I could do to drive a mosfet with a larger gate capacitance than the chip was rated for; a simple enough request. Even a 'not possible' would have sufficed. I spent about 15 minutes on the phone; first on hold, then giving them information on my problem. Two days later I get a form response
"Due to an increased number of inquiries, we would like to inform you that we are unable to provide technical or application support to meet your need at this time"
I read this as "we value your business - since you don't have a business, we don't value you".
That really spoke to me. A company decides that they are going to blatantly ignore a student in electrical engineering. (I haven't walked across the stage yet so I think it's still fair to call me a student)
I mean, what does TI expect? That I will never get a job, and never have to make part selection decisions?
It may not happen, true. But if it does, and I have two equally suited chips - TI's and someone else's, who do you think I will pick? Yes, the cheaper one. Sigh. If I had a choice though, any choice at all, I would not use a TI chip.
Perhaps that is a little harsh of me, but I feel a really strong backhand when someone tells me to shove off in a form letter email.
I also asked Microsemi for some help on the freewheel diodes that I am choosing. Not only did they respond, but I had a very pleasant back-and-forth email conversation with *one* application engineer (better than re-explaining yourself every time!) for about 7 emails each. They were all short, and probably took about half an hour of the man's time, total. And the goodwill they generated!
In short: Thank you Microsemi for being a sensible company, and helping me out with my project.
TI - you should remember what I said to Microsemi. Who are your future customers but students?
TI you should re-examine your long term business model about student relations.
I would gladly welcome feedback and/or comments from both Microsemi and Texas Instuments in regards to what was said here.
To the reader: What companies have you dealt with with great application support? (Preferably not workplace experiences)
In my dealings with application engineers in the workplace, they are almost guaranteed to be very helpful and generous with their time. However, when doing a project on your own, it is much more difficult to get assistance from them.
I found some really cool chips from Texas Instruments that would have changed the design of the controller significantly. It was a predictive chip for driving synchronous rectifiers, allowing me to get rid of the freewheeling diodes. I called up TI to find out what I could do to drive a mosfet with a larger gate capacitance than the chip was rated for; a simple enough request. Even a 'not possible' would have sufficed. I spent about 15 minutes on the phone; first on hold, then giving them information on my problem. Two days later I get a form response
"Due to an increased number of inquiries, we would like to inform you that we are unable to provide technical or application support to meet your need at this time"
I read this as "we value your business - since you don't have a business, we don't value you".
That really spoke to me. A company decides that they are going to blatantly ignore a student in electrical engineering. (I haven't walked across the stage yet so I think it's still fair to call me a student)
I mean, what does TI expect? That I will never get a job, and never have to make part selection decisions?
It may not happen, true. But if it does, and I have two equally suited chips - TI's and someone else's, who do you think I will pick? Yes, the cheaper one. Sigh. If I had a choice though, any choice at all, I would not use a TI chip.
Perhaps that is a little harsh of me, but I feel a really strong backhand when someone tells me to shove off in a form letter email.
I also asked Microsemi for some help on the freewheel diodes that I am choosing. Not only did they respond, but I had a very pleasant back-and-forth email conversation with *one* application engineer (better than re-explaining yourself every time!) for about 7 emails each. They were all short, and probably took about half an hour of the man's time, total. And the goodwill they generated!
In short: Thank you Microsemi for being a sensible company, and helping me out with my project.
TI - you should remember what I said to Microsemi. Who are your future customers but students?
TI you should re-examine your long term business model about student relations.
I would gladly welcome feedback and/or comments from both Microsemi and Texas Instuments in regards to what was said here.
To the reader: What companies have you dealt with with great application support? (Preferably not workplace experiences)
Tuesday, June 8, 2010
Controller Part 2 Continued
Testing the mosfet driver (Micrel MIC4420 6A noninverting driver)
As you can see the MIC4420 is an SOIC-8 part, meaning I need an adapter to DIP; unfortunately the device pitch is too small to solder directly to perfboard. You could also do this dead-bug style, but that is time consuming and worst of all, is probably going to cause inductance issues.
This may look unassuming, but trust me, it is a BEAST! It is rated to drive 2500pf in 12 nanoseconds (ns).
Which is good, because the big transistors I will be driving have (at worst) 140nc of gate charge
Since C = Q/V => C = 140nc/12V = 11.66nF = 11660pf. Yes, that is a lot of gate capacitance for a mosfet.
For risetime comparisons, the 20mA outputs of the AtMega16 I'm using takes about 5 microseconds (5000ns) to charge 100nF.
In the above picture you see one of the giant film capacitors as a 12V bypass cap. The MIC4420 datasheet calls for three bypass caps. Two are 0.1uF directly across each Vss and ground. Due to the high currents, the MIC4420 has two Vss pins, two ground pins, and two output pins. One 4.7uF cap is also across Vss and ground. I don't have a picture, but the supply voltage was sagging from 12V down to 4V. That's right, 8V of sag from *one* switching event, lasting only nanoseconds, but long enough to slow down the switching (not enough drive anymore). So I thew the big cap across it, and the voltage sag is gone. Millivolts, anyways. God those film caps are crazy. When you hook it up to 12V to charge it for the first time, it actually throws a spark. From 12V. DC. From a wall-wart of all things. With a car battery and a piece of wire, sure. From a wall wart and a capacitor? Who knew. . .
I am using the small motor and small mosfet to test the MIC4420, and to learn about it.
In the picture below you see the yellow line as the input to the MIC4420 driver rising from 0 to 5V. The blue line is the output of the driver, rising from 0 to 12V in only 14ns!
There is a problem with this incredible risetime, however. It is called dV/dt, or the change in voltage with respect to time. If the output rises 12V in 14ns, we see dV/dt is 857,000 V/s (Volts per second).
This causes the output wire to be an antenna. An AMAZINGLY good antenna, in fact.
At low speeds, the motor would act strangely, and I saw on my scope a kind of digital ringing after a rise on the input, lasting for several microseconds. This would cause the motor to speed up erratically.
Touching the wires changed the effect! Suddenly I realized what was happening. In the next picture, you see the solution. The black wire taped to the desk is the output of the MIC4420, connected to the gate of the mosfet. I had to put a loop in the wire! (the taping to the table is just to maintain the loop, its orientation is unimportant.
What was happening, was that the input would rise, causing the output to rise. The input would fall again so soon (due to low PWM duty) that the EM waves emitted from the output travelled through the air to the input wire, causing the wire's voltage to increase, turning on the driver again, etc etc.
Pretty amazing, huh?
About the final design, the mosfets are much larger, and thus the risetime will be much slower. This should reduce dV/dt, so hopefully it is not as much of a concern.
Controller Part 2
(as you can see I don't like dealing with insurance companies, hence the lack of Insurance Part 2 lol)
My Digikey order arrived today! I absolutely love 1 day shipping. Going to post some pics of the unboxing; wow are those diodes HUGE! Also on the block: homemade wire terminals out of copper pipe.
Well if anyone asks what $220 of electronics buys, the answer is.. not much.
To be fair, the roll of Kapton tape to the left is $25 or so, which would be another nicely sized pile.
Without further ado, here is the main event:
*insert crowd oohs and aahs here*
Three things surprised me here.
1. Those diodes are MASSIVE! Probably twice the size I expected.
2. Those transistors are TINY! About half the size I expected. I mean, look how small the contacts are!! And they can carry 190A?!? (Remember, that spec from the datasheet, I_D_max at 25°C is kinda bogus, that is with some super heatsinking to keep the case at 25° while at full load.)
3. Those film capacitors (red) are very very light. I dropped one (I have been dropping everything today) and I immediately lost it. It turns out it bounced and ended up about eight feet from where I dropped it straight down. Weird. Also the red carpet and low lighting didn't help in finding it.
So here are the wire terminals I made from some copper pipe; the last of which is at the top of the pic.
These four will connect the starter motor cables and the battery cables to the buss bars.
Here is the starter motor again, with the fifth terminal attached. What you see is called the solenoid; it serves two purposes. One is to be an electrical relay for the starter (which can pull way more current than your ignition switch could ever dream of handling) and the other is to drive the starter's gear against the flywheel of your engine.
On the left you will see the gear recessed into the starter housing, this is the idle position. When starting, the gear is pushed out by the solenoid and the starter turns the flywheel. Once your car starts, the gear is forced back into the housing, not by the solenoid, but by the flywheel which is now spinning faster than the starter. If this didn't happen, the starter motor would be overrevved and probably explode from centrifugal force.
Anyways the main point of the pic was actually to show the mounting of the last terminal, the ground of the starter motor. Cars are designed such that the positive side of the battery is routed by cables to their destinations, while the negative side is connected to the frame of the car. The bolt hole I am using is actually how the starter is mounted to the engine block. Works perfect!
This kind of stuff I like to scrounge from junk we have lying around, which sure brings the cost down. Terminals like the ones I show here are about $6 apiece from Canadian Tire, so I made $36 of parts from about a foot of scrap copper pipe, worth about $2 if you had to buy it. Plus about 3 hours of labour, including cleaning mouse nest and droppings from the drill press. God I hate those buggers. If you had a clean shop you could do it in 30 minutes, tops.
Anyways, enough writing, time to play!
First step is to hook up my mosfet drivers, throw it on the scope and see what kind of risetime I can get :)
Sunday, June 6, 2010
Controller Part 1
Note: If a picture is cut off, just click to enlarge :)
My slightly small workbench, with the beginnings of my motor controller on it.
Items of note:
My brand-spanking-new DSO oscilloscope - Rigol DS1052E
Weller WD 1 Soldering station - my baby! (top left)
Atmel STK500 dev kit with an AtMega8 (centre, green)
Breadboard with LCD screen and rotary encoder (centre bottom)
Breadboard with small ~2A motor and PWM control MOSFETs (bottom left)
Kit 'o' Parts (right)
Copper Buss Bar (large, centre middle)
Every motor controller has to start somewhere; I decided to try and start mine with... a motor!
Okay that's *partially* a lie... a year ago I experimented with PWM control of LED brightness. Coincidentally, the breadboard in the middle was that project, I kinda just stole the PWM output, hehe.
The motor is slightly hidden, from the bottom left heading right, you see two oscilloscope probes reading the PWM input and motor RPM, the third object is an old-school clamp, holding the shiny motor to the table.
In typical motor controller style, I'm using an N-channel mosfet as a low-side controller of the motor. The motor has flyback diodes attached in antiparallel to allow the inductive currents to continue flowing.
Even with such a small motor, the flyback diode is quite useful. With the PWM duty cycle set low (motor has about 3V across it, rated 12VDC), we get a voltage spike at the transistor of about 10V. Adding the diodes drops the spike to a volt or two - unsurprising, because these are 1n4148s - small signal diodes, not really intended for this purpose. I picked them because they're the only fast recovery diodes I had lying around. (I used 3 in parallel because they are rated for only 200mA)
My mosfet driving circuitry is pretty garbage right now. The problem is that the power mosfets I have in my kit are standard (i.e. not logic level) so I need >10V to turn them on fully, which the microcontroller won't do. Since I am not comfortable with BJTs, I'm using one NMOS as the driver for another. The uC drives the gate of the NMOS, its drain is pulled up strongly (500ohms) to 12V, and is used as the gate input of the second NMOS. This allows Rds_on to be low enough for the transistor to survive, though it still heats up enough to burn you even after I added the TO-220 heatsink (see first o-scope probe, above)
This is my new o-scope (yay!) showing
a) The motor speed on the top (1 pulse per rotation)
b) The PWM signal (the input to the main NMOS low-side driver) on the bottom.
The measurements indicate that at 1.6% pwm duty, the motor is spinning at ~39Hz.
Below is part of the next phase of the controller project. I am going to move up from a small 2A brushed DC motor to a car starter motor! Out of a Sunfire I believe. $35 at the auto wreckers, can't complain too loudly. These babies can pull hundreds of amps when loaded with a car engine, but under no-load (i.e. on the floor) they should pull 30 to 50A. I know this because I've watched a video of another guy making a motor controller, goes by the screen name of JackBauer. Thanks Jack :)
In my hand you see some fairly beefy cable, it's 6AWG (6 gauge). Should be about 4 times the area (per conductor) as household wiring. It will do nicely for the starter motor connections. It may be a bit overkill, but I'd rather not have to worry about shoddy wiring catching fire. For the real deal I'll need to get a hold of some 0AWG or even 00.
The last random object in the photo is a piece of copper water pipe. I'm going to use it to make connectors for my 6AWG wire by cutting, flattening soldering and drilling. Sure I could buy them for $5 or so apiece but who has money for that?
On the right you see my entire work area. Yes, it is messy. Yes, that is bad. Is it going to change? Unlikely. Such is life. Also, besides the 6 full outlets on the wall, one of those is actually a power bar going to more equipment! Kids, don't try this at home. I know that the devices plugged in will draw less than 15A so I'm not at a risk of overload. If I had 8 hair driers instead, it would be a different story.
Lastly, I have my Digikey order that is going out tomorrow, with what I think I will need to pull this controller off. On it, there is $50 of capacitors (*faints*) $23 for 4 transistors, and $27 for 3 diodes.
Of course that seems ridiculous, but when you realize that 3 of these mosfets in parallel can sink 390A, and 3 of these diodes in parallel can do 360A, you realize why they cost what they do.
As a piece of trivia, the electrical 'service' for your entire house is guaranteed to be 200A or less. Yeah, 3 little transistors, switching twice the maximum current draw of an entire house. Of course this motor controller is switching DC while your house is AC and thus the comparison is moot, but I'm just trying to communicate this is a lot of current!
The real motor I plan on controlling is rated for 350A intermittent at 48V - 22 electrical horsepower (which has more kick than a gas engine horsepower)
Monday, May 24, 2010
Legality and Road-worthiness
Since one of the aims of the project is for it to be road-worthy, I decided that would be where I would start. No point in making something and finding out later you can’t drive it anywhere.
The main question for me was “How do I want to classify my Kart?” Since I live in Ontario, there were three main options presented to me: a Neighbourhood Electric Vehicle (NEV), an Off Road Vehicle (ATV), or a full-fledged Car.
Certainly the easiest to certify would have been an ATV but there are two problems. It forces design constraints – there must be handlebar steering, and the speed on roads is limited - 20km/h in a 50km/h zone, and 50 in an 80 zone. Worst of all (to me), you are forced to make the seat the type you straddle, it cannot be a bucket seat.
NEVs were a good option as they imposed fewer design constraints, though they are also limited to 40km/h on the road.
My goal is to go fast. Again, speed being secondary to acceleration but I want some kind of reasonable tradeoff here. 80km/h would make me satisfied. Therefore I decided to pursue the most difficult option – to make it a completely road-legal vehicle.
My journey started at the local licensing office (where they issue plates). The very nice gentleman at the counter was interested in my proposal, and called higher up to find out the legality of building your own vehicle from scratch. He suspected it would not be permitted; apparently Ontario is very strict about importing vehicles from other provinces, since they are concerned about the build quality.
To our surprise, the list of requirements is quite short, and not particularly onerous. To receive a VIN number and license plates in Ontario for a vehicle that you built from scratch, you need:
• A copy of every receipt for every major component of the vehicle.
• An Affidavit you write, which contains:
o Your name
o Statements of where all major components were purchased from (supplier + location)
o A statement which includes “I completed this vehicle.”
• The Affidavit must be stamped at City Hall for a $10 fee.
• A regular safety inspection by a licensed mechanic.
• Insurance
So, the difficulties will lie in passing a safety inspection, and perhaps worst of all, finding an insurance company that will insure you. My brother-in-law Matt is a mechanic; I have no doubt he will be instrumental in designing my Kart to pass safety inspections. I feel I should probably have a different mechanic perform the safety, to avoid conflict of interest issues which could be bad for Matt in case of an accident.
The current insurance company for my real car is TD Meloche Monnex, and they were very adamant that they refuse to insure a vehicle that has been “customized” excessively; building your own vehicle being a flat no. The next company that I ask, I will be very clear that I only want liability insurance, I can’t imagine trying to find out the “value” of this Kart to get collision insurance.
Insurance to be continued once I try other companies…
The main question for me was “How do I want to classify my Kart?” Since I live in Ontario, there were three main options presented to me: a Neighbourhood Electric Vehicle (NEV), an Off Road Vehicle (ATV), or a full-fledged Car.
Certainly the easiest to certify would have been an ATV but there are two problems. It forces design constraints – there must be handlebar steering, and the speed on roads is limited - 20km/h in a 50km/h zone, and 50 in an 80 zone. Worst of all (to me), you are forced to make the seat the type you straddle, it cannot be a bucket seat.
NEVs were a good option as they imposed fewer design constraints, though they are also limited to 40km/h on the road.
My goal is to go fast. Again, speed being secondary to acceleration but I want some kind of reasonable tradeoff here. 80km/h would make me satisfied. Therefore I decided to pursue the most difficult option – to make it a completely road-legal vehicle.
My journey started at the local licensing office (where they issue plates). The very nice gentleman at the counter was interested in my proposal, and called higher up to find out the legality of building your own vehicle from scratch. He suspected it would not be permitted; apparently Ontario is very strict about importing vehicles from other provinces, since they are concerned about the build quality.
To our surprise, the list of requirements is quite short, and not particularly onerous. To receive a VIN number and license plates in Ontario for a vehicle that you built from scratch, you need:
• A copy of every receipt for every major component of the vehicle.
• An Affidavit you write, which contains:
o Your name
o Statements of where all major components were purchased from (supplier + location)
o A statement which includes “I completed this vehicle.”
• The Affidavit must be stamped at City Hall for a $10 fee.
• A regular safety inspection by a licensed mechanic.
• Insurance
So, the difficulties will lie in passing a safety inspection, and perhaps worst of all, finding an insurance company that will insure you. My brother-in-law Matt is a mechanic; I have no doubt he will be instrumental in designing my Kart to pass safety inspections. I feel I should probably have a different mechanic perform the safety, to avoid conflict of interest issues which could be bad for Matt in case of an accident.
The current insurance company for my real car is TD Meloche Monnex, and they were very adamant that they refuse to insure a vehicle that has been “customized” excessively; building your own vehicle being a flat no. The next company that I ask, I will be very clear that I only want liability insurance, I can’t imagine trying to find out the “value” of this Kart to get collision insurance.
Insurance to be continued once I try other companies…
My Background
My name is William Gibson. I have been dreaming of building a Kart since I was 16 or so. Now that I have graduated from the University of Waterloo (Ontario, Canada) with a BASc in Electrical Engineering, I think it’s time to put my skills to the test.
I also have a relatively strong hands-on background from growing up on a family farm – my parents owned and operated a greenhouse business for 30 years.
From fixing everything in the greenhouses I am good-to-proficient in:
• Welding
• Plumbing
o Natural Gas and water piping
o PVC/ABS
o No experience with copper pipe soldering
• Electrical work
o 110/220 VAC
o Low voltage – environment control systems
• Carpentry (perhaps not applicable here)
I’ve also done some hobby electrical work with microcontrollers, so that will help with battery monitoring and controller design.
Therefore I feel that I am qualified to make the attempt. Also being out of school with lots of time on my hands gives me a great opportunity to live out a dream I have had for a long time.
I also have a relatively strong hands-on background from growing up on a family farm – my parents owned and operated a greenhouse business for 30 years.
From fixing everything in the greenhouses I am good-to-proficient in:
• Welding
• Plumbing
o Natural Gas and water piping
o PVC/ABS
o No experience with copper pipe soldering
• Electrical work
o 110/220 VAC
o Low voltage – environment control systems
• Carpentry (perhaps not applicable here)
I’ve also done some hobby electrical work with microcontrollers, so that will help with battery monitoring and controller design.
Therefore I feel that I am qualified to make the attempt. Also being out of school with lots of time on my hands gives me a great opportunity to live out a dream I have had for a long time.
Introduction
This is to document my progress on the road to building a Go Kart.
There has been much dispute over what terminology I should use, as I’m not exactly building a Go Kart, a Dune Buggy, or a Sandrail. It seems a little pointless to me, I'm just going to call it a Kart
I have always imagined a gas powered Kart because as a kid it seemed more powerful than an electric Kart could ever be (I'm not sure I even *dreamed* of using electricity). Now that I understand electric motors I see that really what I want in a Kart – acceleration rather than top speed – is best achieved with an electric motor. Specifically a series-wound DC motor which provides nearly unlimited torque at low RPMs - until you provide enough current to melt the windings that is.
The goal of this project is to do as much of the work as I can, buying as little as possible. This also helps save my budget, as I’m no longer a broke student – I’m a broke ex-student! Well maybe not broke, but if I blew $1000 on a frame and transmission, etc., I certainly would be.
I plan to buy a DC series wound motor, batteries of some kind (probably AGM), steel tubing for a frame, and disk brake for the rear axle. A nice seat and 5-point safety harness also seem like a good idea.
Typically people will buy a motor controller, but as an electrical engineering graduate I feel that would be in poor taste. Besides, I think it would look great on a resume to say that I designed a high-power functional controller for my Kart – they are very difficult to make!
There has been much dispute over what terminology I should use, as I’m not exactly building a Go Kart, a Dune Buggy, or a Sandrail. It seems a little pointless to me, I'm just going to call it a Kart
I have always imagined a gas powered Kart because as a kid it seemed more powerful than an electric Kart could ever be (I'm not sure I even *dreamed* of using electricity). Now that I understand electric motors I see that really what I want in a Kart – acceleration rather than top speed – is best achieved with an electric motor. Specifically a series-wound DC motor which provides nearly unlimited torque at low RPMs - until you provide enough current to melt the windings that is.
The goal of this project is to do as much of the work as I can, buying as little as possible. This also helps save my budget, as I’m no longer a broke student – I’m a broke ex-student! Well maybe not broke, but if I blew $1000 on a frame and transmission, etc., I certainly would be.
I plan to buy a DC series wound motor, batteries of some kind (probably AGM), steel tubing for a frame, and disk brake for the rear axle. A nice seat and 5-point safety harness also seem like a good idea.
Typically people will buy a motor controller, but as an electrical engineering graduate I feel that would be in poor taste. Besides, I think it would look great on a resume to say that I designed a high-power functional controller for my Kart – they are very difficult to make!
Abstract
The goal is to build a one-person four-wheeled electric “fun machine” from scratch, with enough torque to worry about ripping itself apart, light enough for great acceleration, and road legal so I have places to drive it.
I want the vehicle to be a good mix of on-road and off-road capabilities. I know that means it won’t perform excellent in either use, but I think a more varied vehicle will allow for more entertainment. I guess we will find out!
Initial feelings for the vehicle:
Series wound DC motor (~6hp continuous, ~30hp intermittent. 36V at 350A peak)
Motor controller designed and built by me
About 7’ long by 5’ wide
Square tubing for main frame, round for finish and roll-cage
8 to 10” dia wheels
Solid rear axle driven by a synchronous belt; single disk brake
Spring suspension on front; no rear suspension (hard-tail)
Welcome to my blog; I can't promise anything about the Kart except that I am going to have fun!
I want the vehicle to be a good mix of on-road and off-road capabilities. I know that means it won’t perform excellent in either use, but I think a more varied vehicle will allow for more entertainment. I guess we will find out!
Initial feelings for the vehicle:
Series wound DC motor (~6hp continuous, ~30hp intermittent. 36V at 350A peak)
Motor controller designed and built by me
About 7’ long by 5’ wide
Square tubing for main frame, round for finish and roll-cage
8 to 10” dia wheels
Solid rear axle driven by a synchronous belt; single disk brake
Spring suspension on front; no rear suspension (hard-tail)
Welcome to my blog; I can't promise anything about the Kart except that I am going to have fun!
Subscribe to:
Posts (Atom)