Professional Documents
Culture Documents
ideas
1M
IC1B
7
+
10k
1M
5
4
_
IC1C
+
V0
TO
HALF-BRIDGE
CIRCUIT
ELECTRONIC
SWITCH
1 SEC
12V
1M
1.5 SEC
C2
2.2 mF
D2
9
1M
14
1M
12V
12V
D1
_ 6
1
1M
+
IC1D
_ 8
330k
10k
0.5 SEC
C1
2.2 mF
NOTES:
IC1=LM339N.
DIODES=1N4606.
www.ednmag.com
design
ideas
5-to-3.3V conversion better than previous logic families, such as the 74HC series. The 74HC family accommodates
3.3V operation, but the input-protection
diodes clamp the input voltage within a
diode drop of VDD (Figure 2a). So, applying 5V to the input of a 74HC part
powered from 3.3V results in much undesired current. An external resistor
could limit this current, but this fix
would impact bus speed. The 74VHCT
and 74LVC families do not use a reversebiased diode to VDD (Figure 2b), so the
input voltage can safely rise to 5.5V, re-
3.3V
V5
Figure 1
IN
+
2.2 mF
0.1 mF
5V
5V
DATA ADDRESS
BUS
BUS
V3
+
0.1 mF
2.2 mF
5V
ADDRESS
BUS
13
8
7
6
5
4
3
2
1
OUT
COM
V3
9
10
12
IC2
OEB5
5V
DATA
BUS
5V
ADDRESS
BUS
2
3
WEB3
IC3
74VHC541
8
7
6
5
4
0.1 mF
5V
3V
ADDRESS DATA
BUS
BUS
OEB1
11
CEB5
V3
0.1 mF
OEB3
CEB3
OE3
OEB1
8
7
6
5
IC5
74VHC541
4
3
2
1
OEB2
OEB2
74HC04
9
8
74HC04
1
2
OE3
OEB3
3
74HC04
4
6
74HC04
74HC04
11
10
13
12
74HC04
3V
ADDRESS
BUS
CEB3
0EB3
WEB3
IC1
64-kBYTE
EEPROM
32-PIN PLCC
8
7
6
5
3V
DATA
BUS
19
V3
19
V3
OE3
0.1 mF
0.1 mF
13
8
7
6
5
4
3
2
3V
DATA
BUS
V5
0.1 mF
OEB5
OEB1
OEB1
3V
DATA
BUS
IC6
74HCT541
IC4
74VHC541
OEB2
OEB2
19
19
OEB5
4
3
2
1
For less than $100, this circuit adapts a 5V EEPROM programmer for 3.3V operation.
www.ednmag.com
design
ideas
Figure 1
exhibits approximately 3 nV/=Hz, referred to the input, for most gain settings.
The highest noise is 4.5 nV/=Hz at a
gain of 9 dB. Distributing the total gain
across multiple stages increases the
overall bandwidth. The output stage
has a different configuration to yield
a low-output-impedance output driver
15V
0.1 mF
24 dB
OPTIONAL
RANGESHIFT
ATTENUATOR
R1
15V
SIGNAL
IN
090
R2
100
0.1 mF
IC2A
ADG333 16
4 SB
4
3 +
2 IC
_ 1A
LT1125
13
VDD
D
IC2B
ADG333
12 dB
IC2C
ADG333ABR
6 dB
7 SB
3
2 SA
1
+
IC
6 _ 1B
LT1125CS
SA
3 dB
14 SB
D
8 12
+
IC
11 _ 1C
10
10 12
LT1125CS
SA
D 13 14
+
IC1D
15 _
11
GND
6
VSS
825 IC2D
ADG333ABR
1k
1k
17 SB
0.1 mF
19
1k
66.5
332
BIT 3
SIGNAL
OUT
LT1125CS
0.1 mF
115V
16
115V
SA
D 18
1k
2k
20
BIT 2
BIT 1
BIT 0
This VGA offers ultralow noise, a wide dynamic range, and high bandwidth.
www.ednmag.com
design
ideas
VCC
0.1 mF
Figure 2
GND
+CONTROL
3
8
0 TO 5V
CONTROL VOLTAGE
1
1CONTROL 2
VCC
IC2
ADC0804
7
+
RG
+VS
IC1
AD620
S1ADICT
S1ADICT
R1
1k
9
6
REF
C1
1 mF
5
RG 1VS
_
4 0.1 mF
7
8
R2
10k
19
4
1
115V
S1ADICT
C2
140 pF
2
3
D1
VCC
R3
1M
+ 10 mF
AT 20V
VREF/2
VCC
VIN+
DB7
VIN1
A GND
CLK R
DB6
DB5
DB4
CLK IN
DB3
CS'
DB2
RD'
DB1
WR'
DB0
INTR'
D GND
20
11
BIT 3
12
BIT 2
13
BIT 1
14
BIT 0
15
16
17
18
10
+ C
3
4.7 mF
www.ednmag.com
design
ideas
16. The oscillator frequency is approximately 21 Hz, but you can change R3 and
C1 to produce the desired frequency,
which is approximately 1/R3C1. You can
also use a potentiometer in place of R3 to
make the frequency adjustable. Keep in
mind that the flip-flop clock-cycle period should be much less than the expected active and inactive periods of the IN
signal but long enough to produce adequate debouncing of the input signal to
maintain good noise immunity. The circuit serves a low-speed application, so the
clock at IC2s Pin 9 is 1.3 Hz.
The circuit filters and buffers the IN
signal before sending it to the flip-flop
Figure 1
5V
5V
IN
0.1 mF
10k
D1
1N4148
16
8
GND
VCC
IC1B
10k
IC2
74HC175
IC1C
Q0
D0
0.1 mF
D1
12
D2
13
D3
9
CLK
D2
1N4148
R3
470k
5V
Q1
Q1
Q2
Q3
2
7
6
10
RST
14
0.1 mF
VCC
IC1A
14
VCC
CLKA
CLKB
Q1A
Q2A
Q3A
RSTA
5V
D3
1N4148
RSTB
12
A0
A1
3 A
2
8
6
5V
CS1
CS2
5
IC1D
9
9
VCC
GND
IC4
74HC237
Q4B
2.2M
16
7
GND
IC3
74HC393
C1
0.1 mF
0.1 mF
0.1 mF
0.1 mF
15
5V
5V
5V
Y0
Y1
Y2
Y3
Y4
Y5
Y6
Y7
LE
15
14
13
12
11
10
9
7
1
2
3
4
5
6
7
8
10
GND
IC5
UDN2981
I1
I2
I3
I4
I5
I6
I7
I8
18
01
17
02
16
03
15
04
14
0
5
06 13
12
07
11
08
OUT8
OUT1
OUT2
OUT3
OUT4
OUT5
OUT6
OUT7
IC1E
8
11
10
0.1 mF
R1
1k
D4
1N4148
RESET
A robust circuit uses one input to sequentially select one output channel at a time.
www.ednmag.com
design
ideas
input at IC2s pin 4. The Schmitt inverter, IC1 with its built-in hysteresis and the
cascaded flip-flop circuit provide high
immunity to noise, and the cascaded flipflop ignores any glitches on the input signal that occur asynchronously to the flipflop clock signals positive-going
transitions. The circuit uses the Q1 output signal as the CLKA clock input to the
first four-stage binary ripple counter, IC3.
Negative-going transitions increment the
counter as the timing diagram indicates
at counts 1, 2, and 3 (Figure 2). The circuit uses the Q2 output to select the active-high CS1 chip-select input of IC4s
one-of-eight decoder, which allows plenty of time for the ripple counter outputs
to stabilize, even at high flip-flop clock
speeds. These outputs do not simultaneously change states. With CS1 high, the
positive-going Q3 output signal at the LE
Figure 2
IC2, PIN 1
RST
IC2, PIN 9
CLK
D0
Q0
Q1
CS1
CLKA
LE
A0
A1
A2
Y0
Y1
Y2
www.ednmag.com
design
ideas
XTAL
4.096 MHz
27 pF
31
10k
D2
30
10M
29
28
1
2
RSET
IN
IC2
MC34064
27
10k
17
10k
19
10k
18
2
VCC
GND
1 mF
1 mF
3
10k
S1
IC1
MC68HC11E1
10k
S3
S2
OUT1
D1
RED LED
1k
42
41
40
39
38
34
37
33
36
10
32
35
43
44
10
45
46
11
47
48
49
13
1k
VCC
7
6
4
2
1
9
10
5
12
14
50
15
52
16
51
J2
1 mF
D3
1N4007
1
IN
0.1 mF
IC3 OUT
7805
GND
2
DISPLAY 2 RIGHT
HP-HDSP-H103
YELLOW
10 mF
OUT2
GREEN LED
1k
10k
RED
GREEN
VCC
27 pF
Figure 1
VCC
VCC
0.1 mF
10 mF
20
10k
21
10k
22
10k
23
10k
24
10k
25
10k
DISPLAY 1 LEFT
HP-HDSP-H103
3
5
10k
VCC
6
VCC
J1
4321
www.ednmag.com
design
ideas
IP =
2 POUT
.
L P FOSC
1:0.08
LP=2.7 mH
1N5819
10V AT 90 mA
+
470 mF/16V
12V/1.3W
6
5
MTD1N60E
100 nF
6.8
RSENSE
NOTE:
THE TRANSFORMER IS AVAILABLE FROM ELDOR (ELDOR@ELDOR.IT, REF 2262.0058C)
AND FROM COILCRAFT (INFO@COILCRAFT.COM REF Y8844-A).
IC1 regulates the peak current and allows this 1W supply to operate from universal mains.
Figure 2
10.6
10.4
10.2
OUTPUT 10
VOLTAGE 9.8
(V) 9.6
9.4
9.2
100
150
200
INPUT VOLTAGE (V AC)
250
300
design
ideas
www.ednmag.com
design
ideas
el. Thus, 243 combinations (35) are possible. However, three-state DIP switches
are expensive, and 64 possibilities are
enough for many applications. If Pin 6 of
S3 provides a low level, A1 to A5 can be either low levels or unconnected. If Pin 6
of S3 provides a high level through R10, A1
to A5 can be either high levels or unconnected. This arrangement gives 64 combinations.
R11, R12, and C2 form the local oscillator. The output of IC1 at Pin 15 provides
Q2
2N2907
Figure 2
R9
10k
10k
4.7k
ANTENNA
VCC
D6
LED
15
Q1
UN10KM
C1
10 mF
100 nF
D7
BZX55-5V1
R8
470k
10 mF
1
4
47k
11
VCC
GND
13
IC2
TX-433-SAW
R7
10k
R10
1
2
1N4148
4
5
6
D2
1N4148
R1
9V
D1
1N4148
FRONT
2
4.7k REAR
R2
LEFT
2
4.7k RIGHT
+
100 nF
2
0V
D3
D4
D5
16
ON
1
2
3
4
5
12
11
10
S3
VCC
A1
ST2
DOUT 15
A3
A4
A5
RS
IC1
MC145026
R11
100k
C2
4.7 nF
D6
7 D
7
9
D8
10
D9
R5
10k
11
CTC 12
R4
10k
IN-VCC>8V
GND
14 TE
3 S1
MS-500
1
S2
3
MS-500
IN-VCC<8V
A2
R3
10k
100 nF
10k
RTC
R12
47k
13
R6
10k
NO
ACTION
S1: FRONT
S1: FRONT
S2: RIGHT
S2: CENTER
9V BATTERY
(a)
NO
ACTION
VC1
5V
2.5V
TIME
VCC
'8 SEC
5V
POWER IS ON. LED D6 IS ON.
ALL DATA BITS TRANSMIT CONTINUOUSLY.
(b)
D6
D7
D8
D9
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
TIME
BITS A1 TO A5=ID CODE.
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).
www.ednmag.com
design
ideas
the new transmission is valid. Three correct transmissions are necessary. Therefore, the design needs a stable RX_OK
signal, and, for this reason D1, R1, R2, and
C1 create a time constant. The RX_OK
signal goes low only when the transmission stops or when the ID code is invalid,
which can happen if the emitter has no
supply and stops emitting or if another
transmitter is in the same area (Figure
3b).
The internal D latch, IC2, clocks new
output levels only when the circuit receives a new data packet. In this way,
VCC
VCC
Figure 3
100 nF
1
ANTENNA
10
TEST
15
10k
TEST
13
1
2
16
IC1
RF290-A5S
IN
OUT
GND
2
14
4
5
GND
11
ON
1
2
3
4
5
S1
1
V0
78LO5ACZ
VI
GND
100 nF
10
D9 12
A3
13
D8
A4
D'8
D7 14
D 15
D'7
D-IN
VALID-T
D1
1N4148
11
RX_OK
R1
1k
D'6
R1
R2C2
7
22 nF
GND
A2
47k
VCC
IC2
MC145027
6
+
A1
A5
3
47 mF
11
VCC
12
D'9
10
C1
180k
C1 +
10 mF
100 nF
R2
33k
9V BATTERY
(a)
D6
TIME
D7 TO D9
RECEIVED DATA
AT PIN 9 IC2
VALID-TRANS
(PIN 11 IC2)
RX_OK
'2.5V
TIME
TIME
D'6
LOW LEVEL FORCE
D'6 TO D'9 LOW
TIME
D'7 TO D'9
(b)
TIME
In the receiver (a), three correct transmissions must occur before Pin 11 of IC2 goes high (b).
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
Figure 4
LED
R1
{R}
2
I1
+ 60m
D1
LED
RED
D2
LED
RED
(a)
R2
{R}
D4
LED
RED
D5
LED
RED
R3
{R}
D7
LED
RED
D8
LED
RED
(b)
510V reveal a stanTo analyze a simple circuit (a), simulations determine the peak current through D1 for three resistance values. The results for R5
dard deviation of approximately 5 mA (b).
DAC in series with the op amp to attenuate the input signal and achieve the desired variable-gain factor. You calculate
the current output, IOUT1, from the DAC
as follows, where D0 through D7 are the
digital inputs to the DAC:
IOUT1 =
VIN D0 D1 D2 D3 D4 D5 D6 D7
+
+
+
+
+
+
+
.
R IN 2
4
8
16 32 64 128 256
VIN 255
RF.
R IN 256
In an actual application, keep the value of RF fixed for the maximum gain. By
varying the digital image pattern from 00
to FF, you can get the variable amplifier
gain according to your requirements.
Is this the best Design Idea in this
issue? Vote at www.ednmag.com/edn
mag/vote.asp.
www.ednmag.com
design
ideas
channels use a two-wire scheme that supplies switching current levels to the transistor. IC1 measures the difference in VBE
between these two currents and calculates
the temperature according to the following well-known relationship:
DVBE5KT/q x ln(N),
where K is Boltzmanns constant, q is the
charge of an electron, T is the absolute
temperature in Kelvin, and N is the ratio
of the two currents.
You can also use the CPU temperaturemonitoring channels to measure changes
in resistance, making them useful for
most resistive sensors, including photo
diodes, photo resistors, gas sensors, and
resistive-humidity sensors.
Is this the best Design Idea in this
issue? Vote at www.ednmag.com/edn
mag/vote.asp.
WIND SPEED
Figure 1
HUMIDITY
FREQUENCY
OUTPUT
RESISTIVEHUMIDITY
SENSOR
TEMPERATURE
D+
STANDARD
PNP
TRANSISTOR
D2
HUMIDITYCALIBRATION
TRIM POT
5V
13
PARALLEL-PRINTER PORT
(36-PIN CENTRONICS)
3
SDA
SERIAL
BUS
2
4
5
74HC07
SCL
18
FAN1
IC1
ADM1024
10 mF
GNDD
0.1 mF
5V
NTEST_IN/AOUT
17
14
VCC
13
VCC
10k
12
www.ednmag.com
design
ideas
Fax
Company
Address
Country
ZIP
www.ednmag.com
design
ideas
IP =
2 POUT
.
L P FOSC
1:0.08
LP=2.7 mH
1N5819
10V AT 90 mA
+
470 mF/16V
12V/1.3W
6
5
MTD1N60E
100 nF
6.8
RSENSE
NOTE:
THE TRANSFORMER IS AVAILABLE FROM ELDOR (ELDOR@ELDOR.IT, REF 2262.0058C)
AND FROM COILCRAFT (INFO@COILCRAFT.COM REF Y8844-A).
IC1 regulates the peak current and allows this 1W supply to operate from universal mains.
Figure 2
10.6
10.4
10.2
OUTPUT 10
VOLTAGE 9.8
(V) 9.6
9.4
9.2
100
150
200
INPUT VOLTAGE (V AC)
250
300
design
ideas
www.ednmag.com
design
ideas
el. Thus, 243 combinations (35) are possible. However, three-state DIP switches
are expensive, and 64 possibilities are
enough for many applications. If Pin 6 of
S3 provides a low level, A1 to A5 can be either low levels or unconnected. If Pin 6
of S3 provides a high level through R10, A1
to A5 can be either high levels or unconnected. This arrangement gives 64 combinations.
R11, R12, and C2 form the local oscillator. The output of IC1 at Pin 15 provides
Q2
2N2907
Figure 2
R9
10k
10k
4.7k
ANTENNA
VCC
D6
LED
15
Q1
UN10KM
C1
10 mF
100 nF
D7
BZX55-5V1
R8
470k
10 mF
1
4
47k
11
VCC
GND
13
IC2
TX-433-SAW
R7
10k
R10
1
2
1N4148
4
5
6
D2
1N4148
R1
9V
D1
1N4148
FRONT
2
4.7k REAR
R2
LEFT
2
4.7k RIGHT
+
100 nF
2
0V
D3
D4
D5
16
ON
1
2
3
4
5
12
11
10
S3
VCC
A1
ST2
DOUT 15
A3
A4
A5
RS
IC1
MC145026
R11
100k
C2
4.7 nF
D6
7 D
7
9
D8
10
D9
R5
10k
11
CTC 12
R4
10k
IN-VCC>8V
GND
14 TE
3 S1
MS-500
1
S2
3
MS-500
IN-VCC<8V
A2
R3
10k
100 nF
10k
RTC
R12
47k
13
R6
10k
NO
ACTION
S1: FRONT
S1: FRONT
S2: RIGHT
S2: CENTER
9V BATTERY
(a)
NO
ACTION
VC1
5V
2.5V
TIME
VCC
'8 SEC
5V
POWER IS ON. LED D6 IS ON.
ALL DATA BITS TRANSMIT CONTINUOUSLY.
(b)
D6
D7
D8
D9
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
TIME
BITS A1 TO A5=ID CODE.
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).
www.ednmag.com
design
ideas
the new transmission is valid. Three correct transmissions are necessary. Therefore, the design needs a stable RX_OK
signal, and, for this reason D1, R1, R2, and
C1 create a time constant. The RX_OK
signal goes low only when the transmission stops or when the ID code is invalid,
which can happen if the emitter has no
supply and stops emitting or if another
transmitter is in the same area (Figure
3b).
The internal D latch, IC2, clocks new
output levels only when the circuit receives a new data packet. In this way,
VCC
VCC
Figure 3
100 nF
1
ANTENNA
10
TEST
15
10k
TEST
13
1
2
16
IC1
RF290-A5S
IN
OUT
GND
2
14
4
5
GND
11
ON
1
2
3
4
5
S1
1
V0
78LO5ACZ
VI
GND
100 nF
10
D9 12
A3
13
D8
A4
D'8
D7 14
D 15
D'7
D-IN
VALID-T
D1
1N4148
11
RX_OK
R1
1k
D'6
R1
R2C2
7
22 nF
GND
A2
47k
VCC
IC2
MC145027
6
+
A1
A5
3
47 mF
11
VCC
12
D'9
10
C1
180k
C1 +
10 mF
100 nF
R2
33k
9V BATTERY
(a)
D6
TIME
D7 TO D9
RECEIVED DATA
AT PIN 9 IC2
VALID-TRANS
(PIN 11 IC2)
RX_OK
'2.5V
TIME
TIME
D'6
LOW LEVEL FORCE
D'6 TO D'9 LOW
TIME
D'7 TO D'9
(b)
TIME
In the receiver (a), three correct transmissions must occur before Pin 11 of IC2 goes high (b).
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
use a small core gap. You can use this approach in all buck regulators to fine-tune
an auxiliary output.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
11VSWR
,
1 + VSWR
The uncertainty in the total measurement stemming from the source and load
VSWRs is Uncertainty(1)520log10
(11g1g2) dB, and Uncertainty(2)5
20log10(12g1g2) dB.
As a result, you have a range of either
plus or minus uncertainty. At small
VSWRs, the plus and minus converge to
the same value. At higher VSWRs, the
plus and minus uncertainties diverge, so
you need to calculate both. As an example, consider a Hewlett-Packard ESG3000 microwave source operating at 900
MHz. Its VSWR is specified at 1.4 to 1.
Then, assume that you measure the
sources output power with a HewlettPackard E4412A power sensor that has a
specified VSWR of 1.15 to 1. If you input these figures into the VSWR Calc
program, you obtain the screen shown in
Figure 1. The Copy to Clipboard func-
tion transfers the VSWRs and the calculated data to the Windows clipboard so
that documenting the calculations is easy
in any Windows application. (The cardboard slide rule cannot perform this
function.) Figure 1 shows the clipboard
data of this example. The uncertainty in
the example is 10.100 to 20.102 dB. You
should know the measurement uncertainty, because it is relatively easy to obtain totally uncertain measurements at
high frequencies if the VSWRs are uncontrolled or unknown. The VSWR Calc
program is a Microsoft Visual Basic 32bit application that runs on Windows 95,
98, and NT 4.
A TO B B TO A GND
RxD
RxD
A TO B B TO A GND
1
6
2
7
3
8
4
9
5
1N4148
1
6
2
7
3
8
4
9
5
1N4148 RxD
RI
1
6
2
7
3
8
4
9
5
GND
GND
COM2
(a)
(b)
C0Mx
You can eavesdrop on RS-232 transmissions by using two COM ports (a); a simple modification (b)
adapts the method to PCs with only one COM port.
the program simplifies the time measurement, it preserves the original byte order and correctly reflects time relationships as long as the main program keeps
up with transmission speed. If you need
greater precision, you can easily modify
the program to record time stamps,
design
ideas
register is set. The interrupt-service routine reads the register, clears the RITD
flag, and stores its value in a buffer. Thus,
the interface is ready for another byte to
come from an arbitrary direction. The
main program can identify the data
source by checking respective bits. You
can download the C listings and executable files from EDNs Web site,
www.ednmag.com. Click on Search
www.ednmag.com
design
ideas
design
ideas
R2
100k
CERAMIC
RESONATOR
4 MHz
C1
0.1 mF
R3
510
R4
RED
LED
GREEN
LED
510
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
15V
OUTPUT
2
10k
+
SMPS1
6 TO 38V
10k
40V=4 mA
SCALE
+
215V
COMMON
+PIGGYBACK
(5V)
2
SMPS2
26 TO 238V
CONTROL
1k
2PIGGYBACK
(25V)
40V=4V SCALE
design
ideas
Figure 1
VIN m 60V
VIN
VBIAS
R1
4.7
VOUT
5V
IC2
LM4041EIM
3-ADJ
1
PGOOD
IC1
LM2597HVM
SS
C1 +
10 mF
63V
DELAY
VSWITCH
GND
6
FB
4
R2
3.9k
L1
68 mH
>1A
C2
220 mF
16V
Q1
4401
C3
10 nF
C5
47mF
16V
R4
10k
+
C4
10 nF
D1
1A, 60V
R5
10k
R3
12k
This inexpensive switching regulator derives its power directly from the phone line.
www.ednmag.com
design
ideas
390k
Figure 1
3
220V
50 Hz
+
IC1A
2
2
3V
10k
22k
0.47 mF
6
2
IC1B
5
+
10k
5k
P1
INTEGRATOR
ZERO-CROSSING DETECTOR
0.1 mF
0.1 mF
100k
100k
253k
0.1 mF
2 mF
16k
253k
2
IC
3 + 2A
16k
0.1 mF
2
IC2B
5
+
5.6k
5.6k
100k
100k
2
IC3A
5 +
7
1 mF
P3
2
IC3B
3 +
OUTPUT
10k
P2
10k
BANDPASS FILTERS
1 mF
PHASE-SHIFTER LEAD/LEG
An op-amp circuit uses only resistors and capacitors to generate a line-synchronized sine wave.
www.ednmag.com
design
ideas
IC2B. The center frequency of the bandpass filters matches the 50-Hz line frequency. The sine-wave output from the
filters passes through two phase shifters
to set the phase at either lead or lag. The
allpass-filter configuration comprising
IC3A and IC3B sets the phase of the refer-
VCC
5V
Figure 1
100 nF
47k
47k
IN
FSEL
IN
FSEL
OUT
FILTER
OUTPUT
100 nF
IC1
MSFS1
TYPE
GND
100 nF
OUT
100 nF
TYPE
FILTER
INPUT
IC2
MSFS1
GND
VSS
VDD
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.
www.ednmag.com
design
ideas
(continued on pg 152)
www.ednmag.com
design
ideas
steal its power from the bus via the Schot- with a 50% duty cycle. The sensor protky diode, D1. Because the circuit is sens- vides a capacitance that varies with water
ing water that is part of the electrical cir- level.
cuit, you should use an ac-coupled signal
Figure 2 shows one method of fabrito avoid polarization of the water and
plating of the electrodes. One approach
is to have the water in a circuit
DS2423
Figure 2
branch that is in series with
some capacitance. In this sensor circuit,
LMC555
the water is in the branch containing the
PERFORATED
BOARD
timing capacitance of a CMOS 555 timer,
TWIST AND
SOLDER LEADS
configured as a free-running oscillator
C
Figure 1
DATA
ONE-WIRE
BUS
D1
1N5817
22 mF
CK06-STYLE
0.1-mF
CAPACITORS
3
2
GND
VBAT
DATA
DS2423
6 A
IN
GND
1
4
TO PROBE
OUTER SHELL
(PIPE)
8
VS
6
THR
LMC555
2
OUT
TRG
GND
1
DIS
C20
C1
RC
1M
0.1 mF
0.1 mF
(PART OF PROBE)
A simple 555-type timer and a counter form the heart of a water-level sensor.
0.1 mF
C20
FRONT VIEW
SIDE VIEW
design
ideas
cating the sensor. You epoxy-bond a series string of N radial-leaded ceramic capacitors of equal value C underneath a pc
board. Twist the leads of adjacent capacitors, solder them together, and trim
them to serve as electrodes to contact the
water. The outer shell of the sensor, a
piece of 0.75-in. copper pipe, forms another electrode. If you place this assembly vertically in a vessel, the capacitance
between the terminals of the sensor (the
uppermost lead of C1 and the outer shell)
increases in steps as the water rises and
covers more of the capacitors. The water
effectively short-circuits the capacitors to
the outer-shell electrode. Because the capacitors are in series, the total capacitance changes according to: CTOTAL=
C/(N2n), where n is the number of capacitors with both leads covered by water. When you insert this expression in
the equation for the 555 oscillation frequency, you obtain fOSC5(N2n)/1.4RCC.
www.ednmag.com
design
ideas
IS
RS
LOAD
INPUT
0.025
I1
I3
I2
R1
R2
50
50
Q1A
Q1B
VCC
Q2A
VCC
7
6
IC1
10
C1
RG
0.01 mF
Q3A
+ 3
www.ednmag.com
Q3B
_ 2
4
R3
49.9k
R5
49.9k
R4
49.9k
R6
49.9k
Q2B
This circuit measures high-side currents without the need for auxiliary power supplies.
design
ideas
Box
insertion
loss (dB)
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
<0.1
0.1
0.2
0.5
Filter 1
insertion
loss (dB)
0.1
0.3
0.6
1.7
2.5
3.3
7.3
13
17.9
20
21.8
28.2
33.4
34.8
35.2
35.3
>35
>35
>34
>28
Filter 2
insertion
loss (dB)
<0.1
0.1
0.1
0.1
0.15
0.15
0.2
0.45
1.3
2.1
3.1
8.3
15.3
19.4
24.5
26.4
28.8
31.7
>34
>28
Filter 3
insertion
loss (dB)
<0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.2
0.25
0.25
0.25
0.4
1.3
2.9
6.4
10.2
14.5
19.2
23.5
>24
Filter 4
insertion
loss (dB)
<0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.1
0.15
0.2
0.2
0.2
0.25
0.4
0.9
2.1
4
9.9
20
>24
Figure 1
SECTION 1
fC=3.083 MHz
SECTION 2
fC=6.586 MHz
SECTION 3
fC=14.491 MHz
SECTION 4
fC=21.310 MHz
S4
S1
S2
S3
L1
L2
L3
L4
C1
4.7 mH
C2
C3
2.2 mH
C4
C5
C6
C7
0.68 mH
C8
1200
pF
1200
pF
560
pF
560
pF
270
pF
270
pF
180
pF
180
pF
1 mH
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
Figure 3
Figure 2
VIN
25 TO 45V
BUS
SHUNT
0.002
LOAD
R4
R3
200
R7
R10
10k
R5
200
IC2
TL431
Q1
2N2907
IC1
OP07
`
R6
820
R9
82k
R11
10k
1N4007
R8
820
1N4007
22
50A=5V
R2
330/5W
R1
R12
5k
0V
A modified current-monitoring circuit pulls the op-amp inputs below the positive supply voltage.
2W NPN
DEVICE
R2=
amplifier to reduce the output impedance, and the buffer can derive its supply across R2, which increases its operating supply range by 15V or more. One
limitation is that, in the case of a short
circuit, the current-proportional output
drops to zero.
Is this the best Design Idea in this
issue? Vote at www.ednmag.com/edn
mag/vote.asp.
design
ideas
IC in the circuit. The 567s oscillator directly drives an infrared LED on the optical-transmitter end. When the pulsed
light returns to the IR phototransistor, a
single-stage 2N2222 transistor amplifies
the resultant signal to drive Pin 3 of the
LM567. Thus, the circuit essentially directs the PLL to lock to itself, which
makes Pin 8 go low. The values of R1 and
C1 provide operation of approximately 3
kHz, and the filters set by C2 and C3 provide a clean output from the 567. Operation from 2 to 5 kHz works best. Lower
frequencies require more conditioning
and thus larger and more critical values
of C2 and C3, resulting in longer response
times and possible jitter. Higher frequencies result in lower efficiencies for the
cheap LED and phototransistor. However, tachometers may require higher frequencies. IR components are unnecessary. Two same-color LEDs (one for the
5V
Figure 1
C2
0.22 mF
C3
0.22 mF
R2
2.2k
470k
10k
LM567
0.1 mF
3
330
6
IR
PHOTO
TRANSISTOR
TIL414
0.1 mF
R1
10k
2N2222
4
IR LED
5
C1
0.047 mF
www.ednmag.com
design
ideas
15V
15V
Figure 1
200
V+
I/V
CONVERTER
AND OFFSET
ADJUSTMENT
8-BIT
DAC
1408
VCC
BC547
V0
CL
500
NI
LM723
CS
200
MOTOR
200
R1
2k
INV
COM
5V
DATA
1N4007
BRAKE CONTROL
2k
2k
BC547
mC
1000 pF
RELAY
SPEED FEEDBACK
FROM MOTOR ENCODER
BC547
10k
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.
www.ednmag.com
design
ideas
SHUNT R1
0.150
Figure 2
+
8
2
9V DC
1
IC1
3
MAX4172
10 pF
R3
100k
7
+
IC2
MAX4162
2 _
4
R2
3.32k
+
m1000V DC
IC3
HCNR200
2
Q1
2N3906
HIGH-VOLTAGE
LOAD
510
ISOLATION BARRIER
R4
100k
10 pF
3
7
+
IC4
MAX4162
2 _
4
9V DC
+
OUTPUT
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.
www.ednmag.com
design
ideas
= 0.01 R1 R 2 .
3
Three parameters let you
modify the circuit to monitor
OUTPUT
VOLTAGE
other maximum load currents
2
(V)
and output a different voltage
range. The maximum IC1 output current is 1.5 mA, so the
1
maximum allowed shunt voltage is 150 mV. Also, the maxi0
mum allowed photodiode
0.0
0.2
0.4
0.6
0.8
1.0
current is 50 mA. Choose an R1
value that produces 150 mV at
SHUNT CURRENT (A)
the maximum load current
that the circuit monitors. The output voltage versus shunt current is linear.
Then, choose an R2 value that
produces the desired corresponding todiode at the maximum desired output
Is this the best Design Idea in this
maximum output voltage at 1.5 mA. voltage, or
VOUT _ MAX
issue? Vote at www.ednmag.com/edn
Match R3 and R4, and choose a value that
R3
.
16
mag/vote.asp.
allows less than 50 mA through the pho50 10
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
10V
Figure 2
5V
0V
V (PWM EMISSION DRIVE)
10V
5V
SEL>>
0V
V (TRIGGER)
10V
5V
0V
V (RECEIVER SIGNAL)
10V
5V
0V
1.30
V (CONTROL)
1.35
1.40
1.45
1.50
1.55
1.60
1.65
TIME (mSEC)
The PWM emission-drive signal gains width (top panel) in response to a declining receiver signal (third panel down).
12V
12V
Figure 3
C1
0.01 mF
R1
10k
VCC
7
DISCHARGE
555
IC1A
2
TRIGGER
6
THRESHOLD
RESET
D1
D1N4148
3
OUTPUT
0.1 mF
CONTROL 5
THRESHOLD
3
270 pF
VCC
DISCHARGE
555
IC1B
2
TRIGGER
GND
470k
2.6k
4
RESET
7
0.01 mF
6
CONTROL
CONTROL 5
OUTPUT
TRIGGER
1M
GND
0.1 mF
11V
12V
1
12V
100k
3
D2
IR LED
2
2
100
V+
TLC272/ OUT
101/TI
V2
2
D3
PHOTODIODE
100k
C10
0.1 mF
330 pF
100k
RECEIVER SIGNAL
TO CONTROL
CIRCUIT
11V
5.5V
8
V+
IC3B
7 0.01 mF
TLC272/ OUT
101/TI
V2
6
2
4
5
10k
12k
Q1
FMMT3904
2200 pF
4
V+
IC2A
LM2902/ OUT
NS
2
V2
2
11
100k
LLSD103A/CYL
1M
1M
0.01 mF
1M
www.ednmag.com
design
ideas
plifier first amplifies the 10-kHz photocurrent from the IR photodiode. The
signal then goes through a second-stage
amplifier and then undergoes filtering
and peak detection to generate the quasi-dc receiver signal. IC2A then inverts the
signal to provide the PWM control. The
PWM emission drive drives the IR LED
in such a way that the IR photodiode receives medium-radiation intensities. Because the receivers signal amplitude is
proportional to the pulse width of PWM
4
IC1B
A26
5
6
A25
A24
A26
A25
A24
CS4
design
ideas
1
2
1
2
www.ednmag.com
design
ideas
SD_DATA
DATA 0
DATA 1
DATA 2
DATA 3
ROW
COLUMN
ADDRESS ADDRESS
SD_DQM
(b)
During the read cycle (a), the data bus is inactive during the initial portion of the cycle so the
data bus can carry address data. During the
write cycle (b), asserting the DQM command
causes the SDRAM to ignore the data line during this phase, which allows the data lines to
carry the column address.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
Figure 1
(b)
(a)
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).
Figure 2
VOUT
20.0
VAUX
10.0
0
210.0
GND
220.0
VIN
20.0
10.0
0
210.0
220.0
(a)
(b)
An auxiliary winding (a) lets you observe the flux image in the transformers core for both flyback and forward operation (b).
www.ednmag.com
design
ideas
VOUT
HV
Figure 3
VOUT
HV
NP
56
VAUX
10 mF
NP
DAUX
1N4148
NS
RVALLEY
NS
VAUX
RVALLEY
NA
NAUX
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 forwardlike controller (b).
branch starts to ring but at a lower frequency than in Figure 1a because the primary inductance, LP, is now inFigure 4
volved.
This natural oscillation exhibits the
following frequency value, where CLUMP
represents all of the circuits parasitic capacitances, such as COSS and the stray capacitance from the transformer.
1
FRING =
.
2 L P C LUMP
As with any sinusoidal signal, there are
peaks and valleys. When you restart the
switch in the valley, all the parasitic capacitance values are at their lowest possible levels. Also, the capacitive losses,
which are equal to 1/23CLUMP3
VDS23FSW, are small because the MOSFET is no longer the seat of turn-on losses, which removes the usual turn-on parasitics. That is the secret of QR operation.
You can easily observe the core flux
through an auxiliary winding (Figure
2a). Thanks to the coupling between the
windings, the auxiliary section delivers a
voltage image of the cores flux through
the following formula:
VAUX = N
d
.
dt
700
500
300
100
100
532 mSEC
536 mSEC
540 mSEC
544 mSEC
548 mSEC
When you properly adjust the time constant using RVALLEY, the switch restarts in the middle of the
valley.
in flyback operation, as the power winding, or in forward operation. The observed signals look the same but have different polarity (Figure 2b). Note that
both signals center about ground. The
problem lies in the fact that most PWM
controllers accept only the flyback polarity. Typical examples include the MC33364 and MC44608 (www.onsemi.
com). In battery-charger applications,
you usually wire the auxiliary winding
the one that self-supplies the controller
and gives the demagnetization signal
in forward mode. The reason is simple:
design
ideas
MC33364. A small offset from the internal reference to the demagnetization pin
brought by a 150-kV resistor and a typical RVALLEY of 10 kV have provided good
circuit operation.
www.ednmag.com
design
ideas
RECEIVED DATA
(LOGIC SIDE OF INTERFACE CHIPS)
design
ideas
8C
120
119
118
117
116
115
114
113
112
111
110
19
18
17
16
15
14
13
12
11
0
1
2
3
4
5
V
92.16
92.55
92.95
93.34
93.73
94.12
94.52
94.91
95.3
95.69
96.09
96.48
96.87
97.26
97.65
98.04
98.44
98.83
99.22
99.61
100
100.39
100.78
101.17
101.56
101.95
8C
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
V
102.34
102.73
103.12
103.51
103.9
104.29
104.68
105.07
105.46
105.85
106.24
106.63
107.02
107.4
107.79
108.18
108.57
108.96
109.35
109.73
110.12
110.51
110.9
111.29
111.67
112.06
8C
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
V
112.45
112.83
113.22
113.61
114
114.38
114.77
115.15
115.54
115.93
116.31
116.7
117.08
117.47
117.86
118.24
118.63
119.01
119.4
119.78
120.17
120.55
120.94
121.32
121.71
122.09
8C
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
5V
VCC
5V
VCC
1-mA ADJUST
1
0.1 mF
IN
IC1
MC1403
GND
OUT
500
2.5V
P1
R1
2.21k
0.1 mF
3
2
7
+
27k
1
4
V
132.42
132.8
133.18
133.57
133.95
134.33
134.71
135.09
135.47
135.85
136.23
136.61
136.99
137.37
137.75
138.13
138.51
138.88
139.26
139.64
140.02
140.4
140.78
141.16
141.54
141.91
142.29
GAIN ADJUST
PT100
5V
VCC
8C
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
649k
RTD
Figure 1
V
122.47
122.86
123.24
123.63
124.01
124.39
124.78
125.16
125.54
125.93
126.31
126.69
127.08
127.46
127.84
128.22
128.61
128.99
129.37
129.75
130.13
130.52
130.9
131.28
131.66
132.04
IC2
LTC1050
P1
7
+
IC3
LTC1050
OUTPUT
VEE
15V
VEE
15V
10.2k
ZERO ADJUST
1k
P2
0.1V
27k
274
This circuit provides accurate temperature measurements using a PT100 RTD element.
www.ednmag.com
design
ideas
INPUT SIGNAL
DELAY-LINE OUTPUT
INVERTER OUTPUT
ONE-SHOT OUTPUT
X5
UTD
TD41m
In
utd
X6
AND2
X8
INV
Out
2
Figure 1
29 mSEC
25 mSEC
21 mSEC
Figure 2
A1
PWMGEN
33 mSEC
37 mSEC
X1
SMALLPULSE
DELAY=70 nSEC
VPULSE
PWM
1
X3
SMALLPULSE
DELAY=20 nSEC SMP
X2
INV
SMALLPULSE
SMALLPULSE
VTRIGGER
High-voltage current-feedback
amplifier is speedy ......................................136
` 5
SINE
MODULATION
AC-power monitor
uses remote sensing ..................................138
K*A*B
B
VSAMPLED
4
+
CSH
10 pF
RDR
1M
SMP
Figure 3
www.ednmag.com
X5
PSW1
design
ideas
70 nSEC
S/H TRIGGER
MODULATED SIGNAL
S/H OUTPUT
100 nSEC
Figure 4
300 nSEC
500 nSEC
700 nSEC
900 nSEC
www.ednmag.com
design
ideas
5V
14
Figure 2
VDD 2
1
13
5V
100 nF
4
R3
1k
3
2
7
+
2
4
R2
6 10
11 A
12 C
100 nF
A1
A0
IIN
OUT
7
8
V`
IC1
MAX038
GND
GND1
DADJ
V1
FADJ
PDO PDI SYNC DGND DV` GND2 GND3 GND4
15
18
12
13
14
16
2
11
10
100 nF
SIGNAL
OUT
5 COSC
C1
22 pF
5V
10
REF
IC4C
25V
47k
1
1
B 9
6 C
10 nF
1 nF
25V
3
3.3k
100 nF
IC4B
LF356N
3.74k
100 nF
100 nF
C
IC4A VSS
19
5V
100 nF
17
9
20
100 nF
25V
100
IC4D
15V
5V
Q1
VP0106
R1
10
10
IC3C 9
100 nF
5V
C2
10 nF
11
4
5
25V
100 nF
TRIGGER
IN
2
10 nF
1k
V+
VCC
IC5A
74LS123
14
C
15
R/C
3
CLR
IC3B
100 nF
100 nF
5V
330
13
IC3D 12
IC3A
13
MIN-MAX
LOAD
3
S1
6
5
CTEN
100 nF
11
5V
16
IC2
74AC191
D0 D1 D2 D3
8 ON
12
1
2
3
4
CLK
14
UP-DN
8
5V
470
470
470
470
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.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
230V
0.01 mF
1 kV
Q4
2N2907
+
47 mF
400V
2.4
MTP
2N50E
10
VOUT
6.2V
10
MTP
2P50E
2.4
0.01 mF
1 kV
2N2222
2230V
47 mF
400V
www.ednmag.com
design
ideas
R7 may result in excessive dissipation. Do not change the value of R8, because it is optimized
for speed. Be cautious when
measuring and using this circuit, because it harbors lethal
voltages. The National Science
Council of Taiwan sponsored
this project.
www.ednmag.com
design
ideas
S2
VBAT
SET 3
S3
LED 2
S5
Low-battery indicator
has high efficiency ........................................92
LED 1
RESET
1, 2, 3,
AND 4
RESET
3 AND 4
LATCH 3
LATCH 4
SET 4
S4
LED 3
Figure 2
LED 4
design
ideas
5V
74VHC04
IC3A
IC3B
IC3C
IC3D
5V
0.1 mF
f2 1
2
3
0.1 mF
Figure 1
INPUT
SIGNAL
f1
5V
V+
GND
2 V+
GND
OUTPUT
SIGNAL
R1
47
IC1
MAXIM
1
IN1 MAX4644
3
0.1 mF
IC2
MAXIM
IN1 MAX4644
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.
www.ednmag.com
design
ideas
SPDT analog switch, IC1, which the circuit configures as the pullup/pulldown
driver. The input clock signal also drives
a high-speed CMOS inverter, IC3, to create a delayed clock signal, F2. The delayed
clock drives an SPDT analog switch, IC2,
which the circuit configures as the output driver.
Consider the steady-state condition in
which F1 is low and F2 is high. IC1s
COM pin and IC2s COM pin connect to
V_LOW, and a rising edge on F1 causes
IC1 to pull the output signal high. Be-
www.ednmag.com
design
ideas
ing requirement, you should use a precision-resistor network, such as the 664 series from BI Technologies (www.bitechnologies.com), for R1 and R3. The unique
input stage of the LT1636 allows you to
generate the VCC of the inverting op amp
from the rectified switching waveform
(using D1 and C1) of the LT1611 switching regulator. You adjust both LCD-bias
supplies by varying the 2-kV potentiometer at the feedback node of the
LT1611 regulator.
Is this the best Design Idea in this
issue? Vote at www.ednmag.com/edn
mag/vote.asp.
POSITIVE BIAS SUPPLY
D1
Figure 1
MBR0540
NEGATIVE BIAS SUPPLY
INPUT
4.2 TO 2.5V
SUMIDA CLQ61B-4R7
C2
R2
4.7 mH
0.1 mF
15
5
VIN
4
C1
3.3 mF, 35V
SPRAGUE
592D335X9035D2
D2
MMBD914LT1
LT1636
R1
100k
D3
MMBD914LT1
OUTPUT
218 TO ;20V
AT 300 mA
SW
SHDN LT1611
NFB
GND
C3
2
33 mF, 10V
SPRAGUE
592D335X9035D2
C5
1000 pF
R4
2k
C4
3.3 mF, 35V
SPRAGUE
592D335X9035D2
R3
100k
R5
196k
OUTPUT
218 TO ;220V
AT 300 mA
This LCD-bias supply provides better than 1% tracking of the positive and negative outputs.
dom numbers to prevent unwanted visitors from gaining entry into a protected
facility. You can use a rolling-code generator to produce random numbers. To
design
ideas
www.ednmag.com
design
ideas
design
ideas
www.ednmag.com
design
ideas
Q1
Q2
Q3
Q4
Q5
Q6
Q7
Q8
Q9
Q10
Q11
Q12
IC3
Period
1.17 msec
3.43 msec
6.866 msec
13.73 msec
27.5 msec
55 msec
110 msec
220 msec
439 msec
878 msec
1.758 sec
3.51 sec
Positive edge
3.51 sec
7.03 sec
14.06 sec
28.12 sec
56.25 sec
112.5 sec
225 sec
7.5 minutes
15 minutes
30 minutes
1 hour
2 hour
Period
7.03 sec
14.06 sec
28.12 sec
56.25 sec
112.5 sec
225 sec
7.5 minutes
15 minutes
30 minutes
One hour
Two hour
Four hour
VCC
16 VDD
IC1
16 VDD
IC2
8 VSS
8 VSS
Q1
Q2
Q3
P1 Q4
Q5
Q6
IC3 Q7
Q8
Q9
Q10
11
Q11
RES
Q12
VCC
10
START BUTTON
9V PP3
BATTERY
220 nF
BP1
Figure 1
VCC
9
7
6
5
3
2
4
13
12
14
15
1
10k
1k
Q5
2N2907
+
1
Q4
CD4040
10k
BZ1
BUZZER
VCC
2N7000
VCC
R1
680
1N4148
22k
12k
8
V
DIS
LD1
IC1
R MCI4555
3
Q
6 THR GND 1
TR
CV
5
2
P1
10k
P2
1k
22 nF
10 nF
Q1
Q2
P1 Q3
Q4
Q5
Q6
IC2 Q7
Q8
Q9
Q10
11
RES Q11
Q12
10
9
7
6
5
3
2
4
13
12
14
15
1
1k
1k
Q2
1N4148
Q3
1N4148
1N4148
D1
Q1
2N7000
D2
1k
2N7000
2N7000
CD4040
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
5V
70
75
80
V+
5 OR 12V
COOLING
FAN
TACHOMETER
5V
5V
5V
PIC16C84
10k
1 PWM_OUT1
NDT3055L
NM0S
2 TACH/A1N1
3 PWM_OUT2
4
5V
V+
5V
10k
TACH/A1N2
5 GND
6 V
CC
7
5V
TACHOMETER
5 OR 12V
FAN
10k
2.2k
IC1
THERM
8 FANFAULT
2.2k
SCL 16
SDA 15
INT 14
13
ADD
D2+ 12
D21 11
10
D1+
9
D11
3V
1 PA2
2 PA3
PA1 18
17
PA0
16
3 PA4
OSC1
4 MHz
4 MCLR
6
5
4
OSC2 15
5V
5 GND
14
RW RS
33
pF
VCC
33 pF
14 D7
6 PB0/INT PB7 13
13 D6
12
7 PB1
PB6
8 PB2
12 D5
11
PB5
OPTIONAL
9 PB3
10
11 D4
PB4
1610
ADM1030
(ADM1031)
NDT3055L
NMOS
8
7
2N3904
TEMPERATURE ZONE C
Figure 4
CHARACTER3
D3 4-LINE LCD
D2
D1
D0
3
VCC
2
GND
1
5V
5V
5V
470
FANFAILURE
2N3904
TEMPERATURE ZONE B
5V
470
OVERTEMPERATURE
The mC bit-bangs pins 2 and 3 to provide serial clock and data for IC1 and reads temperatures and fan speeds.
www.ednmag.com
design
ideas
FAN A1
to run at full speed. Fans C and D also automatically run at full speed. If the faulty
fan is replaced, all fans return to their normal operating speeds. FANFAULT signals
alert the system to fan failure.
FAN B1
FAN A2
FAN C
FAN B2
FAN
SPEED
FAN
SPEED
FAN
SPEED
TEMPERATURE
ZONE 3
TEMPERATURE
ZONE 4
IC1
ADM1031
IC2
ADM1031
FAN D
FAN
SPEED
FANFAULT
FANFAULT
THERM
THERM
FANFAULT A
Figure 5
FANFAULT B
TEMPERATURE
ZONE 1
TEMPERATURE
ZONE 2
TEMPERATURE
ZONE 5
TEMPERATURE
ZONE 6
design
ideas
Figure 1
MC10EL16
1 mF
NOISE
GENERATOR
MC10EL31
MC10EL31
A
47
B
D
51
CLK Q
390
OUT
CLK Q
OUT
47
VBB
51
CLOCK
INPUT
1 mF
390
1 mF
390
10 nF
10 nF
www.ednmag.com
design
ideas
www.ednmag.com
Frequency (MHz)
9
9.5
10
10.5
11
11.2
11.4
11.6
11.8
12
12.2
12.4
12.6
12.8
Frequency (MHz)
13
13.5
14
14.5
15
17.5
19
20
25
30
40
50
60 to 100
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
10V
R2
Figure 2
R1
500
2
500
+
5V
2
VIN
200
200
LOAD
MAX4250
ACCURATE
OP AMP
VOUT
RNF
MAX4014
GAIN-OF-2 DRIVER
Connecting a negative resistance in parallel with the load enables a precision op amp to drive 200V.
ance. JFETs are also fast devices, with garden-variety types specified in the hundreds of megahertz. On the flip side,
JFETs are difficult to exploit in a manufacturing environment because they have
widely varying dc specifications. With a
design
ideas
VS+
VS+
D
IN
R1
N-CHANNEL
JFET
G
S
OUT
2N5486
PHOTODIODE
INFINEON
SFH213FA
V S+
2
1M
VS2
3
100 pF
VS
Figure 1
Figure 2
R1
10M
3 +
2200 pF
49.9
VOUT
50
VS2
VS2
LT1806
+
4
VS+
LT1097
2
2
4
3 pF
10k
2N3904
0.1 mF
2.4k
33k
NOTE:
ADJUST PARASITIC CAPACITANCE
AT R1 FOR DESIRED RESPONSE
CHARACTERISTICS.
VS=65V.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
to prevent distortion in the output waveform. Figure 5 shows the running demodulator with the upper trace at the
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.
Figure 5
Fax
Company
Address
Country
Design Idea Title
Zip
Signed
Date
www.ednmag.com
design
ideas
design
ideas
20 mV R1
than 200 mV, the peak-to-peak loadtransient voltage increases, but the dcload regulation decreases.
Finally, choose COUT large enough for
stability:
Note that this expression is the typical, not the maximum, inductor resistance. In this case, the value of RL should
be approximately 200 mV, which allows
you to use a small inductor and causes an
approximate efficiency drop of only 3%
at maximum loads and much less at
lighter loads. Because the inductor time
constant, L1/RL, matches the feedback
time constant, R13CFF, the short-term
load-transient response equals the dc
load regulation (Figure 2). If RL is less
IL
COUT 2
TMIN ,
20 mV
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
1014
FARADS.
FOUT
You use the R3 and R2 trims to obtain calibrations at the higher and lower ends of the capacitance range, respectively. Thus,
after due calibration, a 1-Hz output of the VFC indicates the
unknown capacitance as 100 mF, and the maximum output of
the VFC, 150 kHz, indicates that the capacitance is approximately 0.6 nF. If you want to increase the measurable capacitance range, you use a VFC with a wider output-frequency
range, such as 0 to 1 MHz. In this case, you must take care of
the parasitic capacitances.
You can measure the output of Figure 1s circuit in a number of ways. One simple and direct approach is to use a simple
frequency counter or a low-cost DMM with a frequency-measuring feature. Thus, the simple VFC becomes a handy capacitance interface for your DMM to enable you to measure the capacitance. Alternatively, you can also use a programmable
counter, such as the Intel 8254, which is available in most PC
add-on cards. One more approach is to attach a simple 16-bit
counter, such as the CD4040 and CD4520, to your printer port
using the necessary buffering and control (Reference 1). In the
last two cases, you can exploit a special BIOS interrupt, INT1Ch
of your PC, without affecting its normal service routine to provide a measuring window of 1 second. During the measuring
window, the serial output of the VFC drives a counter. A the
end of the measuring window, the counter contents transfer
to the PC, and you manipulate the data to display the unknown
capacitance value directly on the PCs screen.
Reference
1. Use your printer port as a high-current ammeter, EDN,
July 6, 2000, pg 144.
Is this the best Design Idea in this issue? Vote at www.
ednmag.com/ednmag/vote.asp.
www.ednmag.com
design
ideas
VIN
RG
8
RG
AIN
VREF
0.1
mF
0.1
mF
AD6640
15
AIN
VOM
5
AIN
2.5k
R1
1k
2.5k
R2
1k
VOCM
2
+
AD6640
VREF
AIN
VOP
15
VCM
RF
design
ideas
VIN
500 mV p-p
10 MHz
VIN
500 mV p-p
10 MHz
VOCM
10 mV/DIV
VOP
VOM
Figure 3
Figure 4
www.ednmag.com
design
ideas
Figure 1
CD RECORDING
DECK
RECEIVER/
AMPLIFIER
LINE OUT
CD INPUT
L
R
NOTES:
1. ALL CAPACITORS ARE CERAMIC.
2. R5 IS A 100-kV AUDIO-TAPER
POTENTIOMETER; R1 IS A 10-kV LINEAR
POTENTIOMETER; AND ALL
OTHER RESISTORS ARE 1/8W, 5%.
3
IC2
LM3914
2
6
1k
R3
1k
VOLUMEUNIT
METER
JACKS
3.6 dB
11
3 dB
1.25V
REFERENCE 1k
12
2.3 dB
+
1k
0.01 mF 0.01 mF
51k
10
R4
430
51k
ON
POWER
ON
0.1 mF
13
1.6 dB
+
1k
14
0.9 dB
+
+
3
1k
2k
8
+
IC1A
LM358
2
2
4
15
9V
ALKALINE
1k
3.3V
1k
N/C
BAR/DOT
SELECT
20.9 dB
17
22 dB
18
23.2 dB
24.6 dB
+
1k
CW
+
1k
2
+
200k
20k
+
IC1B
6
2
1N914
RISE-TIME
ADJUST
1k
R2
820
0 dB
16
+
R5
100k
AUDIO
GAIN ADJUST
D1
7
CW
1N914
R1
10k
LINEAR
C1
1 mF
560k
200k
A high-resolution, average- (not peak-) reading volume-unit meter produces an accurate reading of loudness.
www.ednmag.com
design
ideas
Another feature of IC2 is that the resistors connected to Pin 7 externally program the LED current. The resistor values in Figure 1 result in an LED current
of approximately 8 mA. To conserve
power, the circuit leaves the bar/dot-select pin, Pin 9, open to select dot mode.
IC2 has some built-in overlap, so that at
least three LEDs are on at any time during typical operation of the meter, which
eliminates flicker and makes the meter
easier to view.
You use this volume-unit meter with
the peak-reading meter in the recording
deck. You should initially set up the
recording levels by finding the loudest
portion of the music and adjusting the
record level of the deck to approximately 4 to 5 dB below the peak clip level the
meter shows on the CD deck. The CDdeck makers advise against any clipping
because it causes distortion. Backing off
by 4 to 5 dB from the clip level allows
some headroom in case later-recorded
tracks have higher dynamic range (the
ratio of peak signal level to average signal
level). You should then set the gain-adjust potentiometer, R5, so that the 0-dB
LED lights on the loudest sound. Adjust
subsequent track-record levels to this
same level, based on the average loudness, to ensure that the decks recording
meter does not exceed the clip level.
Adjust R1, the rise-time adjust, so that
the meter will respond to average level
changes but miss fast peaks. This control
is user-adjustable, and the optimum setting depends on the music type.
The meters bandwidth is approximately 250 Hz to 2 kHz; the upper limit
sure transducer. The circuit takes advantage of the inverse relationship between
air pressure and altitude. The aim of this
circuit is to be small, lightweight, and
portable. Accuracy is not paramount; errors as high as 3%, such as a 300-ft error
www.ednmag.com
design
ideas
D2
10 mF
L1
10 mH
Figure 1
D1
10 mF
D3
5V
220 pF
IN
IC1
LT1307
SW
36k
5
1M
1.5V
AA CELL
VCC
FB
GND
4
100k
V125
10 mF
SHDN
2
LT100421.2
324k
1000 pF
5V
V125
3 +
LUCAS NOVASENSOR
NPC-1220-015A-3L
IC3B
LT1490
2 1
4
R1
56.2k
5V
1 1
2
1
7
1 IC2
2.43k LT1167
G421
`
8
` 3
4
3
15V
D4
169k
R2
10k
1N5711
38.3k
243k
V125
1IC
3A
LT1490
`
V125
15V
1k
549k
2
R3
59k
1
TO 4 2 DIGIT DVM
R4
50k
6
NOTES:
D1 TO D3: MOTOROLA MBR0520L.
L1: COILCRAFT D01608-103.
RSET
R5
14.3k
0 TO 2V4
0 TO 20,000 FT
To produce a reasonably accurate altimeter, conditioning circuitry inverts the barometric pressure of a micromachined pressure transducer and compensates for nonlinearities in air-pressure changes with respect to altitude.
www.ednmag.com
design
ideas
VCC
12V
RELAY
12V DPDT
Figure 1
C1
0.1 mF
2.2k
D2
1N4148
C2
100 mF
25V DC
NC
D1
1N4148
NO
100 pF
TO LOAD
4.7k
TRANSDUCER
CR4311-5
68k
3.9V
1M
IC1A
LM319A
+
D3
1N4148
12
4
10M
R1
5k
220k
SECONDARY
R2
10k
100k
9
10
220k
270k
+
IC1B
2
AC MAINS
SUPPLY
2.2k
10k
Q2
BC107
Q1
BC148
22k
R3
2.2k
IC1B is a precision, fast-acting comparator and controls whether the relay is active based on a preset reference-voltage level.
www.ednmag.com
design
ideas
VOUT=VIN
Even with a 40-mV p-p signal, the circuit in Figure 1 yields an accurate absolute value.
Circuit yields accurate absolute
values..............................................................125
ADC enables temperature-compensated
weigh-scale measurements ......................126
Single cell lights any LED ..........................128
Lowpass filter uses only two values ........130
Quickly discharge power-supply
capacitors ......................................................132
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
operating range of the circuit. The maximum voltage on the auxiliary input
is REFIN 2 or 2V. With a Betatherm
1K7A1 thermistor (www.betatherm.
com) and 200-mA excitation current, the
www.ednmag.com
design
ideas
L1A
L1B
Figure 2
L3A
L3B
L5A
L5B
L7B
C1A C1B
C7A C7B
C1C
C7C
C2B
C6B
C3A
C2A
C2C
C3B
C6A
C6C
NOTE:
ALL NORMALIZED INDUCTORS AND CAPACITORS EQUAL 1.
By judicious connection of components, this filter uses only one value each for the inductors and
capacitors.
References
1. Kurzrok, Richard M, Low cost lowpass filter design using image parameters, Applied Microwave & Wireless, February 1999, pg 72, and correction May
1999, pg 12.
2. Kurzrok , Richard M, Update the
design of image-parameter filters, Microwaves & RF, May 2000, pg 119.
3. Kurzrok, Richard M, Filter design
uses image parameters, EDN, May 25,
2000, pg 111.
4. Kurzrok, Richard M,Wideband filter uses image parameters, EDN, Oct 26,
2000, pg 174.
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
R1
150
Q1
BD135
5V
D5
5.6V
R6 +
1k
C2
1 mF/
10V
0V
design
ideas
2
sink. Inasmuch as the circuitry is inside
a nonventilated plug-in plastic
1.75
Figure 2
case, the junction temperature of
1.5
the BD135 attains temperatures greater
AT 230V INPUT WITH SWITCH-MODE CURRENT LIMITING
than 1008C.
1.25
AT 230V INPUT WITH LINEAR CURRENT LIMITING
POWER
Assuming that you need current lim(W)
1
iting, if you use a linear current-limiting
0.75
circuit, Q1 needs to dissipate nearly 2.5W
in the case of a short-circuited output.
0.5
The probable result is the melting of the
0.25
plastic case and the failure of Q1. To avoid
CURRENT-LIMITING
SWITCH MODE ZONE
that disaster, you can use switch-mode
0
current limiting. Figure 3 shows the cir0
25
50
75 100 125 150 175 200 225 250 275 300 325 350
IOUT (mA)
cuit of Figure 1 with some additional
components, and Figure 2 shows the
benefits of the limiting. Q1 and Q2 act as Without switch-mode current limiting, the circuit of Figure 1 can crash and burn.
one emitter follower, but with lower base
current. A small-signal Schottky diode,
FUSE
LINK
1N4001
BAT85, which receives its bias from R3
TRANSFORMER
and R2, provides an approximate 0.25V
W2
100 mF/ +
reference voltage for comparator IC1As
25V
AC IN
noninverting input. The inverting input
W1
reads the voltage drop created by the output current across R3. As long as the outQ2
1N4001 1N4001
1k
BD136
2.2k
put current remains less than 300 mA,
the output of the comparator is in
10k
Figure 3
1N4001 1N4001
a high-impedance state (openQ1
L1
BC337
collector), and the circuit works like a lin300 mH
+
2200 mF/
5V
ear regulator.
R2
R1
16V
If the output current reaches 300 mA,
+
1k
1k
10 mF/
1k
D1
10V
the comparators output switches low
1N5818
8
2
5.6V
and thus turns off Q1 and Q2. The current
1
0V
IC1B
2
LM393
1k
through L1 decreases exponentially and
3
IC1A
5
+
+
R
3
LM393 4
D2
7
flows through Schottky diode D1. As the
0.82
BAT85
6
2
emitter of Q1 is then at approximately
0.5V, the bias current in D2 decreases.
The voltage drop across D2 drops by ap- The addition of a few components protects Figure 1s circuit against overcurrent conditions.
proximately 10%. As a consequence, the
output current decreases until it reaches
270 mA. Then, the comparator switches
5.5
back to a high-impedance state,
5
LINEAR ZONE
Figure 4
turning on Q1 and Q2 and again
4.5
biasing D2 with R1 and R2. The current
4
in L1 increases exponentially until it
3.5
again reaches 300 mA. L1 is a 300-mH in3
VOUT
ductor using a powdered-iron core. Fig2.5
(V)
ure 4 illustrates the current-limiting acCURRENT-LIMITING
2
SWITCH-MODE ZONE
tion of the switch-mode circuitry.
1.5
1
0.5
0
0
25
50
75
100 125 150 175 200 225 250 275 300 325 350
IOUT (mA)
Switch-mode current limiting restricts current in Figure 3s circuit to about 320 mA.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
Figure 2
Figure 1
ADEL
ENCODER
OUTPUT A
ENCODER
OUTPUT B
BDEL
FORWARD ROTATION
REVERSE ROTATION
FORWARD
INTERRUPT
REVERSE
INTERRUPT
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
5V
VCC
4
VCC
SWITCHBUS
PR
2
74F74 D
FF0
3
6
CLK
Q
CL
5 Q
10k
RESET
PLAYER 1
RESET
CIRCUIT
10
PR
9
Q
74F74
FF1
11
8
CLK
CL Q
13
12
10k
PLAYER N
2
RESET
10k
PLAYER 1
9
R1
1N914
5V
VCC
470
RESET
CIRCUIT
LED1
S
13
Q
4013
FF1
11
12
CLK
Q
R
1N914
5V
VCC
LED2
PLAYER 2
5
D1
R1
1N914
1k
S
1
Q
4013
FF2
3
2
CLK
CLK
Q
R
4
LED1
9V
VCC
D2
5V
VCC
R2
1k
1N914
9V
VCC
LED2
10k
PLAYER N
DN
5
RN
10k
10k
Figure 2
D2
470
CAPTUREINHIBIT
10
5V
VCC
470
9V
VCC
10k
D1
R2
S
5
4013 D
FF0
3
CLK
R
4
5V
VCC
1N914
LEDN
5V
VCC
0.1 mF
PR
5
74F74 Q
FFN
3
6
CLK
CL Q
1
CAPTUREINHIBIT
10k
10k
1
SWITCHBUS
PR
5
Q
74F74
FF2
3
6
CLK
CL Q
1
9V
VCC
PLAYER 2
2
Figure 1
9V
VCC
5V
VCC
1
10k
0.1 mF
S
1
4013 Q
FFN
3
2
CLK
Q
R
4
DN
RN
1k
1N914
9V
VCC
LEDN
design
ideas
(SwitchBus) to logic 0. Because SwitchBus is now at logic 0, and applying a logic 0 to the Set input of a 4013 has no effect, any further switch closures by player
m or any other player now have no effect.
www.ednmag.com
design
ideas
photosensitivity at or near
5V
peak wavelength is low, and,
VCC
as a result, the creation of
Tx
hole-electron pairs is low.
5V
R7
GaAs-based emitters with
IC2
R8
270k
emission wavelengths of 940
C3 +
C2
R3
C1
100k
nm have relatively good sen0.1 mF
10 mF
3.3M
10 pF
R9
sitivity at or near their peak
Tx/Rx
R1
(GENERALD1
470
emission wavelength, thanks
Q1
8
PURPOSE
1N4148
3
5
+
1k
+
+
I/O PIN)
to high bulk absorption. FigR10
1
7
IC1A V
Rx
IC1B
ure 1 shows the relative reR2
1k
6
2
100
2 2
2
sponsivity and emis4
Figure 3
sion spectra for an
GND
R4
R6
LED
Infineon (www.infineon.
10k
10k
R5
com) SFH409 LED. This in470
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 halfpeak 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 UARTs 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 preamthis overlap, the LED is useful as a trans- op amp in this design is the high-speed plifier recovery. The preamplifier-recovducer. Figure 2 shows a half-duplex ap- dual OPA2350 from Texas Instruments ery delay is typically less than 10 to 20
Burr-Brown division (www.ti.com). The msec. Note that for 8051-class microconplication that exploits the LED.
Here, the LED links two embedded device has rail-to-rail inputs and outputs trollers with depletion-mode pullup resystems via a fiber-optic cable or a short- and a gain-bandwidth product of 38 sistors on their I/O pins, you should redistance, 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 2s 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
1. The Radiometry of Light Emitting
bedded systems at rates as high as 250 Figure 3, the resistor values produce a
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.
2. GE/RCA Optoelectronic Devices,
comparator. The LED driver drives the converts the preamplifiers output signals
LED during data transmission and un- to logic-level voltages. You set the input GE/RCA Corp, 1987.
3. Gage, S, D Evans, M Hodapp, and H
hooks the Tx pin from the LED during threshold of the comparator by adjusting
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 LEDs 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.
During data transmission, the transthe communication medium and to
minimize pulse-distortion phenomena mitter circuitry drives the preamplifier
in the communication link. R2 should be and comparator. To prevent locally trans50 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.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
13
Figure 1
VIN
+
1
+
V2
events. Figure 2 shows how you can derive the new device with adjustable hysteresis.
Listing 1 is the complete PSpice netlist
for the switch. The inputs V(plus) and
V(minus) route the switch-control signal
to the Bctrl behavioral element. (A b element in IsSpice4 becomes a value E
source in PSpice.) When the switch is
open (Bctrl delivers logic 0), the reference
node (node ref) becomes armed at the
highest toggling point (7V in Figure 2s
VT THRESHOLD=5
VH HYSTERESIS=2
2
S1
+
VOUT
VCC
10
3
VOUT
VOUT (V)
R1
10k
VIN
23
1
(b)
(a)
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
plus
+
Rconv3
10Meg
NodePlus
Figure 3
Rt
100k
8 +
Vc
S1
Figure 2
minus
Bref
Voltage
2
+
3
Rconv2
10Meg
NodeMinus
Ct
100 pF
R1
1k
VOUT
X1
SWHYSTE
Vt45V
Vh42V
1
+ Vcc
15
ref
Rconv4
10Meg
+
_
design
ideas
example). When the input voltage increases, it crosses the ref level, and Bctrl
switches high. Switch S1 closes and authorizes the current to flow in its terminals through RON. At this time, the Bref
source has detected that S1 is closed and
now modifies its reference node to the
second level (3V in the example). When
the input voltage drops, it crosses the 7V
level, but no action takes place, because
ref has changed to 3V. When the input
voltage finally crosses 3V, S1 opens and
applies ROFF between its terminals. Figure
3 shows the PSpice simulation results,
confirming the 4V hysteresis. Figure 4
shows how to build a simple RC test oscillator, using the PSpice-derived hysteresis. You can download the PSpice
netlist from the Web version of this article at www.ednmag.com.
TIME (mSEC)
Figure 4
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
WALL ADAPTER
15 TO 18V 300 mA
1N4003
IC1
78M12
BORNE2
+ C2
100 nF
D1
BATTERY INPUT
15 TO 18V
IN
OUT
GND
IN
C5
100 nF
BORNE2
C3
2
100 nF
1
J1
+ C1
100 mF
IC5
78MO5
12V
12V 1 AHR
5V
1k
OUT
GND
C6
100 nF
C7
+ 10 mF
C4
100 mF
D2
RED LED
5V
Figure 2
12V
A2
75V ANTENNA
A1
75V ANTENNA
IC4
MAV-UHF 479
100 nF
8
7
GND
4
VIDEO GND
ANT
VCC
GND-OUT
11
10
3
7
10
13
6
100 nF
VIDEO-IN
12V
VIDEO-GND
VCC
ANT
15
GND
RF-IN
IC3
MCA 479
EN
2
AUDIO-IN
21
19
17
20
18
12V
VIDEO IN
AUDIO-GND
K1
REL-G5V2
D3
1N4003
SOUND GND
16
15
14
SOUND OUT
2N7000
13
12
1k
11
10
7
5
3
1
8 SWITCHING LEVEL
6 SOUND IN LEFT
C8
4.7 mF
+
4 SOUND GND
C9
4.7 mF
2 SOUND IN LEFT
SCART
VIDEOCAMERA IN
R1
+
B
47k
IC2A
2
1
3 +
R2
47k
LM358N
R3
8 V+ 10k
IC2P
R6
10k
R7
2k
LM358N
4.7 mF
+
C10
2k
47k
R4
12V
2
3 P1
1
CH
47k
IC2B
61
7
5 +
VCC/2=6V
+
R5
10k
2.2 mF
4 V1
www.ednmag.com
design
ideas
DATA
8D
7D
Figure 2
8Q
7Q
6Q
6D
5D
VCC
HOST CLOCK
IC1A
R3
R1
REMOTE CLOCK
C1
1
IC2
IC1B
8D
7D
8Q
7Q
6Q
5Q
6D
4D
5Q
IC3 4Q
3D
2D
3Q
2Q
3D
2D
1D
1Q
1D
CLK
CLK
OC
5D
4D IC4 4Q
SYNCHRONIZED
DATA
3Q
2Q
1Q
OC
R4
This circuit automatically chooses between the rising and the falling edge on the host clock for clocking in data.
HOST CLOCK
Figure 3
DATA OUT
FROM HOST
CLOCK
FROM REMOTE
DATA IN
FROM REMOTE
DATA IN 0
DATA IN 1
DATA IN 2
DATA IN 3
XOR:A OUTPUT
DATA IN CLOCKED IN
ON RISING EDGE
OF HOST CLOCK
DATA IN CLOCKED IN
ON FALLING EDGE
OF HOST CLOCK
DATA IN 0
DATA IN 1
DATA IN 2
Clocking data on the wrong edge can result in metastability; the circuit in Figure 2 selects the right edge.
www.ednmag.com
design
ideas
Figure 1
R1
3.3k
R2
6.2k
_
IC1
OPA2227*
+
D1
10V
R8
1.5k
C2
+
R6
33 mF
47
R9
1.5k
6.8k
R10
1k
_
IC2
OPA2227*
10k
C3
+
15V
+
2
1k
RECEIVING-END
AMPLIFIER
6.8k
R11
10 mF
PANASONIC
WM-034CY*
PHANTOM
POWER
48V
1 mF
+
MICROPHONE
33 mF
2
1
10 mF
+
3.3k
+
IC3
INA163*
RG
3.3k
R7
33 mF 47
_15V
10 mF
*AVAILABLE FROM
DIGI-KEY
This microphone system derives its power from the receiving-end circuitry through the leads that carry the audio signal.
www.ednmag.com
design
ideas
Cooling time
(sec)
30
47
60
84
design
ideas
the temperature drops; you can determine it by noting the time required for
the transistor to return to within 18 of its
original temperature. The temperature
sensor injects a small current into the
base junction, so careful layout is important to keep noise off the DXP and DXN
lines.
If you mount the remote transistor in
an air channel, the use of twisted-pair
wire allows distances to 12 ft. Table 1
shows fan voltage (airflow) versus cooling time for a sensor placed approximately 12 in. away from a fan running at
full speed (12V), medium speed (8V),
low speed (6V), and zero speed. Soak
times as long as 30 minutes do not significantly alter the times. The circuit
draws approximately 200 mA when Q3 is
heating. If this power dissipation poses
a problem, you can lower the measurement frequency to hourly or even daily
cycles, because changes in airflow occur
slowly over time. You can also schedule
the measurements during times of low
system activity, when overall power use is
low.
Is this the best Design Idea in this
issue? Vote at www.ednmag.com/edn
mag/vote.asp.
3.3V
220
Figure 1
100k
0.1 mF
SMBDATA
SMBCLK
VCC
100k
IC2
MAX4626
7
10
2
1
Q1
FDN336P
ADD1
DXN
TWISTED PAIR
4
2200 pF
IC3
MAX4626
Q3
2N3904
IC1 DXP
MAX1618
ADD0
10
2W
5
1
AIRFLOW
100k
3.3V
1
8
I/O1
Q2
FDN335N
3.3V
10
IC4 I/O2
MAX1661
I/O3
3
4
ADD
5
This anemometer measures airflow by heating Q3 and then noting the time for Q3 to return to its original temperature.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
R2 = R X
LVP1UVN
, and
VS (L1U) + VP1VN
R 3 = R X1R 2 .
is 3.495 to 25.549 kV. You can obtain this range by using a parallel
connection of a 50-kV potentiometer and a 51-kV resistor that
is in series with a 3.3-kV resistor.
The oscilloscope screen in Figure 4 illustrates the performance
of the example circuit, in which
VIN is a 610V triangle wave. By adjusting the two potentiometers in
turn, we made the output waveform switch when VIN56V and
27.5V. Despite the interaction between the potentiometers, you can
fairly easily (with a little patience)
set the thresholds. Although the
circuit is not intended for precision applications, it does extend
the range of the garden-variety Schmitt
inverter and allows you to implement
positive and negative thresholds of several tens or even hundreds of volts. Moreover, the circuit allows VN to be positive,
provided that VP is sufficiently greater
than VN to avoid negative resistance values. You can obtain operation of greater
than 10-MHz frequency if you use suitable devices for IC1. The 74AC14 or
74HC14 yield response times of just a few
nanoseconds with a rail-to-rail output.
For best high-frequency performance,
use low resistor values, a shunt trimmer
capacitor across R1 to provide compensation, or both. Finally, use Schottky
clamp diodes as in Figure 3 to protect the
inputs of IC1 from overvoltage conditions.
Is this the best Design Idea in this
issue? Vote at www.ednmag.com.
Listing 1 (msec)
10
18
34
Evans (msec)
159
294
549
Gold-Radar (msec)
200
418
847
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
cilloscope measures is virtually all oscilloscope jitter. The loop allowed a generator with 19-psec rms jitter
Figure 2
to calibrate an oscilloscope
having 3.8-psec jitter.
The delay loop has some jitter, created by the conversion of amplitude noise
to jitter. Without the loop, generator-amplitude noise causes the leading edge of
each pulse to cross the oscilloscopes trip
point either early or late. In this way, amplitude noise translates to jitter. The following formula gives jitter versus amplitude noise:
JITTER =
AMPLITUDE NOISE
.
dV/dt
AMPLITUDE NOISE
(SIGNAL LOSS).
dV/dt
The transmission-line delay loop creates a delayed signal with near-zero jitter for calibrating the
oscilloscope.
250 V
(0.20) = 143 fSEC.
0.35V/nSEC
The loop jitter of 145 fsec is so far below the jitter noise floor of the oscilloscopes under calibration that you can
consider the delay loop as a zero-jitter
source. Because digital-oscilloscope jitter
is a function of the timebase setting and
Figure 1
www.ednmag.com
design
ideas
In most cases, this range produces satisfactory results. The same limitation applies to the number of data sources. If you
need more data precision or more data
sources, then you can use two or more
bytes at the expense of added program
complication.
Two approaches exist for the maximum/minimum values. In the first, the
microcontroller memory collects the received data and processes the data to de-
5V
5V
Figure 1
R2
100k
DATA 1
R2
100k
DATA 2
RESET
DATA 3
OSC1
DATA
INPUT
OSC2
IC1
MC68HC705KJ1
RESET
C1
0.1 mF
OSC1
3
ADC
CERAMIC
RESONATOR
4 MHz
DATA
INPUT
OSC2
IC1
MC68HC705KJ1
1
C1
0.1 mF
2
3
CERAMIC
RESONATOR
4 MHz
DATA N
7
(a)
(b)
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).
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
1
C2
0.1 mF
+
C1
10 mF
35V
3
IC1
OUT
MAX1615
5
4
3/5
SHDN
GND
2
debouncing) a 40-msec fixed delay between its outputs and the switch action.
To provide 0 to 10V outputs as required
by the motor controller, a single-supply,
rail-to-rail op amp, IC4, amplifies IC3s
output by a factor of two. The input common-mode range for this op amp250
mV beyond either supply railallows it
to generate 0 to 10V outputs like a mechanical potentiometer. The circuits low
quiescent current ranges from 86 mA for
a 0V output to 186 mA for a 10V output.
To even further lower this quiescent current, you can choose the 200-kV version
of IC3. Because the op amp is stable with
any capacitive load, it easily drives long,
shielded, multiconductor cable lines back
to the control room.
IN
8
4.7 mF
1
PB1
5
1
4
IC2
IN1 MAX6817 OUT2
VCC
OUT1
VDD
INC
IC3
U/D MAX5160
C5
3
7
GND 4
3 IN2
PB2
L
6
GND
2
3
NOTES:
ALL RESISTORS ARE 1%.
C1 AND C2 ARE TANTALUM CAPACITORS.
IN+
5 VDD
IC4
MAX4162
4 IN1
2 VSS
1
0 TO 10V
(WIPEROUT)
Figure 1
49.9k
49.9k
This solid-state potentiometer simulates a mechanical potentiometer and fits in the same space.
www.ednmag.com
design
ideas
VCC PIC
TRANSIL2
10k
1k
RX
10 nF
2
2N2287
10k
2
10
Figure 1
1
5.6k
1
2W
LINEA-A
22 nF
100 mH
2
LINEA-B
22 nF
1
INPUT FILTER
ACTIVE_TRANS
2N2907A
1k
MKT
PVT412L
PVT412L
2N2222
1k
TX
1 mF
TRANSIL1
1
100 mH
VCC PIC
1 mF
100
2
1 mF
1
VCC PIC
1mH
100
1
D1N4148
1
D1N4148
1 mF
1k
OUTPUT FILTER
2N2222
2
RELAY
1
2N2222
2
3
1
www.ednmag.com
design
ideas
www.ednmag.com
design
Edited by Bill Travis
ideas
PLUG AC MALE
IC1
F1
n this simple application of the
T1
LM7805
68HC68 microcontrollers se2A/230V
Figure 1
VI GND VO
220V
10V
rial-I/O utility, the goal is to
+
10 mF
configure a simple circuit, driven by any
50V
LPT parallel-printer port, which you can
BRIDGE
use as a remote I/O for a PC. You can inP1
100
dependently program each I/O line as eiSTROBE
100
DB25
ther an input or an output. The protocol
AUTOFEED
100
0O
in this application is an SPI (MISO/
100
ERROR
100
MOSI/SCK) type, using synchronous se01
100
rial communications. Figure 1 shows a
INITIALIZE
100
02
circuit that effects the connection with
100
SELECT IN
the PC and power supply for all I/O sig100
03
100
nals. A bus carries signals of the SPI pro04
100
tocol, and the LPT port can drive all the
05
CE (Chip Enable) signals. With this type
100
06
of bus, you drive as many as five CE sig100
07
nals, and each CE line can address four
100
ACKNOWLEDGE
68HC68 chips. Each microcontroller can
100
BUSY
drive eight I/O lines, with each line in100
PAPER END
dependently programmable. Thus, the
100
system can address as many as 160 I/O
SELECT
ports.
Figure 2 shows a simple way to select You address as many as 160 I/O signals with this simple connection of the LPT port.
the MISO signal. You can choose which
pin of the LPT port to use in receiving
1
GND
9
P2
the MISO signal. This circuit uses the
5V
PONT ACKNOWLEDGE
2
E1
GND MISO 0
ULN2003 as an amplifier to drive the
10
5V
PONT BUSY
E2
3
CS0
critical CE signal. By joining the
11
PONT PAPER END
F
i
g
u
r
e
2
E
3
SIP and CE signals, you can conCS1
4
12
PONT SELECT
E
figure a bus system in which all signals
4
5 CS2
13
go to the bus connector. You need an exPONT ERROR
SCK
E5
6 CS3
ternal power supply, because the LPT
14
MOSI
port cannot supply sufficient current.
7 CS4
15
MISO
You can connect as many as five I/O cir8 CS5
cuits. The circuit in Figure 3 contains the
DB15
5V
68HC68 chip with its CE and address seIC2
FEMALE
4.7k 4.7k 4.7k 4.7k
ULN2003A
lection. With jumpers E12 and E13, you
MOSI
16
SCK
15
CSO
14
CS1
13
CS2
12
CS3
11
CS4
10
5V
+
1 mF
OUT0
IN0
OUT1
IN1
OUT2
IN2
OUT3
IN3
OUT4
IN4
OUT5
IN5
OUT6
IN6
PRO1
GND
00
01
02
03
04
05
06
4.7k
4.7k
25V
5V
+1 mF
50V
ACKNOWLEDGE
BUSY
PAPER END
SELECT
ERROR
00
01
02
03
04
05
06
4.7k
5V
This simple scheme facilitates selection of the MISO signal in the SPI protocol.
www.ednmag.com
design
ideas
can select the chips address. It is important to emphasize that the system has no
check for an address conflict arising
from choosing the same address, with
the same CE, in more than one chip. If
the conflict arises, however, it does not
5V
16
VCC
15 D7
14 D6
13 D5
12 D4
JP1
READER 10
11 D3
10 D2
9 D1
5V
V3
68HCG8P1
IDO
ID1
MISO
MOSI
SCK
CE
D0
10k
1
2
3
4
5
6
5V
MISO
MOSI
10k
0.1 mF
SCK
CE
GND 8
E13
E12
5V
5V
2
3
4.7k 4.7k
5
4
6
4.7k 4.7k 4.7k
7
4.7k
8
4.7k
9
4.7k
1
P3
1
9
2
10
3
11
4
12
5
13
5V
R22
47k.
CE
E6
E7
E8
E9
E10
E11
CSO1D2
CS11D3
CS21D4
CS31D5
CS41D6
DB15
FEMALE
CS51D7
6
14
7
15
8
Figure 3
GND
5V
GND
5V
CS0 1D2
CS1 1D3
CS2 1D4
SCK
CS3 1D5
MOSI
CS4 1D6
MISO
CS5 1D7
P4
DB15
MALE
1
9
2
10
3
11
4
12
5
13
6
14
7
15
8
www.ednmag.com
design
ideas
VINT
Figure 1
MBR20100
100 nF
CBULK
220 mF/400V
KBU4J
COUTB
2.2 mF
COUTC
2.2 mF
100 mF
MUR160
10
1N4148
VAUX
2
3
VOUT
16.8V AT 4.5A
22k
8
1
10 mH
COUTA
2.2 mF
NCP1200P60
UNIVERSAL
MAINS
252U
1N4148
RG
VINT
VOUT
MTP3N60E
1k
10
SFH6115
18k
1N4148
1k
RUPPER
39k
1 nF
100 nF
18k
CVCC
100 mF
RSENSE
0.33
TL431
1 nF
RLOWER
6.8k
In this circuit, leakage inductance in the auxiliary winding can invalidate the controllers short-circuit-protection circuitry.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
2k
+
Figure 1
1N4148
220 mF
16V
+
1N5231
1000 mF +
10V
5.1k
0.1 mF
V+
CS
602k
BUF OUT
DIN
DOUT
SCLK
100k
22k
+ 32,768 Hz
1N4148
15 pF
1N4148
XT
10k
15 pF
1N5231
1 CD
3 TX
4 DTR
OSC1
4700 pF
INT IN
IC1
CREF1
MAX132
CREF`
100k
22k
1N5231
0.1 mF
20k
D1
LM385
1.2V
P1
REF1
P2
AGND
P3
IN LO
INPUT
ECO
IN HI
V1
DGND
1N5231
20k
+
REF`
P0
1N4148
2 RX
OSC2
INT OUT
+
20k
5 GND
6 DSR
7 RTS
+
1N4148
8 CTS
220 mF
16V
10k
+
1N5231
10 mF
10V
9 RI
You can use a PCs serial port to communicate with an 18-bit A/D converter.
Continued on pg 86
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
741-EQUIVALENT OP AMP
Circuit forms
low-frequency circulator ............................107
Use printer port as programmable
frequency generator ..................................108
Trace voltage-current curves
on your PC ....................................................112
Circuit makes simple
FSK modulator..............................................116
www.ednmag.com
Frequency
(kHz)
2
20
50
100
Forward
loss (dB)
0.5
0.5
1
4.1
Reverse
isolation (dB)
50.2
44.1
38
33
Forward
Reverse
Frequency
loss (dB) isolation (dB)
10 Hz to 100 kHz
0
Greater than 56
100 kHz
0.1
Greater than 56
500 kHz
0.5
45
1 MHz
0.9
34
1.6 MHz
0
29.5
3.3 MHz
3
25.5
design
ideas
20k
Figure 1
5V
9
VDD
10k
2
3
PRINTER
PORT
5 (CLR)
7 (DIN)
IC1
MAX5130
10k
8 (SCLK)
(OUT)
VOUT
10k
5
10 mF
IC3
AD537
15
330
14
3
1
8
IC2
OP07
+
+ (REF ADJ)
0.33 mF
D25
CONNECTOR
5V
13
6 (CS)
10k
10
R1 *
3.3k
R2
1k
11
12
**
C1
0.001 mF
* 0.1% MFR
** POLYSTYRENE
Turn your PCs printer port into a programmable frequency generator with this simple circuit.
www.ednmag.com
FOUT
design
ideas
These values ensure good linearity (typically 0.01%) between VOUT and fOUT. Potentiometers P1 and P2 adjust fOUT at the
lower and higher ends of the frequency
range, respectively. The C program in
Listing 1 obtains the desired frequency
from the user and calculates the required
output from the DAC to apply to the
VFC. It then works out the ACTUALDATA to send to the DAC for mode control.
The d2b routine converts the ACTUALDATA into 16-bit binary data. The program enables the DAC (CS) low and then
serially clocks the binary equivalent of
ACTUALDATA, starting one bit at a time
from the MSB to the LSB, to the data pin
of the DAC. With the LSB set at the data
pin, the low-to-high transition of the
clock latches the ACTUALDATA completely into the DAC and sets fOUT to the
www.ednmag.com
design
ideas
Figure 1
LPT1
14
15
16
D0
C2
17
18
19
POWER
C0
D1
D2
GND
D3
1
2 RN1 10
3
47 mF
R1
100
0.1 mF
DAC
5
6
GND D4
7
GND D5
8
21
D6
GND
9
D7
22
GND
10
23
GND S6
11
24
GND
12
S5
25
GND
13
IC2
LM4130
2.048V
20
VIN
Q2A
Q2B
XN2401
1000 pF
VREF
GND
2
1
3
IC3
LPV321
4
Q1
2SD601
5
5
VCC
IC1
LM3724
4.63V
3
4
RESET
MR
GND
1 AND 2
S1
MR
12 pF
10k
Q4
Q5
R7
31.6k
R8
10k
R9
3.16k
Q3
R6
100k
Q2
R5
316k
Q1
CLK
R4
1M
IOUT=1 mA TO 1 mA
5V COMPLIANCE
Q0
9
8
10k
R3
2.16M
IC4
74HC164
R2
100
10
11
12
Q6
IC5
74HC05
13
Q7
100
IC6
ADCV0831
CLK
3
VIN
5 DO
1
V+
6
CS
2
GND
100
10k
R10
1k
100
1
2
IC7
LMC7111
2
5
0.1 mF
C5
1000 pF
ADC
Remember the classic Tek curve tracers? You can easily configure something similar on your PC.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
210V
R1
1
2
IC1
MPY634KP
X+
OUT
12
1
2
X2
VO=XY/10Z
11
Z+
Y+
7 Y2
Z2
SF
R3
4.64k
10k
IC2
MPY634KP
12
X+
OUT
Z+
6
7 Y2
Y+
R4
15.4k
X2
VO=XY/10Z
10
10k
R2
Z2
VOUT=COS U
IC3
11
10
SF 4
+ L+
.
2! 4!
n!
The series works well for high values
of n or small angles. Generally, for n54, By manipulating Taylor-series coefficients, you can obtain better accuracy when generating cosines.
significant errors start to accumulate for
angles exceeding 6458. When you use a
12
Taylor-series expansion for better accuTAYLOR-SERIES ERROR
racies at larger angles, the number
10
Figure 2
THEORETICAL FIT
n becomes larger and demands
ACTUAL-VALUE FIT
more resources from the design. The
8
Taylor series for n54 has the form of
f(u)5a2bu21cu4, where a51, b50.5,
6
and c50.041667 (for angles in radians).
By using a least-squares curve fit to opERROR (%)
4
timize this function at n54, you can find
coefficients that allow you to obtain sig2
nificantly better accuracies over the deCOS = 11
www.ednmag.com
22
2120
290
260
230
30
60
90
120
ANGLE (8)
For angles greater than 6908, the revised coefficients in Figure 1 yield significant accuracy improvements in calculating cosines.
sired input range without raising the value of n to more than 4. The circuit in Figure 1 embodies this least-squares approach.
Choosing the resistor values for the cir-
design
ideas
R2 =
R3
b2MAX
and
R4 =
R3
c4MAX
I1 / I2 = e VBE q / kT .
EXPONENTIAL
CURRENT
2.5V
REFERENCE
2
IC3
R4
3.92k
24.9k
2
The use of matched transistors balR3
IC1
ances the first-order temperature coeffi2.49k
+
10k
cient but leaves a temperature-dependent
R1
0.01 mF
gain term, q/kT. Classic antilog circuits
909
Q1
Q2
Q3
CURRENT
use a thermistor in the drive circuitry to
CONTROL
correct this temperature dependency.
2.49k
However, if the control input is a fraction
R2
of some reference voltage, as when you
100
R5
470
use a manual potentiometer or a DAC,
100
you can achieve an exact temperature
0.01 mF
correction by adding a second reference
transistor. Figure 1 shows three of the five
transistors in a CA3046 array. Q1
2
Figure 1
IC2
is the exponential current source,
+
and Q2 is the conventional reference transistor. IC2 forces Q2s collector to ground
so its collector current, 1 mA in this ex- The use of a second reference eliminates temperature dependency in an antilog-ratio circuit.
ample, is simply the reference voltage divided by R3. Typically, this current equals through Q3 is a fraction of the main ref- 4 to 1, the output current has a fourthe maximum output required from Q1; erenceone-tenth in this example. De- decade tuning range thats independent
lower currents result from negatively spite the chip temperature, the base volt- of temperature. The circuit in Figure 1 is
driving the transistors base.
age of Q3 is exactly the value you need to dynamically stable, using either lowThe attenuator on the base of Q1, R1, generate a 1-to-10 current ratio. Because power or fast op amps.
and R2 reduces the effects of IC1s offset IC3s output supplies the reference voltvoltage. IC3 drives the base of Q3 via a sec- age for the potentiometer, the ratio of the
ond attenuator, R4 and R5, forcing its col- two attenuators defines the full-scale- Is this the best Design Idea in this
lector to ground. The reference current current-adjustment range. If the ratio is issue? Vote at www.ednmag.com.
www.ednmag.com
design
ideas
5V
6
MC68HC705KJ1
100k
100k
16
IRQ RESET
ON
START
OFF
15
OSC1
PA0
N2
N1
OSC2
RATE
14
CERAMIC
RESONATOR
4.0 MHz
0.1
mF
3
25 mSEC
PA1
PA4
PA5
11 PULSE
10 510
Nt
LED
Figure 1
Between pulses, the microcontroller can perform other tasks using the software in Listing 1.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
The circuit operates with pulse-width information and not duty-cycle values. The
sample-and-hold stage is an analogmemory element that reveals the dc-voltage equivalent for this pulse width.
3
6
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 reachspectively. 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 VDDs 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 termiomit the circuit in
W2
nal of each triac drives the
Figure 3, the transilamps, L1 and L2, retions in V3 and V4 can
OF 74HC14
L1
L2
Figure 3
D2
V5
spectively. Pushing S1
drive
an up/down
FROM
IC4
IC5
D4
changes the state of lamp L1;
counter that can per74HC74 2N6072B MT2
TR2
pushing S2 changes the state
form an auxiliary
V3
FLIPMT1
TO THE
FLOP
R5
of lamp L2. Thus, you have
control function for a
R2
FLIP-FLOP
R4
D3
C3
100k
500
RESETS
2N6072B MT2
100k
1 mF
independent control of
device that the ac line
TR1
both lamps on a single powpowers. If you insert
V4
MT1
FLIPC4
FLOP
er line. In this application,
an additional conR3
1 mF
500
you want to keep each
ventional switch in
W1
lamps terminals safely conseries 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 rewire.
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 powThis situation is unacceptable because inverting Schmitt triggers IC4 and IC5, ered device is not an inductive load bethe 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.
2
6
www.ednmag.com
design
ideas
Figure 2
design
ideas
1
2
3
VCC
3
IC4
2 RESET
MAX
809L 1
GND
7
8
9
18
RA1
17
RA0
16
OSC1
RA2
RA3
RA4
DIP
SWITCH
VSS
OSC2
VCC
CRYSTAL
4 MHz
33 pF
MCLR
IC1
PICI6F84
15
1
33 pF
2
14
RBO/INT
VDD
RB1
RB7
RB2
RB6
RB3
RB5
RB4
VCC
13
12
11
10
6
7
1M
VCC
10k
VCC
1
DIN
VCC
DOUT
3
4
SCLK
CS
VCC
IC2
MAX3100
10k
5
Figure 1
SHUTDOWN
6
7
1M
10k
1M
1M
8
VCC
7
IC3
B
2
6
RE MAX3088
A
3
DE
5
GND
4
DI
1
1M
VCC
14
IRQ
X2
1M
VCC
13
TX
12
RX
11
RTS
10
CTS
9
X1
SHUTDOWN
GND
1M
CRYSTAL
(3.6864 MHz)
RO
7
6
33 pF
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 network address.
www.ednmag.com
design
ideas
0.01
0.015
0.02
0.025
`
0.0142
0.0158
0.0166
0.0171
0.0185
0.01
0.015
0.02
0.025
`
0.0075
0.0083
0.0086
0.0087
0.0088
design
ideas
www.ednmag.com
design
ideas
Voltage
at 3288F (mV)
11.71
18.82
19.89
23.91
Voltage
at 10088F (mV)
10.19
17.3
18.37
22.39
5V
Figure 1
200
200
200
200
R1
182
R3
210
R5
301
R7
501
8558F
5508F
NC
COM
10.2 mV
NO
17.3 mV
9008F
NC
NC
COM
NO
10708F
NC
COM
NO
COM
N0
VOUT
18.4 mV
22.4 mV
R2
1.3
R4
1.3
R6
1.3
R8
1.3
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
Circuit compensates
optocoupler temperature coefficient
J Michael Zias, Acme Electric Corp, Cuba, NY
hen using an optocoupler in a
10k
6
1
linear application, you
12V
5
8
Figure 1
should consider its gain
10k
4
3
2
+
100V
drift with temperature. Traditional sin1
IC1
IC2
LM358
H11AV1
402
gle- and dual-transistor-output devices
2 2
4
have a notable gain drift with temperature. In recent years, some temperaturecompensated optocouplers have appeared. 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
VOUT
4
drift of one device cancel the drift of the
IC3
402
H11AV1
other. The circuit in Figure 1 accom402
plishes that task by using a differential
amplifier with the drift treated as a common-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 simultaneA
a
1
INPUT
ously monitor the output of each optoGAIN = a
=
,
a
OUTPUT
1
1
+
Ab
b
coupler and the differential amplifier.
A
1+
Ab
Apply a heat gun and observe the individual outputs change rapidly
where a/b is the ideal closed-loop gain
Figure 2
while the amplifier output moves
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
manufacturers. With optocouplers of the op-amp inputs equal. The input and outMethod offers fail-safe
same type, you can observe good drift put signals for this analysis are currents,
variable-reluctance sensors ........................96
cancellation. Parts from the same manu- which precision resistors translate to voltCircuit 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
To examine the method in control-sys- empirically by applying a pulse at the inAnalog switch expands I2C interface ......102
tem terms, consider Figure 2, which put and observing the rise time and overCircuit safely applies power to ICs ..........104
shows one amplifier, a, in the forward shoot at the output.
path and another amplifier, b, in the feedSimple circuit forms
Is this the best Design Idea in this
back path. Also consider the following
peak/clipping indicator ..............................104
issue? Vote at www.ednmag.com.
equation:
www.ednmag.com
design
ideas
LINE
12V
115V AC 15A
R3
20k
1%
22k
1W
Figure 1
R2
50k
20k
22k
1W
Q2
2N3096
Q1
2N3096
10k
5.1k
Q3
2N3096
20k
1%
D1
1N4002
D2
AC-LINE
INPUT
R8
121k
1%
R4
54.9k
1%
R1
2Ok
45.3k
1%
C1
100 mF
20V
0.1 mF
NEUTRAL
T1
1k
560k
2:50
1k
100k
C2
2
O.1 mF
16V
0.047
mF
Q4
2N3094
10k
R9
75k
1
0.01 mF
12V
R6
100k
8
5
6
IC1
220 pF LM311
2
+
1
4
3
IC2
6 TLC555CP 5
100k
D3
1N4001
D4
1N5242
12.1V
0.1 mF
53.6k
1%
8
51k
68k
R7
51k
D5
1N4148
24k
Q6
2N7000
7
1N4148
C4
22 mF
16V
C3 +
10 mF
16V
1M
This soft-start circuit protects the load from large inrush currents.
www.ednmag.com
AC
LINE
0
POWER TO LOAD
IC2
PIN 2
IC2
PIN 3
12
0
12
VOLTAGE
ACROSS R9
0
IC5
MOC3052
1
MAC223-8FP
340
4
0.01 mF
R5
30k
VOLTAGE AT Q5
COLLECTOR
12
11
0
MOV
6
Q5
2N3094
150
LOAD
INPUT
www.ednmag.com
47
The circuit in Figure 1 provides soft-starting by adjusting the phase angle of the power applied to
the load.
design
ideas
10 TO 24V
Figure 1
STEEL
ROTATING
TARGET
5V
1
4
G
2
5V
12
VCC
16
A1
C1
0.1 mF
IN
OUT 3
IC2
MAX1615
SHDN
5/3
5V
R2
1k
C2
4.7 mF
GND
2
VOUT
IC1
MAX3095
L1
R1
47k
1
7
6
8
Y1 3
B2
10V
A2
GND
Y2 5
A3
Y3 11
9 B3
14 A4
15
B4
Y4 13
10
BAR
MAGNET
B1
Q1
R3
1k
VOUT
Q2
GND
www.ednmag.com
design
ideas
Figure 2
(a)
CHANNEL 1
FREQUENCY
4.958 Hz
CHANNEL 1
FREQUENCY
752.4 Hz
CHANNEL 3
PEAK TO PEAK
270 mV
CHANNEL 3
PEAK TO PEAK
5.70V
(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.
www.ednmag.com
design
ideas
CLAMPED
VIN (V)
7
3
13
17
VOUT (V)
5
3
13
15
Mode
Clamped
Linear
Linear
Clamped
2
INPUT
210
OUTPUT
CLAMPED
25
0
22 0
10
24
26
28
210
design
ideas
VDD
IC2
ADDRESS: 0250
Figure 1
SDA
SCL
ADDRESS: 0251
SDA
SCL
ADDRESS: 0252
SDA
SCL
2250k
AUXILIARY I2C
BUS 1
VDD
IC3
ADDRESS: 0250
IC1
MAX4562
COM3
NO3
22
50k
SDA
SCL
ADDRESS: 0251
SDA
SCL
ADDRESS: 0252
SDA
SCL
AUXILIARY I2C
NO1A
COM1
BUS 2
NO1B
VDD
ADDRESS: 0250
COM4
NO4
SDA
SCL
ADDRESS: 0251
SDA
SCL
ADDRESS: 0252
SDA
SCL
NO2A 2250k
AUXILIARY I2C
COM2
NO2B
BUS 3
ADDRESS: 0298
SDA
MICROCONTROLLER
WITH I2C INTERFACE
SCL
A1
A0
VDD
ADDRESS: 0291
225k
SDA
SCL
ADDRESS: 0292
SDA
SCL
ADDRESS: 0293
SDA
SCL
SDA
MAIN
SCL
I2C BUS
This I2C-controlled analog switch expands by three the number of devices connected to the bus.
www.ednmag.com
design
ideas
SAFE
upervisory circuits normally
(3.1 TO 5.5V)
VIN (<30V)
monitor a microprocessors
Figure 1
R4
R3
supply voltage, asserting reset
Q2
4k
1M
to the IC during power-up, power-down,
5
NDS8947
VCC
and brownout. In this way, the circuit enR1
IC1
sures that the supply voltage is stable be1M
LM3722
Q1
fore the microprocessor boots, thus pre4
3.08V
MR
2SD601
venting code-execution errors. Many
RESET 3
Q3
analog and digital ICs also need a well2SD601
GND
R5
R2
1M
behaved start-up of their supply to avoid
1, 2
120k
latch-up and logic-state errors. In addition to low-supply conditions, low-voltage CMOS circuits need overvoltage protection from any supply runaway. The This LM3722 configuration connects only safe voltages to sensitive ICs.
additional components in Figure 1 exAdjustment of R2 for an exact overvolttend IC1s supervisory functions to conTABLE 1VSAFE HYSTERESIS
nect VIN to VSAFE only when VIN is within
age value nullifies VBE1s accuracy error.
OVER TEMPERATURE
set limits. This function protects circuitTable 1 shows typical setpoints over temry at the VSAFE terminal from power-up
perature. If you need further error reVSAFE
088C 2588C 5088C
transients and overvoltage damage. As a
duction, you could exchange Q2 for a
On (V) VIN increasing 3.2
3.2
3.2
comparator and voltage reference. For
supervisory circuit, IC1 asserts a reset sigOff (V) VIN increasing 6.1
5.5
4.9
nal that is delayed by more than 100 msec
VIN within the set limits, 3.1 to 5.5V, the
On (V) VIN decreasing
6
5.4
4.8
circuit draws only 16 mA. A total of 5 mA
whenever VIN decreases below the preOn (V) VIN decreasing 3.1
3.1
3.1
cisely trimmed reset threshold. You can
flows into both the R1 and R4 nodes, and
custom-select the reset threshold from is Q2s pullup resistor; R5 limits Q3s base 6 mA flows into R3s 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 typiovervoltage threshold according to the cal IC1 current of 6 mA through R3 insignal.
This application uses IC1s 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 IC1s MR input mV.
ensures that VIN is stable before applica- provides Q2s pullup. Typical VBE1 accution to VSAFE. Q3 inverts and isolates IC1s 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.
positive peaks to pass while disconnecting the op amp from the hold capacitor,
C1, on negative peaks. Also, because the
diodes have an OR connection, the circuit detects only the larger peak from the
left or right stereo input. The values
shown in Figure 1 are for standard 200www.ednmag.com
design
ideas
www.ednmag.com
design
Edited by Bill Travis
ideas
www.ednmag.com
design
ideas
V
1 OUT =1G =
VIN
R2 + R3 +
R 2R 3
R4
R1
RA=100k
FET-CONTROL
VOLTAGE
(V)
0
210
220
230
240
0.076
.
0.076 + R 3
GAIN
design
ideas
www.ednmag.com
design
ideas
Figure 1
Figure 2
Components all connect to
one side of the pc board, and
a cast-aluminum cover provides shielding.
6-32 SCREW
FOUR PLACES
CAST-ALUMINUM ENCLOSURE
20V
20V
20V
20V
20V
2k
20V
71.5k
71.5k
0.01 mF
2k
Q1
2N3904
0.01 mF
R1
200
C1
5.5 TO 30 pF
Q2
2N3904
1N4148
20V
Q3
2N3906
100k
Q4
PN2222A
10
C2
100 pF
1k
CAPACITOR
UNDER TEST
1N4148
20V
20V
NOTE:
ADJUST TRIMMER CAPACITOR
FOR GOOD WAVESHAPE/AMPLITUDE.
TO OSCILLOSCOPE
DIFFERENTIAL INPUT
0.1 mF
10 mF
GROUND
Test the pulse characteristics of bypass capacitors using this simple circuit.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
t1 = 1R 2C 2 ln
0.7 VDD
= 1R 2C2 ln 0.7.
VDD
A
B
t2
C
t1
1R1C1 ln 0.7.
By manipulating the resistor and capacitor values in Figure 1, you can program t1 and t2.
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
www.ednmag.com
design
ideas
3
Q3
XN02401
Q4
RAMP OUTPUT
100k
1
1
5
C1
0.1 F
Q2
3
VIN
0 TO 4V
DC
A
6
Q1
TO MICROPROCESSOR
GENERALPURPOSEI/O PIN
R1
100k
XN04601
A
With two transistor arrays and three discrete components, you can configure an analog front end
for a microcontroller.
C1VL
K = VIN ,
dT
where VL is the voltage level of the microcontrollers zero-to-one conversion, K
is the scaling factor that relates to the
voltage-to-current conversion of the input stage and timer resolution, and dT is
the time count of the conversion cycle.
Because C1VL is also a constant for a given circuit, you can combine it with K to
form a single conversion constant of K1.
Hence, you can reduce the equation to
K1/dTVIN.
In this case, the test code was written
for Microchip Technologys (www.microchip.com) PIC16F84 microcontroller.
This device has a measured VL of 1.28V;
the counter has a resolution of 1 sec. Its
probably best to empirically determine
the factor K1. Set up the counter resolution as desired, allow the microcontroller
to make and display that conversion time
or send it through a debugger, and, given that you have an exact VIN, K1 is then
easy to determine. In this case, K1 turned
out to be 2V5700 sec11,400.
The constant K1 serves to convert the
raw timer count to a voltage. To obtain
high resolution, you normally use floating-point math. If you need to display the
value, floating-point math might be apwww.ednmag.com
design
ideas
TEST
E
B
Figure 1
S1
RT
1
T
TO C OF DEVICE
UNDER TEST
TO BATTERY
Figure 2
E
B
0V
E
NOTES:
TRANSISTORS (T) ARE BC108, BC547, 2N3904, 2N2222...
CAPACITORS (C) ARE 100 nF.
RC=470, RB=39 k AND RT=3.9 k.
LEDs ARE PREFERABLY RED.
This simple tester allows you to test the polarity and function of a
transistor.
TO CIRCUIT
(a)
TO RT
(b)
A DIN connector (a) allows you to easily connect transistors; a DPDT switch
provides various testing options (b).
www.ednmag.com
design
ideas
high or low configures the chip for charging a 4.2 or 4.1V battery, respectively. To
protect the battery, IC1s final charging
voltage has 0.5% accuracy. The CHG terminal allows the chip to illuminate an
LED during charging.
IC2 is a step-up dc/dc converter that
boosts VBATT to 5V and delivers currents
as high as 450 mA. Its low-battery detection circuitry and true shutdown capability protect the lithium-ion battery. By
disconnecting the battery from the output, true shutdown limits battery current to less than 2 A. An external resistive divider between VBATT and ground
sets the low-battery trip point. Connect-
ing the low-battery output, LBO, to shutdown, SHDN, causes IC2 to disconnect its
load in response to a low battery voltage.
The internal source impedance of a lithium-ion battery makes IC2 susceptible to
oscillation when its low-battery-detection circuitry disconnects a low-voltage
battery from its load. As the voltage drop
across the batterys internal resistance
disappears, the battery voltage increases
and turns IC2 back on. For example, a
lithium-ion battery with 500-m internal resistance, sourcing 500 mA, has a
250-mV drop across its internal resistance. When IC2s circuitry disconnects
the load, forcing the battery current to
www.ednmag.com
design
ideas
VBATT
1
VBUS
D
R1 + R 2
,
R2
USB
CONNECTOR
D+
4.7 F
SELV
316
R 2 =
R 2R 3
.
R2 + R3
LITHIUM-ION
BATTERY
500 mA
100 mA
10k
5V
VBATT
22 H
+
R1
604k
BATT
LX
OUT
+
47 F
GND
100k
47 F
0.1 F
LBI
R3
1.3M
R2
249k
IC2
MAX1747
FB
LBO
SHDN
5V
3.3V
IN
10 F
OUT
SHDN
IC3
MAX1837
22 H
LX
+
150 F
GND
where
SELI
CHG
CHARGING
LED
FB
2.2 F
IC1
GND
MAX1811
EN
GND
BATT
IN
R1 + R 2
,
R 2
Drawing power from a USB port, this circuit generates 5 and 3.3V supply voltages for portable
applications.
www.ednmag.com