# PWM controller design. SG3524 and TC4420



## lazzer408 (May 18, 2008)

Has anyone tried building a controller based off the SG3524 (KA3524) pwm ic? Mouser $0.84. It has everything a motor controller would need. One error amp input (op-amp), one current sense input (op-amp), shutdown input, internal 5v regulator, and a totem pole output capable of driving a few gates. If you have many gates or use IGBT's you could add a TC4420 (6amp), TC4422 (9amp), or TC4452 (12amp) gate driver. Mouser $2.33 for the 6a. I wouldn't recomend using that driver on an igbt but it -could- work in a proper design.

I've also designed a simple open-throttle shutdown circuit, to trigger the 3524s shutdown pin, should the throttle wire break or come loose. The throttle signal itself is used to drive a throttle ramp circuit (parallel capacitor) but I used a pnp transistor parallel with the cap to quickly discharge it on quick release of the throttle. Just a capacitor alone would not be a good idea in an emergency.

I'm going to give this chip a shot on my Yamaha build and see how it works out. I'll be gutting a 1205 Curtis and putting in 200v caps and mosfets. I haven't measured the breakdown voltage on the diodes yet. I'll do that when the mosfets are out.

This controller, being installed in a motorcycle, has less margin for error then a car conversion. Some of it's system are redundant, like dual main contactors for example. I can't risk a major electrical failure resulting in a runaway condition. I'm also considering a foot opperated pedal that kicks out the fuses.

http://www.fairchildsemi.com/ds/KA/KA3524.pdf

http://ww1.microchip.com/downloads/en/DeviceDoc/21419c.pdf


----------



## Dennis (Feb 25, 2008)

A better chip for this project is the UC3638. It has two low side drivers and two open collector transistors for the high side that you will have to make the driver section for with source/sink transistors for the mosfets. But since you are probably going to use a series wound motor, then an H-bridge configuration want do much good so you just need the low side parts of the chip. This chip also has a current limiter section built in, but it only has a gain of 5 so you will need to increase the gain with an OP amp.


----------



## lazzer408 (May 18, 2008)

The UC3638 looks complicated. The 3524 does have 2 output transistors. They normally flip-flop which is good for a push-pull smps but I planed to parallel them. I have yet to see a pwm controller IC that has an output stage capable of driving dozens of gates quickly. The 3524 has a clsense comparator input. I'm not sure what the gain is.


----------



## lazzer408 (May 18, 2008)

I picked up one of these ICs this morning and had a chance to play with it. It's very simple to wire up. I'm going to use the shutdown pin for power-on and to sense if the main contactor has been activated. I'll add a brake pedal input also. Two transistors should work fine for this. One to pull the pin low (on) to turn the controller on and the other to pull it high if the main contactor is open or the brake pedal pushed to turn it off. I may have to opto-isolate the brake pedal since it's on the 12v side.

Eventually I'll have all these individual circuits compiled into a functional controller front end. It will provide 0-100% @ 6amps worth of gate drive, have multiple way's of shutdown (brake pedal disable, open main contactor disable, etc.), have adjustable low and high throttle points for calibrating the throttle pot (0-5k pot will be fine), and adjustable current limiting. The 3524s current limiting is very smooth compaired to some of the other chips I've been testing.


----------



## lazzer408 (May 18, 2008)

Still working on this but... I built this circuit on a breadboard tonight and it seems to be working fine. I haven't even thrown the scope on it yet! Some of the values may need to be adjusted. The values for the high-throttle-shutdown comparator (bottom left) haven't been selected yet until I know what that voltage needs to be. Roughly 4v I think. The PWM is 100% by ~3.5v or so to pin-2 of the 3524. When pin-10 is held high it'll shut down the pwm output. The output of the comparator (10k) drives that pin.
This circuit has a throttle trim incase your throttle doesnt sweep "exactly" from 0-2.5k. It also has a throttle ramp adjustment from almost no ramp to a few seconds to avoid jumpy starts. Releasing the throttle will bring you to 0% with no delay. It has a frequency adjust from about 10-20k and it has current detection but I may have to do some fine tuning on that. Like tie the open end of the current pot to 0v. This is working on my bench though with a 0.2-ohm shunt resistor and a treadmill motor. I can control it from 1-10 amps. The "shunt" shown in the schematic can be the controller's internal resistance. That is how Curtis does it.


----------



## lazzer408 (May 18, 2008)

I picked up a Curtis 1204 (works after pulling one bad A2 diode) and another 1205 that was completly blown. The 1205 will probably be my guinea pig for testing. To really put the 3524s current limit to the test, how about I punch it from a dead stop to 40mph on only 4 mosfets? 
I'll put the rest in later. 

I'm having some trouble finding flyback diodes. I believe the "to220 style" diodes, next to the mosfets, grab the field flyback and the stud-type diodes, off the A2 terminal, grab armature flyback.

The 1221, for example, is rated for 72-120v. It uses 50v/50a diodes on the A2 terminal and 600v/24a diodes on the power board.

Here are the data sheets for the ones used in the 1221. I'm guessing I need something along those lines.
http://www.datasheetcatalog.org/datasheet/mcc/MR2401.pdf (to220)
http://www.datasheetarchive.com/pdf/2458703.pdf (stud)


----------



## wakinyantanka (Apr 8, 2008)

Nice work on your schematic! I'm building a controller for my electric vehicle and also using 120v, although I'm going to punch it with 2120 amps when at the dragstrip.  I noticed on your design you show a (x20) at the mosfet symbol. Does this indicate how many mosfets can be driven by the tc4420? I will be using 10 high current isotop mosfets and I'm wondering if the tc4420 can deliver enough amperage to open and close them properly?
Mind you I do not fully understand as electronics are not my expertise. I do want to understand this and learn as much as I can though.





lazzer408 said:


> Still working on this but... I built this circuit on a breadboard tonight and it seems to be working fine. I haven't even thrown the scope on it yet! Some of the values may need to be adjusted. The values for the high-throttle-shutdown comparator (bottom left) haven't been selected yet until I know what that voltage needs to be. Roughly 4v I think. The PWM is 100% by ~3.5v or so to pin-2 of the 3524. When pin-10 is held high it'll shut down the pwm output. The output of the comparator (10k) drives that pin.
> This circuit has a throttle trim incase your throttle doesnt sweep "exactly" from 0-2.5k. It also has a throttle ramp adjustment from almost no ramp to a few seconds to avoid jumpy starts. Releasing the throttle will bring you to 0% with no delay. It has a frequency adjust from about 10-20k and it has current detection but I may have to do some fine tuning on that. Like tie the open end of the current pot to 0v. This is working on my bench though with a 0.2-ohm shunt resistor and a treadmill motor. I can control it from 1-10 amps. The "shunt" shown in the schematic can be the controller's internal resistance. That is how Curtis does it.


----------



## lazzer408 (May 18, 2008)

Re:

I'm not a circuit designer by trade. I just dabble in it for fun and I'm learning enough to be dangerous. x20 is the number of mosfets. I had a controller (sevcon) with 64 mosfets (to220 200v ~18amp) and it used the 8-pin dip version of the 4420 as in "no heat sink" but still a 6-amp rating. The TO220 version of the 4420 could at least be mounted to the same heatsink as the mosfets or even it's own heatsink but I doubt you'll need it. If your not sure just toss in a TC4452. 12 amps baby! To give you an example of what 12a of gate drive can do... The rise time of the 4452 is only 21ns with a 10,000pF load and 42ns into a 22,000pF load. Looks fairly linear. What's the charge time on your gates? A mosfet typically has a 2000-5000pf gate. I'm way to tired to do this math but one ns is one _billionth_ of a second. How many ns is there in one 15khz cycle? How much of that is rise time? An IRFP260 (TO247 200v, 46a .055ohm) has a delay of 23ns and a rise time of 120ns. It takes 143ns to turn it on with a 4.3ohm gate resistor and 10v of gate drive. About 2.325 amps drive for that speed. It also takes 194ns (100delay+94fall) to turn it off btw. 

Yeh I'm WAY to tired for this. Bottom line. I can't imagine it not being able to switch a dozen or more isotops. Anyways... it's plenty of power. You can drive multiple IGBTs with these drivers if you wanted. The manufacture even lists motors and solinoids as an application for it. Small motors ofcorse. 

Hopefully you own a scope. If not you will have trouble building a quality controller. The next issue is load testing it while viewing the waveform. Watch the time on and time off of the mosfets. It's during this transition that their resistance is highest. High frequencies only make that problem worse. The frequency should be high enough to maintain the field in the motor but low enough to switch on the mosfets quickly. Honestly... 1000hz is enough for these fatty series wound motors. haha

Last note and I'm off to bed. It's VERY important you place a capasitor very close to the driver IC and be sure the driver IC HAS 12 amps of power. Be smart about your trace layout to the gates as well and use a series gate resistor (2.2-10 ohm) to help gate ringing. I forgot that in the schematic. You'll see it on the scope. Use the lowest resistor you can while keeping ringing to a minimum. Ringing can by in the mhz so that blurr in the pulse might not be your scope's focus! lol


----------



