Repairing Motorcycle Tachometer

Discussion in 'Automotive Electronics' started by David Schofield, Jan 6, 2018.

  1. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    Hi,

    I have a racing sidecar, it runs a motorcycle engine and electronics. I am currently working on a project which is a DIY data logger, this will read various sensors from the engine and log the details to an SD card using an Arduino. While investigating the wiring it seems that I broke the tachometer, so now I am trying to fix it.

    The crankshaft position sensor is a Variable Reluctance type, Honda Part Number: 30300-MEE-D00. This produces an AC signal that the ECM can use to determine how fast the crankshaft is spinning. The crankshaft has 12 notches on it, so one revolution of the crankshaft would produce 12 pulses. I believe the voltage of these pulses increases as the RPM increases.

    In order to display the RPM on the tachometer, the ECM sends out a 12V square wave signal to dash. After messing around with a multimeter trying to read the frequency of this signal, it is now no longer a square wave, it seems to sit around 1V at all times. The engine still runs, and is obviously still getting a signal from the crankshaft position sensor, the signal to the clocks is just broken.

    What I would like to do is read the crankshaft signal, convert this to an rpm, create a 12V square wave at the correct frequency to display this RPM on the dash. I am thinking I could do this with an arduino, if I can make sure the input is 5V or below.

    There are IC you can buy that convert the signal from a Variable Reluctance sensor, so I will be looking at getting a few of these. Then it would be how to figure out how to drive the Analogue tachometer. I've had a look inside the dash, there seems to be a MLX10407 chip, 3 connections of the motor that moves the needle are connected to this chip.

    Do you think this is possible? Or do I need to buy a new ECM? :(
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    The MLX10407 is a peripheral chip, with a 12V supply, which expects to receive signals from the ECM over a 3-wire serial link. If the 12V is (was) being supplied at intervals then it is likely that the serial data is synchronous with the 12V switching. If so, I don't see how you will get the required synchronism using an add-on circuit, so I think it would be necessary to generate the serial data stream independently of the ECM.
     
  3. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    I don't think the signal goes directly to the MLX10407. Here is a picture I took, unfortunately I couldn't get to the components on the otherside but the incoming signal is connected to CL5 on the board. The centre of the tachometer needle is inbetween CL12 and CL11, slightly below.


    20180106_143358[1].jpg

    I think my next step is to feed a 12V square wave to the clocks and see if I can make the tachometer needle move. If I can make it move then I can worry about reading the VR sensor. I'm just not sure if I need to limit the current that can be drawn on the square wave signal or if the component that is connected to CL5 will only draw what it needs.
     
    Last edited: Jan 7, 2018
  4. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    I am going to try and drive the gauge with the following circuit;

    [​IMG]
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    Be lucky.
     
  6. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    I was able to drive the gauge by sending a 12v square wave signal to it. Now I just need to figure out how to condition the VR sensor into a digital signal that the arduino can read.
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    When the engine is at slow idle, what voltage (peak to peak) does the sensor produce?
     
  8. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    Unfortunately I don't have a scope in order to test the peak to peak voltage.

    When I measured it with a multimeter it was showing around 250mV, I guess this was an average though. Is there anyway to get the peak to peak voltage without a scope?
     
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    May have been RMS-ish value if the sensor waveform is roughly sinusoidal. No matter, it's only a ball-park figure to guestimate the likely amplitude range to expect as the revs change.
    Does your handbook say what the idle speed (in rpm) is? What is the maximum rpm?
     
  10. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    Idle speed is around 1,500 RPM,red line is at 16,000 RPM.
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    Here's a sim of a suggested circuit to clamp the input to the MCU to keep it within the 0V to 5V range.
    It assumes the sensor output amplitude can vary from 0.25V at 1500 rpm up to 40V at 16000 rpm.
    TachoClamp.PNG
    R1 should be a 1Watt type.
     
  12. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    I have made the below circuit.

    [​IMG]

    It basically clamps the voltage of the sine wave to between 0 and 5V, similar to yours.

    I have connected it to the Arduino and I am actually able to count pulses. I am then converting this to a 12V square wave and sending to the Clocks, and I can see the RPM on the tach. Although it is a little jerky, so maybe my code is not the best or I am getting some noise which is affecting things.
     
  13. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    If the sensor is getting magnetic pulses from a crankshaft reluctor wheel, then that wheel is likely to have a 'missing tooth' to identify a zero-angle position. That could account for the jerkiness perhaps.
     
    GopherT likes this.
  14. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    I don't think it has a missing tooth, here is a picture of the wheel that the crank shaft sensor detects, there are 12 teeth.

    crank teeth.jpg

    I think I am getting the jerkiness because I need a better way to measure the RPM, I am measuring how many pulses I recieve in a short period of time, around 10ms or so. So I think I could improve the accuracy by counting the pulses that occour over a longer time period, but I need the needle to be responsive to rpm changes.
     
  15. crutschow

    Expert

    Mar 14, 2008
    19,018
    5,310
    Counting over a fixed period means you can have a ±1 count deviation, which can be significant in counting for only 10ms, (just 3 pulses total at 1500 RPM).
    Try counting for a longer period, such as 50-100ms. That should still be fairly responsive to sudden RPM changes.
     
  16. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    An alternative would be time the interval between two consecutive pulses, then take a running average of a few of the intervals.
     
    crutschow likes this.
  17. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    I have managed to get a fairly stable output on the gauge. I measured the interval of 30 pulses, and changed the unit of measurement to microseconds rather than milliseconds.

    My only remaining worry if whether the power rating on my resistor and zener is high enough when the engine is going at max rpm. (It is a racing sidecar, it will mostly be doing max or close to max rpm).

    I have no idea what the peak to peak voltage of the incoming sine wave is, or how to work it out. I measured the resistance of the sensor, connecting the meter between the 2 wires it is 435 ohms, How can I work out how much voltage this will produce when some metal goes past it at whatever speed 16,000 rpm equates to?
     
  18. shortbus

    AAC Fanatic!

    Sep 30, 2009
    5,227
    2,814
    Are you sure that the signal isn't divided going to the tach? What I mean is, like in a GM car tach, they only use 4 of the 8 pulses from the distributors reluctor. So the signal is divided by 2 to give a smaller 'working' frequency.
     
  19. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,319
    1,872
    You can't really. If you were measuring 250mV at 1500 rpm (but we don't now if that was peak, or rms, or what), then assuming the output voltage of the sensor is truly proportional to rpm (it probably isn't) and it drives a load of infinite resistance (many times greater than 435Ω) you should in theory get 250mV x 16k/1.5k = 26.7V. My sim, for good measure, assumed 40V.
    No worries. The 10k resistor would limit the zener current to around 3.5mA if the sensor put out 40V.
     
  20. David Schofield

    Thread Starter New Member

    Sep 1, 2016
    29
    3
    The signal coming from the Variable reluctance sensor is a different frequency than the 12V square wave that drives the gauge. The frequency of the square wave output is one sixth of the frequency received from the VR sensor.

    My code works out the number of pulses it would have received in one second, divides that by 6, and creates a 50% duty cycle 12V square wave of that frequency.
     
    shortbus likes this.
Loading...