# DIY Hybrid Brushless Motor Controller (Using a car's alternator as a motor)



## Tesseract (Sep 27, 2008)

You got a long way to go Dalardan, but at least what you want to do is possible.

It is safe to assume that most alternators will easily withstand 5-6krpm since that is the redline for most IC engines. Rule of thumb: the larger the diameter of the alternator, the lower the maximum RPM it will tolerate.

Yes, the capacitor across C1 and E2 is necessary. Vital, even. And it must be *as close as possible* to those two terminals. 

Also necessary, but which you deleted from the original schematic at irf.com, are the gate resistors. Every MOSFET (or IGBT) needs a gate resistor to set the peak current (and therefore rise/fall times) as well as to stop gate ringing and, when paralleled, to help them share current more equally.

At 300A peak current you do not want to switch faster than 100nS. 30kHz also seems a bit high and there is, frankly, no advantage in driving motors with a higher PWM frequency than 16-18kHz (but plenty of disadvantages). Power supplies, sure - the magnetics can be smaller - but unless you are building a motor from scratch you might as well make the PWM frequency as low as possible without the motor "singing" to you. Less losses, less trouble.

2 x 120A does not equal 300A. Not even close, actually, given the way most power semiconductors are unrealistically spec'd at a 25C case (and sometimes even die) temperature. Your -120N25 is a perfect example of such tomfoolery. In fact, the *leads* on the thing are only capable of carrying 75A of current, and that's only for a very brief period, I can assure you. A few more rules of thumb: keep the current in a TO-220 case under 40A, a TO-247/3P case to under 60A and avoid paralleling more than (4) devices to get the current rating you want because matching them gets to be a real pain and you have to start derating them by enough to call the whole idea of paralleling into question. Move up to a larger package, instead, like the SOT-227, Super-247, etc).

The FWD in a half-bridge is the anti-parallel diode of the "other" switch. That is, if the lower switch was on then the upper switch's anti-parallel diode will conduct the freewheeling current. Thus, it is important to choose switches that have anti-parallel diodes that are very closely matched in performance (speed/current/thermal transfer) to the switches themselves.

For this application I would strongly suggest the IR2183 over the -2110 for the simple reason the -2183 includes cross-conduction prevention. This will make your life a lot easier!

Finally, to estimate the peak current required to drive a MOSFET simply divide the Qg figure (total gate charge), given in nC, by the transition time in nS to get current in amps. E.g. - driving 120nC in 100nS requires 1.2A peak.


----------



## Dalardan (Jul 4, 2008)

Thanks a lot Tesseract, it's getting more and more interesting.

Following what you've just said, I'll be a little bit more conservative for my first try as everything might blow off in "magic smoke".

For the alternator, it's quite common to see on the internet 12000 RPM as a top speed limit (they're geared to run faster than the engine speed to provide 12V at idle). So, limiting to 10k RPM should be safe enough.

About the 300A continuous rating, I do thing it's a lot too much. As I'm looking in using a 250amp rated alternator as a motor, each phase will get something like 100amps passing through it at max torque (Am I right?). I've found an inexpensive MOSFET in a Super-247 package that should handle it. It's a IRFPS3810. This limits me to a max voltage of 100V, but that's not a big deal as I'm not trying to get the most of the motor but to build a reliable controller model that I can upgrade later if needed.

I do agree that the gate resistor is needed. On the datasheet, it's saying that the rise-time is about 240ns and the fall time 140ns. It should be OK to set the rise/fall time to 300ns (Am I right?). Therefore, because que gate charge is typically 260nC, the drive current should be 0,87A. With a gate voltage of 10V, this means the gate resistor should be 11,5 Ohms. 

About the PWM frequency, by adding all the time factors given in the datasheet, these devices should be able to work near 2 MHz, which would be useless. I do agree about the magnetic losses so setting the PWM frequency to 18khz would not be a problem. If the motor is still singing, this is adjustable in the software... (A agree that past 20khz is useless)

