# Electronic Circuits and Projects Forum

## Multiplex switches

1. Originally Posted by 3v0
String 4 1K resistors in series. Attach one terminal of each switch to a junction common to 2 resistors. Attach one end resistor to gnd and the other to +5. Tie all the unused switch terminals together and then to an analog input pin. Use a weak pullup on the pin say 20K.
Because 3v0 said to

2. Also when all the switches are open the input to the analog pin will be floating/undefined (not driven) tristated..
You need a pull up or pull down to take care of that.

3. Originally Posted by AtomSoft
Because 3v0 said to
Yes but you set it up as a current limiting resistor.
See the schematic I added to my XXXX second post. And I am not sure what value would be best. At least 10K. I would try the 100K if it works.

4. oh oh so it must return a value so we close the circuit no matter what and just care if the voltage is one of mines.
Like

found the switches:

5. Originally Posted by AtomSoft
oh oh so it must return a value so we close the circuit no matter what and just care if the voltage is one of mines.
Sort of. A pullup resistor is used to maintain a small, stable voltage on an input pin. If you left it off, your circuit MIGHT work correctly, but the pin's voltage may fluctuate, causing unwanted false inputs.

6. Hey we went from 3 to 4 switches

You have the basic idea.

7. Originally Posted by IČR
Sort of. A pullup resistor is used to maintain a small, stable voltage on an input pin. If you left it off, your circuit MIGHT work correctly, but the pin's voltage may fluctuate, causing unwanted false inputs.
I am not an EE. But I would have said steady voltage and small current?

8. ok cool. So there is no definite way to calculate the divided voltages right? Like i would have to place resistors and manually check each one to determine drop ?
All i know in ohms law is how to get 1 value from 2 others. I don't know how to subtract like 100k ohms from 5v to determine the drop on the resistor.

Hey we went from 3 to 4 switches

You have the basic idea.
yeah the concept is in the head but the head doesnt know how to draw lol

EDIT: Found this

9. It's simple. Consider a 20 kOhm resistor in series with a 5 kOhm resistor, with 10 V applied across them. You want to determine the voltage at the point between them. First thing you do is calculate the current through the resistors:

I = V / R

I = 10 / (15 k + 5 k)

I = .5 mA

Now that you know that, you can calculate the voltage drop across each resistor:

V = I x R

V1 = .5 mA x 15 k

V1 = 7.5 V

V2 = .5 mA x 5 k

V2 = 2.5 V

Reality check: the two voltages should sum to the total supply voltage. 7.5 + 2.5 = 10. If you have more than two resistors, you can just extend this process. Now, work out your voltage drops.

10. Originally Posted by 3v0
I am not an EE. But I would have said steady voltage and small current?
A negligible current. The inputs are high impedance and measure voltage, not current.

« First 12345612 ... Last »
 Tags
 Similar Threads Thread Starter Forum Replies Last Post PIC Switch Management Techniques Mike, K8LH Microcontrollers 12 25th March 2011, 12:08 PM Good Electronic Supply's Sites, Everyone Come On In! :P Electric Rain General Electronics Chat 44 27th August 2007, 11:06 PM 6 momentary switches 6 LEDs Digger7 Electronic Projects Design/Ideas/Reviews 20 22nd February 2007, 12:16 PM Analog Switches v Relays for EPROM programmer Tickled_Pink Electronic Projects Design/Ideas/Reviews 0 12th March 2004, 10:13 AM Multiplex circuit question... Rescue1 Electronic Projects Design/Ideas/Reviews 3 9th November 2003, 09:28 AM
Electronic Circuits  |  Learning Electronics

Join our community with over 100,000 Members! It's free, easy and when you're logged in you have many more features! Click to register.
Page Time: 0.13300 seconds      Memory: 7,735 KB      Queries: 16      Templates: 0