## wakinyantanka (Apr 8, 2008)

Thanks for the good info. I plan on running at 18khz and read somewhere that you should cut the driver voltage by 2/3rds. Is that correct?
I do not have a scope so I would be flying in the dark. 
I also have seen a curtis 1505 small motor controller used to drive high power igbts. Do you know if this is something that could be done?
He said he simply used it as a driver board that way he had plenty of amps available for all of his to-247 igbts. Seems to me that would be the simplest route to take as then you could concentrate on the high power side, keeping it cool and making sure you had the correct capacitors.
What do you think?




lazzer408 said:


> Re:
> 
> I'm not a circuit designer by trade. I just dabble in it for fun and I'm learning enough to be dangerous. x20 is the number of mosfets. I had a controller (sevcon) with 64 mosfets (to220 200v ~18amp) and it used the 8-pin dip version of the 4420 as in "no heat sink" but still a 6-amp rating. The TO220 version of the 4420 could at least be mounted to the same heatsink as the mosfets or even it's own heatsink but I doubt you'll need it. If your not sure just toss in a TC4452. 12 amps baby! To give you an example of what 12a of gate drive can do... The rise time of the 4452 is only 21ns with a 10,000pF load and 42ns into a 22,000pF load. Looks fairly linear. What's the charge time on your gates? A mosfet typically has a 2000-5000pf gate. I'm way to tired to do this math but one ns is one _billionth_ of a second. How many ns is there in one 15khz cycle? How much of that is rise time? An IRFP260 (TO247 200v, 46a .055ohm) has a delay of 23ns and a rise time of 120ns. It takes 143ns to turn it on with a 4.3ohm gate resistor and 10v of gate drive. About 2.325 amps drive for that speed. It also takes 194ns (100delay+94fall) to turn it off btw.
> 
> ...


----------



## lazzer408 (May 18, 2008)

Well... I have 5 Curtis controllers laying around and a few control boards from some others. If I thought it was easier I'd be using them instead of building my own control circuit/driver with the 3524. =)

On another note... This is a clip of how well a 3524 can actually be controlled. Let's see a curtis do that.


----------



## wakinyantanka (Apr 8, 2008)

lazzer408 said:


> Well... I have 5 Curtis controllers laying around and a few control boards from some others. If I thought it was easier I'd be using them instead of building my own control circuit/driver with the 3524. =)
> 
> On another note... This is a clip of how well a 3524 can actually be controlled. Let's see a curtis do that.



I'm sold!!!


----------



## lazzer408 (May 18, 2008)

wakinyantanka said:


> I'm sold!!!


As was I! I had no idea injecting audio, into esentially the throttle input, would work so well. The signal on the scope is pretty noisy and this was FAR from true class-d audio amplifier but I really did nothing more then couple the speaker to the controller with decoupling network RC. After all it was supposed to be a motor controller not an audio amplifier. I was just curious.  There was only one mosfet being used and I never finished that controller.
Back then I was just learning PWM modulators and it was the first time I played with the 3524. Since then I've learned alot more about current feedback and that the 3524 can easily accept it. Let me know a little more about your design and maybe I can guide you along with some different ways to detect motor current.


----------



## wakinyantanka (Apr 8, 2008)

lazzer408 said:


> As was I! I had no idea injecting audio, into esentially the throttle input, would work so well. The signal on the scope is pretty noisy and this was FAR from true class-d audio amplifier but I really did nothing more then couple the speaker to the controller with decoupling network RC. After all it was supposed to be a motor controller not an audio amplifier. I was just curious.  There was only one mosfet being used and I never finished that controller.
> Back then I was just learning PWM modulators and it was the first time I played with the 3524. Since then I've learned alot more about current feedback and that the 3524 can easily accept it. Let me know a little more about your design and maybe I can guide you along with some different ways to detect motor current.


Well essentially I was going to use Dan's design he posted on the homemade controller thread. I know very little about dc motor control or building a schematic. I'm a quick study however and have been learning about the individual components, how they behave and all that.
I guess I would need the basics of putting them all together. The one thing I'm having trouble understanding is the correlation between capacitors on the high current supply in parallel with the batteries and the system capacity. How do you know which capacitors to use? My battery pack will be 144v system of lifepo4 batteries from my good friends at FOXX Power.  (shameless plug for the company, as they my be sponsoring my car)

http://www.datasheetcatalog.com/datasheets_pdf/S/T/E/5/STE53NA50.shtml

Link to the data sheet for the mosfets I'm using. I have 10 of them.


----------



## lazzer408 (May 18, 2008)

The rds-on for the 53na50 is .085ohm /10 is .0085ohm. I'm going to pull a number out of my arse and say 10% switching loss. .0085*10%loss=.00935 ohms. Could be more. With 2120amps, flowing thru .00935 ohms, you'll have almost 20v of drop. 20v*2120a=42,400watts of heat to dissipate. Bet you didn't figure that. 
As far as the capasitors. They provide the current peaks that the batteries would be unable to provide due to wiring inductance and things of that nature. It's better to use many smaller capasitors then it is few of a larger value. This is due to the current flowing thru their leads at high frequency. It will blow the lead right off the cap. A Sevcon controller I modded had 20 capasitors in it. I'm not sure of the value but I replaced them with 20 1500uf 200v capasitors. A simple Curtis 1205 36v controller has 19 1000uf 63v caps. I've noticed the older 1204s only had 4 5600uf 63v caps and in the newer 1204s that was changed to 15 or so 1000uf 63v caps. All the retail controllers are loaded with capasitors. Even a 24v 20a controller for a scooter has 2 1000uf caps in it. I don't know how to properly calculate exactly the value you need.
Also, If I were you I'd seriously consider lowering your switching frequency to 10,000-15,000 (or even less). This will tremendously help your switching losses. The 53na50 is a bit on the slow side.


----------



## lazzer408 (May 18, 2008)

Here's a drawing of my first proto-board layout for the control circuit. It has a comparator for open throttle detect but I need to select 2 resistors for the reference voltage divider to the comparator. It should be set to ~3v or so off a 5v rail. So about a 22k for R2 and a 33k for R4. It also has an adjustable throttle ramp as I've mentioned. Last but not least... Current limiting that works! I'm not sure if pulling the low side reference for the current input opamp is the best way of doing it but it seems to work ok that way. The TC4420 driver is also on-board to provide 6a of gate drive. Use a TC4452 for 12a.

It's still a work in progress. I'd like to wire up a small relay so I can mount a switch externally to control the current limit. I still need to add the voltage regulator for it and also a power-on input which I'd just assume switch on the supply regulator. I'm also putting in a opto-isolator so the brake light can be wired to the controller and shut down the PWM when the brake pedal is pressed.

So far so good.


----------



## wakinyantanka (Apr 8, 2008)

lazzer408 said:


> The rds-on for the 53na50 is .085ohm /10 is .0085ohm. I'm going to pull a number out of my arse and say 10% switching loss. .0085*10%loss=.00935 ohms. Could be more. With 2120amps, flowing thru .00935 ohms, you'll have almost 20v of drop. 20v*2120a=42,400watts of heat to dissipate. Bet you didn't figure that.
> As far as the capasitors. They provide the current peaks that the batteries would be unable to provide due to wiring inductance and things of that nature. It's better to use many smaller capasitors then it is few of a larger value. This is due to the current flowing thru their leads at high frequency. It will blow the lead right off the cap. A Sevcon controller I modded had 20 capasitors in it. I'm not sure of the value but I replaced them with 20 1500uf 200v capasitors. A simple Curtis 1205 36v controller has 19 1000uf 63v caps. I've noticed the older 1204s only had 4 5600uf 63v caps and in the newer 1204s that was changed to 15 or so 1000uf 63v caps. All the retail controllers are loaded with capasitors. Even a 24v 20a controller for a scooter has 2 1000uf caps in it. I don't know how to properly calculate exactly the value you need.
> Also, If I were you I'd seriously consider lowering your switching frequency to 10,000-15,000 (or even less). This will tremendously help your switching losses. The 53na50 is a bit on the slow side.


Actually I was quite aware of the amount of heat I would have to dissipate. My area of expertise is supercharged gas engines, I have built many performance motors that are blown and trust me heat is always your enemy.  I'm well equipped and well versed in removing heat from where I do not want it. 
Perhaps we should work together and combine our talents. That way we could build a couple kick @$$ controllers. I can machine the heatsinks and build the heat exchangers no problem.

Thanks for the heads up on the capacitors. I was looking at some 350v 3600uf units and using 8 of them. Probably should reconsider and go with the 200v 1000uf units.
I'd like to stay out of the audible frequency range for the controller. Can that be done at 15khz?


----------



## lazzer408 (May 18, 2008)

wakinyantanka said:


> Actually I was quite aware of the amount of heat I would have to dissipate. My area of expertise is supercharged gas engines, I have built many performance motors that are blown and trust me heat is always your enemy.  I'm well equipped and well versed in removing heat from where I do not want it.
> Perhaps we should work together and combine our talents. That way we could build a couple kick @$$ controllers. I can machine the heatsinks and build the heat exchangers no problem.
> 
> Thanks for the heads up on the capacitors. I was looking at some 350v 3600uf units and using 8 of them. Probably should reconsider and go with the 200v 1000uf units.
> I'd like to stay out of the audible frequency range for the controller. Can that be done at 15khz?