As for the diode, I'm less confident on my understanding of their needed ratings. I've tried to find one matching the rise/fall time, are 2 
APT30DQ100 in parallel enough for the task? 

Also, for the capacitor across C1 and E2, should they have the maximum capacitance I'm able to get or they need to be fitted with the inductance of the motor I plan on using? Also, is it there where I should parallel a bunch of electrolytic capacitors to get rid of the low frequencies and a bunch of ceramic ones to remove the higher frequencies? Put as much as I can?

Here are the datasheets of the parts I'm looking for right now :
MOSFET IRFPS3810 
MOSFET driver IR2183
Diode APT30DQ100

An for the potential alternator :
250amp chevy alternator

Dalardan


----------



## order99 (Sep 8, 2008)

This might be a stupid question, but i'm new to EV theory... 

I understand that the old-style Generators can be used as motors by simply running the process in reverse(current in=motion out)but I wasn't aware you could do that with Alternators. Are there any modifications that you need to make to the Alternator itself, or can you just grab a DC/AC Inverter and plug in? Also, are you going with AC for the advantage of Regenerative Braking, or did you just see the Alternator as a real bargain and decide to try AC?


----------



## Tesseract (Sep 27, 2008)

Dalardan - you just simply can't hard switch 100A+ at 2MHz, no matter what the Ton, Toff specs of the mosfet imply - you can only do such with resonant or soft switching techniques where either the voltage or current is sinusoidal, but not when both are square. The dI/dt reaches astronomical levels that no semiconductor can withstand. That's a whole other subject, though.

The new IRF fet you selected looks good, but notice note 6 on the datasheet: the current limitation for their Super-247 package is 105A and it is unclear if that applies at Tc=25C or 100C. Tc=25C ratings are, in a word, useless, btw.

The FWD is already built in to this FET, is avalanche rated (some level of built-in spike protection, in other words), and matches the speed of the FET fairly well. Thus, you won't get much benefit from adding an external FWD.

The rule of thumb is to set the transition time to between 0.5% and 1% of the switching period. Eg - the period at 20kHz is 50uS so aim for turning the switch on or off in 250-500nS (per transition). As the current (or, to a lesser extent, the voltage) goes down you can speed the transitions up, and vice versa.

The capacitor(s) placed as close as possible to *each* half-bridge (upper Drain to lower Source terminals) is for swamping dI/dt spikes and thus what is most important is its pulse current rating and ESR. At this power level the capacitors need to be poly film and/or large body SMT ceramic. The actual amount of capacitance is *almost irrelevant*, but anything from 0.22uF to 2.2uF is common. The electrolytic capacitors at the input to the inverter are for negating the effects of supply wiring inductance and resistance - the value needed for them does depend on the current, switching frequnecy, etc., but for a 3-phase inverter they have relatively easy jobs. A few thousand uF with a total ripple current rating of between 5-10% of the maximum load current is usually sufficient (note that this DOES NOT apply to a dc motor control - the input capacitors for that use have a brutal miserable existence).

order99 - the car alternator is basically a 3-phase synchronous ac motor with the field in the rotor. They don't make great motors, from what I understand, but they are certainly cheap and available.


----------



## Dalardan (Jul 4, 2008)

I do agree that you can't switch 100+A at 2MHz, I was just saying that for some mA, they can switch up to 2MHz, but that's a useless fact, I need only 20 kHz. 

About the package current rating, I don't know either if it's 25ºC rating or 100ºC rating. Let's assume a 75A continuous for the package. This should give me 3 phases of 75A continuous which is enough I think to power a 250A triphase AC alternator. I'll be conservative with the first tests and see if they get too hot.

About the capacitor, does the 1uF cap goes over each phase (thus needing 3 of them) or over each FET (needing 6 of them) ? On the drawing, it looks like it's only over each phase.

