Ardiuno based tachometer project

Discussion in 'Embedded Systems and Microcontrollers' started by Kurz, Apr 28, 2009.

  1. Kurz

    Thread Starter New Member

    Apr 28, 2009

    I stumbled upon this forum since I'm planing to do the same thing of have the adurino read the RPM of the engine.

    Anyways my question is if you write an algorithm in adurino to calculate the RPM by interrupts and let say the engine can rev up to 8K, my being a 4cyl engine will this overload the adurino with interupts that nothing else will be processed, since my plan is to have the adurino read RPM, MAP and Throttle Position and then depending on those value contorl a pump progressively with the PWM output.

  2. hgmjr

    Retired Moderator

    Jan 28, 2005
    Please refrain from appending your request for assistance into an existing thread. It disrupts the flow of the active thread causing confusion.

    I have moved your post to its own thread and provided this link back to the thread that you are refering to in your initial post.

  3. DonQ

    Active Member

    May 6, 2009
    Assuming you are going to read RPM from the distributor...

    8000 RPM is only 133 rotations per second. Since there are only two sparks per rotation (on a 4-stroke cycle), that makes about 266 interrupts per second.

    This will in no way overload any reasonable micro-controller. I have a 4-MHz HD647180 (a Z80 upgrade) that has been doing this in my last few trucks for about 25 years now.

    This also has a timer interrupt running at 1000Hz (1 mS interrupts), reads a fuel-flow sensor, speedometer sensor on the drive-shaft, and a number of other things. My memory is that it was using just a few percent (3%-4% or so) of my available processor time. (The decoded data is sent through a 115kbaud serial link for display on a real-time glass-panel program that runs on a laptop).

    It is true that you can't be horribly sloppy with your code, but I also bet you are going to use something faster than 4MHz, and something newer than a processor from the '80s :D