untitled

(Elliott) #1
The IR detectoris the key component of this circuit. It contains a photo-
diode that detects infrared light and an integrated circuit that produces
either +V or 0 volts on its output pin. Exactly what volts the IR detector
produces depends on whether it detects a 38 kHz infrared signal (result-
ing in 0 volts output) or not (resulting in +V output).
IC1is the other key component of this circuit. This is a chip that you
can use to record a sound or voice message and play it back. We con-
nect the output of the IR detector to Pin 23 of IC1. Voltage on Pin 23
starts a playback when the voltage changes from +V to 0 volts. Here’s
how this works: When a person walks between the pumpkins, the volt-
age from the IR detector changes from 0 volts to +V. When the person
leaves the beam field, it drops back down to 0 volts. The jump back to 0
volts is the point when your recording starts to play.

The speakeris connected to Pins 14 and 15 of IC1. The speaker plays
messages that you recorded on IC1.
You connectLED1 between Pin 14 of IC1 and ground. When your mes-
sage plays, this LED generates a flickering light. (We used a red LED to
get a red light.)

Chapter 9: Scary Pumpkins 191


Time, time, timers


When you connect a 555 timer IC to resistors and capacitors in the arrangement shown in the
schematic, the timer IC generates a digital waveform from its output. The frequency of the wave-
form is determined by how fast the capacitor fills and drains. You calculate how fast the capaci-
tor fills to two-thirds of its capacity or drains to one-third of its capacity by using the RC time
constant equation.(This involves math, so it’s not for the faint of heart.)


The RC time constant for filling the capacitor is


T1 = (R2 + R3 + R4) ×C


The RC time constant for draining the capacitor is


T2 = (R3 + R4) ×C


In this circuit, R2, R3, and R4 determine how fast the capacitor charges and discharges. The extent
to which the capacitor is filled determines the voltage on Pins 2 and 6 and the voltage applied to
the circuit inside the IC. When the voltage reaches two-thirds of +V, the circuitry connected to Pin
6 turns on and causes the output to change from +V to 0 (zero) volts. It also causes the charge on
the capacitor to drain through Pin 7 to ground. As the capacitor drains, the voltage to Pins 2 and
6 drops. When the voltage gets to one-third of the +V, the circuitry connected to Pin 2 turns on and
causes the output of the IC to shift from 0 (zero) to +V and disconnects Pin 7 from ground, which
allows the capacitor to charge back up to two-thirds of +V. At this point, the cycle starts again.

Free download pdf