Quote:
Originally Posted by tdressel
Can you explain more about the 'simple resistor circuit...' idea above?
|
If you have a bunch of buttons with only one needing to be pressed at a time, it's simple. Wire up a string of resistors between power and common, putting a button from each resistor-resistor connection to the analog input. You'll present a different voltage when you press different buttons.
If you need to be able to sense more than one switch simultaneously, use a simple D-to-A circuit. Depending on how many switches there are, I would suggest either a "powers of two" scheme (which either takes many different resistor values or a whole lot of identical resistors) or an "R-2R ladder" (which can be made with a smaller bunch of identical resistors but requires double-throw switches).