elec-PRESSURE PAD In Chapter 35 you learned how to give the sense of touch to robot fingers and grippers.One of the materials used as a touch sensor was conductive foam, which is package
Trang 1tech-PHYSICAL CONTACT BUMPER SWITCH
An ordinary switch can be used to detect physical contact with an object So-called
“bumper switches” are spring-loaded push-button switches mounted on the frame of the
7
6
Q1 2N2222 e b
c IC1
555 About 40 kHz
R3 1.2K
R4 2.2K
Ultrasonic Transducer
C2
0.0033 R2 R1
FIGURE 36.10 Schematic diagram for a basic ultrasonic proximity transmitter.
+
-4
7 6 2
3
C1 0.01
R6 10K
R7 10K
R5
4
7 6 2
3
R1 330Ω
R3 10K
R4 10K
R2 100K
+
IC1 741
-Ultrasonic Transducer
Output
C2 0.01
R8 330Ω
FIGURE 36.11 Schematic diagram for a basic ultrasonic proximity receiver.
Trang 2robot, as shown in Fig 36.12 The plunger of the switch is pushed in whenever the robotcollides with an object Obviously, the plunger must extend farther than all other parts ofthe robot You may need to mount the switch on a bracket to extend its reach.
The surface area of most push-button switches tends to be very small You can enlarge thecontact area by attaching a metal or plastic plate or a length of wire to the switch plunger Apiece of rigid 1/16-inch thick plastic or aluminum is a good choice for bumper plates Gluethe plate onto the plunger Low-cost push-button switches are not known for their sensitivity.The robot may have to crash into an object with a fair amount of force before the switch makespositive contact, and for most applications that’s obviously not desirable
Leaf switches require only a small touch before they trigger The plunger in a leafswitch (often referred to as a Microswitch, after the manufacturer that made them popular)
is extra small and travels only a few fractions of an inch before its contacts close A metalstrip, or leaf, attached to the strip acts as a lever, further increasing sensitivity You canmount a plastic or metal plate to the end of the leaf to increase surface area If the leaf iswide enough, you can use miniature 4/40 or 3/38 hardware to mount the plate in place
TABLE 36.3 PARTS LIST FOR ULTRASONIC PROXIMITY RECEIVER.
IC1,IC2 741 op amp ICR1,R8 330 ohm resistorR3,R4,R6,R7 10K resistorR2 100K potentiometerR5 1K resistorC1,C2 0.01 µF ceramic capacitorTR1 Ultrasonic receiver transducer (40kHz nominal)
All resistors have 5 or 10 percent tolerance, 1/4-watt; all capacitors have 10 percent tolerance, rated 35 volts or higher.
TABLE 36.2 PARTS LIST FOR ULTRAPROXIMITY TRANSMITTER.
IC1 555 Timer ICQ1 2N2222 NPN transistorR1 1K resistor
R2 5K resistorR3 1.2K resistorR4 2.2K resistorC1 0.1 µF ceramic capacitorC2 0.0033 µF monolithic, mica, or ceramic capacitorTR1 Ultrasonic transmitter transducer (40 kHz nominal)
Trang 3Many animal experts believe that a cat’s whiskers are used to measure space If thewhiskers touch when a cat is trying to get through a hole, it knows there is not enoughspace for its body We can apply a similar technique to our robot designs—whether or notkitty whiskers are actually used for this purpose
You can use thin 20- to 25-gauge piano or stove wire for the whiskers of the robot.Attach the wires to the end of switches, or mount them in a receptacle so the wire is sup-ported by a small rubber grommet
By bending the whiskers, you can extend their usefulness and application The mercially made robot shown in Fig 36.13, the Movit WAO, has two whiskers that can berotated in their switch sockets When the whiskers are positioned so the loop is verticalthey can detect changes in topography to watch for such things as the edge of a table, thecorner of a rug, and so forth
com-A more complex whisker setup is shown in Fig 36.14 Two different lengths of whiskersare used for the two sides of the robots The longer-length whiskers represent a space a fewinches wider than the robot If these whiskers are actuated by rubbing against an object butthe short whiskers are not, then the robot understands that the pathway is clear to travel butspace is tight
The short whiskers are cut to represent the width of the robot Should the short whiskers
on only one side of the robot be triggered, then the robot will turn the opposite direction
to avoid the obstacle If both sides of short whiskers are activated, then the robot knowsthat it cannot fit through the passageway, and it either stops or turns around
Before building bumper switches or whiskers into your robot, be aware that most tronic circuits will misbehave when they are triggered by a mechanical switch contact Thecontact has a tendency to “bounce” as it closes and opens, so it needs to be conditioned.See the debouncing circuits in Chapter 29 for ways to clean up the contact closure soswitches can directly drive your robot circuits
elec-PRESSURE PAD
In Chapter 35 you learned how to give the sense of touch to robot fingers and grippers.One of the materials used as a touch sensor was conductive foam, which is packaged with
FramePlunger switch
FIGURE 36.12 An SPST spring-loaded plunger
switch mounted in the frame or body
of the robot, used as a contact sor Experiment with different shapes and sizes for the plunger.
Trang 4sen-most CMOS and microprocessor ICs This foam is available in large sheets and is perfectfor use as collision detection pressure pads Radio Shack sells a nice five-inch square padthat’s ideal for the job.
Attach wires to the pad as described in Chapter 35, and glue the pad to the frame or skin
of your robot Unlike fingertip touch, where the amount of pressure is important, thesalient ingredient with a collision detector is that contact has been made with something.This makes the interface electronics that much easier to build
Fig 36.15 shows a suitable interface for use with the pad (refer to the parts list in Table36.4) The pad is placed in series with a 3.3K resistor between ground and the positive sup-ply voltage to form a voltage divider When the pad is pressed down, the voltage at the out-put of the sensor will vary The output of the sensor, which is the point between the padand resistor, is applied to the inverting pin of a 339 comparator (There are four separatecomparators in the 339 package, so one chip can service four pressure pads.) When thevoltage from the pad exceeds the reference voltage supplied to the comparator, the com-parator changes states, thus indicating a collision
The comparator output can be used to drive a motor direction control relay or can betied directly to a microprocessor or computer port Follow the interface guidelines provid-
ed in Chapter 29
MULTIPLE BUMPER SWITCHES
What happens when you have many switches or proximity devices scattered around theperiphery of your robot? You could connect the output of each switch to the computer, but
FIGURE 36.13 The Movit WAO robot (one of the older models, but the newer
ones are similar) Its two tentacles, or whiskers, allow it to gate a space.
Trang 5navi-that’s a waste of interface ports A better way to do it is to use a priority encoder or plexer Both schemes allow you to connect several switches to a common control circuit.The robot’s microprocessor or computer queries the control circuit instead of the individ-ual switches or proximity devices.
multi-Using a priority encoder The circuit in Fig 36.16 uses a 74148 priority encoder IC.Switches are shown at the inputs of the chip When a switch is closed, its binary equiva-lent appears at the A-B-C output pins With a priority encoder, only the highest valueswitch is indicated at the output In other words, if switch 4 and 7 are both closed, the out-put will only reflect the closure of pin 4
Another method is shown in Fig 36.17 Here, a 74150 multiplexer IC is used as aswitch selector To read whether a switch is or not, the computer or microprocessor applies
a binary weighted number to the input select pins The state of the desired input is shown
in inverted form at the Out pin (pin 10) The advantage of the 74150 is that the state of anyswitch can be read at any time, even if several switches are closed
Whisker
Leaf switch
Grommet (for holding whisker)
Mounting bolt
BA
Vibration or movement causes switch activation
FIGURE 36.14 Adding whiskers to a robot a Whiskers attached to
the dome of the Minibot (see Chap 8); b Construction
detail of the whiskers and actuation switches.
Trang 6Using a resistor ladder If the computer or microcontroller used in your robot has ananalog-to-digital converter (ADC) or you don’t mind adding one, you can use another tech-nique for interfacing multiple switches: the resistor ladder The concept is simple, as Fig.36.18 shows Each switch is connected to ground on one side and to V in series with aresistor on the other side Multiple switches are connected in parallel to an ADC input, asdepicted in the figure The resistors form a voltage divider Each resistor has a differentvalue, so when a switch closes the voltage through that switch is uniquely different.Note that because the resistors are in parallel, you can close more than one switch atone time An “in-between” voltage will result Feel free to experiment with the values ofthe resistors connected to each switch to obtain maximum flexibility.
“Soft Touch” and Compliant Collision Detection
The last nickname you’d want for your robot is “Bull in a China Closet,” a not too ing reference to your automaton’s habit of crashing into and breaking everything
flatter-FIGURE 36.15 Converting the output of a conductive foam
pressure sensor to an on/off type switch output.
RA Pressure
sensor
-+IC1
339 (1/4) 4
5
2
12 3 +5V
Output R1
3.3K
R3 10K
R3 10K
TABLE 36.4 PARTS LIST FOR PRESSURE SENSOR BUMPER SWITCH.
IC1 LM339 Quad Comparator ICR1 3.3K resistor
R2 10K potentiometerR3 10K resistorMisc Conductive foam pressure transducer (see text)
Trang 8Unfortunately, even the best behaved robots occasionally bump into obstacles, includingwalls, furniture, and the cat (your robot can probably survive a head-on collision with asolid wall, but the family feline maybe not!).
Since it’s impractical—not to mention darn near impossible—to always prevent yourrobot from colliding with objects, the next best thing is to make those collisions as “soft”
as possible This is done using so-called soft touch or compliant collision detection means.
Several such approaches are outlined here You can try some or all; mixing and matching
OUT 101
2 3 4 5 6 7 8
10 11 12 9
13 14 15
0 7 6 5 4 3 2 1 23 22 21 20 19 18 17 16 8
9 ENABLE
15
+5VDC
Output
14 13
A B C
GND R1-R16
1.2K
IC1 74150
S1-S16 Bumper Switches
Input select
12
24
11 D
FIGURE 36.17 Multiple switch detection using a 74150 multiplexer IC.
FIGURE 36.18 A resistor ladder
provides a variable voltage; the voltage
at the output of the ladder is dependent
on the switch(es) that are closed.
+5 vdc
R 2R 3R 4R
10K R=About 1K
To ADC or other circuit
Trang 9sensors on one robot is not only encouraged, it’s a good idea As long as the sensor dancy does not unduly affect the size, weight, or cost of the robot, having “backups” canmake your robot a better behaved houseguest.
redun-Laser Fiber “Whiskers”
You know about fiber optics: they’re used to transmit hundreds of thousands of phone callsthrough a thin wire They’re also used to connect together high-end home entertainmentgear and even to make “light sculpture” art On their own, optical fibers offer a wealth oftechnical solutions, and when combined with a laser, optical fibers can do even more.The unique “whiskers” project that follows makes use of a relatively underappreciated(and often undesirable) synergy between low-grade optical fibers and lasers To fully under-stand what happens to laser light in an optical fiber, let’s first take a look at how fiber opticswork and then how the properties of laser light play a key role in making the fiber optic robo-whiskers function
FIBER OPTICS: AN INTRODUCTION
An optical fiber is to light what PVC pipe is to water Though the fiber is a solid, it nels light from one end to the other Even if the fiber is bent, the light follows the path,altering its course at the bend and traveling on Because light acts as an information carri-
chan-er, a strand of optical fiber no bigger than a human hair can carry the same amount of data
as some 900 copper wires
The idea for optical fibers is over 100 years old British physicist John Tyndall oncedemonstrated how a bright beam of light was internally reflected through a stream of waterflowing out of a tank Serious research into light transmission through solid material start-
ed in 1934, when Bell Labs was issued a patent for the light pipe In the 1950s, the
American Optical Corporation developed glass fibers that transmitted light over short tances (a few yards) The technology of fiber optics really took off around 1970 when sci-entists at Corning Glass Works developed long-distance optical fibers
dis-Optical fibers are composed of two basic materials, as illustrated in Fig 36.19: the core
and the cladding The core is a dense glass or plastic material that the light actually
pass-es through as it travels the length of the fiber The cladding is a lpass-ess dense sheath, also of
plastic or glass, that serves as a refracting medium An optical fiber may or may not have
an outer jacket, a plastic or rubber insulation used as protection.
Optical fibers transmit light by total internal reflection (TIR), as shown in Fig 36.20.
Imagine a ray of light entering the end of an optical fiber strand If the fiber is perfectlystraight, the light will pass through the medium just as it passes through a plate of glass But
if the fiber is bent slightly, the light will eventually strike the outside edge of the fiber If theangle of incidence is great (more than the so-called critical angle), the light will be reflectedinternally and will continue its path through the fiber But if the bend is large and the angle ofincidence is small (less than the critical angle), the light will pass through the fiber and be lost
Note the cone of acceptance, as shown in Fig 36.20; the cone represents the degree to
which the incoming light can be off axis and still make it into the fiber The cone of
Trang 10acceptance (usually 30°) of an optical fiber determines how far the light source can befrom the optical axis and still manage to make it into the fiber Though the cone of accep-tance may be great, fiber optics perform best when the light source (and detector) are-aligned to the optical axis.
TYPES OF OPTICAL FIBERS
The classic optical fiber is made of glass, otherwise known as silica (which is plain ol’sand) Glass fibers tend to be expensive and are more brittle than stranded copper wire.But they are excellent conductors of light, especially light in the infrared region between
850 and 1300 nanometers (nm)
Less expensive optical fibers are made of plastic Though light loss through plasticfibers is greater than through glass fibers, they are more durable Plastic fibers are bestused in communications experiments with near-infrared light sources—the 780 to 950 nm
Core
CladdingProtective sheath
FIGURE 36.19 The physical makeup of an optical fiber,
con-sisting of core and cladding.
Totally reflected ray
Lost rays outside cone of acceptance
Cone of acceptance
FIGURE 36.20 Light travels through optical fibers due to a process
called total internal reflection (TIR).
Trang 11range This nicely corresponds to the output wavelength and sensitivity of commoninfrared emitters and detectors.
Optical fiber bundles may be coherent or incoherent These terms relate to the ment of the individual strands in the bundle If the strands are arranged so that the fibers
arrange-can transmit an image from one end to the other, they are said to be coherent The vast majority of optical fibers are incoherent: an image or particular pattern of light is lost
when it reaches the other end of the fiber
The cladding used in optical fibers may be one of two types—step-index and
graded-index Step-index fibers provide a discrete boundary between more dense and less dense
regions of core and cladding They are the easiest to manufacture, but their design causes
a loss of ray coherency when laser light passes through the fiber: that is, coherent light in,largely incoherent light out The loss of coherency, which is due to light rays travelingslightly different paths through the fiber, reduces the efficiency of the laser beam Still, itoffers some very practical benefits, as you’ll see later in this chapter
There is no discrete refractive boundary in graded-index fibers The core and cladding
media slowly blend, like an exotic tropical drink The grading acts to refract light evenly,
at any angle of incidence This preserves coherency and improves the efficiency of thefiber As you might have guessed, graded-index optical fibers are the most expensive ofthe bunch
WORKING WITH FIBER OPTICS
Optical fibers may be cut with wire cutters, nippers, or even a knife But you must cise care to avoid injuring yourself from shards of glass that may fly out when the fiber iscut (plastic fibers don’t shatter when cut) Wear heavy cotton gloves and eye protectionwhen working with optical fibers Avoid working with fibers around food-serving or -preparation areas (that means stay out of the kitchen!) The bits of glass may inadvertent-
exer-ly settle on food, plates, or eating utensils and could cause bodiexer-ly harm
One good way to cut glass fiber is to gently nick it with a sharp knife or razor, then snap
it in two Position the thumb and index finger of both hands as close to the nick as ble, then break the fiber with a swift downward motion (snapping upward increases thechance that glass shards will fly off in your direction)
possi-BUILDING THE LASER-OPTIC WHISKER
Consider the arrangement in Fig 36.21 A laser is pointed at one end of a stepped-indexoptical fiber The fiber forms one or more loops around the front, side, or back of the robot
At the opposite end of the fiber is an ordinary phototransistor or photodiode (I’ll just refer
to it as a photodetector for now and not worry what kind it is) When the laser is turned on,the photodetector registers a certain voltage level from the laser light, say 2.5 volts This is
the quiescent level.
When one or more of the loops of the fiber are deformed—the robot has touched a son or thing, for instance—the laser light passing through the fiber is diverted in its path,and this changes the interference patterns at the photodetector end The change in lightlevel received by the photodetector does not span a very wide range, perhaps one volt total.But this one volt is enough to not only determine when the robot has touched an object but
Trang 12per-the relative intensity of per-the collision The more per-the robot has “connected” to some object, per-themore the fibers will deform and the greater the output change of the light as it reaches thephotodetector.
The key benefit of the laser-optic whisker system is that a collision can be detected with
just a feather touch In fact, your robot may know when it’s bumped into you before you
do! Since contact with the robot is through a tiny piece of plastic, there’s little chance themachine will damage or hurt anything it bumps into The whiskers can protrude severalinches from the body of the robot and omnidirectionally, if you desire In this way it willsense contact from any direction
Fig 36.22 shows a prototype of this technique that consists of a hacked visible light
penlight laser, several strands of cheap (very cheap) stepped-index optical fibers, and a set
of three phototransistors The optical fibers are tied together in a bundle using a small brasscollar, electrical tape, and tie-wrap This bundle is then inserted into the opening of thepenlight laser and held in place with a sticky-back tie-wrap connector (available at RadioShack and many other places)
On the opposite ends of the optical fibers are #18 crimp-type bullet connectors Theseare designed to splice two #18 or #20 wires together, end to end I (carefully) crimped themonto the ends of the fibers, so they act as plug-in connectors As shown in Fig 36.23, theseersatz connectors plug into makeshift “optical jacks,” which are nothing more than 1/4-inch-diameter by 3/8-inch aluminum tubing The tubing is glued over the ends of the pho-totransistors and the phototransistors are soldered near the edge of the protoboard.Refer to Fig 36.24 for a schematic wiring diagram of a power regulator for the penlightlaser Note the zener diode voltage regulator The laser I used was powered by two AAAbatteries, or roughly three volts Diode lasers are sensitive to high input voltage, and manywill burn out if fed a higher voltage than they are designed for The penlight laser con-sumes less than about 30 mA An alternative is to use three signal diodes (e.g 1N4148) inseries between the V and the input of the laser to drop the 5 vdc voltage to about 2.7–3.0volts The diodes you use should be rated for 1/4-watt or higher
INTERFACING THE PHOTODETECTORS
The output of a phototransistor is close to the full 0–5-volt range of the circuit’s supplyrange You’ll want your robot to be able to determine the intensity changes as the whiskers
Laser diode
+5V
Phototransistor
Output Optical
of fiber optics, and a photode- tector.
Trang 13bump against objects If you’re using a computer or microcontroller to operate your robot,this means you’ll need to convert the analog signal produced by the detectors into a digi-tal signal suitable for the brains on your ‘bot Several popular microcontrollers, such as theBasicX-24, OOPic, and 68HC11, have analog-to-digital converter (ADC) ports built in Ifyour computer or controller doesn’t have ADC inputs, you can add an outboard ADC using
an ADC0809 or similar chips See Chapter 29 for more information on interfacing an log signal to a digital input by way of an analog-to-digital converter
ana-CREATING THE WHISKER LOOPS
Okay, so the laser-optic whisker system may not use cat-type whiskers with ends that stick
out Still, the word whisker aptly describes the way the system works If something even
so much as brushes lightly against the whisker, the light reaching the photodetector willchange, and your robot can react accordingly
FIGURE 36.22 The prototype laser-optic sensor, showing the loose fibers (on
the robot these fibers are neatly looped to create a kind of sor antenna).
sen-Fiber optic strand
Bullet connector
Aluminum tubing
Phototransistor
FIGURE 36.23 Use short lengths of aluminum tubing, available at
hobby stores, and a crimp-on bullet connector to create
“optical jacks” for the laser-optic whisker system.
Trang 14The prototype system for this book used three “whiskers,” all of which were formed intothree small loops around the front and two sides of the test robot The loops can he held inplace with small screws, dabs of glue (don’t use hot-melt glue!), or even LEGO partsshould your robot be constructed with them When forming the loops don’t make them tootight The more compliant the loops are, the more they will detect small amounts of pres-sure If the loops are very tight, the fibers become rigid and not very compliant Thisreduces the effectiveness of the whiskers.
At the same time, the loops should not be so loose that they tend to wobble or flap whilethe robot is in motion Should this occur, the natural vibration and movement of the fiberwill cause false readings A loop diameter of from 4 to 6 inches should be sufficient givenoptical fiber pieces of average diameter and stiffness Experiment with the optical fibersyou obtain for the project Your laser-optic whisker system does not need to use three sep-arate fiber strands One strand may be enough, especially if the robot is small I elected touse three so the robot could independently determine in which direction (left, front, right)
a collision or bump had occurred
GETTING THE RIGHT KIND OF OPTICAL FIBER
Perhaps the hardest part of constructing this project is finding the right kind of opticalfiber You want to avoid any kind of graded-index fiber (described earlier) because thesewill not produce the internal interference patterns that the project depends on In essence,what you want is the cheapest, lousiest fiber-optic strands you can find The kind designed
for “light fountain art” (popular in the early 1970s) is ideal You do not want to use data
communications-grade optical fiber
Before you buy miles of optical fiber, test a two-foot strand with a suitable diode laserand phototransistor Loop the fiber and tape it snugly to your desk or workbench Connect
3.1 vzener+5 vdc
R1=47 ohms(typical; drives 30 mA)R1=27 ohms(drives 60 mA)Use 1/4-watt resistorsand zener diodes
+3.1 vdcR1
FIGURE 36.24 Most penlight lasers are designed
to operate with 3 vdc; use a zener diode or voltage regulator to pro- vide the proper voltage.
Trang 15the phototransistor to a sensitive volt-ohm meter or, better yet, an oscilloscope Gentlytouch the fiber loops to deform them You should observe a definite change of output inthe phototransistor If you do not, examine your setup to rule out a wiring error, and tryagain Turn the laser off momentarily and observe the change in output.
WORKING WITH LASER DIODES
Penlight lasers can be easily hacked for a wide variety of interesting robot projects—the
soft-touch fiber-optic whisker is just one of them Penlight lasers use a semiconductor
las-ing element While these elements are fairly hearty, they do require certain handllas-ing cautions And even though they are small, they still emit laser light that can be potentiallydangerous to your eyes So keep the following points in mind:
pre-■ Always make sure the terminals of a laser diode are connected properly to the drivecircuit
■ Never apply more than the rated voltage to the laser or it will burn up
■ Extend the same care to laser diodes that you do to any static-sensitive device Wear anantistatic wrist strap while handling the bare laser element, and keep the device in a pro-tective, antistatic bag until it’s ready for use
■ Use only a grounded soldering pencil when attaching wires to the laser diode terminals.Limit soldering duration to less than five seconds per terminal
■ Never connect the probes of a volt-ohm meter across the terminals of a laser diode Thecurrent from the internal battery of the meter may damage the laser
■ Use only batteries or well-filtered AC power supplies Laser diodes are susceptible
to voltage transients and can be ruined when powered by poorly filtered
line-operat-ed supplies
■ Take care not to short the terminals of the laser during operation
■ Avoid looking into the window of the laser while it is operating, even if you can’t seeany light coming out (is the diode the infrared type?)
■ Unless otherwise specified by the manufacturer, clean the output window of the laserdiode with a cotton swab dipped in ethanol Alternatively, you can use optics-grade lenscleaning fluid
■ If you are using a laser from a laser penlight, bear in mind that the penlight casing acts
as a heat sink If you remove the laser from the penlight casing, be sure to attach thelaser to a suitable heat sink to avoid possible damage If you keep the laser in the cas-ing, there is usually no need to add the heat sink—the casing should be enough
Piezo Disc Touch BarThe laser-optic whisker system described earlier is a great way to detect even your robot’sminor collisions But it may be overkill in some instances, providing too much sensitivityfor a zippy little robot always on the go The soft-touch collision sensor described in thissection, which uses commonly available piezo ceramic discs, is a good alternative to thelaser-optic whisker system for lower-sensitivity applications This sensor is constructedwith a half-round bar to increase the area of contact
Trang 16CONSTRUCTION OF THE PIEZO DISC TOUCH BAR
The main sensing elements of the piezo disc touch bar are two 1-inch-diameter barepiezo ceramic discs These discs are available at Radio Shack and many surplus elec-tronics stores; they typically cost under $1 or $2 each, and you can often find them foreven less
You attach the discs to a 6 1/2-inch long support bar, which you can make out ofplastic, even a long LEGO Technic beam As shown in Fig 36.25, you glue the discsinto place with 1/8-inch foam (available at most arts and craft stores) so it sticks to theceramic surface of the disc and acts as a cushion You then bend a length of 1/8-inch-diameter aluminum tubing (approximately 8–9 inches) into a half-circle; thread throughtwo small grommets, as shown in Fig 36.25; and glue the grommets to the support bar.You flatten the ends of the tubing and bend them at right angles to create a “foot”; thefoot rests on the foam-padded surface of the discs Fig 36.26 shows a photograph of afinished piezo disc touch bar The half-round tubing slopes downward slightly This isintentional, so the robot can adequately sense objects directly in front of it near the ground
To construct the piezo disc touch bar I used hot-melt glue to attach the discs and mets to the support bar You can use most any other adhesive or glue you wish, but be sure
grom-it provides a good, strong hold for the different materials used in this project (metal, tic, and rubber)
plas-CONSTRUCTING THE INTERFACE CIRCUIT
Piezo discs are curious creatures: when a voltage is applied to them, the crystalline
ceram-ic on the surface of the disc vibrates It is the nature of piezoelectrceram-icity to be both a
con-sumer and a producer of electricity When the disc is connected to an input, any physical
tap or pressure on the disc will produce a voltage The exact voltage is approximately portional to the amount of force exerted on the disc: apply a little pressure or tap and youget a little voltage Apply a heavier pressure or tap, and you get a bigger voltage
pro-The piezoelectric material on ceramic piezo discs is so efficient that even a
moderate-ly strong force on the disc will produce in excess of 5 or 10 volts That’s good in that itmakes it easy to interface the discs to a circuit, since there is usually no need to amplify
Piezo disc
Bar
Foam
FIGURE 36.25 Glue the piezo discs to a piece of plastic; the
plastic is a support bar for the discs that also makes it easier to mount the touch bar sensor onto your robot.
Trang 17the signal But it’s also bad in that the voltage from the disc can easily exceed the mum inputs of the computer, microcontroller, or other electronic device you’re interfacingwith (Pound on a piezo disc with a hammer, and, though it might be broken when you’redone, it will also produce a thousand volts or more.)
maxi-To prevent damage to your support electronics, attach two 5.1-volt zener diodes asshown in Fig 36.27, to each disc of the touch bar The zener diodes limit the output of thedisc to 5.1 volts, a safe enough level for most interface circuitry For an extra measure ofsafety, use 4.7-volt zeners instead of 5.1 volt
Note that piezoelectric discs also make great capacitors This means that over time the discwill take a charge, and the charge will show up as a constantly changing voltage at the output
of the disc To prevent this, insert a resistor across the output of the disc and ground In myexperiments I found a resistor of about 82K eliminated the charge buildup without excessive-
ly diminishing the sensitivity of the disc Experiment with the value of the resistor A highervalue will increase sensitivity, but it could cause an excessive charge buildup A lower valuewill reduce the buildup but also reduce the sensitivity of the disc It is also helpful to route theoutput of the disc to an op amp, preferably through a 100K or higher resistor
MOUNTING THE TOUCH BAR
Once you have constructed the piezo disc touch bar and added the voltage-limiting circuitry,you can attach it to the body of the robot The front of the robot is the likely choice, but youcan add additional bars to the sides and rear to obtain a near 360° sensing pattern The width
of the bar makes it ideal for any robot that’s between about 8 and 14 inches wide
FIGURE 36.26 The finished prototype of the piezo disc touch bar One variation
is to mount the discs a little lower so the metal bar physically deforms the disc rather than pushes against its center.