Yes 15khz is in the audiable range. Remember though, a large hunk of steel and copper makes a horrible tweeter.  Chances are you would only hear it at very light throttle. It's no where near the 1.5khz scream a 1221c Curtis puts out at light throttle. I hate those things. With your 144v battery pack... 200v caps -should- be ok. I assume 12*12v? A fully peaked off 12v battery can be as high as ~14v*12=168v. Your just 32v under the capasitors rating. I'm not sure if flyback spikes could put them over 200. The spikes shouldn't make it to the caps if your diodes hold up. It would be safer to go with 250v.

I'd love to work with someone to come up with a killer design that's affordable and _repairable._ Wouldn't it be great if a customer could order replacement powerboards and driver boards to make their own "pit repairs"? Where are you located and what is your financial interest in such a project? I can't afford development unless I had a partner to help in that area. I'd love to see a retail controller that's microcontroller bassed but I'm an analog designer. I do know a guy locally that's a wizard with microcontrollers. It's not rocket science to build a motor controller but it's quite involved to do it right. On the other hand maybe brute force would prove practical on the track.


----------



## Madmac (Mar 14, 2008)

"A simple Curtis 1205 36v controller has 19 1000uf 63v caps. I've noticed the older 1204s only had 4 5600uf 63v caps and in the newer 1204s that was changed to 15 or so 1000uf 63v caps. All the retail controllers are loaded with capacitors. Even a 24v 20a controller for a scooter has 2 1000uf caps in it. 

I don't know how to properly calculate exactly the value you need."


It is very difficult to exactly work out the value of capacitance needed. In an ideal world the caps would provide all the ripple power (AC component) and the battery the static power (DC component). Keeping the AC component away from the battery also prevents the battery warming as much during discharge.

If there was too small capacitance then the inductance of the battery cables would lead to very high voltage spikes and take out the semiconductors. To give an example V = I x sqrt [L / C] with 500Amps, 100 MFD cap and 100uH inductor gives 500 volts. (in real life the voltage would be less due to losses)

As the capacitors should supply the AC component they need to be low ESR and have a suitable ripple current. Putting a large number in parallel is a good way to increase the ripple current and decrease ESR at low cost.
ESR adds to the ripple.... 1R of ESR gives 1 volt at 1 amp 

Adding a few film capacitors can also improve the situation at cost.
In some applications just using film capacitors is needed to guarantee the reliability, film caps do not dry out.

Madmac


----------



## wakinyantanka (Apr 8, 2008)

lazzer408 said:


> Yes 15khz is in the audiable range. Remember though, a large hunk of steel and copper makes a horrible tweeter.  Chances are you would only hear it at very light throttle. It's no where near the 1.5khz scream a 1221c Curtis puts out at light throttle. I hate those things. With your 144v battery pack... 200v caps -should- be ok. I assume 12*12v? A fully peaked off 12v battery can be as high as ~14v*12=168v. Your just 32v under the capasitors rating. I'm not sure if flyback spikes could put them over 200. The spikes shouldn't make it to the caps if your diodes hold up. It would be safer to go with 250v.
> 
> I'd love to work with someone to come up with a killer design that's affordable and _repairable._ Wouldn't it be great if a customer could order replacement powerboards and driver boards to make their own "pit repairs"? Where are you located and what is your financial interest in such a project? I can't afford development unless I had a partner to help in that area. I'd love to see a retail controller that's microcontroller bassed but I'm an analog designer. I do know a guy locally that's a wizard with microcontrollers. It's not rocket science to build a motor controller but it's quite involved to do it right. On the other hand maybe brute force would prove practical on the track.



I'm using the lifepo4 modules so they are 3.7v per, so I'll actually be at 144.3v nominal.
I would be interested in building a controller for my own vehicles. These are not conversions, I'm building all composite sports cars, possibly a toned down family sedan. (For the wife)
I'm located in Westerville, Ohio
I need the microcontroller to run my instrumentation and monitor power consumption so I'm trying to learn those as well.
I've built drag cars, but never an electric one so there is a learning curve.


----------



## lazzer408 (May 18, 2008)

wakinyantanka said:


> I'm using the lifepo4 modules so they are 3.7v per, so I'll actually be at 144.3v nominal.
> I would be interested in building a controller for my own vehicles. These are not conversions, I'm building all composite sports cars, possibly a toned down family sedan. (For the wife)
> I'm located in Westerville, Ohio
> I need the microcontroller to run my instrumentation and monitor power consumption so I'm trying to learn those as well.
> I've built drag cars, but never an electric one so there is a learning curve.


Why did you choose the 53na50s over standard TO247 or TO220 package mosfets? You can get a much higher density, giving lower voltage drop, using smaller components. You can also make the finished product in a more compact enclosure and have less loss in device connections and also a cleaner signal. All this leads to less switching losses due to the lead inductance you'll have wiring up the isotops. Take a look at this controller.  There are 4 rows of TO220 devices down both sides of 2 heat spreaders. 2 rows of diodes, 2 rows of mosfets. The 200v mosfets had an RDSon of 0.13 Ohms! (they were CHEAP) Having 30 of them gave .13/30=.0043ohms. The controller was rated for 500amps a channel. It's 2 channels. I had your's figured at .0085ohms. So 30 of these cheap mosfets is ~50% less loss then the Isotops or 21,200watts less heat generated! Using a better mosfet with RDSon of say .0197ohm / 30 gets you 0.000656~ ohms. That's only 3272 watts loss for your 2000+amp demand. =) See where I'm going with this? Oh, that's also assuming your switching loss was 10%. Smaller mosfets have faster turn on/off times so the switching loss will be alot less also. Not to mention you can run higher frequency.


----------



## lazzer408 (May 18, 2008)

For those designing controllers. Here is an example of a current mirror.


----------



## wakinyantanka (Apr 8, 2008)

lazzer408 said:


> Why did you choose the 53na50s over standard TO247 or TO220 package mosfets? You can get a much higher density, giving lower voltage drop, using smaller components. You can also make the finished product in a more compact enclosure and have less loss in device connections and also a cleaner signal. All this leads to less switching losses due to the lead inductance you'll have wiring up the isotops. Take a look at this controller.  There are 4 rows of TO220 devices down both sides of 2 heat spreaders. 2 rows of diodes, 2 rows of mosfets. The 200v mosfets had an RDSon of 0.13 Ohms! (they were CHEAP) Having 30 of them gave .13/30=.0043ohms. The controller was rated for 500amps a channel. It's 2 channels. I had your's figured at .0085ohms. So 30 of these cheap mosfets is ~50% less loss then the Isotops or 21,200watts less heat generated! Using a better mosfet with RDSon of say .0197ohm / 30 gets you 0.000656~ ohms. That's only 3272 watts loss for your 2000+amp demand. =) See where I'm going with this? Oh, that's also assuming your switching loss was 10%. Smaller mosfets have faster turn on/off times so the switching loss will be alot less also. Not to mention you can run higher frequency.


Well, honestly I thought it would be easier to mount and to keep cool.
Again, I'm not a motor control guy. Very greatful for the info. I didn't spend a lot on them so I'm really not out anything if I don't use them.
It looks like you really know this stuff. How much for you to design a circuit schematic for me to follow? If your willing that is.
Like I said before I can machine the aluminum for the heatsink, set it up for liquid cooling, hell I can even build the heat exchanger and get a nice quiet low amperage pump for the coolant. Let me know.


----------



## lazzer408 (May 18, 2008)

.


wakinyantanka said:


> Well, honestly I thought it would be easier to mount and to keep cool.
> Again, I'm not a motor control guy. Very greatful for the info. I didn't spend a lot on them so I'm really not out anything if I don't use them.
> It looks like you really know this stuff. How much for you to design a circuit schematic for me to follow? If your willing that is.
> Like I said before I can machine the aluminum for the heatsink, set it up for liquid cooling, hell I can even build the heat exchanger and get a nice quiet low amperage pump for the coolant. Let me know.


If you build it right you won't need more then a fin heatsink with good airflow. If you already build performance gas engines then you know how important it is to cover every aspect of the engine's design. You can't just slap a big carb on it and expect more power. You could actually hurt the performance. I see it all the time when people throw 850cfm double pumpers on a 350. All the parts of the engine are chosen to squeeze every ounce of horsepower out of it especially with an NA build. Same goes for your controller. You want to minimize resistance in the controller itself. What good is a 1000hp engine with a pluged fuel filter? Loss in the controller is power that's not making it to the motor. That 20v drop across your mosfets means 20v less at your motor. That's almost 2 batteries worth. You can liquid cool it away but wouldn't you rather be using it?

