piclist 2007\11\28\175349a >
Thread: four buttons on one A/D pin
www.piclist.com/techref/io/atod.htm?key=a%2Fd
flavicon
face BY : Rob Robson email (remove spam text)



Here's a head-scratcher for the brain trust.  I want to connect four momentary pushbuttons to a single A/D input such that each and every combination of pressed buttons will present a unique voltage to the A/D.  To minimize errors, it seems there should be a wide and fairly even distribution between the fifteen possible voltage levels (not including the "no-buttons-pressed" option).

The proposed circuit consists of four different resistor values, each one tied between the A/D input and a pushbutton.  The other side of each pushbutton is tied to ground.  A fifth resistor ties the A/D input to +5V to complete the voltage divider.

My limited math abilities are hampering my attempts to optimize the five resistor values for a nice safe spread between all the resulting single- and multiple-button voltages.  Has anyone seen or done something like this?  Googling hasn't turned up anything so far.  I'm completely open to changing the circuit if there's a more clever arrangement.

Many thanks in advance for your skulduggery,
RR
<000601c83211$92c50f40$2002a8c0@danagger4dg28c> 7bit

See also: www.piclist.com/techref/io/atod.htm?key=a%2Fd

Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) four buttons on one A/D pin

month overview.

new search...