to monitor 5vdc and 12vdc supplies I am intending to build a dvm that will take two analog inputs through two divider networks and display the results on a small lcd.
what is the formula to figure out my divider values? Current isnt that much of a concern, other than protecting the Arduino board.
thanks, and so I am assuming that the higher the resistance (for a given set/ratio), the lower the current at the I/O pin?
Also, if I set my divider up to deliver 5v for a 12v input, my 1023 steps are linearly spread over the entire range. If I know that my voltage will reach a steady state at between 11.5 and 12.5, is there any way to set up a circuit/divider that moves my ADC resolution to that end of the scale? Would a zener/resistor circuit work (eg: 10v zener?), so any voltage under 10v doesnt get to my divider network, anything over 10 gets through and therefore divided into 1023 steps.
like this?
Zener
-------------/<|------------- (+) Vout
|
|
Z
Z R1
Z
|
|
-------------------------------- (-)
Vout should be all voltage above zener voltage, right? so I could then feed Vout into an analog I/O pin, for protection, I should probably prevent over voltage from reaching the pin, but not sure how.
I'm not really a hardware guy, anyone have any ideas?
The problem of using a zener like this is that the knee is a curve and not a square edge like you want it to be. Therefore the voltage doped across the zener will not be constant like you want but would change. This would result in a repeatable but non liner reading. You might be able to calibrate it out.
So, if I care about the voltage granularity between 11.5 and 12.5 volts and I use a 10 volt zener would the non-linearity be close enough to 10 volts such that by the time the voltage got to 11.5 and above it would be linear? Also how do I figure R1?
10 volts such that by the time the voltage got to 11.5 and above it would be linear
That depends entirely on the characteristics of the diode. This is likely to be reasonably consistent between individual diodes of the same manufacturer.
Also how do I figure R1
It does not matter too much what R1 is, it's job is just to drop the remaining voltage. If it is large then there is not much current drawn from the source. So just go for something that gives a few milli amps at full scale. However, changing R1 will change where you are on the voltage / current curve and thus change the non linearity. From that point of view the more current you have the more liner it is.