Data Sheet
-55-
80. Reed Switches for Speed Sensors
Build the circuit shown on the left. If you turn on any one of the switches,
you can see the two LEDs are on at the same time. But if you want to
turn off the LEDs, you need to turn off all the switches.
Did you know that reed switches like the one in this circuit can be used
to create speed sensors? The reed switch actuates briey each time a
magnet on the wheel passes the sensor, and this can be used to count
the number of revolutions of the wheel per second which can then be
converted to bicycle speed.
81. AND Gate and OR Gate Logic
In this circuit, if you want to turn on the two LEDs you can press the
switch (62), or you can press the press switch (61) and the reed switch
(83) at the same time.
AND gates and OR Gates have been discussed in projects #64 and
#66. The diagram and logical tables for the 2-input AND Gate and
2-input OR Gate are shown below.
Using these diagrams, you could represent the logic in this circuit as
shown below.
1st level
1st level
Inputs Output
A B C
OFF OFF OFF
OFF ON OFF
ON OFF OFF
ON ON ON
Inputs Output
A B C
OFF OFF OFF
OFF ON ON
ON OFF ON
ON ON ON
AND Gate OR Gate