The A/D circuit for Park in the Dark works over a limited light range. You might get that circuit all nice and calibrated in one room, then take it to a brighter room and find that all the voltage measurements will stay above 0.1 V. Or, maybe you’ll take it into a darker room, and the voltages will end up never making it past 0.1 V.
Let's try a different kind of phototransistor circuit that the cyber:bot can use to measure a much wider range of light levels. This circuit and script can return values ranging from 0 to over 75,000. Just note: with this circuit, smaller values indicate bright light, and large values indicate low light, the opposite of our previous circuit. This new circuit uses a new component: a capacitor.
Introducing the Capacitor
A capacitor is a device that stores an electrical charge. It is a fundamental building block of many circuits. Batteries are also devices that store charge, and for these activities it will be convenient to think of capacitors as tiny batteries that can be charged, discharged, and recharged.
How much charge a capacitor can store is measured in farads (F). A farad is a very large value that’s not practical for use with these cyber:bot circuits. The capacitors in your kit store fractions of millionths of farads. A millionth of a farad is called a microfarad, and it is abbreviated μF. This one stores one hundredth of one millionth of a farad: 0.01 μF.
Common Capacitance Measurements
- microfarads: millionths of a farad, abbreviated μF. 1 μF = 1×10-6 F
- nanofarads: billionths of a farad, abbreviated nF. 1 nF = 1×10-9 F
- picofarads: trillionths of a farad, abbreviated pF. 1 pF = 1×10-12 F
Your cyber:bot kit's electronic component pack comes with two different capacitors. One is marked 103 and the other is marked 104. These marks are a measurement in picofarads. In this labeling system, the value is the number 10 followed by the specified number of zeros added.
For example, 103 is the number 10 with 3 zeros added capacitor’s case is a measurement in picofarads or (pF). In this labeling system, 103 is the number 10 with three zeros added, so the capacitor is 10,000 pF, which is 0.01 μF.
(10,000) × (1 × 10-12) F = (10 × 103) × (1 × 10-12) F
10 × 10-9 F = 0.01 × 10-6 F
= 0.01 μF.
The capacitor labeled 103 with the value of 0.01 µF is the value we will use next.