[Diy_efi] pwm explanation
Marcell Gal
cell at x-dsl.hu
Fri Jan 31 20:28:26 GMT 2003
Hi Bino,
> I would like to know if can help me whit the pwm to drive the injectors.
> I use a microcontroller to make something like the megasquirt. I understand
> how to create one voltage but where im lost is how do I determine the amout
> of time the injector is on ( a other timer?) and if the voltage has to be
> steady or if it varies during the operation of the injector. the injector
look at the homepage, efi332, equations
for calculating injector open time. That's the major
thing in fuel injection.
(efi332 is working C code, easily tweeked)
The injector is inductive + resistive load (L+R1 in series).
Injector current counts, voltage only indirectly
(it changes the current).
It can be driven with 12V through a small resistor (R2):
Inductors like to maintain their current, their current change
is proportional to the voltage across them:
di(t) = -u(t) /L
If simply driven from 12 V then current tends to 12V/(R1+R2)
in an exponential (diminishing returns as someone called?) way,
like radioactive decay and many other processes in nature.
timeconstant tau = L/(R1+R2)
Exact equation for i(t) = 12V (1 - exp(-t/tau))
The nicest way
is to have a current limiting switching setup, like megasquirt does.
Varying PWM ratio allows for an energy efficient current
control, flyback diode must be connected to ground so that
-1500 V is not generated when switching element
such as transistor or MOSFET is turned off.
> are saturated. the microcontroller is a atmega 128.
Can you say more about your setup?
I'd also like to use Atmel mega 128, but I'd like to share it with someone.
I could assist in coding, debugging, simulating etc..
and verifying the design if you could make PCB
and test the board.
I'd like to make a 4 cyl sequential setup with 4 gasoline and 1 water
injector. (mostly the number of outputs count.) I'll have a 2 Bar MAP
sensor and TPS, but those are common.
RS232 interface for logging and console is for sure
-> we can use PALMtop,
but maybe own some display would be nice someday.
what do you think?
Marcell
_______________________________________________
Diy_efi mailing list
Diy_efi at diy-efi.org
http://www.diy-efi.org/mailman/listinfo/diy_efi
More information about the Diy_efi
mailing list