A potentiometer, commonly referred to as a "pot," is a three-terminal variable resistor where the resistance is manually adjustable by turning a knob or sliding a fader. It is widely used in electronics to vary the voltage and control the current in a circuit. Potentiometers are often utilized for adjusting settings such as volume in audio systems, brightness in lighting applications, and calibration in measurement devices.
Pin Number | Description |
---|---|
1 | Counter-clockwise terminal (CCW) |
2 | Wiper terminal (the adjustable output) |
3 | Clockwise terminal (CW) |
To use a potentiometer in a circuit:
The following example demonstrates how to read the analog value from a potentiometer connected to an Arduino UNO.
// Define the pin connected to the potentiometer wiper (middle terminal)
const int potPin = A0;
void setup() {
// Initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
void loop() {
// Read the value from the potentiometer
int potValue = analogRead(potPin);
// Convert the reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = potValue * (5.0 / 1023.0);
// Print out the value in volts
Serial.println(voltage);
// Delay for a bit to get stable readings
delay(250);
}
Q: Can I use a potentiometer to control the speed of a motor? A: Yes, but ensure the potentiometer can handle the current required by the motor.
Q: How do I choose between a linear and logarithmic potentiometer? A: Use a linear potentiometer when you need a uniform change in resistance. Use a logarithmic potentiometer for audio applications where the human ear perceives sound logarithmically.
Q: What is the difference between a potentiometer and a rheostat? A: A rheostat is a two-terminal variable resistor used for high-power applications, while a potentiometer is a three-terminal device used for lower power applications and provides a variable voltage output.
Q: How do I clean a potentiometer? A: Use a non-conductive cleaner specifically designed for electronic components. Apply it to the track and rotate the wiper across its full range several times.