Oscilloscope on motorcycle

Hello,

I am building an Arduino-based tachometer for my motorcycle (KTM LC4 640 SM 2005).
At the moment, I am trying to figure out which signal to use.
(I know how to count pulses and convert it to rpm using interrupts)

I plugged an oscilloscope (Owon VDS1022) as described on the attached picture:

Test 1 : I plugged the "+" on the ignition coil wire coming from the ECU, and the "-" on the battery "-".
The signal is not stable at all, even when the engine is stopped (ignition switch is on). It should be stable 0V.
When the engine is running, I don't see pulses at all, and the signal is not impacted by rpm varying.
I thought the ECU would generate a nice square signal with variable frequency and stable voltage amplitude.
should I plug the "-" on the bike frame, just next to the ignition coil?

So, for test 2, I decided to plug the oscilloscope on the pickup coil, which is the sensor that the ECU uses to know when to send pulses to the ignition coil. Much better results, I see pulses, whose frequency increases with rpms.
But the amplitude of the signal increases too! The signal is from around 3.5V (at idle) to 7V or more at high rpm.
What should I use between this signal and the Arduino digital pin to constrain the pulse amplitude to around 5V?
A voltage divider may work at high rpm, but the pulse won't be considered as HIGH at low rpm.

Thanks in advance for your help.

HI,
You could use an op-amp amplifier to regulate the voltage to 5 volts DC square wave. Just run 5 volts to the op-amp and do a 2.5 times amplification.

You could use a 2N7002 MOSFET, connect the source to ground, the gate to your signal and pull up the output to 5V with maybe a 1K resistor. The drain will be your 5V square wave signal. You may have to add protection to the gate but you show no inductive component. A series resistor and a 5V zener on the gate would not hurt.

Thank you guys for your quick replies! It looks like both of you speak about the Schmitt trigger.
The first one is based on an op-amp, the second is based on Mosfet.
Am I right?

3run0:
But the amplitude of the signal increases too! The signal is from around 3.5V (at idle) to 7V or more at high rpm.
What should I use between this signal and the Arduino digital pin to constrain the pulse amplitude to around 5V?

A comparator. Set the threshold voltage where you like with a divider from 5V, then you’ll get
clean logic signal out of the comparator, but note most comparators require a pull-up resistor.

You can protect the input of the comparator with a resistor and schottky protection diodes
to the rails. However there is some risk of this interfering with its normal operation if the
resistor is too low in value - I’d suggest trying about 10k initially.

Here an optocoupler might be too slow, and probably takes too much current from the pickup
coil. Otherwise optocouplers are great for interfacing mismatched voltage signals safely.

Ok, glad to see there is a "simple" solution for the pickup coil signal.
I will try. Maybe I will post a schematic circuit and ask for your advice first.

Any idea why the signal from the ECU to the ignition coil (test 1 above) is so bad, even when the engine is off?
The attached picture shows that signal.

If the engine is not running or the engine is not cranking... then the signal is erroneous from un shielded cables. The only time the computer will send a signal to the coil it will be because the sparkplug needs to spark. You are probably only seeing EMI from the computer. If the engine is running you will probably see a crazy hairy signal because the choke to keep the EMI out is in the computer. When the electromagnetic field collapses it induces voltage spikes on both sides of the coil. Google sparkplug dwell primary vs secondary. Are you in London?

The noise is not coming from the laptop, because when the ignition switch is off, then the signal is stable at 0V.
The noise is coming as soon as the ignition switch is on.
Oh wait! Maybe the computer you're speakin about is the ECU of the bike...

Anyway, I think I will use the pickup coil instead.

Are you in London?

no...

Hi,

Can you correct me if anything below is wrong:
I attached a picture of the circuit I'm planning to build.

  1. the input signal, coming from the pickup coil, has a 3.5V to 7V amplitude and 16 to 160Hz, depending on the engine rpm. It has positive and negative amplitude values.

  2. I do not know if R3 is necessary. Can you confirm? if it is required, which value?

  3. The Schottky diode will suppress the negative part of the signal, before going to the op amp.

  4. the signal is compared to Vref (2V, that I will supply from a voltage divider).
    Depending on R1 (10kOhm) and R2 (40kOhm), I calculated the high threshold voltage: 3V.
    And the low threshold voltage: 1V.
    I should get what is shown on the 2nd picture, right?

Again, thank you for your time!

Just get a VR conditioner, like the MAX9926.
https://www.digikey.com/en/products/detail/maxim-integrated/MAX9926UAEE-T/3879279

3run0:
The noise is not coming from the laptop, because when the ignition switch is off, then the signal is stable at 0V.
The noise is coming as soon as the ignition switch is on.
Oh wait! Maybe the computer you're speakin about is the ECU of the bike...

Anyway, I think I will use the pickup coil instead.
no...

IF your machine has any gauges that are functional, then the stray signal may be coming from them. Have you used shielded wire to them and used bypass capacitors across every meter, etc?
Paul

Hi guys,

I eventually found something that seems to work.
I now have a good square wave between 0.6 and 3.7V that can be interpreted by an arduino digital pin.

Here's the final result:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.