Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 35 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
35
Dung lượng
479,56 KB
Nội dung
Test the circuit by connecting an LED and 270-ohm resistor from the Vout terminal to ground. Point the sensor at a wall, and note the condition of the LED. Now, wave a match in front of the phototransistor. The LED should blink on and off. You’ll notice that the cir- cuit is sensitive to all sources of infrared light, which includes the sun, strong photolamps, and electric burners. If the circuit doesn’t seem to be working quite right, look for hidden sources of infrared light. With the resistor values shown, the circuit is fairly sensitive; you can change them by adjusting the value of R1 and R2. “WATCHING” FOR THE FLICKER OF FIRE No doubt you’ve watched a fire at the beach or in a fireplace and noted that the flame changes color depending on the material being burned. Some materials burn yellow or orange, while others burn green or blue (indeed, this is how those specialty fireplace logs burn in different colors). Just like the color “signature” given off when different materials burn, the flames of the fire flicker at different but predictable rates. You can use this so-called flame modulation in a robot fire detection system to determine what is a real fire and what is likely just sunlight streaming through a window or light from a nearby incandescent lamp. By detecting the rate of flicker from a fire and referencing it against known values, it is possible to greatly reduce false alarms. The technique is beyond the scope of this book, but you could design a simple flame-flicker system using an op amp, a fast analog-to-digital converter, and a computer or microcontroller. The analog-to-digital converter would translate the instantaneous brightness changes of the fire into digital signals. The patterns made by those signals could then be referenced against those made by known sources of fire. The closer the patterns match, the greater the likelihood that there is a real fire. In a commercial product of this nature, it is more likely that the device would use more sophisticated digital signal processing. Using a Pyroelectric Sensor to Detect Fire A pyroelectric sensor is sensitive to the infrared radiation emitted by most fires. The most common use of pyroelectric infrared (or PIR) sensors is in burglar alarms and motion detectors. The sensor detects the change in ambient infrared radiation as a person (or ani- mal or other heat-generating object) moves within the field of view of the sensor. The key ingredient here is change: a PIR sensor cannot detect heat per se but the changes in the heat within its field of view. In larger fires, the flickering flames create enough of a change to trigger the PIR detector. Chapter 36, “Collision Avoidance and Detection,” discusses how to use PIR sensors to detect the motion of people and animals around a robot. The same sensor, with little or no change, can be employed to detect fires. To be effective as a firefighter, you should ideally reduce the sensor’s field of the view so the robot can detect smaller fires. The larger the field of view, the more the temperature and/or position of the heat source must change in order for the PIR sensor to detect it. USING A PYROELECTRIC SENSOR TO DETECT FIRE 651 Ch39_McComb 8/21/00 4:21 PM Page 651 With a smaller field of view, the magnitude of change can be lower. However, with a small field of view, your robot will likely need to “sweep” the room, using a servo or stepper motor, in order to observe any possible fires. The sweeping must stop periodically so the robo can take a “room reading.” Otherwise, the motion of the sensor could trigger false alarms. Smoke Detection “Where there’s smoke, there’s fire.” Statistics show that the majority of fire deaths each year are caused not by burns but by smoke inhalation. For less than $15, you can add smoke detec- tion to your robot’s long list of capabilities and with a little bit of programming have it wan- der through the house checking each room for trouble. You’ll probably want to keep it in the most “fire-prone” rooms, such as the basement, kitchen, laundry room, and robot lab. You can build your own smoke detector using individually purchased components, but some items, such as the smoke detector cell, are hard to find. It’s much easier to use a com- mercially available smoke detector and modify it for use with your robot. In fact, the process is so simple that you can add one to each of your robots. Tear the smoke detector apart and strip it down to the base circuit board. 652 FIRE DETECTION SYSTEMS The active element used for detecting smoke—the radioactive substance Americium 241—has a half-life of approximately seven years. After about five to seven years, the effectiveness of the alarm is diminished, and you should replace it. Using a very old alarm will render your “Smokey the Robot” fairly ineffectual at detecting the smoke of fires. HACKING A SMOKE ALARM You can either buy a new smoke detector module for your robot or scavenge one from a commercial smoke alarm unit. The latter tends to be considerably cheaper—you can buy quality smoke alarms for as little as $7 to $10. In this section, I’ll discuss hacking a com- mercial smoke alarm, specifically a Kidde model 0915K, so it can be directly connected to a robot’s computer port or microcontroller. Of course, smoke alarms are not all designed the same, but the basic construction is similar to that described here. You should have rel- atively little trouble hacking most any smoke detector you happen to use. However, you should limit your hacking attempts to those smoke alarms that use tradi- tional 9-volt batteries. Certain smoke alarm models, particularly older ones, require you to use AC power or specialized batteries (such as 22-volt mercury cells). These are harder to salvage and, besides, their age makes them less suitable for sensitive smoke detection. Start by checking the alarm for proper operation. If it doesn’t have one already, insert a fresh battery into the battery compartment. Put plugs in your ears (or cover up the audio transducer hole on the alarm). Press the “Test” button on the alarm; if it is properly functioning the alarm should emit a loud, piercing tone. If everything checks okay, remove the battery, and disassemble the alarm. Less expensive models will not have screws but will likely use a “snap-on” construction. Use a small flat-headed screw- driver to unsnap the snaps. Ch39_McComb 8/21/00 4:21 PM Page 652 Inside the smoke detector will be a circuit board, like the one in Fig. 39.2, that consists of the drive electronics and the smoke detector chamber. Either mounted on the board or located elsewhere will be the piezo disc used to make the loud tone. Remove the circuit board, being careful you don’t damage it. Examine the board for obvious “hack points,” and note the wiring to the piezo disc. More than likely, there will be either two or three wires going to the disc: ■ Two wires to the piezo disc: the wires will provide ground and ϩV power. This design is typical when you are using all-in-one piezo disc buzzers, in which the disc itself con- tains the electronics to produce the signal for audible tones. ■ Three wires to the piezo disc: the wires will provide ground, ϩV power, and a signal that causes the disc to oscillate with an audible tone. Using a volt-ohm meter or an oscilloscope, find the wire that serves as ground. (It is probably colored black or brown, but if no obvious color coding is used, examine the cir- cuit board and determine where the wires are attached.) Connect the other test lead to the remaining wire. Or if the disc has three wires, connect the test lead to one of the remain- ing wires. Replace the battery in the battery compartment, and depress the “Test” button on the alarm. Watch for a change in voltage. For a two-wire disc you should see the voltage change as the tone is produced. For a three-wire disc, try each wire to determine which produces the higher voltage; that is the one you wish to use. If you are using an oscillo- scope, find the wire that produces a clean on/off pulse. SMOKE DETECTION 653 FIGURE 39.2 The guts of a smoke detector. Ch39_McComb 8/21/00 4:21 PM Page 653 Once you have determined the functions of the wires to the piezo disc, clip off the disc and save it for some other project. Retest the alarm’s circuit board to make sure you can still read the voltage changes with your volt-ohm meter or oscilloscope. Then clip off the wires to the battery compartment, noting their polarity. Connect the circuit to a ϩ5 vdc power supply. Depress the “Test” button again. Ideally, the circuit will still function with the lower voltage. If it does not, you’ll need to operate the smoke alarm circuit board with ϩ9 vdc, which can complicate your robot’s power supply and interfacing needs. If you have an oscilloscope note the voltage. It should not be more than ϩ5 volts. If it is, that means the circuit board contains circuitry for increasing the drive voltage to the piezo disc. You don’t want this when you are interfacing the board to a computer port or microcontroller, so you’ll need to limit the voltage by using a circuit such as that shown in Fig. 39.3. Here, the output of the smoke alarm circuit is clamped at no more than 5.1 volts, thanks to the 5.1-volt zener diode. Because the output of the smoke alarm detector is often an oscillating signal, there is no effective way to measure the peak voltage by using a volt-ohm meter. The meter will only show an average of the voltage provided by the circuit. If you are limited to using only a volt- ohm meter for your testing, for safety’s sake add the 5.1-volt zener circuit as shown in Fig. 39.4. While this may be unnecessary in some instances, it will help protect your digital inter- face from possible damage caused by over-voltage from the smoke alarm circuit board. INTERFACING THE ALARM TO A COMPUTER Assuming that the board works with the ϩ5 vdc applied, your hacking is basically over, and you can proceed to interface the alarm with a computer port or microcontroller. By way of example, we’ll assume that a simple microcontroller that periodically polls the input pin is connected to the smoke alarm circuit board. The program, checks the pin sev- eral times each second. When the pin goes HIGH, the smoke alarm has been triggered. If your microcontroller supports interrupts, a better scheme is to connect the smoke alarm circuit board to an interrupt pin. Then write your software so that if the interrupt pin is trig- gered, a special “I smell smoke” routine is run. The benefit of an interrupt over polling is that the latter requires your program to constantly branch off to check the condition of the input pin. With an interrupt, your software program can effectively be ignorant of any smoke detec- tor functionality. If and when the interrupt is triggered because the smoke alarm circuit was tripped, a special software routine takes over, commanding the robot to do something else. See Chapter 28 for more information on using interrupts in microcontrollers. Rather than connect the output of the smoke alarm circuit board directly to the input pin, use a buffer to protect the microcontroller or computer against possible damage. You can construct a buffer using logic circuits (either TTL or CMOS) or with an op amp wired for unity-gain (with unity-gain, the op amp doesn’t amplify anything). The buffer is optional, but I do recommend it. Note also that the smoke alarm circuit board derives its power from the robot’s main ϩ5 vdc power supply and not from the microcontroller. Alternatively, you can use an opto-isolator. The opto-isolator bridges the gap between the detector and the robot. You do not need to condition the output of the opto-isolator if you are connecting it to a computer or microprocessor port or to a microcontroller. Several opto-isolator interfacing circuits are shown in Appendix D, “Interfacing Logic Families and ICs.” 654 FIRE DETECTION SYSTEMS Ch39_McComb 8/21/00 4:21 PM Page 654 TESTING THE ALARM Once the smoke alarm circuit board is connected to the microcontroller or computer port, test it and your software by triggering the “Test” button on the smoke alarm. The software should branch off to its “I smell smoke” subroutine. For a final test, light a match, and then blow it out. Wave the smoldering match near the smoke detector chamber. Again, the soft- ware runs the “I smell smoke” subroutine. LIMITATIONS OF ROBOTS DETECTING SMOKE You should be aware of certain limitations inherent in robot fire detectors. In the early stages of a fire, smoke tends to cling to the ceilings. That’s why manufacturers recommend that you place smoke detectors on the ceiling rather than on the wall. Only when the fire gets going and smoke builds up, does it start to fill up the rest of the room. Your robot is probably a rather short creature, and it might not detect smoke that con- fines itself only to the ceiling. This is not to say that the smoke detector mounted on even a one-foot high robot won’t detect the smoke from a small fire; just don’t count on it. Back up the robot smoke sensor with conventionally mounted smoke detection units, and do not rely only on the robot’s smoke alarm. DETECTING NOXIOUS FUMES Smoke alarms detect the smoke from fires but not noxious fumes. Some fires emit very little smoke but plenty of toxic fumes, and these are left undetected by the traditional smoke alarm. Moreover, potentially deadly fumes can be produced in the absence of a fire. For example, a malfunctioning gas heater can generate poisonous carbon monoxide gas. This colorless, odorless gas can cause dizziness, headaches, sleepiness, and—if the con- centration is high enough—even death. Just as there are alarms for detecting smoke, so there are alarms for detecting noxious gasses, including carbon monoxide. Such gas alarms tend to be a little more expensive than smoke alarms, but they can be hacked in much the same way as a smoke alarm. Deduce the signal wires to the piezo disc and connect them (perhaps via a buffer and zener diode voltage clamp) to a computer port or microcontroller. SMOKE DETECTION 655 Output From alarm 5.1 v zener FIGURE 39.3 Use a 5.1 zener diode to ensure that the smoke alarm output does not drive the computer/micro- controller input above 5 vdc. Ch39_McComb 8/21/00 4:21 PM Page 655 Combination units that include both a smoke and gas alarm are also available. You should determine if the all-in-one design will be useful for you. In some combination smoke-gas alarm units, there is no simple way to determine which has been detected. Ideally, you’ll want your robot to determine the nature of the alarm, either smoke or gas (or perhaps both). Heat Sensing In a fire, smoke and flames are most often encountered before heat, which isn’t felt until the fire is going strong. But what about before the fire gets started in the first place, such as when a kerosene heater is inadvertently left on or an iron has been tipped over and is melting the nylon clothes underneath? If your robot is on wheels (or legs) and is wandering through the house, perhaps it’ll be in the right place at the right time and sense these irregular situations. A fire is brewing, and before the house fills with smoke or flames the air gets a little warm. Equipped with a heat sensor, the robot can actually seek out warmer air, and if the air temperature gets too high it can sound an initial alarm. Realistically, heat sensors provide the least protection against a fire. But heat sensors are easy to build, and, besides, when the robot isn’t sniffing out fires it can be wandering through the house giving it an energy check or reporting on the outside temperature or…you get the idea. Fig. 39.4 shows a basic but workable circuit centered around an LM355 temperature sensor. This device is relatively easy to find and costs under $1.50. The output of the device, when wired as shown, is a linear voltage. The voltage increases 10 mV for every rise in temperature of 1° Kelvin (K). Degrees Kelvin uses the same scale as degrees Centigrade (C), except that the zero point is absolute zero—about Ϫ273°C. One degree Centigrade equals 1° Kelvin; only the start points differ. You can use this to your advantage because it lets you easily convert degrees Kelvin into degrees Centigrade. Actually, since your robot will be deciding when hot is hot, and doesn’t care what temperature scale is used, conversion really isn’t necessary. You can test the circuit by connecting a volt-ohm meter to the ground and output ter- minals of the circuit. At room temperature, the output should be about 2.98 volts. You can 656 FIRE DETECTION SYSTEMS +5V Output = 10mV/ΩK LM335 + - ADJ R1 4.7K R2 10K FIGURE 39.4 The basic wiring dia- gram for the LM355 temperature sensor. Ch39_McComb 8/21/00 4:21 PM Page 656 calculate the temperature if you get another reading by subtracting the voltage by 273 (ignore the decimal point but make sure there are two digits to the right of it, even if they are zeros). What’s left is the temperature in degrees Centigrade. For example, if the read- ing is 3.10 volts, the temperature is 62°C (310 Ϫ 273 ϭ 62). By the way, that’s pretty hot! Time to turn on the air conditioner. You can calibrate the circuit, if needed, by using an accurate bulb thermometer as a ref- erence and adjusting R2 for the proper voltage. How do you know the “proper” voltage? If you know the temperature, you can determine what the output voltage should be by adding the temperature (in degrees C) to 273. If the temperature is 20°C, then the output voltage should be 2.93 volts. For more accuracy, float some ice in a glass of water for 15–20 minutes and stick the sensor in it (keep the leads of the testing apparatus dry). Wait 5 to 10 minutes for the sensor to settle and read the voltage. It should be exactly 2.73 volts. The load presented at the outputs of the sensor circuit can throw off the reading. The schematic in Fig. 39.5 provides a buffer circuit so the load does not interfere with the output of the 355 temperature sensor. Note the use of the decoupling capacitors as recommended in the manufacturer’s application notes. These aren’t essential, but they are a good idea. Fire Fighting By attaching a small fire extinguisher to your robot, you can have the automaton put out the fires it detects. Obviously, you’ll want to make sure that the fire detection scheme you’ve put into use is relatively free of false alarms and that it doesn’t overreact in nonfire situations. Having your robot rush over to one of your guests and put out a cigarette he just lit is not only bad manners, it’s potentially embarrassing. It’s a good idea to use a “clean” fire extinguishing agent for your fire-fighting ‘bot. Halon is one of the best such agents, but, alas, the stuff is known to punch massive holes in the earth’s ozone layer, and as a result it is no longer manufactured for general con- sumption. It’s still legal to use, however, so if you have a working Halon fire extinguisher, you may wish to use it with your robot firefighter. You may also consider one of a number of Halon alternatives; select one that does not dispense a foam or powder. For example, any inert gas (helium, argon) and many noncombustible gasses (e.g., nitrogen) can be used to deplete a fire, and they will not leave a sediment on whatever they are sprayed on. No matter what you use for the fire extinguisher, be sure to use caution as a guide when building any fire-fighting robot. Consider limiting your robot for experimental use, and test it only in well-ventilated rooms—or better yet—outside. HEAT SENSING 657 TABLE 39.2 PARTS LIST FOR THE BASIC TEMPERATURE TRANSDUCER. R1 4.7K resistor, 1 percent tolerance R2 10K 10-turn precision potentiometer D1 LM335 temperature sensor diode All capacitors have 10 percent tolerance unless noted; all resistors 1/4-watt. Ch39_McComb 8/21/00 4:21 PM Page 657 The exact mounting and triggering scheme you use depends entirely on the design of the fire extinguisher. The bottle used in the prototype firebot is a Kidde Force-9, 2 1/2 pound Halon extinguisher. It has a diameter of about 3 1/4 inches. You can mount the extin- guisher in the robot by using “plumber’s tape,” that flexible metallic strip used by plumbers to mount water and gas pipes. It has lots of holes already drilled into it for easy mounting. Use two strips to hold the bottle securely. Remember that a fully charged extinguisher is heavy—in this case over 3 pounds (2 1/2 pounds for the Halon chemical and about 1/2 658 FIRE DETECTION SYSTEMS LM335 + - V+ 4 6 2 3 7 + 12K R1 C2 4.7 C1 0.1 V- 0.1 C3 C4 4.7 Output = 10mV/ΩK + - 741 FIGURE 39.5 An enhanced wiring scheme for the LM355 temperature sensor. The load of the output is buffered and does not affect the reading from the LM355. TABLE 39.3 PARTS LIST FOR THE BUFFERED TEMPERATURE TRANSDUCER. R1 12K resistor, 1 percent tolerance C1,C3 0.1 F ceramic capacitor C2,C4 4.7 F tantalum capacitor D1 LM335 temperature sensor diode All capacitors have 10 percent tolerance unless noted; all resistors 1/4-watt. Ch39_McComb 8/21/00 4:21 PM Page 658 pound for the bottle). If you add a fire extinguisher to your robot, you must relocate other components to evenly distribute the weight. The extinguisher used in the prototype system for this book used a standard actuat- ing valve. To release the fire retardant, you squeeze two levers together. Fig. 39.6 shows how to use a heavy-duty solenoid to remotely actuate the valve. You may be able to access the valve plunger itself (you may have to remove the levers to do so). Rig up a heavy-duty solenoid and lever system. A computer or control circuit activates the solenoid. For best results, the valve should be opened and closed in quick bursts (200–300 mil- liseconds are about right). The body of the robot should also pivot back and forth so the extinguishing agent is spread evenly over the fire. Remember that to be effective, the extin- guishing agent must be sprayed at the base of the fire, not at the flames. For most fires, this is not a problem because the typical robot stays close to the floor. If the fire is up high, the robot may not be able to effectively fight it. You can test the fire extinguisher a few times before the bottle will need recharging. I was able to squeeze off several dozen short blasts before the built-in pressure gauge regis- tered that I needed a new charge. For safety’s sake, experiment with an extra extinguisher. Don’t use your only extinguisher for your robot experiments; keep an extra handy in the unlikely event that you have to fight a fire yourself. If the fire-fighting robot bug bites you hard, consider entering your machine in the annual Trinity College Fire Fighting Home Robot Contest (see www.trincoll.edu/events/robot/ for additional information, including rules and a description of the event). This contest involves timing a robot as it goes from room to room in a houselike test field (the “house” and all its rooms are in a reduced scale). The object is to find the fire of a candle and snuff it out in the least amount of time. Separate competitions involving a junior division (high school and younger) and a senior division (everyone else) help to provide an even playing field for the contestants. From Here To learn more about… Read Connecting sensors to computers Chapter 29, “Interfacing with Computers and and microcontrollers Microcontrollers” Adding the sensation of “touch” Chapter 35, “Adding the Sense of Touch” Optical systems for detecting light Chapter 37, “Robotic Eyes” Enabling the robot to move around in Chapter 38, “Navigating through Space” a room or house Adding a siren or other warning device Chapter 40, “Sound Output and Input” FIRE FIGHTING 659 Ch39_McComb 8/21/00 4:21 PM Page 659 660 FIRE DETECTION SYSTEMS Plunger Nozzle Lever Heavy-duty solenoid Fire extinguisher FIGURE 39.6 Using a heavy-duty solenoid to activate a fire extinguisher. Ch39_McComb 8/21/00 4:21 PM Page 660 [...]... 10 F 6 R2 10K 3 8 + IC1 LM386 2 C4 25 0µF 1 4 5 7 + + C1 100 µF C2 0.047 R1 10 SPKR 1 8Ω FIGURE 40.7 A simple gain-of -2 0 0 integrated amplifier TABLE 40.5 PARTS LIST FOR GAIN-OF -2 0 0 AUDIO AMPLIFIER IC1 LM386 Audio Amplifier IC R1 1 0- ohm resistor R2 10K potentiometer C1 100 F electrolytic capacitor C2 0.047 F ceramic capacitor C3 10 F electrolytic capacitor C4 25 0 F electrolytic capacitor SPKR1 8-ohm... 0 1 0 2 15 0 1 1 3 12 1 0 0 4 1 1 0 1 5 5 1 1 0 6 2 1 1 1 7 4 Ch40_McComb 8 /21 /00 3:36 PM Page 668 668 SOUND OUTPUT AND INPUT +V Input 6 R3 10K 3 8 + IC1 LM386 2 C2 25 0µF 1 5 7 - + C1 0.047 4 R1 10 SPKR 1 8Ω FIGURE 40.6 A simple gain-of-50 integrated amplifier, based on the popular LM386 audio amplifier IC TABLE 40.4 PARTS LIST FOR GAIN -2 0 0 AUDIO AMPLIFIER IC1 LM386 Audio Amplifier IC R1 1 0- ohm resistor... stand-alone speech synthesizer chips either stopped manufacturing them or were themselves sold to other firms that no longer carry the old speech parts (This was the case with General Instrument and their once-popular SPO -2 5 6 speech synthesizer General Instrument was sold to Microchip Technologies, makers of the PIC microcontroller.) In addition, products such as the sound card for the IBM PC-compatible... tone decoder IC to the amplifier input stage to look for these specific sounds Ch40_McComb 8 /21 /00 3:36 PM Page 674 674 SOUND OUTPUT AND INPUT +5VDC RED MIC1 R4 1K R2 6.8K C1 0.47 R1 500K 2 7 - 6 IC1 741 3 Output C2 0.4 7 -2 .2 R5 1K c Q1 2N 222 2 b e + 4 R3 6.8K FIGURE 40.9 Sound detector amplifier Adjust R1 to increase or decrease the sensitivity, or replace the potentiometer with the circuit that appears... Chapter 29 BUILDING A BALANCE SYSTEM WITH A BALL-IN-CAGE SWITCH The four-conductor ball-in-cage switch is a rather common find in the surplus market, and it’s very inexpensive If the switch is tilted in any direction by more than about 25 –30°, at least one of the four contacts in the switch will close, thus indicating that the robot is off level You can use a debouncer circuit with the ball-in-cage tilt... include them to reduce noise on the output IC2 is an Analog Devices OP196 “rail-to-rail” operational amplifier Though the circuit calls for the OP196 op amp, most any single-supply (V+ only, V- voltage not needed) rail-to-rail operational amplifier will probably work See Fig 41.4 for a view of the prototype I built Note the wire-wrap wires attached to the leads of the ADXL150 I mounted the ‘150 to a 14-pin... you were building robots in the late1970s and 1980s, odds are you either used, or wanted to use, a Votrax SC-01 or a General Instrument SPO -2 5 6 voice synthesis chip Both were reasonably inexpensive (under $20 ) and could be connected to any computer For several years, Radio Shack sold the SPO -2 5 6 and its companion text-to-speech converter IC as part of their regular inventory Alas, these chips are no... Assume that on the toy you are using, bringing the button input HIGH triggers a previously recorded sound snip The control program is as simple as this: high 1 pause 10 low 1 The program starts by bringing the button input (the input of the toy connected to pin 1 of the Basic Stamp) HIGH The pause statement waits 10 milliseconds and then places the button LOW again The built-in amplifier of these sound... of the most common means for providing a robot with a sense of balance is to use a tilt sensor or tilt switch The sensor or switch measures the relative angle of the robot with respect to the center of the earth If the robot tips over, the angle of the sensor or switch changes, and this can be detected by electronics in the robot Tilt sensors and switches come in various forms and packages, but the. .. projects The amplifier as shown has a gain of approximately 20 , using minimal parts You can increase the gain to about 20 0 by making a few wiring changes, as shown in Fig 40.7 Either amplifier will drive a small (two- or three-inch) eight-ohm speaker Refer to the parts lists in Tables 40.4 and 40.5 for these circuits Ch40_McComb 8 /21 /00 3:36 PM Page 667 AUDIO AMPLIFIERS 667 +5 16 13 0 14 1 A 15 2 B 10 13 . 669 + - +V Input 3 2 6 1 5 8 4 7 + + + 10K R2 SPKR 1 8Ω R1 10 C3 10 F C4 25 0µF C2 0.047 C1 100 µF IC1 LM386 FIGURE 40.7 A simple gain-of -2 0 0 integrated amplifier. TABLE 40.5 PARTS LIST FOR GAIN-OF -2 0 0. sell electronic kits. SIRENS AND OTHER WARNING SOUNDS 665 1 2 6 7 84 3 1 2 6 7 84 3 Output +5V(+12V) R1 10K R2 1M R4 1K R5 4.7K C1 0 .22 IC1 555 IC2 555 C2 0.1 R3 10K 5 FIGURE 40.4 A warbler siren. power from the robot s main ϩ5 vdc power supply and not from the microcontroller. Alternatively, you can use an opto-isolator. The opto-isolator bridges the gap between the detector and the robot.