Electronic – Voltage divider for ATtiny85’s ADC

adcattinyresistorsvoltage divider

I want to measure a voltage of a battery (14 to 25 V) with an ATtiny85. The plan is to simply use two reistors. My ATtiny will get a VCC of 5V, so I need to reduce the voltage to 0 to 5 V for the ADC. Based on my calculations, 15k and 3.3k gives the approximate desired range.

enter image description here

USV is a valid ADC Pin on the ATtiny85.

Is it really this simple?

Best Answer

The divider idea works for the A/D input but it does put a continuous load on the battery. Depending on the type of battery this could discharge the battery in time. You may want to consider optimizing the resistor values to be larger to put less load on the battery. Another alternative is to use a small MOSFET to gate power to the voltage divider only at the times when you want the A/D reading to be taken.