Subject: this may be what we are looking for
From: Rotary Engine
Date: 11/8/2009, 12:17 AM
To: AAA Put this in the To box


http://www.sae.org/mags/AEI/6906





http://www.freescale.com/webapp/sps/site/application.jsp?code=APLSMALLENGCTRL&tid=vansmallengine
 http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=KIT33812ECUEVME http://www.freescale.com/support

C. Smith

I'll second that. In the true spirit of the 555 one computer per
injector.
If we can get this to work it will be off the shelf ignition and EFI
at very low cost indeed.  Modular and redundant for safety.

For a two rotor, four FreeScale demo PC boards would be required as
each one has an injector driver. Two triggers are no problem for us
as each rotor fires once per rev. Just like a one cylinder two cycle
piston engine.

Hopefully there is a one cylinder 2 cycle piston engine FreeScale
software example that we can use to get a fast start.

I downloaded a bunch of stuff and got this version of the code
warrier up and running. Do we have any C programmers on here?

FreeScale makes you jump through a lot of hoops as far as
registering and activation which is a real pain in the ass. I called
them and tried to explain I don't run windows on the Internet for
virus reasons so on-line activation does not work for me.

Thanks Craig for letting me know about this.

Paul Lamar


Robin's Mac OS disk should have X Code on it, provided it's not too
old.  You can program C, C++ , and a variety of others with it.

I just loaded mine for a college course in C++.

Chris Cosman

This is a good project for you Chris.

Paul Lamar

It would be a great project for me.  However, if you folks were
expecting any timely results, I may let you down...
Let me get through my class first and see what I know...

Chris C.

OK Chris. C is pretty dry and this should add some incentive.
Plus you could ask the instructor questions. Code Warrior comes with
a C compiler.

Paul Lamar

What are the questions I need to be asking the instructor.  He wrote
the book we're using and used to design spy satellites, I'm sure he
could walk me through this...

My apologies I haven't been paying too much attention to this thread,
until now.

Chris Cosman

Down load the software and print out some of the C examples.
If there is something you don't understand ask him.


Paul Lamar

Paul, I used to program in fortran, pil, sindue, mad and read up on
 the C
and later C++ back in 1999.  As with other languages the programer
 writes
his code including things tagged rem (remember what this does)
 statements.
Function  blocks are written in sections and when all are ready they
 are
"linked" and "compiled" to generate an "executable" file which is
 what we
get when we buy software. During the compile stage all the rem
 statements
are dropped and all named variables cas maf ign inj that you used are
converted  to generic equivalents. The executable file can be
 decompiled
for
modification to add mass airflow functions, however not having real
variable
names, and all the blocks would still be linked makes a large confusing
mess
to sort thru. If you have the original source code (open source) a
 function
of conditional statements to convert the floating point mass air
 flow value
to an offset of the fuel table would seem to alter mixture. The
 array of
data for fuel flow time would have the "name" sub x changed to
 "name" sub(x
+offset)Expanding on this for manual mixture overide would be "name"
 sub
(x+offset+manual change)

There are several versions of C++ available. Two of the beter ones
are microsoft C as used in windows and borland C++  It is generally
 thought
that the automatic debugging during linking is much better in borland
C++During your code writing you have a lot of C in where you send
variables into a function block and C out where variable values go
 out to
other parts of the program. If for instance you send in an integer
 value
but
declare it floating point as it enters the function block and it is
 output
with the original variable name with the new value you have a  floating
point defined an an integer(no decimal point) and an error. The
 debugger
looks for these and functions linked to the wrong addresses and changes
them
as necessary. The documentation of borland C++ is more informative
 allowing
the original intent of the code to be obtained. The new code can
 then be
run
thru the microsoft compiler to make the executable file if you preffer.


To write source code an understanding of high school algebra is
essential and secondly conditional statements will be neccessary.
Conditional statements aresomething is greater than, less than, or
 equal
to something else and based on this decision you "go to" some line
 and do
something.  For a beginning "the C++ for dummies" book is usefull and a
full
version of C++ manual might be usefull if you read it twice.  All the
sending to and retrieving from a particular storage address type of
initialization is done in the compiler. Personally I found it
 usefull to
write out a line in plane english then converting to code. For
 instance, if
the mass air flow voltag e is more than this but less than that and
 the air
temperature is more than
this and less than that then enter a fuel flow time of something in an
array
named whatever on a line number some variable plus 1 then go back and
repeat
with the mass airflow a step higher until the mass air flow is more
 than
some number, then start over with the air temperature one step
 higher until
some value is exceeded then exit this function. This would generate an
array
(look up table) for fuel versus air. A more extensive set of inputs
including throttle position and crank angle sensor position and rpm
 for a
single master table would generate a larger table. By using rpm as the
input
the table would sort thru the list  to choose fuel flow time and
 injection
and ignition timing. Using multiple tables or branched tables would
 reduce
sort time, and using a polar array as a matrix could be a nice trick to
cross refference many tables in a single sort. We did this to sort
 lumber
