Subject: How the PIC 32 bit timers work and why we need them.
From: rotaryeng
Date: 8/9/2012, 9:27 AM
To: AAAA Put this in the To box


  We need to know the exact engine RPM at all times because of the inductive
 ignition coil on plug.  These coils cannot tolerate being on all the time
 like the old fashion coil.  They burn up.  They need to be turned on only
 about 4 milliseconds before a spark is needed so the current can be built
 up
 in the coil and store magnetic energy.  When the coil is turned off the
 field collapses and the spark is created.  At low RPM the coil would be on
 for about 150 milliseconds during one revolution of the engine.  At 8000
 RPM
 it only takes about 7.7 milliseconds to make one rev.  Still ...we have to
 leave the coil off half the time.


 If the PIC timer is supplied with pulses
 from one of the microcontroller input pin, then it turns into a counter.
 The quickest way to do this is have a lot of pulses generated in one
 revolution of the engine.  There are about 100 teeth on the flywheel so
 that
 is the best thing to use.  A low cost anti lock brakes sensor can look at
 the flywheel teeth and send these pulses to a microcontroller input pin.
  If
 we count them for only .018 seconds we can achieve acceptable resolution.
 at 400 RPM we are getting 666 pulses per second so the count would be 12.
 At 8000 RPM we are getting 13,333 per second so the count would be 239.
 Perfect for an 8 bit counter that can count to 256.


 With BASIC we can divide these numbers into 1 and get a number that is
 proportional to RPM. .0833 at low RPM and .00418 at high RPM.

 To summarize we have come up with a digital tach that updates about 55
 times a second.  Important when an engine is rapidly accelerating.

 The difficulty of this problem is why B&G
 left the ignition control out of the early megasquirt EFI's.  It will only
 worked with the big and heavy old fashion coils that were on all the time
 and only turned off briefly to fire the plugs.

  Paul Lamar

 OK, first question is about the coils. The stock coils with igniter have a
 12 volt in and shut down at low rpm. Since these coils were designed for
 this engine why are we looking for an alternative? If there is a problem
 with these coils I would like to know while I am on the ground.

 Second, the stock car used the 24 teeth in the CAS and the TPS to tell the
 computer what was going on.  Tracy decided not to use the TPS because of
 the constant loading and predictable fuel/map curve. Is this approach
 causing problems and causing a need for a change?

 Tracy's approach is functional simplicity. Every part that is added is a
 potential failure point. As we move forward we should keep in mind that our
 ultimate goal is a system that provides more benefits than the older a/c
 systems, with an added margin of safety as well. The KISS mantra will serve
 pilots well in the end.

 Kevin Alderman

 Weight, size, cost, availability and current drain. If you lose the alt
 you have a
 limited time to fly.

 New RX8 coils are $25 each and readily available. Current drain is low at
 low RPM and
 increases with RPM like a CD system.

 We could use the 24 teeth in the 2nd gen CAS but that too has not been
 made for 22
 years. It has been done away with in 1993 and since it is not there it
 does not weigh
 anything.

 We could use the time between engine TDC's and a PIC 16 bit counter to
 calculate the
 RPM and I am looking into that. Does away with the ABS sensor looking at
 the flywheel
 teeth. RPM update time is once a rev. That is 6.6 times a second at 400
 RPM and 133
 times a second at 8000 RPM. That may be enough.

 Here is the  latest flow chart for the ABS sensor on the flywheel teeth.

 The beauty of the BASIC is things can be easily changed.

 Paul Lamar


OK, I got it. So the direction is similar to what I had in mind with mine-
I was going to use the TDC pulse and an equation to calculate rpm for
testing purposes, and that is what you are leading toward. I am assuming
that this will require a pair of hall effect sensors and associated magnets
to trigger the pulse. Simple- good.

What are we going to use for the index pulse? With just a pair of Halls,
the engine wont know if its up or down at startup of the ecu.

Kevin Alderman

Use two magnet wheels one behind the other or two magnets on different radii of the
same wheel. Use separate interrupts.

Hall effects work well. They are small and cheap enough you could use half a dozen in
different arrangements They are a wee bit delicate.

Later rotaries use these magnet sensors as do most car engines.
Basically all they are is a small round magnet with a coil of wire wound around them.
They require a thick steel plate of some sort as a trigger wheel.

Paul Lamar
-- The Rotary Engine News Letter. Powered by Linux. ACRE NL web site. http://www.rotaryeng.net You Tube key word PaulLamar2 Copyright 1998-2012 All world wide rights reserved.