# 12v clipping to a 5v (pulled high) input

Hi,

I have a tacho reader that i have working on a 5v car circuit, but I am trying to get it to work on another car with a 12v circuit.

The pickup on the 12v circuit is from the coil(-) on the car. It's a pulse from 12v high to 12v low.

The circuit that works on the 5v car circuit is basically just a 5v zener facing to limit nothing (positive) coming in, and only earth going out, and that is pulled high with a 10k and connected to an attiny input. So every pulse the input line goes low then comes back up. I know there's other ways of doing it but this limits interference with any other tacho on the same line.

But the problem is how to stop 12v from coming through the 5v zener on the 12v circuit?

The first time i hooked it up, the zener let everything through and the attiny broke...

Currently it goes from the 12v coil (-) through a 4k7 to where it meets two zeners, one to ground, and one to the input line which is pulled high with a 10k. Both zeners (the lined end) are facing towards the 4k7. Now the attiny (new one) only chucks a fit when the line is connected but still works again when not connected....

I'm more of a programmer than a electronics guy..Does anyone know the right set up to use for this case?

Basically the 12v should clip low to 0v. I have a couple of schottky's 1n5819 would they be better?

Thanks, Mike

Clipping with schottkys is reasonably simple:

If you run 12v through the 22r resistor, won't it then go up and overload the 5v input to 12v? And the full voltage still go through to the arduino?

Also, I have i tested the current set up on a car battery at 12.8v and it worked (touching the tacho input lead on the terminals). But also the zeners stopped the full 12v, so I'm thinking with no load its fine..but they pass their limits when there is.

I think MarkT is suggesting a 22 kilohm resistor.

I can't run anything more than a 10k before the other 10k pullup, or it will just prefer to stay high

SGde3a:
I can't run anything more than a 10k before the other 10k pullup, or it will just prefer to stay high

Mark's circuit is dead accurate, so if you are suggesting any other arrangement and any lesser resistance than 22 thousand ohms, you may well have a problem. Note he specified Schottky diodes, not Zeners.

In fact, as a matter of protection, the 22k or greater resistor should actually be two or three resistors in series to withstand the several hundred volts on the coil primary.

Thanks,

I think mark's circuit is from here: Protection

It says 22r. I was just wondering how it all worked but I think I figured it out... the diode's peak reverse voltage rating means that when it is surpassed it allows the rest to flow to ground... But i need to block all (+) voltage and just allow earth. The zener's i have are 100v. But originally the zener failed to stop / protect the input line.. Now there is another zener that earths when the 100v is surpassed, and it protects the line, and a 4k7 is before both.. But the noise/readings really mess things up.

the diode's peak reverse voltage rating means that when it is surpassed it allows the rest to flow to ground

Not sure that's right. Looking at Mark's diagram (and ignoring the value of R for the moment) ...

If the input goes above +5V, the top diode is forward biased and current flows from input, through R, through top diode and into the +ve power supply. Let's assume for now that the power supply is able to handle this. The R limits the amount of current that flows.

Most of the over-voltage will be dropped across R. The input pin will be at a voltage of +5V plus the forward voltage drop of the top diode. Schottky diodes are recommended because they have a low voltage drop.

If the input goes below 0V, the bottom diode is forward biased. Current flows from the power supply 0V through the bottom diode, through R and into the input.

The input pin will be at 0V minus the diode forward voltage drop.

Check out the link.. Down the bottom of the page he says the same can be done with just the bottom diode...

I've been staring at them for an hour or 2... the other ones I've seen are just a zener/schottky with a specific voltage straight to ground, and the other end powering a device at reduced voltage... I think they let everything over their specific current rating through to ground

22 k ohms, 2 schottkys, no pull-up or pull-downs. No I didn't get the circuit from that
page, I plucked 22k as high enough to avoid any risk of pulling the 5V rail up above
5V in any likely context.

I need to work it out for myself whats going on.

I think in that diagram if you use 5v rated diodes, the bottom one will pull anything over +5v positive to ground, and the top diode will pull anything over -5 negative to the positive rail..therefore the 22r works.

Going to experiment with a 5v rated diode to try to reduce the negative voltage because it basically stops all the positive, which is what i want. Thanks all.

If you decide to use a 22R resistor, make sure you choose one with sufficient power rating.

+12V input will give 7V voltage drop across the resistor. The power dissipated will be 2.3W.

The pickup on the 12v circuit is from the coil(-) on the car. It's a pulse from 12v high to 12v low.

If that's -12V, the voltage drop will be closer to 12V and the power over 6W.

Let me assure you the impulse on the ignition coil (primary) of a car is not 12V!

SGde3a:
I need to work it out for myself whats going on.

I think in that diagram if you use 5v rated diodes, the bottom one will pull anything over +5v positive to ground, and the top diode will pull anything over -5 negative to the positive rail..therefore the 22r works.

Going to experiment with a 5v rated diode to try to reduce the negative voltage because it basically stops all the positive, which is what i want. Thanks all.

20V, 40V, 100V, makes no difference so long as it only lets current flow one way.

These are not zener diodes, they are schottky diodes.