Potentiometers + Digital Pins?

Hi There,

I'm new to digital electronics, but I have experience with analog circuits.

I have just purchased my first Arduino Duemilanove, and it's on it's way.

I was wondering, is it possible to read a potentiometer's value into a digital pin?

If so, how does anyone have an example?

I have a project that would require 8 potentiometers, and I'm trying to figure out a way to do this.

Any suggestions appreciated.

Thanks very much,

Riley

you cant read analog values on digital pins. you can however use external parts to attach more than one analog input to your boards analog inputs, and read them one at a time.

http://www.arduino.cc/playground/Learning/4051

this playground article shows how to use a 4051 multiplexer chip to read 8 analog values with one analog pin and 3 digital pins. looks like its just what you need.

The Arduino's based on the surface mount version of the ATmega168 have 8 analog inputs. The seeeduino is a popular version with 8. I think the Arduino nano also has 8.

If you must use a Duemilanove, there are analog multiplexer ICs or separate analog to digital converters you can use. But you can't read an analog value on a digital pin (otherwise why distinguish the analog pins?).

I see.

Well, I have purchased several of the chips used in this example:

http://www.arduino.cc/en/Tutorial/LEDDriver

Would it be possible to use a modified version of that circuit to read input values instead of output current to the LEDS?

Riley

No, you can't use that IC for reading analog signals (voltage).

Follow the link above to the 4051 tutorial, its as simple as the LED tutorial, you just need an anlog multiplexer IC. They are cheap :-)

Thanks very much, I've been doing some research, and I think I'm all set :-)