 # Zener diode as voltage shifter

Hi. I have to read with Arduino nano some signals between 12V and 14V, from an external circuit, through analogic inputs. I'm thinking to use some zener diodes, but I don't know how to calculate the resistor value. My requirement is to draw less current possibile front the circuit (and be sure that nothing will catch fire). The zener diodes I have are 12V 0.5W.
Thanks To be clear, you want 12V to become 0V and 14V to become 2V, is that correct?

The zener diodes I have are 12V 0.5W.

Maximum possible current 0.5W / 12 = 42mA
Maximum voltage across the resistor is 2V
2V / 0.042 = 47ohms minimum value for the resistor.

The problem is that close to 12V input there will be very little current. The exact voltage across the Zener will vary according to current through it, which will depend on the input voltage. It will also vary with temperature. How accurate do you need this to be?

I would probably use a current source through a resistor to give a fixed voltage drop across a resistor instead of a Zener.

I see this is your first post; for posting a proper schematic in you post so we don't have to download it ++Karma;

Yes, you could try that, but, it is
best to use a simple voltage
divider using 2 resistors. That will
be more accurate, repeatable
and can draw less current.
Herb

PerryBebbington:
To be clear, you want 12V to become 0V and 14V to become 2V, is that correct?

Yes, exactly.

PerryBebbington:
How accurate do you need this to be?

Not too much, basically I want to distinguish 12.20 V and 13.50 V.

herbschwarz:
Yes, you could try that, but, it is
best to use a simple voltage
divider using 2 resistors. That will
be more accurate, repeatable
and can draw less current.
Herb

That way I won't have a voltage drop or something else in the point where I'm reading the voltage? I need it to remain stable because it is also used by another device.

Not too much, basically I want to distinguish 12.20 V and 13.50 V.

In that case use what Herb suggested.

That way I won't have a voltage drop or something else in the point where I'm reading the voltage? I need it to remain stable because it is also used by another device.

No more than with the Zener diode idea. I suggest you make the bottom resistor 10k Ohms. I leave you to calculate the top resistor. By all means come back and ask if you got it right, but I am deliberately not doing it for you as I think you should at least try yourself.

Enjoy.

Zener voltage depends on the current through it, and they are temp dependent (unless it's a 5.6volt zener).

Use a voltage divider to 1volt. Anything between 1k:12k to 10k:120k will do (ratio 1:12).
Then read the voltage on the tap with 1.1volt Aref enabled in setup().
See what A/D values you get with the two voltages, and use an if() statement using those A/D values.
Let us know if you want help with that.
Leo..

4.7k Ohms should be okay?

Err, no.

PerryBebbington:
Err, no.

I calculated the bottom resistor instead the top...

PerryBebbington:
I leave you to calculate the top resistor.

20k should be okay?

20k should be okay?

I think you are guessing.

You shouldn't calculate the divider for 5volt (default Aref).
Default Aref (5volt supply) is potentially too unstable for a threshold detector.
Default Aref on a Nano can vary between 4.5volt and 5volt, depending on how you power it.

Most Arduinos have a stable internal reference. Use that instead.
Leo..

Your circuit would work but you would have no protection from transients, they would be passed into the arduino. Change the zener to a resistor, this would form a divider. The zener replacement something in the 40K range and the R in the 20K range. Use this calculator: http://www.ohmslawcalculator.com/voltage-divider-calculator to help you make the decision. The arduino will work with more then 5 volts on the input but it has to be current limited, the resistor divider will do just that. Look on the arduino micro data sheet and you can find what voltage range it will accept as a logic 1 or logic 0. I try to size it so I have about 4 Volts at my minimum voltage. The high impedance prevents you from destroying the arduino if ground opens up.
This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

For stable voltage readings of the input you indeed must use the internal 1.1V reference (note: it has 10% tolerance so must be calibrated for each individual Arduino board).

So you'd need a 1:13 voltage divider, bringing down 13.5V to 0.96V and 12.2V to 0.87V - giving you about 90 ADC points difference.

If you want better resolution, you can use an OpAmp to increase this difference to span more of the 0-1.1V range.

Yet another XY problem by the looks of it.

Why do you want to distinguish 12.20 V and 13.50 V?

What is the source of the voltage?

What is going to be "used by another device". What is that device?