Mosaic
Well-Known Member
Hi all:
Thought I'd share this:
I built a Pic tacho using the counter feature of timer0 (16f886). Basically it would calc counts/pulses over a 20 ms ISR and then calc the RPM from that. All very straightforward.
However, the tacho needs to accept 5V or 12v signals plus direct from the coil -ve primary (perhaps 150V).
Well I used a 4n25 optoisolator fed by the following sequence , pulse signal goes into a pair of forward biased 1n4001 diodes then a 390 ohm resistor then to the opto +ve in. Include a .22uf cap to gnd at the junction of the 2nd diode and the 390 ohm and include a .01uf cap to gnd at the input of the opto. The raw signal pulse is fed into the first 1n4001.
That's all good for 3-5VDC or 12VDC pulses from a Hall sensor or ECU. In order to handle a 150V pulse all u need to do is add a 10K resistor in series with the 1n4001 input and you are done. All tested and stable!.
The ringing extra counts are absorbed by the caps and diode voltage drop. This is suitable for an Inductive coil, not a capacitive discharge coil.
Thought I'd share this:
I built a Pic tacho using the counter feature of timer0 (16f886). Basically it would calc counts/pulses over a 20 ms ISR and then calc the RPM from that. All very straightforward.
However, the tacho needs to accept 5V or 12v signals plus direct from the coil -ve primary (perhaps 150V).
Well I used a 4n25 optoisolator fed by the following sequence , pulse signal goes into a pair of forward biased 1n4001 diodes then a 390 ohm resistor then to the opto +ve in. Include a .22uf cap to gnd at the junction of the 2nd diode and the 390 ohm and include a .01uf cap to gnd at the input of the opto. The raw signal pulse is fed into the first 1n4001.
That's all good for 3-5VDC or 12VDC pulses from a Hall sensor or ECU. In order to handle a 150V pulse all u need to do is add a 10K resistor in series with the 1n4001 input and you are done. All tested and stable!.
The ringing extra counts are absorbed by the caps and diode voltage drop. This is suitable for an Inductive coil, not a capacitive discharge coil.