On the typical application drawing given with the IR2183, there are 2 capacitors that I'm not sure how to dimension them. The first one between Vcc and COM is, I think, a noise attenuator and should be something like a 100nF little cap. What about the one between Vb and Vs? I can't find precisely why it is there and how big it needs to be. 

I've modified my schematic, it should be a little bit more complete. It's for only 1 phase of the setup, I'll need three of them.


----------



## Tesseract (Sep 27, 2008)

Dalardan said:


> About the package current rating, I don't know either if it's 25ºC rating or 100ºC rating. Let's assume a 75A continuous for the package. This should give me 3 phases of 75A continuous which is enough I think to power a 250A triphase AC alternator. I'll be conservative with the first tests and see if they get too hot.


The total current produced by a 3-phase alternator is 1.73 x any one phase's current, so, each phase of your alternator will need 144A to produce full output as a motor. Not what you were expecting, I bet 



> About the capacitor, does the 1uF cap goes over each phase (thus needing 3 of them) or over each FET (needing 6 of them) ? On the drawing, it looks like it's only over each phase.


Sorry - I corrected my wording - the original and current schematic have the capacitor in the right place. I was wondering why you were asking when I thought I made the point clearly then saw that I wrote "FET" instead of "half-bridge". Big difference! 

At any rate, the attached picture shows a couple of the caps used for this purpose that were in a 480V/75A per phase rated inverter. They are not small caps. You want "MKP" or "MKT" type film capacitors for this application and as many as it takes to meet the peak current and V/uS thrown at them by the FETs... and before you ask, as an example of the last requirement, if you switch 100V in 0.25uS thats 400V/uS. "Normal" capacitors are not rated for this, capacitors for this application are.



> What about the [cap] between Vb and Vs? I can't find precisely why it is there and how big it needs to be.


That's the bootstrap capacitor - it typically needs to be about 10x Ciss; the datasheet should have something in it about dimensioning it properly, if not, search IRF.COM's app notes on high side drivers...

Now, start blowing some chit up!


----------



## Tesseract (Sep 27, 2008)

Forgot to post the picture of the snubbers caps.. attached here.


----------



## Dalardan (Jul 4, 2008)

Great, that's getting more and more precise. I've found the datasheet of the EPCOS "MKT" capacitors. On page 19, there are the dV/dt ratings. Therefore, if I want to switch 100V in 500ns, I've a dV/dt rating of 500 wich is too high for those capacitors. I would assume that placing two of them would allow a dV/dt rating twice as high, so let's aim to a rating of 1000V/us then get as many caps to handle this. About the peak current rating, I've not found it on the datasheet, is it something different than the dV/dt rating? Because I know that for a capacitor, I = C dV/dt...

About the bootstrap capacitor, i've come across a formula that can help choosing it. It's on page 5 of IRF application note 978 "HV floating MOS-gate Driver ICs". Is there a problem to oversize the bootstrap capacitor? Will it only add some milisecs to the power on stage of the controller? I calculate something near 2uF.

About the bootstrap diode, I'm thinking about a 1N4004 diode. It should handle the voltage and I don't think there will be more than 1A passing through it. Am I right?

I'll soon make a purchase for the parts and start blowing off stuff. I plan on doing first a protoboard setup of only 1 phase to test frequency switching of a 1 phase setup. I'll then see if the PWM is working well. If everything works well, I'll then make a PCB for a 1 phase setup with copper power rails and test it with a power resistor or a DC motor to see if, with a proper heatsink, nothing explode... If everything goes well, I'll then make a 3 phase PCB with a fourth output to power the rotor of the alternator including the uC to control everything. Until the 1 phase power setup works well, I'll just use a function generator to produce a PWM signal.

Hoping to start this soon!

Dalardan


----------



## Tesseract (Sep 27, 2008)

Dalardan said:


> Great, that's getting more and more precise.


Yeah, pretty soon I'm going to have to send you an invoice... 



