PWM driver via. MCU

Bruce Bowling bbowling at earthlink.net
Sun Apr 8 21:31:56 GMT 2001



> When you're driving an inductive load that also stores mechanical
> energy, you need to be careful about when and how you measure the
> current. The peak current is easy enough to measure as it's due to
> non-switching voltage. The hold-current is another matter;
> expecially when you're switching at about 15kHz. It's perhaps only
> feasible to sample and hold the sense voltage immediately prior to
> each driver switch-off as the current would tend to rise rapidly to
> that peak as determined by the injector's inductance.
>

True indeed! And if you run higher PWM frequencies, it is pretty difficult to accurately
sense the current and then you can run into problems.

A method I have used in the past which works well with injectors is to characterize the
injector's saturation current on the very first pulse, and use this information to set a
PWM duty cycle for all other pulses. For example, assume an injector DC resistance of 2.4
ohms and a supply voltage of 12 volts (and disregard the voltage drop across the junction
transistor or Rds of the MOSFET - assume a perfect switch for this example), and a sense
resistor tied to the power leg such that that an ADC can convert voltage drop into
current. Your target open current is 4 amps, and target holding current is 1 amp. You are
also monitoring the injector battery voltage with another ADC channel. If you turn on the
injector and leave it on (for a sufficiently long pulse at 100% duty cycle), the current
will rise to around 5 amps and then level off. If you keep reading the A/D while you turn
on the injector, you will get a series of voltage readings which will level out as the
injector saturates. When this point (current saturation) occurs, take this voltage and
compute a current using ohms law, using the battery voltage measured at this time. Then,
compute a duty cycle which will yield roughly 1 amp, or something like 20%, and use this
for the current-limit value every pulse from here on. If the battery voltage changes at
any time outside of some threshold, then re-compute a new duty cycle and use this.

The nice thing about this is that it will automatically adjust for different injectors.
For example, put a line in the algorithm at the point where it has determined saturated
injector current (the first pulse). If the "saturated" current is less than around 1.5
amps, then the injector is of the high-impedance type and one can skip the current limit
step for subsequent pulses (i.e. leave the duty cycle at 100% for all pulses).

The only drawback to this is when one is starting the car, the voltages tend to swing all
over, sometimes preventing one to make a "perfect" measurement of battery voltage. But,
there is leeway here and one does not have to get a precise 1-amp holding current.

--
- Bruce

---------------------------------------------
             Bruce A. Bowling
         bbowling at earthlink.net
   http://home.earthlink.net/~bbowling
---------------------------------------------


----------------------------------------------------------------------------
To unsubscribe from diy_efi, send "unsubscribe diy_efi" (without the quotes)
in the body of a message (not the subject) to majordomo at lists.diy-efi.org




More information about the Diy_efi mailing list