Dealing with 12V signals spiking to 40+V

Hi

I'm looking to take an input signal from a coil pack which is a nominal 12V and feed it into an Ardunio Mega 2560. I have VERY basic electronics knowledge so am looking for the simplest solution possible.

I thought I would use a voltage divider with a 10k and 1k resistor but this drops the nominal 12V value to below the threshold for the Arduino to see a state change on the pin.

So my question is what's the easiest way to take a 12V signal which can spike up to ~40-50V and make it a nice clean 5V input. Is it optos?

You're talking about input signals, right? Not the power supply?

[u]Here[/u] are some over-voltage protection circuits. (I'd increase the resistor to between 1`K & 10K for an Arduino input.)

You can optionally add a "protection diode" to the Arduino input following a 12:5 voltage divider.

Is it optos?

You could potentially burn-up an opto-isolator with a spike. You'd probably be OK for short duration spikes, and the Arduino would still be protected if the opto-isolator fails.

The easiest way is not the best way but...

If it is an automotive environment, you should assume the running voltage is 15v (the alternator is probably running at around 14.5v). So a 2/1 voltage divider will get you 5v.

If you are not trying to measure analog voltage but instead just detecting 12v or ground, you do not need a voltage divider.

However you do need to prevent an overvoltage sending more than 1ma through the internal protection diodes. A 50k resistor would be a minimum protection against 50v but automotive environments can have 200v spikes on occasion so a 200k resistor might be a better idea.

A 200k and 100k voltage divider would allow you to measure voltage but it would be little slow from the high resistance so a 0.1 µF capacitor across the 100k resistor would help.

Of course it is not best practice to depend on the arduino internal protection diodes. That 200k resistor is a bare minimum.

I got my opinion here.

A better solution might be here.

what's the easiest way to take a 12V signal which can spike up to ~40-50V

You might want to add a 12V zener diode to clamp the spike first.

Possibly simpler than Zener:

Input02.png

Paul’s “Spikes Away” circuit (LTSPICE)

Legend: Red = V1
Blue = D1 Anode
Green = Vout

(yeah, I know it’s called a Transient Filter but I like “Spike Away”)

A 1:2 (22k:47k) voltage divider with a Schottky diode clamp from pin to VCC. Leo..

A 1:2 (22k:47k) voltage divider with a Schottky diode clamp from pin to VCC.

I don't see how that would work Leo considering the circuit input voltage is 12V and the 40V spikes are inherent in the type of environment. It needs to supply 12V all the time but filter out 40V spikes (like Paul's circuit)

If you give me the schematic I'll simulate it but I didn't bother with the voltage divider because then you would no longer have 12V, and in case it isn't obvious, the 40V spikes are unpredictable.

My circuit is the same as Paul__B, but without D1. D1 can be omitted if D2 has a lower threshold voltage than a 1N4148. Schottky diodes, like the 1N5819, should be in every toolbox. Leo..

D1 can be omitted if D2 has a lower threshold voltage than a 1N4148.
Schottky diodes, like the 1N5819, should be in every toolbox.

You mean like the BAT54 ?

Yes. Any small signal Schottky diode will do. Point is that the external diode must conduct before the internal one does. Measured internal threshold once at ~0.65volt@1mA.

The BAT54S could protect against positive and negative spikes. pin1 to ground, pin2 to VCC, pin3 to pin.

But all of this is a bit academic. There must be similar protection diodes inside the MCU, although Atmel has not specified it. 47k between source and pin 'should' already be safe enough for the occasional spike. Leo..

Wawa: My circuit is the same as Paul__B, but without D1. D1 can be omitted if D2 has a lower threshold voltage than a 1N4148.

Did you - or not - notice what else D1 does?

Wawa: Schottky diodes, like the 1N5819, should be in every toolbox.

Probably are, if I could find them. But 1N914 are more ubiquitous. :grinning:

This circuit has been used in a fully qualified automotive device.

What you don’t see is the possibility of +/- 1500v spikes (short but are there)
And a possible 100ms 50V or so “spike”

I would use 5.1V TVS diode for D5

The input is " from track"
The output is “ESP”

R, C, D filters are good and worthwhile but, I see no inductors. Also, the starter motor is the biggest spike generator, followed by the fuel pump, windshield wipers, door locks, etc, Herb