High Frequency switching at 12 Volts, down to 5 Volts.

Hi everyone! I am trying to read RPM from my motorcycles ECU. The ECU encodes this information in a 12 Volt, 50% duty cycle Square wave. For reference, 6000 rpm is 200 Hz.
I have been trying to figure out the best way to preserve this signal, but drop it down to a 5 Volt, 50% duty cycle square wave for the Arduino Uno.

In your experience, which of the following (or something completely different) has the fastest switching capability?
Solid State Relay
Optocoupler
Voltage Divider
Voltage Regulator
(Voltage Divider, or Regulator with Zener Diode)

Any input is greatly appreciated!
Thanks-

EDIT: (In case anybody wants to see the code)

//------------------------------------
// First experiment with measuring preiod of a square wave
// ** This will be usefull for RPM value input to CG SBK Data Logger
// Christopher Grass - 9/31/2013
//------------------------------------

// Define Variables
unsigned long Sampling = 4096;
int FreqPin = 6;
unsigned long WaveLength;
float Frequency = 0;

void setup () 
  {
    // Setup Serial
    Serial.begin(9600);
    Serial.println("Initialize Void Setup () Routine");                              //Debug
    
    // Define Misc. I/O Assignment
    pinMode(FreqPin, INPUT);
    
    // Controller Ready
    Serial.println("Controller Ready");                           //Debug
  }
 
 void loop () 
   {    
    unsigned long FreqSum = 0; 
     
    WaveLength = pulseIn(FreqPin, HIGH, 2000000);
    Serial.println(WaveLength);                           //Debug
    unsigned long Period = WaveLength * 2;
    Serial.println(Period);                               //Debug
    
/*
    for(int a = 0; a<Sampling ; a++)
      {
        FreqSum = (FreqSum + Period);
      }
      
    Frequency = FreqSum/Sampling;
    Serial.println(Frequency);                            //Debug
 */
 
   }

The simplest solution is just a 100K series resistor, close to the Arduino, and let the pin protection diodes limit the voltage. if you're not comfortable with that, use a voltage divider, something like 100K from the ECU signal to the pin and 50K from the pin to ground.

Thanks for all of the help! This is doing exactly what I am expecting in simulation.
Thanks for the advice!

-Chris

Automotive application. Simulation isn't going to cut it!

I would be going for the optocoupler, with its LED fed by two wires running directly from the ECU output so that they are quite separate from the feed for your electronics, taken as closely as possible from the battery, or at least the ignition switch, as possible.

Presuming the ECU can provide a few milliamps for the optocoupler without trouble.

Perhaps that is just being paranoid.

For the simple "voltage divider" version, a 22K resistor and 4.7V zener with a small capacitor.

Considering the likelihood of noise, you want to use debouncing or preferably, some form of PLL code on your input.

flylikechris:
Hi everyone! I am trying to read RPM from my motorcycles ECU. The ECU encodes this information in a 12 Volt, 50% duty cycle Square wave. For reference, 6000 rpm is 200 Hz.

That would match the firing interval for a 4-cyl 4-stroke, which suggests that these pulses are syncronised with firing events. Before you connect anything to your Arduino make absolutely sure that what you're seeing really is a 12V logic signal, and not simply some connection to the coil LT circuit. The LT circuit will have a huge amount of electrical noise on it and a 12V-5V voltage divider would not be sufficient to make this safe to connect to an Arduino I/O pin.

Thanks for the input guys.
PeterH, I have actually confirmed this with my bench scope. The great thing about this is that the signal I will be tying into is feeding directly to an OEM instrument cluster. Everything in this harness is a logic signal.
If I were grabbing from the coil, I would likely use an optocoupler. Thankfully this is not the case.

Thanks guys!