I have a low voltage AC sign wave 4vPP and I want to feed this into a Arduino digital input as a square wave. The sign wave is the output of a crank position sensor. Can anyone suggest/post a schematic that will do this ideally using minimal components e.g. an IC. the input can be just the positive side of the wave and I will simply double it to get a RPM (attached a pic of the output)
Thanks for the help in advance
P.S. as this is a crank sensor it should not interfere with the original sinewave
A simple centre-biassed and capacitor coupled comparator such as can be done with an LM311.
Example - using the LM322, it would also need a pull-up resistor to logic power. Plus a coupling capacitor at the input, if the signal is DC coupled.
R1 and C1 should have a long enough time constant so there is no significant drift within a single cycle of the input signal, but not so long that it does not settle to the correct bias point in a reasonable time.
Thanks for the reply but that lost me as I don't really know to calculate those values, could a optocoupler with schmitt trigger not do the job (only stabbing in the newbie dark here
Are you trying to detect the missing tooth position (Which will be a timing mark.) or just the total number of transitionsb per revolution ?Either could be useed to display RPM. (But with a different calculation in the software.
Edit. I have just re read your first post and that indicated that you want to detect the missing tooth part of the waveform. Are you atempting to detect the missing pulse in software or do you require the hardware to do that ?
It could, but you would need a driver of some sort to supply the LED current while not significantly loading the sensor output.
That would likely be not all that different to the circuit above.
You may get away with just a CMOS schmitt trigger gate fed via eg. a 0.1uF cap and 10K resistor, with a couple of 1M resistors from input to logic power and ground.
That would do a similar thing to the LM311 comparator circuit, as long as the signal amplitude is always high enough & if everything is running from supplies sharing the same ground, no opto isolator is needed.
If it must be isolated, the output of the schmitt gate could be used to drive the opto LED via a resistor.
Are you trying to detect the missing tooth position (Which will be a timing mark.) or just the total number of transitionsb per revolution ?Either could be useed to display RPM. (But with a different calculation in the software.
As the frequency will vary over quite a large range isimple monostable missing pulse detector would not work. The only way I can think of detecting the missing pulse would be to use a phase locked loop synchronised to the basic sine wave frequency. Would is not be simpler to use a pulse from the ECU that triggers the injectors or spark plugs ?
As the frequency will vary over quite a large range isimple monostable missing pulse detector would not work. The only way I can think of detecting the missing pulse would be to use a phase locked loop synchronised to the basic sine wave frequency. Would is not be simpler to use a pulse from the ECU that triggers the injectors or spark plugs ?
I'm not looking for a missing pulse, I just want the pulse (ignore that scope where it looks like one pulse is missing, I am not sure what that is about but I'm not worried about it)
I'm not looking for a missing pulse, I just want the pulse (ignore that scope where it looks like one pulse is missing, I am not sure what that is about but I'm not worried about it)
I'm not looking for a missing pulse, I just want the pulse (ignore that scope where it looks like one pulse is missing, I am not sure what that is about but I'm not worried about it)
As the frequency will vary over quite a large range isimple monostable missing pulse detector would not work. The only way I can think of detecting the missing pulse would be to use a phase locked loop synchronised to the basic sine wave frequency. Would is not be simpler to use a pulse from the ECU that triggers the injectors or spark plugs ?
I'm still learning the whole wiring of the bike, so I will go look for something that comes from the ECU, I hope there is something (any pointers would be great, I have added the wiring diagram)
The missing pulse is used much in advance of TDC. The missing pulse creates a point which can be reliably detected to be used as the basic timing reference.
The other teeth are also used for misfire monitoring. The waveform does not have the same amplitude over a complete revolution, due to crankshaft acceleration/deceleration, the amplitude variation becomes more noticeable at lower RPM and is indicative of the compression/power strokes.
Where there is a lack of expected crankshaft acceleration on the power stroke, the ECU recognizes that a misfire has occurred.....exceed a certain threshold of misfire counts and a fault code will be set and the MIL will illuminate, in extreme cases the MIL will start flashing.
Yes, think I've been barking up the wrong tree, it looks like a digital tacho so going to check this out tomorrow. Thanks for all the help so far though.