Subject: Atmel and ZBasic EFI planing A bit of thinking out loud.
From: Rotary Engine
Date: 5/22/2010, 6:29 AM
To: AAA Put this in the To box


    I suggest if you are interested in this system you make
    a folder and drag over all the many future messages on this
    subject otherwise delete it.

 There are at least two ways to build an EFI program.
 The first and the simplest is to assume power is a direct
 function or RPM and manifold pressure. That is how a 555 system
 works. The injector is triggered once per revolution
 and the pules width is controlled the manifold pressure.
 The higher the pressure the wider the pulse... more fuel.

 See http://www.rotaryeng.net/simple-cheap-555.html

 To do that using a computer programed in BASIC is trivial.
 Almost a waste of the computer's power. I could write
 the program in about five minutes. Maybe a day at the most.

 The vast majority of EFI systems and that includes Tracy's system
 use a look up table to adjust the injector pulse  width for
 a given RPM and manifold pressure.  That gives a 2 dimensional
 table of several hundred entries. One could have a one dimensional
 table for say 75 different RPMs and modify the table values
 by the manifold reading. That would be say every 100 RPM
 for the rotary. I am not sure which system Tracy's
 uses. One can do a bit of math and interpolate between
 fixed readings. The same thing could be based on manifold
 pressure alone and adjusted by intake air temperature.

 The table is stored in EEPROM so it is always there even if
 the power is turned off. In ZBasic speak that is called
 persistent memory and there are 4000 bytes available.

 Fortunately ZBasic has 2 Routines that are highly
 useful in this sort of EFI system.
 PersistentPoke(value, address) and PersistentPeek(address)
 See page 182 of the ZBasic System Library  Reference Manual.

 The address is just the line number of a one dimensional
 table. The value at that address is a Byte data type
 being 0 to 255. See page 7 ZBasic Language Reference Manual.

 Poke can load the table from a file in your PC computer
 you generated with an editor. If you used two ZX computers
 such as Tracy does you could fly on one while adjusting
 the other using a NetBook and switch in the air. It helps
 if you have an autopilot or some one else to fly the plane
 and look out for traffic.

 Peek of course can read the file for a given RPM
 and use that number adjusted by the MAP to control
 the injector width.

 Peek can also be used to read out the file to your
 PC just to check up on what is in there in case you
 forgot.


 Paul Lamar

 Paul,

Sounds interesting.  What would it take to read an output voltage from the
O2 sensor, compare it to a voltage from a potentiometer circuit (knob on the
panel controlled by the pilot), and PersistentPoke the appropriate byte as
determined by current rpm?  That would be "auto-tune".

Mark

Now I having you thinking Mark :) Not much in terms of software.
We have at least eight analog to digital converter pins to work
with.

IMHO it would be better to use a wide band O2 sensor. Of course that
would die if you were forced to burn 100LL. If it were a sub routine,
called up only once, when you first fired up the engine on the
first flight using auto fuel, stored the MAP table in persistent
memory and then never used again.... that would work.

Perhaps using EGT would be better. Max EGT at all power levels
which is almost peak power. See the attached charts. The leaning knob
would then take care of cruise or richen it a bit for cold
starting and peak power. War emergency mixture :)

BTW As a compact user interface on the instrument panel I am thinking
of using a rotating switch with 16 positions that will call
up to 16 different programs. Autotune could be one of them.
Interfacing with the NetBook another. Position 1 to 8 could be
computer 1 and 9 to 16 could be computer 2.

You then push a button on the switch to run the program
and or switch computers. The program name would be NC milled into
the bezel. IMHO that is an intuitive way for people to control a
small computer.

What do you think?

Paul Lamar
-- 
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2010 All world wide rights reserved.