Engine management system

Post details of your projects here.
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Engine management system

Post by YahooArchive »

Hi everyone
I've been using an Armexpress lite for a couple of years to generate PWM signals
to test a ¼ scale model fuel injector
http://www.f1-2000.co.uk/index.php?f=fuel_system
At the moment I just read a couple of pots on AD ports, one to simulate throttle
position and the other to set the RPM or frequency of the pulses sent to the
injector via a MOSFET. I use HWPWM for current limiting – peak on hold for those
who know about fuel injectors. I output data via the serial port to a very crude
VB app to display pulse width etc. You can see the data overlaid on the video on
the website
I want to test the injector and probably spark ignition on a small single
cylinder 4 stroke engine I'll buy to test fuel and ignition systems.
I noticed a few posts on here regarding engine management systems and wondered
if anyone has managed to get an ECU working?
Any advice / comments welcome.

Roger



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Rodger,

I am using an ARMmite to implement a digital idle control for my '83 BMW 633CSi.
I am not firing the fuel injectors, only pulsing the idle control valve which
adjusts the airflow when the throttle is closed.

In '82 - '84 6-cylinder BMW's have digital engine management computers, but idle
speed was not part of the "program" until '85. BMW's OEM module for this
function is an analog device, which has only about a 4 or 5 year useful life.

BMW uses magnetic sensors on the flywheel. One picks up a TDC mark and the
other picks up the flywheel teeth and produces a sine-wave. I am counting the
number of pulses in 500 ms and converting it to RPM. Working with idle speed, I
found that attempting to adjust the air volume too quickly was actually
destabilizing the engine, so having the ARMmite spend 1/2 a second counting
"teeth" is fine. For fuel injection I think it will need to be much tighter.

The PULSIN function, which measures a single pulse in microseconds on any input
pin could be the answer. At 15,000 RPM you have 250 revolutions per second, and
with 120 teeth that is 30,000 pulses per second or 33.33 microsec per pulse.
Obviuosly, a different tooth count on the flywheel affects the calculation.

