6
\$\begingroup\$

On my amp, I have a big round knob, that I can turn forever in both directions, to control volume. It simply turns up whenever I turn clockwise and down when I turn counter clockwise. There is no limit as to how far I can keep turning it.

How do I create this in my own project? I have an arduino where I want a knob like this, to control a value in the arduino memory. Simply, turning up, add to value, turning down, subtract from value.

I assume I need some kind of potentiometer, but they do not turn forever, do they?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Actually there are potentiometers, usually with two wipers, that do turn forever. However, those are not approriate for what you are asking about. \$\endgroup\$ Commented Jan 4, 2014 at 16:37

1 Answer 1

10
\$\begingroup\$

What you need in a rotary encoder, they have two outputs that generate pulses which are then decoded to read the direction of rotation.

Rotary mechanical encoder Rotary mechanical encoder waveform

Refer to http://playground.arduino.cc/Main/RotaryEncoders

To control the volume you can use Arduino to drive a volume control chip like PGA2311.
There are even 4 channel versions like PGA4311

You can also control digital potentiometers like MCP41xxx/42xxx

\$\endgroup\$
2
  • 1
    \$\begingroup\$ @DiegoCNascimento I suggest not to link Arduino directly with the answer The OP asked specifically for Arduino so why including an Arduino link with a library for his needs is wrong? \$\endgroup\$
    – alexan_e
    Commented Jan 4, 2014 at 19:17
  • \$\begingroup\$ ops, have not read that, sorry :) \$\endgroup\$ Commented Jan 5, 2014 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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