I could design a simple analog front end for a controller. Most of that information I've already posted for free.  My electronics skills are self-taught and I wish I knew more of the math involved designing circuits. I could mathmatically calculate what size capasitors you'd need for example. There is no harm using more then you need other then expence. What we need to do is get in contact and discuss the requirements of the controller. Do you want to etch your own boards or outsource it? Do you want to buy 40 $2 mosfets or 20 $4 mosfets? It is a disposable controller or should it be service friendly? (cough curtis cough cough) Do you want to save money and just slap something together or invest in a design that could go retail? Just some things to think about. I could make a hell of a power board that would put others to shame.  There's no reason they need to be as complicated as they are.

Take microcontrollers. They only slow things down. A current overshoot, for example, has to be converted to a digital value by the a/d. When the software's code finally gets to reading the value it still has to calculate what to do with it. Then it has to calculate what changes needs to be made to the output to adjust for the condition. Granted this happens very quickly but is it quick enough? Sort of the whole CD vs. LP argument. Any audiophile will tell you how superior vinyl is.

Check your PMs. I sent you my number.


----------



## Madmac (Mar 14, 2008)

With an analog control loop it is very difficult to change the transfer function to cover all operating conditions. Take the latest standard switchmode power supplies, these are now starting to become digital as the efficiency can be optimised at all operating points, something analog cannot do at an economical price.

The control loop only has to be as fast as the switching frequency, if you are chopping at 10KHz then a DSP has 100uSecs to play around, that is over 3000 instructions for a low cost 30MHz device.

Even on digital units the current limit stays analog so it will cutout the drive on excessive current as quickly as possible.

For a DC motor control adding a micro allows easy house keeping functions, checking that it is safe, making sure motor is stationary before reversing direction, limiting current if motor or controller is too hot, controlling rate of acceleration to give economy drive mode. The main advantage is allowing easy set up of motor parameters by serial port and saving in EEPROM rather than many presets that are prone to failure.

It also allows easy changes if you discover you have a problem under some conditions after you have completed the design, at low speed you have an issue so drop switching speed (ala Curtis). Heck you can even sell it as an advanced feature.

With modern in circuit programming it is easy and low cost to add a supervisor device.... to take over the full design does require more work and a good understanding of control loop theory. To run open loop in a brute force design is an easy option. Even with digital control most of the design is still in the analog realm, dealing with fast digital pulses takes careful analog design.

Madmac


----------



## Madmac (Mar 14, 2008)

Deleted copy post.


----------



## lazzer408 (May 18, 2008)

In the time it'll take me to learn programing I'll have this built and burning rubber.


----------



## Madmac (Mar 14, 2008)

Each to there own field of expertise. Good design is using the minimum to achieve the specification.

Madmac


----------



## ngrimm (Oct 19, 2007)

Resurrecting this from the dead. Hope you don't mind if I change your name to Lazarus for this occasion. Anyway I don't know how I missed this excellent thread before. You are using the same components that I am planning. You mentioned it is better to use many small caps instead of one large one. Before reading this, I bought a couple 12000u 150v can types. Here is what I got: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=230261740249&ssPageName=STRK:MEWA:IT&ih=013

So do you think they will blow up if I try to use them ? Thank you for sharing this info with us. Norm


----------



## ElectriCar (Jun 15, 2008)

Dude, is that all there is to a DC controller??? I've built a variable voltage DC power supply much more complicated. Dang, if that's all there is to it I may take a hack at it! I'm wanting like 600-700A peak for an FB1-4001 to run my S10. It may not pull that much but I want to run it at 156V. 

I've spoken to an engineer at Advanced and he says the motor has been used at 192V with no ill effects.


----------



## ngrimm (Oct 19, 2007)

I really appreciate the way you showed how current sensing can work without needing an external shunt. That was one of the things I have been wrestling with. Also that mosfet driver really simplifies the whole operation. I am in the process of removing all the discrete components making up the mosfet driver on an old curtis controller to stick on a breadboard and play with. What a pain when one chip can do nearly all of it.


----------



## lazzer408 (May 18, 2008)

Those large caps might not be the best choice. It's a capasitors ESR (Equivalent Series Resistance) that becomes a problem especially with high currents and high frequency. Many smaller caps is a better idea. It brings the ESR way down just as parallel resistors will lower the total value.


----------



## lazzer408 (May 18, 2008)

ElectriCar said:


> Dude, is that all there is to a DC controller??? I've built a variable voltage DC power supply much more complicated. Dang, if that's all there is to it I may take a hack at it! I'm wanting like 600-700A peak for an FB1-4001 to run my S10. It may not pull that much but I want to run it at 156V.
> 
> I've spoken to an engineer at Advanced and he says the motor has been used at 192V with no ill effects.


It's simple compared to some other electronic devices. 700a peak isn't that hard. To reach your current goal you'll have to parallel enough components to handle it. The PWM and Drive side of things will remain the same.


----------



## ga2500ev (Apr 20, 2008)

I just took the time to read through this wonderful thread again. A homebrew controller is tops on my list of things to do.

Some questions and thoughts.

1) What would be the minimal power section requirements for a basic controller (say 500A 150V max rating)? I really dug lazzer's discussion about MOSFET selection. But if someone wanted to literally junkbox a controller would it be nothing more than a big IGBT module like a cm600HA-24H (1200V, 600A), a freewheeling diode, and the caps? Would a diode module like this one:

http://theelectrostore.com/shopsite_sc/store/html/diode-meo450-12da-ixys-meo-450-12-da-fred.html

Work for the freewheeler? It's rated at 450A.

2) In the digital microcontroller/analog debate my belief is that you need both to work cooperatively for a good system. The uC should be used at a high level to set the mission, while the analog/discrete components are used on the ground to make that mission work. For example somewhere on another thread (TheSGC I think) pointed out that the ADC on a PIC was too slow to measure the amperage using a shunt and current limit. It would overshoot every time. But one could easily use a uC to set the current limit, then use a comparitor to manage the cutoff.

Just some thoughts.

ga2500ev


----------



## lazzer408 (May 18, 2008)

ga2500ev said:


> I just took the time to read through this wonderful thread again. A homebrew controller is tops on my list of things to do.
> 
> Some questions and thoughts.
> 
> ...


When using IGBTs you want to look at the voltage drop across the device. Lets say your IGBT has a forward drop of 1.5v. With 500amps across it you will have 750w of heat to dissipate. As the device's junction temp rises, the forward drop will also rise creating even more heat and more forward drop ect ect until thermal run away. Don't forget to add switching losses into the mix. In other words, it will work but you MUST keep it cool. Mosfets have a lower voltage drop which is why I choose them for applications <200v. When >200v the IGBT is a better choice because a mosfets rds-on gets up there with >200v devices. IGBTs tend to be a little harder to drive as well. They do have an internal mosfet turning it on (the G in IGBT) but this is more of a parasitic device then an internal driver and the gate takes more current to turn it on and is slower compared to a mosfet.

The diode you suggested will do the job. A rough idea is a diode 4x the voltage and 1/4 the current will work. The flyback from the motor tends to be a higher voltage and lower current then forward. Say a 500a 120v pulse to the motor will have 125a and 480v comming back. The voltage drop across the diode will tell you the heat it will dissipate as well. A freewheel diode with a forward drop of .6v flowing 125a will have 75w of it's own heat you need to dissipate.

I'm not a engineer by trade and what I come up with is based on experience more then design. 

I have to run out. I'll get back to you with any more questions.


----------



## ga2500ev (Apr 20, 2008)

lazzer408 said:


> When using IGBTs you want to look at the voltage drop across the device. Lets say your IGBT has a forward drop of 1.5v. With 500amps across it you will have 750w of heat to dissipate. As the device's junction temp rises, the forward drop will also rise creating even more heat and more forward drop ect ect until thermal run away. Don't forget to add switching losses into the mix. In other words, it will work but you MUST keep it cool.


I'm well aware of the voltage drop. Actaully I'm expecting between 2-3V. 500A would only occur from a dead stop.

So if you keep it cool it'll work. Excellent.


> Mosfets have a lower voltage drop which is why I choose them for applications <200v. When >200v the IGBT is a better choice because a mosfets rds-on gets up there with >200v devices. IGBTs tend to be a little harder to drive as well. They do have an internal mosfet turning it on (the G in IGBT) but this is more of a parasitic device then an internal driver and the gate takes more current to turn it on and is slower compared to a mosfet.
> 
> The diode you suggested will do the job. A rough idea is a diode 4x the voltage and 1/4 the current will work. The flyback from the motor tends to be a higher voltage and lower current then forward. Say a 500a 120v pulse to the motor will have 125a and 480v comming back. The voltage drop across the diode will tell you the heat it will dissipate as well. A freewheel diode with a forward drop of .6v flowing 125a will have 75w of it's own heat you need to dissipate.
> 
> ...



Thanks for the quick reply. Look forward to some more info.

ga2500ev


----------



## ngrimm (Oct 19, 2007)

Would this topic qualify to be a sticky? I hate to come out and say it but it appears Lasser408 really knows his stuff. I know some others are working on microcontroller based controllers and they have a lot of merit but this diy basic controller is within the capabilities of many of us whos remaining brain cells went thru the 60s and 70s. As long as it doesn't get too filled up with ramblings from people like me.


----------



## ga2500ev (Apr 20, 2008)

I believe that microcontroller based controllers are within reach too especially if everyone don't have to write the code from scratch.

