Parallax Boe-Bot Student Manual page 222

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

Page 208 · Robotics with the Boe-Bot
About RC Decay Time and the Photoresistor Circuit
Think of a capacitor in the circuit shown in Figure 6-10 as a tiny rechargeable battery.
When P6 sends the high signal, it essentially charges this capacitor-battery by applying 5
V to it. After a few ms, the capacitor charges up to almost 5 V. If the BASIC Stamp
program then changes the I/O pin so that it just quietly listens, the capacitor loses its
charge through the photoresistor. As the capacitor looses its charge through the
photoresistor, its voltage decays, getting lower and lower as it looses charge. The amount
of time it takes for the voltage that
strongly the photoresistor "resists" the flow of electric current supplied by the capacitor.
If the photoresistor has a large resistance value due to very dim lighting conditions, the
capacitor takes longer to discharge. If the photoresistor has a small resistance value
because the light incident on its surface is very bright, it will not resist current very
strongly, and the capacitor will lose its charge very rapidly.
P6
220
Connected in parallel
The photoresistor and capacitor shown in Figure 6-10 are connected in parallel. For two
components to be connected in parallel, each of their leads must be connected to common
terminals (also called nodes). The photoresistor and the capacitor each have one lead
connected to Vss. They also each have one lead connected to the same 220 Ω resistor
lead.
Measuring RC Decay Time with the BASIC Stamp
The BASIC Stamp can be programmed to charge the capacitor and then measure the time
it takes the capacitor's voltage to decay to 1.4 V. This decay time measurement can be
used to indicate the photoresistor's resistance. This resistance in turn indicates how
bright the light detected by the photoresistor really is. This measurement requires a
combination of the
HIGH
senses to drop below 1.4 V depends on how
IN6
Vss
and
commands along with a new command called
PAUSE
0.01 µF
Figure 6-10
RC Circuit
Connected to I/O
Pin

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Boe-Bot and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF