Вы находитесь на странице: 1из 8

design

Edited by Bill Travis and Anne Watson Swager

ideas

Voltage regulator goes digital


Chuck Wojslaw, Xicor Inc, Milpitas, CA

ower consumption and failing batteries are key issues in Figure 1 battery-operated applicaVIN (UNREGULATED) tions. Features in the new generation of 100k series voltage regulators address these 8 concerns. For example, National Semiconductors LP2951 micropower voltage 1 ERROR 5 VOUT (REGULATED) regulator provides a logic-level output LP2951 SHUTDOWN 0.01 F + signal indicating a low regulated output 3 3.3 F 10k voltage; the IC also has a logic-level input to shut down the regulator to conserve 7 4 power. These signals are digital; therefore, they are compatible with P-based sys5V tems. But what about the programming 8 910 or controlling the regulators output voltCONTROLS 2 U/D OUTPUT age? A mechanical potentiometer or seX9312W VOLTAGE 1 INC lected resistors are not elegant solutions. 7 You can complete the so-called computCS erization or digitizing of the voltage reg4 ulator by using a digitally controlled potentiometer to program the regulators output voltage. The circuit in Figure 1 is a wide-range, computer-controlled volt- A digital potentiometer adds programmability to an ordinary series voltage regulator. age regulator with a nominal output voltage that varies from 1.235 to 14.8V. The with its 100 steps, can program the reguP or C. The potentiometer adds variregulator uses a Xicor XDCP X9312W lator with a resolution of 0.136V per step. ability to the regulator circuit; its digital digitally controlled potentiometer that, The output voltage is 1.235V(1 controls, which are attached to a comkR/910 ), where k is a number from 0 to puter-controlled bus, provide program1 and reflects the proportionate position mability. For example, an automated of the wiper from one end of the pot (0) closed-loop calibration procedure to Voltage regulator goes digital ..................167 to the other end (1). R is the end-to-end program the regulator saves manufacSupply converts 5V to 48V ..................168 resistance of the potentiometer. turing test time. You can use the circuit as C routine speeds decimal-toThe XDCPs programming uses a a bias supply; a voltage reference; or binary conversion ........................................170 three-wire bus. The potentiometer is a programmable, high-output-current configured as a two-terminal variable re- voltage source in test-and-measurement Resistor implements half-duplex sistor. The regulators Error output signal applications. (DI #2442). RS-232 with echo ........................................172 warns of a low output voltage; you can Circuit monitors ac-power loss ................172 use it as a power-on reset. The logic-compatible Shutdown input signal allows you RF transmitter uses AMI encoding ..........174 to switch the regulator on and off to conHigh-voltage regulator is 100% serve power. These signals, along with surface-mountable ......................................178 To Vote For This Design, those you require to program the XDCP, Circle No. 450 typically connect to the I/O port or the
November 2 4, 1999 | edn 167

www.ednmag.com

design

ideas
48V

Supply converts 5V to

Kurk Mathews, Linear Technology Corp, Milpitas, CA


s the demand for networking path for input current durequipment grows, the need ing Q1s off-state time. This 95 Figure 2 5.25VIN operation results in conarises for a 48V supply that 5VIN tinuous input current and can power telecommunication lines. The 90 thus reduces capacitor ripcircuit in Figure 1 delivers 24W at 48V EFFICIENCY (%) ple-current requirements from a 5V input. One of the biggest chal4.75VIN 85 The reduced input riplenges in this design is choosing the input ple current, which is charvoltage. Although high-current, 5V acteristic of this topology, sources are commonly available, lower 0.05 0.1 0.2 0.3 0.4 0.5 demands sensing of the input voltages generally mean high input OUTPUT CURRENT (A) switch current rather than currents with accompanying low effithe input current. In this ciency. With a relatively simple topology case, T2 senses the switch and a 5V input source, the circuit in Fig- The circuit in Figure 1 delivers greater than 85% efficiency current, eliminating 400 ure 1 delivers greater than 85% efficien- under all conditions and greater than 90% for much of its outmW of resistor loss withcy (Figure 2). T1 stores energy during the put-current range. on-state time of Q1. Energy transfers to out using excessive board two stacked 24V outputs to create 48V. input voltage while clamping T1s leak- space (7 8 mm). Other additions imC1 charges to a dc value equal to the 24V age-inductance spike and providing a prove the circuits efficiency and per-

VIN 5V 1500 F 6.3V SANYO MV-GX

T1 VOUT 48V/0.5A + R1 51 BAV21 470 F 35V SANYO MV-GX

Figure 1

MBRS340T3

T2 + 4.7 F 30V FILM +

0.82

15

D1 1N5235B 6.8V

8 VIN S

1 7 BOOST LTC1624 TG 6 5

1 F

Q2 ZTX649

T2

10 F

C1

MBRS340T3

4.7 F 30V FILM Q1 IRL3705N

30

220 pF

Q3 ZTX749

ITH/RUN 2 36k 2.2 nF +

GND VFB 4 3

SW

1M

12k Q4 2N5210 Q5 2N5210

10.5k 1%

NOTES: T1=COILTRONIC CTX02-14261. EFD20; SIX WINDINGS, EACH 12 H. T2=DALE LPE3325-A087EES CORE; 1 TO 70, LS=980 H. 1 RESISTORS= 4 W, 5%.

0.022 F

48V

This circuit uses numerous tricks to boost efficiency to more than 85% in converting 5V to

48V.

168 edn | November 24, 1999

+ 1 nF

470 F 35V SANYO MV-GX

www.ednmag.com

design

ideas
low its 7.8V rating in the event of an input overvoltage condition. The addition of Q2 and Q3 provides an additional 5.5% of efficiency by speeding transitions and increasing gate voltage from 5 to 5.3V. This voltage peaking results from excess emitter current as Q2 turns off after charging Q1s gate capacitance. Q4 and Q5 translate the 48V output to the 1.2V that the feedback pin (VFB) requires to regulate the output voltage. The LTC1624s switching frequency decreases with output voltage, thereby reducing input current during output short-circuit conditions. (DI #2440).
To Vote For This Design, Circle No. 451

formance. The LTC1624s Boost pin normally provides the internal output driver (the TG pin) with a 5.6V regulated supply, but TG produces only 4.2V with a 5V input. Bypassing the internal regulator by connecting the Boost and VIN pins increases Q1s gate voltage, resulting in a gain of more than 3.2% in overall efficiency. R1 and D1 keep the Boost pin be-

C routine speeds decimal-to-binary conversion


Giovanni Motta, Brandeis University, Waltham, MA
previous Design Idea (Program provides integer-to-binary conversion, EDN, March 2, 1998, pg 110) describes a C/C function that provides integer-to-binary conversion. The function, named cintbin/classicC, implements a conversion in a straightforward way that defines decimal and binary numbers in terms of powers. Although this function can be useful for testing or educational purposes, its low efficiency precludes its use in embedded or other fast applications. The main source of inefficiency is the use of the pow C function, which requires linking the math library. By carefully rewriting the function and by directly accessing the binary representation of the integers in C, you can speed the conversion by as much as 58 times. The rewrite also results in more compact code, because linking the math library is unnecessary. Listing 1 shows a simple calling program and two functions, fast_d2b and fast_b2d, that implement conversion between decimal and binary integer representations. In fast_d2b, the main loop is a for loop, in which the variable, i, accesses the array, c, sequentially, from 0 to 31. At each iteration, x, the number to convert, rightshifts by i positions (the >> operator), and the routine extracts its least significant bit by masking x with the constant 1 (the & operator). The routine finally assigns the result to the ith term of the vector c. The symmetric fast_b2d function converts a binary number to its decimal

LISTING 1DECIMAL-TO-BINARY CONVERSION IN C

equivalent. The function performs the TABLE 1SECONDS TO CONVERT 100 MILLION INTEGERS Irix (SGI Indy R5000) Linux (PIII/500) conversion through a gcc gcc-03 gcc gcc-03 sequence of left shifts 476 160 80 28 and sums. To com- fast_d2b 9377 8542 2206 1672 pare the perform- classicC ance of fast_d2b with the function classicC, we ran several tests than classicC. You can download Listing on two platforms, both running Unix- 1 from EDNs Web site. At the registeredlike OSs. We used the GNU C compiler user area, go into the Software Center (gcc) with and without turning on ag- and download the file from DI-SIG gressive optimization (the O3 flag). #2444. (DI #2443). Table 1 shows the time to convert the first 100 million integers. The Unix time To Vote For This Design, command produces the running-time Circle No. 452 figure. Fast_d2b is 20 to 58 times faster
www.ednmag.com

170 edn | November 24, 1999

design

ideas

Resistor implements half-duplex RS-232 with echo


Matt Bennett, Austin, TX

previous Design Idea (Single C pin makes half-duplex RSFigure 1 232, EDN, Aug 5, 1999, pg 1 118) presented a way to implement halfC1 2 V duplex RS-232 communications without 3 C1 6 1 echo. Sometimes, an echo is desirable in V RA2/AIN2 RA1/AIN1 18 4 C2 a C application.You can obtain the echo 2 RA3/AIN3 RA0/AIN0 17 5 by using a single resistor (Figure 1). You C2 3 IC2 RA4/TOCKI OSC1 16 insert a 5.1-k resistor between the MAX232 IC1 4 15 MCLR OSC2 transmit and receive pins on the RS-232 14 PIC16C71 T1IN 11 T1OUT 5 VSS VDD 14 driver (such as a MAX232). The I/O pin 10 7 T2IN T2OUT 12 13 on the C (RB0 on 14-bit PIC Cs) con6 RB0/INT RB7 13 R1IN R1OUT 9 8 nects directly to the transmit gate on the 5.1k R2OUT R2IN 12 7 RB1 RB6 RS-232 driver. This technique is useful 11 8 RB2 RB5 for implementing a user interface on a 10 9 RB3 RB4 Microchip PIC for applications in which you communicate to the PIC via a terminal or a terminal-emulation program. The addition of a single resistor provides an echo in RS-232 half-duplex communications. Full duplex is unnecessary with a user interface based on user-issued commands input. All RS-232 data sent to the C is through the resistor and the Cs driver. and C responses, when the C gener- immediately retransmitted via the resis- The C ignores data sent to it. The C ates no spontaneous data that would tor that connects the receiver to the trans- now directly sends data down the serial mask the user-issued commands. The mitter. Because the input has high im- line. The C must immediately change character echo is useful in determining pedance, the C is essentially just the serial line back to high-impedance whether the device is powered up and the monitoring the traffic on the RS-232 line. mode after transmitting or risk data loss. RS-232 receiver is active, but an echo When the C must send serial informa- (DI #2445). alone does not tell you whether the C tion, the C converts its I/O pin to a lowis active; the C must send data. impedance driver. Anything now sent to To Vote For This Design, When the C is in receive mode, it the C shunts to ground or VCC (deCircle No. 453 makes the input pin a high-impedance pending on the Cs output state)

Circuit monitors ac-power loss


Dennis Eichenberg, Parma Heights, OH
he circuit in Figure 1 provides a simple, nonvolatile means of monitoring critical ac-power failures. Monitoring the power is important in such systems as heating and refrigeration, in which damage can occur if the ac power goes down for an extended period. The circuit in Figure 1 requires little power from the ac-power system. The quiescent battery current of approximately 5 A

provides long battery life in this application. The optocoupler consists of a neon lamp and a photocell. When the ac-power system is active, the neon lamp lights via current-limiting resistor R1. A neon lamp is ideal for this application because of its low power drain. The resistance of the photocell in the optocoupler is low when the cell is illuminated and high when its unilluminated. R2 serves as a

current-limiting resistor for the photocell. IC1A of the quad two-input NANDgate Schmitt trigger serves as a buffer for the optocoupler. The output of IC1A is normally high when the ac power is present and goes low when a power failure occurs. IC1B is configured as a negativeedge-triggered, half-monostable multivibrator. It produces a positive pulse with
www.ednmag.com

172 edn | November 24, 1999

design

ideas
D1 is a flyback diode to protect Q1 from the inductive spike S1 generates when it becomes deactivated. You can use S1 to trigger a flag or to provide a similar visual alarm. The flag remains in position until you manually reset it to prepare the circuit for the next power failure. (DI #2446). To Vote For This Design, Circle No. 454

a width of approximately 0.8R3C1, or approximately 0.8 sec, whenever the ac power goes down. The output pulse drives transistor Q1 via the current-limiting resistor, R4, to activate solenoid S1.
S1

Figure 1
9V

R1 220k

R2 1M 1 2

R3 1M
14

IC1B 5 6 4

3 IC1A C1 0.1 F

R4 1k Q1 2N2222

IC1 4093 8 9 12 13

IC1C 10

120V AC OPTO 1 SIGMA 30 1T 1-150A 1

D1 1N4001

11 IC1D

S1 9V

This circuit sets a flag or triggers a visual alarm when the ac-power line fails.

RF transmitter uses AMI encoding


Paul Sofianos, Motorola, Tempe, AZ

lthough alternate-mark-inversion (AMI) encoding is wellFigure 1 suited for direct-conversion FM transmission, designers often overlook the technique. AMI, a three-phase, 0 1 0 0 1 1 1 0 1 0 synchronous-encoding technique, uses bipolar pulses to represent logic ones and no signal to represent logic zeros (Figure 1). Direct-conversion FM transmission, in which data directly modulates a carrier, is also known as frequency-shift-keying (FSK) modulation. For higher fre- AMI encoding uses a pulse of either polarity to quency transmissions, a PLL usually denote a logic one and a 0V level to denote a synthesizes the carrier from a crystal ref- logic zero. erence. This type of RF transmission re- Manchester encoding requires twice the quires the dc voltage of the modulating bandwidth of AMI encoding and usualsignal to be 0V; otherwise, the PLL tends ly requires the addition of preamble and to track out the transmitted data. FSK postamble bits to allow the receiver to detransmission usually uses the familiar termine the center of the data bit for deManchester-encoding method. However, coding. AMI suffers from none of these

disadvantages; however, it has a drawback: A long string of zeros produces no transitions in the data stream. To address this drawback, high-density bipolar 3 (HDB3) encoding is available. The circuit in Figure 2 shows a 16channel, AMI-encoded RF transmitter for data rates as high as 28.8 kbps. The circuit operates in the unlicensed (FCC Part 15) 902- to 928-MHz industrial, scientific, and medical (ISM) band and is reliable for open-field distances as long as 1000 ft. You can easily modify it to sustain higher or lower data rates. IC1, IC2, R1, and R2 perform the AMI encoding. IC1A, a simple D flip-flop, controls the high-impedance state on Pin 13 of IC2. IC1B alternates the data presented to IC2 whenever the previous data is a logic one. This data has a slight delay to avoid

174 edn | November 24, 1999

www.ednmag.com

design

ideas
MHz/V. The mixer of the IC serves as a buffer; you can adjust R3 for desired output power. C2/L1 and C3/L2 conjugately match the source-to-load impedances. These values can vary, depending on the parasitics of your layout. CF1 (TDK Corp, www.tdk.com) provides final filtering of the output before transmission. IC4 synthesizes the desired carrier frequency. The IC internally divides by 512 the frequency that crystal Y1 establishes. With Pin 16 of IC3 tied low, the synthesized frequency is fOUT (2.048 MHz/ 512)65N, where N represents the digital value present on the N bus of IC4. As illustrated, N can vary from 3472 to 3487, yielding 16 discrete output channels from 902.72 to 906.62 MHz in 260kHz steps. R4 and C4 form a lowpass filter with corner frequency set to a value substantially lower than the internal reference frequency of the synthesizer or the data stream, whichever is lower. As with any RF design, you should give careful consideration to parts placement and shielding. You should also apply generous decoupling. If desired, you can hold Pin 17 of IC3 at logic zero for low-power-disabled operation. (DI #2429).

glitches in the output waveform. R1 and R2 set the high-impedance voltage to 1 /2VCC. R2 adjusts the peak deviation of the transmitted RF signal from IC3, nominally set at 50 kHz. C1 and R2 constitute a lowpass filter with corner frequency set to attenuate the data at frequencies above the third harmonic. IC3 is a low-power, integrated RF transmitter (Motorola, www.motorola. com) targeting ISM applications. Its voltage-controlled oscillator is a parallel-resonant Colpitts type. The varactor diode, D1, controls the modulation, and D2 sets the center frequency. The modulation, D1, is set to approximately 60 kHz/V, and the frequency adjustment, D2, is set to 7

To Vote For This Design, Circle No. 455

Figure 2
CLK 1A1 1Y1 4 1A2 1Y2 6 1A3 1Y3 10 1A4 IC2 1Y4 74HC368 12 2A1 2Y1 14 2A2 2Y2 1 1G 15 2G 2 3 5 7 9 11 13 VCC

VCC 4 DATA 3 1 2 J PR Q 5 11 13 6 PR J Q IC1B 74HC112 CLK CL 14 Q 10 9

R1 1k

IC1A 74HC112 CLK CL Q

12 K

R2 1k

R4, 10k + C4 0.1 + R3, 10k D1 C1 2700 pF 0.5 pF C6 + C5 15 pF D2 27 pF R8 9 2.7 pF 11 2.7 pF 12 VCC R3, 270 5 1000 pF 100 pF 2.2 pF C2 26 Y1 2.048 MHz C16 27 pF OSC0 28 LD 10 FV 9 PV T/R 21 8 PR 4 PD IC4 MC145151 N4 N5 N6 N7 N8 N9 N10 N11 N12 N13 FIN 15 16 17 18 19 20 24 25 22 23 C9 22 10 nF VCC 16 17 27 pF R4, 39k 4 OSCC RF OSCB OSCE 51 RF+ VCC IC3 MC13146 100 pF ANTENNA 200 L2 3.3 nF VCC

L1 1.8 nF 27 pF

MMBV809LT1

MIX/BUF_IN LINADJ PA_OUT PRSCOUT 1000 pF C3 2.2 pF CF1 CF6118702 1 3 2

PA_IN MC EN

OSCI RA0 RA1 RA2 27 5 6 7

N0 N1 N2 N3 11 8 12 7 13 6 14 5

4 VCC

S1

AMI provides an attractive alternative to Manchester encoding for direct-conversion FM transmission.

176 edn | November 24, 1999

www.ednmag.com

design

ideas

High-voltage regulator is 100%-surface-mountable


Tom Gross, Linear Technology Corp, Milpitas, CA
t can be difficult to generate a high-voltage supply from a 75 Figure 2 medium-voltage input, especially if you need a surface-mount design. WITHOUT DIODE EFFICIENCY (%) It is difficult to find surface-mount components with the necessary specs, espeWITH DIODE cially the transformer and power switches. High-voltage surface-mount capa50 citors can also be hard to locate. The cir20 30 40 50 60 cuit in Figure 1 generates 100V from LOAD CURRENT (mA) 25V. The circuit is a typical flyback regulator that uses a couple of well-estab- Bootstrapping the IC switch voltage to the inlished circuit techniques to handle the put in the circuit of Figure 1 improves efficienhigh voltage. The first technique is to in- cy by about 3%. sert an n-channel MOSFET (Si4480) in series with IC1s internal power transis- need for a snubber circuit across the pritor. The cascoded FET stands off the large mary of the transformer. switch voltage that arises when the switch Of course, the FET actively turns on turns off. The large switch voltage repre- when the source goes low. But simply ussents the input voltage summed with the ing the input voltage to supply the gate reflected output voltage of the trans- voltage doesnt work, because the maxiformers primary. Using the cascode FET mum input voltage (25V) exceeds the not only increases the effective switch- maximum 20V limit of the MOSFETs voltage capability, but also eliminates the gate-to-source voltage. Therefore, the cir-

cuit uses an emitter follower to supply a constant voltage to the gate of the MOSFET. A 1-k resistor delivers bias current to an 8.2V zener diode at the base of the npn transistor and provides base current to the npn. This arrangement sets the npns emitter and the FET gate connected to it at 7.5Vmore than enough voltage for a logic-level FET. The input to IC1 also connects to the emitter through an RC filter. A convenient feature of this circuit is that the IC switch voltage feeds back through the diode to the input (bootstrapping). This connection allows for a small boost in efficiency, negating the loss of efficiency from using a cascoding FET and the emitter-follower circuit. Figure 2 shows the efficiency of the regulator with and without the bootstrapped diode at different load currents. (DI #2439).
To Vote For This Design, Circle No. 456

Figure 1
VIN 10 TO 25V 1k + FMMT619 6 10 H

COILCRAFT VP2-0216 1:5 7 MURS160 3 5

VOUT 100V AT 50 mA MAXIMUM

22 F, 35V AVX TPS

8.2V, 4 W

Si4480 MBRS1100 10 F, 16V CERAMIC 10 MBR0520

100k

220 F, 35V

100k

+ 220 F, 35V SANYO CV-GX ALUMINUM ELECTROLYTIC 220 F, 35V

+ 1 F CERAMIC 1 6 VIN VC IC1 LT1308 GND 4 47k 5 SW FB 2 10.5k 1% 825k 1% 100k 100k

+ 220 F, 35V

560 pF

6800 pF

This bootstrapped high-voltage regulator uses all surface-mount components.

178 edn | November 24, 1999

www.ednmag.com

design

ideas
Design Idea Entry Blank

Entry blank must accompany all entries. $100 Cash Award for all published Design Ideas. An additional $100 Cash Award for the winning design of each issue, determined by vote of readers. Additional $1500 Cash Award for annual Grand Prize Design, selected among biweekly winners by vote of editors.
To: Design Ideas Editor, EDN Magazine 275 Washington St, Newton, MA 02458 I hereby submit my Design Ideas entry. Name Title Phone E-mail Company Fax Entry blank must accompany all entries. (A separate entry blank for each author must accompany every entry.) Design entered must be submitted exclusively to EDN, must not be patented, and must have no patent pending. Design must be original with author(s), must not have been previously published (limited-distribution house organs excepted), and must have been constructed and tested. Fully annotate all circuit diagrams. Please submit software listings and all other computer-readable documentation on a IBM PC disk in plain ASCII. Exclusive publishing rights remain with Cahners Publishing Co unless entry is returned to author, or editor gives written permission for publication elsewhere. In submitting my entry, I agree to abide by the rules of the Design Ideas Program. Signed Date Your vote determines this issues winner. Vote now, by circling the appropriate number on the reader inquiry card.

Address

Country Design Idea Title

ZIP

Social Security Number (US authors only)

Circle 13 or visit www.ednmag.com/infoaccess.asp

180 edn | November 24, 1999

www.ednmag.com