Professional Documents
Culture Documents
EDN Design Ideas 2001
EDN Design Ideas 2001
EDN Design Ideas 2001
E lamps use various techniques to turn inverting pin to ground. With a ground-
on the bulbs. The design usually in- ed IC1A output, VO clamps low.
volves a compromise between turn-on The high-frequency switching strikes
precise timing.
voltage and lamp life because the two are the preheated lamp. In case the bulb fails Is this the best Design Idea in this
inversely related. One way to reach a rea- to start, the circuit turns off and then on issue? Vote at www.ednmag.com/edn
sonable compromise is to initially allow again. Residual charges on the capacitors mag/vote.asp.
a momentary inrush current to warm the
filaments, followed by a series of inter- 12V
rupted short circuits across the 12V
Figure 1
lamp that generate the required 10k
82k
high voltage to trigger the fluorescent. 10k
With a preheated filament, the necessary 100 pF
7.5k
1M
1M D1 12V
1M
Preheat starter for electronic 1.5 SEC
_ 6
ballast..............................................................113 1
IC1B C2 D2
330k
+
7 2.2 mF
Low-cost circuit programs 9 10k
+ 0.5 SEC
EEPROMs ......................................................114 1M 1M 14
IC1D
12V _ 8
Circuit yields ultralow-noise VGA..............116 C1
2.2 mF
1M
Sequential channel selector NOTES:
simplifies software ......................................120 IC1=LM339N.
DIODES=1N4606.
mC provides timer function ......................124
5V 5V
DATA ADDRESS 5V V3
BUS BUS ADDRESS V3
BUS
13 0.1 mF
5V 0.1 mF
8 3V 5V
9 ADDRESS ADDRESS DATA OE3 3V
7 5V BUS 1
10 BUS BUS DATA
6 DATA
12 OEB1 OEB1 BUS
5 BUS 8
WEB3
4 OEB5 7
3 IC2 11
IC3 6 IC5
2 74VHC541 74VHC541
CEB5 5
1 8
1 OEB3 4
7
2 6 3
3 5 CEB3 2
1
4 OEB2
OEB2
19 V5
19
74HC04 74HC04 V3 V3
1 2 9 8 OE3
0.1 mF
OEB3 OE3
0.1 mF 0.1 mF OEB5
74HC04 3V
74HC04 DATA
3 4 11 10
1 1 BUS
OEB1 OEB1
13 12 13
5 6
8
74HC04 7 IC4 IC6
74HC04 74VHC541 74HCT541
6
3V
ADDRESS CEB3 5
BUS 0EB3 4
WEB3 3
2
OEB2 OEB2
3V 19 19
IC1 DATA
64-kBYTE OEB5
BUS
EEPROM 8
7
32-PIN PLCC 6
5
4
3
2
1
For less than $100, this circuit adapts a 5V EEPROM programmer for 3.3V operation.
Figure 1 15V
24 dB 0.1 mF
OPTIONAL
RANGE- 15V 0.1 mF IC2A IC2B IC2C
SHIFT ADG333 16 12 dB ADG333 6 dB ADG333ABR 3 dB
ATTENUATOR
4 SB VDD 7 SB 14 SB
SIGNAL 4 D 3 5 D 8 12 D 13 14 SIGNAL
R1 IN + SA + SA +
3 + 7 9 16 OUT
1 2 SA IC IC 10 12 IC1D
090 2 IC 6 _ 1B 11 _ 1C 15 _
_ 1A
R2 LT1125 10 11
1 LT1125CS LT1125CS
100 LT1125CS
13
0.1 mF
825 IC2D
GND VSS
115V 1k 1k ADG333ABR
6 5
17 SB
0.1 mF D 18
SA
19
1k
66.5 332 1k
2k
115V 20
BIT 3
BIT 2
BIT 1
BIT 0
This VGA offers ultralow noise, a wide dynamic range, and high bandwidth.
15V VCC
Figure 2 0.1 mF
Figure 1
5V 5V
IN 0.1 mF
10k
D1
1N4148 16 8
VCC GND
IC1B IC1C IC2
10k 74HC175
3 4 5 6 4 2
D0 Q0
5 7
D1 Q1
0.1 mF 6
D2 12
D2 Q1 5V 5V
1N4148 13 10 5V
D3 Q2
R3 9 0.1 mF 0.1 mF
470k CLK Q3
15 0.1 mF
RST
5V 16 8 9 10
14 7
0.1 mF
VCC GND VCC GND VCC GND
IC1A
IC4 IC5
14 IC3
1 2 74HC393 74HC237 UDN2981
15 1 18 OUT8
1 3 1 Y0 I1 01
7 CLKA Q1A A0 Y1 14 2 I2 17 OUT1
02
C1 4 2 13 3 16
Y2 I3 OUT2
0.1 mF 3 Q2A A1
12 4 03
CLKB 5 3 A Y3 I4 15 OUT3
Q3A 2 11 5 04
Y4 I5 14
8 10 6 05 OUT4
Q4B Y5 I6
Y6 9 7
I7 06 13 OUT5
6 7 8 12
5V CS1 Y7 07 OUT6
RSTA RSTB I8
11 OUT7
5V 08
2 12 CS2 LE
D3
1N4148 5 4
2.2M IC1D IC1E
9 8 11 10
0.1 mF
R1 D4
1k 1N4148
RESET
A robust circuit uses one input to sequentially select one output channel at a time.
Figure 2
IC2, PIN 1
RST
IC2, PIN 9
CLK
D0
Q0
Q1
CS1
CLKA
LE
A0
A1
A2
Y0
Y1
Y2
XTAL VCC
27 pF 4.096 MHz 27 pF
31 10k
GREEN LED
Figure 1 30
D2
1k
8 29
VCC 10M OUT2 RED LED
7 28
1 OUT1 D1
1k
2 RSET 27
IN IC2 10k 17 42 7
MC34064 VCC
10k 19 DISPLAY 2 RIGHT
GND 41 6
1 mF HP-HDSP-H103
1 mF 10k 18 40 4
2 2
39
3 10k 10k IC1
MC68HC11E1 38 1
34 37 9
33 36 10
32 35 5
S1 S2 S3 10k
3 8
43 9
GREEN RED
44 10
45 7
YELLOW 11
6 DISPLAY 1 LEFT
46
12 HP-HDSP-H103
47 4
48 13 2
49 14 1
50 15 9
1k 52 10
VCC 16
51 5
J2 10k
1 mF 20
3 8
21 10k
22 10k
D3
1N4007 23 10k
24 10k
1 3
IN IC3 OUT VCC
7805 25 10k
10 mF 0.1 mF 3
GND 0.1 mF
2 10 mF 5
4 10k
VCC
6
VCC
J1
4321
Open-loop power supply delivers IC1 regulates the peak current and allows this 1W supply to operate from universal mains.
as much as 1W ............................................143
Four-way remote control uses Figure 2
series transmission ......................................144 10.6
10.4
Analyze LED characteristics 10.2
with PSpice ....................................................150 OUTPUT 10
VOLTAGE 9.8
Programmable-gain amplifier (V) 9.6
is low-cost ......................................................152 9.4
9.2
PC hardware monitor reports 100 150 200 250 300
the weather ..................................................154 INPUT VOLTAGE (V AC)
A way remote-control
system adheres to size,
cost, and reduced-complex-
EMITTER
DATA (4 BITS)
9-BIT
DATA PACKET
Q2
2N2907
Figure 2 10k
R9
10k ANTENNA
4.7k VCC
D6
LED
15 11
Q1 VCC
UN10KM
100 nF 1
+ R8 D7 +
C1 4
470k BZX55-5V1 10 mF 47k GND
10 mF 13
IC2
TX-433-SAW
R7
R10 100 nF 3
10k IN-VCC<8V
2
10k IN-VCC>8V
16 8
1 12 1 VCC GND
1 ON A1 ST2
2 11 2
2 A2
1N4148 3 10 3
3 A3 DOUT 15
4 9 4
4 A4
5 8 5
5 A5 11
6 7 IC1 RS
D2 D3 D4 D5 6
MC145026
1N4148 R11
S3 14 TE 100k
CTC 12
FRONT 1
R1 2 6 C2
D6 R12
3 S1 7 D 4.7 nF 47k
D1 4.7k REAR MS-500 7
13
9 RTC
1N4148 R2 LEFT 1 D8
9V 2 10
S2 D9
3
4.7k RIGHT
MS-500
+
100 nF R3 R4 R5 R6
2
10k 10k 10k 10k
0V
9V BATTERY NO
ACTION
S1: FRONT S1: FRONT NO
(a) S2: RIGHT S2: CENTER ACTION
VC1
5V
2.5V
TIME
VCC '8 SEC
5V
POWER IS ON. LED D6 IS ON.
ALL DATA BITS TRANSMIT CONTINUOUSLY.
D6 0 0 0 0 TIME
D7 1 0 1 0
D8 1 0 0 0 BITS A1 TO A5=ID CODE.
(b) D9 0 0 0 0
In the emitter circuit, two three-position switches, S1 and S2, determine the voltage on C1 (a) and the voltage levels of data bits D6 to D9 of IC1 (b).
VCC
VCC
Figure 3 100 nF
1 10 15 TEST
10k D'9
ANTENNA 16 8
VCC-HF VCC-BF VCC-OUT
13 1 12 1 VCC GND
TEST 1 ON A1
2 11 2 D'8
IC1 2 A2 D9 12
3 RF290-A5S 3 10 3
IN 14 3 A3 13
OUT 4 9 4 D8
4 A4
GND 5 5 D7 14
GND 8 D'7
5
2 7 11 6
A5 D 15
6
6 7
IC2
D1 RX_OK
MC145027 R1
VCC S1 9 1N4148
D-IN 11 1k D'6
VALID-T
1 3
V0 78LO5ACZ VI 6
R1
GND +
47 mF + 47k 10 C1 + R2
2 7 R2C2 10 mF 33k
100 nF
2
C1 100 nF
22 nF 180k
9V BATTERY
(a)
D6
TIME
TIME
TIME
'2.5V TIME
D'6
LOW LEVEL FORCE
D'6 TO D'9 LOW TIME
D'7 TO D'9
TIME
(b)
In the receiver (a), three correct transmissions must occur before Pin 11 of IC2 goes high (b).
Figure 4
LED
R1 R2 R3
{R} {R} {R}
2 D1 D4 D7
I1 LED LED LED
+ 60m RED RED RED
D2 D5 D8
LED LED LED
RED RED RED
(a) (b)
GND
uate the input signal and achieve the de-
sired variable-gain factor. You calculate
the current output, IOUT1, from the DAC
gain steps with an 8-bit DAC 8-BIT DAC as follows, where D0 through D7 are the
IREF AD 7524
and higher steps with higher bit VIN digital inputs to the DAC:
RIN
DACs (Figure 1). According to 1OUT2
RF IOUT1 =
VIN D0 D1 D2 D3 D4 D5 D6 D7
+ + + + + + +
.
the inverting-amplifier configu- RFB R IN 2 4 8 16 32 64 128 256
ration of an op amp, the 1OUT1 For example, if all of the bits are ones,
Figure 1 _
output voltage is LF356 VOUT
the 8-bit digital image is FF, and the cor-
VOUT5VIN(RF/RIN), where RF is + responding amplifier full-scale output is:
the feedback resistance, RIN is VIN 255
VOUT = IOUT1 • R F = • RF.
the input resistance, and VIN is R IN 256
the input voltage of the amplifi- A DAC in series with an op amp attenuates the input sig- In an actual application, keep the val-
er circuit. Generally, by chang- nal to achieve the variable-gain factor. ue of RF fixed for the maximum gain. By
ing the feedback resistance, you varying the digital image pattern from 00
can get the desired gain. put-voltage signal. The shunt feedback to FF, you can get the variable amplifier
In this design, the 8-bit DAC in the in- resistance, RF, converts IOUT1 to a voltage. gain according to your requirements.
put stage acts as a programmable atten- Thus, the input signal, VIN, acts as a ref-
uator for the input signal and permits a erence input to the DAC. Instead of in- Is this the best Design Idea in this
maximum full-scale IOUT1 of 1 mA. The creasing the value of the feedback resis- issue? Vote at www.ednmag.com/edn
value of IOUT1 is proportional to the in- tor for higher gain, this circuit uses the mag/vote.asp.
WIND SPEED
TEMPERATURE
HUMIDITY
FREQUENCY D+
Figure 1 OUTPUT RESISTIVE- STANDARD
HUMIDITY PNP D2
SENSOR TRANSISTOR
5V HUMIDITY-
13 CALIBRATION
PARALLEL-PRINTER PORT TRIM POT
(36-PIN CENTRONICS)
3 3
SDA
SERIAL
BUS
2 4
SCL
18
5
FAN1
74HC07
17
IC1
ADM1024
8
GNDD
10 mF 0.1 mF
+ 14
9
5V VCC
NTEST_IN/AOUT 13
VCC
10k
12
Address
Country ZIP
Design Idea Title
Signed
Date
Open-loop power supply delivers IC1 regulates the peak current and allows this 1W supply to operate from universal mains.
as much as 1W ............................................143
Four-way remote control uses Figure 2
series transmission ......................................144 10.6
10.4
Analyze LED characteristics 10.2
with PSpice ....................................................150 OUTPUT 10
VOLTAGE 9.8
Programmable-gain amplifier (V) 9.6
is low-cost ......................................................152 9.4
9.2
PC hardware monitor reports 100 150 200 250 300
the weather ..................................................154 INPUT VOLTAGE (V AC)
A way remote-control
system adheres to size,
cost, and reduced-complex-
EMITTER
DATA (4 BITS)
9-BIT
DATA PACKET
Q2
2N2907
Figure 2 10k
R9
10k ANTENNA
4.7k VCC
D6
LED
15 11
Q1 VCC
UN10KM
100 nF 1
+ R8 D7 +
C1 4
470k BZX55-5V1 10 mF 47k GND
10 mF 13
IC2
TX-433-SAW
R7
R10 100 nF 3
10k IN-VCC<8V
2
10k IN-VCC>8V
16 8
1 12 1 VCC GND
1 ON A1 ST2
2 11 2
2 A2
1N4148 3 10 3
3 A3 DOUT 15
4 9 4
4 A4
5 8 5
5 A5 11
6 7 IC1 RS
D2 D3 D4 D5 6
MC145026
1N4148 R11
S3 14 TE 100k
CTC 12
FRONT 1
R1 2 6 C2
D6 R12
3 S1 7 D 4.7 nF 47k
D1 4.7k REAR MS-500 7
13
9 RTC
1N4148 R2 LEFT 1 D8
9V 2 10
S2 D9
3
4.7k RIGHT
MS-500
+
100 nF R3 R4 R5 R6
2
10k 10k 10k 10k
0V
9V BATTERY NO
ACTION
S1: FRONT S1: FRONT NO
(a) S2: RIGHT S2: CENTER ACTION
VC1
5V
2.5V
TIME
VCC '8 SEC
5V
POWER IS ON. LED D6 IS ON.
ALL DATA BITS TRANSMIT CONTINUOUSLY.
D6 0 0 0 0 TIME
D7 1 0 1 0
D8 1 0 0 0 BITS A1 TO A5=ID CODE.
(b) D9 0 0 0 0
In the emitter circuit, two three-position switches, S1 and S2, determine the voltage on C1 (a) and the voltage levels of data bits D6 to D9 of IC1 (b).
VCC
VCC
Figure 3 100 nF
1 10 15 TEST
10k D'9
ANTENNA 16 8
VCC-HF VCC-BF VCC-OUT
13 1 12 1 VCC GND
TEST 1 ON A1
2 11 2 D'8
IC1 2 A2 D9 12
3 RF290-A5S 3 10 3
IN 14 3 A3 13
OUT 4 9 4 D8
4 A4
GND 5 5 D7 14
GND 8 D'7
5
2 7 11 6
A5 D 15
6
6 7
IC2
D1 RX_OK
MC145027 R1
VCC S1 9 1N4148
D-IN 11 1k D'6
VALID-T
1 3
V0 78LO5ACZ VI 6
R1
GND +
47 mF + 47k 10 C1 + R2
2 7 R2C2 10 mF 33k
100 nF
2
C1 100 nF
22 nF 180k
9V BATTERY
(a)
D6
TIME
TIME
TIME
'2.5V TIME
D'6
LOW LEVEL FORCE
D'6 TO D'9 LOW TIME
D'7 TO D'9
TIME
(b)
In the receiver (a), three correct transmissions must occur before Pin 11 of IC2 goes high (b).
W
MAIN TRANSFORMER DELTA TRANSFORMER
any power converter, you Figure 1 MBR2030CTL
face several compromises.
10T VOUT2
You must trade off core size against the
number of primary turns and flux den- T1 1T T2
1k Q3
1k
5V
T
1
mission in a data link RxD 6
1N4148
is obvious: You want Figure 1 2
7
to know the contents of the data, when 3
8
it was sent, and by whom. If one of the 4
communicating parties is a PC or an- 9
5
other user-programmable controller,
then you can modify parameter settings
1
or, at worst, change transmission rou- RxD 6
1
tines to generate log files or perform oth- 2 1N4148 RxD
6
2
er actions. This approach, however, may 7
7
3
be inconvenient or impossible to apply 8
3
8
in some cases. As an alternative ap- 4
4
9 RI
proach, you can use a PC with two seri- 5
9
5
al ports and a monitor program to ob- GND
GND
serve the link itself. The method in COM2
C0Mx
(a) (b)
Figure 1a needs no access or knowledge
of the communicating devices. A C pro- You can eavesdrop on RS-232 transmissions by using two COM ports (a); a simple modification (b)
gram opens two COM ports and installs adapts the method to PCs with only one COM port.
interrupt-service routines for IRQ4 and
IRQ3. Upon the reception of an inter- the program simplifies the time meas- along with the data and status bytes, in
rupt, the routine stores a byte in a com- urement, it preserves the original byte or- the circular buffer.
mon circular buffer with the COM iden- der and correctly reflects time relation- Unfortunately, not all PCs offer two
tifier and error flags. The main program ships as long as the main program keeps COM ports. This deficiency is a common
displays the contents of the buffer, indi- up with transmission speed. If you need drawback of notebook computers, which
cating time intervals in milliseconds be- greater precision, you can easily modify use a second UART controller for IrDA
tween consecutive transfers. Although the program to record time stamps, communication. But you can use even
126 edn | February 1, 2001 www.ednmag.com
design
ideas
these computers with another version of register is set. The interrupt-service rou- Databases” and then enter the Software
C to monitor the bidirectional link, pro- tine reads the register, clears the RITD Center to download the file for Design
vided that the transmission is not full- flag, and stores its value in a buffer. Thus, Idea #2661. The programs are simple and
duplex. A simple interface mixes both the interface is ready for another byte to accept 9600, 8, E, and 1 transmission pa-
data streams onto the receiver input (Fig- come from an arbitrary direction. The rameters. You can easily adapt the pro-
ure 1b). One channel connects to the RI main program can identify the data grams to other formats.
(ring indicator) input of the UART. source by checking respective bits. You
Whatever the byte value, the start bit can download the C listings and exe- Is this the best Design Idea in this
guarantees that the RITD (ring-indicator cutable files from EDN’s Web site, issue? Vote at www.ednmag.com/edn
trailing edge) bit in the modem-status www.ednmag.com. Click on “Search mag/vote.asp.
0.33 mF
L
1.32 mH
T of pin-selectable
watchdog timers
are designed to supervise mP
Figure 1
VCC
8 mA
R1
1k
WDO low for 170 msec every
5.2 sec. The load is a front-
panel power-on LED with a
activity and indicate when a 1-kV current-limiting resis-
WDI VCC
system is working improper- tor. By pulsing the LED
ly. During normal operation, GND WD0 rather than powering it con-
MAX6373
a mP should repeatedly tog- NC SET 2
tinuously, the average current
gle the WDI (watchdog in- decreases by a factor of 30 (88
put) before the selected SET 0 SET 1
mA versus 2.4 mA). The LED
watchdog-time-out period thus indicates that the equip-
elapses to indicate that the ment is on while minimizing
system is properly executing GND battery drain. By changing
code. If it fails to do so, the the Set pins to Set 050V, Set
supervisor IC asserts a A blinking LED allows a 30-to-1 average-current reduction in a power-on 15Set 25VCC, you can ex-
watchdog output WDO to indicator. tend the off time to 17 sec,
signal that a problem exists. thus reducing the average
The cited family of current to 32 mA. The circuit
Figure 2
watchdog supervisors in Figure 2 is similar to the
VCC
are available in SOT23-8 LOAD one in Figure 1 but uses a
packages and have selectable 8 mA MAX6371 to turn on a load
watchdog-time-out periods MAX6371 100k for 170 msec every 104 sec.
and delays of 1.7 msec to 104 WDI VCC The load can be a battery-
sec in seven steps. The ICs powered monitoring circuit
GND WD0
also have selectable output- that remains idle, saving
pulse widths of 1.7 or 170 NC SET 2 power and then wakes up to
msec, depending on part se- SET 0 SET 1 make a measurement. The
lection and the state of the: circuit in Figure 3 uses a
Set 0, Set 1, and Set 2 pins. MAX6373 with its Set inputs
You can use these devices for configured for timer dis-
GND
general-purpose timing abled. If you hold Set 1 low
functions, especially when This circuit wakes up every 104 sec to turn on a load for 170 msec. for longer than the watchdog
low current consumption is period (5.2 sec), then WDO
important. The ICs pulses low. You can use this
consume only 8 mA Figure 3 circuit in applications in
typical and 20 mA maximum VCC which a reset button is on a
over temperatures from a 2.5 front panel, for example. You
8 mA
to 5.5V supply. With WDI must deliberately depress the
MAX6373 100k 100k
connected to ground or VCC, button for at least 5.2 sec to
the internal timer cycles, WDI VCC trigger a reset. This feature
pulsing WDO low upon GND WD0 RESET can prevent an accidental re-
time-out. In addition to the set when someone inadver-
NC SET 2
lower current (20 versus 120 tently presses the button.
mA), the watchdog-timer IC SET 0 SET 1
RESET (PRESS FOR
takes less board space and 5.2 SEC TO RESET)
uses no timing resistors or Is this the best Design Idea
capacitors. The following cir- GND
in this issue? Vote at www.
cuits represent a few exam- edmag.com/ednmag/vote.
ples. You must press the reset button for at least 5.2 sec for the reset to take asp.
The circuit in Figure 1 effect.
130 edn | February 1, 2001 www.ednmag.com
design
ideas
I
5V
systems, you often
face a situation in Figure 1
which the mC has to respond
to an external event happen- R1 6 R2
100k 100k
ing at an uncertain moment S1 16 1
IRQ RESET
in time. One example is re-
ceiving an echo from an ob- S2 15 OSC1
C1
pA0 2 0.1 mF
ject in a pulse-range measur- CERAMIC
MC68HC705KJ1 RESONATOR
ing system. In these situa- S3 14 3 4 MHz
pA1 OSC2
tions, you would usually use
13 R3
an external interrupt. Unfor- pA2 pA4
11
tunately, low-end, small, in- 510
12
expensive mCs have only one pA3
pA5
10 R4 RED
LED
GREEN
LED
external-interrupt vector ad- 510
7
dress, so the mC can execute
only one interrupt-service
routine. What do you do if
the design objectives call for
the mC to react to several in- You can use an inexpensive mC to handle multiple external interrupts.
W amp, such as PA05 from Apex Mi- negative-side SMPS, you must transfer put signals, the output may clip for a
crotechnology, in your design, it is information from SMPS1 to SMPS2. The short time until the power-supply volt-
desirable to minimize the supply-to-out- circuit in Figure 2, which generates cur- age rises. This phenomenon depends on
put differential to a minimum to reduce rent proportional to the input voltage, ef- the precision rectifier and the power sup-
power dissipation and to fully exploit the fects the transfer. Thus, SMPS2 generates plies’ response time.
amplifier’s output range. Our goal was to an equal-value but opposite-polarity
design a power amplifier to yield 70V p- voltage to that of SMPS1. If you need
p output at 10A with a fixed gain of 10 higher output current, you may need to
and a frequency of 30 Hz to 100 kHz. To increase the voltage headroom, depend- Is this the best Design Idea in this
obtain 635V swing entailed dc supplies ing on the power amplifier you choose. issue? Vote at www.ednmag.com/edn
of approximately 638V and two 65V Otherwise, you may experience output mag/vote.asp.
supplementary supplies. To derive the
full 10A at lower voltage, you PRECISION CONTROL
PROGRAMMABLE
ADDER
must reduce the supply voltage in Figure 1 RECTIFIER SMPS1 2
proportion to the output voltage to de- OFFSET V+ 5V
crease dissipation. In this case, the gain
is fixed at 10. So, you can control the dc PA05
voltage proportional to the input voltage 7V P-P MAXIMUM
VOUT
I/P
(Figure 1). SMPS1 and SMPS2 are iden- 30 Hz T0 100 kHz
OUTPUT 15V
Keep the heat down +
2
in power op amps ......................................143 10k
+
Buck converter works efficiently SMPS1
6 TO 38V 10k
from phone line ..........................................144 40V=4 mA
215V SCALE
Sine reference is synchronous 2 +
with ac line ....................................................146 COMMON
Cascade bandpass filters 2
+PIGGYBACK SMPS2
for higher Q ..................................................148 (5V) CONTROL
26 TO 238V 1k
C program calculates checksums ............150
One-wire bus powers 40V=4V SCALE
water-level sensor........................................152 2PIGGYBACK
(25V)
Ideal transformers aid
in balanced-line analysis ..........................154
The switch-mode power supplies track each other with opposite-polarity outputs.
Figure 1
R1 VOUT
4.7 5V
VIN m 60V 7 3
VIN VBIAS
IC2
LM4041EIM R2
3-ADJ 3.9k
1 IC1
PGOOD
LM2597HVM
5
SS
C1 + C5
+
10 mF 2 C3
47mF
63V DELAY L1 R4 16V
10 nF
68 mH Q1 10k
>1A 4401
8
VSWITCH
C2 + +
220 mF C4
GND FB 16V 10 nF
6 4
D1
1A, 60V R3
R5 12k
10k
This inexpensive switching regulator derives its power directly from the phone line.
390k
Figure 1
L 3 0.47 mF
+ 1 22k 6
IC1A 2
220V 2
3V 2 IC1B
50 Hz 10k 5 7
+
N 10k 5k
P1
0.1 mF
0.1 mF 100k 100k
253k
0.1 mF 253k
2 0.1 mF
2 1 16k 6 100k 100k
6 2
2 mF
16k IC
3 + 2A 2 2 2
IC2B 1
5 IC3A P3 IC3B OUTPUT
+ 7 5 + 7 3 +
5.6k
5.6k 1 mF 10k
P2
10k 1 mF
An op-amp circuit uses only resistors and capacitors to generate a line-synchronized sine wave.
100 nF
Figure 1
47k 47k
FSEL IN FILTER
INPUT
100 nF
FSEL IN OUT GND
IC2
OUT 100 nF MSFS1 VSS
FILTER GND TYPE
OUTPUT IC1
VDD
100 nF TYPE MSFS1
CLK
VSS
CLK
VDD
100 nF
74HC04N
IC1A
2 1
V1
+
1 MHz/5V
By inverting the clock to one switched-capacitor filter, you obtain a cascaded filter with enhanced Q.
DATA
Figure 1 + CK06-STYLE
ONE-WIRE D1 22 mF 3 0.1-mF
BUS 1N5817 VBAT CAPACITORS
2
DATA
GND
DS2423
6 A
IN GND
1
4 8
TO PROBE R VS
OUTER SHELL 7
6
(PIPE) DIS THR 0.1 mF
LMC555
3 2
OUT TRG
GND
RC 1
1M
C20 C1 C20
N=1 N=1
VOUT
T
IS
sense circuit in Figure 1 does
Figure 1
not use a dedicated, isolated RS
supply voltage, as some schemes do. Only INPUT LOAD
the selected transistors limit the com- 0.025
0
Circuit senses high-side current................123
Adjustable filter provides NOTES: IC1 IS AN MC33202 RAIL-TO-RAIL OP AMP.
lowpass response ........................................124 Q1 AND Q2 ARE SC-88 MBT3906 DUAL PNPs.
Q3 COMPRISES MBT3904 SC-88 DUAL NPNs.
Monitor high-side current Q4 IS A 2N7002 SOT-23 FET.
Figure 1
SECTION 1 SECTION 2 SECTION 3 SECTION 4
fC=3.083 MHz fC=6.586 MHz fC=14.491 MHz fC=21.310 MHz
S1 S2 S3 S4
L1 L2 L3 L4
Figure 2 Figure 3
SHUNT
0.002 R10
VIN BUS
LOAD 10k
25 TO 45V 82k
R4 R5
R3 200
200 _ IC2
IC1 TL431
Q1 R2= 2W NPN
OP07
` 2N2907 R11 DEVICE
10k 1N4007
R6 R8
R7 R9 22
820 820 1N4007
R2 50A=5V
330/5W R12
R1
5k At voltages less than 25V, you can replace R2
0V
with a constant-current source.
5V
Figure 1
C2
0.22 mF
1 8
C3
0.22 mF
2
6 330
IR
PHOTO
TRANSISTOR 0.1 mF R1 IR LED
TIL414 2N2222
10k
4 5
C1
0.047 mF
2500
ENCODER 2000
drive dc micromotors. Because of the FREQUENCY
1500
(Hz)
mPs’ accurate positioning and control, 1000
these motors are useful in applications
500
such as optical mounts and flexible shaft
0
control, which take advantage of the 0 20 40 60 80 101 121 141 161 181 201 221 241
higher speed and fast movement of servo DAC CODE
controls compared with stepper motors.
These designs require a stable, program- The DAC-code versus encoder-frequency, or speed, curve is linear.
mable dc-voltage source.
The LM723 is a fixed linear regulator, n’t use the internal voltage reference of quency from the magnetic encoder in re-
but this application configures the regu- the LM723. The circuit also incorporates sponse to maximum speed is 2.8 kHz.
lator as a programmable voltage source. short-circuit current limiting and remote The circuit feeds back this signal to the
You can set the output to a value of 200 shutdown. Varying the output voltage mC to measure the speed. The linearity of
mV to 6V. The output, an emitter-fol- changes the speed of the motor that con- the voltage source is good over a voltage,
lower type, provides low output imped- nects across the output. temperature, and speed range (Figure 2).
ance. The circuit limits the maximum You adjust the minimum output volt- With only slight modifications in com-
output current to the load, or the motor, age of 200 mV by offsetting the DAC out- ponent values and ratings, you can use
at 75 mA. The output of an 8-bit DAC put with zero data, and successive DAC this same LM723 configuration in other
and a current/voltage converter provide input codes increase the voltage-source similar applications for higher output
a variable reference voltage. At the non- output to 6V. You can use a single-chip voltages.
inverting input of the LM723, you need mC for controlling the speed through the
to adjust the value of R1 so that the max- DAC, the direction, and the brake. The
imum reference voltage does not exceed no-load maximum speed is 15,100 rpm. Is this the best Design Idea in this
8.5V. Because the reference voltage comes By attaching a reduction gear-head with issue? Vote at www.ednmag.com/edn
from an external source, the circuit does- a ratio of 529-to-1, the maximum fre- mag/vote.asp.
15V
15V
Figure 1 200
V+ VCC BC547
V0
I/V CL
8-BIT CONVERTER 500
DAC AND OFFSET NI CS
1408 LM723 200 MOTOR
ADJUSTMENT
200
R1
2k INV
COM
5V
DATA
1N4007
2k
BRAKE CONTROL 2k RELAY
1000 pF
BC547 BC547
mC SPEED FEEDBACK 10k
FROM MOTOR ENCODER
DIRECTION CONTROL
NOTES:
RELAY=TWO-CHANGEOVER REED RELAY.
MOTOR=FAULHABER DC MICROMOTOR TYPE 1219-006 G, MICRO-ENCODER TYPE 30B.
Configuring an LM723 as a programmable voltage source provides a variable dc source for driving dc micromotors.
he task of sensing dc current at safety precautions when working with During operation, the load current
Figure 2
+ 8
9V DC 2 6 10 pF
1 1
1 4 R3
+ 7
100k
3
IC1 3 5 +
MAX4172 IC2 6
MAX4162
R2 2 _
3.32k
4
+
m1000V DC 3 4
1 Q1 HIGH-VOLTAGE
IC3 2N3906 LOAD
HCNR200
2 1 510
ISOLATION BARRIER
5 6 R4
100k
10 pF
+
3 7
+ 9V DC
IC4 6 1
MAX4162 +
2 _
OUTPUT
4
1
The ground-referenced output voltage, VOUT5ISHUNT (4.80V/A), is proportional to the high-side load current. As configured, the circuit measures load
currents to 1A.
3
+
V12
V+
maximum allowable variations in the sig- V12 IC1 1 1k
100k LM2902/
nal amplitude. ACG (automatic gain con- OUT
NS R2
trol) finds widespread use in systems to + V2 2
2 V2
12V
extend the dynamic range. Applications 2
100k 11
using photoelectric or ultrasonic tech- RECEIVER
niques involve both emission and detec- +
SIGNAL
FREQUENCY=1k 100k
tion energy. In many cases, the emission VOFF=5.9
V3
first establishes a background receiver VAMPL=5.8 2 V12
0V
V (PWM EMISSION DRIVE)
10V
5V
SEL>>
0V
V (TRIGGER)
10V
5V
0V
V (RECEIVER SIGNAL)
10V
5V
0V
1.30 1.35 1.40 1.45 1.50 1.55 1.60 1.65
V (CONTROL)
TIME (mSEC)
The PWM emission-drive signal gains width (top panel) in response to a declining receiver signal (third panel down).
12V
es of PWM emission drive to boost the
12V
4 8
R1 sensor’s emission power at the funda-
C1 10k
Figure 3 0.01 mF RESET VCC mental frequency.
7 0.1 mF 2.6k
DISCHARGE 4 8 The process maintains the width of the
555 RESET VCC
2 IC1A DISCHARGE
7 PWM signal with the width fluctuating
TRIGGER
6 555 around a stable point. This point de-
D1 THRESHOLD IC1B 0.01 mF
D1N4148
2
TRIGGER
pends on the signal strength. If a sensor
3 CONTROL 5 6
OUTPUT THRESHOLD works near its upper range limit, the sig-
470k GND
270 pF 1 3 CONTROL 5 CONTROL nal remains weak despite the increased
OUTPUT
TRIGGER GND
1M pulse width, so the stable point shifts to-
0.1 mF
1 ward the maximum pulse width. In this
PWM EMISSION DRIVE
12V
Design Idea, the sensor is sensitive to the
10-kHz fundamental frequency because
1V 11V 12V
10k 12V 100k of a bandpass filter. Therefore, a 50%
3
1 D2 3 8 + 4
V+ PWM duty cycle yields the maximum
IR LED + V+ IC2A
1
100k LM2902/ OUT signal amplitude. On the other hand, if
2 TLC272/ OUT
101/TI 2
2
NS
V2 a sensor operates near its lower range
100 2 11
2 V2 limit, the pulse width converges to a very
D3
PHOTO-
4
100k 100k
narrow width for a medium background
DIODE
12k signal. The time constant R1C1 in Figure
Q1
FMMT3904 RECEIVER SIGNAL
1 also affects the location of the stable
330 pF C10
0.1 mF
point. A longer time constant pushes the
2200 pF
TO CONTROL
CIRCUIT
PWM stable point to a higher duty cycle
5.5V 11V
and vice versa. In this case, the R1C1 time
5 8
+ V+ LLSD103A/CYL constant is half the trigger period (0.05
IC3B 7 0.01 mF
TLC272/ OUT msec). You usually need to perform a test
101/TI
10k
6
2
V2 1M to determine R1, C1, or both. The test en-
4 1M
0.01 mF sures that 50% is the maximum duty
1M
This circuit proves the validity of the PSpice
model for the PWM AGC circuit.
CS0 to CS4, have defined bases on the CS0 FOR PROM 64 MBYTES CS0 FOR PROM 64 MBYTES
M lightweight dc-motor
speed-control hardware
that can work with low-power batteries.
Figure 1
3 TO 12V 3 TO 12V
W system, it is convenient to
organize the communica-
tion between mCs via one wire line. Un-
Figure 1
TRANSMITTER
START LOG0 LOG1
RECEIVER
fortunately, low-end mCs have no serial- LSB MSB
MC68HC705KJ1
interface capabilities like their more
expensive counterparts. Low-end mCs
have no SCI (serial-communication-in-
pA0 pA0
terface, SPI (serial-peripheral interface),
or SIOP (simple serial-I/O port). Thus,
a designer needs to use software tools to
THE 8-BIT WORD "11110001"
create a serial interface (Reference 1).
One approach, which uses the external
interrupt for message receiving, results in
message duration of 13.5 to 21.5 msec.
For many applications, this time is unim-
portant. However, some applications may
require you to minimize the message The data word from the transmitting mC connects to Pin pA0 of the receiving mC, which you pro-
time as much as possible, especially when gram as an external-interrupt input.
both the timer and external interrupts are
in use. The mC cannot simultaneously ex- You cannot minimize the message time gram as an external-interrupt input.
ecute these interrupt requests, and the ex- by just changing some number in the When an external interrupt occurs, the
ternal interrupt has a priority. Hence, a program. You must instead use a time- mC can process this interrupt only when
message and, therefore, the external-in- measurement concept that leads to mod- the current instruction execution is com-
terrupt-service routine that are too long ification of the whole program (Figure plete. This waiting time is always unpre-
can affect the program-process timing re- 1). The data word from one mC to an- dictable and can range from zero to the
lated to timer interrupt. other comes to Pin pA0, which you pro- time of the longest instruction in the pro-
W
Li-ION L1
ing acceptance because they offer CELL
2.7 TO 10 mH, D1
higher reliability and simpler drive 5.5V 1A MBR0530L
circuitry than backlights based on CCFL C1 FDN337N
(cold-cathode-fluorescent- 10 mF Q1
Figure 1 C2
lamp) and EL (electrolumines- 10 10 mF KEYPAD
1 V EXT LEDs
cent) technology. As a result, white-LED CC
low 1.1V, the load disconnects from the The load disconnects from the battery when the voltage drops below 1.1V and reconnects when the
battery. The load reconnects to the bat- battery charges above 1.3V.
tery only when the battery charges to a
voltage higher than 1.3V. At voltages of are low-threshold MOSFETs from Su- higher voltages of Li-ion batteries by se-
1.1 to 1.3V, IC2 cannot switch on Q3 be- pertex (www.supertex.com). The circuit lecting the voltage detectors.
cause the IC’s output is an open-drain uses no trimming resistors. You can se-
type and VSYS is low. IC1’s output must as- lect IC1 and IC2 off the shelf with 100- Is this the best Design Idea in this
sume a high state to switch on Q2 and to mV steps and 2% switching-point accu- issue? Vote at www.ednmag.com/edn
finally switch on Q1 on. The transistors racy. You can adapt the circuit for the mag/vote.asp.
Figure 1
(a) (b)
A typical drain-source waveform of a flyback converter shows high-frequency ringing (a). In DCM operation, the primary current ramps up and down
to zero (b).
0
210.0
GND
VIN 220.0
20.0
10.0
0
210.0
220.0
(a) (b)
An auxiliary winding (a) lets you observe the flux image in the transformer’s core for both flyback and forward operation (b).
1N4148 DAUX
56 NS NS
VAUX VAUX
GND
221N4148 221N4148
VDEM VDEM
(a) (b)
A simple component arrangement allows forward-mode detection with a flyback-like PWM controller (a) or flyback-mode detection with a forward-
like controller (b).
ISUP I3
play, for example, draws nearly zero R1
12 TO IN OUT
current when no segment is on to hun- 24V
50 IC2
dreds of milliamps when fully lit. This 7805
heavily varying current can cause EMI ILOAD
GND
problems when a device receives its pow-
1 mF
er through long cables from a remote C3
I1
power supply. The low-parts-count cir-
+ C2 + R2
cuit in Figure 1 keeps current consump- C1 C4 I2 I4
10 mF
10 mF 0.1 mF
tion constant. IC2 is an ordinary three- GND
terminal regulator that supplies 5V to the IC1
load, R2. IC2 draws a total current 7905
I35ILOAD+I4. (I4 is approximately 8 mA, IN OUT
the quiescent current of IC2). The nega-
tive three-terminal voltage regulator, IC1,
maintains 5V across R1. The current
through R1 is I2RI3. So, I255V/R1SI3, and
total supply current ISUPtI1R5V/R1. I1 is This circuit maintains a constant supply current of approximately 102 mA.
approximately 2 mA, the quiescent cur-
rent of IC1. If the load draws more cur- mA. C1 and C4 are input-filter capacitors, ence voltage.) If your application cannot
rent, IC1 reduces I2 and vice versa. C2 improves ripple rejection, and C3 pro- tolerate the 5V drop across R1, try using
This regulation works well as long as vides stability. Note that R1 dissipates an LM337 with a 1.25V reference voltage
I3 is smaller than 5V/R1. If the load draws (5V)2/R1 and must have an adequate for IC1.
more current, IC1 stops regulating and power rating. IC1 and IC2 may require
the voltage drop across R1 rises above 5V. heat-sinking. The minimum supply volt- Is this the best Design Idea in this
This example sets R1 at 50V, setting the age for this circuit is 12V. (The minimum issue? Vote at www.ednmag.com/edn
supply current, ISUP, to approximately 102 input voltage for IC257V1IC1’s refer- mag/vote.asp.
0.1 mF 1
C1+
IC1
MAX232
VCC 16
VCC
RTD 649k
Figure 1 GAIN ADJUST
PT100
5V P1
5V
VCC
VCC
5V
7
VCC 3
1-mA ADJUST 7 +
3 6
+ 27k OUTPUT
6 2
2 2.5V 500 R1 2 1 IC3
IC1 OUT 1 IC2 4 LTC1050
1 IN MC1403 P1 2.21k LTC1050
4
GND VEE
0.1 mF 0.1 mF VEE 15V
15V
3
10.2k
ZERO ADJUST
P2 0.1V 27k
1k
274
This circuit provides accurate temperature measurements using a PT100 RTD element.
any designers use small pulse small pulse generator. The operating 2 shows the signals associated with the
ONE-SHOT OUTPUT
X5
X6
UTD X8 AND2
TD41m INV
Out
In utd
2 3
A one-shot multivibra- This plot shows timing details for Figure 1’s Spice model.
Figure 1 tor (shown with Spice Figure 2
nomenclature) makes a simple short-pulse gen-
X1 X3
erator. A1 SMALLPULSE X2 SMALLPULSE
PWMGEN VPULSE DELAY=70 nSEC INV DELAY=20 nSEC SMP
PWM
1 2 3
SMALLPULSE SMALLPULSE
VTRIGGER
Delay line aids
in one-shot simulations..............................129
X4
Sine-wave generator outputs MUL X5
PSW1
precise periods ............................................132 A
K*A*B VSAMPLED
V1 6 4
High-voltage current-feedback B
` 5 CSH RDR
amplifier is speedy ......................................136 SINE + 10 pF 1M
MODULATION
AC-power monitor SMP
uses remote sensing ..................................138
This PWM application is a sample/hold circuit in Spice-simulation nomen-
Figure 3 clature.
5V
14
Figure 2 VDD 2
1 100 nF
A B
13 100 nF 3.3k
C 1 nF 10 nF 47k
IC4A VSS 1 5V
5V S
7 1 10 3 4 SIGNAL
100 nF 25V OUT
4 REF IIN A0 A1 19
3 OUT
A B 5 COSC
7 R2 5 5V
R3 C1
2 3
+ 6 10
G C
22 pF V`
17
1k IC4B 6 IC1 100 nF
2 GND
2 MAX038 9
LF356N 8 7 GND1
4 A B 9 DADJ
20 100 nF
6 C 8 V1
3.74k FADJ
IC4C
25V PDO PDI SYNC DGND DV` GND2 GND3 GND4 25V
12 13 14 15 16 2 11 18
100 nF 11 A B
100 nF 10
12 C 100 nF
100
IC4D
15V
5V
Q1 R1 10
E VP0106 10
8
IC3C 9
100 nF
C2 5V
13
11
10 nF
IC3D 12 F
100 nF
5V
330 4
6
5 IC3B
25V
100 nF
100 nF 7
2
1 3
A VCC IC3A 1 C D
5V
A 2 12 4 16
TRIGGER IC5A
B CTEN
IN 10 nF 74LS123 MIN-MAX
14 13 B 11 100 nF
C
15 Q LOAD IC2
1k R/C 74AC191 14
V+ 3 CLK
CLR
D0 D1 D2 D3 UP-DN
8 3 2 6 7 8 5 5V
S1
8 ON 1 470
1
7 2 470
2
6 3 470
3
5 4 470
4
IC1 contains the generator and comparator. The sync signal at point F drives the counter, IC2. The setting of S1 determines the end of count and thus
the number of periods, N, at the output.
0.01 mF
1 kV
also works successfully as a driver for a R1 20V 0.1 mF
D1 R3 1W
560 Q4
piezo-tube scanner and in a near-field LED 100
2N2907 +
47 mF
scanning optical microscope. The circuit 400V
is robust and works with supplies rang-
ing from 650 to 6230V. The measured Q1
R4
30 2.4
parameters at 6230V supply voltage are 2N2907 1 1W
IC2
gain of 26-dB from dc to 23-dB point at 2 EL 6
33
1W
7 MHz; output swing of 6200V, rise and 100k
2003CN
Q2
4 MTP
fall times of 70 nsec for an output step of 0.01 mF MTP
2N50E
2P50E
350V, slew rate of 4100V/msec, and sup-
D3
ply current of 56 mA. 1N914
The red LEDs, D1 and D2, in Figure 1 C3955 Q3 10 VOUT
15V A1381 R5
provide a 1.8V drop; the LEDs are more 1W 100k
VIN 1W 6.2V
rugged than precision IC voltage refer- 1k IC1 1
2 EL 6
ences. The current supply for IC1 comes 2003CN
R8 R6 R7
from R1 and the source comprising D1, R2, 1k 4 2.4k 2.4k
240
R3, and Q1. R3’s trimmed value is such 1W 1W
Q7
that Q2’s quiescent current is approxi- 15V A1381
10
Q6
mately 15 mA. You can determine this 1W
C3955
current by measuring the voltage drop 100k MTP
1N914
across R4. The same adjustment also con- 0.1 mF 1W 2P50E
fTM100 MHz.
You should mount all the power tran- This high-voltage, current-feedback amplifier slews at 4100V/m msec.
T event” indicator, like a game show’s plication, because it draws only 7-mA obtain more channels.
“who’s first to answer” detector. It in- quiescent current, and it has rail-to-rail
dicates which of the two momentary inputs and outputs. The comparator’s Is this the best Design Idea in this
switches, S1 or S2, closes first by latching sourcing capability allows it to easily issue? Vote at www.ednmag.com/edn
the corresponding channel, ICA or ICB, to drive an LED. Figure 2 shows how you mag/vote.asp.
a high state. As either of the outputs
VBAT
latches high and lights its respective LED, 1 +
R3A
it locks out the other channel and pre-
vents it from triggering. The other mo- 9V 500k
mentary switch, S3, resets either of the BATTERY SET 1
R2A
3 8
+
latched outputs to its initial low (LED- S1 90k
ICA 1 LATCH 1
R1A 10k LMC6762
off) state. At the initial condition, the R4A
2 _ 1/2
VBAT 1k
positive input of each comparator is ap- 1M
R5B
74VHC04 IC2
f2 1 MAXIM
IC3A IC3B IC3C IC3D IN1 MAX4644 6
OUTPUT
5V 2 SIGNAL
V+ 5
0.1 mF
3
GND 4
0.1 mF
INPUT R1
SIGNAL IC1 47
Figure 1 f1 1 MAXIM
IN1 MAX4644 6
5V 2 V+
5
3
GND 4
0.1 mF
V_HIGH
V_LOW
0.1 mF 0.1 mF
Analog switches provide dynamic pull-up and pull-down at the output of this pulse generator to ensure fast rise and fall times.
R1 R2
IC1
MAX9030
LED exacerbates the low-battery condi-
tion. You can greatly reduce the LED’s NECESSARY ONLY IF 6
LBO IS UNAVAILABLE 1
power consumption by operating it at a + 4
3
low frequency and a low duty cycle. An FROM LBO
2N3906
R3 2
existing LBO (low-battery output) like 2 5 SHDN
that found in dc/dc converters offers a
convenient way to light the LED (Figure
1). IC1 is a small, inexpensive compara-
FROM LBO R4
tor with shutdown capability, housed in
a six-pin SC70 package. It remains
in shutdown condition while the Figure 1
R5 50
1N4148 LED
battery is at normal operating levels but
asserts LBO when the battery voltage
falls below a preset threshold. Active-
high LBO is usable as shown, but an ac-
tive-low warning, LBO, requires the op-
tional circuitry shown. IC1 turns on, Operating the low-battery LED at low duty cycle saves power and extends battery life.
causing the LED to flash according to the
following analysis: First, you want to keep choff ’s current laws to find the compara- ding to this performance are: C150.1 mF,
the duty cycle low: DC5tON/(tON1tOFF). tor’s high and low trip levels: R15R25R351 MV, R453.6 MV, and
You derive the on-time from the equation V TRIPHI 5V OUT [R 3 (R 1 1R 2 )]/[R 3 (R 1 1 R5591 kV.
for time-varying voltage across a charg- R2)1R1R2], and VTRIPLO5VOUT[R3R2]/
ing capacitor: V(t)5V(12e1t/RC), so [R3(R11R2)1R1R2]. Assuming a 2.5%
tON52R5Cln(TRIPHI12VTRIPHI/VOUT). You duty cycle and assuming that the LBO
then derive the off-time from the equa- trips the comparator on when the battery
tion for time-varying voltage across a dis- voltage equals 3V, the resulting trip lev- Is this the best Design Idea in this
charging capacitor: V(t)5Ve1t/RC, so els are 1V for low and 2V for high. The issue? Vote at www.ednmag.com/edn
tOFF52R4Cln(VTRIPLO/VOUT). Use Kir- standard component values correspon- mag/vote.asp.
D1
Figure 1
C1
MBR0540 1 3.3 mF, 35V
SPRAGUE
NEGATIVE BIAS SUPPLY 592D335X9035D2
D2 OUTPUT
INPUT
SUMIDA CLQ61B-4R7 C2 MMBD914LT1 2 7 218 TO ;20V
4.2 TO 2.5V R2
AT 300 mA
6
R1 LT1636
4.7 mH 0.1 mF 15 100k 3
D3 4
5 1 MMBD914LT1
VIN SW
4
SHDN LT1611 NFB
3
GND
1 C3 2 1 C4 R3
C5 3.3 mF, 35V
33 mF, 10V 100k
SPRAGUE SPRAGUE
592D335X9035D2 1000 pF 592D335X9035D2
R4 2k
R5
This LCD-bias supply provides better than 1% tracking of the positive and negative outputs.
47k
L1
47 mH
C2
0.22 mF
D1
L2
47 mH C3
VOUT
5V,
100 mA
ended primary-inductance con- Q2 15 mF
Figure 1 2N7002
verters), you can separate the VIN
pin of the IC from the input inductor 5
Q1 1
and use a simple zener regulator to gen- 2N3904 VIN SW
erate the supply voltage for the IC. Fig- IC1 100k, 1%
4 SHDN 3
ure 1 shows a SEPIC that takes a 4 to 28V C1 LT1613 FB
input and generates 5V at 100 mA. 1 mF
NO GND
In this application, Q1 and Q2 gener- CONNECT
2 32.4k, 1%
ate the supply voltage for IC1 because the
supply voltage exceeds IC1’s maximum
input voltage. The circuit uses Q1 in NOTES: C1 IS TAIYO YUDEN LMK212BJ105MG.
place of a zener diode to save cost. The C2 IS TAIYO YUDEN UMK316BJ224ML.
emitter-to-base breakdown voltage gives C3 IS AVX TAJA156M010R.
L1AND L2 ARE MURATA LQH3C470K34.
a stable 6V reference. The follower, Q2, D1 IS MOTOROLA MBR0540T3.
provides the supply voltage for the IC.
This circuit demonstrates an inexpensive Q1 stands in for a zener diode in this SEPIC with a wide input-voltage range.
way to extend the input range of the IC.
This SEPIC can step up or step down hibiting any possible load current in Is this the best Design Idea in this
the input voltage. Because the flying ca- shutdown mode, which is important for issue? Vote at www.ednmag.com/edn
pacitor, C2, breaks the input-to-output dc portable applications and which prevents mag/vote.asp.
path, the output disconnects from the in- the input voltage from appearing at the
put when you shut down the device, in- output.
VCC
9 VCC
Q1
16 VDD 16 VDD Q2 7
IC1 IC2 VCC 10 Q3 6 10k
P1 Q4 5 1k
8 VSS 8 VSS Q5 3 Q5
START BUTTON Q6 2
9V PP3 IC3 Q7 4 2N2907
Q8 13
BATTERY 220 nF Q9 12
BP1 + BZ1
Q10 14
11 Q11 15 1 BUZZER
RES 1
Q12
Figure 1 Q4
10k CD4040
VCC 2N7000
VCC
R1 680
1N4148 D2
LD1
22k 4 C
8 IC1 9
Q1 Q2
12k V R MCI4555 Q2 7 A 1N4148
7 3 10 6 1k D1
DIS Q P1 Q3Q4 5 Q1
P1 6 THR GND 1 Q5 3
2 2N7000 1k
10k Q6 1N4148
TR CV IC2 Q7 4 Q3
2 5 Q8 13 1k B
Q9 12 2N7000
P2 Q10 14
11 15 2N7000
1k RES Q11 1N4148
Q12 1
22 nF 10 nF
CD4040
and P2 allows you to set different delays. Q11-IC1-T41.758 mSEC. 878 mSEC
Table 1 shows the timing details for the
various outputs of IC2 and IC3. TIME
Figure 2 shows timing details for the 1.758 SEC
POINT A (Q10 AND Q11) 439 mSEC
first two hours after asserting start for the
circuit in Figure 1. Q12 of IC3 is at a low TIME
T
FAN 1
5V V+
5 OR 12V
COOLING
FAN
TACHOMETER 5V 5V 5V
PIC16C84
10k IC1 2.2k 2.2k
1 PA2 PA1 18
NDT3055L 1 PWM_OUT1 SCL 16 2 PA3 PA0
17
NM0S 16
2 TACH/A1N1 SDA 15 3 PA4 OSC1
4 MHz
3V
3 PWM_OUT2 INT 14 4 MCLR OSC2 15 6 5 4
4 13 5V
TACH/A1N2 ADD 5 GND VCC 14 33 pF RW RS
5V V+ 33 pF
5 GND D2+ 12 6 PB0/INT PB7 13 14 D7
5V 12 13 D6
10k 6 V D21 11 7 PB1 PB6
CC
7 10 8 PB2 11 12 D5
5V THERM D1+ PB5
9 OPTIONAL
8 FANFAULT D11 9 PB3 10 11 D4
TACHOMETER PB4 16-
10 CHARACTER3
5 OR 12V 10k ADM1030 D3 4-LINE LCD
FAN (ADM1031) 9
D2
NDT3055L
8
NMOS D1
7
D0
VCC GND
2N3904 3 2 1
TEMPERATURE ZONE C
5V
Figure 4 5V 5V
470
FANFAILURE
2N3904
5V TEMPERATURE ZONE B
470
OVERTEMPERATURE
The mC bit-bangs pins 2 and 3 to provide serial clock and data for IC1 and reads temperatures and fan speeds.
TEMPERATURE TEMPERATURE
ZONE 3 ZONE 4
IC1 IC2
ADM1031 ADM1031
FAN D
FAN FANFAULT FANFAULT
SPEED
THERM THERM
FANFAULT A
Figure 5
FANFAULT B
Figure 1
MC10EL16 MC10EL31 MC10EL31
1 mF 47 1 mF
NOISE A B
GENERATOR D Q D Q OUT
51
390
CLK Q CLK Q OUT
47 1 mF
VBB
390 390
51 10 nF
CLOCK
INPUT
10 nF
15
C2
0.1 mF
7
R1
0.22
Q1
D44H8
L1
47 mH
tor IC to more than 6A. The circuit ac- 0.04V
VIN R2
commodates input voltages of 15 to 60V 4.7
COILCRAFT
5 8 DMT2-47
and delivers output voltages of 3.3, 5, or OFF VSWITCH
12V, depending on your choice of IC. Fig-
LM2594HVN
ure 2 provides a graph of conversion ef-
C1 + 3.3, 5, OR 12V
ficiency for the three standard output 680 mF VERSION 4
FB VOUT
voltages, plotted over a range of input 63V
voltages extending to 60V. The circuit is GND + C 2
1, 2, 3 6 D1 1000 mF
useful in applications requiring higher MBR660 25V
input voltage, higher current, or both
than is available from standard ICs. The
LM2594HVN is a buck regulator that
switches an internal 0.5A device at 150
kHz. This current suffices to feed the base Less expensive than a “brick” converter, this circuit accommodates high input voltages and output
of Q1 and the bias resistor, R2. The func- currents.
tion of R2 is to quickly turn off Q1, a fast
npn switch with a beta greater than 10 at
90
6A. The purpose of R1 may not be 2A
Figure 2
obvious without some knowledge 6A
12V
of the internal workings of the 2594. Its
85
value is such to produce sufficient volt-
age drop at peak current so Q1 begins to
saturate. The saturation causes Q1’s beta
EFFICIENCY (%) 80 2A
to drop, and, as the transistor’s base cur-
rent rises to more than 0.5A, the 2594 6A
drops into its pulse-by-pulse limited-pro-
tection mode, followed by a reduction in 75
5V
clock frequency if the overload is severe. 2A
This design example uses through-
6A
hole components, because low-ESR ca- 70
3.3V
pacitors and inductors in through-hole
form are inexpensive and easy to find.
Worst-case line and load conditions 10 20 30 40 50 60
cause Q1 and D1 to dissipate 3W each, so VIN
you must choose a heat-sink size to keep The circuit of Figure 1 delivers good efficiency for 15 to 60V inputs.
the temperature rise within acceptable
limits. A heat-sink rating of 6 to 78C/W at high VIN and more than 5W at low VIN. down. If you don’t need the IC’s on/off
can accommodate both devices for op- You should locate R1 away from the reg- feature, then you should also solder Pin 5
eration to 858C ambient temperature. ulator IC to minimize heating. The DIP to the ground plane.
The capacitors are low-ESR types from version of the 2594 dissipates as much as
Nichicon’s PL series (www.nichicon-us. 0.5W at high VIN; you should solder leads Is this the best Design Idea in this
com). R2 dissipates less than 0.25W, but, 1, 2, 3, and 6 to a ground-plane area issue? Vote at www.ednmag.com/edn
at full load current, R1 can dissipate 1W greater than 2 in.2 to avoid thermal shut- mag/vote.asp.
A loop gain, low offset voltage and cur- tion of the concept. The first op amp is an
rent, low voltage and current noise, accurate, unity-gain buffer, and the sec-
and low distortion. However, they often ond op amp is a high-current, high-
magnitudes match perfectly, the buffer
sees an open circuit at its output. The
buffer drives the positive input of the sec-
lack the ability to provide high output bandwidth, gain-of-2 driver. Because ond amplifier, and the second amplifier,
currents while maintaining all the other R15R2 in this negative-resistance stage, via its negative-resistance input, drives
high-accuracy specifications. In other its input resistance is 2RNF52200V, the load. Gain error, output-current lim-
words, high-accuracy op amps have a which matches the magnitude of the ac- its, and resistor mismatches limit the
problem driving low-impedance loads. minimum resistance the circuit can drive,
One solution to the problem is to but driving a 200V load is easy. That load
“cancel” the load. If your resistive Figure 1 R2 is an order of magnitude lower than the
load is RV and you connect it in parallel load the unassisted accurate amplifier can
with a negative resistor of 2RV, the re- R1 handle without suffering degradation of
sistance of the parallel combination is in- 2 performance. Note that the second op
finite. The circuit of Figure 1 can gener- VOUT amp’s gain error, offset voltage, and off-
ate negative resistance at its input: + set current do not affect the first op amp’s
RIN52RNF(R1/R2). You derive this value RIN accuracy. The step response of this circuit
as follows: N is well-behaved and exhibits no ringing.
VOUT5VIN(11R2/R1); IIN IIN RNF The negative-resistance approach
IIN5(VIN2VOUT)/RNF52(VIN/RNF)(R2/ works equally well with dual-supply op
R1); and This circuit exhibits negative resistance at its amps, because the negative-resistance
RIN5VIN/IIN52RNF(R1/R2). input. portion can both source and sink current.
10V
If the driver op amp does not have built-
R2 in gain-setting resistors, you can set its
Figure 2 noninverting gain closer to unity, there-
500
R1 by allowing both op amps to share a pow-
2
500
er supply. This approach limits the out-
put swing of the accurate op amp, but
5V +
that restriction may be acceptable in a
2 given application. To ensure full band-
width for the accurate op amp, the driv-
VIN + 200 er op amp should have much higher
200
LOAD RNF bandwidth.
MAX4250 VOUT MAX4014
ACCURATE GAIN-OF-2 DRIVER Is this the best Design Idea in this
OP AMP
issue? Vote at www.ednmag.com/edn
Connecting a negative resistance in parallel with the load enables a precision op amp to drive 200V. mag/vote.asp.
D VS+
G N-CHANNEL R1
IN JFET
S
OUT
3 pF
2N5486
PHOTODIODE
INFINEON V S+
+ 2
SFH213FA 2 7
1M 49.9
2 LT1806 VOUT
VS2 3
+
100 pF 4
VS2
R1 VS+ 50
10M VS2
Figure 1 Figure 2 3 + 7
10k
6
LT1097 2N3904
2
2 4
The op amp biases the JFET at IDSS, with VGS
VS2 0.1 mF 2.4k
NOTE:
50V. 33k ADJUST PARASITIC CAPACITANCE
AT R1 FOR DESIRED RESPONSE
CHARACTERISTICS.
2200 pF
VS=65V.
pose of the op amp is to bias the JFET at VS2 V S2
VGS50V and, therefore, at ID5IDSS. It
meets this goal by increasing the current
in the bipolar transistor until VGS50V
and ID5IDSS. This fast, high-gain photodiode amplifier uses Figure 1’s scheme to bias the JFET.
In this condition, the JFET operates at
its highest gain (gm) and lowest voltage- TABLE 1—RESULTS FOR VARIOUS RF WITH 1.2V OUTPUT STEP
noise condition. The JFET operates as a
RF 10 to 90% rise time (nsec) 3-dB bandwidth (MHz)
follower with zero offset. The only re-
100 kVV 64 6.8
quirement for the op amp is that it have
200 kVV 94 4.6
ultralow bias current. A variety of op-
499 kVV 154 3
amp types satisfy this criterion, includ-
1 MV V 263 1.8
ing JFET-input op amps, such as the
LT1462; superbeta-input op
amps, such as the LT1097; and than approximately 10 kV.
micropower op amps, such as Table 1 shows the rise time
the LT1494. Figure 2 shows an and bandwidth achieved for
implementation of the topology several transimpedance gains
of Figure 1, using an inexpen- (as set by RF). To obtain op-
sive, fast 2N5486 JFET. This de- timum speed characteristics,
vice specifies IDSS at 8 to 20 mA you make “parasitic-capaci-
at room temperature. The tance adjustments” (the ca-
LT1097 maintains the gate- pacitor with broken lines in
source voltage at 0V by adjust- Figure 2) by adjusting the
ing the JFET’s drain current. The proximity of RF’s leads to its
source of the JFET connects to body. Figure 3 shows the
the inverting input of the 325- time-domain pulse response
MHz, low-noise LT1806 op with RF51 MV. Connecting
amp. RF closes the loop back to two 499-kV resistors in series
the JFET’s gate. In this applica- improves the response.
tion, the circuit serves as a tran- The circuit of Figure 2 exhibits clean pulse
simpedance amplifier for a fast Figure 3
response with little overshoot or ringing.
photodiode.
Selecting a high value, 10 MV for R1 to attenuate the noise and shape the noise
maintains low noise gain, but you could bandwidth of the slow loop. Measure-
reasonably reduce it to a few times larg- ments show the output-noise spectral Is this the best Design Idea in this
er than RF. The values of the other resis- density is 9 nV/=Hz with RF 50V, so re- issue? Vote at www.ednmag.com/edn
tors and capacitors in the LT1097 loop sistor noise dominates with RF greater mag/vote.asp.
0
have an offset of approximately 0.6V and R1
do not work well in low-level circuitry. A VEBR
22
Schottky diode is a bit better with an off-
set of approximately 0.4V. A few germa- EMITTER
CURRENT 24
nium diodes are still available, but they (mA)
do not tolerate the temperature range of
NOTES: 26
silicon. Also, you can’t include a germa- INVERTED BETA IS LESS THAN 1;
nium diode in an IC. A superior config- FOWARD BETA IS GREATER THAN 100.
MAXIMUM EMITTER VOLTAGE IS 28
uration uses a bipolar transistor for these LESS THAN VEBR+0.6.
applications. USE IB TO SET INVERTED
EMITTER CURRENT. 210
Figure 1 shows the bipolar-inverted- POSITIVE EMITTER VOLTAGE CAUSES 24 22 0 2 4 6 8
clamp circuit and a typical transfer func- INVERTED OPERATION. EMITTER VOLTAGE (V)
NEGATIVE EMITTER VOLTAGE
tion. The collector connects to ground or CAUSES FORWARD-OPERATION, NOTE:
any other desired reference voltage. A HIGH-CURRENT, LOW-IMPEDANCE TRANSFER FUNCTION FOR 2N3904
CLAMP ACTION. WITH 40-mA BASE DRIVE.
fixed current drives the base. In the ab-
sence of any external drive, the emitter (a) (b)
Figure 4
6.6V
1-MHz CARRIER
WITH 100% AMPLITUDE
MODULATION AT 5 kHz 20k
120k
OUTPUT
1 nF
1 nF
2N3904
NOTES:
BASE-DRIVE CURRENT IS 300 mA, EMITTER REVERSE CURRENT
IS APPROXIMATELY 75 mA.
2N3904 FORWARD BETA IS GREATER THAN 100;
REVERSE BETA IS APPROXIMATELY 0.25.
EMITTER-BASE REVERSE-BREAKDOWN VOLTAGE IS GREATER THAN 6V.
AC-DRIVE VOLTAGE IS LESS THAN 6.6V P-P.
Date
load-transient overshoot is also lower: meet this requirement, calculate the val-
Stepdown converter uses less than 50 mV p-p versus more than 100 ue of R1:
a ceramic output capacitor ......................154 mV p-p.
Single printer-port pin acts IC1, a stepdown dc/dc converter with 20 mV L1 ILOADMAX
an internal synchronous rectifier that R1 ≅ .
as an encoder output ................................156 2 × VOUT TMIN 2 × IOUTSENSE
supplies a fixed 1.8 or 1.5V output at 250
VFC makes simple
mA from an input range of 2.7 to 5.5V,
capacitance meter ......................................158
needs 20 mV p-p or more at its output Per the data sheet for the MAX1734,
pin for stable operation under load. To VOUT is 1.5 or 1.8V, L1 is 10 mH, TMIN is 0.4
ENCODER
1 WORD
DOUT
devices require many I/O lines when un- TRANSMITTED
4 WORDS 4 WORDS
der microprocessor or PC control. For CONTINUOUSLY
example, the HT-12E encoder has eight
address pins, four data pins, and one At power-up, the HT-12E encoder begins a 4-word transmission cycle.
transmit-enable-control pin. As an alter-
native, you can simulate the HT-
12E using a single pin of a PC’s Figure 2
printer port as the encoder output. Soft- ONE-THIRD-BIT
ware determines the functions of the en- SYNC PERIOD
DATA-CODE
coder. 12-BIT PILOT PERIOD ADDRESS-CODE PERIOD PERIOD
The HT-12E is a CMOS IC. This en-
coder serially transmits data as defined One complete transmission period includes a pilot period, a bit-sync period, an address-code peri-
by the state of the A0 to A7 and D0 to D3 od, and a data-code period.
input pints. On power-up, the DOUT pin
is low. The HT-12E begins a 4-word the status of the 12 bits of address and pler and the decoder, IC1. The encoder
transmission cycle on receipt of a trans- data in the order of A0 to A8 and D0 to D3 output comes from printer Port Pin 2 of
mission enable, or TE, signal, which is (Figure 2). the DB25 connector. The data port is at
active low. The cycle repeats as long as The IC encodes each logic high or low address 0x378h of the PC’s LPT. R1 lim-
the TE signal is low. When TE goes high, into pulses (Figure 3). The encoder rep- its drive current from the PC’s printer
the encoder completes its final 4-word resents a logic low as a long pulse (011) port. IC2’s Schmitt trigger shapes the op-
transmission cycle and then stops (Fig- and a logic high as a short pulse (001). tocoupler’s output. The D0 pin of IC1
ure 1). Every logic bit takes three OSC periods. connects to R2 and an LED.
You can preset the status of each ad- The information sequentially transmits According to Figure 2 and Figure 3,
dress or data pin independently to logic via the DOUT pin. one complete transmission period con-
high or low. If the TE signal is low, the en- Figure 4 shows the test circuit for a vir- sists of 73 OSC periods. The pilot peri-
coder scans and sequentially transmits tual encoder that includes an optocou- od, which is 12 bits, is all logic low (0, 36
156 edn | June 7, 2001 www.ednmag.com
design
ideas
OSC periods) followed by a one-third-
bit sync period (one OSC). After FOSC
Figure 3
those periods follows 8 bits of
"ONE"
address and 4 bits of data, all of which
need 36 OSC periods. Every bit of ad-
"ZERO"
dress or data is either a “001” encoded ADDRESS/
pulse for a logic high or a “011” for all DATA BIT
other cases. A time interval exists be- A short pulse of “001” represents a logic high, or a “one,” and a long pulse of “011” represents a
tween two pulses, and a software loop logic low, or a “zero.”
controls the interval. Also, the interval
5V
must be in accordance with the OSC pe- 6N136
W
R3
of a circuit using capacitors 20k
Figure 1 330
or when you replace an VS=5V 9 10
old, defective capacitor with a new one, 13
14 ● FREQUENCY COUNTER
0.01 mF VIN ● DMM WITH FREQUENCY-
you often need to know the value of the 2
1
FOUT= .
10(R1+R2)•CX MEASUREMENT FEATURE
capacitor you use or replace. At times, the A
11
IC1 8 ● PC's PARALLEL PORT
CX
values printed on the capacitors are no AD537
12 VOLTAGE/
longer readable. Also, the wide tolerance A' FREQUENCY 4 CX=(1024/FOUT)FARADS
VIN CONVERTER R1
band of the capacitors can leave you mak- 5
3 820
ing a wild guess about the capacitor val- VREF
0.1%
1014
CX = FARADS.
FOUT
Reference
1. “Use your printer port as a high-current ammeter,” EDN,
July 6, 2000, pg 144.
+
62
78 467
+
AD9631
2
15
AIN
VIN
500 mV p-p VIN
10 MHz 500 mV p-p
10 MHz
VOP VOCM
10 mV/DIV
VOM
At 10 MHz and unity gain, the out-of-phase The output-balance error in Figure 2’s circuit
Figure 3 outputs have low distortion. Figure 4 is lower than 1 mV with a 500-mV, 10-MHz
input signal.
C mable-gain amplifier with a wide is a programmable, low-voltage 1-of-8 R0 to R7, for a given input-output signal
gain range and high accuracy and analog multiplexer, which connects to range as follows: VOUT5VIN(112RK/-
common-mode rejection. Usually, it’s eight weighting resistors, R0 to R7, to in- (RX1RON)), where RON is the on resist-
wise to exploit a programmable-gain in- crease the gain range of the circuit. The ance of the CD4051, typically 125V. RK is
strumentation amplifier, such as an overall gain of the circuit depends on the the 50-kV internal feedback resistor of
AD625. Unfortunately, the gain range of value of the selected weighting resistor. the AD623, and RX is one of the selected
such standard parts is weighting resistors. IC3, a
VCC
fixed at certain values, lim- Z4
C
CD4052, is a 2-of-8 program-
Z3
iting their flexibility. Fig- CHANNEL
Z
B IC2
8
7
4
VSS mable-difference-input IC.
SELECT 2 CD4051 +
ure 1 shows a multichan- A IC1 6 VOUT
You can control the port-se-
AD623
nel, eight-level-program- VSS R0 R1 R2 R3 R4 R5 R6 R7 1 2 5 lect pins, Z0 and Z1, of IC3 and
3
mable-difference-amp- 2 Z2 to Z4 of IC2 with a mC, such
lifier circuit. IC1, an Z1
A 13
as an AT89C51 or an 80C196.
Z0
AD623, operates from a B
IC3
CD4052 3 With the aid of some software,
single supply. This ampli- the circuit can provide self-ad-
V2 V+ VSS
fier is a low-power, low- VSS justing gain.
INPUT DIFFERENCE SIGNAL
cost instrumenta-
Figure 1
tion amplifier that Is this the best Design Idea in
offers good accuracy. A You choose the weighting resistors to obtain the optimum gain ranges for this issue? Vote at www.edn
single external resistor sets your application. mag.com/ednmag/vote.asp.
Figure 1
NOTES:
1. ALL CAPACITORS ARE CERAMIC.
2. R5 IS A 100-kV AUDIO-TAPER 3
CD RECORDING RECEIVER/ POTENTIOMETER; R1 IS A 10-kV LINEAR
DECK AMPLIFIER POTENTIOMETER; AND ALL IC2
OTHER RESISTORS ARE 1/8W, 5%. LM3914
2
LINE OUT CD INPUT 10
6 3.6 dB
L +
L R R
1k 2 11
3 dB
+
L R3 7 1.25V
R
VOLUME- 1k REFERENCE 1k
UNIT 2 12
METER 2.3 dB
+
JACKS
1k
0.01 mF 0.01 mF 2 13
R4 1.6 dB
+
430
51k 51k ON POWER 1k
0.1 mF ON 8 2 14
0.9 dB
+
+
2k 1k
8 2 15 D1
3 0 dB
+ 9V +
IC1A 1 ALKALINE
LM358 1k
2
2 3.3V 2
4 16
20.9 dB
+
R5 1k
2 17
100k 9 22 dB
N/C BAR/DOT +
AUDIO
GAIN ADJUST SELECT
1k
2 18
CW 23.2 dB
+
1k
2 1
24.6 dB
+
1k
5 RISE-TIME R2 4
+ 1N914 ADJUST 820
IC1B
6 7
2
200k 20k CW
2
C1
1 mF 5
R1 +
1N914
10k 560k
LINEAR
200k 2
A high-resolution, average- (not peak-) reading volume-unit meter produces an accurate reading of loudness.
25V
D1
10 mF D2 10 mF
Figure 1
+ +
L1
10 mH D3
5V
6 36k
220 pF IN 5
IC1 SW
3 1M
LT1307
V125
SHDN 10 mF
1.5V
AA CELL 1 2
VCC FB
GND
4 LT100421.2
100k 324k
1000 pF
5V
LUCAS NOVASENSOR
8 NPC-1220-015A-3L
V125 3 + R1
IC3B 1 4 D4
5V 56.2k 169k
LT1490
2 1 1 1 2 R2
7 1N5711
4 1 10k
1 IC2
38.3k 6
2.43k LT1167 1IC
G421 3A
15V ` 5 LT1490
243k 5
` 3 8 4 V125 `
3 V125
1
15V TO 4 2 -
R3 DIGIT DVM
549k 59k
1k 2
R4
50k
6
RSET R5 0 TO 2V4
14.3k 0 TO 20,000 FT
NOTES:
5
D1 TO D3: MOTOROLA MBR0520L.
L1: COILCRAFT D01608-103.
To produce a reasonably accurate altimeter, conditioning circuitry inverts the barometric pressure of a micromachined pressure transducer and com-
pensates for nonlinearities in air-pressure changes with respect to altitude.
T er in Figure 1 continuously monitors its, the circuit immediately deactivates Q1. When Q1 turns on, Q2 turns off,
the supply lines for any leakage cur- the relay, thereby disconnecting the faulty which deactivates the relay.
rent and immediately disconnects the load. Any further or repeated attempts to Two trim potentiometers facilitate
supply if necessary. Load-supply wires, restart the device with the faulty load re- tripping at user-preset levels. R2 controls
both live and neutral, pass through the sult in repeated tripping of the relay. You the coarse setting, and R1 provides for fin-
magnetic core of the CR4311-5 trans- have to manually disconnect the faulty er adjustments. Typically, the muscles in
ducer (www.crmagnetics.com), which load and restart the device. the human body can tolerate current up
monitors the supply current. Under nor- The circuit configures IC1B as a preci- to 20 mA. Hence, R1 and R2 must have
mal circumstances, because the current sion, fast-acting voltage comparator. IC1A settings that cause the relay to trip at leak-
flowing in both conductors is equal and provides a stable 6V reference to IC1B. age currents of greater than 15 mA that
opposite, no flux is generated in the When the voltage on the noninverting in- the transducer senses from the load-
transducer core. However, under faulty put of IC1B rises above the preset refer- mains supply wires. R3 allows control
conditions, the current in the live wire ex- ence voltage on its inverting input, the over the hysteresis. D1 to D3 provide pro-
ceeds the current in the neutral tection. C1 and C2 are decoupling
wire, which catalyzes the produc- and charge-pump capacitors, re-
tion of flux in the core. spectively.
Figure 2 TRANSDUCER
This transducer core has a CR4311-5 A 12V, 0.5A mains power-sup-
secondary winding that generates ply unit is sufficient to effectively
a voltage based on the produced run the circuit. The relay contacts
AC MAINS TO
flux. The generated voltage ranges SUPPLY SECONDARY LOAD must have a rating suitable for the
from 0 to 10V and is directly pro- load. Figure 2 shows the wiring
portional to the sensed ac cur- layout for attaching the circuit to
rents. an ac-mains circuit. All compo-
A high-speed comparator, IC1B, RESIDUAL-CURRENT nents are standard industrial
CIRCUIT BREAKER
detects this generated voltage and RELAY grades and are commonly avail-
12V DPDT
compares it with a set reference. If able.
the detected voltage is within a
tolerable range, the relay remains The residual-current circuit breaker uses a transducer to moni- Is this the best Design Idea in
active, and the load remains con- tor the supply current and a relay to disconnect the mains from this issue? Vote at www.edn
nected to the mains supply. How- the load. mag.com/ednmag/vote.asp.
VCC
12V
RELAY
Figure 1 12V DPDT
C1 C2 NC
+
0.1 mF 100 mF D1
2.2k 25V DC
D2 1N4148
NO TO LOAD
1N4148 100 pF
4.7k
TRANSDUCER IC1A 1M
CR4311-5 10M AC MAINS
68k 5 LM319A 2.2k
SUPPLY
+ D3
12 Q2
3.9V 1N4148 9
4 + BC107
2 R1 7 10k Q1
5k IC1B
220k 10 BC148
SECONDARY 2
R2 220k 22k
10k
100k 270k R3
2.2k
IC1B is a precision, fast-acting comparator and controls whether the relay is active based on a preset reference-voltage level.
_
IC1
Circuit yields accurate absolute ● The op amps must have low offset. amps’ offset and tweaking the resistors,
values..............................................................125 In a practical configuration, you can the residual error is within 100 mV p-p
ADC enables temperature-compensated configure D1 through D4 using base-col- over the 13V p-p operating range. Figure
weigh-scale measurements ......................126 lector junctions of a monolithic transis- 2 shows the behavior of the circuit with
tor array, such as an MPQ6700. The re- a 40-mV p-p input signal (bottom trace).
Single cell lights any LED ..........................128
sistors are 10- and 20-kV, 1% metal-film
Lowpass filter uses only two values ........130 units. You can use optional 100V trim-
Quickly discharge power-supply mers in series with the resistors in the cir-
capacitors ......................................................132 cuit to trim for optimum performance. Is this the best Design Idea in this
The op amps are OP27 devices, with their issue? Vote at www.ednmag.com/edn
offset trimmed. After adjusting the op mag/vote.asp.
www.ednmag.com July 5, 2001 | edn 125
design
ideas
ADC enables temperature-compensated
weigh-scale measurements
Albert O’Grady, Analog Devices, Limerick, Ireland
ou can provide temperature com-
IN`
OUT`
20k
AVDD DVDD
References
1. Kurzrok, Richard M, “Low cost low-
A composite lowpass filter uses four component values.
pass filter design using image parame-
L7A
ters,” Applied Microwave & Wireless, Feb-
L1A
ruary 1999, pg 72, and correction May
L1B L3A L3B L5A L5B L7B 1999, pg 12.
2. Kurzrok , Richard M, “Update the
C1A C1B C7A C7B design of image-parameter filters,” Mi-
crowaves & RF, May 2000, pg 119.
3. Kurzrok, Richard M, “Filter design
C1C C7C uses image parameters,” EDN, May 25,
2000, pg 111.
C2B C6B 4. Kurzrok, Richard M,“Wideband fil-
Figure 2 C3A C3B
C2A C6A ter uses image parameters,” EDN, Oct 26,
C2C C6C
2000, pg 174.
NOTE:
ALL NORMALIZED INDUCTORS AND CAPACITORS EQUAL 1.
Is this the best Design Idea in this
By judicious connection of components, this filter uses only one value each for the inductors and issue? Vote at www.ednmag.com/edn
capacitors. mag/vote.asp.
A in power-supply
design is the safe
and speedy discharge, or
Figure 1 S 1
1:1 on/off power switch create
a filter-capacitor-discharge
path that exists only when
“dump,” at turn-off of the NC you need it: when the sup-
large amount of energy stored CVS2 ~ ply is turned off. When the
NC = 50J
in the postrectification filter 120V AC 2 switch moves to the off po-
capacitors. This energy, CV2/2, sition, it establishes a dis-
can usually reach tens of charge path through resis-
joules. If you let the capacitors + 4400 mF 1k tors R1 and R2 and the
RB 25W V=150V
self-discharge, dangerous 200V power transformer’s pri-
voltages can persist on un- mary winding. The result is
loaded electrolytic filter ca- an almost arbitrarily rapid
pacitors for hours or even dump of the stored energy,
days. These charged capaci- while the circuit suffers ze-
tors can pose a significant haz- A bleeder resistor ensures safety but wastes much power. ro power-on energy waste.
ard to service personnel or Use the following four cri-
even to the equipment itself. teria to optimally select R1,
The standard and ob- R2, and S1:
Figure 2
vious solution to this S1 1:1
TURN-OFF
DISCHARGE PATH
● The peak discharge
problem is the traditional current, V/(R1 1R2),
R1
“bleeder” resistor, RB (Figure should not exceed S1’s
1). The trouble with the RB fix contact rating.
is that power continuously ● The pulse-handling
and wastefully “bleeds” 120V AC
R2
capability of R1 and
through RB, not only when it’s R2 should be adequate
desirable during a capacitor to handle the CV2/2
dump, but also constantly + 4400 mF
thermal impulse. A
V=150V
when the power supply is on. 200V 3W rating for R1 and
C
The resulting energy hemor- R2 is adequate for this
rhage is sometimes far from 50J example.
negligible. ● The discharge time
Figure 1 offers an illustra- constant, (R11R2)C,
tion of the problem, taken Otherwise unused switch contacts can dump energy while not wasting power. should be short
from the power supply of a enough to ensure
pulse generator. The CV2/2 energy stored penalty in a low-duty-cycle pulse-gener- quick disposal of the stored energy.
at the nominal 150V operating voltage is ator application. This waste dominates all ● S1 must have a break-before-make
150234400 mF/2, or approximately 50J. energy consumption and heat produc- architecture that ensures breaking
Suppose you choose the RB fix for this tion in what is otherwise a low-average- both connections to the ac mains
supply and opt to achieve 90% discharge power circuit. This scenario is an un- before making either discharge con-
of the 4400-mF capacitor within 10 sec af- avoidable drawback of bleeder resistors. nection, and vice versa. Otherwise,
ter turning off the supply. You then have Whenever you apply the 10%-in-10-sec a hazardous ground-fault condition
to select RB to provide a constant RC time safety criterion, the downside is the in- may occur at on/off transitions.
no longer than 10/ln(10), or 4.3 sec. RB, evitable dissipation of almost half the
therefore, equals 4.3 sec/4400 mF, or ap- CV2/2 energy during each second the cir-
proximately 1 kV. The resulting contin- cuit is under power.
uous power dissipated in RB is 1502/1 kV, Figure 2 shows a much more selective Is this the best Design Idea in this
or approximately 23W. This figure repre- and thrifty fix for the energy-dump prob- issue? Vote at www.ednmag.com/edn
sents an undesirable power-dissipation lem. The otherwise-unused off-throw mag/vote.asp.
W
5V
1N5819 600 mA
ply controller, such as On Semi- +
47 mF +
conductor’s NCP1200, op- 350V 1 HV 8 470 mF
erates at a high ambient temper- F i g u r e 1 NCP1200
10V
2 7
FB
ature, you should protect the entire pow- 3 6 MTD1N60E
er supply against lethal thermal runaway. CS VCC
4
The NCP1200 operates directly from the GND DIV
5
EMI
power mains without an auxiliary wind- FILTER MOC8103
ing; therefore, the die in the IC dissipates
+
power (Figure 1). Unfortunately, the in- UNIVERSAL 10 mF
ternal temperature-shutdown circuitry INPUT
3V
cannot perform its protection function
because the die is not at ambient tem-
perature but at a temperature that’s high- A controller IC implements a low parts-count offline power supply.
er than ambient by a few tens of degrees.
To overcome this problem, you BC547’s base, and the thyristor
can implement a thermistor-based Figure 2 1 8
latches, thereby permanently
design, but this solution compromises 2 7 stopping the NCP1200’s puls-
the system’s cost. Fortunately, you can use 3 NCP1200 6 es. Once you remove the sup-
10k
standard bipolar transistors to imple- BC557 4
ply from the power mains, the
5
ment a low-cost thermal-shutdown cir- thyristor resets. The 0.1-mF ca-
cuit. Figure 2 shows how to build a clas- pacitor prevents spurious
sic thyristor circuit using two inexpensive BC547 316k noise from triggering the
bipolar transistors: a BC557B pnp and a + thyristor.
10k + 22 mF
BC547B npn. The idea is to use the neg- 0.1 mF We conducted tests on the
ative-temperature coefficient of the sili- thyristor-based temperature-
con ;22 mV/8C) to fire the thyristor. protection scheme using BC-
In the inactive state, both the upper Two bipolar transistors configure a thyristor-based tempera- 547B and BC557B transistors.
and the lower transistors in Figure 2 are ture-shutdown circuit. The “B”extension is important
in the off state because of the presence of because it corresponds to a
the 10-kV resistors. The thyristor struc- low a certain level, the IC internally narrow hFE range of 200 to 450. This de-
ture connects between the feedback pin, blanks the cycles, and the power transis- sign uses transistors in TO-92 packages,
FB, and ground. One feature of the tor turns off. If the thyristor permanent- mounted close to each other. If only one
NCP1200 is to skip unwanted switching ly pulls the FB pin to ground, the transistor heats up, thermal results vary.
cycles when the power demand dimin- NCP1200 no longer delivers pulses. Once Therefore, you should mount these two
ishes. The IC performs this function in- latched, the thyristor prevents any restart, components close to each other on the pc-
ternally by constantly monitoring the FB until you disconnect the power supply board-component side so that they will
pin. When the voltage on this pin falls be- from the power mains. The 316-kV re- operate at approximately the same junc-
sistor combines with the 10-kV resistor tion temperatures. From 20 bipolar-tran-
TABLE 1—TEMPERATURE to form a voltage divider from the VCC sistor combinations, you can obtain the
SHUTDOWN VERSUS VBE rail. This rail, on average, varies from lot results shown in Table 1. You can see that
VBE VBE TLATCH-OFF to lot from 10.3 to 10.6V, for a total DV the latch-off threshold temperature varies
(mV, npn) (mV, pnp) (88C) of 300 mV. This variation translates to by only approximately 58C for all combi-
665 654 110 to 115 less than 10 mV at the transistor’s base. nations of transistors (Reference 1).
666 656 110 to 115 When the temperature rises, the BC547’s
667 656 110 to 115 turn-on VBE diminishes until it reaches Reference
666 657 110 to 115 the divider voltage on its base. (This volt- 1. “Bipolars provide safe latch-off
670 659 110 to 115 age is approximately 320 mV, but you can against opto failures,” EDN, Dec 7, 2000,
664 653 115 alter it to accommodate other tempera- pg 190.
666 652 115 ture levels.) At this point, the BC547 con-
667 655 110 to 115 ducts current, and the BC557’s base volt- Is this the best Design Idea in this
667 657 110 age starts toward ground. The BC557’s issue? Vote at www.ednmag.com/edn
669 653 110 collector current further biases the mag/vote.asp.
88 edn | July 19, 2001 www.ednmag.com
design
ideas
Variable load tests voltage sources
Michele Frantisek, Brno, Czech Republic
he circuit in Figure ure 1 consists of an op amp,
T
12V
0.1 mF
1 serves as a IC2, driving transistors Q1
variable, cur- Figure 1 and Q2. IC2 compares the ref-
VCC 12V
rent-sink load for testing Q1 erence voltage at Point A
A 10k 2N3440
voltage sources. You use DBO VOUT +
1k
with the voltage across resis-
IC2
digital commands to set VSEN
OP77
tor R. IC2’s output voltage
the load current of the DB3 2 controls Q1 and Q2 such that
VSEL DEVICE
DATA DB4
device under test over a INPUTS
IC1
212V
UNDER the voltage across R equals
AD558 Q2 TEST
wide range, independent- DB7
10k
TIPL762 the reference voltage at point
ly of the device under CE A. The voltage across R is
1
test’s output voltage. The CS
R 10W proportional to the current
GND GND
circuit comprises an AD- 1% from the device under test
558 DAC, IC1, which pro- and is independent of the
vides a reference voltage output voltage of the device
at Point A. Practically any A simple circuit allows digital control of current, independent of voltage. under test. The value of R in
type of DAC converter Figure 1 is 1V; thus, the cir-
works well in this appli- TABLE 1—DAC OUTPUT VOLTAGE VERSUS INPUT CODE cuit provides a sink current of
cation. The AD558 is a Digital input of IC1 1A when the voltage at point
single-supply type with Binary Hexadecimal Voltage at Point A (V) A is 1V. With the values
an internal reference; 0000 0000 00 0 shown in Figure 1, you can
these features simplify 0000 0001 01 0.01 control currents of 0 to 2.55A
the design. IC1 generates 0000 1111 0F 0.15 over a device under test volt-
an output voltage of 0 to 0001 0000 10 0.16 age range of 5 to 250V. Be sure
2.55V (Table 1). The 1000 0000 80 1.28 to limit the power dissipation
control inputs CE and 1111 1111 FF 2.55 in Q2 to 120W.
CS in IC1 allow you to
control the DAC from a microprocessor to obtain direct access to the DAC’s data Is this the best Design Idea in this
bus. If your application does not involve inputs. issue? Vote at www.ednmag.com/edn
a data bus, connect CE and CS to ground The second part of the circuit in Fig- mag/vote.asp.
AC IN
TRANSFORMER
D1 D2
1N4100 1N4100
mains voltage is high. Figure 2
shows that Q1 must handle nearly
0.75W at nominal input voltage
ply uses a zener diode and an emit- and output current. A TO-92
ter-follower transistor. You must D4 R1 small-signal transistor, such as a
D3 1N4100 150
calculate and design the trans- Q1 BC337, is adequate for 300 mA,
1N4100 BD135
former such that Q1 is close C2 +
but a medium-power device, such
Figure 1
to saturation at low mains 2200 mF/ 5V as a BD135, is a better choice. To
16V
voltages and nominal output cur- D5 R6 + C2 cut costs, this design uses no heat
5.6V 1k 1 mF/
rent. Additionally, you must choose 10V
R1 to ensure proper bias for the 0V
This simple plug-in power supply is
zener diode. The transistor dissi- effective but has no current limiting.
V
1
VCC 5V
useful in control circuitry for 14
Figure 1 2
positioning and holding pur- 15
poses in robotics and power electronics. 3 R2
J1
+
Frequently, the need arises for pulses with 16 1k
1
4 DESIRED PULSE
width less than 1 msec. Delays less than 17
2
3
1 msec are usually not available in most 5
R1
2
A
Figure 1 Figure 2
ADEL
ENCODER
OUTPUT A B
ENCODER
OUTPUT B BDEL
FORWARD REVERSE
INTERRUPT INTERRUPT
To determine the direction of rotation, it’s necessary to detect both
rising and falling edges of the encoder outputs. A PAL produces unique patterns for forward and reverse rotation.
RATIO ADJUST
NEGATIVE
OUTPUT/INPUT
transformer. One implementation is the 50k
R3
2k
TTL
OUTPUT
R4
CINT
ators, and making timing-pulse genera- 0.1 mF R2 1 0.1 mF
2 TLC393 TTL 2M
tors. Any square-wave-conversion circuit 1M GATE
2
is more valuable when the square wave’s
duty cycle is variable and controllable. 5V
2
Figure 1 shows a circuit that has these at- TLV2470
1M +
tributes and can drive several TTL-com- R5
patible loads. CIN couples the input signal ADDITIONAL TTL
GATES IF REQUIRED
onto a dc level set by R1 and R2 (the level
is VCC/2 when R15R2). Thus, the period-
ic signal at the noninverting comparator You can obtain a square wave with 2 to 98% duty cycle with this simple circuit.
input rises above and falls below VCC/2.
The parallel value of R1 and R2 (RP) and fall times. The longer rise and fall times put comparator. If the voltage on the pos-
CIN form a highpass filter with a 23-dB give the circuit more control range. itive-integrator input is VCC/2, the output
frequency of 1/(2pRPCIN). Increasing RP When the input signals are symmetri- square wave must be symmetrical for its
or CIN lowers the cutoff frequency for cal, setting the dc level at VCC/2 produces average value to be VCC/2. Adjusting R5 to
low-frequency applications. If high-fre- the maximum pulse-width control and its center point yields a 50%-duty-cycle
quency noise riding on the signal causes duty-cycle range. Asymmetrical input square wave. Adjusting R5 close to ground
problems, add a capacitor in parallel with signals require a different dc level, be- yields a square wave that is low for most
R2; this addition eliminates the high-fre- cause the time durations of the positive of the period, and adjusting R5 close to
quency noise by creating a low-frequen- and negative portions (with respect to VCC yields a square wave that is high for
cy filter. If the input signal is a square VCC/2) of the coupled signal are not most of the period. The integrator pole is
wave, the added capacitor integrates the equal. RP’s value must be low to prevent at fP51/(2pR4CINT). With the values
square wave, thus increasing its rise and input-bias current from developing an shown in Figure 1, the 0-dB crossover
appreciable offset voltage. The compara- frequency is 0.8 Hz. The gain of the inte-
tor in this design is a CMOS TLC393 ver- grator circuit is unity at 0.8 Hz, and the
Convert periodic waveforms sion of the industry-standard LM393. gain rolls off at 20 dB per decade, so the
to square waves ..........................................105 The comparator weighs the dc-refer- comparator’s small-signal gain is not
enced input signal against a reference high enough to cause oscillation. The se-
Circuit improves on first-event
voltage from the integrator output. The lection of the integrator pole is a trade-
detection ........................................................106
comparator’s output waveform is a off between stability and control-re-
LED doubles as emitter and square wave. The comparator drives a sponse time. The circuit in Figure 1 does
detector ..........................................................108 gate (or several gates if you need more not oscillate or multiple-switch under
Watchdog circuit uses ac triggering ........112 output drive) through R3. R3 must have any conditions. It produces a square wave
a low value to quickly charge the gate in- that’s adjustable from 2 to 98% duty
Use power line for baud-rate put during the low-to-high transition. cycle, and it responds to 20-mV input
generation......................................................112 The current the comparator can sink lim- signals.
Inline equations offer hysteresis its R3’s lower value.
switch in PSpice ............................................114 The TLV2470 integrator integrates and
inverts the output square wave and feeds Is this the best Design Idea in this
it back as the reference voltage for the in- issue? Vote at www.ednmag.com.
www.ednmag.com August 16, 2001 | edn 105
design
ideas
5V
4 VCC
9V 9V 6
VCC SWITCHBUS 5 Q PR 5V VCC VCC 1
2 S
74F74 D VCC Q 5 9V
FF0 CAPTUREINHIBIT 4013 D VCC
6 3
Q CLK SWITCHBUS 2 FF0 3 CAPTUREINHIBIT
10k CL Q CLK
10k 0.1 mF R
RESET 1 10k
10k RESET 4
5V 10k
PLAYER 1 VCC
10 PLAYER 1
12 D1 10k 8
0.1 mF DPR 9 9 D1
Q D S 13
74F74 Q
1N914 4013
11 FF1 R1 1N914
CLK 8 5V RESET 11 FF1 R1
CL Q VCC CIRCUIT CLK
Q
12 9V
470 R VCC
RESET 13 LED1 1k
10 LED1
CIRCUIT
10k 5V
VCC 10k
PLAYER 2 4 Figure 2 PLAYER 2
2 D2 6
D PR 5 5 D2
Q D S 1
74F74 Q
1N914 4013
Figure 1 3
CLK
FF2
6
R2
5V 3 FF2
1N914
R2
CL Q VCC
CLK
CLK 2 9V
470 R Q
1 LED2 1k VCC
4 LED2
10k 5V 10k
VCC
PLAYER N 4
DN PLAYER N 6
2 PR 5 DN
D 5 S 1
74F74 Q D
3 FFN 1N914 4013 Q
6 RN FFN 1N914
CLK 5V 3 RN
CL Q CLK 2 9V
VCC Q
470 LEDN R VCC
1 1k
4 LEDN
0.8
ate range of wavelengths. The spectral
response of a junction diode depends 0.7
RESPONSIVITY
EMISSION
on a variety of factors, including ma-
terial chemistry, junction depth, and 0.6
packaging. The packaging of most
devices aims to inhibit sensitivity to RELATIVE 0.5
RESPONSE
radiant flux to maintain the intended
function of the device. However, 0.4
some devices’ packaging and con-
0.3
struction techniques allow conven-
ient exposure to light. The most
0.2
common light-sensitive devices, pho-
todiodes and phototransistors, sense 0.1
and measure light from a variety of
sources. Other light-sensitive diodes, 0
which don’t usually come to mind for 700 750 800 850 900 950 1000 1050 1100
light-sensing applications, are LEDs. WAVELENGTH (nm)
LEDs, packaged to emit radiant flux,
can serve as narrowband photode- Enough overlap exists between the responsivity and emission curves to make a LED useful for both
tectors. The devices lend themselves transmission and reception.
to applications in which they serve as
spectrally selective photodetectors or to
applications in which they act as
transducers. References 1 through Figure 2
SYSTEM 1 SYSTEM 2
4 provide further information on opto-
electronic devices. Tx
OPTICAL OPTICAL
Tx
Rx Rx
An LED’s sensitivity to light and par- Tx/Rx
TRANSCEIVER TRANSCEIVER
Tx/Rx
ticularly to its emission wavelength de-
pends primarily on the device’s bulk ma-
terial absorption and junction depth. For
LEDs that have low bulk absorption, This half-duplex application uses a LED for both transmission and reception.
108 edn | August 16, 2001 www.ednmag.com
design
ideas
photosensitivity at or near
peak wavelength is low, and, 5V
VCC
as a result, the creation of Tx
hole-electron pairs is low.
5V R7
GaAs-based emitters with IC2
emission wavelengths of 940 C3 + C2
270k R8
R3 C1 100k
nm have relatively good sen- 3.3M 0.1 mF 10 mF 10 pF R9
sitivity at or near their peak R1
Tx/Rx
470 D1 (GENERAL-
emission wavelength, thanks Q1
3 8 1N4148 PURPOSE
1k + + 5
to high bulk absorption. Fig- 1
+
R10 I/O PIN)
IC1A V 7 Rx
ure 1 shows the relative re- R2 IC1B
1k
2 6
sponsivity and emis- 100 2 2 2
Figure 3 4
sion spectra for an R4 GND
R6
Infineon (www.infineon. LED 10k
10k
com) SFH409 LED. This in- R5
470
frared GaAs LED has peak
emission at 940 nm with a
half-peak bandwidth of 50
nm. In detection mode, it One dual op amp and a handful of components turn a LED into a dual-purpose device.
peaks at 920 nm with a half-
peak bandwidth of 55 nm. As Figure 1 acting as a shunt current-to-voltage con- blocks any transition occurring on the Rx
shows, the wavelength of peak respon- verter and a high-speed, noninverting line from activating the UART’s receiver.
sivity is shorter than the peak-emission voltage amplifier (IC1A). Resistor R3 pro- When switching between transmitting
wavelength, and a fair amount of overlap vides a slight bias of a few millivolts to and receiving modes, the software should
exists between the two curves. Thanks to R4 to keep IC1A in its linear region. The include a time delay to allow for pream-
this overlap, the LED is useful as a trans- op amp in this design is the high-speed plifier recovery. The preamplifier-recov-
ducer. Figure 2 shows a half-duplex ap- dual OPA2350 from Texas Instruments’ ery delay is typically less than 10 to 20
plication that exploits the LED. Burr-Brown division (www.ti.com). The msec. Note that for 8051-class microcon-
Here, the LED links two embedded device has rail-to-rail inputs and outputs trollers with depletion-mode pullup re-
systems via a fiber-optic cable or a short- and a gain-bandwidth product of 38 sistors on their I/O pins, you should re-
distance, line-of-sight coupling path. Fig- MHz, and it can operate from a single 2.7 place D1 with a pnp transistor and an
ure 3 shows the transceiver circuit used to 5V supply. The transconductance gain associated base resistor.
in Figure 2’s application. The circuit can of the preamplifier is a function of the
send half-duplex data between two em- values of R4, R5, and R6. In the circuit of References
bedded systems at rates as high as 250 Figure 3, the resistor values produce a 1. “The Radiometry of Light Emitting
kbps. The circuit comprises the LED transconductance gain of approximate- Diodes,” Technical Guide, Labsphere Inc,
driver, the preamplifier, and the output ly 220,000. The output comparator, IC1B, North Sutton, NH.
comparator. The LED driver drives the converts the preamplifier’s output signals 2. “GE/RCA Optoelectronic Devices,”
LED during data transmission and un- to logic-level voltages. You set the input GE/RCA Corp, 1987.
hooks the Tx pin from the LED during threshold of the comparator by adjusting 3. Gage, S, D Evans, M Hodapp, and H
data reception. The Tx pin connects to resistor R8. By properly adjusting the Sorensen, Optoelectronics Applications
transistor Q1 via base resistor R1. When threshold, you can obtain good pulse Manual, McGraw-Hill, 1977.
the Tx pin is in the idle state (logic 1), the symmetry for a variety of input-power 4. Sze, S, Semiconductor Devices—
quiescent current of the LED driver is conditions. The combination of R9 and Physics and Technology, Wiley, 1985.
zero, because Q1 is off. Activating the Tx C1 provides ac hysteresis and additional
pin (logic 0) causes Q1 to turn on. Resis- overdrive for improved comparator
tor R2 sets the LED’s output-power level. switching. Moreover, R9 limits the
You should set the power level to com- switching current on input Pin 5 of IC1B
pensate for transmission losses through for logic one-to-zero transitions.
the communication medium and to During data transmission, the trans-
minimize pulse-distortion phenomena mitter circuitry drives the preamplifier
in the communication link. R2 should be and comparator. To prevent locally trans-
50 to 220V when the circuit operates mitted data from causing UART overrun
from a 5V supply. errors, the Tx/Rx line should be at a log- Is this the best Design Idea in this
The preamplifier consists of resistor R4 ic-1 level. The combination of R10 and D1 issue? Vote at www.ednmag.com.
74C14
watchdog circuit to a mi-
croprocessor is equivalent
to a power-on reset, but it is
reset signal becomes activated con- LOW ACTIVE not. The warm-boot and
WATCHDOG 1k RESET
tinuously, and the microprocessor + cold-boot programs in em-
RESET C1 OUTPUT
has no way to escape the situation. FROM THE 1 mF 10 mF bedded microprocessors
MICROPROCESSOR
We found that a simple solution significantly differ. Warm-
uses an ac trigger to reset the boot watchdog signals are
watchdog circuit (Figure 1). We This watchdog circuit uses ac triggering to avoid watchdog-signal prone to hang-up. The cir-
used an RC oscillator consisting of hang-up problems. cuit in Figure 1 can activate the
a 74C14 gate to generate active-low microprocessor even if the
reset signals to the microprocessor at ap- to a low level. If the watchdog trigger re- watchdog signal hangs up.
proximately 10-msec intervals. High-lev- mains in a high state for a longer period
el pulses at the base of the transistor than you want, the oscillator generates an Is this the best Design Idea in this
switch Q1 reset the charging capacitor C1 active-low reset pulse. You may believe issue? Vote at www.ednmag.com.
O ciated with 8-bit embedded mi- TABLE 1—SAMPLE NUMBERS FOR BAUD-RATE GENERATION
crocontrollers is to use a resis- FOSC
tor-capacitor oscillator. These RC
4
Reference Timer 1 Timer 1 Calculated Desired
9615.38
Percent
(MHz) frequency prescale counts frequency baud rate BRGH SPBRG baud rate of error
0.16
oscillators are inexpensive, but the
4.4 60 16 4583.333 4,400,000 9600 1 28 9482.75 21.22
trade-off is low stability with tem-
3.6 60 16 3750 3,600,000 9600 1 22 9782.6 1.90
perature and voltage. In many appli-
cations, the low cost of an RC oscil-
lator is alluring, but the application can power this PIC microcontroller from INTRC value is 4 MHz, and the power-
requires a stable clock source for baud- a separate circuit that includes voltage line frequency is 60 Hz. Set BRGH for a
rate generation or event timing. In these regulation (see Tech Brief 008 at baud clock 16 times the baud rate, and set
cases, you can find a low-frequency, sta- www.microchip.com concerning a trans- Timer 1 prescale to 16. The desired baud
ble clock source and use it to calibrate a formerless power supply). The power line rate is 9600.
baud-rate generator or event timer. One supplies a solid 50- or 60-Hz reference The formula we use is ((Timr1 val-
source of a low-frequency, stable clock is frequency. You can use the 16-bit Timer ue3prescaler3reference frequency3
the line voltage. This voltage is a good 1 to time the internal oscillator. As the in- baud multiplier))215SPBRG value. We
source 50- or 60-Hz frequency that you ternal RC time constant drifts, the timer used a spreadsheet to run some sample
can easily interface to the microcon- count changes, and you can use the val- numbers, and the results are in Table 1.
troller’s 16-bit timer. By counting CPU ue to determine new values for the baud- To use the technique with a PIC micro-
cycles for a half cycle of the external rate generator. If you adjust the baud-rate controller, simplify the math to
clock, you can determine the frequency generator appropriately, you can main- (Timr1/160)215SPBRG. You will find
of the microcontroller’s internal RC os- tain the baud rate to 62% of the desired that 9600/(16360)5160. This simplifi-
cillator and calibrate the baud rate. value. The incremental cost may be less cation causes a slight error; the rounded
The PIC16F627 flash microcontroller than the cost of a crystal or ceramic res- off value of SPBRG becomes 27 instead
can benefit from this technique. This de- onator. You can also use this technique to of 28. The error at 4.4 MHz becomes
vice has an internal 4-MHz RC oscillator. periodically learn the value of the inter- 2.3% instead of 21.22%.
You can create a simple capacitor-cou- nal RC oscillator to calibrate time cap-
pled circuit to allow the microcontroller tures of external events. The following is Is this the best Design Idea in this
to see the pulses from the power line. You an example of the technique: The base issue? Vote at www.ednmag.com.
112 edn | August 16, 2001 www.ednmag.com
design
ideas
13 VOUT
VIN +
Figure 1 VT THRESHOLD=5
9 VIN
VH HYSTERESIS=2
1 S1 2
+ +
VOUT (V) 5
V2 VOUT VCC
3 10
R1
10k
1
23
1 3 5 7 9
(a) (b)
VIN (V)
This switch circuit (a) toggles at 7V and resets at 3V, yielding 4V hysteresis (b).
Bctrl
Voltage
V(plus)-V(minus)>V(ref) ? 1:0
Rconv1
10Meg NodePlus
plus Figure 3 Rt R1
8 + 100k 1k
+
Rconv3 S1 Vc VOUT
10Meg 3 2
_
+ X1 1
3 + Vcc
+ SWHYSTE
Rconv2 NodeMinus Ct Vt45V 15
Figure 2 10Meg
Bref 100 pF Vh42V
minus Voltage
ref
+
Rconv4
10Meg
_
5V
Figure 2 A2 12V
75V ANTENNA
A1
75V ANTENNA
IC4
MAV-UHF 479
100 nF 1
11 VCC
8 ANT 15
VCC 3 ANT
7 100 nF 7
GND 10 10 GND
GND-OUT
13 IC3
4 6
VIDEO-IN RF-IN MCA 479
VIDEO GND 3 2
VIDEO-GND 12V EN
2
AUDIO-IN
1
12V AUDIO-GND
21 20 VIDEO IN
K1
19 REL-G5V2
18 D3
17 1N4003 SOUND GND
16
15
14 2N7000 SOUND OUT
13
12 1k
11 2
10 R1 C
9 3 P1 1
8 SWITCHING LEVEL A C8 47k CH
7 47k
4.7 mF R2
IC2A R6
IC2B
6 SOUND IN LEFT 2 10k 4.7 mF
5 1 1 61 D
+ 3 + 7 +
4 SOUND GND 47k
C9 5 +
3
4.7 mF R3 LM358N R7 C10
2 SOUND IN LEFT 2k LM358N
1 2k
+
47k
SCART B
R4 VCC/2=6V
VIDEOCAMERA IN 12V
8 V+ 10k +
R5 2.2 mF
IC2P 10k
4 V1
REMOTE
HOST DATA
HOST CLOCK
REMOTE CLOCK
HOST
SYSTEM
ing. The result is that some
data may be corrupt, or,
worse, the input registers
The host clock treats the I/O sys- SYSTEM may go into a metastable
tem, which is located far from the LOGIC REMOTE DATA state. The circuit in Figure 2
main hardware, as a slave. Because prevents clocking bad or
of the transmitters, receivers, re- changing data. It does so us-
mote-system logic, and cable At or near 360 or 1808 phase difference between the two clocks, this ing only general-purpose,
length, the data the host receives has remote-I/O system is subject to metastability. “jellybean” logic. The key is
a dramatic latency. This latency can to remote-clock back to
be larger than the clock period. If the problem with such latency is that receiv- host. This action allows XOR gate IC1A to
length of the cable is indeterminate, then ing registers in the host system might compare the phase difference between
the latency is also indeterminate. The clock in the data from the remote system the host clock and the delayed clock.
96 edn | August 30, 2001 www.ednmag.com
design
ideas
When the two clocks are nearly in clock. If the host were to clock in the data too low, the resulting ripple can cause the
phase, the duty cycle of IC1A’s output is on the rising edge of its clock, metasta- output of the comparator to be unstable.
close to 0%. When the two clocks are bility would become a concern. You can You could use a comparator with hys-
close to 1808 out of phase, the duty cycle simply clock in the data on the falling teresis to reject the ripple. Some instabil-
approaches 100%. Whatever the duty cy- edge of the host clock, but this solution ity of the comparator’s output is accept-
cle is, it is constant during normal oper- yields the same problem if you choose a able, because you can safely use either the
ation. The only way it can change is for new cable with a different length. rising or the falling edge for most laten-
the cable length between the two systems Without any analytical effort on the cies. You need stability only when the
to change. R1 and C1 form a lowpass fil- designer’s part, the circuit in Figure 2 au- clock is near 360 and 1808 out of phase,
ter. Set R3 equal to R4 so that the reference tomatically selects which clock edge to so you have little to lose by using a large
voltage is at midpoint. IC2 and IC1B then use. Note that comparator IC2 can be a R1C1 time constant to present a dc volt-
select whether to clock register IC3 on the low-speed part, because it operates at dc age to the comparator’s input.
rising or falling edge of the host clock. IC4 only. Note also that if the two clocks are
ensures that the data changes consistent- 3606908 out of phase, the circuit uses the
ly with the rest of the host system. Figure falling edge of the clock. If they are Is this the best Design Idea in this
3 shows a (delayed) remote clock that is 1806908 out of phase, the circuit uses the issue? Vote at www.ednmag.com/edn
nearly 3608 out of phase with the host rising edge. If the R1C1 time constant is mag/vote.asp.
DATA
8D 8Q 8D 8Q
7D 7Q 7D 7Q
Figure 2 6D 6Q 6D 6Q
5D 5Q 5D 5Q
SYNCHRONIZED
4D
IC3 4Q 4D IC4 4Q
VCC DATA
3D 3Q 3D 3Q
2D 2Q 2D 2Q
R3 1Q
HOST CLOCK R1 1D 1Q 1D
IC1A 1 IC1B CLK CLK
REMOTE CLOCK IC2
+ OC OC
C1 +
R4
This circuit automatically chooses between the rising and the falling edge on the host clock for clocking in data.
HOST CLOCK
CLOCK
FROM REMOTE
DATA IN
DATA IN 0 DATA IN 1 DATA IN 2 DATA IN 3
FROM REMOTE
XOR:A OUTPUT
DATA IN CLOCKED IN
ON RISING EDGE POTENTIAL METASTABLE STATE
OF HOST CLOCK
DATA IN CLOCKED IN
ON FALLING EDGE DATA IN 0 DATA IN 1 DATA IN 2
OF HOST CLOCK
Clocking data on the wrong edge can result in metastability; the circuit in Figure 2 selects the right edge.
This microphone system derives its power from the receiving-end circuitry through the leads that carry the audio signal.
2 13
HUMIDITY
3.3V
220
Figure 1
100k Q1
0.1 mF
6 FDN336P
SMBDATA 9 VCC 100k
SMBCLK 8 IC2
MAX4626 10 Q3
5 2W
7 2N3904
5 2 1
10 IC1 DXP TWISTED PAIR
MAX1618 4
2 2200 pF
ADD1 IC3
MAX4626 5
1
ADD0 4 1
DXN
3 4 AIRFLOW
100k Q2
FDN335N
3.3V
1 xF34ALL SWITCHES OFF.
xF24MEASURING SWITCHES ON.
xF54POWER FETs ON.
8
2
I/O1
9
3
10 IC4 I/O2
MAX1661
4
7 I/O3
3.3V
6
ADD
This anemometer measures airflow by heating Q3 and then noting the time for Q3 to return to its original temperature.
Y in Figure 1 to parallel-pro-
gram two-wire serial EE-
PROMs via the I2C bus. Gang program-
Figure 1
SCL
CAT24WC16
mers must address all memory devices 2
I C BUS 2
I C BUFFER
SDA SCL A2
during a write operation. To verify the (82B715) 1
0 A1
4 MAX352
memory contents, however, the system SDA A0
must address only one memory at a time
during read operations. Therefore, the CAT24WC16
system in Figure 1 addresses the memo-
SCL A2
ry devices either in parallel or one at a 16-BIT I/O
1 A1
(PCF8575)
time. Information transfer between de- SDA A0
vices connected to the I2C bus system re- SCL P01
P02
quires a SDA (serial-data) and SCL (se- SDA
rial-clock) signals. A device connected to P07
the bus can operate as a transmitter or a A0 P10
receiver. A master device initiates a data A1
CAT24WC16
transfer on the bus, generates clock sig- SCL A2
A2 P17
nals, and terminates the transfer. The 15 A1
SDA
master addresses a slave device. To con- A0
2
nect devices on an I C multimaster bus,
the SDA and SCL lines must be bidirec-
tional and must connect to a positive An I2C expander and analog switches provide gang programming and serial read access for multiple
supply voltage through pullup resistors. EEPROMs.
In I2C-bus addressing, the first byte af-
ter a Start condition determines the slave fixed part and a programmable part. The large capacitive loads required, a Philips
that the master selects. A slave address is eighth bit, or LSB, determines the direc- 82B715 I2C-bus extender serves as a
seven bits long and usually comprises a tion of the transfer, either read or write. buffer. The software sequence for paral-
The programmable part of the slave’s ad- lel writing to all memory devices is to set
dress allows you to connect the maxi- the port pins by writing to the PCF8575
Circuit gang-programs EEPROMs mum possible number of identical de- to command closing all switches and then
over I2C bus......................................................73 vices to the I2C bus. This number send an I2C-bus command to write to the
depends on the number of address-input CAT24WC16 EEPROMs.
LFSR provides encryption ............................74 pins the I2C device has. In Figure 1, the The software flow for reading the con-
Resistor network extends serial-data line, SDA, connects to each tents of one memory device is to set the
Schmitt trigger’s reach ..................................76 CAT24WC16 EEPROM via bidirection- port pins by writing to the PCF8575 to
Routine yields fast bit reversing
al Maxim (www.maxim-ic.com) MAX- close the switch associated with the mem-
for DSP algorithms ........................................78
352 quad SPST analog switches. The ory to read, set all the other switches to
switches derive their control from a 16- open, and then send an I2C command to
A 4- to 20-mA loop needs bit Philips (www.semiconductors. read the selected CAT24WC16 EEPROM.
no external power source ............................80 philips.com) PCF8575 I/O expander for
the I2C bus. The clock line, SCL, connects Is this the best Design Idea in this
to all memory devices. For driving the issue? Vote at www.ednmag.com.
T a familiar technique
for converting a low-
level analog signal to digital form.
Figure 1
C1
R1 IC1
74HC14
VS
er VIN thresholds, respectively;
and VTU and VTL are the Schmitt
trigger’s upper and lower
Resistors R1 and R2 set the quies- VI DIGITAL-OUTPUT switching thresholds. By meas-
VOLTAGE, VOUT
cent dc level at the Schmitt in- uring VTU and VTL for a given
verter’s input to a value roughly ANALOG-INPUT Schmitt inverter and selecting a
VOLTAGE, VIN R2
equal to the midpoint of the hys- suitable value for R3, you can
teresis band. Capacitor C1 re- calculate the corresponding
0V
moves dc content from VIN, such values of R1 and R2. The circuit
that the Schmitt trigger’s input accommodates almost any val-
signal, VI, centers itself on the ues of VP and VN. The only re-
midhysteresis level. Provided that This Schmitt-trigger circuit is useful for converting an ac signal to striction is that the hysteresis
VIN is large enough to cross IC1’s digital form. (VP2VN) is sufficiently larger
threshold level, the output signal, than IC1’s hysteresis (VTU2
VOUT, provides a faithful VS VTL); otherwise, the equations
digital representation of Figure 2
can yield negative resistor
VIN. Unfortunately, the R3 values. If IC1 is a CMOS device
IC1
circuit suffers from several draw- VIN R1 74HC14 (for example, 74HC14,
VI
backs. The presence of C1 makes VOUT 74AC14, 4093B, or 40106B),
it impossible for IC1 to switch at you can use large resistances,
R2
specifically defined dc levels on thus ensuring high input im-
VIN. Furthermore, for low-fre- pedance.
0V
quency waveforms, C1 must be For cases in which it is in-
extremely large to prevent un- convenient to measure the ex-
wanted signal attenuation. Also, if act values of VTU and VTL, you
VIN is of random period or is can replace R1 and R2 with vari-
asymmetrical with time (for ex- Eliminating the input capacitor avoids problems with asymmetrical able resistors to accommodate
ample, a pulse train with low duty input waveforms. the worst-case spread in VTU
cycle), the signal at VI will not and VTL. However, because R2
swing symmetrically about the VS and R3 have a large influence on
quiescent dc level and R1, the spread of values you
Figure 3
may fail to cross one of RA need for R2 results in a broad
R3 IC1
IC1’s thresholds. You can solve all R1 74HC14 variation in the R2-R3 parallel
VIN VI
these problems by replacing C1 VOUT combination and results in an
with a resistor, as in Figure 2. RP
even broader spread of values
In Figure 2, R1 and the parallel for R1. Replacing R2 and R3 with
combination of R2 and R3 act as RB R2 a potentiometer network, as in
an attenuator that allows IC1 to 0V
Figure 3, provides a solution to
switch at specific, user-defined dc the “spread” problem. Because
levels that may be much greater R2 varies with R3, the spread in
than IC1’s switching thresholds. the R2-R3 parallel combination,
Furthermore, R2 and R3 introduce The potentiometer networks solve the problem of large spreads in and hence in R1, is narrower.
an offset that allows VIN’s lower component values. This arrangement results in
threshold to be negative if re- some fairly onerous equations
quired. R1 and R2 relate to R3 as R2 = relating the variables. However, you can
follows: R 3 (VTL VP1VTU VN ) simplify matters by observing that for a
, particular CMOS Schmitt inverter, each
VS (VP1VN + VTL1VTU ) + VTU VN1VTL VP
R 3 (VTL VP1VTU VN ) of its thresholds is a constant fraction of
R1 = ,
VS (VTU1VTL ) where VS is the supply voltage; VP and VN the supply voltage, VS. Therefore, you can
T
3.5 TO 19.5 mA
4- TO 20-mA 2 4- TO 20-mA
uses a low-current-drain MAX- CURRENT
1
LOOP more than 5 mA from the output
SOURCE 1
4073H amplifier to sense the for 1% full-scale measurement ac-
3.3V LED
current flowing through a 4- to 20- curacy. The LED shows visual in-
4 5
mA loop. The circuit senses tensity variation for changing cur-
the current through a 1V re- Figure 1 3 MAX4073H 2
2OUTPUT
rent in the loop. Its main purpose is
0.5 mA
1
1OUTPUT
sistor with a fixed gain of 100 and to raise the voltage by approxi-
uses no battery or dc power supply. A current-sensing circuit derives its power from the 4- to mately 1V across the sense resistor
The low current drain of the ampli- 20-mA current loop. with respect to the power-supply re-
fier (0.5 mA) enables the circuit to turn Pin 2 of the amplifier. This in-
tap its power from the 4- to 20-mA loop series with the sensing resistor form a creased voltage gives better common-
to power the amplifier chip. Note that the voltage drop of 4 to 4.5V across pins 2 mode performance to the amplifier
current flowing in the amplifier’s pow- and 3 of the amplifier chip. The amplifi- against common-mode noise in the sens-
er-supply Pin 3 (nominally 0.5 mA but er works well over 3 to 28V, so this 4 to ing resistor and prevents the amplifier
may vary slightly) is not part of the sens- 4.5V power-supply range presents no from saturating near the power-supply
ing loop. It forms a negative offset in the problems. rails.
measurement and is not a serious prob- The output of the amplifier is linear
lem. To make this current nearly con- from 350 to 1950 mV for 4 to 20 mA Is this the best Design Idea in this
stant, a 3.3V zener diode and an LED in through the loop. The measurement me- issue? Vote at www.ednmag.com.
5V 5V
Figure 1
R2 R2
6 6
DATA 1 100k 100k
1 1
DATA 2 RESET RESET
C1 C1
2
DATA 3 OSC1 0.1 mF 2
0.1 mF
OSC1
3 3
DATA OSC2 ADC DATA
OSC2
INPUT INPUT
CERAMIC
CERAMIC
IC1 RESONATOR IC1
RESONATOR
MC68HC705KJ1 4 MHz MC68HC705KJ1
4 MHz
DATA N
7 7
(b)
(a)
In one approach to determining minimum and maximum values, the microcontroller stores data values in memory before processing them (a); in
another approach, it processes data on the fly (b).
1 IC1 3
IN OUT
MAX1615
C2 5 4
SHDN 3/5 8 3
0.1 mF + VDD H
GND 4.7 mF
2 1
C1 INC IC3
+ PB1 5 6 7
10 mF VCC 2 C5
OUT1 U/D MAX5160
35V 1 IC2 4
IN1 MAX6817 OUT2 5
W GND 4
L
3 IN2
PB2 6
GND
2
3 5 VDD
NOTES: IN+
ALL RESISTORS ARE 1%. IC4 1
C1 AND C2 ARE TANTALUM CAPACITORS. MAX4162
4 IN1 0 TO 10V
2 VSS (WIPEROUT)
Figure 1
49.9k
49.9k
This solid-state potentiometer simulates a mechanical potentiometer and fits in the same space.
any applications
VCC PIC
10k TRANSIL2 1k 1 2
LINEA-A
1
RX 22 nF
10 nF
2N2287 2 10k 100 mH
2 1 2
LINEA-B
10 5.6k
1 22 nF
Figure 1 2W 1
INPUT FILTER
2N2907A
ACTIVE_TRANS
1k 2 MKT
PVT412L PVT412L
3 2 1 1 2
VCC PIC
2N2222 3
1 mF 100 mH 1 mF
1k TRANSIL1
2
TX 2 100 VCC PIC
1 mF 1mH
100
1 1
D1N4148
1 2 D1N4148
1 mF
2N2222
3
1k OUTPUT FILTER 2
RELAY 2N2222
2 3
1
I
F1 T1 IC1
LM7805 25V
68HC68 microcontroller’s se- 2A/230V 5V
Figure 1 VI GND VO
rial-I/O utility, the goal is to 220V 10V
+ +1 mF
configure a simple circuit, driven by any 10 mF
50V
50V
LPT parallel-printer port, which you can
BRIDGE
use as a remote I/O for a PC. You can in-
100 P1
dependently program each I/O line as ei- STROBE
100
ther an input or an output. The protocol AUTOFEED
100
DB25
0O
in this application is an SPI (MISO/ 100
ERROR
MOSI/SCK) type, using synchronous se- 01
100
100
rial communications. Figure 1 shows a INITIALIZE
100
circuit that effects the connection with 02
100
SELECT IN
the PC and power supply for all I/O sig- 100
03
nals. A bus carries signals of the SPI pro- 04
100
V3 5V
5V
68HCG8P1
1 10k
16
VCC IDO
15 D7 2
ID1 5V
14 D6 3
MISO MISO
13 D5 4 10k
MOSI MOSI
JP1 12 D4 5 0.1 mF
SCK SCK
READER 10 11 D3 6
CE CE
10 D2 7
D0
9 D1 E13 E12
GND 8
5V
2 3 4 5 6 7 8 9
4.7k 4.7k 4.7k 4.7k 4.7k 4.7k 4.7k 4.7k
1 1 1 1 1 1 1 1
5V
P3
1
5V GND
9
R22 5V
2
47k. GND
10
CSO1D2 5V
CE E6 3
CS0 1D2
CS11D3 11
E7
CS21D4 4 CS1 1D3
E8 12
E9 CS31D5 DB15 5
CS41D6 FEMALE CS2 1D4
E10 13
SCK
E11 CS51D7 6
CS3 1D5
14
MOSI
7
CS4 1D6
15
Figure 3 8
MISO
CS5 1D7
P4
1
9
2
10
3
11
4
DB15 12
MALE 5
13
6
14
7
15
8
VINT
Figure 1 MBR20100 10 mH VOUT
16.8V AT 4.5A
100 nF
CBULK 22k
220 mF/400V COUTA COUTB COUTC
2.2 mF 2.2 mF 2.2 mF 100 mF
NCP1200P60 MUR160
8 10
1 7
VAUX 1N4148
KBU4J 2
UNIVERSAL 6 1N4148
3 VINT VOUT
MAINS
4 MTP3N60E
RG
5
10 1k
SFH6115
RUPPER
18k 1N4148
1 nF 39k
1k
100 nF
18k
RSENSE
0.33 TL431
CVCC RLOWER
1 nF
100 mF 6.8k
In this circuit, leakage inductance in the auxiliary winding can invalidate the controller’s short-circuit-protection circuitry.
2k
+ + 1000 mF + 5.1k
220 mF 1N5231 10V 0.1 mF
Figure 1 1N4148 16V
V+ 602k
CS BUF OUT
DIN +
INT OUT
DOUT
4700 pF
SCLK INT IN 20k
100k 1N4148 + 32,768 Hz IC1 +
OSC2 CREF1
MAX132
XT 0.1 mF
15 pF OSC1 CREF` D1
22k 1N4148
REF` LM385
P0 1.2V
10k 20k
1N4148 15 pF P1 REF1
1N5231
P2 AGND 2
1 CD
100k P3 IN LO INPUT
2 RX 22k
IN HI +
3 TX 1N5231 ECO
V1 20k
4 DTR 1N5231 DGND
5 GND
6 DSR + 220 mF +
10 mF
7 RTS 1N4148 16V 1N5231
10k 10V
8 CTS
9 RI
You can use a PC’s serial port to communicate with an 18-bit A/D converter.
Continued on pg 86
he electronic circula-
T
100
15V
tor made its debut ten PORT 1
100 0.1 mF
years ago (Reference 1). 324
It functioned at VHF as a
324 OP AMP
three-port unit using a Com- 1 (FOUR PLACES)
100
linear (now part of National IC1
PORT 2 0.1 mF
Semiconductor, www.nsc. + 100
com) CLC 406 operational
amplifier. The circuit in Fig- 324 324 115V
100 1 100
ure 1 extends the circulator’s IC2
performance to four-port +
PORT 3
100
operation at low frequencies, 100
using the readily available
941 (equivalent to the 324 324
Figure 1 1
ubiquitous 741) and 100
IC3
LM318 op amps. Table 1
+ PORT 4
shows the measured data for 100
324
the 741-equivalent op amp. 100
324
Table 2 shows the measured COMPONENT QUANTITY 1
data for the LM318 op amp. IC FOUR IC4
100
The four-port circulators in R4100V 12 +
R4324V EIGHT
Figure 1 use 50V impedance
levels. The circuit can readily
accommodate other imped-
ance levels, such as 75 and An electronic circulator is useful for isolation and equalization.
600V. You can see that for
typical circulator operation at frequen-
cies below 50 kHz, you can use the 741- TABLE 1—MEASURED DATA FOR TABLE 2—MEASURED DATA
741-EQUIVALENT OP AMP FOR LM318 OP AMP
Frequency Forward Reverse Forward Reverse
(kHz) loss (dB) isolation (dB) Frequency loss (dB) isolation (dB)
Circuit forms 2 0.5 50.2 10 Hz to 100 kHz 0 Greater than 56
low-frequency circulator ............................107 20 0.5 44.1 100 kHz 0.1 Greater than 56
50 1 38 500 kHz 0.5 45
Use printer port as programmable
100 4.1 33 1 MHz 0.9 34
frequency generator ..................................108
1.6 MHz 0 29.5
Trace voltage-current curves 3.3 MHz 3 25.5
on your PC ....................................................112 equivalent op amp. For typical operation
at speeds as high as 1 MHz, you would
Circuit makes simple use the LM318 op amp. The resistors in and the components are soldered to the
FSK modulator..............................................116 Figure 1 are metal-film units with 61% vector board. The ICs use commercially
tolerances. The circulator breadboards available sockets soldered to the vector
use open (not shielded) construction, board.
www.ednmag.com October 11, 2001 | edn 107
design
ideas
You can use the electronic four-port cost version of the circulator using sur- Equalizers Applicable to High-Speed
circulators in various applications with face-mount pc-board techniques. Data Links,” Applied Microwave & Wire-
the fourth port terminated. You can con- less, June 2001, pg 86.
figure baseband-amplitude and group- References
delay equalizers using the electronic cir- 1. Wenzel, C,“Low Frequency Circula-
culator (references 2 and 3). You can also tor/Isolator Uses No Ferrite or Magnet,”
use the circuit as a low-frequency return- RF Design, July 1991.
loss bridge or as an electronic isolator. 2. Kurzrok, R, “Amplitude Equalizer is
Low-frequency op amps are available as Circulator Coupled,” Microwaves, Vol-
quads with four independent op amps. ume 10, September 1971, pg 50. Is this the best Design Idea in this
You can configure a miniaturized, low- 3. Kurzrok, R, “Circulator-Coupled issue? Vote at www.ednmag.com.
Figure 1 20k
5V
9 10
Turn your PC’s printer port into a programmable frequency generator with this simple circuit.
ome years ago, one of the funda- software, such as Spice, that’s removed arithmic-scaled currents from 1 mA to 1
Figure 1
LPT1 POWER
1
C0
14
2 RN1 10
15 D0
3 + R1 R2
16 D1 47 mF 0.1 mF
C2 4 100 100
17 D2 DAC Q2A
5 Q2B
18 D3
GND XN2401
19 6
GND D4 IC2 1000 pF
20 7 LM4130
GND D5 2.048V
21 8 4 IC3
D6 VIN 5 1
GND 9 VREF + LPV321
22 D7 4 Q1
GND GND
3 2SD601
23 10 2 2 2 IOUT=1 mA TO 1 mA
GND S6
24 11 5V COMPLIANCE
5
GND 12
25 S5
GND 13
5 R3 R4 R5 R6 R7 R9
R8
VCC IC4 2.16M 1M 316k 100k 31.6k 3.16k
10k
IC1 74HC164
LM3724 3
4.63V Q0
S1 4 3 9
RESET MR 4
MR Q1
GND 5
1 AND 2 Q2
6
Q3
8
CLK 10
Q4
10k 12 pF 1 11
A Q5
2
10k B 12 IC5
Q6
13 74HC05
Q7
100
IC6 R10
ADCV0831 3 100 1k
4 1 +
CLK 3 IC7
VIN C5
100 5 DO LMC7111 4 1000 pF
1 2 2
10k V+ 5
6
CS 2
GND
0.1 mF
ADC
Remember the classic Tek curve tracers? You can easily configure something similar on your PC.
T IC1 5V
telemetry system NL27WZ14 DC assumes a high level, the
Figure 1
poses a challenge 5 oscillator’s frequency re-
1 6
for designing a small, light, FSK OUTPUT duces by one- half with the
low-component-count sys- C1 2 introduction of a capaci-
0.01 mF
tem. Interfacing serial data 470 tor in the timing circuit via
Q1 R1
from the microprocessor is 2N2222 10k
Q1. The inverter IC can ac-
5k
also difficult because most TTL commodate an operating
INPUT
low-cost RF transmitters do C2 frequency of approximate-
0.01 mF
not accept dc levels at the in- ly 80 kHz. You can easily
put. Commercial FSK (fre- operate the FSK modula-
quency-shift-keying) modula- INPUT tor at higher frequencies,
FSK OUTPUT
tors are bulky and need many such as 4800 and 9600 Hz,
passive components. The cir- by reducing the values of
cuit in Figure 1 uses a single An FSK modulator uses a single inverter with minimal added components. the timing capacitors C1
NOT gate (inverter), an On and C2.
Semiconductor NL27WZ14 in a surface- with available transmitters. When the
mount package, to generate continuous TTL input has a low level, the circuit is a
FSK data from TTL-level signals. The continuously running oscillator, produc- Is this the best Design Idea in this
outputs from this circuit are compatible ing approximately 2400 Hz (adjustable issue? Vote at www.ednmag.com.
R1 10k
R3
cosu. This circuit can have an accuracy of 4.64k 10k
better than 1% over 61208 or better than
0.2% over 6908. These figures represent IC1
MPY634KP
IC2
MPY634KP
1 12 12 R4
an order-of-magnitude improvement 1 2
VIN X+ OUT X+ OUT VOUT=COS U
2 15.4k IC3
over a Taylor-series estimate for the same 2
X2 X2
VO=XY/10Z VO=XY/10Z +
range and for the same number of mul- Z+
11
Z+
11
0
Circuit forms efficient
cosine calculator ............................................87 22
2120 290 260 230 0 30 60 90 120
Reference stabilizes exponential
ANGLE (8)
current ..............................................................88
Microcontroller becomes For angles greater than 6908, the revised coefficients in Figure 1 yield significant accuracy improve-
multifunctional................................................90 ments in calculating cosines.
Circuit converts pulse width
to voltage ........................................................92 sired input range without raising the val- cuit is relatively simple. Set R1 and R2
Short dc power-line pulses ue of n to more than 4. The circuit in Fig- equal to each other (for 10V maximum
afford remote control....................................94 ure 1 embodies this least-squares ap- input and aP1), and determine values for
proach. R2 and R4 by applying the following equa-
Choosing the resistor values for the cir- tions:
www.ednmag.com October 25, 2001 | edn 87
design
ideas
R3 output of IC3 is the sum of the three nificantly smaller. The constant “a” be-
R2 = , terms. Because IC1 is an inverting ampli- comes 0.9996, b50.4962, and c50.0371.
bθ2MAX
fier, the circuit configures the multipliers Then, R15R3510 kV, R258.16 kV, and
and such that the output of IC1 is positive and R4544.2 kV.
R3 the output of IC2 is negative. Choosing You can use the same approach to ef-
R4 = . the proper 0.1% resistors can improve ficiently calculate cosine and sine values
cθ4MAX
circuit accuracy to better than 1% for in a DSP system more rapidly than us-
IC1 generates the square of VIN and 2120 to 11208. You should use a low- ing a look-up table.
negates it. This output sums through R2 offset op amp for best results. Figure 2
into IC3. IC2 generates the fourth power shows the Taylor-series error, the theo-
of VIN and sums it into IC3 through R4. A retical fit, and the actual fit. For a fit in a
210V reference across R1 creates the “a”- 908 range, the values change slightly, and Is this the best Design Idea in this
coefficient constant current into IC3. The the errors across the range become sig- issue? Vote at www.ednmag.com.
+
I1 / I2 = e VBE q / kT . R4
3.92k
The use of matched transistors bal- 2
R3
24.9k
ances the first-order temperature coeffi- IC1 2.49k
cient but leaves a temperature-dependent 10k +
R1 0.01 mF
gain term, q/kT. Classic antilog circuits 909 Q1 Q2 Q3
use a thermistor in the drive circuitry to CURRENT
CONTROL
correct this temperature dependency.
However, if the control input is a fraction 2.49k
5V
6 MC68HC705KJ1
100k 100k
16 1
IRQ RESET CERAMIC
ON RESONATOR 0.1
2
OFF START 15 OSC1 mF
PA0 4.0 MHz
N2 3
OSC2
N1 RATE 14
PA1 25 mSEC
11 PULSE
PA4
Nt
10 510
PA5 LED
7
Figure 1
Between pulses, the microcontroller can per-
form other tasks using the software in Listing 1.
1 mSEC
~
HOLD
SAMPLE
D1 12V
S2
12V D2
HOT
positive 5V dc bias in V2. The fil-
ter outputs V1 and V2 drive in-
verting Schmitt triggers IC1 and
trolled by a wall switch, you IC2. Inserting zener diode D1 by
120V AC TO LAMPS
may find that stringing a second 1N2976B 1N2976B pushing S1 in Figure 1 changes V1
power line is impossible. First, you NEUTRAL
from 0V to 5V and V2 from 5V to
can replace the wall switch by the 10V. Inserting D2 in Figure 1 by
circuit in Figure 1. Pushing the on This circuit creates dc pulses for use with control circuitry locat- pushing S2 changes V1 from 0V to
switch S1 or S2 for approximately ed at the load. 25V and V2 from 5V to 0V. Note
1 sec inserts the 12V zener that the input-protection
W2
diodes D1 or D2 in series diodes of IC1 and IC2 limit
with the hot wire of the the voltage swings of V1 and
R1
power line. During the 50 V2. The output V3 of IC3 re-
100k 100k V1 V3
push, the polarity-depend- C1
IC1 IC3 sponds to pushing S1 by a
1 mF
ent conduction of the zen- 600V positive transition and has
3
er diodes creates a small VDD 1 mF
1 mF 6 OF 74HC14 no response to pushing S2.
D4
positive (negative for D2) D 1 12V 100k 100k V2 V4
The output V4 of IC2 re-
dc component across the C
IC2 sponds to pushing S2 by a
6V D3 2
line and only slightly re- 330 mF 1 mF 1 mF positive transition and has
duces the line’s 120V-ac no response to pushing S1.
component. A control cir- W1 Figure 3 shows the sec-
cuit at the lamps’ This control circuit uses dc pulses from the circuit in Figure 1 to ond part of the control cir-
site reacts selec- Figure 2 cuit located at the lamps’
drive triacs in the circuit in Figure 3.
tively to the polarity of this site. Signals V3 and V4 in
dc pulse and controls the power to the W1 and W2. Current through capacitor C1 Figure 2 drive the clock input of toggle
two lamps. The required power rating of and resistor R1 creates a 60-Hz square flip-flops IC1 and IC2, respectively. For
the two zener diodes depends on the load wave across the 6V zener diode, D3. Diode clarity, Figure 3 doesn’t show the con-
current. The short duration and low duty D1 and filter capacitor C2 generate a dc nections of the flip-flops of Q to D and
cycle of the activation are helpful. The supply voltage of VDD55V for the control the Set terminal to VDD. When you push
1N2976 diodes in Figure 1 are rated for circuit’s active elements. Two two-stage switch S1 in Figure 1, the positive transi-
continuous dissipation of 10W. RC filters connected to W2 create V1 and tion in V3 toggles flip-flop IC1. Similarly,
Figure 2 shows the first part of the V2, with reference to W1. The filters at- when you push S2, the positive transition
control circuit located at the lamps’ site, tenuate the 120V-ac voltage between W1 in V4 toggles flip-flop IC2. Thus, you can
including the two leads of the power line, and W2 to a subvolt level in V1 and V2. An independently control the states of flip-
94 edn | October 25, 2001 www.ednmag.com
design
ideas
flops IC1 and IC2 by pushing S1 and S2, re- must quickly pull down the flip-flops’ Reset does not release before VDD reach-
spectively. To drive the two lamps, the Q Reset terminal, which is independent of es its full value.
outputs of the flip-flops drive the gates of VDD’s slowly dropping level. Diode D2 Note that you can use this Design Idea
triacs TR1 and TR2 via coupling resistors (driven by the 60-Hz square wave across in other applications. For example, if you
R2 and R3. The MT2 termi- omit the circuit in
nal of each triac drives the W2 Figure 3, the transi-
lamps, L1 and L2, re- 2
6 OF 74HC14 tions in V3 and V4 can
spectively. Pushing S1 Figure 3 L1 L2 D2 V5 drive an up/down
FROM
IC4 IC5
changes the state of lamp L1; 74HC74 2N6072B MT2
D4 counter that can per-
TR2
pushing S2 changes the state V3 FLIP- MT1
form an auxiliary
TO THE
of lamp L2. Thus, you have FLOP R2
C3 R4 D3
R5 FLIP-FLOP control function for a
500 2N6072B MT2 100k RESETS
independent control of 1 mF 100k device that the ac line
TR1
both lamps on a single pow- V4 FLIP- MT1 powers. If you insert
C4
er line. In this application, FLOP R3
1 mF
an additional con-
500
you want to keep each ventional switch in
W1
lamp’s terminals safely con- series with the circuit
nected to the hot and neu- Triacs independently control two loads based on signals from a pair of wall switches. in Figure 1, it can
tral wires. Therefore, you turn on and off the
make W1 the hot wire and W2 the neutral zener diode D4), capacitor C3, and resis- power to the device. If the application re-
wire. tor R4 act as an auxiliary rectifier supply- quires control signals near ground level,
With the control circuit, the state of ing voltage V5. When power experiences wire W1 should be the neutral lead of the
the flip-flops becomes uncertain if, after an interruption, V5 drops to 0V much power line, and W2 should be the hot
an interruption, the ac power returns. faster than VDD. V5 drives the cascade of lead. However, make sure that the pow-
This situation is unacceptable because inverting Schmitt triggers IC4 and IC5, ered device is not an inductive load be-
the lamps could turn on and stay on for which then quickly pull down the flip- cause it can short out the controlling dc
an uncontrollable length of time. There- flops’ Reset terminals via diode D3. When pulses.
fore, you add a power-up reset circuit power returns, the Reset terminals pull
(Figure 3). To guarantee a safe reset also up slowly via resistor R5. The R5C4 time Is this the best Design Idea in this
for short interruptions, the reset circuit constant guarantees that the flip-flops’ issue? Vote at www.ednmag.com.
E
OUTPUT TRANSISTOR VCC
relatively small logic OF ECL GATE 5V
Figure 1 ∆V1VDS
spans of approximate- Q1 t P = R1C1 ln ≈ 0.08 R1C1 ,
C1 R2 VBE
ly 800 mV. Because of the small 10 nF 8.2k
span, to drive TTL circuits from OUTPUT POLARIZING
OUTPUT where DVP0.8V is the ECL
ECL levels normally entails the use RESISTOR D1 R1 Q2 span, VDSP0.15V is the voltage
(300 TO 1000V) 1.8k 2N2369
of level converters, such as the drop of the Schottky diode, and
MC10125, or comparators. Such 2VEE OR
VBEP0.6V is the voltage drop of
circuits are relatively power-hun- GND SCHOTTKY DIODE the base-emitter junctions. In
(SUCH AS BAS70, BAT 18)
gry and expensive. However, they practice, the durations are
are sometimes simply unneces- shorter than predicted because
sary. The circuit in Figure 1 allows You don’t need an expensive level-converter IC to provide a TTL- the equation does not take ac-
you to trigger some TTL circuitry level trigger from an ECL-level signal. count of the base-emitter resist-
by generating a fairly short nega- ances of Q1 and Q2. For the
tive-going pulse from the trailing edge of pacitor C1 through the Schottky diode, components in Figure 1, the duration is
the ECL signal. The main requirement D1. In this part of the operating cycle, approximately 2 msec. The crucial com-
for the circuit to work is that the rate of transistor Q2 is off, and the output volt- ponent in the circuit is D1, which must be
ECL signal be in the tens of kilohertz. age is approximately 5V. On the negative- a Schottky type, because of the voltage
Such signals sometimes appear at the rear going edge of the driving pulse, the swing of the ECL signal, which is nearly
panels of some older types of measure- charge from coupling capacitor C1 caus- the same as the base-emitter voltage of
ment equipment. Such equipment can es the base-emitter junction of Q2 to con- the conducting silicon transistor. Proper
include sampling oscilloscopes or time- duct, driving the transistor into satura- operation of the circuit occurs because of
domain reflectometers, such as the 7S12 tion. The output voltage assumes a level the voltage difference between Schottky
or 7S14 from Tektronix. In a measure- slightly below 0V. The duration of the and silicon-junction levels, which is typ-
ment setup, the circuit in Figure 1 ex- generated negative-going pulse depends ically 0.1 to 0.3V. This difference allows
ploits the sampling gate from a 7S12 on the speed with which C2 discharges. for the strong saturation of Q2 just after
plug-in unit. The discharge takes place through the the trailing edge of the ECL signal.
Figure 2 shows the waveforms associ- base-emitter junctions of Q1 and Q2 and
ated with the circuit in Figure 1. The pos- resistor R1. The duration is difficult to Is this the best Design Idea in this
itive portion of the ECL signal charges ca- calculate, but for a rough estimate, you issue? Vote at www.ednmag.com.
1 18
RA2 RA1
2 17
RA3 RA0
3 16 DIP
RA4 VCC
OSC1 SWITCH
VCC IC4 4 33 pF CRYSTAL
MCLR
2 RESET 4 MHz
3 MAX 5 15
VSS 1
809L 1 OSC2
IC1
GND PICI6F84 33 pF
2
6 14
RBO/INT VDD VCC 3
7 13
RB1 RB7
8 12 4
RB2 RB6
9 11 5
RB3 RB5
10
RB4 6
VCC 1M 1M 1M 1M 1M 1M 1M 8
VCC
10k VCC VCC
1
DIN
2 14 10k 8
DOUT VCC 1 VCC
RO IC3 7
3 13 B 7
SCLK TX 2
IC2 12 RE MAX3088 6
4 A 6
CS MAX3100 RX 3
VCC 11 DE 5
RTS GND
10 4
CTS
10k 9 DI
5 X1
IRQ CRYSTAL
6 (3.6864 MHz) 33 pF
SHUTDOWN SHUTDOWN 8
Figure 1 7 X2
GND 33 pF
Adding a small UART, IC2, and microcontroller, IC1, to the RS-485 transceiver, IC3, forms a slave data-transceiver module that responds to its own net-
work address.
T in Figure 1 pro-
vides fan con-
trol and overtemperature
Figure 1 3.3V
4.5 TO 24V
250-mA FAN
Figure 1 5V
R2 R4 R6 R8
1.3 1.3 1.3 1.3
3 4
5
IC1B
74HC132
6
10
9
IC1C
74HC132
8
ANTENNA
28-CM-LONG
COPPER WIRE
at temperatures of 1 to 58C. It is general- R2
1k
ly difficult to collect such data from a R1
4.7M
low-temperature area with high humid- C2
C1 220 TO 300 pF 100 pF L1
ity and low illumination. The transmit- 0 TO 100% RELATIVE-
HUMIDITY SENSOR
ter design is simple: It uses a readily avail-
able, capacitor-type percentage-relative- C4 C3
22 pF 5 pF
humidity sensor for which the capacitor NOTES:
L1 IS SIX TURNS OF 22-GAUGE WIRE WITH 5-MM DIAMETER.
value increases with humidity. Generally, L2 IS 18 TURNS OF 22-GAUGE WIRE WITH 5-MM INNER DIAMETER.
these sensors offer accuracies well with-
in 5%. Humirel (www.humirel.com) rel- This percentage-relative-humidity transmitter uses 10- to 50-MHz, tunable RF, and 1- to 2-kHz
ative-humidity sensors work well with on/off amplitude modulation.
this circuit; you can also use other types
with low leakage resistance. The R1C1 R2C2, equating to a 10- to 50-MHz RF quency, then you can reduce R1 to 1 MV,
product gives the time constant for the band. The last inverter is a power driver changing the modulating signal to the
audible-modulating, 1- to 2-kHz signal for the tuned filter and antenna. The cir- range of 10 to 20 kHz.
oscillator, which you can gate to stop the cuit requires a 3 to 5V battery. Two AAA
communication. This oscillator starts the cells can power it for approximately 15 Is this the best Design Idea in this
RF oscillator, which has a time constant, days. If you need a high modulating fre- issue? Vote at www.ednmag.com.
W
10k 6
1
linear application, you
Figure 1 5 8 12V
should consider its gain 4 10k
2 3
drift with temperature. Traditional sin- 100V
IC2
+
IC1 1
gle- and dual-transistor-output devices H11AV1 402 LM358
2 2
4
have a notable gain drift with tempera-
ture. In recent years, some temperature-
compensated optocouplers have ap-
peared. However, another option is to use 2200 pF
1
6
two optocouplers or a dual optocoupler 10k
5
with appropriate feedback to make the 2
4 VOUT
drift of one device cancel the drift of the IC3
402
other. The circuit in Figure 1 accom- 402 H11AV1
plishes that task by using a differential
amplifier with the drift treated as a com-
mon-mode signal. In operation, it is in- By using two optocouplers instead of one, you can cancel temperature-dependent gain drift.
teresting to apply a dc signal to the input
and use digital voltmeters to simultane-
A a 1
ously monitor the output of each opto- INPUT GAIN = a = • ,
coupler and the differential amplifier.
a
A
OUTPUT 1 + Ab b 1+
1
Apply a heat gun and observe the indi- Ab
vidual outputs change rapidly where a/b is the ideal closed-loop gain
while the amplifier output moves Figure 2 and is multiplied by the loop-gain error
b
term. Given that the error term is small
(from the large gain A of the op amp), the
Circuit compensates optocoupler Control-system feedback theory explains the
gain of the system is seen as the ratio of
temperature coefficient ................................93 operation of the circuit in Figure 1.
the gains (current-transfer ratios) of the
Soft-start controller is much more slowly. This result occurs optocouplers. You can also easily find this
gentle on loads ..............................................94 even with optocouplers from different same ratio by setting the voltages to the
Method offers fail-safe manufacturers. With optocouplers of the op-amp inputs equal. The input and out-
variable-reluctance sensors ........................96 same type, you can observe good drift put signals for this analysis are currents,
cancellation. Parts from the same manu- which precision resistors translate to volt-
Circuit efficiently switches
facturer and dual devices give outstand- ages. The optocouplers in this design are
bipolar LED......................................................98
ing results. You can use individual opto- not particularly fast devices, so the phase
Circuit forms adjustable couplers instead of dual devices to meet delays could cause oscillation without a
bipolar clamp ..............................................100 safety-agency spacing requirements. feedback capacitor. You choose its value
Analog switch expands I2C interface ......102 To examine the method in control-sys- empirically by applying a pulse at the in-
tem terms, consider Figure 2, which put and observing the rise time and over-
Circuit safely applies power to ICs ..........104 shows one amplifier, a, in the forward shoot at the output.
Simple circuit forms path and another amplifier, b, in the feed-
peak/clipping indicator ..............................104 back path. Also consider the following Is this the best Design Idea in this
equation: issue? Vote at www.ednmag.com.
www.ednmag.com November 22, 2001 | edn 93
design
ideas
LINE
R3
R2
20k 68k
50k 10k
1%
20k 5.1k 20k
22k 22k 1% 0.1 mF
Q1 Q2 Q3
Figure 1 1W 1W
2N3096 2N3096
2N3096 Q4
51k 53.6k
1% 8 4 2N3094
D1 0.047
1N4002 7 mF
D3 3
R8 10k
1N4001 R4 IC2
121k
54.9k 6 TLC555CP 5
1% R9
1%
D4 75k
45.3k
D2 1N5242 + C2
1% 2 1
AC-LINE 12.1V
+
C1 O.1 mF
INPUT 100 mF 16V 0.01 mF
20V
R1
2Ok
R7
100k 0.1 mF R6
8 51k D5
100k
5 1N4148 C4
NEUTRAL T1 1k +
3
2
6 22 mF
IC1 7 16V
220 pF LM311 Q6
560k 2 24k 2N7000
+ 1N4148
1
2:50
4
C3 +
10 mF
16V
1k 1M
100k
This soft-start circuit protects the load from large inrush currents.
12
IC5 11
MAC223-8FP VOLTAGE AT Q5
MOC3052
340 COLLECTOR
1 4 0.01 mF
0
R5 MOV
30k
2 6
The circuit in Figure 1 provides soft-starting by adjusting the phase angle of the power applied to
Q5
47 the load.
2N3094
IC2. This pulse uses its negative edge to is floating; you must not tie these
provide a minimum pulse width of 200 grounds together. The design in Figure
msec to the base of Q4. The feedback pair 1 has successfully controlled fans and
150 Q4 and Q5 provides signal inversion and high-amperage universal motors (100
limits the current drawn from the 12V mA to 11A). One example is a router for
supply rail through IC3. When sufficient woodworking. By soft-starting these
LED current develops, the MOC3052 high-torque motors, the reaction torque
triac driver latches on and generates a (to the input current) that the user feels
gate current in the power triac, trigger- disappears. Moreover, other soft-start de-
ing it into the conducting state. Once the signs need two switches. The design in
power triac latches on, the triac driver Figure 1 needs only one on-off switch
LOAD enters its off state, even if the LED cur- (located at the load). Thus, less danger
INPUT rent still exists. exists for incurring an accidental starting
The power triac’s gate voltage falls be- condition. Figure 2 shows some of the
low the optocoupler’s threshold and waveforms associated with the circuit in
cannot hold the optocoupler. The longer Figure 1. T1 is a signal transformer that
the phase delay from the zero-crossing you can modify by wrapping two turns of
trigger, the smaller the conduction an- 14-gauge wire around the bobbin to act
gle and power delivered to the load. R5 as the primary winding.
facilitates on-off switching of the triac-
driver LED by providing a path for leak-
age currents. Potentiometer R2 provides
variable power to the load (to provide
motor-speed control, for example). R2
varies the dc-source current that charges
C2 every ac half-cycle. Note that the sig- Is this the best Design Idea in this
nal ground with respect to earth ground issue? Vote at www.ednmag.com.
www.ednmag.com November 22, 2001 | edn 95
design
ideas
Method offers fail-safe
variable-reluctance sensors
Phil Levya, Maxim Integrated Products, Sunnyvale, CA
ariable-reluctance sensors are the cable or sensor. The circuit in Figure the steel bar supplies the necessary mag-
V preferred for industrial and automo- 1 is a fail-safe variable-reluctance sensor netic flux. The rotating target causes a
tive environments, because they sus- for low- to medium-speed operation.
tain mechanical vibration and operation
change in reluctance and, hence, a change
The circuit comprises L1; R1; and a in the amount of magnetic flux conduct-
to 3008C. In most applications, they sense quad RS-422/RS-485 receiver, IC1. It pro- ed. This change produces a correspon-
a steel target that is part of a rotating as- vides the complementary, independent ding change in the current induced in L1.
sembly. Because the unprocessed signal output signals VOUT and VOUT. Table 1 lists R1 converts the L1 current to a time-vary-
amplitude is proportional to target speed, the resulting fail-safe modes. The supply ing voltage. This voltage goes to the in-
a sensor whose signal-processing circuit- voltage can be 10V, 12V, or the control puts of IC1, whose input-voltage range of
ry is designed for high speed ceases to system’s 24V-dc source. Coil L1 consists 625V, input threshold of 60.2V, and
function at some lower rate of rotation. of 2600 turns of #32 magnet wire wound typical input hysteresis of 45 mV enable
Hall-effect sensors are preferable for on a 0.8-in. steel bar of 0.2-in. diameter, the VR sensor to operate at low speeds.
speeds of several pulses per second, but with 0.125 in. protruding from the sen- The separate, complementary outputs
they require the attachment of a magnet sor face. A magnet attached to the back of come from separate, ESD-protected in-
to the rotating assem-
bly. They’re thus prone TABLE 1—FAIL-SAFE MODES (TWO CYCLES OF VOUT OR VOUT)
to failure when the (VOUT, VOUT) Mode
magnet is broken or (1,0) then (0,1) or (0,1) then (1,0) Normal mode, both pulses valid
damaged. Neither vari- (1,0) then (0,0) or (0,0) then (1,0) Failure, valid VOUT pulse, VOUT failure, cable failure, or partial sensor failure*
able-reluctance nor (0,1) then (0,0) or (0,0) then (0,1) Failure, valid VOUT pulse, VOUT failure, cable failure, or partial sensor failure*
Hall-effect sensors of- Always (1,1) Short-circuited cables or failure in IC1
fers fail-safe detection Always (0,0) Severed cables, failure in IC1 or failure in Q1 and Q2
of the processed signal
*System remains functional in failure modes.
in the event of failure in
10 TO 24V
Figure 1 STEEL
5V 1
ROTATING IN OUT 3 5V
TARGET IC2
4 MAX1615
5V R2
G 5
SHDN + 1k
12 16 4 C2
G VCC 5/3
C1 4.7 mF
2 0.1 mF GND
A1
2
IC1 VOUT
MAX3095
Q1
1
L1 R1 B1 Y1 3
47k
7
B2
10V
6
A2
8 R3
GND Y2 5 1k
VOUT
10
A3 Y3 11
9 B3 Q2 GND
14 A4 Y4 13
BAR 15
B4
MAGNET
Figure 2
CHANNEL 1 CHANNEL 1
FREQUENCY FREQUENCY
4.958 Hz 752.4 Hz
CHANNEL 3 CHANNEL 3
PEAK TO PEAK PEAK TO PEAK
270 mV 5.70V
(a) (b)
These waveforms represent operation at 4.9 Hz at 2.4 revolutions/sec (a) and 752.4 Hz at 376.2 revolutions/sec (b). Channel 1 is VOUT, Channel 2 is VOUT,
and Channel 3 is the voltage across R1.
RED GREEN
Figure 2
RS
130
SPDT
circuit wastes power and does not work SPDT
properly if the power-supply voltage is GREEN RED
not substantially more than the sum of D1
the LEDs’ forward voltages. The circuit is, D2
D2
therefore, marginal, to the point of be-
ing unusable, with a 5V supply and a red RA RB
D1
or green LED, which typically has a total
forward voltage of 4V. You can use a cir-
R1 R2
cuit resembling a flip-flop (Figure 2) that This switching circuit wastes power and does
doesn’t suffer the disadvantages of the not work with low supply voltages. 750 1.8k
circuit in Figure 1. It adds only one
VCE(SAT) voltage to the VF of each LED, so costs less than a dime for the parts, which
plenty of headroom exists with a 5V sup- include three resistors and two inexpen- In this “flip-flop” switch, the only losses come
ply and a series resistor to control the sive, general-purpose npn transistors, from the VCE(SAT) and the base currents of the
LEDs’ current. The circuit in Figure 2 such as the 2N4401 or the C8050. In this transistors.
98 edn | November 22, 2001 www.ednmag.com
design
ideas
example, D1 is red (VF151.6V), and D2 is base drive is a function of the VF of the power supply. The circuit requires only
green (VF252.4V). Based on D2, the driven LED, so you can calculate the base two connections, rendering it ideal for
green LED, you can calculate that resistors, using a forced beta of 20, as fol- front-panel use. Because the 130V resis-
R S5(5V22.4V20.1V)/0.02A5125V lows: tor is in series with the power supply, any
(use 130V for 19 mA). R1520(VF120.7V)/ILED15720V part of the circuit beyond RS can short
As a result, using a single resistor, D1 (use 750V). to ground without causing damage.
has a current of 25 mA. If it is desirable R2520(VF220.7V)/ILED251.8 kV.
to have equal or arbitrarily different cur- The base drive reduces the actual LED
rents, you can insert an additional resis- current by 5%, which is visually negligi-
tor in one leg of the switch to increase the ble. As a bonus, the circuit does not in- Is this the best Design Idea in this
effective RS for that switch position. The troduce any switching glitches into the issue? Vote at www.ednmag.com.
VIN
2
1
3 +
8
IC1A
TL082
15V
1
680
6
1
5 +
IC1B
TL082
7
VOUT
OUTPUT 24
Case VIN (V) VOUT (V) Mode
CLAMPED 26
A 7 5 Clamped 28
B 3 3 Linear 210
C 13 13 Linear
D 17 15 Clamped With VCLAMP set at 25V, the output clamps firmly at 65V.
VDD
IC2
ADDRESS: 0250 ADDRESS: 0251 ADDRESS: 0252
Figure 1
SDA SCL SDA SCL SDA SCL
2250k
AUXILIARY I2C
BUS 1
VDD
IC1 IC3
MAX4562 ADDRESS: 0250 ADDRESS: 0251 ADDRESS: 0252
22
SDA SCL SDA SCL SDA SCL
COM3 NO3 50k
VDD
ADDRESS: 0250 ADDRESS: 0251 ADDRESS: 0252
COM4 NO4 SDA SCL SDA SCL SDA SCL
NO2A 2250k
COM2 AUXILIARY I2C
NO2B
BUS 3
ADDRESS: 0298
SDA SCL A1 A0
MICROCONTROLLER VDD
ADDRESS: 0291 ADDRESS: 0292 ADDRESS: 0293
WITH I2C INTERFACE
SDA SCL SDA SCL SDA SCL
225k
SDA MAIN
SCL I2C BUS
This I2C-controlled analog switch expands by three the number of devices connected to the bus.
S
VIN (<30V) (3.1 TO 5.5V)
monitor a microprocessor’s
supply voltage, asserting reset Figure 1 R3 R4
4k 1M Q2
to the IC during power-up, power-down, 5 NDS8947
VCC
and brownout. In this way, the circuit en- R1
sures that the supply voltage is stable be- 1M IC1
LM3722
fore the microprocessor boots, thus pre- Q1 4
MR 3.08V
2SD601
venting code-execution errors. Many RESET 3 Q3
analog and digital ICs also need a well- GND R5 2SD601
behaved start-up of their supply to avoid R2 1M
120k 1, 2
latch-up and logic-state errors. In addi-
tion to low-supply conditions, low-volt-
age CMOS circuits need overvoltage pro-
tection from any supply runaway. The This LM3722 configuration connects only safe voltages to sensitive ICs.
additional components in Figure 1 ex-
tend IC1’s supervisory functions to con- Adjustment of R2 for an exact overvolt-
nect VIN to VSAFE only when VIN is within TABLE 1—VSAFE HYSTERESIS age value nullifies VBE1’s accuracy error.
set limits. This function protects circuit- OVER TEMPERATURE Table 1 shows typical setpoints over tem-
ry at the VSAFE terminal from power-up VSAFE 088C 2588C 5088C perature. If you need further error re-
transients and overvoltage damage. As a On (V) VIN increasing 3.2 3.2 3.2 duction, you could exchange Q2 for a
supervisory circuit, IC1 asserts a reset sig- Off (V) VIN increasing 6.1 5.5 4.9 comparator and voltage reference. For
nal that is delayed by more than 100 msec On (V) VIN decreasing 6 5.4 4.8 VIN within the set limits, 3.1 to 5.5V, the
whenever VIN decreases below the pre- On (V) VIN decreasing 3.1 3.1 3.1 circuit draws only 16 mA. A total of 5 mA
cisely trimmed reset threshold. You can flows into both the R1 and R4 nodes, and
custom-select the reset threshold from is Q2’s pullup resistor; R5 limits Q3’s base 6 mA flows into R3’s node. R3 protects IC1
2.32 to 4.63V. You can also use current. Using Q1 as an inexpensive 0.6V by providing current limiting of less than
a manual input, MR, to assert the reset switch, resistor dividers R1 and R2 set the 6 mA) for high voltages at VIN. The typi-
signal. overvoltage threshold according to the cal IC1 current of 6 mA through R3 in-
This application uses IC1’s delayed re- equation VOV 5VBE1(R11R2)/R2. An in- creases the undervoltage setpoint by 24
set signal to control switch Q2. The delay ternal 22-kV resistor at IC1’s MR input mV.
ensures that VIN is stable before applica- provides Q2’s pullup. Typical VBE1 accu-
tion to VSAFE. Q3 inverts and isolates IC1’s racy and temperature-coefficient errors Is this the best Design Idea in this
reset signal to control the gate of Q2. R4 are 610% and 22 mV/8C, respectively. issue? Vote at www.ednmag.com.
O
7V
gain-control circuits is output voltage, according to the fol-
increased noise when you Figure 1 + lowing equation:
use the FET as a part of a resistive at- TLC071 VOUT
R DS
tenuator in series with an op amp. 2 VDS = VOUT =
R DS + R 3
This configuration attenuates the sig-
17V
nal before amplification; hence, it re- 0.076
0.1V = 5 .
quires much higher gain bandwidth VIN
R1 R2 R3 0.076 + R 3
and better noise performance from 27k 3k 24k
the op amp. When you substitute the You can calculate R3 as 24.5 kV and
FET for the gain-setting resistor in a RA
select 24 kV. The parallel value of R2
noninverting op-amp circuit, distor- 100k J271 and R3 determine the maximum cir-
VC
tion limits the circuit configuration to RB cuit gain. Selecting R2 as 3 kV yields R1
applications in which the input volt- 100k equal to 27 kV and a maximum gain
age is less than a few hundred milli- of 237. The measured gain at
volts. The FET imposes this limita- The drain-source resistance of the FET controls the gain VC5VGS50V is 236.1, which corre-
tion, because the channel-depletion of the op-amp stage. lates well with the calculated value. RA
layer is a function of VDG and and RB are feedback resistors that
VGS. The improved circuit in linearize the FET’s VGS versus RDS
Figure 1 uses the FET 8 transfer function. You can nor-
as part of the feed- F i g u r e 2 mally obtain adequate lineariza-
RA=27k
back loop. The voltage across tion with equal-value resistors,
the FET is limited in this ap- 7 but you can also control the
plication, and the noise per- slope of the transfer function by
formance is good. An added setting the resistor ratio. The
bonus is improved linearity 6
RA=51k
graph in Figure 2 shows that RA
performance. The transfer modifies the transfer function
function for the improved cir- and linear control-voltage range
cuit is as follows (Reference 1): 5 (VGS). The p-channel FET, J271,
R 2R 3 requires a positive control volt-
R2 + R3 + age, but you can use a negative
V R4 RA=100k
1 OUT =1G = . control voltage with an equiva-
VIN R1 FET-CONTROL 4
VOLTAGE lent n-channel FET, such as the
When R21R35R1 and R45
(V)
J210. The circuit is versatile and
RDS (FET drain-source resist- provides low distortion, wide
3
ance), the transfer function re- range, good linearity, and low
duces to 2G511R2||R3/RDS. cost. The TLC071 op amp has
The minimum drain-source low input-bias currents and has
2
resistance for the FET on hand, provisions for input offset-volt-
J271, is 76V at VGS50V. The age correction.
actual VDS at the inception of
distortion varies with each 1 Reference
FET, but keeping VDS lower 1. Mancini, Ron, “Op amps
than 200 mV usually prevents for everyone,” Texas Instru-
distortion. In the design in Fig- 0 ments, September 2000, pg 3.
210 220 230 240
ure 1, the FET drain-source GAIN
voltage is limited to approxi- Is this the best Design Idea in
mately 100 mV to prevent dis- The ratio RA/RB in Figure 1 controls the slope of the gain-control this issue? Vote at www.
tortion. The divider action be- transfer function. ednmag.com.
6-32 SCREW
Figure 1 CAST-ALUMINUM ENCLOSURE
FOUR PLACES
20V 20V 20V
20V
20V 20V
2k 71.5k 71.5k
R1 20V 100k
0.01 mF
2k 200 Q3
C1
2N3906
Q1 5.5 TO 30 pF
2N3904 Q4 TO OSCILLOSCOPE
PN2222A 10 DIFFERENTIAL INPUT
0.01 mF Q2 C2
1N4148 2N3904 100 pF
1k
CAPACITOR
1N4148 UNDER TEST
20V 20V
+
0.1 mF 10 mF GROUND
NOTE:
ADJUST TRIMMER CAPACITOR
FOR GOOD WAVESHAPE/AMPLITUDE.
Test the pulse characteristics of bypass capacitors using this simple circuit.
E
5V IC1
2R ladder networks, and pro- 5V
MAX837
duced a negative output volt- Figure 1 OUT IN
0.1 mF 10 IC1
age. These early DACs, such as the mF MAX837 0.1 mF
0.1 mF 0.1 mF GND
MAX7837/7847 and the MAX523, re-
quire both positive and negative supply IC2
68HC912B32
rails to accommodate their negative out- VDD REF
T troller in Figure 1 uses a few invert- can be as short as 50 nsec and as long as able from the inverter IC.
er gates to provide drive signals for several milliseconds. This range provides
the complementary switches. Comple- flexible, optimized control for target de- Is this the best Design Idea in this
mentary-switch configurations find vices. R1 and R2 should be larger than 2 issue? Vote at www.ednmag.com.
widespread use in synchronous-rectifi-
D1
cation circuits, charge pumps, full-bridge 1N5819
control circuits, and other cir-
Figure 1
cuits. The circuit in Figure 1 pro-
vides not only a complementary drive 3
IC1B 4 B
signal but also a deadtime delay on both R1
rising and falling edges. The high-speed C1
1 IC1A
inverter gates use IC1, a 74HC04 CMOS A A
D2
circuit, and 1N5819 Schottky diodes D1 1N5819
and D2. The 74HC04 inverter features C
symmetrical input thresholds,VIHMIN and
VILMAX, at 70 and 30% of the supply volt- R2
5 6
IC1C
age, respectively. In Figure 1, IC1A inverts
the signal at Node A to produce A. When
C2
A rises, C1 rapidly charges through D1. 9 IC1D 8
C
Output B drops immediately because of SN74HC04
IC1B’s inversion. However, Output C
drops after a delay time that R2 and C2 This circuit provides drive for complementary switches with programmable deadtimes.
determine because D2 is reverse-biased.
The following formula gives the delay
time, t1 (Figure 2):
A
0.7 VDD
t1 = 1R 2C 2 ln = 1R 2C2 ln 0.7.
VDD
When A falls, C1 discharges through
R1. Output B rises after a delay A
time that R1 and C1 determine. C2 Figure 2
B
discharges rapidly through D2, and out- t2
put C rises immediately. The following
formula gives the delay time, t2:
C
V 10.3 VDD t1
t 2 = 1R1C1 ln DD =
VDD
1R1C1 ln 0.7.
C
By inverting C, IC1D can provide C a
signal with the same polarity as B. By se-
lecting values for R1, C1, R2, and C2, you By manipulating the resistor and capacitor values in Figure 1, you can program t1 and t2.
T
2 TO 30V DC
1 lets you measure all com-
ponents of a current flowing Figure 1
in a dc servo motor. The rectified output
of the circuit uses ground as a reference,
so you can measure the output by using R1
a single-ended A/D converter. The cur- 0.1 H-BRIDGE AND
rent-sense resistor, R1, has a value of + M 2 DRIVER CIRCUIT
S1
from the control input. However, the
power dissipation in a relay coil may ren- D1
der the device unattractive in battery-
+
powered applications. You can lower this C1
100 F
dissipation by adding an analog switch 2
6
that allows the relay to operate at a low- R2 5
er voltage (Figure 1). The power that a re- 27k
4
lay consumes equals V2/RCOIL. The circuit IC1
1
lowers this dissipation after actuation by
applying less than the normal 5V oper- R1
+ MAX4624
C2 4.7
ating voltage. Note that the voltage re- 0.15 F 3
quired to turn a relay on the pickup volt-
age is greater than the pickup voltage
required to keep in on the dropout volt-
age. The relay in Figure 1 has a 3.5V By using an analog switch, you can reduce a relay’s power consumption.
pickup voltage and a 1.5V dropout volt-
age. The circuit allows the re- low enough to allow C1 to
lay to operate from an inter-
TABLE 1—RELAY POWER DISSIPATION charge rapidly but high
Voltage Current Total power dissipation
mediate supply voltage of (V) (mA) (mW) enough to prevent the surge
2.5V. Table 1 compares the re- 5 (normal operating voltage) 90 450 current from exceeding the
lay’s power dissipation with 3.5 (pickup voltage) 63 221 peak current specified for the
the fixed operating voltages 2.5 (circuit of Figure 1) 45 112 analog switch.
applied and with the circuit in IC1’s peak current is 400
Figure 1 in place. voltage. The RC time constants are such mA, and the peak surge current is
When you close S1, current flows in the that C1 charges almost completely before IPEAK(VIN VD1)/(R1 RON), where RON
relay coil, and C1 and C2 begin to charge. the voltage across C2 reaches the logic is the on-resistance of the analog switch
edn01121di2809
The relay remains inactive because the threshold of the analog switch. When C2 (typically 1.2). The value of C1 depends
supply voltage is lower than the pickup reaches that threshold, the analog switch on the relay characteristics and on the
Heather
connects C1 in series with the 2.5V sup- difference between VIN and the relay’s
ply and the relay coil. This action turns pickup voltage. Relays that need more
Analog switch lowers the relay on by boosting the voltage turn-on energy need larger values of C1.
relay power consumption ............................57 across its coil to 5V, which is twice the You select the values for R2 and C2 to al-
Analog-input circuit serves supply voltage. As C1 discharges through low C1 to charge almost completely be-
any microcontroller........................................58 the coil, the coil voltage drops back to fore C2’s voltage reaches the threshold of
2.5V minus the drop across D1, but the the analog switch. In this example, the
Transistor tester fits into your pocket ........60 relay remains on because its coil voltage time constant R2C2 is approximately sev-
Circuit combines power supply is above the relay’s 1.5V dropout voltage. en times (R1RON)C1. Larger R2C2 values
and audio amplifier ......................................62 Component values for this circuit de- increase the delay between switch closure
Supply derives 5 and 3.3V
pend on the relay characteristics and the and relay activation.
from USB port ................................................62
supply voltage. The value of R1, which
protects the analog switch from the ini- Is this the best Design Idea in this
tial current surge through C1, should be issue? Vote at www.ednmag.com.
www.ednmag.com December 20, 2001 | edn 57
design
ideas
Analog-input circuit serves any microcontroller
Steven Hageman, Agilent Technologies, Santa Rosa, CA
he simple ADC in Figure 1 is per-
C E
TO C OF DEVICE
B TO BATTERY UNDER TEST
Figure 2
Figure 1 S1 RT
1 2 3 1 2 3
T C C T C
E
B
0V C
E
NOTES:
TRANSISTORS (T) ARE BC108, BC547, 2N3904, 2N2222...
CAPACITORS (C) ARE 100 nF. TO CIRCUIT TO RT
RC=470, RB=39 k AND RT=3.9 k.
LEDs ARE PREFERABLY RED. (a) (b)
This simple tester allows you to test the polarity and function of a A DIN connector (a) allows you to easily connect transistors; a DPDT switch
transistor. provides various testing options (b).
T
110 OR 220V AC
MAIN SUPPLY
you must transfer dc power and au- 36V DC
1 BRIDGE 24V DC
dio over a pair of copper wires. One IC1 470 F
2 +4
application for such a circuit is a low-cost 1 VIN LM317
VOUT
2 +
+ C1
door-opening system with speech input. T2 ADJ
15 F
1
TRANSFORMER LOAD 2
The circuit uses only one IC, the well- 3
+
680 F 150
known LM317, a low-cost power- 2 LOUDSPEAKER
Figure 1 1
supply regulator. Using this chip,
RP WM34
you can modulate the adjustment-pin in- 100k ELECTRET
put with the audio signal from an electret MICROPHONE
IN
R1 + R 2 OUT
22 H
VBATT (TURN − OFF) = VLBI × , SHDN LX
R2 10 F IC3 +
MAX1837 150 F
FB
GND
where VLBI0.85V, and
R1 + R ′2 Drawing power from a USB port, this circuit generates 5 and 3.3V supply voltages for portable
VBATT (TURN − ON) = VLBI × ,
R ′2 applications.
where Finally, a step-down converter, IC3, Is this the best Design Idea in this
R 2R 3 provides buck regulation to convert 5V issue? Vote at www.ednmag.com.
R 2′ = . to 3.3V and delivers currents as high as
R2 + R3 250 mA with efficiency exceeding 90%.