Lab 3: Tips and Things to Think About

Construction Tips:

Wiring Photo-Sensor: 6.3.3 Photocell Sensor*  
The photocell sensor wiring also makes use of the on-board 47K resistor that connects the sensor signal line to + 5v. When wired from the signal line to ground, the photocell becomes part of a voltage divider circuit as indicated in the schematic to the right. The output voltage Vout in the circuit is the sensor signal line.Vout varies as to the ratio between the two resistances the fixed 47K resistance and the varying Rphoto resistance. When the photocell resistance is small (as when brightly illuminated), the Vout signal is close to zero volts; when the photocell resistance is large (as in the dark), Vout is close to + 5 volts, with a continuously varying range between the extremes. This means that the sensor will report small values when brightly illuminated and large values in the dark.

Matching photo-resistors: 
Familiar electronic components such as resistors and capacitors often diverge from their specified value (within tolerances), and photo-resistors are no exception to this rule. So if you are when using more than one photo-resistor, it is really worth the trouble to use a multi meter to try to find photo-resistors that match behavior (in both range, and response). One way to do this would be to place two sensors side by side on white proto board, and test there respective resistances at different light levels.

Things to Think About:

Methods for interpreting analog inputs: When reading in analog information there are (at least) two ways to have your program interpret it. One is to equate the input value to an output value with a mathematical expression (i.e. motor speed varies directly with analog input). Another way is to assign a threshold value to the input, where whenever the input crosses that threshold an output action is invoked. You can also combine approaches where, for example, there is no output until the input crosses a threshold, but after that the output is equated to the input. It may be interesting to experiment with these different approaches.

Drawing and text from: Handy Board Technical Documentation, page 43, by Fred Martin.