> I've found the datasheet of the EPCOS "MKT" capacitors. On page 19, there are the dV/dt ratings. Therefore, if I want to switch 100V in 500ns, I've a dV/dt rating of 500


Nope... 500nS is 0.5uS. 100V/0.5uS = 200V/uS. The 5mm stacked capacitors are more than capable of handling that rate of rise.



> I would assume that placing two of them would allow a dV/dt rating twice as high


Nope... volts add in series, whether it's batteries, capacitors, etc... so you would need to connect the caps in series to increase the dV/dt rating.




> About the peak current rating, I've not found it on the datasheet, is it something different than the dV/dt rating? Because I know that for a capacitor, I = C dV/dt...


Clever observation - you can, indeed, figure out the "theoretical" peak current capability by rearranging the ol' capacitor equation. However, one factor not included in that equation is temperature rise from losses... that said, the dV/dt rating should factor that in to some extent. Thus, if a capacitor can withstand 800V/uS and is 2uF it should theoretically be capable of withstanding... 1600A of peak current (uS and uF cancel out). My practical experience tells me no way is that little leaded capacitor good for that amount of peak current, but whether it needs to be derated by 10x (at least this for sure) or a 100x (probably not, but it would be safe) is hard to tell.

Anyway, the rule of thumb is that the ripple current rating of the capacitors in this application should be 20% of the supply current.




> About the bootstrap capacitor, i've come across a formula that can help choosing it. It's on page 5 of IRF application note 978 "HV floating MOS-gate Driver ICs". Is there a problem to oversize the bootstrap capacitor? Will it only add some milisecs to the power on stage of the controller? I calculate something near 2uF.


