Hardware Reference
In-Depth Information
wants to hear. In computing the term noise is used to describe data that is not wanted and
gets in the way. Your light beams are noisy sensors, not in that they make a sound, but that
they generate data that's not meaningful information. he noise occurs because an object
passing through the beam may cause it to break and unbreak a few times. hink of a bird
passing through the nest box entrance - as well as its body breaking the beam, its tail may
wag up and down, additionally breaking the beam as it leaves.
You could run the program again and test it with your inger. As you move it away from the
central beam in the hole it may trigger multiple beam break and unbreak events. If the soft-
ware considered every time a beam broke to be a bird leaving the nest, it would record a
higher number than the actual number of bird visits.
Filtering Out Noise
You may be familiar with the reduction of audio noise through the use of ilters; you might
turn the treble down to remove a high-pitched hiss. Similarly, in computing, data can be il-
tered to remove noise.
Looking at logs, you should notice that the additional beam break events are usually very
short. In comparison, the time taken for a bird to leave the nest box, turn around and come
back is a lot slower. Because the time that events occurred is recorded, this information can
be used to ilter out breaks and unbreaks that happen in quick succession.
he world is full of unknowns that computers have to try and make sense of: Did a bird really
leave, or did its tail cause a second beam break to be recorded? Has some dirt been caught in
the sensor? You can make your analysis program very complicated by modeling as many pos-
sible explanations of sensor readings. In industry sensor models may consider probability to
best determine what is happening.
Filtering Contact Bounce
Filtering is used more often than you might think in computers. Inputs from mechanical
switches, such as key presses on the keyboard, are iltered to remove contact bounce.
Contact bounce happens when a switch is opened or closed and the metal contacts of the
switch bounce off each other as they leave or come together. This bouncing action causes
a number of pulses to be sent to the computer. Because, in the case of a keyboard, a user
wouldn't want multiple key presses to be registered, the signal is iltered. Typically, this il-
tering creates a short period when the signal is ignored, which gives the contacts enough
time to settle.
 
Search WWH ::




Custom Search