HOW IT WORKS

Home Geting Started How it Works Code Overview Program Flow Timing Diagram Photos Original Files Connection Notes SRF Videos

WE HAVE IGNITION … NOW WHAT!

    Now we have all of the needed elements to build a digital tachometer except for the calculations.   This is where Jeremy Leach has found the secrets that unlocked the project and made it work.  On a side bar, Jeremy gets a big atta-boy because he’s actually brilliant in his own right, but he can't have this no matter what!  He has used his Excel™ simulator to derive a mathematical solution for a 16-bit microprocessor, accurate to 1 RPM over the full spectrum, using a precisely measured signal from the Picaxe 18x and the engine ignition system.  The results of those calculations and the simulator results are here on two separate sheets in one workbook.  

    Jeremy is on the other side of the “big pond” in England and I am in Virginia, USA, so we have burned up a lot of bandwidth sending files back and forth during the development and testing of the project which was no simple task.  It really makes you appreciate the intrinsic value of the Internet and it also makes me quite suspicious of Jeremy performing some magic trick or slight-of-computer tricks on the math whilst out of my sight!  Jeremy prepared a very technical White Paper for those who are interested in the inner workings of the code and how such a horribly complex math problem has been reduced to just a few lines of math and code.

    Most of the initial version of the new unit with the Picaxe 18x is posted on the site now.   Later the entire dash project, which will be a completely digital dash, will be posted.  

    This unit incorporates a 3-position dip switch which allows the user to select the number of cylinders for their application.  By using a rather clever arrangement of resistors I built a binary ladder which the Picaxe ADC input can read to figure out the switch positions and set the unit‘s math for the proper number of cylinders to calculate the engine RPM.  Now the unit can be set to 1, 2, 4, 6 or 8 cylinders and it could be modified to allow for 3 and 5 cylinders if needed with one resistor change.

    The code is taking a rolling average of the RPM, Temps and Pressure (just the RPM in this version) over six samples and storing them in RAM.  As a new value is calculated the oldest value is pushed out of the stack and a new average for the last six samples is calculated.  This new average is then displayed on a preset schedule using the Picaxe's internal timer which is currenty set at every 500Ms for the RPM and every second for the other functions.  Several flags are also set so if any of the RPM, Temperatures or Pressures are out of spec the microcontroller will flash a warning light.  This version also provides an open drain (pulls to ground) output to run the SPI motor on the 2.0L engine and functions with a PWM output.  In other applications it can be used for another purpose or the part not installed and eliminated.  I have also made a provision to have a shift light on the project box as well as bring the function outside the box for remote mounting.

    There is also an intensity button for the display brightness.  The Picaxe polls the button input and if this is pressed it will change the display brightness and wait for a time-out period to expire to determine if the user is finished with the adjustment.  When the timer expires, the new brightness value is written to EEPROM on the Picaxe so it is not erased when the power is turned off.  The shift light thresholds are hard-programmed in the code and will trigger at a fixed engine RPM but they can be changed for your application.

    Here is a small photo gallery of the unit in R & D.  I made a rather nice PCB and only needed a few jumpers on top for the single-sided board.  Everything was done in-house and the circuit board was put into a metal project box with a bezel and filtered lens.  The lens was made using a thin piece of clear plastic and some of the 20% tint material for car windows.  The bezel is a bit large for just 4 digits so I masked out the sides just a bit and overall it is quite acceptable.

Copyright © 2006-7 Rex Lantz. All rights reserved
Revised: January 07, 2007