Introduction: Using the Potentiometer on Arduino

A potentiometer is a manually adjustable electrical resistor that uses three terminals. In many electrical devices, potentiometers are what establish the levels of output. For example, in a loudspeaker, a potentiometer is used to adjust the volume. In a television set, computer monitor or light dimmer, it can be used to control the brightness of the screen or light bulb.
Potentiometers, sometimes called pots, are relatively simple devices. One terminal of the potentiometer is connected to a power source, and another is hooked up to a ground — a point with no voltage or resistance and which serves as a neutral reference point. The third terminal slides across a strip of resistive material. This resistive strip generally has a low resistance at one end, and its resistance gradually increases to a maximum resistance at the other end. The third terminal serves as the connection between the power source and ground, and it usually is operated by the user through the use of a knob or lever. The user can adjust the position of the third terminal along the resistive strip to manually increase or decrease resistance. The amount of resistance determines how much current flows through a circuit. When used to regulate current, the potentiometer is limited by the maximum resistivity of the strip.

Step 1: Preparation

one Arduino UNO ,one Potentiometer module, one D port usb wire

Step 2: Circuit Connection As Shown Below

Step 3: Note

The pins above the potentiometer module above are D1, D2, VCC, GND, D2 is the NC, not connected, VCC is connected to Arduino 5V, GND connected to Arduinoon GND, D1 connected to Arduino A0.

Step 4: Code

int sensorPin = A0;
int ledPin = 13; int sensorValue = 0; void setup() { pinMode(ledPin, OUTPUT); } void loop() { sensorValue = analogRead(sensorPin); digitalWrite(ledPin, HIGH); delay(sensorValue); digitalWrite(ledPin, LOW); delay(sensorValue); }

Step 5: Summary

LED lamp regulation 13 feet through the knob potentiometer flashing speed, so as to control the brightness of the LED lamp. Potentiometer is quite common in everyday life,used LCD1602 screen people must know the role in the 1602 module potentiometer is regulating module display contrast.

Comments

About This Instructable

1,013views

3favorites

License:

Bio: Let's play together! All about pcDuino,Arduino,Raspberry pi and technology. My facebook :Sherry Wu https://m.facebook.com/sasha.wu.775
More by shansa wu:How to Use App to Control Your LED StripPano 360 Virtual Reality Photo Shot With PcDuino8 UnoTutorial of Using E-paper Shield on Arduino
Add instructable to: