SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By EvilWizard
#136556
I'm creating an odd music device that requires a minimum of 30 potentiometers. From what I've read so far, it seems that they must be wired to analog inputs. Most of the Arduinos I've looked at, have a lot less than 30 analog inputs. Does anyone know of a board, or an easy work around?

Thanks in advance,
-Evil Wiz
By Mee_n_Mac
#136566
I think you want something like this.
http://www.sparkfun.com/products/9832

What are you going to do with 30 analog inputs ? If you're thinking you can get all those digitized by an Arduino all at the same time at sampling rates needed for audio reproduction ... well you're going to be unpleasantly surprised. If they're for some control functions you may be in luck.
By EvilWizard
#136569
Yes, that is exactly what I need, thank you. I don't need to read all of the potentiometers at the same time, only one at a time. Do you know if it is possible to daisy chain the ground, and or power wires to 10 or so pot's at a time?
By Mee_n_Mac
#136572
EvilWizard wrote:Do you know if it is possible to daisy chain the ground, and or power wires to 10 or so pot's at a time?

Yes I do know.
:twisted:






[yes you can]
By esklar81
#136578
EvilWizard,

I second Mee_n_Mac's suggestion that you investigate analog multiplexers (MUXs).

I don't think "daisy-chaining" (connecting the output of one device to the input of the next) will serve you at all well, but you can connect large numbers of potentiometer high ends to one voltage supply and the low ends of the same set of potentiometers to the return side of the same voltage supply. (You do, of course, need to have a power supply that can feed the numerous parallel resistors in your array.) That's the simplest way I know to put voltages across all of your potentiometers, but it requires the most electrical power and produces the most heat.

If we assume, for the purposes of power budgetting, that you'll use 10 kΩ (a popular value) pots and operate them at 5 V (convenient for use with a 5 V Arduino), then the current through each pot, with the wiper disconnected, is:
I = V/R = 5 V / 10,000 Ω = 0.0005 A = 0.5 mA
So, 30 of them will take 15 mA. That doesn't sound too painful.

The power dissipated as heat is:
P= VI = 5 V * 15 mA = 75 mW
which also doesn't sound too painful.

If you want to reduce the power for the pots, you can switch them so that they have power only when being read, but that's a fair bit of extra work and components for a small gain. Put another way, if you're going to be running this instrument from line power, I doubt there's a good reason to try to shave the pot power. If you're trying to stretch battery life, though, you might give this a bit more thought.

However, you still appear to need an analog input for each of the wipers, so you can read each of the potentiometers. A microcontroller with ≥ 30 analog inputs is not common. Here's where the MUXs come in. If you were to use two of these, for example, you could read 32 potentiometers with 2 analog inputs and 4 (at worst, 8) digital outputs. There are lots of microcontrollers, including Arduinos, that offer at least that.

You might find it more convenient to use the MUX Shield that Mee_n_Mac suggested. It appears well-suited to your application. If you put ten potentiometers on each of the three blocks (which, conveniently, provide you with power and ground connections for the pots), you could cycle through your 30 inputs in ten steps of channel selection and reading each of three analog inputs at each step. Strictly speaking, that's not reading the inputs simultaneously, but you probably can read them as fast as your fingers can make meaningful changes to them.

You should, however, go read the specs to find out how fast you can read and switch the inputs and calculate whether the cycle time will work for you.

Have Fun,
Eric
By EvilWizard
#136579
I think that I will actually power the board through usb. From what I've gathered, it sounds like I should be able to chain them all without too much trouble. Thank you for the help.