The interesting question is what I proposed in my earlier post, which is how to mate a microcontroller directed controller to analog controls.

ga2500ev


----------



## lazzer408 (May 18, 2008)

ga2500ev said:


> Thanks for the quick reply. Look forward to some more info.
> 
> ga2500ev


The only thing I have to add to your questions is about the current overshoot issue. If you know about comparators you know the output is open when the comparator is on. + higher then - on the inputs. An op-amp on the other hand can actually supply vcc on it's output when on. What the 3524 has is an opamp and comparator input. The error amp input (op-amp) is normally used for voltage feedback in push-pull smps designs. That is what this IC was originally designed for after all. I used the error amp input for the user's throttle input. Now, the output of the error amp is internally connected to the output of the current sense comparator. As long as the current comparator is on, the error amp signal is allowed to pass to the pwm comparator (located further down the rabbit hole). As the voltage builds across the current shunt, it will reach the point that causes the current comparator to switch off. About 200mv. That in tern grounds the output from the error amp and the pulse width is immediately cut back. There is a small capacitor at the current sense input to average the pulses from the shunt. What this essentially gives you is pulse-by-pulse current limiting. If any one pulse is enough to trip the current comparators input, the PWM is reduced. It's very fast. No waiting for microcode to get to that point. That is why I feel an analog design is superior to ANY digital logic. Same way a vinyl recording is superior to a CD. There's no missing information.

I have an order out to Mouser. In the next few days I'll have a working 120v controller on my Yamaha.

If everything works out ok I'll have some good news for you guys. I will most likely offer the power-side of the controller in kit form. It will be your choice to drive it via. microcontroller or analog IC. All the mosfets, diodes, capasitors, gate driver, and regulator for the gate driver will all be included. All you need to provide is a pwm signal. I'll include instructions on how to modify a $5 scooter controller to drive the power stage.

Sorry, no regen or plug braking at this time.


----------



## ElectriCar (Jun 15, 2008)

Lazzer, feel froggy enough to start a "Build your own Contoller" thread somewhere? 

I'd love to see a schematic of an entire drive, one with all the safeties, inputs, outputs etc that we need for a quality drive (controller). And an actual photo or facsimile of your mosfet to see how they're mounted to the heat sink.

Your DIY skills are pretty dang good for someone who's never had formal electronics training. I went through the US Navy electronics school in '81, the best school in the world they said at the time but I wouldn't know where to start with this thing without some help.

Thanks again.


----------



## lazzer408 (May 18, 2008)

ElectriCar said:


> Lazzer, feel froggy enough to start a "Build your own Contoller" thread somewhere?
> 
> I'd love to see a schematic of an entire drive, one with all the safeties, inputs, outputs etc that we need for a quality drive (controller). And an actual photo or facsimile of your mosfet to see how they're mounted to the heat sink.
> 
> ...


Thank you for the props. I'm like many people here. We have more ingenuity then formal training and maybe a bit too much time on our hands.  Did I mention I'm divorced? 

I don't mind posting schematics but for now it's more of a reference. I will say that someone -has- built a controller based of my schematics and it is working. I'm not sure if it's had any on-road testing yet. It works on my bench as well but like I said there hasn't been any real-world testing.

As far as the controller thread. How about a whole forum? www.diymotorcontroller.com will be up when I get around to it. I bought the domain but I haven't had time to get the forum up. This is where the kits will be offered when they are ready.


----------



## ngrimm (Oct 19, 2007)

That's good news what you're planning Lazzer (sorry for mispelling your name earlier) Are you having some circuit boards made up or is that something you are able to do yourself? Looking forward to seeing what you come up with.


----------



## lazzer408 (May 18, 2008)

ngrimm said:


> That's good news what you're planning Lazzer (sorry for mispelling your name earlier) Are you having some circuit boards made up or is that something you are able to do yourself? Looking forward to seeing what you come up with.


Jeff will do. 

I bought a laser printer to try it myself and see how it turns out. More then likely I'll have a company that's local make them. They beat internet pcb prices anyways.


----------



## ElectriCar (Jun 15, 2008)

So that's your site? Where's the paypal link???


----------



## lazzer408 (May 18, 2008)

ElectriCar said:


> So that's your site? Where's the paypal link???


Patience is a virtue.


----------



## lazzer408 (May 18, 2008)

Bwa-hahahaha


----------



## ww321q (Mar 28, 2008)

How did I miss parts of this thread ? I need to pay more attention . I just bought Richard Valentine's book "Motor Control Electronics Handbook" . I was going to build a IGBT based controller if I could but they always ended up being so complex trying to put controls on everything . I just want to do a simple controller . I don't think I need current limiting ,thermal limit and everything else that you would have to put on just in case an idiot drives my EV . lazzer408 thanks for all the good info ! And if I can't find any MOSFETs it's because you got them all ! LOL ! what , like 200 of them ? I'm going to start off at 72 volts (have a Curtis 1209) but really wanted to run 120 volts . This is a good thread along with the other earlier ones I hope to be able to build a controller J.W.


----------



## lazzer408 (May 18, 2008)

ww321q said:


> How did I miss parts of this thread ? I need to pay more attention . I just bought Richard Valentine's book "Motor Control Electronics Handbook" . I was going to build a IGBT based controller if I could but they always ended up being so complex trying to put controls on everything . I just want to do a simple controller . I don't think I need current limiting ,thermal limit and everything else that you would have to put on just in case an idiot drives my EV . lazzer408 thanks for all the good info ! And if I can't find any MOSFETs it's because you got them all ! LOL ! what , like 200 of them ? I'm going to start off at 72 volts (have a Curtis 1209) but really wanted to run 120 volts . This is a good thread along with the other earlier ones I hope to be able to build a controller J.W.


Current limiting is a MUST even for a budget controller and the 3524 makes it easy. There's a little bit of a learning curve to how this is internally accomplished by the IC. I went into it a few posts back. Thermal monitoring is fairly simple. A thermistor is used to adjust the current limit based on temperature. If you need help understanding anything then by all means post your questions and I'll try my best to help.

Those are 100 (200v) mosfets and 100 (600v) dual diodes for flyback. The combined rating of 100 of these mosfets is 6100amps. If you can keep them cool that is. I will derate them 50% for saftey and another 50% for switching loss which puts me at 1500a continous. Too bad there not all going into one controller. 

I'm not a huge fan of IGBTs in low voltage (<200v) DC motor controllers. I know you guys think those things are heaven sent with their 600a rating plus ebay surplus pricing but just hang in there. Part of my goal is to offer you an easier mosfet solution that's more efficient and 100 times easier to drive. Leave the IGBTs for AC drives and >200v controllers.

I am changing part of the design and the finished product will have a liquid cooling option for no extra cost. You can buy a pump and radiator off the sight or use your own. It's nothing more then a trans cooler anyways.


----------



## ww321q (Mar 28, 2008)

lazzer408 said:


> If you need help understanding anything then by all means post your questions and I'll try my best to help..


I think it would take more then a few questions to get an old Okie like me to "understand" LOL! When you get to a point that you think you have a working controller , I will give it a try . I guess I should start looking for mosfets and dual diodes !!!thanks again for the help you give us J.W. ps those IGBTs make good paper weights to !


----------



## lazzer408 (May 18, 2008)

ww321q said:


> I think it would take more then a few questions to get an old Okie like me to "understand" LOL! When you get to a point that you think you have a working controller , I will give it a try . I guess I should start looking for mosfets and dual diodes !!!thanks again for the help you give us J.W. ps those IGBTs make good paper weights to !


Yeh tell me about it (igbts) I have a pile of them here. If you can solder and follow instructions you can build this. A working controller? Well of corse it's working or I wouldn't be spending everything I have into developing a retail product.  It's benchtested on a smaller scale (at 120v) and it's doing exactly what I tell it to.


----------



## ww321q (Mar 28, 2008)

lazzer408 said:


> A working controller? Well of corse it's working or I wouldn't be spending everything I have into developing a retail product.


sorry ! didn't mean that as an insult or anything ! J.W.


----------



## lazzer408 (May 18, 2008)

ww321q said:


> sorry ! didn't mean that as an insult or anything ! J.W.


none taken. It was stated with a giggle you can't hear with text.


----------



## Madmac (Mar 14, 2008)

> The diode you suggested will do the job. A rough idea is a diode 4x the voltage and 1/4 the current will work. The flyback from the motor tends to be a higher voltage and lower current then forward. Say a 500a 120v pulse to the motor will have 125a and 480v comming back. The voltage drop across the diode will tell you the heat it will dissipate as well. A freewheel diode with a forward drop of .6v flowing 125a will have 75w of it's own heat you need to dissipate.


The reverse EMF thru the diode varies due to PWM ratio. The inductance of the motor supplies this current flow during the off period and the aim is to keep the current as constant as possible. The design is the same as a switch mode PSU.

Example 100 Volt motor, current 50 amps, inductance 100uH switching at 10KHz. PWM at 50% so motor 'sees' 50V drive.

