Hi!

I am using the Sainsmart Display Shield that uses a voltage divider and 5 buttons to transform the 5V voltage into 6 analog values. But I need 6 buttons and now I am too stupid to select the correct resistor values.

This is the

My problem is, that I don’t find a formula/rule to the select the resistors in a way, that the voltage at AD0 is spread evenly between 0V and 5V.

I did find a solution with valid E96 values. But then I recognized that +/-1% at 3.01K is not the same as at 332 ohm. So the gaps between the resistor values must be higher the more switches I use.

My current solutions is:

R2 = 2.2k

R3 = 332 ohm

R4 = 665 ohm

R5 = 1k21

R6 = 2k15

R7 = 3k01

This results into the following voltages:

3.850V

3.322V

2.504V

1.560V

0.656V

0.000V

But there must be a better solution with steps of 0.700V. O.O

How can I calculate this kind of voltage dividers?