page22
100k
100k
(Brown-Black-
Yellow)
Arduino
Gnd
Analog In 0
5V
Note: Circuit Diagram only shows the analog input
Arduino Analog Inputs
We've seen the Arduino's digital inputs in action. Now we will look at an analog input. The analog inputs can measure and report the voltage at the pin in the range 0V to 5V.
1) Modify the circuit as shown (replace the 10k resistor with a 100k resistor and move the input wire from digital Pin 5 to Analog Pin 0).
2) Open the sketch “simpleorgan” and upload the the Audruino
3) Try touching the wire probes to a pencil line track or to your skin. You should get an organ effect.
The circuit used here is called a “voltage divider”. The voltage at at the Analog input pin depends on the ratio of the 100k resistor to the resistance between the two probes. As the resistance between the probes decreases the voltage at the analog input goes up.
The analog input can be connected to many types of sensor. There are some common examples shown below.
Alternative Analog Inputs
10k to
100k
Arduino
Gnd
Analog In
5V
Light
Dependent
Resistor
Arduino
Gnd
Analog In
5V
Variable
Resistor