Datasheet
Chapter 6 • Light-Sensitive Navigation with Phototransistors
188 • Robotics with the BOE Shield-Bot
Example 2: 1 = 0.25 mA and R = 2 kΩ
Your Turn – Ohm’s Law and Resistor Adjustments
Let’s say that the ambient light in your room is twice as bright as the light that resulted in
V
A3
= 3.5 V for bright light and 0.5 V for shade. Another situation that could cause higher
current is if the ambient light is a stronger source of infrared. In either case, the
phototransistor could allow twice as much current to flow through the circuit, which could
lead to measurement difficulties.
• Question: What could you do to bring the circuit’s voltage response back down
to 3.5 V for bright light and 0.5 V for dim?
• Answer: Cut the resistor value in half; make it 1 kΩ instead of 2 kΩ.
Try repeating the Ohm’s Law calculations with R = 1 kΩ, bright current I = 3.5
mA, and dim current I = 0.5 mA. Does it bring V
A3
back to 3.5 V for bright light
and 0.5 V for dim light with twice the current? (It should; if it didn’t for you,
check your calculations.)
Activity 2: Measure Light Levels Over a Larger Range
The circuit in the previous activity only works over a limited light range. You might get the
Activity #1 circuit all nice and calibrated in one room, then take it to a brighter room and
find that all the voltage measurements will sit at the maximum value. Or, maybe you’ll take
it into a darker room, and the voltages will end up never making it past 0.1 V.
This activity introduces a different phototransistor circuit that the Arduino can use to
measure a much wider range of light levels. This circuit and sketch can return values
ranging from 0 to over 75,000. Be aware: this time the smaller values indicate bright
light, and large values indicate low light.
V
A
A
A
k mA
R I V
A
5 . 0
5 . 0
2 25 . 0
2000
1000
25 . 0
2 25 . 0
3
=
Ω =
Ω × =
Ω × =
Ω × =
× =