Calculating different type of Voltage Divider?

I am using 2 spst switches to get four different values to input into my last available analog port (nano).

It's a voltage divider, but not a usual one (does this structure have a name?).

The image shows my current resistor values.

Both switches open output: ~512

Both switches closed output: ~850

SPST1 open/SPST2 closed output: ~200

SPST1 closed/SPST2 open output: ~975

All good enough, but I'm hoping to find even more disparate results using math (I've been guessing up to now).

Can someone provide guidance?

So I don't have to download it:

OP: If you want to learn how to do this: How To Embed Image In Post

This is still a Voltage Divider, just with switchable values.

A formula for finding the voltage is:

V[sub]A[/sub] = [V[sub]CC[/sub] * (R2║R4)] / [(R1║R3) + (R2║R4)]

Where:

  • In this case V[sub]CC[/sub] is +5V
  • R2║R4 is (R2R4)/(R2 + R4) -- if the switch is open, then it becomes merely R2
  • R1║R3 is (R1R3)/(R1 + R3) -- if the switch is open, then it becomes merely R1
  • V[sub]A[/sub] is the output voltage that is fed to the Arduino Analog input

And, FYI, your circuit is drawn incorrectly. The switches are wired wrong. For example, the side of R4 that connects to the switch, needs to be moved to the currently unused terminal. Otherwise, the path between R4 and GND, will always be open. The same for the switch on R3. And, also, technically, that is not the symbol for a SPST. Those are SPDT.

In the circuit diagram you posted, the switches don't do anything useful, because the common terminal is not connected to anything.

I'm hoping to find even more disparate results

Use a different arrangement. This one works fine:

yeah, in my haste, I screwed up the orientation of the spst switches.

Is there an ideal result that maximizes the voltage differences for only two spst switches?

Is there an ideal result

Yes. Choose resistors (zero Ohms is an option) that divide up the total voltage interval into the largest possible segments. Something like the circuit in reply #2 is convenient, because that just uses the switches to pick a different divider.

Flooooooooooootie:
yeah, in my haste, I screwed up the orientation of the spst switches.

Is there an ideal result that maximizes the voltage differences for only two spst switches?

I usually set up a problem like this in a spreadsheet [LibreOffice Calc in my case]. That makes it easy to try different values.