4
\$\begingroup\$

I want to mount a bunch (say 16+) slide potentiometers in a long project box (or other housing that can sit on a desk) that I can use to interact with software on my computer, specifically lighting software, which I would program.

How could I get the output of these slide potentiometers into my computer so software could read the values? I'm thinking using a USB input.

Keep in mind I'm a beginner at electronics (but I can do software).

\$\endgroup\$
  • \$\begingroup\$ Do not use potentiometers but encoders. Encoders use various techniques, but basically they avoid A-to-D conversion, and all the nasty problems of potentiometers, like wear leading to failure or intermittence. In an encoder, when you turn the knob or move the slider, digital signals are generated which cause a microchip to count up or down. These signals can come from optical sensors that read light/dark bars on a sliding strip or rotary disc, or other techniques. \$\endgroup\$ – Kaz Nov 9 '12 at 22:31
  • \$\begingroup\$ Digitizing regular pots is tricky. One problem is that is usually done DC going through pots. Pots do not like DC. It is well-known that if you send audio through a pot that has a DC potential across it, when the pot is moved, you get "scratching" noise in the audio. I have an old Alesis synthesizer whose controls are analog pots that are digitized. When these pots get dirty, the controls become very flaky. The digital values jitter and jump when you turn the knobs, and sometimes spontaneously. If done at all, this silly technique should be done with AC, without any DC applied to the pots. \$\endgroup\$ – Kaz Nov 9 '12 at 22:38
  • \$\begingroup\$ @Kaz I'd love to but they seem to be very expensive ($50+), am I looking at the right place? \$\endgroup\$ – James T Nov 9 '12 at 22:39
  • \$\begingroup\$ They are expensive. So if you want cheap, stick with pots. I'd try to find a solution where only AC flows over the pots. That is to say, we generate a signal, say 5 Khz or whatever. We attenuate that with a pot, and then rectify it to determine its level as a DC signal, and then digitize that DC. The AC signal is coupled with capacitors so no DC flows through the pot. \$\endgroup\$ – Kaz Nov 9 '12 at 23:04
  • \$\begingroup\$ @Kaz Any suggestions on how to do that? \$\endgroup\$ – James T Nov 9 '12 at 23:20
3
\$\begingroup\$

You need some kind of analog I/O board ( that basically contains ADC converters to communicate with the PC ) there is also multiple channels available. You need a channel for each potentiometer ( unless you want to do some multiplexing ). Here some examples.

\$\endgroup\$
  • \$\begingroup\$ Seems... expensive. Anything else cheaper? Maybe possible with a arduino board? \$\endgroup\$ – James T Nov 9 '12 at 14:35
  • \$\begingroup\$ What about this? appliedplatonics.com/anshield \$\endgroup\$ – James T Nov 9 '12 at 14:37
  • \$\begingroup\$ @buddy4j yep it probably works :) \$\endgroup\$ – Felice Pollano Nov 9 '12 at 14:38
  • 1
    \$\begingroup\$ Another thing that can be used is this: sparkfun.com/products/9056 \$\endgroup\$ – James T Nov 9 '12 at 14:49
  • \$\begingroup\$ sparkfun.com/products/9832 Just adding more resources to the answers \$\endgroup\$ – James T Nov 9 '12 at 14:52
3
\$\begingroup\$

If you don't want to deal with microcontroller programming:

Buy a Teensy++2.0 board for $24:

Teensy++2.0

Use the GenericHID software to connect up to 8 potentiometer wipers to the F0 through F7 pins:

GenericHID

After programming the device and wiring it up, it will connect to the computer as a HID input device. You can read the values with libhid, etc.

\$\endgroup\$
  • \$\begingroup\$ I do like the approach, except that it's limited to 8 inputs. Very attractive if I ever need to make a small one with 8 or less though. \$\endgroup\$ – James T Nov 9 '12 at 20:38
  • \$\begingroup\$ I forgot to add that part, but I was going to say that if you want more than 8, just buy two. Still pretty cheap. Also note that it can do more than 8 if you're using other inputs, like pushbuttons. \$\endgroup\$ – Jim Paris Nov 9 '12 at 20:47
  • \$\begingroup\$ It's not as cheap per channel as using a Arduino, so it's only worth it for lower numbers, and you can't re-purpose this as much as you can a Arduino. \$\endgroup\$ – James T Nov 9 '12 at 21:05
  • \$\begingroup\$ Arduinos don't have more than 8 analog inputs either; you'll need to use a mux. Which you could add to these boards too, of course. Arduinos and these boards are essentially the same AVR hardware, it's just a question of what software you're putting on it. \$\endgroup\$ – Jim Paris Nov 9 '12 at 22:03
  • \$\begingroup\$ I was going to use a Mux Shield with the Uno, is there something similar for that? It would probably end up cheaper than using a Uno. \$\endgroup\$ – James T Nov 9 '12 at 22:22
2
\$\begingroup\$

The choices for slides seem to be pots or linear encoders. For pots you need a system with many analog inputs, then you need to send them to your computer. USB seems like a no brainer. Might I suggest using a MIDI over USB descriptor. Many Digital Audio Workstation controllers work with this protocol, and the libraries for the PC side should be readily available.

In fact, if you're in a rush, you might look into the commercial availability of these controllers. In the Audio Workstation world, they tend to call them "control surfaces"

"Cheap" is relative. About $300 gets you this, or plenty of others like it, which might have enough sliders and pots to meet your needs, and you can start to program the host side right away.
You also know it will work, and you don't have to worry about design. This is a huge advantage (unless, of course, you're doing this for the design experience!) enter image description here I don't think you'll be able to build anything like what you describe for much less than $250-- assuming you own everything in your development chain already, so we're in the ballpark.

Pots would probably be the less expensive option, and probably easier to program, but you need to make sure that you get a microcontroller that can handle the job, or a separate a/d converter.

\$\endgroup\$
  • \$\begingroup\$ The entire point for me is to do it cheap, not fast. \$\endgroup\$ – James T Nov 9 '12 at 15:34
  • \$\begingroup\$ Also, what would be cheaper? Pots or linear encoders? \$\endgroup\$ – James T Nov 9 '12 at 15:35
  • \$\begingroup\$ Got some more input based on your follow up, but a bit long for comment. I'll modify my answer. \$\endgroup\$ – Scott Seidman Nov 9 '12 at 17:19
  • \$\begingroup\$ @Bubby4j - Pots would be way cheaper than linear encoders in almost all cases. As a matter of fact many on-line discount component outlets offer slider pots of various types. One example can be seen here with good additional discount for quantity purchase: allelectronics.com/make-a-store/item/SLP-20KS/… \$\endgroup\$ – Michael Karas Nov 9 '12 at 17:26
  • \$\begingroup\$ Right now my idea is just to mount some pots in a plastic box with a Arduino Uno ($30) and a Mux Shield ($25). Would be less than $100. Pretty isn't my goal, just something functional. \$\endgroup\$ – James T Nov 9 '12 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.