Transistor drive time = 50uSec (10KHz is 100uSec)
current will increase by I=VxT/L
50 x 50uSec / 100uH = 25 Amps
During the time the motor is on the current will ramp up by 25 Amps. It started at 50 Amps so ends at 75 Amps

During the transistor off time the diode conducts, the motor voltage is the same at 50V but it is now reversed I=-V x T/L
or -50 x 50uSec / 100uH = -25 Amps.
The current thru the diode starts at 75Amps and ramps down to 50Amps

At 50% PWM the transistor and diode currents are the same. The heat dissipated depends on the losses in each. The heating of the transistor and diode needs to be worked out from the RMS current that each takes at low and high duty cycle. Remember that FETs act like resistors so pulse currents increase their RMS dissipation

Madmac.


----------



## lazzer408 (May 18, 2008)

Madmac said:


> The reverse EMF thru the diode varies due to PWM ratio. The inductance of the motor supplies this current flow during the off period and the aim is to keep the current as constant as possible. The design is the same as a switch mode PSU.
> 
> Example 100 Volt motor, current 50 amps, inductance 100uH switching at 10KHz. PWM at 50% so motor 'sees' 50V drive.
> 
> ...


My scope sings a different tune.

http://en.wikipedia.org/wiki/Lenz's_law

L=1H, 10 amps forward, you would get 1 * 10/0.01 = 1000 volts (using lenz's law).


----------



## Madmac (Mar 14, 2008)

> Lenz's Law is one consequence of the principle of conservation of energy


The energy put into the inductor during the on time flows out during the off time (recirculated by the diode). although we are not talking of cutting magnetic fields.


Have you a diode fitted?

The flyback or back EMF flows in reverse to the drive voltage so the diode conducts. In the brief time (in a poorly designed system) between the transistor switching off and the diode conducting the voltage will rise, as soon as the diode conducts and clamps the voltage (that is why it is fitted).
In a well designed system the switch off time of the transistor is tailored to the turn on time of the diode to avoid shootthru.

Not taking care to do this degrades the devices, overvolts the buffer caps and emits lots of EMC. In Europe a product that is sold (including PCB's) must meet EMC regulations, I believe the same is true in the States. Getting four times the voltage means something is not right.

Re current waveforms
If your scope is telling you different you are running in discontinuous mode and a design that may work in this mode may then fail when it runs in continuous mode ( a different motor can make all the difference).
It is poor design to say it works with one motor therefore it will work under all conditions.

Wikipedia has a good grounding on how the output switch and motor work along with the maths behind it in both discontinuous and continuous mode.

http://en.wikipedia.org/wiki/Buck_converter

View the motor as a perfect inductor (ie no resistance) in series with a perfect resistor (no inductance, the load). Spice is a good tool to model snapshots in these kind of things.

Madmac


----------



## Dennis (Feb 25, 2008)

> The energy put into the inductor during the on time flows out during the off time (recirculated by the diode). although we are not talking of cutting magnetic fields.
> 
> 
> Have you a diode fitted?
> ...


I have seen the effects of using a diode that has slower turn on time than transistor turn off time and it is ugly lol. Major voltage spikes. Ditto on everything you said.


----------



## lazzer408 (May 18, 2008)

Madmac said:


> The energy put into the inductor during the on time flows out during the off time (recirculated by the diode). although we are not talking of cutting magnetic fields.
> 
> 
> Have you a diode fitted?
> ...


I know how to design the circuit. What I'm saying is that reverse emf (without diodes) is not the same as the forward voltage. This is why boost convertors using a single inductor work. I'm sure you know this.


----------



## Madmac (Mar 14, 2008)

> I know how to design the circuit. What I'm saying is that reverse emf (without diodes) is not the same as the forward voltage. This is why boost convertors using a single inductor work. I'm sure you know this.



My comment was on current in the inductor and diode not voltage and the rating of the diode was the point I was making. To remind you



> A rough idea is a diode 4x the voltage and 1/4 the current will work.


If you go thru the maths it is obvious that the peak current in the diode is the same as the switch and the average current depends on duty cycle.


There is no point in designing something that will work for a short period then fail. The guys who have designed the current retail controllers have put a lot of work into producing designs that can be manufactured in volume with low failure rates..... and meeting all regulations.
Even then these controllers have failure modes that re-occur in small numbers. 

Madmac


----------



## lazzer408 (May 18, 2008)

What is it your trying to say? Diodes to small? Too big? Voltage to high? Too low? If you have advice I have open ears. The diodes I chose are large enough to handle the controllers rated current and fast enough to keep the spikes to a minimum. For cost reasons I'm not using shockeys. I believe these rectifiers will be fast enough. I'm not running 50khz after all. There's a HUGE gap between calculated performance and the real world. I could design this on paper until my fingers fall off and still have it explode on the race track.


----------



## Dennis (Feb 25, 2008)

Mamdac is just giving you some advice so you don't have problems on down the road. In case you did not know he is technician who designs circuits and gets paid as a professional doing it. So it's worth to listen. I am a recent EET (not an EE) graduate, but my experience is not many years. You need both to be good which he has.


----------



## lazzer408 (May 18, 2008)

Dennis said:


> Mamdac is just giving you some advice so you don't have problems on down the road. In case you did not know he is technician who designs circuits and gets paid as a professional doing it. So it's worth to listen. I am a recent EET (not an EE) graduate, but my experience is not many years. You need both to be good which he has.


That's ok. I guess I'm not getting what he's trying to tell me. I know the current in either direction is equal for the most part. Say at 50%. If there's a 500a forward pules there is a 500a pulse comming back. If I have 20 diodes to handle that they have to hold 25a each. Or less since it's 50% duty? 

For sake of argument. A 1205 Curtis has 10 diodes rated at 25a 600v each. 250a total. This was in a 400a controller. I have no idea what the mosfets are. I know they breakdown at 60v.

Datasheet for the diodes.
http://www.datasheet4u.com/download.php?id=555427

The first tests will be destructive testing. Being a toys-r-us kid I can't wait to blow it up, but for saftey sake it's probably a good idea to know what it's real world limits are and stay well below it.

ps: It's a pita finding anode-to-tab diodes.


----------



## lazzer408 (May 18, 2008)

Warning: Teaser pic post.

64,000uf if anyone's curious.


----------



## Risto80 (Aug 24, 2008)

HI

Very helpful disscusion. But, PLEASE put now the original schematic , pcb design and part list for the motor controller, I like to build it.

Thanks


----------



## causalitist (Feb 6, 2009)

I built this circuit(thanks you so much for posting), i particularily like the ramp speed adjustment! this is for a "bicycle" and a huge 148v motor running on 148v lithium polymers. 
im using a tc4422 driver,
i have 4148 diodes on each output of the chip,
timing cap(pin 7 to gnd) is .002 and timing resistor is 1.8k + a 100k pot. i get 8khz-hundreds of khz.
main cap 4" from mosfets is 500c103t250dd2b 10,000uf 250v
then there will be (2) unl4w30k-f metalized film caps + 2 860uf electrolytics directly on the fets inside the controller.
freewheel diode is (2) rurg5060

i was going to use (4) irfp4668 200v 8milliohm 130amp mosfets, but 
i want transient voltage suppressors from source to drain and there arent any that are usable at 148v but clamp under 200v... so i'm going with the best 250v mosfet i could find(much worse) FDA2712 34MILLI OHM 64amp.
then i can use 1.5ke180ca tvs

im working on the current limiting(0-50amps). i want to use current sense pins for average current limiting(adjustable).. i want to use the allegro AC5755-200 200amp hall effect current sensor(REALLY NICE COMPONENT!), NOT SURE IF IT WILL WORK, but i will try.
shutdown i want to use for a ultra fast short/overcurrent/upper limit backup current limitor. 
i will use a 0.001 ohm shunt... which will put off 50mv max.. so i need an opamp to turn 50mv into 1v (or whatever threshold there is at shutdown, sg3525 have 1v)
this is where im lost, i know the basics of op-amps, but there are so many specs. 




attached is a schematic for a old 36v 4QD controller. its beyond my level, but notice they have a 100k pot from pin 9(compensation) to ground, and the wiper going to pin1(inverted input)..

they have the drive mosfet, the regen mosfet... but then they have that bottom mosfet with a 400OHM SHUNT to ground(330ohm+100ohm) between the two is tapped to pin 4:current sense!

whats up with a 430ohm shunt? 

looks like a few milliamp flow through the shunt, it is probabily a 1/2watt resistor.. very good idea to not add resistence to the power path. but the output of this would be alot of volts to the cs pin! 

i have a feeling that the 100k pot on the comp pin is related somehow.

this is what im trying to figure out... the 100kpot, and the high resistence shunt. 


for some reason i thi







[/quote]


----------



## causalitist (Feb 6, 2009)

trying to get image bigger.


----------



## causalitist (Feb 6, 2009)

this is the circuit. 
i like the low battery cut off, i think i'll do that too.

i ran that mosfet with the high ohm shunt through LTspice and it gives off a resonable voltage. i will do this. if anyone has any comments/potential pitfalls lemme have em.

i still have no idea what the 100k pot does.. pin 9 (compensation) apparently adjusts the gain of the op amp with inverted/non inverted (pin 1,2) inputs... and a negative signal will shut down the chip.

i'm very curious.

i will post pics of my controller soon

the big motor below is what im using, once i find a 90 degree gearbox.. and this is going on a 18speed mountain bike!!! wooo hoo!


----------



## Risto80 (Aug 24, 2008)

causalitist said:


> I built this circuit(thanks you so much for posting), i particularily like the ramp speed adjustment! this is for a "bicycle" and a huge 148v motor running on 148v lithium polymers.
> im using a tc4422 driver,
> i have 4148 diodes on each output of the chip,
> timing cap(pin 7 to gnd) is .002 and timing resistor is 1.8k + a 100k pot. i get 8khz-hundreds of khz.
> ...


[/QUOTE]
Dear Sir

Please updated the schematic, and send project pictures. Can you send full schematic and full description. I can buy, I must build.

Regards,
Risto


----------



## causalitist (Feb 6, 2009)

The schematic works great as is.. 
to start 
forget the tc4420
forget the mosfet
omit the opamp on pin 10 and ground pin 10

and just ground pin 10 and for get the current limit stuff..
that transistor is a pnp.

test for a good signal .. then experiment with current sense and shutdown.
then slap a mosfet on, and figure out how to not start it on fire.

*any experts have any comments on my previous questions? i'm here because i know most of you are more advanced than me.*

this is a great circuit though.


----------



## ngrimm (Oct 19, 2007)

I am not an expert by any means but I think they are using the bottom mosfets as a current mirror for current sensing.


----------



## Risto80 (Aug 24, 2008)

Dear All

I am from Macedonia, I cant buy industrial made controller so I must make it. Can anyone send a full details project from making controller.

Regards,
Risto




causalitist said:


> this is the circuit.
> i like the low battery cut off, i think i'll do that too.
> 
> i ran that mosfet with the high ohm shunt through LTspice and it gives off a resonable voltage. i will do this. if anyone has any comments/potential pitfalls lemme have em.
> ...


----------



## causalitist (Feb 6, 2009)

whatever. this is an awesome circuit that everyone from intermediate to advanced people should be interested in. i will assume no one on this site knew the answer.


pot from pin 9 to ground with wiper to pin 1 ... adjusts the gain of the op amp that is used for "throttle" .. aka it is throttle trim, but a much better way to trim throttle for different value throttle pots than what i was doing : just putting a trimpot on the top and bottom of the actual throttle pot. 

this eliminates one of them.

it is obvious the original poster is no longer around, but i have seen this circuit all over the web. people loved this. 

i have low battery cutoff for 20,25,30,35,and 40 lithuim poly cells set up, and a little dip switch to select which battery i'm using.

at 25% battery life left, controller is set up to limit current to 1 amp
- a sort of reserve tank, but allowing you to travel as far as possible at a lower speed by limiting current.. so you can get to where your going.

i am using a tiny to-220 size 200amp Hall effect current sensor, fully adjustable from 2.5amps-50amps.. i didnt like the resistence in the ground plane the original circuit had... and i dont want a current sense resistor dissipating more than my mosfets.. (4 irfp4668 = <<2 milliOhm , 200v)

i will post the full circuit when i find a forum where there is mutual education occurring amongst a givin peer group.


----------



## Risto80 (Aug 24, 2008)

Dear All

I read all the info from the web about controllers. I star wit one project with 500 and 1kw dc motor.
Can I use this project for motor controller but using 6 mosfets with 200volts and more than 100amp per mosfet.

http://images.google.com/imgres?img...vehicle+motor+control+circuit&um=1&hl=en&sa=G

Please see the project and also can I change a voltage from 24 to 48.

Regards





Risto80 said:


> Dear All
> 
> I am from Macedonia, I cant buy industrial made controller so I must make it. Can anyone send a full details project from making controller.
> 
> ...


----------



## ga2500ev (Apr 20, 2008)

Risto,

Let's back up things a bit.

What exactly are you trying to power? What motor do you have? What batteries are available?

Also do you have access to contactors?

Lazzer's original design is just about as complete a design as you will get in an open forum. Anyone who has put up the effort to complete a design, schematic, and BOM are most likely in the business of selling controllers, not just giving everything away.

Tell us what you are trying to do, and what you have access to, and what kind of funds you have. Then maybe a plan can be developed.

ga2500ev


----------



## Risto80 (Aug 24, 2008)

Dear Friend

Thanks you for your reply.
As I mention, I am from Macedonia and cant buy DC Motor controller from Macedonia, only solution is to build my own.

I am planing to build a electric motorcycle, using 500 to 1000W dc motor. 24 or 48 volts.
I will be using 2 x 12 volt accumulators, 24ah, or 4 x 6 volts, 12ah. It depends, of the type of the motor.
Can you suggest me a project of diy dc motor controller! I need dc motor controller with supply range of 24 or 48 volts who can supply dc motor from 500 to 1000w.
So I found the design from the internet, link: http://evchallenge.swantafe.wa.edu.au/electronics.asp

and plan to add more mosfets in order to have more stable dc controller.

Please suggest me .

Regards,
Risto





ga2500ev said:


> Risto,
> 
> Let's back up things a bit.
> 
> ...


----------



## causalitist (Feb 6, 2009)

ga2500ev said:


> Risto,
> 
> Let's back up things a bit.
> 
> ...


i'm using that posted circuit, 148v, 50A max current limitied by a allegro hall effect sensor.. what do you suggest for the capacitors from source to v+ ?? right now I have two 2200uF 40 milliohm 10 ripple amp electrolytics and one 28amp ripple 30uF metallized film.. the closest is the film, 1/2" from source. the farthest is 4" .. i will have max 5feet wires 12guage to batteries. sound good?


----------



## lazzer408 (May 18, 2008)

I'll resurrect this one from the dead. 

It won't be long now and I'll have a complete PWM for you guys. It isn't 35xx based but has all the features and just as reliable if not more so.

Anyone have a machine shop that want's to donate some time and materials to help the development?


----------



## piotrsko (Dec 9, 2007)

there was a guy on Tesseracts prototype controller page that posted after me that had such a numerics machine hobby shop, But I am not sure of his payment options.


----------



## causalitist (Feb 6, 2009)

i switched to the MC33035 chip.. thats a great chip!
got some CM600HA-24H 600amp IGBT's , 

right now im just experimenting with different things.. i want it to be completely indestructible.. so im looking at:
the ins and outs of gate drive transformers.. i know how to use em.. but i know there must be more to proper selection.

i want to use a tiny isolated dc-dc converter to supply all the little stuff from the main batteries..

figuring out if i want to use a floating lowside gate driver(ir21271). or a isolated one that turns off using negative voltage.. 

the floating driver says the "float level" can adjust at 50v/nS.. which sounds like it could withstand some serious noise like i intend to make! hah

but these igbt need negative turn off volts. so i dunno.. still in school, finals next week, i need to stop actually learning and memorize some useless crap about solving RLC circuits with fourier transforms.. or i will fail! hahaa.... (funny.. classmates dont even know what "duty cycle" or "diode" means hahhahaa)


----------



## lazzer408 (May 18, 2008)

causalitist said:


> i switched to the MC33035 chip.. thats a great chip!
> got some CM600HA-24H 600amp IGBT's ,
> 
> right now im just experimenting with different things.. i want it to be completely indestructible.. so im looking at:
> ...


Are you driving IGBTs?


----------



## causalitist (Feb 6, 2009)

lazzer408 said:


> Are you driving IGBTs?


yep. picked up those 600 amp ones. right off the bat i will only be switching 50A, but i like that the main input cap requirement is tiny since these are high voltage .. and im only using 148v .. with such low amps, i prolly dont need negative BASE turn off voltage, but i would LIKE to use it so i can run this controller with 300 amps if i want.

its going to be my universal "whatever" controller hahah

i have .062" x .75" copper bar as "wire" .. hardly needed for 50amps


----------



## biscayne (May 15, 2009)

Hi, I`m new here, after I quiit tying to get a Kelly 400A piece unsuccesfully to work in my 96V system. 

I have a IR design here on my bench, with a SG3525, IR2128, pushpull consisting of a pair D44, D45VH10 (15A) to the gates, tuned on the scope.
The current detection is done on the IR IR2128- Rds of IRFBA90N20D or 4227, freewheeldiode are 600V 15A 22ns diodes. 

It`s not my first design, though I have a general queustion:
On the scope, I have a very clean gate signal, also the Vds, only on turn on and off shows a volage overshoot comming from any inductive load. (of course ther`s none with an ohm load. 
I tried RCL snubber, and all kinds of dampening, but the spikes keep having an amplitude to worry about- with a Vds max of 200V.

looking at your powerstage, you must encounter the same problem- your fets dont mind those transients? 
Those spikes are abot 1.5 times the Ds voltage at 1.5Khz, at higher freq getting worse.
Your Fets take that easily?
Do you have a photo of any mechanical buildup - especially from the powerstage?


----------



## causalitist (Feb 6, 2009)

biscayne said:


> Hi, I`m new here, after I quiit tying to get a Kelly 400A piece unsuccesfully to work in my 96V system.
> 
> I have a IR design here on my bench, with a SG3525, IR2128, pushpull consisting of a pair D44, D45VH10 (15A) to the gates, tuned on the scope.
> The current detection is done on the IR IR2128- Rds of IRFBA90N20D or 4227, freewheeldiode are 600V 15A 22ns diodes.
> ...


I was initially using 200v fets with 148volts... but thats exactly why i said forget it and switched to 1200v/600amp igbt's 

i did also make one with 250v fets.. so i have 100v to play with. and am using 1.5ke180ca TVS drain to source. 

what is the inductance and resistence of your load? curious about its time constant and therefore current fluctuation. 

how close are your main caps negative to fet source?
how close is the main caps positive to output diode positive?
how close is output diode negative to fet drain?
what is the ESR on your main caps? 

the picture shows the rough layout. you can see 4 mosfets in || with very little distance between,, the best(8 milliohm,35amp, metal film) cap is <1cm from closest source and <1" from farthest. .. output diode you can see is right behind that black cap.. very close to drain.. so that whole cap +/-, source/drain/diode loop is very small.

but like i said, i found it MUCH easier and more versitile to just build one using a HV IGBT that can take anything I dish out. but for me, the above layout worked well. that and having driver VERY close to all gates, and equal distance to each, and a 4.7Ohm for each.


----------



## asyx (Sep 11, 2009)

hi everybody! i'm adrian and i am from romania.i have an electric scooter made by me and i use a sg3525 based controller.i read all posts.a hint from me.the new irfp4668 are very good for made a good controller.because the gate of the mosfets took a few nA they really don't need a pre-driver.output of sg3525 is around 500mA so can drive a lot of fets.


----------



## lazzer408 (May 18, 2008)

asyx said:


> output of sg3525 is around 500mA so can drive a lot of fets.


Wrong. That's not enough current, sink or source, to drive very many gates. It's good for a few mosfets but not alot. Not a whole EV controller worth. How many? Too much math for me tonight.


----------



## asyx (Sep 11, 2009)

ok then.for example irfp4668 have a gate current around 100 nanoampere.i let you to do the calculation how many fets can drive with 500mA.probably for older fets is needed a higher current and more in parallel to do what new released mosfets can do.i agree to use a pre-driver when is needed specially when is used a microcontroller.best regards


----------



## lazzer408 (May 18, 2008)

asyx said:


> ok then.for example irfp4668 have a gain current around 100 nanoampere.i let you to do the calculation how many fets can drive with 500mA.probably for older fets is needed a higher current and more in parallel to do what new released mosfets can do.i agree to use a pre-driver when is needed specially when is used a microcontroller.best regards


Gain is a multiplier.

A mosfet gate has _*capacitance*_. Parallel gates will have parallel capacitance plus series resistance because you'll have a series resistor on each gate. You have to *fully charge and discharge* the gates at your switching freq. The available drive current, sink and source, will effect the turn-on delay and rise-time as well as the turn-off delay and fall-time. Maybe 500ma can keep a million mosfets turned on. Can it efficiently switch them on and off at 15k-20k? Nope.

Most of this is shown in the datasheet. They used a 2.7ohm gate resistor for testing. 10v drive signal. turnon(41)+rise(105) is already at 146ns. Turn-on delay is not really of any importance btw. It's the rise time that the mosfet is in it's linear region where most of the heat is generated. Too high a frequency without enough gate drive current and it's going to take longer to turn on = heat = magic smoke if your not carefull with your design.

Blow $200 in mosfets because you wouldn't use a $2-3 gate driver? Why risk that?

The mosfet
http://www.irf.com/product-info/datasheets/data/irfp4668pbf.pdf

The driver.
http://ww1.microchip.com/downloads/en/DeviceDoc/21420d.pdf


----------



## asyx (Sep 11, 2009)

entirely agree with you if we use a high frequency pwm(15-20khz).maybe will be a power loss between on-off.MOSFETs don't waste much power when fully on (or off) but during the transition they have a huge voltage drop.i'm not saying to not use a pre-driver, just use it when is needed.i made a controller for an electric trolley(72v-5kw) where i don't use a pre-driver.works great with no heat on fets but i use more freewheel diode because i measured nearly the double of the commutation current.i like your idea for open throttle shutdown


----------



## lazzer408 (May 18, 2008)

asyx said:


> entirely agree with you if we use a high frequency pwm(15-20khz).maybe will be a power loss between on-off.MOSFETs don't waste much power when fully on (or off) but during the transition they have a huge voltage drop.i'm not saying to not use a pre-driver, just use it when is needed.i made a controller for an electric trolley(72v-5kw) where i don't use a pre-driver.works great with no heat on fets but i use more freewheel diode because i measured nearly the double of the commutation current.i like your idea for open throttle shutdown


I assumed that since you were using the PWM as a motor controller that it would be in the 15-20k range of opperation.

Thank you but what Idea? I'll have to go back and look.  That whole PWM design has been VASTLY improved since that circuit.

EDIT - Oh yeh the little comparator.


----------



## asyx (Sep 11, 2009)

for my scooter,yes i use 15khz but for electric trolley the frequency is around 1khz.it is an annoying buzz but is good for people to hear when is moving around.how looks your final schematic?


----------



## causalitist (Feb 6, 2009)

lazzer408 said:


> Wrong. That's not enough current, sink or source, to drive very many gates. It's good for a few mosfets but not alot. Not a whole EV controller worth. How many? Too much math for me tonight.


as many as you want... as long as you don't mind them turning on in sine wave fashion and buying a heatsink with surface area equal to a football field. .. or if they can be bolted to dry ice hahahaa .. 

um.. the dry ice might be a good idea for drag racing.. im writing that down. (not the bolting part)


----------



## tinkeringgreg (Mar 27, 2008)

Did you finally give up on the 3524 or did you just improve the circuit? I am looking to build a speed control for my Honda civic with 120 volts of AGM batteries and a forklift motor. I have bread boarded your circuit and it seems to work so I am going to try building it for a first generation speed control. Thanks for your hard work and the advice that you have given to others. 

Tineringgreg


----------



## Beemer (Jun 2, 2011)

tinkeringgreg said:


> Did you finally give up on the 3524 or did you just improve the circuit? I am looking to build a speed control for my Honda civic with 120 volts of AGM batteries and a forklift motor. I have bread boarded your circuit and it seems to work so I am going to try building it for a first generation speed control. Thanks for your hard work and the advice that you have given to others.
> 
> Tineringgreg


Hi Tinkering,
I tried to gain contact to the author of this circuit from other sites via his AOL email and such but he has not come back to me.

Andy


----------



## lazzer408 (May 18, 2008)

Beemer said:


> Hi Tinkering,
> I tried to gain contact to the author of this circuit from other sites via his AOL email and such but he has not come back to me.
> 
> Andy


I'm the one who designed that circuit. I have been so busy lately I don't get alot of time to keep up with forums. Shoot me a PM anytime and I'll try to keep up to date. I recieve an email notice when I recieve a PM here.

If someone has time/money/interest (or a machine shop) get ahold of me. I've been trying to bring a very versatile controller to the DIY market but I can't afford what machine shops charge to make me one-off parts for a prototype so I can test it. =(


----------



## Beemer (Jun 2, 2011)

lazzer408 said:


> I'm the one who designed that circuit. I have been so busy lately I don't get alot of time to keep up with forums. Shoot me a PM anytime and I'll try to keep up to date. I recieve an email notice when I recieve a PM here.
> 
> If someone has time/money/interest (or a machine shop) get ahold of me. I've been trying to bring a very versatile controller to the DIY market but I can't afford what machine shops charge to make me one-off parts for a prototype so I can test it. =(


Okies, Matey, I'll try to PM you.

But to give everyone the reason why I want to build my own... Regen, mains in, so its also a charger. Attempt to build in contactor and precharge etc. and have it fit within the rear footprint of an 8" Agni motor.


----------



## NZero (Jan 30, 2010)

An awesome thread and I will give myself 3 tries to build a small IGBT controller. To me its the software side I get stuck on so putting in little things like high pedal disable, fault light driver etc are my biggest challenges. But all in good time I suppose.


----------



## Beemer (Jun 2, 2011)

NZero said:


> An awesome thread and I will give myself 3 tries to build a small IGBT controller. To me its the software side I get stuck on so putting in little things like high pedal disable, fault light driver etc are my biggest challenges. But all in good time I suppose.


I cringe at the thought of cpu's and all that EMC. That's why I like this circuit.


----------



## lazzer408 (May 18, 2008)

Beemer said:


> I cringe at the thought of cpu's and all that EMC. That's why I like this circuit.


As do I.

Hang in there guys. I'm hoping to have a -real- analog solution for you soon. 

The proto has been done for some time. I'm trying to find some investment now to get this to a finished product.


----------



## Beemer (Jun 2, 2011)

lazzer408 said:


> As do I.
> 
> Hang in there guys. I'm hoping to have a -real- analog solution for you soon.
> 
> The proto has been done for some time. I'm trying to find some investment now to get this to a finished product.


I'm sure there are people here who can help


----------