Playing with this function on my ARMmite using the raw sine-wave was
interesting. It timed the "pulses," but since they were not square, the voltage
level affected the length, as the count would trigger at a fixed voltage, but
the "ramp" to that voltage varies with the amplitude. If I was going to use
this function, I would need to square up the sine-wave with an interface
component. If I was building the engine, I'd go for a Hall-Effect sensor that
outputs square waves. (This may date me to the 70's & 80's when I did more
digital interfacing than I do today - I'm a "software" guy know.)

With 10 cylinders and 4 stokes you are looking at firing a spark plug every 800
microseconds. Seems like there should be time to do a lot of processing.

I use the HWPWM output to pulse the idle valve (through a MOSFET) and the only
problem is that it misses a pulse when I execute a change in the pulse width.
This is not a problem at 5 Hz for my idle control, but might be at the higher
frequency needed to run the injectors and spark timing.

I have coded a process to send out operating data on the USB port and
display/log it in a Liberty Basic program on a laptop.

I'm probably covering all kinds of things you have already looked at here, so
I'll close for now and offer to help with any questions you have. My BMW is off
the road for the Winter, but when Spring arrives I plan to continue testing and
development, and possibly build a "production" version to offer for sale to
people like me - nuts who want to keep a 27 year old classic BMW on the road.

Ira

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Hi Ira
Thanks for your reply.
I suppose there are a couple of separate projects going on here. The initial
plan is that I would like to test the mechanical side of the injector and the
spark plug in an "off the self" single cylinder model engine. This is to prove
the concept and iron out any engineering issues before committing to make a
number of injectors / plugs as they're very time consuming to make.
The next stage much further down the line is an engine management system for the
V10. That's a long way off but it would be good to know it's feasible from the
research with a single cylinder engine.
For timing, I quite fancy using an off the shelf encoder like this
http://uk.farnell.com/avago-technologie ... l-top-moun\
t-600cpr/dp/1161074
It's rated up to 12K rpm so I'd drive it at ½ the crankshaft speed, probably via
a reduction gear that will eventually drive the cams.
This is where it all gets a bit worrying –
It would be great to fire the injectors sequentially but I've more or less
resigned myself to batch firing all 10. At 20K RPM the window for injection is
so small anyway. As for the ignition, there's no opportunity for wasted spark
due to the V10 configuration and the firing order which means a spark every 72
degrees (5 per rev) of crank rotation.

Doing some maths, 1/ ((20000/60)*5) =600 microseconds interval – based on this
thing ever spinning at 20K rpm
These encoders output 600 pulses per revolution and an index pulse. What about
using a counter /divider like one of these?
http://uk.farnell.com/nxp/74hc40103d/lo ... dp/1631663
or something similar to get 10 pulses per encoder revolution (5 per crank
revolution if driven at ½ crank RPM) and one index pulse. I haven't exactly
thought this one through yet, but clearly if using a 600 line encoder then the
pulse rate will need to be slowed considerably.
So, do you have a loop that constantly reads things like coolant temperature
throttle position etc and constantly recalculates the injector pulse width,
spark advance etc that gets interrupted by a clock pulse from the encoder and
then triggers an injection or ignition event?
Does the calculation need to take place at the time of the event /interrupt or
can it based be on the last available variables from the loop?
I suppose what I'm asking is do we keep on calculating constantly or just gather
information and parameters and do a calculation at the time the event is
required.
I'm thinking this through as I'm typing it..... This is where I need some help
to get me started off really.
I'm probably going to run out of IO, I thought about using an Armexpres and
Armexpress lite somehow together. Taking advantages of the A/D and HWPM on the
Lite and then the additional memory on the express. Exchanging timing or logic
signals shouldn't be a problem but there would be no way of easily sharing any
information such as TPS or calculated RPM between the two MCs ... any ideas?
Another nice to have as part of the loop would be serial data output for
diagnostics......
I'd like to try and use basic if possible, but if it has to be C then that'll be
something else I'll have to try and get to grips with.
Let's assume that this is going to be for a single cylinder engine but using
something like the encoder as a Tooth Trigger Wheel, how would you suggest
setting up the various loops and interrupt?
Sorry if I appear vague and naive, I've not thought this through properly yet
which is why I'm looking for some basic pointers.
Roger

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Have you looked at the encoders from http://www.lsicsi.com/encoders.htm
I used the LS7366R to connect an incremental encoder to the ARMweb.
-mike
r_oo_j wrote:

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

> I suppose there are a couple of separate projects going on here. The initial
plan is that I would like to test the mechanical side of the injector and the
spark plug in an "off the self" single cylinder model engine.

Where do you find an ""off the self" single cylinder model engine" ??

This is a fuel injected engine, right ?

don

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Hi Mike
Not yet ..... Looks like lots of interesting products and bedtime reading.....
Off for a read.
The problem when you start looking at things like this is, you see stuff that
inspires another project and end up going off at a complete tangent.
hmmm AC and DC Motor control .... focus ..... focus 
Many thanks

Roger

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Hi don
Off the shelf 4 stroke engines http://www.osengines.com/engines/airplane.html
http://www.laserengines.com/
There are lots out there; it'll probably be a glow plug engine running on
methanol that will be converted to petrol and spark ignition.
This engine is only to use as test bed for the fuel injectors and ignition. For
the ¼ scale V10 I'm building which will be fuel injected and spark ignition.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Interesting project Roger - keep us posted on progress.

To get sequential injector firing it would be worth adding a second controller
dedicated to one task. I wouldn't give up on that yet.

Why do you need to engineer for 20k RPM if the motor is only rated for 12k? I'd
be surprised if you ever got close to 12k. Most production internal combustion
engines will fall apart above 10k if the controller even let them run that high.
Your V10 might be better but I can't imagine a need to plan on more than 12k.
Let me know what I'm missing. Good luck.

Henry

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Sounds like a pretty interesting project, not that I can insert any real
experience with this.

Rather than trying to use the CPU to time pulses, the counter/timer hardware
would probably be a better match. The timer counter is running at 15 MHz so it
can count up to that rate. CPU interrupts take on the order of a few
microseconds so beyond a few 100 KHz its probably impractical.

I know its still vaporware, though we are scrambling to get all the software
together for the new SuperPRO board, but it has more IOs and runs at twice the
speed of the existing LPC2103s. With any luck the software will be ready soon,
as we had to change GCC compilers and also decided to make the thing more
friendly in Vista/Sys 7 (not requiring admin privileges to run or installing
outside the Program Files area will be done).

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: Engine management system

Post by YahooArchive »

Hi Henry
Thank you for the comments. This isn't your conventional full size engine. I'm
building a ¼ scale working model of a Ferrari F1 2000 049 Tipo V10 engine.
http://www.f1-2000.co.uk/ .... Please ... whatever you do ... don't ask why
(even I've forgotten!)
Video of one of the 4mm fuel injectors
http://www.youtube.com/watch?v=7JXXfkMclB4
Sounds like I might have been thinking along the right lines then with the
second controller.
The encoder is the only thing limited to 12K RPM. The engine will (ok - should!)
spin to 20K+. The cams rotate at ½ the crank speed so hence the thought of
timing off the camshaft gears rather than straight off the crank.
That gives me 2K headroom on the encoder for 20K RPM.
If using this type of encoder is indeed the way to go ......

Post Reply