Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Ustary on February 19, 2011, 03:01:59 PM
-
Hi, for my problem with contact switches,'m trying to experiment every option. One thing i would like to do is to read 2 contact switches using a single analog pin. so that a 00 would be 100 , a 01 200, a 11 300, and a 10 400, for exemple. All that matters is that each combination gets a completely different valu on the analog output.
Since i don't know much about electronics, an someone help me design this circuit?
Thank you
-
Hint1:
Look up R-2R resistor ladder DAC (Digital to Analog converter).
Hint2:
Instead of switches of 00, 01,10,11 equal to four ADC values, use ranges ie: 00 == (>75 && <125), 01 == (>175 && <225), etc.
-
Hi,
How about this... Use an analog multiplexer to channel analog signals by using the digital signals from the switches as mux select lines. Before that, you will have to use resistor voltage dividers and have 4 analog voltages ready....!
BEAMer
-
Sorry, but i have no idea what any of that is.. anyway, i serched on the ADC, it seems both simple and practiucal enough for me. Thank you
-
Hi,
This should help.
(http://That.Homepage.dk/Img/4-button_if.png) (http://That.Homepage.dk/Img/4-button_if.png)
(Click for a better resolution)