1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

McGraw-Hill - The Robot Builder''''s Bonanza Part 7 pot

35 429 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 35
Dung lượng 458,89 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Specifically, Ni-Cad and nickel metalhydride batteries provide 1.2 volts per cell, and lead-acid batteries provide 2.0 volts per cell.To achieve higher voltages, you can link cells inter

Trang 1

Ni-Cads, provide different nominal cell voltages Specifically, Ni-Cad and nickel metalhydride batteries provide 1.2 volts per cell, and lead-acid batteries provide 2.0 volts per cell.

To achieve higher voltages, you can link cells internally or externally (see the next section, “Increasing Battery Ratings,” for more information) By internally linking together six 1.5-volt cells, for example, the battery will output 9 volts

Nominal cell voltage is important when you are designing the battery power suppliesfor your robots If you are using 1.5-volt cells, a four-cell battery pack will nominallydeliver 6 volts, an eight-cell pack will nominally deliver 12 volts, and so forth Conversely,

if you are using 1.2-volt cells, a four-cell battery pack will nominally deliver 4.8 volts and

an eight-cell pack will nominally deliver 9.6 volts The lower voltage will have an effect

on various robotic subsystems For example, many microcontrollers used with robots (seePart 5 of this book) are made to operate at 5 volts and will reset—restart their program-ming—at 4.5 volts A battery pack that delivers only 4.8 volts will likely cause problemswith the microcontroller You either need to add more cells or change the battery type to akind that provides a higher per-cell voltage

Discharge (in hours)

0 1 3 4 5 6

1AH battery at:

Volts percell

1.2

1.6

1.4

FIGURE 15.4 The charge/discharge curves of a typical rechargeable

battery Note that the charge time is longer than the charge time.

Trang 2

dis-INTERNAL RESISTANCE

The internal resistance of a battery determines the maximum rate at which power can bedrawn from the cells A lower internal resistance means more power can be drawn out inless time Lead-acid and nickel metal hydride cells are good examples of batteries that have

a very low internal resistance

When comparing batteries, you don’t really need to know the actual internal resistance

of the cells you use Rather, you’ll be more concerned with the discharge curve and themaximum amp-hour ratings of the battery Still, knowing that the battery’s internal resis-tance dictates the discharge curve and capacity of the battery will help you to design powerpacks for your robots

Increasing the Battery RatingsYou can obtain higher voltages and current by connecting several cells together, as shown

in Fig 15.5 There are two basic approaches:

■ To increase voltage, connect the batteries in series The resultant voltage is the sum ofthe voltage outputs of all the cells combined

■ To increase current, connect the batteries in parallel The resultant current is the sum ofthe current capacities of all the cells combined

Take note that when you connect cells together not all cells may be discharged orrecharged at the same rate This is particularly true if you combine two half-used batterieswith two new ones The new ones will do the lion’s share of the work and won’t last aslong Therefore, you should always replace or recharge all the cells at once Similarly, ifone or more of the cells in a battery pack is permanently damaged and can’t deliver or take

on a charge like the others, you should replace it

Battery RechargingMost lead-acid and gel-cell batteries can be recharged using a 200- to 800-mA batterycharger The charger can even be a DC adapter for a video game or other electronics.Standard Ni-Cad batteries can’t withstand recharge rates exceeding 50 to 100 mA, and ifyou use a charger that supplies too much current you will destroy the cell Use only a bat-tery charger designed for Ni-Cads High-capacity Ni-Cad batteries can be charged at higher rates, and there are rechargers designed specially for them

Nickel metal hydride, rechargeable alkalines, and rechargeable lithium-ion batteries allrequire special rechargers Avoid substituting the wrong charger for the battery type youare using, or you run the risk of damaging the charger and/or the battery (and perhaps caus-ing a fire)

You can rejuvenate zinc batteries by placing them in a recharger for a few hours Theprocess is not true recharging since the battery is not restored to its original power or

BATTERY RECHARGING 197

Trang 3

voltage level The rejuvenated battery lasts about 20 to 30 percent as long as it did duringits initial use Most well-built zinc batteries can be rejuvenated two or three times beforethey are completely depleted.

Rechargeable batteries should be periodically recharged whether they need it or not.Batteries not in regular use should be recharged every two to four months, more frequentlyfor NiMH batteries Always observe polarity when recharging batteries Inserting the cellsbackward in the recharger will destroy the batteries and possibly damage the recharger.You can purchase ready-made battery chargers for the kind of battery you are using orbuild your own The task of building your own is fairly easy because several manufactur-ers make specialized integrated circuits just for recharging batteries These ICs provide allthe necessary voltage and current protective mechanisms to ensure that the battery is prop-erly charged For example, you can use the Unitrode UC/2906 and UC/3906 from TexasInstruments to build an affordable charger for sealed lead-acid and gelled electrolyte bat-teries Similarly, the MAX712 from Maxim lets you construct a flexible fast recharger forNiMH batteries These and other specialty ICs are not always widely available, so you may

A Parallel connection 2X current

FIGURE 15.5 Wiring batteries to increase ratings.

a Parallel connection increases

cur-rent; b Series connection increases

voltage.

Trang 4

need to check several sources before you find them However, the search is well worth thetime because of the cost and construction advantages these chips can provide.

Ni-Cad DisadvantagesDespite their numerous advantages, Ni-Cad batteries have a few peculiarities you’ll want toconsider when designing your robot power system The most annoying problem is the “mem-ory effect” we discussed earlier in this chapter Not all battery experts agree that Ni-Cads stillsuffer from this problem, but most anyone who has tried to use Ni-Cads has experienced it

in one form or another For various reasons we won’t get into, the discharge curve of Ni-Cadbatteries is sometimes altered The net effect is that the battery won’t last as long on a fullcharge as it should This so-called memory effect can be altered in two ways:

The dangerous way Short the battery until it’s dead Recharge it as usual Some

batter-ies may be permanently damaged by this technique

The safe way Use the battery in a low-current circuit, like a flashlight, until it is dead.

Recharge the battery as usual You must repeat this process a few times until the ory effect is gone

mem-The best way to combat memory effect is to avoid it in the first place Always fully charge Ni-Cad batteries before charging them If you don’t have a flashlight handy, buildyourself a discharge circuit using a battery holder and a flashlight bulb The bulb acts as a

dis-“discharge” indicator When it goes out, the batteries are fully discharged

The other disadvantage is that the polarity of Ni-Cads can change—positive becomesnegative and vice versa—under certain circumstances Polarity reversal is common if thebattery is left discharged for too long or if it is discharged below 75 or 80 percent capacity Excessive discharging can occur if one or more cells in a battery pack wears out.The adjacent cells must work overtime to compensate, and discharge themselves too fastand too far

You can test for polarity reversal by hooking the battery to a volt-ohm meter (remove it fromthe pack if necessary) If you get a negative reading when the leads are connected properly, thepolarity of the cell is reversed You can sometimes correct polarity reversal by fully chargingthe battery (connecting it in the recharger in reverse), then shorting it out Repeat the process acouple of times if necessary There is about a fifty-fifty chance that the battery will survive this.The alternative is to throw the battery out, so you actually stand to lose very little

Recharging the RobotYou’ll probably want to recharge the batteries while they are inside the robot This is noproblem as long as you install a connector for the charger terminals on the outside of therobot When the robot is ready for a charge, connect it to the charger

Ideally, the robot should be turned off during the charge period, or the batteries maynever recharge However, turning off the robot during recharging may not be desirable, asthis will end any program currently running in the robot There are several schemes you

NI-CAD DISADVANTAGES 199

Trang 5

can employ that will continue to supply current to the electronics of the robot yet allow thebatteries to charge One way is to use a relay switchout In this system, the external powerplug on your robot consists of four terminals: two for the battery and two for the electron-ics When the recharger is plugged in, the batteries are disconnected from the robot Youcan use relays to control the changeover or heavy-duty open-circuit jacks and plugs (theones for audio applications may work) While the batteries are switched out and beingrecharged, a separate power supply provides operating juice to the robot.

Battery CareBatteries are rather sturdy little creatures, but you should follow some simple guidelineswhen using them You’ll find that your batteries will last much longer, and you’ll saveyourself some money

■ Store new batteries in the fresh food compartment of your refrigerator (not the freezer).Put them in a plastic bag so if they leak they won’t contaminate the food Remove themfrom the refrigerator for several hours before using them

■ Avoid using or storing batteries in temperatures above 75°F or 80°F The life of the tery will be severely shortened otherwise Using a battery above 100°F to 125°F caus-

bat-es rapid deterioration

■ Unless you’re repairing a misbehaving Ni-Cad, avoid shorting out the terminals of thebattery Besides possibly igniting fumes exhausted by the battery, the sudden andintense current output shortens the life of the cell

■ Keep rechargeable batteries charged Make a note when the battery was last charged

■ Fully discharge Ni-Cads before charging them again This prevents memory effect.Other rechargeable battery types (nickel metal hydride, rechargeable alkaline, lead-acid,etc.) don’t exhibit a memory effect and can be recharged at your convenience

■ Given the right circumstances all batteries will leak, even the “sealed” variety Whenthey are not in use, keep batteries in a safe place where leaked electrolyte will not causedamage Remove batteries from their holder when they are not being used

Power DistributionNow that you know about batteries, you can start using them in your robot designs Themost simple and straightforward arrangement is to use a commercial-made battery holder.Holders are available that contain from two to eight AA, C, or D batteries The wiring inthese holders connects the batteries in series, so a four-cell holder puts out 6 volts (1.5times 4) You attach the leads of the holder (red for positive and black for ground or nega-tive) to the main power supply rail in your robot If you are using a gel-cell or lead-acidbattery you would follow a similar procedure

FUSE PROTECTION

Flashlight batteries don’t deliver extraordinary current, so fuse protection is not required

on the most basic robot designs Gel-cell, lead-acid, and high-capacity Ni-Cad batteries

Trang 6

can deliver a most shocking amount of current In fact, if the leads of the battery tally touch each other or there is a short in the circuit the wires may melt and a fire coulderupt.

acciden-Fuse protection helps eliminate the calamity of a short circuit or power overload in yourrobot As illustrated in Fig 15.6, connect the fuse in line with the positive rail of the battery, as near to the battery as possible You can purchase fuse holders that connectdirectly to the wire or that mount on a panel or printed circuit board

Choosing the right value of fuse can be a little tricky, but it is not impossible It doesrequire that you know how much current your robot draws from the battery during normaland stalled motor operation You can determine the value of the fuse by adding up the current draw of each separate subsystem, then tack on 20 to 25 percent overhead.Let’s say that the two drive motors in the robot draw 2 amps each, the main circuitboard draws 1 amp, and the other small motors draw 0.5 amp each (for a total of, perhaps,

2 amps) Add all these up and you get 7 amps Installing a fuse with a rating of at least 7amps at 125 volts will help assure that the fuse won’t burn out prematurely during normaloperation Adding that 20 to 25 percent margin calls for an 8- to 10-amp fuse

Recall from earlier in this chapter that motors draw excessive current when they arefirst started You can still use that 8- to 10-amp fuse, but make sure it is the slow-blow type.Otherwise, the fuse will burn out every time one of the heavy-duty motors kick in.Fuses don’t come in every conceivable size For the sake of standardization, choose theregular 1 1/4-inch-long-by-1/4-inch-diameter bus fuses You’ll have an easier job findingfuse holders for them and a greater selection of values Even with a standard fuse size,there is not much to choose from past 8 amps, other than 10, 15, and 20 amps For valuesover 8 amps, you may have to go with ceramic fuses, which are used mainly for microwaveovens and kitchen appliances

MULTIPLE VOLTAGE REQUIREMENTS

Some advanced robot designs require several voltages if they are to operate properly Thedrive motors may require 12 volts, at perhaps two to four amps, whereas the electronicsrequire 5, and perhaps even 5 volts Multiple voltages can be handled in several ways.The easiest and most straightforward is to use a different set of batteries for each main

FIGURE 15.6 How to install a fuse in line with the battery and the

robot electronics or motor.

Trang 7

subsection The motors operate off one set of large lead-acid or gel-cell batteries; the tronics are driven by smaller capacity Ni-Cads.

elec-This approach is actually desirable when the motors used in the robot draw a lot of rent Motors naturally distribute a lot of electrical noise throughout the power lines, noisethat electronic circuitry is extremely sensitive to The electrical isolation that is providedwhen you use different batteries nearly eliminates problems caused by noise (the remain-der of the noise problems occur when the motor commutators arc, causing RF interfer-ence) In addition, when the motors are first started the excessive current draw from themotors may zap all the juice from the electronics This “sag” can cause failed or erraticbehavior, and it could cause your robot to lose control

cur-The other approach to handling multiple voltages is to use one main battery source and

“step” it down (sometimes up) so it can be used with the various components in the tem This is called DC-DC conversion, and you can accomplish it by using circuits of yourown design or by purchasing specialty integrated circuit chips that make the job easier.One 12-volt battery can be regulated (see “Voltage Regulation” later in this chapter) to justabout any voltage under 12 volts The battery can directly drive the 12-volt motors and,with proper regulation, supply the 5-volt power to the circuit boards

sys-Connecting the batteries judiciously can also yield multiple voltage outputs By necting two 6-volt batteries in series, as shown in Fig 15.7, you get 12 volts, 6 volts,and 6 volts This system isn’t nearly as foolproof as it seems, however More than likely,the two batteries will not be discharged at the same rate This causes extra current to bedrawn from one to the other, and the batteries may not last as long as they might otherwise

con-If all of the subsystems in your robot use the same batteries, be sure to add sufficientfiltering capacitors across the positive and negative power rails The capacitors help soak

up excessive current spikes and noise, which are most often contributed by motors Placethe capacitors as near to the batteries and the noise source as possible Exact values are notcritical, but they should be over 100 µF—even better is 1000 to 3000 µF Be certain thecapacitors you use are rated at the proper voltage (25 to 35 volts is fine) Using an under-rated capacitor will burn it out and possibly cause a short circuit

You should place smaller value capacitors, such as 0.1 µF, across the positive and ative power rails wherever power enters or exits a circuit board As a general rule, you

neg-+

-+12vdc+6vdc or

-6vdc

6-volt battery

+

6-volt battery

-FIGURE 15.7 Various voltage tap-offs from two 6-volt batteries This is

not an ideal approach (the batteries will discharge at ferent rates), but it works in a pinch.

Trang 8

dif-should add these “decoupling” capacitors beside clocked logic ICs, particularly flip-flopsand counters A few linear ICs, such as the 555 timer, need decoupling capacitors, or thenoise they generate through the power lines can ripple through to other circuits If manyICs are on the board, you can usually get by with adding one 0.1 µF decoupling capacitorfor every three or four chips.

SEPARATE BATTERY SUPPLIES

Most hobby robots now contain computer-based control electronics of some type Thecomputer requires a specific voltage (called regulation, discussed in the next section), and

it expects the voltage to be “clean” and free of noise and other glitches A common lem in robotic systems is that the motors cause so-called sags and noise in the power supply system, which can affect the operation of the control electronics You can largelyremedy this by using separate battery supplies for the motors and the electronics Simplyjoin the ground connection for the supplies together

prob-With this setup, the motors have one unregulated power supply, and the control tronics have their own regulated power supply Even if the motors turn on and off veryrapidly this approach will minimize sags and noise on the electronics side It’s not alwayspossible to have separate battery supplies, of course In these cases, use the capacitor fil-tering techniques described in the earlier “Multiple Voltage Requirements” section Thelarge capacitors that are needed to achieve good filtering between the electronics andmotor sections will increase the size of your robot A 2200 µF capacitor, for example, maymeasure 3/4 inch in diameter by over an inch in height You should plan for this in yourdesign

elec-Voltage RegulationMany types of electronic circuits require a precise voltage or they may be damaged or acterratically Generally, you provide voltage regulation only to those components and circuitboards in your robot that require it It is impractical to regulate the voltage for the entirerobot as it exits the battery You can easily add solid-state voltage regulators to all yourelectronic circuits They are easy to obtain, and you can choose from among several stylesand output capacities Two of the most popular voltage regulators, the 7805 and 7812, pro-vide 5 volts and 12 volts, respectively You connect them to the “” and “” (ground)rails of your robot, as shown in Fig 15.8 (refer to the parts list in Table 15.1)

Other 7800 series power regulators are designed for 15, 18, 20, and 24 volts.The 7900 series provide negative power supply voltages in similar increments The currentcapacity of the 7800 and 7900 series that come in the TO-220 style transistor packages(these can often be identified as they have no suffix or use a “T” suffix in their part num-ber), is limited to less than one amp As a result, you must use them in circuits that do notdraw in excess of this amount

Other regulators are available in a more traditional TO-3-style transistor package (“K”suffix) that offers current output to several amps The “L” series regulators come in thesmall TO-92 transistor packages and are designed for applications that require less thanabout 500 mA Other regulators of interest:

VOLTAGE REGULATION 203

Trang 9

■ The 328K provides an adjustable output to 5 volts, with a maximum current of 5A(amperes).

■ The 78H05K offers a 5-volt output at 5A

■ The 78H12K offers a 12-volt output at 5A

■ The 78P05K delivers 5 volts at 10 amps

SWITCHING VOLTAGE REGULATION

All of the regulators described in the last section are the linear variety They basically take

an incoming voltage and clamp it to some specific value Linear regulation isn’t very cient; a lot of energy is wasted in heat from the regulator This inefficiency is particularlynotable in battery-powered systems, where the current capacity and the battery life are limited

effi-An alternative to linear regulators is to use a switching (or switching-mode) voltage

regulator, which exhibits better efficiencies Most high-tech electronics equipment nowuse switching power supplies, especially since single-IC switching voltage regulators arenow so common and inexpensive Maxim, Texas Instruments, Dallas Semiconductor,and many other companies are actively involved in the design and sale of switching voltage regulators See Appendix B, “Sources,” and Appendix C, “Robot Information onthe Internet,” for more information on these and other companies offering power supplyICs and circuits

A good example of a switching voltage regulator is the MAX638, from Maxim Withjust a few added parts (a typical circuit, taken from the MAX638’s data sheet, is shown

in Fig 15.9; refer to the parts list in Table 15.2), you can build a simple, compact, pensive, and efficient voltage regulator The chip can also be used as a low-battery detector See “Battery Monitors” later in this chapter for more information on low-battery detection

Positive supply rail (from battery)

Negative supply rail (from battery)

0.1 µF C1

C3

IC1

0.1 µFC2

FIGURE 15.8 Three-terminal linear voltage regulators, like the 7805,

can be used to provide stable voltages for ered robots The capacitors help filter (smooth out) the voltage.

battery-pow-TABLE 15.1 PARTS LIST FOR 5-VOLT BATTERY REGULATOR.

IC1 7805 linear voltage regulatorC1 100 F electrolytic capacitorC2, C3 0.1 F tantalum capacitor

Trang 10

ZENER VOLTAGE REGULATION

A quick and inexpensive method for providing a semiregulated voltage is to use zenerdiodes, as shown in Fig 15.10 With a zener diode, current does not begin to flow throughthe device until the voltage exceeds a certain level (called the breakdown voltage) Voltageover this level is then “shunted” through the zener diode, effectively limiting the voltage tothe rest of the circuit Zener diodes are available in a variety of voltages, such as 3.3 volts,5.1 volts, 6.2 volts, and others

Zener diodes are also rated by their tolerance (1 percent and 5 percent are common) andtheir power rating, in watts For low-current applications, a 0.3- or 0.5-watt zener should

be sufficient; higher currents require larger 1-, 5-, and even 10-watt zeners Note the

VOLTAGE REGULATION 205

+Vm +BV

6 +Vs

R1

R2 100k

3 2 LB1 LB0 N

+ -

+ -

+ -

LOW BATTERY COMPARATOR

LOW BATTERY OUTPUT

ERROR COMPARATOR

+1.31V BANDGAP REFERENCE

65kHz OSC

MODE SELECT COMPARATOR GND

50mV +

+

P LX 5

D1 1N4148 220H

100 F 0.1 F

+5VOUT VOUT 1

COMP B VFB 7

4

FIGURE 15.9 The Maxim MAX638 is among several high-efficiency voltage

regu-lators available The MAX638 is most commonly used to provide regulated 5 volts, but it can also be adjusted using external com- ponents to provide other voltages.

TABLE 15.2 PARTS LIST FOR MAXIM MAX638 SWITCHING POWER SUPPLY.

C1 0.1 F ceramic capacitorC2 100 F electrolytic capacitor

L1 220 H inductor

All resistors have 5 or 10 percent tolerance, 1/4-watt.

Trang 11

resistor R1 in the schematic shown in Fig 15.10 This resistor limits the current throughthe zener, and its value (and wattage) is determined by the current draw from the load, aswell as the input and output voltages.

POWER DISTRIBUTION

You may choose to place all or most of your robot’s electronic components on a singleboard You can mount the regulator(s) directly on the board You can also have severalsmaller boards share one regulator as long as the boards together don’t pull power in excess

of what the regulator can supply Fig 15.11 shows how to distribute the power from a gle battery source to many separate circuit boards The individual regulators provide powerfor one or two large boards or to a half dozen or so smaller ones

sin-Voltage regulators are great devices, but they are somewhat “wasteful.” To work erly, the regulator must be provided with several volts more than the desired output volt-age For example, the 7812 12-volt regulator needs 13 to 15 volts to deliver the full voltage and current specified for the device Well-regulated 12-volt robotic systems mayrequire you to use an 18-volt supply

prop-Voltage Double and Inverters

If your robot is equipped with 12-volt motors and uses circuitry that requires only 5and/or 12 volts, then your work is made easy for you But if you require negative supplyvoltages for some of the circuits, you’re faced with a design dilemma Do you add morebatteries to provide the negative supply? That’s one solution, and it may be the only oneavailable to you if the current demand of the circuits is moderate to high

Another approach is to use a polarity-reversal circuit, such as the one in Fig 15.12(refer to the parts list in Table 15.3) The current at the output is limited to less than 200

mA, but this is often enough for devices like op amps, CMOS analog switches, and other small devices that require a 5 or 12 vdc voltage The negative output voltage is proportional to the positive output voltage So, 12 volts in means roughly 12 volts out

Zener

Current-limitingresistorVin

VOut

FIGURE 15.10 A zener diode and resistor can

make a simple and inexpensive voltage regulator Be sure to select the proper wattage for the zener and the proper wattage and resistance for the resistor.

Trang 12

Some computer components require voltages above the normal supply An example arethe “high-side” power MOSFET transistors in an H-bridge driver circuit You can use thecircuit shown in Fig 15.13 (refer to the parts list in Table 15.4) to double the supply volt-age to provide the desired voltage The current level at the output is very low, but it should

be enough to be used as a high-voltage pulse

The circuits described in the previous sections of this chapter are quickly and pensively built, but because of their simplicity they can leave a lot to be desired If youneed more precise power supplies, the power management ICs from Maxim, TexasInstruments, and others are probably the better bet See Appendix B, “Sources,” for moreinformation

inex-Battery MonitorsQuick! What’s the condition of the battery in your robot? With a battery monitor, you’dknow in a flash A battery monitor continually samples the output voltage of the batteryduring operation of the robot (the best time to test the battery) and provides a visual orlogic output In this section we’ll profile the most common types

BATTERY MONITORS 207

Unregulated vdc in

10A slow-blow fuse

IN OUT

GND 100µF 0.1µF

FIGURE 15.11 Parallel connection of circuit boards from a single power source.

Each board has its own voltage regulator.

Trang 13

4.3-VOLT ZENER BATTERY MONITOR

Figure 15.14 (refer to the parts list inTable 15.5) shows a simple battery monitor using a4.3-volt quarter-watt zener diode R1 sets the trip point When in operation, the LED winksoff when the voltage drops below the setpoint To use the monitor, set R1 (which should

be a precision potentiometer, 1 or 3 turn) when the batteries to your robot are low Adjustthe pot carefully until the LED just winks off Recharge the batteries The LED should nowlight Another, more “scientific” way to adjust R1 is to power the circuit using anadjustable power supply While watching the voltage output on a meter, set the voltage atthe trip point (e.g., for a 12-volt robot, set it to about 10 volts)

ZENER/COMPARATOR BATTERY MONITOR

A microprocessor-compatible battery monitor is shown in Fig 15.15 (refer to the parts list

in Table 15.6) This monitor uses a 5.1-volt quarter-watt zener as a voltage reference for a

TABLE 15.3 PARTS LIST FOR POLARITY INVERTER.

1N4148D2

R2

10K

C4 10

C2 220

R3 10K

FIGURE 15.12 A polarity inverter circuit Current output is low but

enough for a few op amps.

Trang 14

339 quad comparator IC Only one of the comparator circuits in the IC is used; you are free

to use any of the remaining three for other applications The circuit is set to trip when thevoltage sags below the (approximate) 5-volt threshold of the zener (in my test circuit the comparator tripped when the supply voltage dipped to under 4.5 volts) When this hap-pens, the output of the comparator immediately drops to 0 volts One advantage of this cir-cuit is that the voltage drop at the output of the comparator is fairly steep (see Fig 15.16)

USING A BATTERY MONITOR WITH A MICROPROCESSOR

You can usually connect battery monitors to a microprocessor or microcontroller input When

in operation, the microprocessor is signaled by the interrupt when the LED is triggered.Software running on the computer interprets the interrupt as “low battery; quick get arecharge.” The robot can then place itself into nest mode, where it seeks out its own batterycharger If the charger terminals are constructed properly, it’s possible for the robot to plug itself

in Fig 15.17 shows a simplified flow chart illustrating how this kind of behavior might work

C2 220

D1 1N4148

1N4148D2

C3 220

R1 2.2K

R2 15K

C4 470

C5 220

C1 0.01

FIGURE 15.13 A voltage doubler The voltage at the V Source terminal is

roughly double the voltage applied to the Vcc terminal.

TABLE 15.4 PARTS LIST FOR VOLTAGE DOUBLER

C1 0.01 F ceramic capacitorC2,C3 220 F electrolytic capacitorC4 470 F electrolytic capacitorC5 220 F electrolytic capacitorD1,D2 1N4148 diode

All resistors have 5 or 10 percent tolerance, 1/4-watt; all capacitors have 10 percent tolerance.

Trang 15

Build a Robot Testing Power SupplyUsing a battery while testing or experimenting with new robot designs is both inconvenientand counter productive Just when you get a circuit perfected, the battery goes dead andmust be recharged A stand-alone power supply, which operates off of 117 VAC house cur-rent, can supply your robot designs with regulated DC power, without requiring you toinstall, replace, or recharge batteries You can buy a ready-made power supply (they arecommon in the surplus market) or make your own.

One easy-to-use and inexpensive power supply is the DC wall transformer, or wart.” Wall-warts convert AC power into low-voltage DC, usually 6–18 volts (note:some wall-warts only reduce the voltage, but do not convert it from AC to DC—don’tuse these!) Wall-warts have no voltage regulation, and most cannot provide more than

“wall-a few hundred milli“wall-amps of current Use them only when you don’t need regul“wall-ation (or when it is provided elsewhere in your circuit) and for nondemanding current applications

c b e

Vin (12 vdc)

LED1

10K R1

4.3v D1

R2 1K

R3 1K

Q1 2N3904

Output

FIGURE 15.14 Battery monitor using 4.3-volt zener

diode This circuit is designed to be used with a 12-volt battery.

TABLE 15.5 PARTS LIST FOR 4.3-VOLT ZENER BATTERY MONITOR.

R2,R3 1K resistorD1 4.3-volt zener diode (1/4-watt)Q1 2N3904 NPN transistorLED1 Light-emitting diode

All resistors have 5 or 10 percent tolerance, 1/4-watt.

Trang 16

BUILD A ROBOT TESTING POWER SUPPLY 211

+5vdc

3

12

2 4

Output R1

5.1 v zener diode

FIGURE 15.15 A zener diode and 339

com-parator can be used to struct a fairly accurate 5-volt battery monitor.

con-TABLE 15.6 PARTS LIST FOR 339 COMPARATOR BATTERY MONITOR.

IC1 339 comparator ICR1,R2 10K resistorD1 5.1-volt zener diode (1/4- or 1/2-watt)

All resistors have 5 or 10 percent tolerance, 1/4-watt.

10 9 8 7 6 5 4

2 1 0 3

10 9 8 7 6 5 4 2 1

Vout

Vin VOLTS

10 9 8 7 6 5 4

2 1 0 3

10 9 8 7 6 5 4 2 1

Vin VOLTS

Vout

FIGURE 15.16 The output of a 339 comparator has a sharp cutoff as the voltage

goes above or below the setpoint The voltages shown here are representative only.

Trang 17

Read Battery Circuit

Make Connection and Charge

FIGURE 15.17 Software can be used to command the robot to return

to its battery recharger nest should the battery exceed

a certain low point.

Ngày đăng: 10/08/2014, 04:22

TỪ KHÓA LIÊN QUAN