■ FIGURE 6.
■ FIGURE 5.QRD1114 reflective object sensor.
We are going to carefully bend the legs on the
QRD1114, as shown in Figure 6, so that we can mount
it on the end of the breadboard with it ‘looking’ to the
horizontal. Be very careful when you bend these legs and
even more careful when you trim them to fit in the
breadboard. The legs will break if bent more than a couple of times so make sure you get it right the first time. It
is very easy to lose track of which leg goes where and
since you only get one of these in the kit, you don’t want to
screw this up. Bend the legs that go to the phototransistor
straight down to the side and then bend the IR LED legs in
the same direction, but make the bend a little over 0.1
inch from the bottom. Next, trim them so that they will fit
in the breadboard with the face of the sensor at the edge
of the breadboard (but not overlapping the foamcore base
since that edge slides into the ALP box). The breadboard
schematic is shown in Figure 7 and the layout in Figure 8.
Figure 9 is a photo of the IR object detector.
As you can see from the schematic, a red LED has
been inserted into the circuit that has its brightness
controlled by the detector, providing us with a visible cue
for the amount of IR being detected. The IR light falling on
the phototransistor base provides the bias current that
controls the collector emitter current that flows through
the LED. You can move your finger back and forth in front
of the sensor and the red LED will brighten or dim in
response. This is a purely analog response and could —
with proper amplification — be used to drive some other
analog device such as a motor.
We can get a digital measure of this response by
putting a 10 KW resistor from ground to the
phototransistor and running a wire from that point to
the Arduino ADC in analog input pin 0 as shown in the
schematic. Let’s apply this to a real-world experiment
(and by ‘real’ I mean ‘contrived’).
■ FIGURE 7. Object detector schematic.
I went a little overboard
when I did this experiment.
I made a foamcore board
‘conveyer belt’ where I placed
six Tomato soup cans (reduced
sodium for a healthier
experiment) and dragged them
past the sensor to get calibration
values. Figure 10 shows the
device in the starting position
and after the cans have been
conveyed past the sensor.
As for the construction
details, I used foamcore board
and masking tape, and eyeballed
everything. So should you — it’s a