I am looking at using an atmega328p to sense up to 27 volts from a battery bank. I think the right strategy is to use a voltage divider with R1=768 and R2=107. In this ratio, it get 3.3 volts at 27 volts incoming. Expected values would be 12 volts incoming (1 lead acid or deep cycle car battery). I foresee the potential use of two batteries in series.
Question 1) If the Arduino board operates at 3.3v, than the ADC range should be no more than 3.3 volts? How much can I go over before damaging the channel/ processor?
Question 2) Its a 3.3 volt zener diode a typical design to prevent damaging the ADC? Would you go lower to provide a factor of safety?
Question 3) Is there a drawback to going really high on the resistor values such that I am not wasting power? What magnitude of resistor values do you recommend? If it helps, I do not foresee the need for rapid sampling rates (maybe 1x a minute).
If you are driving the board at 3v3, then that is also the default voltage reference for the ADC and this should not be exceeded.
I think you can use up to a 10k resistor on the bottom end of the voltage divider without affecting the accuracy of the ADC. Obviously, you have to re-calculate the value of the top resistor.
A 3v3 zener diode seems a good idea to protect the ADC, for example, if the bottom end of the voltage divider became detached.
You could also use a P channel mosfet in a high side switch configuration to provide power only as needed to the voltage divider during a sampling period.
With a voltage divider, the existing "top" resistor serves as the current-limiting resistor so you don't need the 100 Ohm resistor. (And 100 Ohms is a bit low if it's used.)
Usually about 10k total for the voltage divider is about right. Lower value resistors will "pull" more current from the source and if the source resistance is in the range of the voltage divider the voltage will drop.
Higher resistance is more prone to noise pickup. (Long unshielded wires are also more prone to noise pickup.) A capacitor between the Arduino's analog input and ground will help to knock-down any noise (usually 0.1uF to 1uF). The capacitor (along with the resistors) makes a low-pass filter but that doesn't affect DC.
Reconsider your upper limit: The charge voltage for a lead acid battery typically ranges from 2.30 volts per cell (for float charging) to 2.45 volts per cell (for fast charging). For a standard 12-volt battery, this translates to a total charging voltage of approximately 13.8 to 14.7 volts. Double for a 24V battery.
Then you should use the internal 1.1volt reference, which also makes the measurements independent of processor supply voltage variations. It also gives you increased over-voltage protection.
Calculate the divider for 1volt out at 27volt input. 15k:390k is perfect.
Switch to 1.1volt Aref in setup(). analogReference(INTERNAL);
Your 27volt input is now protected to at least 90volt (with VCC=3.3volt).
The internal clamping diodes of the ATmega protect even further, to at least 400volt.
Don't use zener diodes. They introduce non-linear errors in your measurements.
Leo..