EasyManua.ls Logo

Sparkfun Electronics RedBoard - Page 45

Sparkfun Electronics RedBoard
88 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Page41
Component: Image Reference:
+
-
+
-
h20
h21
LED
(5mm)
Photo Resistor
j1
Jumper Wire
j6 +
Jumper Wire
Jumper Wire
GND
Jumper Wire
5V
5V
+
330Ω Resistor (sensor)
j21
+
10KΩ Resistor
i1
i5
Jumper Wire
A0
j5
f5
f6
Jumper Wire
Pin 9
j20
Many of the sensors you'll use (potentiometers, photoresistors, etc.) are resistors
in disguise. eir resistance changes in proportion to whatever they're sensing
(light level, temperature, sound, etc.).
e RedBoard's analog input pins measure voltage, not resistance. But we can
easily use resistive sensors with the RedBoard by including them as part of a
"voltage divider".
A voltage divider consists of two resistors. e "top" resistor is the sensor you'll
be using. e "bottom" one is a normal, xed resistor. When you connect the
top resistor to 5 volts, and the bottom resistor to ground. e voltage at the
middle will be proportional to the bottom resistor relative to the total resistance
(top resistor + bottom resistor). When one of the resistors changes (as it will
when your sensor senses things), the output voltage will change as well!
Although the sensor's resistance will vary, the resistive sensors (ex sensor light
sensor, softpot, and trimpot) in the SIK are around 10K ohms. We usually want
the xed resistor to be close to this value, so using a 10K resistor is a great choice
for the xed "bottom" resistor. Please note the xed resistor isn't necessarily the
bottom resistor. We do that with the photodiode only so that more
light = more voltage, but it could be ipped and we'd get the opposite response.
Measuring resistive sensors:
PIN 3
5 volts
GND
(ground) (-)
Pin A0
Page 43