Trying to understand this schematic for multi-button single analog input

from the pighixx Arduino Connections;

Most of the circuits i've seen don't connect the series to ground and i had to calculate what the difference was with this pighixx version.

After simplifying the schematic i got;

and now i get that it makes each interval Vout linear with same-valued resistors.

With the more common layout (that i've seen), the solution was to use different valued resistors so that the curve didn't level off towards the last resistor/buttons.

My question now is; with the 5V and GND connected, wouldn't this unnecessarily drain the voltage source even with no buttons pressed ?

My question now is; with the 5V and GND connected, wouldn't this unnecessarily drain the voltage source even with no buttons pressed ?

I suppose so, but with V=IR and I=V/R it's 5 / 5000 which is 1mA

I have rechargeable AAs rated 2800 mAh, so that's 2800 hours, so that's about 4 months....

Hi, good to see a forum thread with a poster just checking his already proven answer, good stuff.
I can understand your concern about the resistor chain drawing current but as JimboZA posted, the current drain is negligible.
Hope you enjoy your electronic and arduino experience.

Tom..... :slight_smile:

TomGeorge:
Hi, good to see a forum thread with a poster just checking his already proven answer, good stuff.
I can understand your concern about the resistor chain drawing current but as JimboZA posted, the current drain is negligible.
Hope you enjoy your electronic and arduino experience.

Tom..... :slight_smile:

Thanks Tom, am really enjoying it - there's just so much to learn that "slow & steady" sometimes doesn't cut it.... Am glad to know that i've propery grasped the theory of the "voltage drain" though - it's the first principles that i wanted to get right, aside from it being negligible.

If one didn't understand the difference between this pighixx layout and the more common version, they'd just use it as the "standard multi-button single analog input layout" and maybe apply it to other more expansive circuits and then wonder why there's current still flowing.

Although i suppose when one is more adept at reading circuits, such a drain should not go unnoticed.

Can someone please explain why the 1MOhm resistor is there ?

I get that the series of resistors act as a voltage divider and that the analog pin gets a different voltage depending on which button is pressed. In fact, I've used this arrangement myself on a shield, but I'm struggling to see what use the 1MOhm Resistor actually has, unless it is just to pull the input low when no buttons are pressed?

spynappels:
..., unless it is just to pull the input low when no buttons are pressed?

That's exactly what it is for: without any button pressed the input is floating and will return any value. Did YOUR circuit work without it?