by
length, width, thickness, grade, species, trimmed, untrimmed,
 current bin
location etcetera for lumber sorting/packaging systems.


About using a pre built board without mass air flow or some kind of
air density input I don't understand how to input data on a board
 with no
input treminal to connect to. Using a second board with a sata or
 serial
connection would add more circuit boards and this is then starting
 to look
like an industrial rack system. Is it possible to match up a  mass
 air flow
sensor output to replace one of the existing inputs to the board,
 possibly
the throttle position sensor if a manual throtttle cable is used for
 power
control. I was thinking the ford maf sensor could be in series with
 a pot
to
modify the voltage and  add manual mxture override.

george grimes


The Code Warrior comes with a C compiler debugger and emulator. All
 free.
The boards have .025 square headers on the opposite side for data
 input.

We think there is already a provision for a mass air flow sensor
 input. It
would help if you downloaded the free code samples and see if there
 is a
sample C program source we can use already written. Just about any one
cylinder program will work.

Paul Lamar

The MC9S12P128 has a 10ch 12bit a/d, so a great many possiblities
 exist for
input. Download


 http://www.freescale.com/files/analog/doc/user_guide/KT33812ECUUG.pdf?fpsp=1 I don't know as of yet if the sample application has provision for
 MAF, but
there is some pre cut smples for demonstration and application
 validation.
I
would think it may be as simple as substituting one input for
 another, some
scaling math?, and maybe creation of look-up tables.
C. Smith

Paul, pages 31 and 42 user guide show the locaton of the manifold
 absolue
pressure
inputs which  could be retained or switched to maf. The look up
 tables are
user defined so the nonlinearity of maf  or air temp sensors would
 be done
on the included spreadsheet of the kit software. Has anybody got the
 kit
price and price for additional boards. I haven't used my
 oscilliscope for
decades, but it could be a  fun winter
project.
george grimes

I see what you are saying. A MAP sensor is a lot cheaper than a mass
airflow sensor.
Cheap enough to use one for each rotor. Like $10. There is also a
 throttle
position sensor which would help the throttle response.

Here is the diagram from page 31. It also looks like it has a
 missing tooth
detector from the crank angle sensor.

Paul Lamar

Yes, missing tooth is the scheme they are using in the validation.
 The more
I look at this, the better it looks. With the available overhead and
MC33926: 5.0 A Throttle Control H-Bridge, this could also be used
 for the
fuel pump PWM project someone has been working on.
C. Smith

  Paul, I was looking at some RX8 engines in my hanger this afternoon
 and the
  stock crank angle sensor looks just fine as is, and we know that it will
  function at 13,000 rpm so should be fine down at 7,000 continuous. The
  spacing to the triggerwheel looks excessive IMHO but some testing
 with the
  oscilliscope on a running engine at the stock spacing and at a few
 closer
  spacings might be interesting.


  The freescale board download shows 10 analog
  to digital converters which is really generous. Their mixture control
 seems
  to use an oxygen sensor so that would be the area to exchange for an
  algorithm of the mass air flow to fuel ratio. I really like the 90MM
 ford
  maf with the built in temperature and humidity correction on the sensor
  circuit board. The freescale board has air temperature sensor input
 and more
  importantly engine temperature so the code for a second air temperature
  correction would need a revision.

  Do you think the MAF sensor gives a more
  precise reading than the manifold absolute pressure, and particularly
 when
  higher turbocharging pressure would require a larger range of
 sensitivity?


  It would seem that the charge temperature and manifold pressure.
  sensors would need to be at the same place and that vaporizing fuel
 lowering
  the temperature would make accurate readings difficult at different fuel
  flow rates. With the MAF sensor reading only air it appears to have
 the edge
  on accuracy.

  george grimes

  Yes, The mass airflow sensor would probably be more accurate.

  Paul Lamar


 Can a pitot tube in the intake stream replace the heated mass air flow
 sensor?


 Matt-

 Probably. I think you will also need the air temperature.

 It will need to be a very sensitive pressure sensor as  100 MPH is
 only .18 PSI.

 You will also need to relate it to ambient pressure.

 Here is a data sheet.

 Paul Lamar


A 2-rotor running WOT at 6000 rpm draws air at less than 70 mph thru a
3-inch orifice. A simple windmill in the intake (just like a turbine
fuel flow sensor) would make a simpler and more accurate pickup. Airflow
volume would be directly proportional to  windmill rpm.

Victor Roberts

Not a bad idea. IMHO it is a bit faster than that.
350 cubic feet per minute at 100% VE but a p-port is 120% VE therefore it
is 420 cubic feet per minute. 3 inch diameter is 7 square inches or .05 square foot
420 /.05 = 8400 feet per minute or 140 feet per second or 95 MPH.

Just checking. It is a bit harder to deal with electronically than a simple pressure sensor that puts out 0 to 5 volts analog signal as most CPU's have A to D's..

The reason it is probably not used is the mechanical problems of making something spinning that fast to live for a long time.

Paul Lamar

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