Parallax Boe-Bot Student Manual page 337

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

Advertisement

Calibrating Using a Linear Approximation
The photoresistor is often referred to as a non-linear device. In other words, if it returns
one measurement at one brightness, that doesn't mean that the measurement will be five
times as large when the light is five times as bright. The math is more complicated and
involves logarithms. However, in cases where the measurements are confined over a
narrow range of the sensors overall detection abilities, the sensor can be treated like it's a
linear device. You can take a couple of measurements, and then figure out how the
device will react if other measurements in its range could be plotted in a straight line.
The technique is called linear approximation.
Another thing you can do with linear devices is assume the difference between the two
lines can also be plotted as a line. In fact, if you have one linear device that has larger
measurements than the other for ambient and low light, you can use a linear
approximation for making the sensors return approximately the same values for the same
light levels. For every reading from one sensor, (we'll call that one x), you can multiply
it by a scale factor (m), and add it to a constant (b) to get a value in the same range the
other sensor would report (y).
y
=
mx
+
b
Here is an example of how to get the values of m and b to match the left photoresistor
circuit to the right. First, assign X
to the right photoresistor values.
mismatched photoresistors. Your values will be different.
Table F-2:
Duration Values
timeLeft
timeRight
X
= 36
Y
1
1
X
= 152
Y
2
2
Now, solve for m and b using two equations in two unknowns. One of the simpler
approaches is to write two y = mx + b equations, one in terms of X
in terms of X
and Y
. Then, subtract one from the other to eliminate b. Then, solve for
2
2
m.
Appendix F: Balancing Photoresistors · Page 323
and X
to the left photoresistor values and Y
1
2
(Table F-2) shows some example values for
RC-Time Measurements in Ambient and Low Light
Description
= 56
Photoresistors in uniform ambient light
= 215
Photoresistors in uniform low light
and Y
1
2
and Y
and the other
1
1

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?

Table of Contents

Save PDF