Difference between revisions of "Potentiometer + Arduino"

From ESE205 Wiki
Jump to navigation Jump to search
(Created page with "=== Goal: === ---- * Wire a potentiometer to Arduino. === What You'll Need: === ---- * One Arduino breakboard (here we use [https://www.sparkfun.com/products/12757 Sparkfun R...")
 
Line 12: Line 12:
 
*The potentiometer can be used as a variable resistance. Here it will be used to control an electrical potential (i.e., voltage), which the Arduino will be able to read via the [https://www.arduino.cc/en/Reference/AnalogRead analogRead()]. Consequently, the potentiometer should be connected to an analog input pin.
 
*The potentiometer can be used as a variable resistance. Here it will be used to control an electrical potential (i.e., voltage), which the Arduino will be able to read via the [https://www.arduino.cc/en/Reference/AnalogRead analogRead()]. Consequently, the potentiometer should be connected to an analog input pin.
 
* To hookup a potentiometer properly, we first insert three pins on the bottom of this potentiometer to Arduino board. Then use one jumper wire to connect an anode pin to a voltage pin (5v). Also a cathode should be connected to a ground pin. For the potentiometer part,  the top and bottom pins will be connected to one positive and one negative pins. The middle pin of the potentiometer goes to one analog pin.
 
* To hookup a potentiometer properly, we first insert three pins on the bottom of this potentiometer to Arduino board. Then use one jumper wire to connect an anode pin to a voltage pin (5v). Also a cathode should be connected to a ground pin. For the potentiometer part,  the top and bottom pins will be connected to one positive and one negative pins. The middle pin of the potentiometer goes to one analog pin.
After you have finished all these steps, you should have something look like this:
+
* After you have finished all these steps, you should have something look like this:
 
[[File:Circuitvb.png|400px|thumb|left|alt text]]
 
[[File:Circuitvb.png|400px|thumb|left|alt text]]
  
 
[[Category:HowTos]]
 
[[Category:HowTos]]

Revision as of 19:51, 14 December 2016

Goal:


  • Wire a potentiometer to Arduino.

What You'll Need:


Hookup:


  • The potentiometer can be used as a variable resistance. Here it will be used to control an electrical potential (i.e., voltage), which the Arduino will be able to read via the analogRead(). Consequently, the potentiometer should be connected to an analog input pin.
  • To hookup a potentiometer properly, we first insert three pins on the bottom of this potentiometer to Arduino board. Then use one jumper wire to connect an anode pin to a voltage pin (5v). Also a cathode should be connected to a ground pin. For the potentiometer part, the top and bottom pins will be connected to one positive and one negative pins. The middle pin of the potentiometer goes to one analog pin.
  • After you have finished all these steps, you should have something look like this:
alt text