Oversizing this capacitor will result in a longer startup time but will allow the IC to keep the upper FET on longer in between pulses. This is not really a concern for a 3-ph. inverter but it could be one for a DC chopper (you can't run HV driver ICs at 0% or 100% duty cycle for very long because the bootstrap capacitor runs "dry"). A longer startup time, however, could result in erratic operation of the output when all three phases are connected... probably ending in tears.




> About the bootstrap diode, I'm thinking about a 1N4004 diode. It should handle the voltage and I don't think there will be more than 1A passing through it. Am I right?


Nope, you need a *fast* diode - it will operate at the switching frequency you are using. A UF4007 is typically used here, even though the voltage is way overkill.

Your asking the right questions so you ought to be able to pull this off. Keep us posted even if all you can do is "transmute" silicon into carbon


----------



## Dalardan (Jul 4, 2008)

Ok, that's great. Thanks a lot Tesseract.

I'll be placing my order for parts this week, just need to finish my planning for the uC side. 

About the bootstrap capacitor, if I do overkill it slightly and manage in the uC to keep a "start time" longer than what's needed to charge the capacitor, it should be then safe to operate the system. 

I'll give news soon!

Dalardan


----------



## Sputnik11 (Dec 31, 2008)

Hi guys ...hope this thread is still live ...just want to ask if there is a chance of getting any info on the controller your working on...am looking to use the Alternator as a universal motor ...for me easy to come by and make , compared to other "motors" that can be pretty exspensive...looking to use in e-bikes,scooters and go-karts basicly...from what i've been able to research they are potentually quite powerful motors. 

but getting a controller for them seems to be a bit difficult, now i'm not out to produce them ...these are for our family fun and leisure, i like to build my own things and like the learning that comes with doing it.

so if you guys wouldnt mind helping me out with something to suit whats needed that would be great.

thanks Be Well

Sputnik

ps: clean green fun


----------



## Dalardan (Jul 4, 2008)

Hi Sputnik11,

I've got exams, Christmas Holidays and stuff like that those days so I did not advance a lot in this project. All the pieces there should be able to handle a normal 60A alternator up to 72 volts, I'm sure. You should be able to build a project looking like the Neurotikart with that, maybe less powerful. 

I did not make my mind yet on how to physically assemble the things to dissipate the heat easily but this will be for later. For now on, I've not worked on the programmation of the microcontroller yet. There are several interesting application notes on the Microchip website concerning sensorless synchronous drive that I'll use for my first tries. For now on, I'm waiting my credit card to be empty to buy the parts and start putting it together. 

For the controller, it's turning like 200$ for parts only (Digikey), this doesn't include the bus bars, the box, the connectors, the PCB, the wiring, the heatsink and the huge amount of thime I'll need to spend, but I should be able to get a reliable working prototype (not necesserly beautiful, but working) before I spend 500$ on it.

If you make you way in this wirld also, keep us informed, I'll be away for a week, but I'll give news after.

Dalardan


----------



## Dalardan (Jul 4, 2008)

Okay, so I've got some news.

Due to the fact I'm already overloaded with other projects right now, I've not ordered my components yet. But, I've got valuable allies : some teachers and technicians at my university are really interested to test the capabilities of using a car's alternator as a motor and should allow me to use, under their supervision, the university equipment to bench it. 

Having the bench (incorporating a dynometer to measure torque), I'll be able to fully test my controller prototype.

The project is still going on, I'll bring news later.

Dalardan


----------



## Dalardan (Jul 4, 2008)

Yesterday, this project advanced a little bit!

I've managed to tear appart a Delco-Remy alternator rated for 108A to remove the regulator and solder wires directly to the armature and the brushes. I've then put it on a test bench at school.

Because the test bench wasn't variable frequency and wad only limited to 20A per phase, I've been obliged to start it as an asynchronous motor until nominal speed then power on the rotor field to lock it there.

I've got interesting results : it spun! And by powering the rotor with a 1A current and sending 150W in the armature (~4V @ 20A per phase @ 60Hz), it wasn't possible top stop the motor by hand. Interesting results for the power capcity of those alternators.

Keeping you updated!

Dalardan


----------



## slbaker (Mar 5, 2009)

Hi, I'd like to try building one of these for an e-bike project.
Can you post the schematic and parts list with Digikey part numbers?
I can volunteer to do the PCB layout design if you need help with that.

Thanks 
Scott


----------



## Tesseract (Sep 27, 2008)

slbaker said:


> Hi, I'd like to try building one of these for an e-bike project.
> Can you post the schematic and parts list with Digikey part numbers?
> I can volunteer to do the PCB layout design if you need help with that.
> 
> ...


You can get a good head start by visiting this Microchip page:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1523


----------



## Dalardan (Jul 4, 2008)

I do agree that those application notes are very usefull as they are easy to understand and explain well the differences between all the different ways to keep the controller synchronized with the motor (sensor/ sensorless).

However, they're not aimed at designing the power stage of a several kW controller, but the information they bring over is essential as it explains the "brain" of a BLDC controller. Nice link, Tesseract.

Dalardan


----------



## Luka (Jul 31, 2009)

Hi guys, hope someone has made some progress on alternator to motor conversion.
found these clips on youtube
http://www.youtube.com/watch?v=Tu-ia7GylO0&feature=channel
http://www.youtube.com/watch?v=Bfkn7555LmQ&feature=channel


May be of interest
Luka


----------



## aonomus (Aug 18, 2009)

Hi all, first time here. I'm thinking about building a small electric cart (somewhat like the neurotikart) but using an alternator as a 'brushless' motor for the power stage cause its cheap from surplus/scrap yards.

@Dalardan: how has your project progressed? I'm extremely interested in using some sort of controller to run my alternator.

I have on my bench a CS130 alternator that has 3 phase delta windings, and I'm wondering whether a hobby brushless motor speed controller will work at least for a test. I can etch my own boards and I have a pile of IGBTs at my disposal so I might try making my own driver, but the control system is still a little beyond me, so for a while I've been waiting for someone to release an example of a sensorless BLDC that I can modify to suit my needs...


----------



## Dalardan (Jul 4, 2008)

Hum...

So far, the project is still on the "this would be a cool project" list...
I do have a modified alternator ready to try a controller on and I also have a 15A 300V BLDC motor waiting for a controller, but nothing has been done up to now. I'll see how everything goes, but this fall, me or one of my friends should take this project as a final project for a electrical engineering degree. I'll push this way.

For the controller stage, look at this application note from Microchip :
http://ww1.microchip.com/downloads/en/AppNotes/00857a.pdf

If you go on their website, they also have the source code that could be easily modified. This controller costs 4$...

Tell us if you try it! I'll tell if the project is taken this fall. 

Dalardan


----------



## aonomus (Aug 18, 2009)

The more I'm reading about sensorless feedback, the more I don't like it. Because I'm practically doing direct drive from alternator to wheels, if I want to move slowly, I would need absolute feedback to position since a low speed, back EMF would be pretty low....

Either way, I just finished drawing up the easiest part of this, the 3 phase bridge itself, the hard part would be writing the code that makes it all work.


----------



## samborambo (Aug 27, 2008)

aonomus said:


> The more I'm reading about sensorless feedback, the more I don't like it. Because I'm practically doing direct drive from alternator to wheels, if I want to move slowly, I would need absolute feedback to position since a low speed, back EMF would be pretty low....
> 
> Either way, I just finished drawing up the easiest part of this, the 3 phase bridge itself, the hard part would be writing the code that makes it all work.


Bad idea having close to the same ratio as the axles. These motors are designed for at least 10,000RPM and have very little torque. Gear the motor down to make use of the torque.

The low speed BEMF may be a problem as you say. Here's a (very theoretical) idea I've just had; on top of the DC current fed to the rotor, inject a lower amplitude, high frequency AC current also. This will be picked up on each phase winding as the rotor aligns with the stator phase windings and induce the same HF waveform back through each phase. Decouple the HF from said phase and use this for positional feedback.


----------



## aonomus (Aug 18, 2009)

I've given it more thought and for low RPM I've given up on using BEMF, instead I'll use hall effect sensors.

I found a good schematic ( http://www.rcgroups.com/forums/attachment.php?attachmentid=2545988 ) and a discussion about driving alternators as brushless motors ( http://www.rcgroups.com/forums/showthread.php?t=905411 ).

I've decided on using some mosfets I have sitting around and using IR2110 IC's for the gate drive/high side isolation. My main issue is figuring out how to use the MC33035 (and possibly in combination with the MC33039) to control RPM, while using a separate regulated current source to control the rotor field, thus slip and torque, and to tie it all together with a separate uC so that the throttle pot translates to both values changing to suit the throttle position.

Would the general algorithm be something like:

Case:
While target RPM < current RPM:
Increase torque

While target RPM > current RPM:
Decrease torque

If target RPM == current RPM:
Do nothing

I'm a little new to some of the mechanical concepts, so hopefully everyone can forgive the silly question...


----------



## samborambo (Aug 27, 2008)

aonomus said:


> I've given it more thought and for low RPM I've given up on using BEMF, instead I'll use hall effect sensors.
> 
> I found a good schematic ( http://www.rcgroups.com/forums/attachment.php?attachmentid=2545988 ) and a discussion about driving alternators as brushless motors ( http://www.rcgroups.com/forums/showthread.php?t=905411 ).
> 
> ...


Go do some reading and find out what Proportional, Integral, Derivative (PID) control is. Its the de facto standard for closed loop automated process control used in the industry.

At low speed you might be OK with open loop control. Experiment with that first.


----------



## aonomus (Aug 18, 2009)

So last night I recieved a RC brushless motor ESC in the mail, and got a alternator turning. I'm debating between creating a controller entirely from scratch that combines the brushless driver, and the rotor field current regulator, or a controller that outputs a PWM signal for any brushless ESC and also controls the rotor current.

Also, video!


----------



## globivogel (May 5, 2010)

BTW the IR2183 needs a supply voltage VCC of almost 10V;
the Inputs can be driven with 3,3V logic level.


----------

