Datasheet

Light-Sensitive Navigation with Phototransistors • Chapter 6
Robotics with the BOE Shield-Bot 191
About Charge Transfer and the Phototransistor Circuit
Think of each capacitor in this circuit as a tiny rechargeable battery, and think of each
phototransistor as a light-controlled current valve. Each capacitor can be charged to 5 V and
then allowed to drain through its phototransistor. The rate that the capacitor loses its
charge depends on how much current the phototransistor (current valve) allows to pass,
which in turn depends on the brightness of the light shining on the phototransistor’s base.
Again, brighter light results in more current passing. Shadows result in less current.
This kind of phototransistor/capacitor circuit is called a charge transfer circuit. The Arduino
will determine the rate at which each capacitor loses its charge through its phototransistor
by measuring how long it takes the capacitor’s voltage to decay, that is, to drop below a
certain voltage value. The decay time corresponds to how wide open that current valve is,
which is controlled by the brightness of the light reaching the phototransistor’s base. More
light means faster decay, less light means slower decay.