Subject: Atmel and ZBasic compression tester.
From: Rotary Engine
Date: 5/13/2010, 5:35 PM
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.

  I just add another idea.

  Since we have 16 channels of A to D it would be real cheap
  to add a compression checker.
  All it takes is another FreeScale $10 pressure sensor.

  That means you turn the engine over with the starter,
  connect a hose to the pressure sensor and a phony
  spark plug pressure tap. The computer samples the pressure
  11,000 times a second so you get a plot of the compression
  pressure. I would slow it down to 500 samples per second
  to cut down on the shear mass of data.

  A very low cost option.

---------------------------------------------------------
This will work with any EFI system you may be using now.
No need to change your EFI. This also works with any
rotary engine sitting on the floor not running that can be rotated
with a starter or an air or electric driven impact wrench
on the front e-shaft nut. At $100 it is about the
cheapest rotary engine compression checker I have
found so far.  Mazda testers cost hundreds of dollars.
It will provide a very accurate condition of your engine.

These are free ZBasic sub routines that will make a low cost rotary
engine compression recorder to send compression data to a PC at
up to 11,000 samples per second. Accurate to about
1/2 psi.

This is all the software you need.

Name of subroutine: ADCtoCom1

Invocation (what you have to type.) ADCtoCom1(pin, rate)

Parameter    Method  Type   Description
pin ......   ByVal   Byte  The pin number from which analog readings will be taken.
.......................... Valid pins are those corresponding to PortA, pins 13 to 20.

rate  ByVal int16  The rate at which conversions will be performed. The value is
...................the number of conversions per second and may range from 28
...................to 11000 samples per second.

Discussion

Calling this subroutine causes a continuous
series of analog-to-digital conversions to be performed on
the signal appearing at the specified pin.  Each 8-bit
digital result is automatically sent out the Com1 serial
port.

Before starting the conversions, the baud rate of
(USB) Com1 is set to 115,200.  The specified pin is automatically
set to the proper state for A/D conversion so no additional
setup is required prior to use.  The conversion stream will
continue until ADCToCom1() is called again with the pin
parameter set to zero (the rate parameter being meaningless
in this case).

The analog input range is approximately
0.25 to 0.75 times Vcc (1.25 volts to 3.75 volts when
running on 5 volts) and the resulting digital range is 0 to
255.  Analog input levels below the low end of the range
and above the high end of the range will produce the low
and high digital values, respectively.

Note that the
subroutine Com1ToDAC() is designed to receive the data
stream generated by this Subroutine.  For best accuracy,
state changes on other pins of PortA should be avoided
during the conversion process.


Resource Usage:
This subroutine uses the processor’s A/D converter, Com1 and the
I/O Timer.  No other use of these resources should be
attempted while the conversion is active.  For native code
devices, the following ISRs (Interrupt Service Routine) are required.

  ISRs Required
  Underlying CPU  ISR Name

   mega1280N    Timer4_CompA

Example:
' Begin the conversion stream on pin 12 at 500 samples per second
Call ADCtoCom1(12, 500)
' Stop the conversion process after two minutes
Call Delay(120.0)
Call ADCtoCom1(0, 0)

' means it is a comment and not an instruction.


Here is the FreeScale pdf on the $10 pressure sensor to
use. Very easy to use. Max pressure is 150 psi. Much like the
pressure sensor Tracy is using on the EFI except for the range
of pressures sensed.

 http://www.zbasic.net/

 So simple a caveman like me can do it.

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.