Multiple AnalogRead Pins Measuring the Same Wire

Status
Not open for further replies.
Hi,

I am laying out a Teensy synth project and wanted to confirm something before I get too far with it.

The design I had in mind would use four rotary switches which will be input into the Teensy. I am planning on using a collection of resistors in series biased at 3.3V and 0V at either end. Depending on where the rotary switch is, I'd measure the voltage between two of those resistors with AnalogRead().

As far as I know this is pretty common practice, but I am new to microcontrollers. Here's a diagram: http://dboyer.us/wp-content/uploads/2013/04/rotary_switch_analog.png

My question is, if I were to do this with with up to four rotary switches, would there be any issue with two or more of the analog pins reading the same point?

Thank you for any input!
-Matthew
 
You can't connect the 'A0 COM' connections together from the multiple rotary switches -- you won't be able to read the switches independently (or correctly). You can connect multiple Teensy analog input pins to the same 'A0 COM' and read it on all those channels, but why ?
 
Yes, this circuit should work well.

rotary_switch_analog.png


You could even use just 1 set of resistors for all 4 switches, but soldering 4 sets of resistors might be easier. Resistors are cheap!

Each rotary switch each will need to connect to a separate analog input pin.
 
Status
Not open for further replies.
Back
Top