Atmel 8535 for engine controller

Bernd Felsche bernie at perth.dialix.com.au
Mon Feb 28 09:52:14 GMT 2000


[Just joined the list]

PHXSYS at aol.com asked:

>Has anyone looked at using the Atmel AVR 8535 8 bit micro for an engine 
>controller? It has 8k flash, 512 bytes eeprom,  8 ch 10 bit a/d, pwm, 
>capture/compare, usart, spi, 3 timers...Cost about 7-8$

Having only recently picked up the specifications for the chip and
read through them with exactly that in mind, I looked at the diy_efi
web site for others who've trodden this ground...

The 8535 appears suited if you don't run out of memory space.  That's
my (under-)informed opinion. You can't easily address memory space
outside the chip. You could use the SPI facility to address an external
(serial) flash device like the AT45DB161 as per application note AVR335
- but that consumes many cycles and is too slow (IMHO) for expanding
the memory.

An 8515 (I think) makes it possible, but you lose the ADC - not such a
big deal if you run an 8535 as a "co-processor" - the chips are cheap
enough and the SPI required very little glue - and negligible CPU
intervention.

If the memory footprint is small enough, then an 8535 at 8MHz can get
enough information to be "equivalent" to a simple commercial ECU like
the VW Digifant II (Hall sensor in distributor used for timing, idle
and WOT switches, vane-type AFM with separate air temp, coolant
temperature, O2 sensor, battery voltage sensing and a knock sensor for
input; injectors in parallel, output to ignition amplifier and (PWM)
idle-stabiliser as well as fuel pump relay).

By using the 16-bit timer to count between TDC and BDC, on a divide by
64, interrupted by the input capture from the Hall sensor, you can
ascertain engine speed and set the basic timing for injection and spark
accordingly.  For the non-steady state of rising/falling engine speeds,
one would need to be "predictive" to ensure proper timing for ignition
and fuel injection based on the rate of changing engine speed.

The beauty of the 16-bit timer is the two output-compare registers
(OCR); they can cause an interrupt on which you can do such things as
start/stop injecting or firing the spark plugs.

You get around 5000 CPU cycles at 9000 rpm (which is mechanically too
fast for the real engine anyway) to do the necessary sampling and to
make appropriate decisions and tweaks to the OCRs. Some things, like
coolant temp you don't have to sample every half rev; but others
like O2 may have advantages at being sampled more frequently so that
you can do clever things like running "closed-loop-rich" under WOT.

I've thought about using parametric control instead of maps to minimise
the memory footprint.

-- 
Real Name: Bernd Felsche
    Email: nospam.bernie at perth.DIALix.com.au
	http://www.perth.dialix.com.au/~bernie - Private HP
----------------------------------------------------------------------------
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