Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

EDN Design Ideas 2006

Download as pdf or txt
Download as pdf or txt
You are on page 1of 142

EDITED BY BRAD THOMPSON

AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

CMOS inverters convert RF


to digital signal

D Is Inside

Francis Rodes, Eliane Garnier, and Guillaume Zingone,


ENSEIRB, Talence, France

84 Virtual instrument determines


magnetic cores B-H-loop characteristics

Applications ranging from frequency counting and synthesis


to sensor signal conditioning require
conversion of RF signals to digital-logic
levels. In such situations, designers typically use a high-speed voltage comparator to perform the RF-to-digital
conversion. Due to their high gain,
voltage comparators typically exhibit
good sensitivity but also present some
drawbacks. High-speed comparators are
expensive, difficult to find off the shelf,
and prone to rapid obsolescence.
For frequencies as high as 180 MHz,
the circuit in Figure 1 offers an attractive approach. The IC in the design, a
74LVCU04 very-high-speed CMOS
hex inverter, is available off the shelf
and from many sources. Furthermore,
many applications may already include
three unused inverters. A single inverter, IC1A, operating as a linear preamplifier, forms the converters input

82 Instrumentation amplifier
extends DSO

stage. Biasing resistor R3 forces the


inverter into its linear region by equalizing its input and output voltages at
one-half of the power-supply voltage,
VO1VI1(VDD/2). Because the ac gain
of a very-high-speed CMOS inverter is
relatively low at RF (VO1/ VI1) 7, additional gain stages follow the preamplifier. One self-evident approacha cascade of additional inverterspresents
poor stability at low frequencies and at
dc when no RF source is present.
The circuit in Figure 1 eliminates
this drawback thanks to a topology
based on a Schmitt trigger and amplifier circuit, IC1B and IC1C, that includes
a frequency-dependent positive-feedback network comprising R1, R2, CD1,
and CD2. Depending on the input frequency, the network exhibits two
behaviors: At high frequencies, the
decoupling-capacitor pair, CDC1 and
CDC2, short-circuits feedback resistor

 What are your design problems


and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
R1, canceling the time constant introduced by the positive-feedback network, R1 and R2, and the input capacitance of inverter IC1B. Consequently,
at high frequencies, the three inverters,
IC1A, IC1B, and IC1C, behave as three
cascaded, high-speed amplifiers that
allow the best performance in inputsignal bandwidth. At dc and low frequencies, the influence of couplingcapacitor pairs CD1 and CD2 is negligible, and inverters IC1B and IC1C and the
positive-feedback network, R1and R2,
act as a Schmitt-trigger circuit. The
choice of the high- and low-threshold
voltages, VTH and VTL, at the Schmitt
IDD

CD2
10 nF
CD2
10 nF
L1
100 nH

50

CD1
680 pF
IC1A
74LVCU04AD

VS

VI1

CDC2
10 nF

VDD
3.3V

R2
56k

R1
5.6k

C1
3.6 pF

RF
SOURCE

CD1
680 pF

R3
56k

CDC1
680 pF

IC1B
74LVCU04AD

IC1C
74LVCU04AD

DATA
OUT

VO1

NOTE:
ALL COMPONENTS ARE SURFACE-MOUNTED DEVICES.

Figure 1 Three high-speed CMOS inverters and a few passive components form an RF-to-logic converter.

JANUARY 5, 2006 | EDN 79

designideas
triggers input, VO1, stems from a compromise between input sensitivity at VS
and ensuring unconditional stability of
the comparators output. Equations 1
and 2 set the high and low threshold
voltages, respectively:
(1)

(2)

To counteract a roll-off of sensitivity at higher frequencies, add a low-Q


impedance-matching network comprising L1 and C1 at the comparators
input. Given the design objective of
obtaining acceptable sensitivity at frequencies as high as 160 MHz, the network matches the 50 RF source and
IC1As input impedance, ZI1, at 150
MHz. Unfortunately, manufacturers of
digital ICs typically do not specify logic
devices input impedances. When
designing the matching network, the
first task involves using an Agilent
(www.agilent.com) vector-network
analyzer to measure the first inverters
input scattering parameter, S11, at
IC1As input, VI1. Figure 2 shows a
Smith-chart plot of the inverters S11
parameter.
Knowing that

Figure 2 An Agilent N3382A vector-network analyzer obtained this S-parameter plot, which shows S11 measured at the first inverters input for a source
power level of 6 dBm.

250

200

150
INPUT
VOLTAGE
(mV RMS)
100

50

(3)

with ZC50, you can use the data in


Figure 2 to extract the first inverters
input impedance at the frequency of
interest. At 150 MHz, this yields ZI1=
106.1j 116.7 (at Marker 4 in Figure 2). To determine values for the
matching networks components, you
can use any of several software tools
(references 1 and 2). If you are unfamiliar with Smith-chart computations, you can also proceed analytically with the following method:
1. Use series-to-parallel transformation formulas (equations 4 and 5) to
transform the first inverters input
impedance into a parallel form:
(4)

80 EDN | JANUARY 5, 2006

0
10

20

40

60

80

100

120

140

150

160

170

180

190

200

FREQUENCY (MHz)

Figure 3 An input-level-versus-frequency plot of the RF-to-digital comparator


measured from the RF sources reference plane to a clean logic output
reveals less-than-100-mV sensitivity at 160 MHz and usable output to 200
MHz.

(5)

Applying these formulas at 150 MHz


yields: RP233, and XP213.
(At 150 MHz, XP represents an input
capacitance, CP5 pF.)
2. Compute an initial version of the
matching network to perform a match
between the real part of the first invert-

ers input impedance, RP, and the 50


RF source. Solving equations 6 and 7
yields values for the matching networks
elements (Reference 3):
(6)

(7)

designideas
Applying these formulas at 150 MHz
yields L1 100 nH, and C1 CP 8.7
pF.
3. Subtract the inverters input
capacitance, CP 5 pF, from Equation
7 to calculate a value for C1:
(8)

To build the circuit, use standard


component values that fall closest to

the computed values: L1100 nH, and


C13.6 pF. As the plot of input frequency versus sensitivity in Figure 3
shows, the circuits increased sensitivity for 100- to 170-MHz frequencies
clearly demonstrates the impedancematching networks effectiveness. You
can optimize the circuits sensitivity in
any other frequency band of interest by
applying this method at the chosen frequency. The RF-to-digital-logic converters power consumption does not
change significantly for input signals of

Instrumentation amplifier
extends DSO
Bob Perrin, Sacramento, CA

To determine the specifications


of a solar-generating plant, I
needed to accurately measure the load
current a product consumed. The product switched several internal devices on
and off during an interval of several sec-

onds. An ammeter showed that the current transitions occurred too quickly for
visual logging, and my managers had
requested an oscilloscope photo of the
current waveforms peaks. I rolled out
our companys cart-mounted DSO (dig-

10 to 180 MHz. Under worst-case conditions, the current drain does not
exceed 58 mA for a supply voltage of
3.3V.EDN
REFERENCES
Smith tool, Ansoft Corp,
www.ansoft.com.
2 Ansoft Designer: Student Version,
Ansoft Corp, www.ansoft.com.
3 Bowick, Chris, RF Circuit Design,
HW Sams & Co, Indianapolis, IN,
1988.
1

ital-storage oscilloscope), inserted a


low-value resistor in series with the
products positive-power-supply input,
and attempted to make a differentialvoltage measurement (Channel A
minus Channel B) across the currentsampling resistor.
Unfortunately, RF noise from a local
FM-broadcast station swamped the
small-load-induced fluctuations in the
voltage developed across the sampling
resistor, and increasing its resistance

TO 15V
ISOLATED
+

BENCHTOP
POWER
SUPPLY

R3
121

12V
DC OUT

C9
+ 100 nF

R1
25
C4
100 nF

C2
100 nF

C3
150 F

+ C
1

150 F

F1

C5
100 nF

V+
+
RG
R2
IC1 REF
475
R
_G

C6
100 nF

C8
10 nF

C7
10 F

C10
1 F

C11
10 F

RG-174
COAXIAL
CABLE
TO
LECROY
DSO

R5
15k
C12
100 pF

C13
100 pF

C14
100 nF

NC

VIN

TRIM

15V
ISOLATED

R4
121

UNIT UNDER
TEST (UUT)

IC2
COM
OFF/ON

VIN

15V
ISOLATED

NC

C15
10 F

C16

+ 1 F

C17
100 nF

GND
C18
10 F +

TO 15V
C19
100 nF ISOLATED

Figure 1 Improve your oscilloscopes performance in high-RF-noise environments by adding an instrumentation-amplifier


front end. For best results, package the circuitry in a metal enclosure.

82 EDN | JANUARY 5, 2006

designideas
introduced an unwanted voltage drop
on the products power-supply rail.
Finally, the 12V supply rail introduced
a voltage offset that limited the oscilloscopes ability to accurately resolve
the small differential signal that I was
attempting to measure. I disconnected
the oscilloscopes ac ground to float
the scope with respect to the sampling
resistor, but the RF noise visible on the
trace increased significantly. I briefly
considered using an older analog (nonstorage) scope, but the DSOs storage
feature would allow me to capture and
print the waveforms required for my
report.
In frustration, I scoured the workbench for stray parts and assembled a
circuit that solved the problem. By
chance, the parts collection included
an instrumentation amplifier, IC1,
which does an excellent job of extract-

ing small signals from high-frequency


background noise. The amplifiers
inherently slow response attenuates RF
noise but doesnt affect amplification of
lower frequency signals. Adding RC
lowpass filters to the amplifiers inputs
and output further attenuates lower frequency noise induced by nearby
switched-mode power supplies and digital logic or microprocessors.
Normally, I avoid using noiseemitting dc/dc converters as power
supplies for analog circuits. However,
in this case, IC2, a dc/dc converter,
provided an expedient and technically sound approach (Figure 1). In general, dc/dc converters produce more
noise as their load currents increase,
but, in this circuit, the sole load comprises the instrumentation amplifier
that draws only a few milliamperes.
Adding a few filtering components

Virtual instrument determines


magnetic cores B-H-loop characteristics
Michael Nasab, Circuit Mentor, Boulder Creek, CA

To design an inductive component that contains a magneticcore material, an engineer must accurately measure the materials characteristics. A magnetic cores dynamic
hysteresis loop, or B-H curve, contains valuable information about core
losses and other magnetic parameters.
Unfortunately, commercially available
magnetic-loop-analysis instruments
are expensive and thus impractical for
small-scale research labs and manufacturers. This Design Idea describes a virtual instrument that uses a desktop or
notebook computer with an analog
data-acquisition card and National
Instruments (www.ni.com) LabView
software (Version 7.1 or above). In
operation, the software extracts B-Hloop information, core losses, and other
magnetic parameters at a reasonable
cost per measurement.
Figure 1 shows the test fixture for a
magnetic-core-based device. The device, T1, comprises a sample of core
material and two windings with equal

84 EDN | JANUARY 5, 2006

numbers of turns. A precision currentsensing resistor, R1, samples the excitation current that induces a magnetic field in the core. The voltage drop
across R1 is proportional to the excitation current and the magnetic field, H.
A network comprising resistor R2 and
capacitor C1 integrates the voltage
induced in the secondary winding. The
voltage across C1 is directly proportional to the flux density, B, in the core.
In practice, R2s value should be much
larger than capacitor C1s impedance at
the operating frequency. (Textbook

provided additional noise suppression.


Under normal operation, the current
that the product draws fluctuates from
approximately 300 to 800 mA. To minimize the voltage drop induced in the
power-supply loop, I used a 520-mm,
10A, 250V fuse, F1, as a current-sampling resistor. Voltage drop across the
fuse is approximately 1 mV per 100 mA
of current, and operating the fuse at a
small fraction of its nominal rating
avoids introducing nonlinearities in the
measurement.
With a 475 gain-setting resistor, R2,
the instrumentation amplifier, an
Analog Devices (www.analog.com)
AD620, provides a gain of 105V/V and
delivers an output of approximately 1V,
which corresponds to 1A of current
flowing through the shunt. Capacitors
C12 and C13 provide low-impedance
paths for high-frequency noise.EDN

descriptions of the circuit suggest a ratio


of 100-to-1.)
Components tolerances and characteristics affect measurement accuracy.
Use a noninductive, 1, 1%-tolerance
resistor of appropriate wattage rating
for R1, and select a low-leakage, lowdielectric-absorption, polyester- or
polypropylene-film capacitor with
tight tolerance for C1. To acquire and
view the data, you can use a dedicated
virtual instrument using a National
Instruments PCI-6024E data-acquisition card and LabView. The software
features NIs Express VI (virtualinstrument) technology that greatly
simplifies the creation of user-designed
data-acquisition and -manipulation
features. This application uses only two

T1
VARIABLE-VOLTAGE
VAC
SINUSOIDAL ACEXCITATION SOURCE

R1

R2
1-TO-1 TURNS
RATIO
C1

TO DATA-ACQUISITION
CHANNEL 1 (Y-AXIS)
INPUT

TO DATA-ACQUISITION
CHANNEL 0 (X-AXIS)
INPUT

Figure 1 The test fixture for a basic hysteresis-loop analyzer requires few
components.

designideas
data-acquisition analog-input channels: Channel 0 acquires magnetic-field
readings (H) for display on an x-y
charts x axis in units of ampere-turns
per meter, and Channel 1 captures flux
density (B) in tesla units for the y-axis
display.
At low frequencies, the cores hysteresis losses predominate, whereas
eddy-current losses become more
apparent at higher frequencies. A
wattmeter-style algorithm calculates
core losses, but you can easily substitute
your own mathematical expression into
the VI block diagrams formula node.
LabView also can save the data and
export results in Microsofts (www.
microsoft.com) Excel-spreadsheet format or into other programs for further
analysis.
You can use another of the dataacquisition cards eight differential analog-input channels to determine
inductance. To do so, measure the voltage across the devices primary winding
and calculate its rms value. The ratio
of the voltage to the rms current as
measured through R1 determines the
magnitude of the windings scalar
impedance, XL. Then, you can calculate the inductance from the following
equation: LXL/2
f, where f denotes

the frequency of the applied excitation


voltage.
Figure 2 shows a hysteresis curve for
a 3B7-mixture ferrite-pot core prepared
with 100-turn primary and secondary
windings and measured at 60 Hz. For
comparison, Figure 3 displays the 60Hz hysteresis curve for a 100W power
transformer wound on a toroidal core
composed of grain-oriented steel. The
toroidal cores wider loop indicates
greater hysteresis, a characteristic that
saturable-core power inverters exploit.
To apply 60-Hz excitation, you can
drive the devices primary winding from
a stepdown (isolation) transformer
powered by an adjustable-output autotransformer, such as a GenRad (www.
ietlabs.com) Variac. While observing
the B-H curve display, gradually
increase the primary voltage until the
flattening of the hysteresis loops upper
and lower portions indicates core saturation. No calibration is necessary if
you use precision. However, when evaluating core materials, you may need to
experiment with different numbers of
turns to obtain the windings ampereturns value for optimum results.
For tests at 60 Hz, use a 267-k, 1%tolerance resistor for R2 and a 1-F
polyester-dielectric capacitor for C1 in

Figure 2 The virtual instruments display shows a 3B7mixture ferrite-pot cores B-H loop.

86 EDN | JANUARY 5, 2006

the integrator network. Depending on


the number of turns and the current
necessary to obtain a usable output
voltage, a few volts of ac excitation is
usually sufficient to run the test. For
core measurements at higher frequencies, use a signal generator connected
to a power amplifier and alter the RC
integrators component values for
proper operation at the frequency of
interest. Although the application does
not use an analog output from the dataacquisition card, this output can serve
as a sinusoidal-signal source for the
power amplifier.
Review the electrical specifications
of the card you plan to use and avoid
exceeding the cards peak-to-peak differential- and common-mode input
voltages. If the excitation voltage
approaches or exceeds the cards ratings, add a 10-to-1 resistive-voltage
divider to limit the applied voltage and
compensate for the attenuators losses
by adding a factor-of-10 gain multiplier in the software.
You can download a copy of the VI
that this Design Idea describes from
www.circuitmentor.com/services.htm.
You can also obtain a trial version of
LabView from NIs Web site at www.
ni.com.EDN

Figure 3 This grain-oriented-steel toroidal cores B-H


loop exhibits saturation at a lower excitation value than
the core in Figure 2.

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Programmable analog circuits yield


single-chip sinusoidal oscillators

D Is Inside
80 Enhanced, three-phase VCO
features ground-referenced outputs

Stefano Salvatori and Paolo Lorenzi, University of Rome, Rome, Italy

Programmable-logic devices provide a popular method of implementing complex functions in digital


designs. Although manufacturers dont
yet offer analog circuits whose complexity compares to VLSI digital circuits, field-programmable analog circuits are enjoying extensive use in signal-conditioning and filtering applications. Based on CMOS-operationaltransconductance and switched-capacitor amplifiers, these devices offer a
convenient approach to relatively
complex design problems. Lattice
Semiconductors (www.latticesemi.
com) ispPAC10 in-system-programmable analog circuit and its accompanying PAC Designer software offer a
convenient method of circuit design

and verification (Reference 1). This


Design Idea presents two simple sinusoidal oscillators based on the ispPAC10.
Resistors within the ispPAC10 are
fixed at a nominal 250 k, and all
capacitors are user-selectable from
1.07 to 61.59 pF. Figure 1 shows an ispPAC10 with its internal blocks 1, 2,
and 4 connected as a cascade of three
first-order lowpass filters to form a classic phase-shift RC oscillator. Altering
the capacitors values produces oscillation frequencies over a range of 18 to
130 kHz. Each PAC blocks gain is fixed
at a factor of two to obtain a loop gain
of 8, which Barkhausens condition
for oscillation requires (Reference 2).
Configured from Block 3, a first-order

84 Improved current monitor delivers proportional-voltage output


 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
lowpass filter reduces the THD (total
harmonic distortion) on the oscillators
output. The values of capacitors in
Block 3 are optimized for filtering performance and thus differ from those of
the phase-shift stages.
The circuit in Figure 2 describes a
two-integrator loop that forms a classic quadrature-RC oscillator. The circuits oscillation frequency spans 12 to
126 kHz and depends on the time con-

OUT1

OUT3

2 PAC BLOCK 1
IA1

36.05 pF

20.91 pF
PAC BLOCK 3 1
IA5

IN1
OA1

OA3

IA2
1

2 PAC BLOCK 2
IA3

IA6
2.5V

36.05 pF

2.5V

36.05 pF

PAC BLOCK 4 2
IA7

IN2
OA2

IN4

OA4

IA4
1

IN3

IA8
2.5V

2.5V

OUT4

OUT2

UES BITS=00000000.

Figure 1 Based on a Lattice Semiconductor ispPAC10 programmable analog circuit, this phase-shift sine-wave oscillator and lowpass filter require no external components. The values are for a 30.4-kHz oscillator.

JANUARY 19, 2006 | EDN 77

designideas
OUT1

OUT3

10

23.26 pF

25.08 pF
PAC BLOCK 1

PAC BLOCK 3

IA1
IN1
OA1

IA6

2.5V

2.5V

23.26 pF

25.08 pF
IA3

IN3

OA3

IA2

1
IA5

PAC BLOCK 4

PAC BLOCK 2

1
IA7

IN4

IN2
OA2

OA4

IA4

IA8

2.5V

2.5V

OUT4

OUT2

UES BITS=00000000.

Figure 2 Cascaded dual integrators implement a quadrature sine-wave oscillator, with blocks 3 and 4 forming a lowpass filter. Again, the circuit design uses no external components. The values shown are for a 27.2-kHz oscillator.

stants of the integrators that blocks 1


and 2 form. In theory, each integrators
gain should have an absolute value of
unity, but, in practice, ispPAC allows
specification only of inverting integrators, and producing a stable sinusoidal signal requires a gain of at least

4 in Block 1. The circuit uses a gain


of 10. Two additional blocks of the
ispPAC10 device form a second-order
lowpass filter that decreases the outputs THD. In both oscillator circuits,
you can alter the lowpass filters gain
so that the circuits outputs deliver

specific voltages, such as 1V p-p, at all


frequencies.
Tables 1 and 2, respectively, contain
summaries of the phase-shift and
quadrature oscillators components
and output characteristics. CN refers to
the value of the capacitor used in the

TABLE 1 PHASE-SHIFT OSCILLATOR


C1
(pF)
5.46
6.92
7.77
9.19
14.62
20.91
36.05
61.59

C2
(pF)
5.46
6.92
7.77
9.19
14.62
20.91
36.05
61.59

C3
(pF)
5.06
5.92
6.92
6.92
9.19
12.78
20.91
35.25

C4
(pF)
5.46
6.92
7.77
9.19
14.62
20.91
36.05
61.59

f0
(kHz)
130.1
115.4
109.9
97.8
67.9
50.1
30.4
17.7

f (kHz)
at 20 dB
6
6
6
2.5
2.5
2.5
1.2
0.6

THD
(dB)
25
30
30
32
39
40
40
41

TABLE 2 QUADRATURE OSCILLATOR


C1
(pF)
1.07
3.56
5.92
7.77
14.22
25.08
40.08
50.01
61.59

C2
(pF)
1.07
3.56
5.92
7.77
14.22
25.08
40.08
50.01
61.59

78 EDN | JANUARY 19, 2006

C3
(pF)
5.06
5.92
7.77
9.62
15.45
23.26
26.29
35.25
40.98

C4
(pF)
5.06
5.92
7.77
9.62
15.45
23.26
26.29
35.25
40.98

f0
(kHz)
125.9
105.1
80.4
66.3
41.7
27.2
18.6
15
12.3

f (kHz)
at 20 dB
6
6
2.5
2.5
2.5
1.2
1.2
0.6
0.6

THD
(dB)
27
25
30
34
40
40
42
42
41

designideas
EEPROM

FREQUENCY
SELECT

MICROCONTROLLER

IEEE 1149.1
JTAG

ISPPAC10

OUT

Figure 3 Either ispPAC10 circuits implementation can serve as a foundation for


a programmable oscillator by adding a microcontroller and nonvolatile storage.

a microcontroller to dynamically
reconfigure an ispPAC-based oscillator
for specific frequencies. The nonvolatile memory stores frequency-specific capacitance and gain values for
each of the ispPAC10s circuit blocks.
Data transfers occur using the IEEE
1149.1 JTAG-standard protocol
through the ispPAC10s serial testaccess-port interface.EDN
REFERENCES

nth PAC block for oscillation at frequency f0. The design uses a Tektronix TDS1002 digital oscilloscopes FFT
function to measure THD and the

spectral line width of each output frequency at a level of 20 dB with


respect to the central frequency, f0.
Figure 3 illustrates the application of

PAC Designer software, www.


latticesemi.com.
2 http://jlnlabs.imars.com/spgen/
barkhausen.htm.
1

Enhanced, three-phase VCO features


ground-referenced outputs
Harry Bissell Jr, Welding Technology Corp, Farmington Hills, MI

Three-phase VCOs (voltagecontrolled oscillators) see service in many applications, including


power inverters and in electronic-music
synthesis as control and modulation
sources. A previous Design Idea
describes a basis for a simple, threephase VCO (Reference 1). However,
adding a few components enhances the
circuits performance. The original circuit delivers an output of only 600 mV
p-p and cannot tolerate substantial
loading, especially at low operating frequencies at which the circuit draws the
least operating current. Providing ac
coupling for the output signals doesnt
work well at low frequencies and worsens the loading problem. Finally, the
circuits dc operating point varies with
frequency.
The circuit in Figure 1 elegantly
overcomes these limitations. The original circuit uses three of six of a
CD4069UB hex inverters subcircuits.
One of the spares, IC1A, senses the
complete circuits dc operating point.
Resistor R2 provides linear feedback
around IC1A, forcing the input voltage
at Pin 9 to equal the output transition
threshold voltage over a range of oper-

ating currents. In other words, the voltage is proportional to the average dc


value of the sinusoidal output waveforms.
A voltage follower, IC2A, buffers the
averaged voltage at IC1As Pin 8. The
remaining sections of IC2 buffer the
oscillators three outputs, equalizing the
loading on the oscillator and providing
low-impedance drive to three differential amplifiers: IC3A, IC3B, and IC3C.
The differential stages subtract the dc
offset voltage from IC2A from the
buffered three-phase outputs. You can
alter the voltage gain of the three differential amplifiers from its nominal
factor of five to suit other applications.
Zener diode D1 limits the voltage to
10V at IC1s Pin 14. At low frequencies
and currents, the oscillators dc operating point can easily exceed the linear
range of IC2s inputs. You can use railto-rail-capable operational amplifiers
instead of LM324-family devices. Note
that the inputs of IC1s remaining
unused inverters connect to IC1s Pin 7
and not to circuit ground per normal
practice.
Adding an exponential current
source eases the task of adjusting the

circuit over a wide frequency range.


Transistors Q1 and Q2 and their associated components form a simple
exponential voltage-to-current converter. For best results, the base-emitter voltages of Q1 and Q2 should match
at the circuits nominal operating current100 Aand you should thermally couple both transistors. If your
application requires precise thermal
tracking, replace R6 with a 2-k temperature-compensating resistor with a
coefficient of 3500 ppm/C, such as a
Tel Labs Q81, which is available from
such companies as Precision Resistor
(www.precisionresistor.com). Place
this resistor in thermal contact with
Q1 and Q2. Temperature-compensating resistors are also available from
Micro-Ohm (www.micro-ohm.com),
Vishay (www.vishay.com), Ultronix
(www.ultronix.com), and KRL Bantry
(www.krlbantry.com).
Using the component values in Figure 1, the circuits operating frequency spans 0.1 to 26 Hz. Adding the components in this Design Idea reduces the
circuits dc operating-point shift from
5.5V to less than 25 mV over the frequency range. Most of the frequency
(continued on pg 84)

80 EDN | JANUARY 19, 2006

designideas
error occurs at the low end of the frequency range, at which its the least
objectionable.EDN

POWERSUPPLY
INPUT

15V
C5
10 F
35V

PIN 4

PIN 4

DIFFERENTIAL
AMPLIFIER 1
R7
100k

IC3

PIN 11 PIN 11

R8
100k
IC2

2 _
IC
3 + 3D

15V

R1
1k

DIFFERENTIAL
AMPLIFIER 2
R11
100k

R9
499k
2 _
IC
3 + 3A

R12
100k

R10
499k

NC

2 _
IC
3 + 2A

6 _
IC
5 + 2B

DIFFERENTIAL
AMPLIFIER 3
R15
100k

R13
499k
6 _
IC
5 + 3B

R16
100k

9 _
IC
10 + 3C

PHASE 3
OUT

PHASE 2
OUT

9 _
IC
10 + 2C

R17
499k

R18
499k

R14
499k
PHASE 1
OUT

(SPARE)

D1
1N758A

pg 102, www.edn.com/article/
CA149120.

Dutcher, Al, Inverters form threephase VCO, EDN, Aug 2, 2001,

OFFSET-VOLTAGE
REFERENCE

C6
10 F
35V
15V

REFERENCE

13 _
IC
12 + 2D

14

14
CD4069UB
13 IC
1E

FREQUENCY- 15V
CONTROL
VOLTAGE
INPUT
R3
15V
100k

12
9 IC
1A

11 IC
1F

R6
2.2k

1 IC
1B

3 IC
1C

5 IC
1D

10

7
R5
100k

Q1
2N3904
Q2
2N3906
R4
330

R2
10k

C1
0.1 F

D2
1N4148

D4
1N4148

D6
1N4148

D3
1N4148

D5
1N4148

D7
1N4148

C2
10 F

C3
10 F

C4
10 F

15V
NOTES:
PLACE Q1 AND Q2 IN THERMAL CONTACT.
FOR BEST STABILITY, USE NONPOLARIZED CAPACITORS FOR C2, C3, AND C4.
DOTTED LINES BETWEEN Q1 AND Q2 INDICATE THERMAL CONTACT.

Figure 1 Adding differential and buffer amplifiers and an exponential voltage-to-current converter enhances the performance of a low-frequency, three-phase voltage-controlled oscillator.

Improved current monitor delivers


proportional-voltage output
Susanne Nell, Breitenfurt, Austria

This Design Idea expands the


capabilities of a previously published one (Reference 1). The original
version featured a current transformer
whose secondary winding formed part
of an oscillators tank circuit. Under

84 EDN | JANUARY 19, 2006

normal conditions, direct current flowing through the current transformers


single-turn primary winding kept the
circuit from oscillating until primary
current flow ceased. Although the circuit acted as a power-interruption

detector, when you add a few components, the operating principle lends
itself to measurement applications.
This revised circuit delivers an accurate
linear-voltage output thats proportional to direct current flow through
current-sense transformer T1s primary
winding (Figure 1). In addition, the
circuit also offers possibilities as an ac
current sensor.
To achieve improved performance,
the design retains the original oscillat-

designideas
ing-circuit concept and adds a
ONE TURN
PLL circuit and one additionCURRENT TO MEASURE
J4
J3
1
1
I
al winding to the current
4
1
T1
CON1
transformer whose secondary
5V
TOROID CON1
5 FERRITE
8 6
forms an LC oscillators resoCORE
R8
nant circuit. Integrating a
47k
200
TURNS
50
TURNS
9
4
VCOIN
VCOUT
74HC4046, IC1, the PLL
3
2
P1
CIN
measures the frequency of an
13
14
5V
5V
SIN
P2
C2
IC1
5V
LC oscillator comprising Q1
P3 15
10 nF
74HC4046
R9
1
6
PP
and its associated components 100C1nF
J
47k
C1A
R6
R5
1 1
7
100k
100k
C1B
and compares it with a fixed11
2
10
R1
DEMO
frequency internal VCO (vol12
CON2
R2
tage-controlled oscillator).
VOLTAGE
R7
Q2
5
OUTPUT
100k
INH
The PLLs phase-comparator
BC558
5V
output drives a current source
16
Q3
VDD
BC558
comprising Q2 and Q3, which
C9
C3
2.2 F
in turn feeds current to an
100 nF
additional winding on the current-sense transformers core.
R10
R11
47k
47k
Sources of T1s ferrite core
C4
include Epcos (www.epcos.
100 nF
com), which offers the B64290L 63287-toroid 20
5V
5V
107 material N87; Pramet
C5
R3
100 nF
(wwwpramet.com), which of6.8k
R2
fers Fonox Type T20 material
47k
POWER SUPPLY
H60; Vacuumschmelze (www.
C6
Q1
22 nF
5V
vacuumschmelze.com), with
J
3 2
BC548
+
C8
the VAC T60006L20204
47 F
R1
C7
R4
CON2
15k
W409-52; and other manu47 nF
2.2k
facturers. Depending on the
ferrite material you use, the
circuit will operate to some
Figure 1 This current sensor uses a variable-frequency oscillator, Q1, and a PLL, IC1,
degree with virtually any ferto measure current in an isolated circuit.
rite toroidal core. (It is difficult
to simulate this circuit using
PSpice or other simulators; for accurate current. The turns ratio of 1-to-250, primary winding, calibrate the circuits
results, you need a complex model that which also represents the ratio of cur- range by adjusting potentiometer R11 to
accurately portrays the cores nonlinear rents in transformer T1, establishes a a set operating point. A voltage drop of
secondary current of 10 mA for a pri- 2V across R5 sets a measurement range
behavior at various current levels.)
The added winding induces magnet- mary current of 2.5A. If the PLL cir- of 5 to 5A. To accommodate other
ic flux in the core, decreasing its per- cuits gain is sufficient and the ferrite measurement ranges, you can alter T1s
meability and inductance and raising cores region of operation avoids satu- turns ratio or vary the compensation
the LC oscillators frequency. When the ration, the circuits closed-loop config- current by using different values for R5
oscillators frequency matches the uration maintains the cores magnetic and R11. Use a well-regulated power
VCO (reference) frequency, the circuit flux at a constant value and thus min- supply to provide power for the circuit.
reaches an equilibrium state. An in- imizes the effects of core-material non- You may be able to replace the
74HC4046 with a software PLL-emucreasing or decreasing current through linearities.
Measuring the voltage difference lation routine that uses a microconthe compensation coil balances any
additional magnetic flux that dc cur- across resistor R5 shows that the circuits trollers spare processing resources.EDN
rent flowing through the measurement output voltage is linearly proportional
to the compensation current, and R5s R E F E R E N C E
coil produces.
Within the PLLs frequency-tracking resistance scales the voltage output. For 1 Ackerley, Kevin, Impedance transrange, the current waveform through 100 at R5, a 1V output corresponds to former flags failed fuse, EDN, Dec
the compensation coil has the same a primary-side current of 2.5A. With 17, 2004, pg 67, www.edn.com/
shape as fluctuations of the measured zero current flowing in the single-turn article/CA486572.

86 EDN | JANUARY 19, 2006

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Hardened Ethernet cable


goes underground
Philip Freidin, Fliptronics, Sunnyvale, CA

An application required the


extension of Ethernet (IEEE
802.3u-1995) service from a home to
a garage, a distance of approximately
300 ft. Wireless communication
using IEEE 802.11a/b/g equipment
had proved unreliable due to the
buildings construction, which comprises stucco over embedded wire
mesh. In effect, the buildings walls
form Faraday cages that attenuate
radiated signals. Straight-line aerial
deployment of the Ethernet cable
between buildings would have required installation of support poles,
and simply laying the cable on the surface of the ground would expose the
cable to damage from automobiles,
hungry pets, and inquisitive children.
At first glance, burial of the cable
appeared impractical due to the presence of a large concrete surface
between the buildings. However, an
alternate route through an adjacent
garden would avoid tunneling beneath the concrete slab but would
expose the cable to environmental
hazards, such as spade work and burrowing animals.
This Design Idea describes how to
environmentally harden a Category
5 UTP (unshielded-twisted-pair) cable
conforming to EIA/TIA 568B and
ISO/IEC 11801:1995 thats terminated
with RJ-45 connectors (ISO 8877).
Without adding repeaters, a Category
5 Ethernet cable can extend to 100m,
or a little more than 300 ft. In this
application, the cable run comprises
100 ft of exposed cable, 100 ft of garden-grade protected cable, and 100 ft
more of exposed cable. To apply the
idea, you have to find a way to protect
and handle the exposed 200 ft of cable.

Depending on your installations


requirements, you will need various
numbers and lengths of the following
parts: a 100-ft-long garden hose
whose fittings conform to the ANSI/
ASME B1.20.7-1991.75-11.5 NH
thread-form standard; a 4-Gbyte
SCSI disk drive, which need not be
functional; a continuous, 300-ft-long
Category 5 Ethernet cable terminated in RJ-45 connectors; a 120-ft-long,
nylon twine; a 5-in.-long, electricalgrade, adhesive-backed tape; a 2-in.steel, socket-head-cap, 1/4-20-thread
machine screw (ANSI/ASME B1.11989); and two bricks.
To construct the design, uncoil and
stretch the garden hose as straight as
possible, perhaps using a driveway as
a work surface. Place a brick on each
end of the hose to prevent it from curling. If you use only one length of garden hose, cut off and discard the hose
fittings. Using Torx or Philips screwdrivers as appropriate, dismantle the 4Gbyte SCSI disk drive by removing all
of the screws that retain the drives
cover. If the cover resists removal, look
for screws beneath labels. Remove the
drives head-positioning magnets,
which can exert a strong pull on nearby ferrous objects. Use caution to
avoid pinching your fingers between
the magnets and the steel surfaces.
Discard the remainder of the SCSI
drive.
Securely tie the nylon twine to the
1
/4-20 steel machine screw and insert
the screw into one end of the hose.
Apply the magnet to the hoses exterior to attract the machine screw.
Slide the magnet along the hose to
pull the nylon twine through the
hose. When the screw reaches the

D Is Inside
76 Shunt regulator improves power
amplifiers current-limit accuracy
78 Low-power, super-regenerative
receiver targets 433-MHz ISM band
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.

hoses far end, untie the twine and


save the screw for future use. To ease
manipulation of the Category 5
cable, deploy it from either its original dispenser box or a spool mounted
on a suitable axle so that the cable can
easily unwind. Securely attach the
twine to one end of the Category 5
cable. Walk to the far end of the hose
and gently pull the cable through the
hose. If you encounter excessive
resistance, investigate the cause and
remove any cable kinks or feeder-end
snags.
When the cable appears at the
pulling end, stop for a moment. Go to
the other end of the hose and wrap an
inch or two of electrical tape around
the cable where its just about to enter
the hose. Return to the far end of the
hose and continue pulling the cable
through the hose. Stop pulling when
you see the electrical-tape marker.
You now have a 300-ft-long Category 5 cable whose central 100 feet the
garden hose protects. If you decide to
protect more of the cable, repeat the
process by feeding the twine through
a second length of hose. Use the
hoses couplings to make a watertight
joint between lengths. If you take this
approach, make sure that you properly orient the hose segments before you
spend too much time threading the
twine through the hose.EDN

FEBRUARY 2, 2006 | EDN 75

designideas
Shunt regulator improves power
amplifiers current-limit accuracy
John Guy, Maxim Integrated Products Inc, Sunnyvale, CA

Adding current-limiting circuitry to a power amplifiers or a


linear voltage regulators emitter-follower output stage protects both the
output transistor and the downstream
circuitry from excessive-current dam-

15V

age. Figure 1 shows the classic currentlimiter circuit: Transistor Q2 senses the
output-current-induced voltage drop
across ballast resistor R2 and diverts
base current from Darlington-connected transistors Q1 and Q3. Transis-

10 mA

Q1
2N3904

R1
510

Q4
2N3906
VIN

Q2
2N3904

Q3
MJL4281A
R2
0.5

OUTPUT

Figure 1 A small-signal transistor, Q2, provides an output-current limit for


this emitter-follower power amplifier.

tor Q2s base-emitter voltage, VBE, sets


the circuits current-limit threshold.
Unfortunately, a small-signal transistors VBE exhibits a temperature coefficient of 2 mV/C, which causes a substantial variation in the current-limiting threshold over the circuits operating-temperature range.
You can improve the circuits performance by replacing Q2 with IC1, an
adjustable shunt regulator (Figure 2).
With an input threshold voltage of
0.6V, the MAX8515 allows use of a
lower value for current-sense resistor
R2 and thus helps minimize R2s power
and thermal losses. Alternative commonly available shunt regulators
present input voltages of 1.25 to 2.5V.
In addition, a separate power-supply
input connection allows the MAX8515 to maintain accuracy when its
internal output transistor approaches
saturation.
Figure 3 compares current-limit accuracy for the circuits of Figure 1 and
Figure 2 over an operating-temperature range of 40 to 85C. Neglecting the temperature coefficient of sense
resistor R2, the shunt-regulator version
maintains its output current to an accuracy of better than 2%, and the smallsignal-transistor version exhibits a
25% current variation over the operating-temperature range.EDN

1.6

15V

10 mA

1.5

1.4

2N3904
CURRENT 1.3
LIMIT
1.2
(A)

Q1
2N3904
4

VIN

Q4
2N3906

IC1
MAX8515

5
2

Q3
MJL4281A

1.0
40 15 10 35 60
TEMPERATURE (C)

R2
0.5

85

OUTPUT

Figure 2 Substituting a shunt regulator, IC1, for Q2 in Figure 1 improves the


output-current-limit accuracy.

76 EDN | FEBRUARY 2, 2006

MAX8515

1.1

Figure 3 Output-current-versus-temperature plots for the circuits of figures 1 and 2 show improved accuracy for the shunt-regulated circuit (bottom trace) over the discrete-transistor
version (top trace).

designideas
Low-power, super-regenerative
receiver targets 433-MHz ISM band
Cedric Mlange, Johan Bauwelinck, and Jan Vandewege,
Ghent University, Ghent, Belgium

Designers often choose a superregenerative receiverdespite


its frequency instability and poor
selectivityfor battery-powered, shortrange, wireless applications in which
power consumption is a major issue.
Examples include remote-keylessaccess systems, automobile alarms, biomedical monitors, sensor networks, and
computer peripherals (Reference 1). A
super-regenerative detector can also
demodulate frequency-modulated signals through slope detection. Tune the
detector so that the signal falls on the
slope of the detector circuits selectivity curve. This Design Idea presents a
super-regenerative receiver that consumes less than 1 mW and operates in
the license-free, 433-MHz ISM (industrial/scientific/medical) band.
In its simplest form, a super-regenerative receiver comprises an RF oscillator that a quench signal, or lower frequency waveform, periodically switches on and off. When the quench signal
switches on the oscillator, oscillations
start to build up with an exponentially growing envelope. Applying an external signal at the oscillators nominal
frequency speeds the growth of the
envelope of these oscillations. Thus,
the duty cycle of the quenched oscillators amplitude changes in proportion
to the amplitude of the applied RF signal (Figure 1).
A super-regenerative detector can
receive AM signals and is well-suited

for detecting OOK (on/off-keyed) data


signals. The super-regenerative detector constitutes a sampled-data system;
that is, each quench period samples and
amplifies the RF signal. To accurately
reconstruct the original modulation,
the quench generator must operate at
a frequency a few times higher than the

IN ITS SIMPLEST FORM,


A SUPER-REGENERATIVE
RECEIVER COMPRISES
AN RF OSCILLATOR
THAT A QUENCH
SIGNAL, OR LOWER
FREQUENCY WAVEFORM, PERIODICALLY
SWITCHES ON AND OFF.
highest frequency in the original modulating signal. Adding an envelope
detector followed by a lowpass filter
improves AM demodulation (Reference 2).
Figure 2 is a block diagram of the
super-regenerative receiver circuit in
Figure 3. The heart of the receiver comprises an ordinary Colpitts-configured
LC oscillator operating at a frequency
that the series resonance of L1, L2, C1,
C2, and C3 determines. Switching off
transistor Q1s bias current quenches the
QUENCH
SIGNAL

EXTERNAL
RF SIGNAL

oscillator. (Note that increasing C1 and


C2 improves the oscillators frequency
stability at the expense of increased
power consumption.) Cascode-connected transistors Q2 and Q3 form an
antenna amplifier that improves the
receivers noise figure and provides some
RF isolation between the oscillator and
the antenna. To conserve power, the
amplifier operates only during oscillation growth.
Based on a Schmitt-trigger circuit,
the quench generator switches the
oscillator and RF-amplifier stage. To
improve sensitivity, the triangular
waveform across C5 quenches the oscillator, and the square wave at the output of IC1 switches the RF amplifier.
The quench generators two outputs are
phased in quadrature so that the RF
amplifier has received power when the
detectors oscillations start to grow. The
quench frequency of this circuit is 100
kHz to allow data transfers at rates as
high as 20 kbps.
The envelope detector comprises a
common-source amplifier thats nominally biased to operate in Class B mode.
To increase this stages gain, you apply
a small amount of bias current to make
it operate in Class AB mode. To reduce
the load on the oscillators LC tank circuit, C10 connects to a tap on inductor
L1, as inductor L2 shows.
The first stage in the data-recovery
circuit comprises buffer IC2A; amplifier IC2B; and a third-order, lowpass filter for suppressing quench-frequency
components in the envelope detectors
output. A dc-coupled Schmitt-trigger
circuit, IC3, extracts the transmitted
data from the demodulated signal. A
lowpass filter comprising C12 and R16
extracts the demodulated signals dc

ANTENNA
LC
ENVELOPE
AMPLIFIER OSCILLATOR DETECTOR

DATA
DETECTION

THERMAL
NOISE

OSCILLATOR
OUTPUT

QUENCH GENERATOR

Figure 1 In a super-regenerative detector, the arrival of


a signal starts RF oscillations sooner than under nosignal conditions.

78 EDN | FEBRUARY 2, 2006

Figure 2 The super-regenerative receiver is considerably


simpler than a superheterodyne circuit.

designideas
ENVELOPE DETECTOR

DATA DETECTION

LC OSCILLATOR
VCC

VCC
TLV2763
R12
2.2M

R11
500k

_
IC2A

C4
10 nF

+
R17
1M

R14
24k
C11
470 pF

R15
24k

C10
4.7 pF
Q4
BF909

TLV2763

R16
620k

C3
6.8 pF

L2
18.5 nH

R13
390k

IC2B

C6
15 pF

C12
33 nF

ANTENNA
AMPLIFIER

R21
2.2M
ADCMP371

R19
4.3k

+
R20
430k

IC3
_

DATA

L1
9 nH

C14
47 nF

C9
10 nF

VCC

Q3
BFR92A
R9
250k

C8
200 nF

C13
180 pF
C7
200 pF

R2
510k

C2
2.2 pF

R1
2.7k

L3
68 nH

R10
75

R18
43k

Q1
BFR92A

C1
2.2 pF

R7
130k

QUENCH GENERATOR
R3
68k
ADCMP371

R8
680k
Q2
BFR92A

IC1
+

R6
910k

C5
47 pF

R4
910k
R5
910k

VCC

Figure 3 The super-regenerative receiver features relatively few components.

Figure 4 A prototype version of a super-regenerative receiver uses mostly


surface-mount components. The large, black, leaded component in the upper
right corner is a power-supply-decoupling capacitor. Note the RF-input connector in the center of the pc board.

80 EDN | FEBRUARY 2, 2006

component and sets the Schmitt triggers decision threshold. As a consequence, the data transmitter must use
a dc-balanced coding scheme, such as
Manchester coding, for modulation.
On the receiving end, no additional
active components are necessary for
extracting the data-recovery circuits
decision threshold, which helps minimize the receivers power consumption.
The prototype occupies a compact pc
board measuring approximately 53
cm (Figure 4). Using a simple, homemade PRBS (pseudorandom-binary-sequence) generator that uses Manchester coding with a 28-to-1-bit sequence
(Reference 3), BER (bit-error-rate)
measurements yield the results in Figure 5. These results demonstrate a sensitivity of less than 100 dBm for a 10to-4 BER at 1 kbps. The receiver consumes 270 A at 3V for a power consumption of 810 W. As a further

designideas
enhancement to the design, it includes
a transmitter circuit based on Maxims
MAX1472, creating a simple, compact,
low-cost, and low-power transceiver for
the 433-MHz ISM band. You can easily
adapt the receiver circuit for recovery of
AM audio or other analog signals by
replacing the Schmitt trigger, IC3, with
a conventional audio-output amplifier.
Retune the RF oscillator to cover the frequency range of interest.EDN
REFERENCES
1 http://intecweb.intec.ugent.be/data/
researchgroups.asp.
2 Insam, Eddie, Designing Super-Regenerative Receivers, Electronics
World, April 2002, pg 46.
3 Mlange, Cedric, Johan Bauwelinck,
Jo Pletinckx, and Jan Vandewege,
Low-cost BER tester measures errors
in low-data-rate applications, EDN,
Dec 5, 2005, pg 123, www.edn.com/
article/CA6288033.html.

82 EDN | FEBRUARY 2, 2006

0.1
1 kBPS
2.5 kBPS
5 kBPS

0.01

10 kBPS
15 kBPS
20 kBPS

0.001
BIT-ERROR
RATE
0.0001

0.00001

0.000001
102

101

100

99

98

97

96

95

94

93

INPUT POWER (dBm)

Figure 5 Measurements of bit-error rate versus input RF power highlight the


prototype receivers sensitivity. The frequency is 433.92 MHz.

92

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Lowpass, 30-kHz Bessel filter offers


high performance for audio applications
Troy Murphy, Analog Devices, San Jose, CA

Thanks to its property of applying an equal amount of delay to


all frequencies below its cutoff frequency, the Bessel linear-phase filter
sees service in audio applications in
which its necessary to remove out-ofband noise without degrading the phase
relationships of a multifrequency inband signal. In addition, the Bessel filters fast step response and freedom from
overshoot or ringing make it an excellent choice as a smoothing filter for an
audio DACs output or as an antialiasing filter for an audio ADCs input.
Bessel filters are also useful for analyzing the outputs of Class D amplifiers
and for eliminating switching noise in
other applications to improve accuracy of distortion and oscilloscope-waveform measurements.
Although the Bessel filter provides
flat magnitude and linear-phasethat

R2
R1 383
383

R3
698

FILTER C
INPUT 10 1nF

C2
3.3 nF

2.5V

2 _

8
IC1A
AD8656
3 +
4

is, uniform group-delayresponses


within its passband, it has worse selectivity than Butterworth or Chebyshev
filters of the same order, or number of
poles. Thus, to achieve a given level of
stopband attenuation, you need to
design a higher order Bessel filter,
which, in turn, requires careful selection of amplifiers and components to
achieve the lowest levels of noise and
distortion.
Figure 1 shows a schematic for a highperformance, eighth-order, 30-kHz,
lowpass Bessel filter. This design uses
standard values for 1%-tolerance resistors and 5%-tolerance ceramic capacitors. As an alternative, you can use 10%tolerance capacitors at the expense of
increased group-delay variance within
the passband. For best results, use temperature-stable capacitors.
In this application, the filter process-

R5
R4 665
665

R6
845

C4
2.2 nF
6 _

IC1B
AD8656

C3
6.8 nF

5 +

2.5V

R7
422

R8
422

C5
12 nF

R9
649

C6
2.2 nF

2.5V

2 _

8
IC2A
AD8656
3 +
4
2.5V

R10
549

R11
549

C7
15 nF

R12
715

C8
1 nF
6 _

IC2B
AD8656
5 +

7
FILTER
OUTPUT

Figure 1 Two dual op amps and a handful of passive parts implement a highperformance, eighth-order, 30-kHz, lowpass Bessel filter.

D Is Inside
84 Use a PWM fan controller
in an EMI-susceptible circuit
88 PCs parallel port and a PLD
host multiple stepper motors and
switches
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
es audio signals that swing above and
below ground, and its amplifiers draw
power from positive and negative
2.5V supplies. Rail-to-rail output
capability helps achieve maximum output-voltage swing at these low supply
voltages. To achieve a high SNR in
high-quality audio service, the amplifiers must exhibit unity-gain stability
and low inherent noise. For example,
Analog Devices AD8656 low-noise,
precision-CMOS dual op amp meets all
of these requirements.
Connecting the amplifiers as inverting-gain stages maintains constant
input-common-mode voltage and
helps minimize distortion. Using lessthan-1-k resistors throughout the circuit reduces the resistors thermal-noise
contributions. Each AD8656 amplifier
contributes less than 3 nV/Hz of
noise across a 30-kHz bandwidth, and
the total noise over a 30-kHz bandwidth measures less than 3.5 V rms.
For a 1V-rms input signal, the circuit
yields an SNR of better than 109 dB,
and, for a 1-kHz, 1V-rms input signal,
the circuit yields a THDN (total-harmonic-distortion-plus-noise) factor of
better than 0.0006%.
Figure 2 shows the filters measured
magnitude response for a 1V-rms input
signal. The filters passband gain of 0 dB
is flat within 1.2 dB for frequencies as

FEBRUARY 16, 2006 | EDN 83

designideas
high as 20 kHz. With its 3-dB point
at 30 kHz, an eighth-order Bessel presents a theoretical attenuation of 110
dB at 300 kHz, decreasing at 160
dB/decade at higher frequencies. This
characteristic provides sufficient attenuation of repetitive noise that
switched-mode power supplies and
other sources induce, which typically
occurs at frequencies of 300 kHz and
higher.
Figure 3 illustrates the filters phase
shift and its group delay, which remains
relatively constant at roughly 17 sec,
even for frequencies as high as 40 kHz.
Note the linear scale on Figure 3s frequency axis, which clearly illustrates
the filters linear-phase behavior within the passband. The following equation defines group delay as the negative
partial derivative of phase shift with
respect to frequency:
Group delay  /f.
At dc, resistor R1 sets the filters input
resistance at 383. If your application
requires higher input impedance, you
can insert a unity-gain buffer ahead of
the filter at the expense of increased
distortion and noise. For applications
that require operation from 15V
power supplies, replace the AD8656
with a higher voltage amplifier, such as
Analog Devices AD8672 low-distortion, low-noise (3.8-nV/Hz), dual
operational amplifier.EDN

20

0.2

MAGNITUDE
MAGNITUDE ZOOM

60

0.4 MAGNITUDE
ZOOM
(dB)
0.6

80

0.8

100

1.0

MAGNITUDE
(dB)

40

120
10

100

1000

84 EDN | FEBRUARY 16, 2006

100,000

1.2
1,000,000

Figure 2 The measured amplitude-versus-frequency response of the circuit in


Figure 1 shows a change of scale on the right vertical axis.

20

18
90

16

GROUP DELAY

14

180

12
GROUP
DELAY 10
(SEC)
8

PHASE SHIFT

270

PHASE
SHIFT
(
)

360

6
4

450

2
0
0

20,000

40,000

60,000

80,000

540
100,000

FREQUENCY (Hz)

Figure 3 Measured within the passband of dc to 30 kHz, the Bessel filters


phase-shift and group-delay characteristics display excellent uniformity and
linearity.

Dimitri Danyuk, Niles Audio Corp


Microchip Technology (www.
microchip.com) offers a family of
cooling-fan speed controllers that operate in PWM mode for use with brushless dc fans (Reference 1). To control
fan speed using the PWM waveforms
duty cycle, you can use either an external NTC (negative-temperature-coefficient) thermistor or one of Microchips
PIC microcontrollers and its SMBus

10,000

FREQUENCY (Hz)

Use a PWM fan controller


in an EMI-susceptible circuit


0.0
0.2

20

serial-data bus. Figure 1 illustrates a typical application that the data sheet
describes for the TC664 and TC665
controllers (Reference 2). Using a frequency-control capacitor, CF, with a
value of 1 F, fan-controller IC1 generates a PWM pulse train with a nominal
frequency of 30 Hz and a temperatureor command-dependent duty cycle that
varies from 30 to 100%.

Although using the controller in


PWM mode reduces power dissipation
in transistor QA, which drives the fan,
the 100-mA, square-wave motor-drive
current can cause unwanted interference in a nearby high-sensitivity audio
circuit. The circuit in Figure 2 solves
the problem. An additional driver transistor, Q1, and an RC network comprising C3 and R3 form a simple PWMto-linear converter. You can also use
another PWM-to-linear-conversion
circuit, such as an integrator based on
an operational amplifier.
Figure 3 shows a graph of the dc voltage at Q2s collector versus IC1s PWM

designideas
5V
12V
C2
1 F

NTC THERMISTOR
100k AT 25
C

R1
34.8k

FAN
10

1
C1
0.01 F

R2
14.7k

VDD

VIN

2 C
F
CF
1 F
RSCLK
20k

IC1
TC664
TC665
3

RSDA
20k

QA

CSENSE
0.1 F

NC

RSENSE
5V
RFAULT
20k

SCLK

5V
PICMICRO
MICROCONTROLLER

SENSE

5V

RISO
715

VOUT 9

FAULT

4
SDA

GND
5

drive-output waveforms duty cycle. The


voltage applied to the fan corresponds to
the difference between Q2s collector
voltage and the 12V supply voltage.
Even though a steady voltage appears
across the fan, current pulses that the
fan motors commutation produces still
develop a voltage across current-sense
resistor RSENSE that connect to Q2s emitter, and all of IC1s protective and advisory features remain available.
The listed component values are
valid for a 100-mA, 12V, brushless fan.
Use a general-purpose NPN transistor
such as the 2N2222 for driver-transistor Q1 and an NPN transistor, such as
Fairchild Semiconductors PZT2222A,
that can dissipate one-third of the fans
maximum power consumption for Q2.
Note that you can vary the PWMs
nominal frequency over a range of 15
to 35 Hz by altering the value of CF.EDN
REFERENCES
Fan Speed Controller and Fan
Fault Detector Family, Microchip
Technology Inc, 2002, http://ww1.
microchip.com/downloads/en/
DeviceDoc/21604c.pdf.
2 SMBus PWM Fan Speed Controllers with Fan Fault Detection,
Microchip Technology Inc, 2003,
http://ww1.microchip.com/down
loads/en/DeviceDoc/21737a.pdf.
1

Figure 1 In a typical application, fan-controller IC1 and transistor QA apply pulsewidth-modulated current to vary a fans speed as a function of temperature.

5V

12V

NTC THERMISTOR
100k AT 25
C

R1
34.8k

C1
0.01 F

R2
14.7k

VIN

VDD

VOUT 9

2 C
F
CF
1 F

SENSE
5V
RSCLK
20k

IC1
TC664
TC665
3

RSDA
20k

NC

RISO
4.7k

CSENSE
0.1 F

FAULT

Q1
2N2222

R4
680

R5
3.6k

5V

SCLK

5V
PICMICRO
MICROCONTROLLER

FAN
R3
20k

10
1

C3
100 F
+

C2
1 F

12
9

Q2
PZT2222A

RSENSE

RFAULT
20k

4
SDA

GND
5

Figure 2 To minimize the effects of high-frequency noise on sensitive analog


circuits, you can convert the high-current PWM waveform applied to the fan
to a continuous analog voltage.

86 EDN | FEBRUARY 16, 2006

OUTPUT 6
VOLTAGE
(V)
3
0
0

20

40

60

80 100

OUTPUT-DUTY CYCLE (%)

Figure 3 Output voltage at Q2s collector shows a linear relationship


versus the controllers pulse-widthmodulated output-duty cycle. (The
pulse width increases as the temperature increases.) The fans operating
voltage corresponds to the difference between Q2s output voltage
and the 12V supply rail.

designideas
PCs parallel port and a PLD host
multiple stepper motors and switches
Eduardo Prez-Lobato, Universidad de Antofagasta, Antofagasta, Chile

Robotic applications frequently


include multiple stepper motors
and switches. The stepper motors produce motion in several directions, and
the switches identify home positions
and detect proximity to obstacles. This
Design Idea describes the development
and implementation of a PLD (programmable-logic-device)-based interface that can connect a PCs parallel
port to as many as eight switches and
four stepper motors (Figure 1). This
interface design serves many applications, and using IC1, a 22V10 PLD,
to minimize the circuits component
2
3
4
5

J1

D0
D1
D2

D4
D5

TO IBM8
COMPATIBLE
PC'S PRINTER 9
PORT
10

D6

12
13
GND

BUSY

D3

11

count reduces complexity, weight, and


overall dimensions. Drivers IC3
through IC6 for the stepper motors
comprise three L293 quad half-Hbridge ICs (Figure 2).
Each rotation of the two-winding
stepper motors in this design requires a
sequence of four mechanical steps that
you produce by applying a pair of 7V,
500-mA, 120-msec-long pulses to the
motors windings (Figure 3). To make
a stepper motor rotate either CW
(clockwise) or CCW (counterclockwise), you apply either of two pulse
sequences (tables 1 and 2).

1 kHz

S8

BUSY
PAPER
SELECT

18

S7
S6
S5

E10
3 E9
4
5

Q7
Q6

E8

Q5

24
23
22
21
20

Q4

E7

6 E6

19

IC1
22V10

18

7 E5

E11

S4

Q3 17

S3

S2
S1
NOTE: PINS 1, 14, 15, 16,
AND 17 ARE UNUSED.

VCC

D7
ACK

1 CLK

E4
E3

Q2

10 E2

Q1

11
12

E1

Q0

GND

E0

16
15
14
13

5V
ACK
7404
PAPER
SELECT
NC
D5
M3
M2
M1
M0
D4

The following sections specify the


functions of the input and output registers bits that control the parallel-port
interface and the PLD. The PLD output-register bits are 7, 6, 5, 4, 3, 2, and
1. Q7 signals the PC that one or more
switches are active. Bit 0 means that a
switch is active; bit 1 means that no
switches are active. With Q6, Q5, and
Q4, the BSS (buffered-status switch)
tells the PC which of n switches is
active: 000S1, 100S5, 001S2,
101S6, 010S3, 110S7, 011S4,
and 111S8. For Q3, Q2, Q1, and Q0,
the PLDs outputs enable one of the
four motor-driver ICs to drive its associated stepper motor, with 1000M3,
0010M1, 0100M2, and 0001M0.
The PLD input registers bits are E11,
E10, E9, and E0. For E11, the host PC
controls the PLD, 0 disables the PLD,
and 1 enables the PLD. For E10 and E9,
the PLD reads these lines to determine
which of the four motors in Figure 2
receives drive pulses: 00 for Motor 0, 10
for Motor 2, 01 for Motor 1, and 11 for
Motor 3. For bit E0, the PLD reads this
bit to determine what to do with the
BSS settings: 0hold, and 1clear. For
E8 through E1, the PLD reads the status of one switch and stores it in the
BSS register:
00000001S1, 00010000S5,
00000010S2, 00100000S6,
00000100S3, 01000000S7,
00001000S4, 10000000S8.
The PLD ignores any unlisted bits.
For the parallel-port output register,
address 88810, D7, and D6, the PC tells
TABLE 1 CLOCKWISE-ROTATION
SEQUENCE
Step
0
1
2
3

A
1
0
0
1

B
1
1
0
0

C
0
1
1
0

D
0
0
1
1

TABLE 2 COUNTERCLOCKWISEROTATION SEQUENCE


Figure 1 A programmable-logic device, IC1, and a few additional components allow an IBM-compatible PCs parallel printer port to drive as many
as four external stepper motors and to sense the states of as many as eight
range-of-motion limit switches.

88 EDN | FEBRUARY 16, 2006

Step
0
1
2
3

A
1
0
0
1

B
0
0
1
1

C
0
1
1
0

D
1
1
0
0

designideas
the PLD which motor should run, with
00 for Motor 0, 10 for Motor 2, 01 for
Motor 1, and 11 for Motor 3. For D5,
the PC takes control of the PLD chip:
0 disables the PLD, and 1 enables the
PLD. For D4, the PC commands the
PLD to control the BSS registers contents, with 0 for hold and 1 for clear.
For D3 through D0, the PC selects
which pair of motor windings get energized: 1001A and D, 1100C and D,
0011A and B, and 0110C and B.
Parallel-port input-register, address
888101 indicates acknowledge, busy,
paper, or select. The PC reads acknowledge to determine whether a switch is
active: 0 means that any switch is
active, and 1 means that no switch is

active. The PC reads the


busy, paper, or select register to determine which
of the switches is active:
000S1, 011S4,
110S7, 001S2,
100S5, 111S8,
010S3, 101S6.
You can download Listing 1 for this Design
Idea from www.edn.com/
060216di3. Note that
the PCs portion of the
software is written in Pascal, and the PLDs internal software is written in
an emulated version of
Basic.EDN

L293
M0
D0
A

C
D2
7V

EN 1, 2

VSS

15

2 IN 1

IN 4

3 OUT 1 OUT 4 14

D0
A

C
D2
7V

TO
IC5

TO
IC4

D1
B

MOTOR 0

MOTOR 1

TO
IC6

MOTOR 2

MOTOR 3

Figure 3 To control a stepper motors direction


of rotation, energize the windings as shown in
tables 1 and 2.

M2
D0
A

EN 1, 2

VSS

16
15

2 IN 1

IN 4

3 OUT 1 OUT 4 14
GND 13

GND 12

GND 12

7
8

OUT 2 OUT 3
IN 2

IN 3

VS

EN 3, 4

EN 1, 2

2 IN 1

VSS

11
10
9

16
15

IN 4

3 OUT 1 OUT 4 14

D
D3
M0

C
D2
7V

6
7
8

GND

OUT 2 OUT 3
IN 2

IN 3

VS

EN 3, 4

L293
5V
D1
B

M3
D0
A

EN 1, 2

2 IN 1

VSS

11
10
9

16
15

IN 4

3 OUT 1 OUT 4 14

4 GND

GND 13

4 GND

GND 13

5 GND

GND 12

5 GND

GND 12

6
7
8

OUT 2 OUT 3
IN 2
VS

IN 3
EN 3, 4

11
10
9

D
D3
M1

C
A
TO IC6

4 GND

C
A
TO IC5

GND 13

GND

C
A
TO IC4

L293
5V

C
A
TO IC3

4 GND

L293
M1

16

TO
IC3

C
D2
7V

6
7
8

OUT 2 OUT 3
IN 2
VS

IN 3
EN 3, 4

11
10
9

5V
D1
B

D
D3
M2

5V
D1
B

D
D3
M3

Figure 2 Each half-bridge-driver circuit, IC3 through IC6, controls a single two-winding stepper motor.

90 EDN | FEBRUARY 16, 2006

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

D Is Inside

Op amp can source or sink current

76 Simple digital filter


cleans up noisy data

Alfredo H Saab and Steve Logan,


Maxim Integrated Products Inc, Sunnyvale, CA

When you design for electronics


applications, such as sensor or
amplifier bias supplies or special waveform generators, a controlled constantcurrent source or sink circuit can serve
as a useful building block. These circuits exhibit high dynamic-output
impedance and deliver relatively large
currents within an allowed range of
compliance voltage. You can implement a constant-current circuit with an
op amp and a discrete external transistor, but you can also design a bipolar
version of a current source or sink
around a single op amp and a few resis-

tors (Figure 1). The constant-current


sink circuits in Figure 1a through Figure 1c offer various compromises
between precision, dynamic impedance, and compliance range.
The circuit in Figure 1d describes a
bipolar current source with a simpler
feedback configuration than that of the
usual Howland-current pump, which
requires positive feedback and presents
variable input impedance. Figure 1e
shows a constant-current source. All of
these circuits exhibit excellent linearity of output current with respect to
input voltage.
OUTPUT
CURRENT
(SINK)

V+
_

OUTPUT
CURRENT
(SINK)

INPUT
VOLTAGE

V+
MAX4162
V
+
INPUT
VOLTAGE

INPUT
VOLTAGE

_
V+
MAX4162
V OUTPUT
+
CURRENT
(SINK)

100

V+
MAX4162
V
+

100
(a)

100

(b)

(c)

R1
100
V+

V+
R3
49.9k
INPUT
VOLTAGE

_
INPUT
VOLTAGE

R4
49.9k

V+
MAX4162
V OUTPUT CURRENT
+
(BIPOLAR DEPENDS
ON INPUT-VOLTAGE
SIGNAL)

R2
49.9k

R4
49.9k

R3
49.9k

R2
100

R1
100

_
V+
MAX4162
V
+
R5
49.9k

OUTPUT
CURRENT
(SOURCE)

(d)

(e)

Figure 1 This compendium of constant-current circuits includes current sinks


(a, b, and c), a bipolar sink or source (d), and a current source (e).

78 Single switch selects


one of three signals
80 Low-cost audio filter
suppresses noise and hum
82 Microprocessors singleinterrupt input processes
multiple external interrupts
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
The output from the circuit in Figure 1a includes an uncertainty due to
the op amps quiescent current, which
adds to the calculated output current.
For example, in most applications, you
can neglect the MAX4162 op amps
quiescent current of approximately 25
A. The circuit in Figure 1b behaves
similarly, but its quiescent current subtracts from the ideal output-current
value. The circuit in Figure 1c provides
a current sink with no quiescent-current error, and the circuit in Figure 1d
presents a bipolar outputthat is, it
sinks or sources currentdepending on
the polarity of the input voltage. Its performance depends on close matching
for the resistor pairs R1 and R2 and R3
and R4 and good tracking of the positive- and negative-power-supply voltages. Any difference between the
absolute values of the supply voltages
appears as an offset current at 0V input
voltage. To achieve insensitivity to
power-supply-voltage variations, the
current-source circuit in Figure 1e
requires close matching of resistor pairs
R2 and R3 and R4 and R5.
You can use the following equations
to calculate output currents for the cir-

MARCH 2, 2006 | EDN 75

designideas
cuits in Figure 1. Note that RLOAD
100 in these examples. In Figure 1a,
IOUTVIN/RLOAD25 A; in Figure
1b, IOUTVIN/RLOAD25 A; in Figure 1c, IOUTVIN/RLOAD; in Figure
1d, IOUT2VIN/RLOAD; and, in Figure 1e, IOUTVIN/RLOAD. The equation
for circuit 1d assumes perfect match-

esthat is, R3R4, R1R2, and V


V. It also assumes that R4 is much
greater than R1.
For a fixed value of output current in
each of the five circuits in Figure 1, the
graphs of Figure 2 show the circuits
dynamic impedance and range of useful output voltage (current compli-

5.002

5.002

5.001
OUTPUT
CURRENT
(mA)

5.001

VIN = 500 mV, AND


RDYNAMIC = 10 M.

OUTPUT
CURRENT
(mA)

4.999

4.998
1

VIN = 500 mV, V+ = 10V, AND


RDYNAMIC = 80 M.
5

4.999

4.998
1

10

OUTPUT VOLTAGE (V)

(a)

10

5.1

5.001

5.05
VIN = 500 mV
RDYNAMIC = 72 M.

OUTPUT
CURRENT
(mA)

4.999

4.998
1

OUTPUT VOLTAGE (V)

(b)
5.002

OUTPUT
CURRENT
(mA)

ance). The graphs show a high nominal output current of 5 mA to better


display the higher end of the currentamplitude range. Depending on your
application, you can optimize each circuits dynamic impedance and current
range through a judicious choice of op
amps and resistor values.EDN

VIN = 250 mV, V+ = 5V, AND


RDYNAMIC = 170 k.
5

4.95

4.9
5

10

4

3

OUTPUT VOLTAGE (V)

2

1

OUTPUT VOLTAGE (V)

(d)

(c)

5.1

5.05
OUTPUT
CURRENT
(mA)

Figure 2 These graphs show output current versus outputvoltage characteristics for the circuits in Figure 1. Note
that for b and c, the dynamic-output-impedance characteristic closely resembles that of an ideal current source:
VOUT/VIN .

VIN = 500 mV, V+ = 10V, AND


RDYNAMIC = 278 k.
5

4.95

4.9

(e)

Simple digital filter


cleans up noisy data
Richard Rice, Oconomowoc, WI

Many systems use an ADC to


sample analog data that temperature and pressure sensors produce.
Sometimes, system noise or other fac-

76 EDN | MARCH 2, 2006

tors cause the otherwise slowly fluctuating data to jump around. To reduce
higher frequency noise, designers often
install an analog RC (resistor-capaci-

OUTPUT VOLTAGE (V)

tor) lowpass filter between the sensor


and the analog-to-digital-conversion
stage. However, this approach is not
always ideal or practical. For example,
a long time constant of minutes would
require very large values for R and C.
Figure 1 shows an analog RC lowpass
filter and its design equations. As an
alternative, you can clean up noisy signals that remain within the ADCs lin-

designideas
ear range by using the digital equivalent
of an analog RC lowpass filter. The filters software comprises only two lines
of C code: LPOUTLPACC/K, where the
output value of the filter is LPACC divided by a constant, and LPACC
LPACCLPINLPOUT, where you add
the difference between input and output to update LPACC. You specify all
variables as integers.
Each time the analog-to-digital conversion acquires a new input sample,
LPIN, the software produces an output
value, LPOUT, which comprises a lowpass-filtered version of the input samples. Calculate the value of the constant, K, based on the sampling rate of
the system and the desired time constant for the filter as follows: K
TSPS, where K
1, and SPS is the
systems sampling rate. For example, for
a system-sampling rate of 200 sam-

ples/sec and a desired time constant of


30 sec, the constant K would equal
6000 samples. Applying a step change
to the routines input requires 6000
samples to reach approximately 63% of
its final value at the output.
The lowpass accumulator, LPACC,
can grow large for large time constants
and large input values. It can grow as
large as K times the largest possible
LPIN value. Under these conditions,
you need to make sure that LPACC does
not overflow, and you may need to
specify a larger data type to contain
LPACC. To avoid a long settling time
during start-up, before the start of the
sampling loop, you can initialize
LPACC to a value of K times the current
input value.
You can extend the basic filter concept presented to accommodate higher order filters with greater high-fre-

Single switch selects


one of three signals
Felix Matro, JL Audio Corp, Phoenix, AZ

This Design Idea shows how you


can use a single-pole momentarycontact switch to select one of three sig13

VCC
15V

12 IC2D

nal sources by scrolling through three


output states. The circuit in Figure 1
comprises commonly available compo-

INPUT

T=RC, AND F=1/(2 T),


WHERE T IS THE TIME CONSTANT
IN SECONDS, AND F IS THE
CUTOFF 3-dB FREQUENCY.

Figure 1 In some circumstances,


a classic RC lowpass filter does
an adequate job of removing
noise from signals.

quency rejection by executing multiple


filter code segments in sequence. Also,
you can use an array of variables for
LPACC and an array of values of the constant K to filter signals that multiple
data channels acquire.EDN

nents from the CD4000 CMOS-logic


series, along with a general-purpose
NPN transistor. The total cost of the
components doesnt exceed $1. Only
one of circuits three outputs, CH1, CH2,
or CH3, goes low at any given time, and
you can use these outputs to control analog switches, relays, or the gates of JFET
switches. As long as you apply power, the

11

CD4011BCM 4

10

6
IC2B 5

8
IC2C 9

CD4011BCM

CD4011BCM

R2
4.75k
1%

R1
1M
1%
IC1B
CD4093B
5
4
C1
0.1 F

OUTPUT

14

2 IC2A

R3
47.5k
B 1%

R4
E Q1
2N3904 47.5k
1%

R5
100k
1%

IC1A
CD4093B 14
1 V
2
C2
0.1 F

S1

NOTE: S1 IS AN SPST NORMALLY OPEN PUSHBUTTON SWITCH.

CC

GND
7

9
16
10 SET VDD 15
J
IC3A
Q
11
K CD4027B
14
3 13
Q
CLK
RESET VSS
12

7
SET
6
J
IC3B
Q 1
5
K CD4027B
2
3
Q
CLK
RESET
4

1 14
2 IC4A

7 CD4011BCM 7

6
5 IC4B

CD4011BCM
8
10
9 IC4C
CD4011BCM
13
11
12 IC4D
CD4011BCM

Figure 1 A handful of active and passive components form a one-of-three selector switch. Press switch S1 once to
advance to the next channel and twice more to revert to Channel 1.

78 EDN | MARCH 2, 2006

CH1

CH2

CH3

designideas
selected output does not change, making the circuit a good choice for applications requiring nonvolatile operation.
Quiescent-current consumption averages only about 15 A at room temperature, 25 C, a low value even for batterypowered applications.
The heart of the circuit comprises a
dual JK flip-flop, IC3, thats configured
as a 2-bit ripple counter. Without additional circuitry, the counter would allow
selection of four signal sources. Upon
initial application of power, a reset circuit comprising R1, C1, and IC1B always
sets the CH1 output to a logic-low level.
When the Q outputs of IC3, pins 2 and
14, both go to logic zeros, the feedback
chain comprising IC2A, IC2B, IC2C, and

R5, C2, IC1A, AND


NORMALLY OPEN
MOMENTARY-CONTACT
SWITCH S1 CONSTITUTE
A DEBOUNCED SWITCH
THAT PROVIDES CLOCK
PULSES FOR BOTH SECTIONS OF THE COUNTER.
IC4A pulls Q1s base to a logic-high level,
which in turn pulls one input of IC1B to
a logic low. This action causes the counter to skip the 00 state and advances the

Low-cost audio filter


suppresses noise and hum
Richard M Kurzrok, RMK Consultants, Queens Village, NY

The low-cost composite passive


filter in this Design Idea requires
no dc power and can enhance the performance of audio equipment and
instrumentation by rejecting powersupply hum and spurious pickup from
AM, FM, and low-band VHF transmissions (Figure 1). The composite filter comprises a cascade of three simple
filters: a T-section highpass filter to
reject power-source hum and two section lowpass filters to reject spurious
RF signals. As a starting point, the
three filter sections present a lossless
0.01-dB Chebyshev response at a 50
impedance level, but you can scale the
components values to meet other
impedance requirements.
Table 1 lists the components the prototype filter uses. With the exception
of inductor L3, all the components are
standard values that are available off
the shelf. Switch S1 provides a bypass
mode that permits rapid frequencyresponse measurements without connection and disconnection of the prototypes BNC connectors. To construct

80 EDN | MARCH 2, 2006

the prototype, wire all components to


a section of perforated breadboard stock
supported by metal spacers that mount
inside a die-cast aluminum enclosure.
This method of shielded construction
has proved its worth in other laboratory-accessory applications (Reference
1). Table 2 lists the filters measured
insertion loss over a range of 40 Hz to
200 MHz.
Low-cost polarized electrolytic capacitors C1 through C6 provide rea-

count to the 01 state. Components R5,


C2, IC1A, and normally open momentary-contact switch S1 constitute a
debounced switch that provides clock
pulses for both sections of the counter,
IC3. When a user pushes S1, the counter advances to the 10 state, and a subsequent push advances the counter to
the 11 state. A third push restarts the
cycle. To summarize, IC4B decodes the
counters 01 state and pulls CH1 low,
IC4C decodes the counters 10 state and
pulls CH2 low, and IC4D decodes the
counters 11 state and pulls CH3 low.
The layout of the circuit should be noncritical, but use a low-leakage capacitor
for C1. Connect unused logic inputs to
ground or VCC as appropriate.EDN

sonable performance, but observe


input polarity for signals with a dc component. For a modest increase in cost
and assembly time, you can enhance filter performance and reproducibility by
selecting the values of these capacitors
to meet a 10% or better tolerance. For
best results, use nonpolarized filmdielectric capacitors for C1 through C6.
For noncritical applications, you can
relax the tolerances for the remaining
capacitors and use off-the-shelf inductors for 22-mH L1, 0.68-mH L2, and 3.9H L3.
Redesigning the filter to match the
600 impedance that you find in classic audio circuits would increase the

TABLE 1 COMPONENTS IN THE PROTOTYPE FILTER


Reference
designators
C1, C2, C4, C5
C3, C6
C7, C9
C8, C10
C11, C12
L1
L2
L3
S1
J1, J2
NA

Values
10 F
4.7 F
0.15 F
0.033 F
0.001 F
22 mH
0.68 mH
3.85 H
NA
NA
NA

Description
50V electrolytic capacitor, 20% tolerance
50V electrolytic capacitor, 20% tolerance
Polypropylene capacitor, 2% tolerance
Polypropylene capacitor, 2% tolerance
Polypropylene capacitor, 2% tolerance
Inductor, 5% tolerance
Inductor, 10% tolerance
Inductor, 27 turns of AWG #28 magnet wire hand-wound
on T37-2 mixture (Carbonyl E) toroidal core
DPDT panel-mounted toggle switch
50 BNC panel jack
Hammond 1590H-BK die-cast aluminum enclosure

designideas

L1
22 mH

C5
10 F
+

+
+

C2
10 F

50
OUTPUT
IMPEDANCE
J2

L3
3.85 H

L2
0.68 mH

C4
C6
10 F 4.7 F

C1
C3
10 F 4.7 F
+

50
INPUT
IMPEDANCE
S1
J1

C7
0.15 F

C9
C8
0.033 F 0.15 F

C10
0.033 F

C11
0.001 F

C12
0.001 F

HIGHPASS FILTER
20-kHz LOWPASS FILTER
4-MHz LOWPASS FILTER
NOTES:
BOTH GROUNDS CONNECT TO CHASSIS.
WHEN S1 IS IN THE UP POSITION, IT BYPASSES THE FILTER; WHEN IT IS IN THE DOWN POSITION, IT INSERTS THE FILTER.

Figure 1 A highpass filter and two lowpass filters help reduce or eliminate low-frequency hum and high-frequency noise
from audio signals.

inductors values by an order of magnitude, which would increase the


inductors dimensions and costs. An
alternative design approach could use
cascaded active-RC filters, which
would pave the way for their inclusion
into completely integrated compositeaudio filters.EDN
REFERENCE
1 Kurzrok, Richard M, Simple LabBuilt Test Accessories for RF, IF,
Baseband, and Audio, High Frequency Electronics, May 2003, pg 60.

TABLE 2 FILTER INSERTION LOSS


Frequency
(kHz)
0.04
0.07
0.1
0.2
0.3
0.5
1
2
5
10
15
20
30
50

Insertion loss
(dB)
45.2
35.4
29.4
17.3
10.9
5.5
2.7
2
1.9
2.1
2.7
4.5
11.7
24.5

Microprocessors single-interrupt input


processes multiple external interrupts
Abel Raynus, Armatron International Inc, Malden, MA

On the lower end of the performance spectrum, many


widely available and inexpensive
microcontrollers pay for their small
pc-board footprints by omitting functions. For example, most low-end
processors provide only one externalinterrupt input pin and only one
address vector in memory for the service routine that processes external
IRQs (interrupt requests). However, a

82 EDN | MARCH 2, 2006

project occasionally requires that several interrupt-service programs must


process multiple external interrupts
from various sources. Cost and inventory constraints may make it undesirable to choose another microcontroller whose only advantage is the
availability of a few more interrupt
pins.
For example, Freescale Semiconductors (www.freescale.com) popular

Frequency
(MHz)
0.1
0.3
0.5
1
2
3
4
5
10
25
50
100
150
200

Insertion loss
(dB)
42.3
60
60
55.5
52.2
51.1
56.2
60
46.5
44
40.5
39.5
45
44

Nitron family of flash-memory microcontrollers, such as the MC68HC908QT and QY, offer only one IRQ
input pin. You can use one-time-programmable versions of the family,
such as the MC68HC705KJ1 or MC68HC705J1A, that offer five external-interrupt inputs but omit some of
the familys valuable functions, such
as flash memory, built-in analog-todigital conversion, and an advanced
instruction set. You could also select
a larger microcontroller, such as the
MC68HC908JL3, from the same
product family to gain eight externalinterrupt inputs at the expense of sig-

designideas
nificant increases in cost and pc-board
area.
This Design Idea offers an alternative
that retains the small processor and
adds extra interrupt inputs. The technique involves applying the interrupt
signals to an AND gate to generate an
IRQ signal and using the microcontrollers inputs to recognize the interrupts source. For example, consider the
four external-interrupt sources in Figure 1. If you apply no interrupt signals
and if all of the AND gates inputs rest
at logic ones, the IRQ level also
remains at logic one. Applying an interrupt signal (a logic-zero level) to any
one of four inputs, INT1 through
INT4, drives the gates output to a low
level and triggers the interrupt. The
interrupt-service routine recognizes
the interrupts source by testing the levels of input pins PA0, PA1, PA4, and
PA5 and executing the corresponding
interrupt-service routine.
The MC68HC908QY2 microcontroller, IC1, includes built-in pullup

resistors that eliminate the need for


external resistors, and you can use an
inexpensive and readily available
74LS21 for IC2. For demonstration purposes, this circuit displays the address
of an incoming interrupt by lighting
one of four corresponding LED indicators for 3 sec. The software routine in

Listing 1 that assigns a priority to each


interrupt uses the standard set of assembler instructions and can apply to any
microcontroller. You can download
Listing 1, as well as the samples assembler code and its accompanying table of
equations (Listing 2), from www.edn.
com/060302di1.EDN
5V

14
INT 1
INT 2
INT 3
INT 4

1
2
4
5

1
IC2A
1/ 74LS21
2
7

PB0
6

15

LED1

9 IRQ
PB1
IC1
MC68HC908QY2
13
PA0
12
PA1
5 PA4
4
PA5

PB2

14

11

PB3 10
16

LED2

LED3

LED4

NOTE: LED1 TO LED4 ARE KINGBRIGHT CORP'S


W934GD-5V WITH BUILT-IN RESISORS FOR OPERATION AT 5V.

Figure 1 An external AND gate plus a software routine expand a microcontrollers single interrupt input into four inputs.

MARCH 2, 2006 | EDN 83

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Audio-test accessory
isolates and matches loads

D Is Inside
78 One oscillator drives
multiple solid-state relays

Richard M Kurzrok, RMK Consultants, Queens Village, NY

Connecting a 600 audio circuit


to a 50 or 75 circuit or test
instrument requires an impedancematching circuit or, when isolation of
the circuits is necessary, a transformer.
Both approaches offer advantages and
disadvantages. A conventional transformer can match impedances with low
typical losses of 1.5 dB, provide dc isolation, and operate from either a balanced or an unbalanced, 600 primary
circuit. A high-quality transformers pass-

band can accommodate an audio-frequency range of 300 Hz to 15 kHz with


minimal amplitude variation. However,
transformers that can match 600 to 50
or 75 may not be readily available or
may command a cost premium.
A minimum-loss, fixed-value impedance-matching circuit, or pad, provides frequency-invariant audio-impedance transformation and can comprise as few as two resistors. Although
a pad can provide useful impedance

TABLE 1 INSERTION LOSS VERSUS FREQUENCY


Frequency
(kHz)
0.1
0.3
0.5
1
2
5
10
20
50
100

Insertion loss (dB)



600 to 50
11.7
10
9.5
9.2
9
8.9
8.8
8.8
8.9
9.5

Insertion loss (dB)



600 to 75
8.7
7
6.7
6.5
6.3
6.1
6.1
6
6.1
6.7

SELECT OUTPUT IMPEDANCE


J1

600

100

R2
71.5

S1

J2
TO 50 LOAD

T1

600
INPUT

R1
71.5
CT (NOT USED)

R4
49.9

CT (NOT USED)

J3
TO 75 LOAD

R3
150
NOTES:
ALL GROUNDS CONNECT TO CHASSIS.
COAXIAL CONNECTORS J1, J2, AND J3 ARE AMPHENOL PART NO. 31-10-RFX.
IF MECHANICAL COMPATIBILITY WITH 75 BNC SERIES CONNECTORS IS NECESSARY,
REPLACE J3 WITH AN APPROPRIATE CONNECTOR.

Figure 1 A handful of passive components creates a handy test fixture for matching
impedances in audio-test circuits.

80 Low-dropout linear regulators


double as voltage-supervisor
circuits
84 External components provide
true shutdown for boost converter
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
matching, it introduces a significant
insertion loss of 14.8 dB for a 600-to75 transformation or 16.6 dB for a
600-to-50 transformation, either of
which might impose an unacceptable
loss of dynamic range.
Part of a suite of test accessories, this
low-cost, switchable, dual-impedance
transformation circuit comprises a single conventional transformer and two
minimum-loss pads (Reference 1). A
single inexpensive, conventional transformer steps down the 600 primary
input impedance to an intermediate
impedance level of 100 (Figure 1).
Switch S1 selects a 100 to 50 or a 100
to 75 minimum-loss pad. Construction of the unit involves noncritical
point-to-point wiring, although this
design uses a Hammond 1590LB diecast-aluminum box to provide shielding and a rugged enclosure to support
three Amphenol (www.amphenolrf.
com) RFX series BNC panel-mounted,
insulated-frame input and output
jacks. T1 is a Mouser Electronics
(www.mouser.com) 42TM031 audio
transformer, and the resistors are 0.5W,
metal-film units with 1% tolerances.
With quantity discounts, the overall
bill-of-materials cost is less than $20.
To verify frequency response and

MARCH 16, 2006 | EDN 77

designideas
attenuation in a 600 test setup, connect two identical units back to back
through their 50 or 75 terminals. You
obtain the measured data (Table 1) for
a single unit by halving the 600-to600 transmission-loss measurements.
Calculated insertion loss for the 100
to 50 minimum-loss pad is 7.7 dB, and
insertion loss for the 100 to 75 minimum-loss pad is 4.8 dB. Subtracting
these values from the measured losses
indicates that the transformer con-

tributes a midband loss of 1.3 to 1.5 dB.


Insertion loss due to stray coupling from
the selected output port to an unused
output exceeds 40 dB. Combining a
conventional transformer with two
minimum-loss pads takes advantage of
the best of both techniques.
The low-cost transformer contributes moderate insertion losses and
provides dc isolation and good frequency response. In addition, the
transformers low-frequency roll-off

One oscillator drives


multiple solid-state relays
Juan Ramn Vadillo Pastor, SOR Internacional SA,
Saint Quirze Del Valles, Barcelona, Spain

Thanks to a combination of low


initial cost and low on-resistance, a conventional electromechanical relay often makes sense for switching large amounts of load current on
and off and when proportional control
of the loads current or voltage is unnecessary. Low cost and low on-resistance represent the main reasons that
relays still enjoy widespread use in the
industry. In addition, a relay remains
useful for switching high-voltage ac
under the control of low-voltage electronics, due to the high degree of isolation between the control and the
load circuits.
However, although relay technology
has matured and offers proven performance, the relay remains a mechanical device that suffers from wearing out
and other failure modes. Electrical
endurance of the relays contacts
imposes a limit on the number of
switching cycles. When a relays contact opens, interruption of the current
in an inductive load causes a spark that
deteriorates the contacts performance.
When switching high currents, a relay
may reach the end of its operating lifetime in as few as 100,000 actuation
cycles.

78 EDN | MARCH 16, 2006

As an alternative to a conventional
relay, a series-connected pair of MOSFETs can replace a contact in an ac circuit (Figure 1). A pair of IRF530
devices switches loads in circuits with
peak maximum voltages as high as
100V. Based on the well-known 555
timer, an astable oscillator, IC1, provides a source of square-wave voltage to
drive the MOSFET pairs gate. Resistors R1 and R2 provide charge and discharge paths for timing capacitor C1.
The 555s output stage can sink and
source several tens of milliamperes and
provide enough current to drive as
many as 10 stages simultaneously operating switch gates, each consuming 5
mA of peak current; the 555s output
sinks a maximum of 50 mA at an onstate maximum voltage of 0.75V. The
555s output drives a distribution bus
that provides power to an array of pulse
transformers, T1 and T2. Capacitor C3
in series with the transformers primary
removes the dc offset voltage that
would otherwise appear across the
winding.
Selection of the transformer is not
critical, and any ferrite-core pulse
transformer that can provide gate voltage to the MOSFETs and maintain a

helps reduce 60-Hz hum and low-frequency noise. The electrically isolated
input jack allows connection of the
transformers input to balanced or
grounded 600 sources.EDN
REFERENCE
1 Kurzrok, Richard M, Simple LabBuilt Test Accessories for RF, IF,
Baseband, and Audio, High Frequency Electronics, May 2003, pg 60.

safe level of voltage isolation can function in the circuit. For example, you
can use C&D Technologies (www.
cdtech.com) 76601/3, which provides
a 1-to-1 turns ratio at a primary inductance of 219 H with 500V-dc interwinding isolation.
Applying a control signal to the base
of general-purpose NPN switching
transistor Q3 allows collector current to
flow through the primary of its associated transformer. Diode D2 provides a
reverse-current path through the
winding. On the secondary side, diode
D1 rectifies the secondary voltage and
charges capacitor C4, which filters the
rectified voltage to improve noise
immunity and reduce voltage ripple at
the MOSFETs gates. Removing the
control signal switches off Q1 and Q2.
Resistor R3 provides a discharge path
for C4, allowing the MOSFETs to
switch off in approximately 3 msec. For
faster turn-off, you can reduce the value
of either C4 or R3 at the expense of
increased ripple on the rectified gate
voltage.
Using two series-connected MOSFETs allows bidirectional ac conduction through the pair. When the
MOSFETs are off, their parasitic
diodes connect in series opposition
and thus block conduction. You can
select from among a range of MOSFETs to match your applications
requirements, but make sure that the
voltage you apply to the gates of Q1
and Q2 is sufficient to fully switch

designideas
both devices into full conduction.
The IRF530 has a gate threshold voltage of 3V, but applying a gate-source
voltage of 10V ensures low on-resistance. You can adjust the gate-source
voltage by altering the transformers
turns ratio or IC1s power-supply volt-

age within its 4.5 to 16V rating (references 1 and 2).EDN


REFERENCES
1 Transformer-isolated gate driver
provides very large duty cycle ratios,
Application Note 950, International

Rectifier Co, www.irf.com/technicalinfo/appnotes/an-950.pdf.


2 Balogh, Laszlo, Design and application guide for high speed MOSFET
gate drive circuits, Texas Instruments,
2002, focus.ti.com/lit/ml/slup169/
slup169.pdf.
BIDIRECTIONAL-CURRENTCONDUCTION PATH

TO ADDITIONAL
CIRCUITS

FROM
SOURCE

TO LOAD

Q1
IRF530
9V

C3
220 nF

T1

D1
1N4148

IC1
NE555P

CONTROL
SIGNAL
1

4
RESET
2
6
7
R2
3.3k
C1
1 nF

R4
4.7k
D2
1N4148

Q3
5V BC547B

0V

TRIGGER
THRESHOLD

FROM
SOURCE

DISCHARGE
CONTROL

C2
1 nF

C4
10 nF

R3
100k

R1
8.2k

Q2
IRF530

OUTPUT

60 kHz

TO LOAD
Q4
IRF530

C5
220 nF

T2

D3
1N4148

C6
10 nF

Q5
IRF530

R5
100k
CONTROL
SIGNAL
2
0V

R6
4.7k
Q6
5V BC547B

D4
1N4148

Figure 1 A single 555 oscillator provides square-wave ac gate drive to an array of as many as 15 MOSFET-based solidstate relays.

Low-dropout linear regulators double


as voltage-supervisor circuits
William Lepkowski, On Semiconductor, Tucson, AZ
Many low-dropout voltage regulators include an enable-input
pin that can also serve as an inexpensive alternative to a voltage-supervisor
IC. Although the enable pin normally serves as a means of shutting down
the regulators output to save power, a

80 EDN | MARCH 16, 2006

few discrete components ensure that


the regulators output will turn on and
off at appropriate input voltages.
Thus, you can use the circuit as a voltage supervisor or as a controlled-characteristic linear-voltage regulator.
A typical low-dropout regulators

internal enable circuit comprises a


voltage comparator that determines
whether the voltage at the enable pin is
either larger or smaller than an internal
reference voltage, VREF. Although you
can create a low-dropout voltage supervisor by directly connecting the enable
pin to the unregulated input voltage, this
circuits turn-on and turn-off voltages
equal the reference voltage, which typically falls below the minimum operating voltage that most ICs powered by
the regulators output require.

designideas

Figure 1 Connecting a low-dropout regulators enable


pin directly to the unregulated voltage input forces the
output voltage to track the input voltage during the regulators turn-on and turn-off intervals.

D1
1N5817
CIN
10 F

VOUT

VIN

VIN+
R1
15k

CD
0.22 F

NCP500

VOUT+

COUT
1 F

ENABLE
GND

Figure 2 An alternative to directly connecting the regulators input and enable pins, this conventional modification uses a resistor and a capacitor to delay the regulators turn-on time. The diode eliminates the powerdown delay interval.

In addition, directly connecting the enable pin to the


unregulated input doesnt provide a turn-on delay to ensure
that the input voltage has reached a value higher than the
low-dropout regulators dropout voltage. The directly connected circuit has unsatisfactory power-up and power-down
characteristics (Figure 1). As a first-order improvement,
you can enhance the circuits performance by adding R1,
CIN, and D1 to provide a start-up delay for the voltage regulators enable pin (Figure 2). Unfortunately, the external
delay network improves the outputs rising-edge characteristic, but its falling edge continues to track the input voltage (Figure 3).
You can solve the circuits shutdown problem by replacing the single resistor with a voltage-divider network
(Figure 4). Resistor R2 raises the switching threshold of
the regulators enable pin and tricks the enable comparator into turning on at a higher voltage. The regulators output then exhibits an adequate start-up delay and

82 EDN | MARCH 16, 2006

Figure 3 The added components in Figure 2 eliminate


the problem of rising-edge output-voltage tracking.
However, the falling-edge output voltage still tracks the
input voltage.

VOUT

VIN

VIN+
D1
1N5817
CIN
10 F
R2
27k

R1
8k

VOUT+

NCP500
COUT
1 F
ENABLE
GND

CD
0.22 F

Figure 4 Resistor R2 increases the enable pins switching threshold voltage.

Figure 5 The addition of R2 in Figure 3 solves the fallingedge problem, and shutdown occurs immediately after
the input voltage drops too low. The regulators output
switches on only after sufficient voltage is present at its
input.

designideas
cleanly switches on and off (Figure 5).
You can use Equation 1 to calculate
the values of resistors R1 and R2 to alter
the enable pins threshold voltage in
the circuit in Figure 4.

(2)

If you select a value of 8 k for R2, then


R13.3R2, or approximately 27 k.
Equation 1 calculates only approximate values for the voltage-divider resistors, which may vary slightly depending
on the voltage regulators characteristics. If the resistors values are too low,
the regulated output tracks the input, a
problem that you can easily solve by
increasing the value of R1. Also, R1 and
CD determine the regulators turn-on
delay time, and CDs capacitance
should ideally be 0.01 to 0.47 F. Too
large a value increases the discharge
time and reduces the circuits effectiveness as a voltage supervisor.EDN

rent from the activated boost-converter circuit.


For optimum results at high load currents, select a logic-level MOSFET for

Q1 that presents a reasonably low onresistance.. The MOSFETs drain-tosource breakdown voltage should also
be able to withstand at least twice the
maximum output voltage you expect
from the boost converter. If necessary,
you can reduce the MOSFETs effective
on-resistance by connecting two or
more MOSFETs in parallel.EDN

falling-edge trip-point voltage. For


example, VIN(TURN-ON)4V, VEN(RISING)
0.89V, and VEN(FALLING)0.85V. To prevent the regulated output voltage from
tracking the input, set the minimum
value of VIN(TURN-ON) to VOUT
VDROPOUT, where VDROPOUT is the dropout voltage.

(1)
where VIN(TURN-ON) is the user-defined
turn-on voltage, VEN(RISING) is the
enable pins rising-edge trip-point voltage, and VEN(FALLING) is the enable pins

External components provide


true shutdown for boost converter
Navid Mostafavi, Maxim Integrated Products Inc, Sunnyvale, CA

The step-up switching-converter circuit in Figure 1 presents a


familiar problem: If you shut down
boost converter IC1 by pulling its
SHDN input low, external inductor L1
and forward-biased Schottky diode D1
allow the load to continue drawing current. For battery-powered applications
that present a heavy load300 mA, for
examplethis unwanted dc-current
path may quickly drain the battery.
Adding an N-channel MOSFET, Q1,
and a 100-k resistor, R1, solves the
problem by opening the unwanted current path during shutdown. The
resulting circuit is suitable for batterypowered-system applications in which
a microcontroller handles the power
management.
Asserting a low logic level on the
SHDN input simultaneously shuts
down the switching converter, a
MAX756, and turns off the MOSFET,
thereby blocking load current by
removing the loads ground connection. When the SHDN signal deasserts, the 100-k pullup resistor
turns on the MOSFET by pulling the
MOSFETs gate high. With its ground
reconnected, the load then draws cur-

84 EDN | MARCH 16, 2006

INPUT
2V TO VOUT

C2
150 F

L1
22 H

5
LBI
1

NC

3
C1
0.1 F
SHDN
INPUT

SHDN

3/5

IOUT
LX 8

IC1
MAX756
OUT

LBO

REF
GND
7

D1
1N5817

LOW-BATTERYDETECTOR
OUTPUT

C3
100 F
LOAD

VOUT
R1
100k

D
Q1

G
S

Figure 1 Adding R1 and MOSFET Q1 to this step-up-converter circuit enables the


SHDN control to impose a true shutdown that blocks load current when boost
converter IC1 switches off.

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

On/off buffer switches


analog or digital signals

D Is Inside
96 Single switch serves dual duty
in small, microprocessor-based
system

Liviu Pascu, Kepco, Flushing, NY

Many applications require a


method of switching an analog
or a digital signal on or off under digital control. A wish list of specifications for such a switch might include
attenuation of less than 90 dB when the
switch is in its off-state, distortion of no
more than 0.002% when the switch is

in its on-state, and the ability to


respond to an on or an off command in
10 sec or less. In addition, the circuit
should accommodate positive- or negative-going signals, and no turn-on or
turn-off overshoot should occur for
either signal polarity. The list might
also require that the circuits control
15

15V
C1
100 nF

POSITIVE
OFFSET

15V

R5

R4
10k

1
NC
IC1
6
LT1007
2 _
NC
8
C2
4
100 nF
15
R2
20k

R1
20k
INPUT

NEGATIVE
OFFSET

R3
1k

OUTPUT

C3
100 pF
1

COM1

15

ON/OFF
CONTROL

10

16

NC1

IN1

IC2A

IN2

IC2B

NC2

IC2
MAX301

98 Isolated-FET pulse driver


reduces size, power consumption
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
input must accept digital signals from
most logic families and that the circuits
SNR should exceed 90 dB.
The circuit in Figure 1, comprising
IC1, a low-noise, high-speed, precision
Linear Technology LT1007 operational amplifier and IC2, a Maxim
MAX301 dual SPST, normally open
analog switch, fulfills these requirements. In the circuit, VIN is the input
voltage, and VOS and IOS represent
operational amplifier IC1s voltage and
current offsets of either polarity. IOFF
represents the off-state leakage current
of either section of analog switch IC2.
In the buffer circuit, RR1R2, and
R4R/2. Hence, R(R1R2)/(R1
R2)R4.
If all resistors were identical in value,
R would equal zero. However, each
resistor exhibits its own tolerance error,
and the equation for R expands to:

BUFFER:
0=ON;
1=OFF.
V+
11
5V
15V

VL
12

C5
100 nF

GND
13

C6
100 nF

COM2
8

14

C4
100 nF

15V
D2
1N4148

D1
1N4148

Figure 1 This buffered switch can accommodate either analog or digital signals.

where e1 through e4 are maximum tolerance errors of 1%. Worst-case values for R occur when the tolerance
values e1 and e2 for R1 and R2 are of the
same sign and e4 for R4 has the opposite sign:

MARCH 30, 2006 | EDN 95

designideas
Simplifying further, RR|e|}
{(0.01)R} when you use 1%-tolerance
resistors for R1, R2, and R4. The combination of the resistors tolerances with
the operational amplifiers internal
errors and leakage effects from switches IC2A and IC2B determines the buffers
accuracy. When the circuit is on, both
IC2A and IC2B are open. The following
equation defines the circuits output
voltage:

Simplifying further, you can calculate


VOUT(ON) as: VOUT(ON)(VIN)
VOS((IOS)(R))((IOFF)(R)).
Most of todays solid-state switches
present an IOFF of less than 1 nA, and
you can select an op amp for IC1 whose
VOS is less than 50 V and whose IOS
is less than 50 nA. Thus, for the resistor values in Figure 1, the maximum
error for the amplifiers on-state is
approximately 80 V, or 0.0008%,
when referred to a 10V nominal output.
You can determine the minimum
allowable value of the amplifiers load
resistance by solving the following
equation:

where VSAT represents the op amps


maximum saturated output voltage
usually, 13.5V for 15V power-supply

voltages. For example, using the resistor values in Figure 1 and assuming a
maximum output voltage of 10V, you
can calculate a minimum allowable
load resistance of 3.3 k.
Also, IAMP, the current from IC1,
should be less than the devices specified maximum current output: IAMP
(VOUTMAX)[(1/R2)(1/RLOAD)].
Using these values, you can determine that IAMP is 3.5 mA, which is less
current than most op amps as sources
deliver. When the amplifier is off,
switches IC2A and IC2B are closed. In
this state, the worst-case output occurs
for VINMAX. IC1s offset errors are negligible with respect to the full-scale input
voltage. Therefore, for the real case in
which the on-resistance of IC2A and
IC2B is much less than the load resistance, the following equation defines
the circuits output voltage: VOUTOFF
[(VINR2RONRON)/(K1K2K3
K4)], where K1R1R2R3, K2
R1R3RON, K3R1RONRON, and
K4R1R2RON. For R1R2R
and RONR, and RONR3, the
equation simplifies to: VOUTOFF
[(VINRONRON)/(RR3)].
Many of todays analog switches present a maximum 20 on-resistance, and,
using the resistor values in Figure 1 and
an input voltage of 10V, you can calculate that output voltage to be approximately 200 V, or 0.002%, when
referred to a 10V nominal output.
Amplifier IC1s slew rate limits the circuits dynamic behavior, because analog
switch IC2 generally switches in much
less than 1 sec. Using an operational
amplifier with a slew rate of 1.5V/sec
yields a circuit-response time of 10 sec.
For applications that require unipolar outputs when the amplifier is in its

Single switch serves dual duty


in small, microprocessor-based system
Steve Hageman, Windsor, CA

Traditional control-system designs use separate switches to


control power and various system func-

96 EDN | MARCH 30, 2006

tions, but adding a few components to


a small, microprocessor-based system
can combine a control function with

off-state, you can add a known outputoffset voltage by connecting resistor R5


between the buffers output and the
power-supply voltage of the same
polarity as the desired offset voltage.
Note that IC1s output must be able to
sink current. Adding resistor R5 doesnt affect the circuits output voltage in
its on-state because the closed-loop
gain lowers the amplifiers output
impedance.
To analyze the circuits offset output
voltage, assume that IC2A and IC2B present an on-resistance thats much less
than RLOAD, R2, and R5. The following
equations define the circuits positive
and negative offset-output voltages,
VOUT(OS) and VOUT(OS), respectively:

To make the offset voltage less


dependent on the input signal, calculate the maximum value for R5 as:

Using the resistor values in Figure 1,


solving this equation produces a minimum reliable offset voltage of 2 mV;
the value of R5 must be 150 k or less.
The maximum current-sinking ability
of IC1 determines the minimum value
of R5.EDN

the systems on/off switch. For example,


you can design a system to display relative humidity and temperature (Reference 1). This small, battery-powered
system requires a microprocessor-controlled on/off power switch, which you
implement with a pushbutton, and a
function switch to change the display
from degrees Celsius to degrees Fah-

designideas
Q1
TP0610T

R1
10k

9V
SYSTEM
BATTERY
ON/OFF AND MODE
PUSHBUTTON SWITCH

R2
100

IC1
VOLTAGE REGULATOR
LP2931AZ
VR
1
3
INP
OUT
C3
10 F

Q2
2N7000

COM

5V
R3
100

C4
10 F
C5
0.1 F

C1
0.1 F

NC

S1
SPDT MOMENTARY
CONTACT

R5
10k
NO

5V

R4
10k
MODE

TO MICROPROCESSOR
INTERRUPT INPUT

C2
0.1 F

MICROPROCESSOR
I/O LINE

A0

VDD B0

A1

B1

A2

B2

A3
A4

IC2 B3
B4

A5

B5
B6

Figure 1 A single pushbutton switch can control power and select among operating modes in a simple microprocessorbased system.

renheit, which you implement as a toggle switch. From ease-of-use and totalcost perspectives, combining these two
functions in a single switch makes
sense.
Figure 1 shows a circuit for this application. Initially, Q1, a P-channel
MOSFET, is off because R1 holds Q1s
gate-to-source voltage at 0V. No input
reaches voltage regulator IC1, and,
thus, the systems microprocessor, IC2,
also remains off. When the operator
presses the normally closed momentary-contact pushbutton switch, S1,
current flows through R1 and R2 to
ground, developing sufficient gate-tosource voltage to turn on Q1 and apply
power to voltage regulator IC1 and the

microprocessor. Capacitor C1 debounces the switch contact and


ensures that Q1 remains on long
enough to start the microprocessor,
regardless of how quickly the user presses and releases the switch. In addition,
as its final task, the start-up firmware
initializes the systems LCD, thus reinforcing the operators tendency to hold
the power switch in its on position long
enough to ensure full start-up.
Immediately after the microprocessor
powers up, it begins executing its
firmware and turns on Q2, an N-channel MOSFET, by delivering a logic one
of more than 3V to Q2s gate. In turn,
Q2 keeps Q1 switched on, and the system runs under software control. If the

Isolated-FET pulse driver reduces


size, power consumption
Jos M Esp, Rafael Garca-Gil, and Jaime Castell,
Electronic Engineering Department, University of Valencia, Spain

Three-phase controlled rectifiers


and inverters, matrix cycloconverters, and cascaded power stages typically comprise large numbers of power
transistors, each with its own driver circuit. The circuit in Figure 1 drives a
capacitive-input power device, such as
a MOSFET or an IGBT (insulated-gate

98 EDN | MARCH 30, 2006

bipolar transistor) with pulses of all


duty cycles at frequencies of 1 to 200
kHz. A single transformer provides galvanic isolation, and the circuit consumes little power from its 15V primary-side power supply. Tested satisfactorily using several MOSFETs and
IGBTs with input capacitances as high

operator again presses the on/off button, Q1 remains on, and the microprocessor continues to run but pulls its
mode line high. The mode line drives
an interrupt input pin, and the software
can use the interrupt as a toggling function or to access a wraparound, multiple-choice menu. After a suitable preprogrammed time interval, the microprocessor system turns itself off by placing a logic zero on Q2s gate. In turn, Q2
switches off Q1 to remove power from
the system.EDN
REFERENCE
1
Hageman, Steve, Relative humidity/temperature meter, www.analog
home.com/projects/dewpointer.html.

as 5 nF, the driver can accommodate


higher current power transistors by
resizing the drivers transistors and coupling transformer and a few passive
components.
Transistors Q1 and Q2 transmit pulses of approximately 1-sec duration
through coupling transformer T1 to
transistors Q3 and Q4, which respectively charge and discharge power transistor Q5s gate-source input capacitance. The charging pulse that Q1 produces begins on the rising edge of the
drive-control signal, and the discharge

designideas
C1
470 pF

R1
560
15V
9

15V

IC1
CD4049
10
3

R3
47
2

11

12

14

15

15V
P1
1k C +
3
100 F

0V

C2
470 pF

T1

D3
1N4148

170 H
10 TURNS

D4
1N4148

170 H
10 TURNS

Q3
ZVP2106

R5
2.2

C
G

Q5
240 H
12 TURNS

R4
47

R2
560

RLOAD

Q1
ZVN2106

D1
1N4148

Q4
ZVP2106

D5
1N4148

D7
12V
D8
12V

D6
1N4148
R6
2.2

VCC

D2
1N4148
Q2
ZVN2106

Figure 1 The isolated pulse driver transmits all duty cycles and consumes energy only during the gate charge and discharge processes.

pulse that Q2 produces begins on the


falling edge of the control signal. Differentiator circuits comprising C1, R1,
a portion of potentiometer P1, C2, R2,
and the remaining portion of P1 set the
durations of the charge and discharge
pulses. If necessary, adjusting P1s setting alters the balance of the positive
and negative charge and discharge voltages that Q5s gate receives.
Transistors Q3 and Q4, respectively,
transmit pulses to charge or discharge
Q5s input capacitance and then
switch off, producing a high impedance
across Q5s input capacitance so that
Q5s gate voltage doesnt change,
except for discharging slowly due to
small leakage currents. Thus, the driver circuit consumes power only during

the short intervals of the gate-to-source


charge and discharge processes.
When transistors Q1 through Q4
switch off, resistor and diode pairs R3, D3,
R4, and D4 form a path for transformer
T1s demagnetization current. Although theyre reverse-biased most of
the time, diodes D5 and D6 form a peakamplitude discriminator, configured as a
logical-OR circuit, to ensure that gate
voltages at Q3 and Q4 always equal or
exceed the voltage at the positive terminal of Q5s gate-to-source capacitance.
Resistors R5 and R6 limit charge and
discharge rates for Q5s gate-to-source
capacitance and can vary depending on
Q5s drive characteristics. Transformer
T1 comprises a Philips RM5/I core of
3E5 ferrite material with a center-

Figure 3 The top trace shows the driver-control voltage,


and the bottom trace shows the gate-source voltage of an
APT40GF120JRD IGBT, Q5, at 20 kHz. You can use potentiometer P1 to adjust the 9.1 and 20.7V high and low gate-tosource levels, respectively.
100 EDN | MARCH 30, 2006

Figure 2 A top view of the isolated


gate drivers prototype version shows
that an isolation barrier interrupts the
ground plane beneath transformer T1
(upper right center).

Figure 4 The top trace shows the driven transistors gate-tosource voltage, and the bottom trace shows its collector-emitter voltage, which a probe attenuates. The transistors load
comprises a resistor that connects to a power supply.

designideas
tapped, 20-turn primary winding and a
12-turn secondary winding, both fabricated from 0.2-mm-diameter, 0.008-in,
AWG #32 magnet wire.
When transistor Q1 switches on, it
induces a positive voltage in T1s secondary winding that switches on Pchannel MOSFET Q3 and drives Q4s
internal body diode into conduction to
begin charging Q5s gate-to-source
capacitance. Q3s on-channel resistance primarily determines the charging
rate. Charging ends either when the
pulse terminates or when Q5s gate-tosource voltage approximates T1s secondary voltage minus Q3s gatethreshold voltage.
Next, Q3 switches off, allowing the
charging current to decay to zero and
the capacitance to reach its maximum
positive charge. When Q1 switches off,
transformer T1s magnetizing current
resets through R3 and D3. The voltage
at T1s secondary winding goes slightly
negative to balance the cores volt-second characteristic, which forward-bias-

102 EDN | MARCH 30, 2006

es Q3s body diode without current, and


Q4s body diode blocks the discharge of
Q5s gate-to-source voltage.
The negative voltage you apply to
Q4s gate cannot switch on Q4 because
diode D5s forward-voltage drop sets
Q4s gate voltage higher than the voltage at Q5s gate. Thus, Q5s input capacitance remains charged, and the reset
path presents high impedance to this
capacitance. When Q2 switches on, the
negative voltage that appears on T1s
secondary turns on Q4 and starts the
discharge process, which ends when
Q4s source-to-gate voltage equals its
threshold level or when the pulse terminates. Then, Q4 turns off, and Q5s
gate-to-source capacitance reaches its
minimum negative voltage. When Q2
turns off, T1s magnetizing current
resets through D4 and R4, Q4s body
diode conducts, and Q3s body diode
blocks Q5s gate-to-source voltage.
Diode D6 applies a high voltage to Q3s
and Q4s gates to ensure that the reset
voltage at T1s secondary doesnt drive

Q3 into conduction. Thus, all transistors remain off, and Q5s gate-to-source
capacitance remains discharged.
When Q1 next switches on, the sequence repeats.
Figure 2 shows the driver prototype
compared with a 1 coin and a power
transistor. The transistor, an Advanced Power Technology APT40GF120JRD, combines an IGBT and a
FRED (fast-recovery epitaxial diode)
that operates at a maximum of 1200V
and 60A with a gate-to-source capacitance of 4 nF. The transistor comes in
a JEDEC SOT-227 package measuring
approximately 1.51 in. (3825
mm). Figures 3 and 4 show experimental waveforms for the circuit of Figure 1 to drive IGBT Q5 at 20 kHz. The
turn-on delay is approximately 600
nsec, and the total current consumption is 22 mA for a power consumption
of 0.33W. When driving transistors that
present a lower gate-to-source capacitance, the circuits turn-on delay and
power consumption both decrease.EDN

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

CPLD automatically powers itself off


Rafael Camarota, Altera Corp, San Jose, CA

Most of todays CPLDs (complex programmable-logic devices) feature reduced-power operating


modes, but, when the system is not in
use, a complete shutdown that conserves battery power remains the ultimate power-reduction goal of many
designers. Figure 1 shows how you can
add a few discrete components to a
CPLDin this example, an Altera
EPM570-T100to implement a battery-powered systems power-down circuit. An external P-channel MOSFET,
Q1, an International Rectifier (www.
irf.com) IRLML6302 or equivalent,
serves as a power-control switch for the

CPLD, IC1, and other components in


the system. The CPLD and an array of
switches control the MOSFETs gate,
applying bias that switches on Q1
whenever a user presses a switch. The
CPLD includes an embedded timer
that monitors switches and system
activity. After a specified period of inactivity, the timer disables the MOSFETs
gate drive, powering down the CPLD
and other components connected to
the MOSFET.
Q1s source connects to the batterys
positive terminal, and its drain connects to IC1s VCC(INT), VCC(IO1), and
VCC(IO2) power pins and other compo-

Q1
IRLML6302

R3
1k

TWO AA
BATTERIES
(3V NOMINAL)

G
D

SWITCHED
POWER TO OTHER
COMPONENTS

C1
0.1 F
EPM570-T100
D1
1N914

R1
1k

VCC PINS 9, 13, 31, 39, 45,


59, 63, 80, 88, 94

IC1

APPLICATION
LOGIC
S1
LPM_COUNTER
D2
1N914

R2
1k
ALTUFM_OSC

S2

R
44 MILLION
CO
EN

4.4-MHz
POWER-DOWN

JTAG PINS 22, 23, 24, 25


25-HEADER
PROGRAMMING
INTERFACE

GROUND PINS 10, 11, 32, 37, 46, 60,


65, 79, 90, 93

NOTE: S1 AND S2 ARE NORMALLY OPEN


PUSHBUTTON SWITCHES.

Figure 1 A few external components and internal logic blocks enable a CPLD
circuit to switch itself off after a predetermined interval.

D Is Inside
98 Amplifier removes commonmode noise on RGB differentialvideo-transmission line
102 Use a switching-regulator
controller to generate fast pulses
106 Shift registers and resistors
deliver multiphase sine waves
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
nents that require power-down control.
When power switches off, a 1-k
pullup resistor, R3, keeps Q1 off by
maintaining its gate at a gate-to-source
voltage of 0V. When you turn off IC1,
it presents a leakage path to ground
through the CPLDs power-down pin.
The EPM570-T100 includes hot-socket protection that limits the current
available from any user-accessible device-I/O pin to less than 300 A. Thus,
even in the worst case, the voltage that
the I/O pin develops across R3 doesnt
reach the FETs minimum gate-threshold turn-on voltage of 0.7V.
Pressing any switch creates a current
path through the switchs contacts and
its associated diode, which in turn
develops approximately 2.3V of gatesource bias across R3more than
enough to turn on Q1 and to power up
IC1 in approximately 100 sec. When
you actuate the mechanical switches,
they exhibit a minimum on-time of at
least 3 msec, whereas a typical human
operators minimum press-and-release
operation consumes at least 30 msec.
During these relatively slow response
times, the CPLD can turn on, resetting
its internal circuitry and asserting its
power-down pin to a logic zero that
turns on Q1 before the operator can
release the switch.

APRIL 13, 2006 | EDN 97

designideas

VCC
R3
10k

In addition to user-specified application logic (not shown), the CPLDs


power-control logic adds a pair of standard parameterized, library-macro circuits that Alteras (www.altera.com)
Quartus II development tools generate.
An internal 4.4-MHz25% oscillator,
Altufm_osc, drives a modulo-44-million LPM (library-parameterized-module) counter. A logic-low signal that
the CPLDs application logic produces
or closing any switch resets the counter. When you reset the counter, its
carry-out signal goes low and drives the
external power-down pin. An inverted
version of the carry-out signal reenables the LPM counter once you
remove the reset.
If you leave all switches open and the
application logic becomes inactive, the
counter counts to 44 million in approximately 10 sec, and the internal
carry-out signal goes high, disabling the
counter and holding the carry-out signal high. In turn, the power-down pin
rises toward VCC, turning off Q1 when
the voltage on the power-down pin
reaches 2.3V. Removing power from
the CPLD places the power-down pin
in the tristate, or disconnected, mode,
and R3 keeps Q1 off.
You can use JTAG-compliant commands to configure the EPM570-T100
with a download cable you connect to
a manufacturer-defined 10-pin header.
The process requires that you press an
external switch before, during, and
shortly after configuration to ensure that
the CPLD receives power throughout

R4
10k

R5
10k

R6
10k

R7
10k

ROW 3
Q1

98 EDN | APRIL 13, 2006

ROW 1

ROW 0

VCCINT
VCCOCX

COLUMN 3
COLUMN 2
D1
1N914

COLUMN 1
COLUMN 0

D2
1N914

D3
1N914

D4
1N914

R8
1k

R9
1k

R10
1k

R11
1k

POWERDOWN

Figure 2 A keypad matrix expands the CPLD circuits control capabilities and
retains the circuits automatic power-off function.

the configuration process. You can set


the inactivity time-out to any desired
value by changing the counters modulus. Although power, ground, and JTAG
signals use specific device pins, you can
assign any general-purpose CPLD I/O
pins as inputs for switches and as the
power-down output.
If your application requires a matrix
of pushbutton switches, you can use
only n diodes to configure an nm
switch matrix for efficient power-up
detection (Figure 2). In this example,
rows of switches connect to the MOSFETs gate through diodes D1 through

Tamara Papalias and Mike Wong, Intersil Corp


Comprising four twisted pairs
within a durable external sheath,
Category 5 network cable offers a common and cost-effective choice for transmitting component-video signals.
Three of the pairs can carry RGB video

ROW 2

Amplifier removes common-mode


noise on RGB differential-videotransmission line


IC1
CPLD

signals, and the fourth pair carries


audio, synchronization, and other
transmissions. Unfortunately, Category 5 cable lacks shielding, and thus its
somewhat vulnerable to commonmode coupling that induces equal volt-

D4. Resistors R8 through R11 provide a


ground path for each column of
switches and carry current only during
key closures, holding the column inputs
low while waiting to minimize powersupply current drain.
When a user presses any switch, Q1s
gate goes low, turning on the CPLD. A
fast CPLD-power-up routine allows the
application to scan the switch matrixs
rows and columns and determine
which switch a user pressed before the
user can release the switch. In this
application, the row signals reset the
LPM counters inactivity timer.EDN

ages in each of the cables conductors.


As a first line of defense against common-mode problems, you can configure RGB signals as differential voltages,
but any voltage difference between the
ground references of the twisted-pairs
drivers and receivers results in a common-mode signal on each of the
received lines.
Common-mode-noise voltages limit
transmission quality of video signals.
This Design Idea shows how you can
use a single operational amplifier to

designideas
R

minimize common-mode signals effects on differential-component-video


receivers. In Figure 1, the receiver circuits ground terminals (in red) show
that the ground-reference voltages of
each of the RGB differential signals
differ from those present at the drivers. To maintain signal quality and
minimize reflections, each video-signal twisted-pair transmission line terminates in 100. For example, resistors R35 and R37 terminate the R
line, and R36 and R38 terminate the
R line. Meanwhile, the G and B
termination circuits are identical. Any
common-mode voltage on the R-signal pair appears at the junction of R37
and R38 and across R39.
To create a common-mode cancellation voltage, operational amplifier
IC1 sums and inverts the signals on all
three or four signal-line pairs. For
example, adding the R and R signals cancels their differential-voltage
components and doubles the common-mode voltage that each line contributes. Capacitors C1 and C2 provide
ac coupling for the circuits input and
output, respectively. The output from
IC1 applies a common-mode bias voltage through a matched pair of 30-k
resistors, R42 and R43, to the R and
R receiver network. Close tolerances for R42 and R43 ensure that the
differential voltages delivered at
ROUT and ROUT closely balance with
respect to the inputs common-mode

R37
50

G

R39
150

R38
50

R

R43
30k

C10
5 pF

R21
50
R19
50

GOUT

R23
12k

R25
30k

R24
12k

R26
30k

C8
5 pF

R27
50
R45
150

R30
50

B

R33
30k

R32
12k

R34
30k

R17
6k

BOUT

C7
5 pF

R28
50

R6
8k
IC1
ISL55001
1

R14
6k

R16
6k

GOUT

BOUT

R31
12k

R13
6k

R15
6k

ROUT

C9
5 pF

R29
50

R12
6k

R41
12k

R18
50

G

B

R42
30k

C11
5 pF

R22
150

ROUT

R40
12k

R36
50

R20
50

R11
2.2k
C1
10 F
9V

GND

2
3

NC



NC
VS
OUT
NC

8
7

C5
2.2 F
9V

C2
10 F

6
5

VS
C6
2.2 F

Figure 1 A common-mode-cleanup circuit reduces noise pickup on unshielded


Category 5 differential-video signals.

Figure 2 The common-mode signal (yellow trace) heavily


influences the video signal (pink trace).

100 EDN | APRIL 13, 2006

C12
5 pF

R35
50

Figure 3 Adding the common-mode-reduction circuit in


Figure 1 significantly reduces the amount of commonmode voltage on the video signal.

designideas
voltage. Capacitors C11 and C12 provide equalization to boost the differential-video signals higher frequency
components.
Before applying cancellation, the
signals at the circuits outputs ROUT
and ROUT would appear as: ROUT
VDIFF/2VCM, and ROUTVDIFF/
2VCM, where VDIFF represents the
desired differential signal, and VCM
exists with respect to the circuits local
ground. After applying cancellation,
the output signals appear as: ROUT
V DIFF/2V CMV CMSV DIFF/2,
and ROUTVDIFF/2VCMVCMS
VDIF/2, where VCMS represents the

summed and inverted common-mode


voltage at IC1s output.
Figure 2 shows a representative 1V
peak received signal thats on the R
line (yellow trace) and an accompanying 2V peak common-mode signal
(pink trace). Figure 3 shows the
circuits common-mode-cancellation
abilities. Although the differential
signal (yellow) remains unchanged,
the common-mode signal (pink)
exhibits an 80%, 14-dB reduction.
Any mismatch between the time delay
and the summed analog signal, which
the passive input network and IC1,
respectively, produce, prevents com-

Use a switching-regulator controller


to generate fast pulses
Mitchell Lee, Linear Technology Corp
VCC
12V
R1
200
5%
250 mW
5
VCC
C1
10 F
6V
CERAMIC

NC

ITH/RUN

NGATE

IC1
LTC3803

4
SENSE

VFB
GND
2

RBACKTERM
48.7

J1

R2
100k
R3
2k

Figure 1 Switching-regulator-controller IC1 delivers pulses with 1.5-nsec rise


and fall times into a 50 load.

A source of pulses with fast-rising edges that approximate the


step function can help you perform
many useful laboratory measurements, including characterization of
coaxial cables rise times and location
of cable faults using time-domainreflectometry methods. For example,
evaluating the rise time of a 10- to 20ft-long RG-58/U cable requires edgetransition times of 1 to 2 nsec. Agilents (www.agilent.com) HP8012B, a

workhorse pulse generator that finds


use in many electronics labs, can deliver pulses with rise times of 5 nsec that
are adequate for many applications but
not for cable characterization.
As an alternative, switching-regulator-controller ICs can deliver gatedrive pulses with rise and fall times of
less than 2 nsec, making them ideal
candidates for laboratory pulse-generation service. A simple implementation uses Linear Technologys (www.

plete cancellation. Also, for best performance, the common-mode signal


must not exceed IC1s common-mode
input-voltage rating. In addition, IC1,
an Intersil ISL55001, must exhibit
unity-gain stability over a wide bandwidth and an excellent slew-rate response and, for best results, must operate at relatively high-power-supply
voltages for good linearity. Use 10-F,
nonpolarized input- and output-coupling capacitors to accommodate extremely low-frequency commonmode voltages. Ensure adequate bypassing for IC1s power-supply terminals for all frequencies of interest.EDN

linear.com) LTC3803 constant-frequency flyback controller, IC1 (Figure


1). The controller self-clocks at 200
kHz, and applying a sample of its output to its Sense pin causes the controller to operate at its minimum duty
cycle and produce a 300-nsec-wide
output pulse.
The LTC3803s output can deliver
more than 180 mA into a 50 load,
so use a low-series-inductance bypass
capacitor that connects as directly as
possible between IC1s power and
ground (pins 5 and 2). The decoupling
components, C1, a 10-F ceramic
capacitor, and R1, a 200 resistor,
minimize pulse-top aberrations without introducing amplitude droop.
The circuits output directly drives a
50 termination at amplitudes as high
as 9V. For applications that require
maximum pulse fidelity, use a backtermination resistor, RBACKTERM, to
suppress triple-transit echos and
absorb reflections from the cable and
any mismatch in the cables far-end
termination impedance. Back-termination also helps when driving passive
filters, which expect to see a specific
generator impedance. The LTC3803s output impedance is approximately 1.5, which affects the
value of the back-termination resistor.
The back-termination technique
(continued on pg 106)

102 EDN | APRIL 13, 2006

designideas
works well with load impedances of at
least 2 k. At impedances higher
than that value, parasitic impedances
associated with the terminating resistor and IC1 degrade bandwidth and
pulse fidelity.
In a back-terminated, 50 system,

pulse fidelity, use stripline techniques


to route IC1s output directly to the
termination resistor and output connector J1. Using a 100-mil-wide trace
on a 1/16-in., double-sided, glass-epoxy
pc board approximates a 50 surge
impedance.EDN

the circuit delivers a 4.5V output pulse


with symmetric rise and fall times of
1.5 nsec, pulse-top-amplitude aberrations of less than 10%, and amplitude
droop of less than 5%. Directly driving a 50 load doesnt degrade the
outputs rise and fall times. For best

Shift registers and resistors deliver


multiphase sine waves

00111111111111 bit pattern that the


first set of shift registers uses. IC1Bs Q2
output produces the D input that you
apply to the second set of shift registersIC2B, IC3A, and IC3Bwhich in
turn generate a 90 phase-shifted version of the bit pattern to form a cosine
wave. The cosine bit pattern requires
no recirculation and simply propagates

Gary Steinbaugh, 4 E A Transform, Loveland, OH

Sine waves with fixed phase relationships find application in


communications equipment, instrumentation, and power sources. Although you can use any of several traditional analog techniques to generate
basic sine-wave signals, this Design Idea
offers a simple method that uses only
digital logic and fixed-value resistors
(Figure 1a). A common clock pulse
drives three of four sections of a pair of
CD4015 4-bit shift registers that recirculate a pattern comprising 12 zeros
and 12 onesthat is, 000000000000111111111111. Each of the registers
outputs drives a resistor, R1 through R12,
that connects to a summing node. If all
of the resistors were of equal value, their
summed output would comprise a
stepped linear triangular waveform at
a repetition frequency one-twentyfourth that of the clock frequency.
To produce a stepped sinusoidal output waveform, you replace the equalvalue resistors with the weighted values in Figure 1a. If you use resistors of
1% tolerance, the outputs amplitude
will approximate that of a true sine
wave to better than 1 . To produce a
cleaner sine wave, a lowpass filter helps
remove clock-pulse feedthrough and
stepped-edge transients (Figure 1b).
For many applications, a simple onepole lowpass filter/buffer provides adequate filtering, but a more elaborate
multipole filter further increases output
purity.
You can add a second set of registers
and resistors, R13 through R24, to produce cosine and sine waves offset by a

106 EDN | APRIL 13, 2006

90 phase shiftthat is, two sine waves


in quadrature (Figure 2). Register
IC2As inverted and recirculated output
from Q4 generates the 0000000000CLOCK IN
(24fOUT)

IC1A

D
Q1
Q2

R
DUAL
FOUR-STAGE
SHIFT
REGISTER
IC1B

Q3
Q4
D
Q1
Q2

Q3

Q4
INVERTER

R1

1M

R2

340k

R3

215k

R4

165k

R5

143k

R6

133k

R7

133k

R8

143k
SINEWAVE
OUTPUT

IC3
C

D
Q1

R9

Q2

IC2A
R

Q3

RESET ON
POWER UP

Q4

165k

R10

215k

R11

340k

R12

1M

Q1
IC2B

Q2
Q3

Q4
(a)

_
_
IC4
SINE-WAVE
INPUT

IC5

R
+

+
C

SMOOTHED
SINE-WAVE
OUTPUT

(b)

Figure 1 A pair of shift registers, an inverter, and a handful of precision resistors form a sine-wave generator (a). Two operational amplifiers form a resistance-capacitance lowpass filter that removes clock-signal artifacts from the
output (b).

designideas
CLOCK IN
(24fOUT)

IC1A

R
DUAL
FOUR-STAGE
SHIFT
REGISTER
IC1B

D
Q1
Q2
Q3
Q4

D
Q1
Q2
Q3
Q4

D
Q1
Q2

Q3
Q4

D
Q1

IC2B

1M

R2

340k

R3

215k

R4

165k

R5

143k

R6

133k

R7

133k

R8

143k

Q2
R

Q3
Q4

CLOCK IN
(24fOUT)

R9

165k

R10

215k

R11

340k

R12

1M

IC1A

DUAL
FOUR-STAGE
SHIFT
REGISTER
IC1B

IC3A

Q2
R

Q3
Q4

Q1

IC3B
RESET ON
POWER-UP

D
Q2

Q3
Q4

Q3

C
IC2A

D
Q1
Q2

R13

1M

R14

340k

R15

215k

R16

165k

R17

143k

R18

133k

R19

133k

R20

143k

R21

165k

R22

215k

R23

340k

R24

Q3
Q4

D
Q1
Q2
Q3
Q4

C
IC3A

SINEWAVE
OUTPUT

D
Q1
Q2

Q3
Q4

1M

D
Q1

IC3B

Q2

Figure 2 Add a second set of shift registers to generate a


cosine wave.

Q3
Q4

through the second set of shift registers and falls off the end.
To adjust the second outputs phase shift with respect to the first
output from 15 to 180 in 15 increments, you can connect IC2Bs
D input to any one of IC1s or IC2As Q outputs.
Figure 3 illustrates a three-phase sine-wave-generator circuit.
The Q4 output from IC1B supplies the D input to the second set
of shift registers, IC2A and IC2B, to produce the recirculated bit
pattern. In similar fashion, the Q4 output from IC3A supplies the
D input to the third set of shift registers, IC4A, to transfer a duplicate bit pattern thats phase-shifted by 240 with respect to the
output from the first set of shift registers.
Register IC2Bs D input connects to IC1Bs Q4 output to produce a signalPhase 2s outputthat lags behind the Phase 1
output by 120 . In similar fashion, register IC4As D input connects to IC3As Q4 output to produce a signalPhase 3s outputthat lags behind Phase 2s output by 120 , or 240 with
respect to Phase 1.
You can expand the basic circuit to accommodate additional signal phases. The weighted resistors values are adequate for
low-frequency sine waves and 4000-series CMOS-logic devices.
However, you can scale the resistors values to accommodate
other output frequencies and logic families.EDN

D
Q1
Q2

IC4A
R

Q3
Q4

D
Q1

IC4B

Q2
R

Q3
Q4

C
IC5A
RESET ON
POWER-UP

D
Q1
Q2

Q3
Q4

IC5B

R1

1M

R2

340k

R3

215k

R4

165k

R5

143k

R6

133k

R7

133k

R8

143k

IC6

INVERTER

108 EDN | APRIL 13, 2006

D
Q1
Q2
Q4

R
D
Q1

Q3
Q4

IC2B
C

D
Q1
Q2

COSINEWAVE
OUTPUT

IC4

INVERTER

IC2A

R1

R9

165k

R10

215k

R11

340k

R12

1M

R13

1M

R14

340k

R15

215k

R16

165k

R17

143k

R18

133k

R19

133k

R20

143k

R21

165k

R22

215k

R23

340k

R24

1M

R25

1M

R26

340k

R27

215k

R28

165k

R29

143k

R30

133k

R31

133k

R32

143k

R33

165k

R34

215k

R35

340k

R36

1M

PHASE 1
SINEWAVE
OUTPUT

PHASE 2
SINEWAVE
OUTPUT

PHASE 3
SINEWAVE
OUTPUT

D
Q1
Q2
Q3
Q4

Figure 3 Adding a third set of shift registers yields a threephase sine-wave output.

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Thermal considerations matter


for Class D amplifiers
John Guy, Maxim Integrated Products, San Jose, CA

A Class D amplifier provides


better efficiency and thermal
performance than a comparable Class
AB amplifier, but implementing a Class
D amplifier still requires attention to
good electrical- and thermal-design
practices. Most engineers use a continuous-sine-wave-input signal to evaluate
a Class D amplifiers performance in the
lab. Although convenient for measurement purposes, a sine wave represents
a worst-case scenario for the amplifiers
thermal load. If you drive a Class D
amplifier near maximum output power
with a continuous sine wave, its not
uncommon for the amplifier to enter
thermal shutdown.
Typical audio-program material comprising music and voice has a much
lower rms value than its peak output
power. The ratio of peak-to-rms power,

or crest factor, typically averages


about 12 dB for voice and 18 to 20 dB
for musical instruments. Figure 1 shows
time-domain-oscilloscope, rms-voltage
measurements of an audio signal and a
sine wave. Although the audio signal
corresponds to a burst of music, it presents a slightly higher peak value than
the sine wave, and its rms value
approaches only half and may average
even less than that of the sine wave. An
audio signals thermal effects on a Class
D amplifier are considerably lower than
a sine waves, and, thus, its important
to test performance with actual audio
signals instead of sine waves.
In an industry-standard TQFN
package, a bottom-side-exposed pad
provides the primary path for heat
transfer from the IC and into copper
areas of the amplifiers pc board that

Figure 1 A sine waves higher rms level than that of an audio signal predicts
the additional thermal burden on a Class D amplifier thats tested with a sine
wave.

D Is Inside
96 Microcontroller simplifies battery-state-of-charge measurement
98 Switching regulator efficiently
controls white-LED current
100 Programmed reference
oscillator generates nonstandard
clock frequencies
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.

serves as a heat sink. Soldering the IC


to a large copper pad helps minimize
thermal resistance, as do multiple vias
that transfer heat to the pc boards
opposite side, on which an additional
copper area further reduces thermal
resistance. In addition, you can connect
any of the devices pins to the thermal
transfer area, provided that the pins and
thermal pad are at the same electrical
potential, such as the upper- and lowerright pins in Figure 2.
Although an ICs pins dont provide
the primary heat-transfer path, they do
dissipate a small amount of heat, and its
helpful to maximize the widths of all pc
traces that connect to the IC. Figure 3
shows how wide traces connect the ICs
outputs to two inductors. In this case,
the inductors copper windings provide
an additional thermal path away from
the Class D amplifier. Improving heat
dissipation by even a few percentage
points may make the difference
between achieving acceptable performance and encountering thermal
problems. To further reduce thermal
resistance, you can specify a heat sink

APRIL 27, 2006 | EDN 93

designideas
that solders to the pc board adjacent to
the IC. For example, a Wakefield Engineering (www.wakefield.com) 218series sink has lower edges that form the
conduction path.
A few basic calculations can help you
estimate a Class D-amplifier ICs die
temperature. For example, consider an
amplifier that operates at an ambient
temperature of 40C, has output power
of 16W, and has 87% efficiency. Specified thermal resistance from the ICs
junction to ambient air is 21C/W.
First, calculate the Class D amplifiers
power dissipation: PDISS[(POUT/)
P OUT ](16W/87%)16W2.4W,
where PDISS is the dissipated power,
POUT is the output power, and  is the
efficiency. Use the power dissipation to
calculate the die temperature, TC, as
follows: TCTAPDISSJA40C
2.4W21C90.4C, which is within
the devices maximum junction temperature of 150C. A system seldom
enjoys the luxury of operation at a 25C
ambient temperature, and its important to base these calculations on a reasonable estimate of the systems actual
internal ambient temperature.
The on-resistance of a Class D amplifiers MOSFET output stage affects
both its efficiency and its peak-current
capability. Reducing the peak load current reduces the infinite-impulseresponse losses and increases efficien-

Figure 2 The exposed tinned-copper pad in the center provides the


primary thermal path for a Class Damplifier IC in a TQFN or TQFP
package.

cy in the MOSFETs. To further lower


peak currents, choose the highest
impedance speaker that delivers the
desired output power within the voltage-swing limits of the Class D amplifier and its supply voltage. In Figure 4,
a Class D amplifier with an output-current capability of 2A and a supply-voltage range of 5 to 24V goes into current
limiting with a 4 load and a supply
voltage of 8V for a corresponding maximum continuous output of 8W.
If 8W represents an acceptable output power, consider using a 12 speaker and a 15V supply voltage. The peak
current limit then occurs at 1.25A, with
a corresponding maximum continuous
output power of 9.4W. Furthermore, the
12 load operates at 10 to 15% higher efficiency than the 4 load and thus

Figure 3 The wide traces to the


right of this Class D-amplifier IC
help conduct heat away from the
device and into the adjacent
components.

lowers the ICs power dissipation. Actual efficiency improvements vary


among Class D-amplifier ICs.
To complicate matters for the
designer, a loudspeaker behaves as a
complex electromechanical system
that presents a variety of resonances
across its frequency range and exhibits
its nominal impedance only within a
narrow frequency band (Figure 5).
Over much of its audio bandwidth, this
loudspeakers impedance exceeds its
nominal value of 8 ; adding a
crossover network and a tweeter may
reduce the total load impedance below
the nominal value. Keep the load
impedances behavior in mind when
you consider the amplifiers power-supply current and thermal-dissipation
capability.EDN

30

25
12

25

20

IMPEDANCE 15
( )

10

20

15
PEAK
OUTPUT
POWER
(W)
10

0
5

10

15

20

POWER-SUPPLY VOLTAGE (V)

Figure 4 Selecting an optimal impedance, such as 12 ,


and supply voltage, such as 15V, maximizes output power
and prevents current-limiting-induced distortion.

94 EDN | APRIL 27, 2006

25

10

100

1000
FREQUENCY
(Hz)

Figure 5 The electrical impedance of this nominally 8 ,


13-cm-diameter, wide-range loudspeaker varies significantly with frequency.

10,000

designideas
Microcontroller simplifies
battery-state-of-charge measurement
Abel Raynus and Evgueni Freidline, Armatron International, Malden, MA

A system that receives its


power from a renewable-energy
source, such as a photovoltaic panel or
a wind-driven generator, typically
accumulates power in a rechargeable
battery and delivers it to a load. Often,
both processes occur simultaneously.
Periodic evaluation of the batterys
remaining charge ensures extended performance and battery life, as does control of the battery current that goes to
the load. A batterys residual charge
comprises its previously calculated
charge plus the amount of newly accumulated charge or minus the amount of
charge it expends. According to
Coulombs Law, you can calculate the
accumulated charge as follows:

where QACC is the amount of a batterys


newly accumulated charge, and i represents the amount of current integrated over time interval
t.
In its discrete form, the equation
becomes

D1
1N4001

3
C1
0.33 F

IC1
78L05
2

where n represents the number of current measurements, Ik, taken during the
time interval,
t. Although you can
select any value for
t, its convenient
to choose a value equal to one hour,
because battery manufacturers specify
capacity in units of ampere-hours.
To simplify the microcontrollers
firmware and reduce the amount of
memory necessary for arithmetic operations, you can divide one hour into
128 measurement cycles and use register shifting to perform the division
required in the equation. You calculate
each charge measurement as an average value from 32 current samples,
which the microprocessors internal
ADC converts. One of the ADCs multiplexed input channels converts
charging current, and another converts
discharging current. Thus, the equation
for remaining battery-charge capacity
reduces to QREMQPREV QACC, where
QREM is the remaining battery charge,
QPREV is its previously calculated
charge, a plus sign indicates a net
charge, and a minus sign indicates a net
discharge.
As Figure 1 shows, the circuit com-

CHARGE
SOURCE

R2
1k

STORAGE
BATTERY

8
IC2A
3 TLC277

2 _

DISCHARGE
R1
0.5

PA0 IC
3
MC68HC908QT2
2 DATA
PA5
PA1
8

IC2B
5 TLC277
4

R4
1k

CHARGE

R5
10k
_

C2
0.1 F

R3
9.09k

+
_

Figure 1 Measure a storage batterys state of charge using only a few components.

96 EDN | APRIL 27, 2006

prises an eight-pin version Freescales


(www.freescale.com) low-cost MC68HC908QT2 microcontroller, IC3. The
voltage across current-sampling resistor
R1 reverses polarity depending on
whether the battery charges or discharges. Connected as identical-gain
noninverting and inverting amplifiers,
respectively, IC2A and IC2B sense the
voltage developed across R1. Noninverting amplifier IC2A responds only to
a positive voltage developed by a charging current and delivers zero output for
a negative input voltage developed by
a discharge current. Inverting amplifier IC2B responds only to a negative
input and delivers 0V for a positivecharging current. The outputs of both
op amps are positive and range from 0
to approximately 5V and simplify
design of the interface with the ADCs
multiplexed inputs. Using Texas
Instruments (www.ti.com) TLC277 for
IC2 offers the benefits of a small-pcboard footprint and a low input-offset
voltage.
You calculate the sense resistor R1s
value and the amplifiers gain, G, by
determining the lowest and highest
expected charge and discharge currents
and applying the following equation:

LOADCONTROL
CIRCUIT

LOAD

designideas
where IMAX is the maximum discharge
current and VIN(MAX) is the maximum
ADC input. In this example, the maximum charge and discharge currents are
approximately 1A.
Thus, for a 1A charge or discharge
current and a maximum ADC input of
5V, you can choose a value of 0.5 for
R1 and a gain of 10 or 100. Once you
calculate the batterys charge capability, you can send the data to a host
processor or another destination
through a single-wire interface, SPI,

I2C, CAN (controller-area-network),


or another industry-standard method
(Reference 1). To maximize battery
life, you can use the microprocessors
output to control current that an external load draws.
Manufacturers generally ship leadacid batteries fully charged to avoid sulfation, and this design assumes that a
battery starts in a fully charged state. To
accommodate battery chemistries
other than lead acid, you must modify
the value of the batterys maximum

charge capability thats stored in a


specialized firmware register. You
can download the microprocessors
firmware from www.edn.com/060427
di1.EDN
REFERENCE
Raynus, Abel, Single wire connects microcontrollers, EDN, Oct 22,
1998, pg 102, www.edn.com/
archives/1998/102298/22di.htm
#single.

Switching regulator efficiently


controls white-LED current

potentiometer R1 adjusts. Current-tovoltage conversion taking place within the circuits control loop effectively regulates the circuits output current.
In operation, the LM2852 compares its
internal reference voltage with the
voltage from the divider formed by D1,
R1, and R2 and drives the control loop
to maintain a constant 1.2V at its voltage-sense pin. Current through the
voltage divider is proportional to the
current through LED1, and the ratio of
the currents tracks over the circuits
operating-temperature range because
D1 and LED1 exhibit approximately the
same forward-voltage temperature
coefficient of 2 mV/C. Mounting D1
and LED1 next to each other on the pc
board provides sufficiently close thermal coupling for temperature compensation.
With R1s wiper fully clockwise, the

Clayton B Grantham, Agtech, Tucson, AZ

A few years ago, manufacturers


specified their white, but dim,
LEDs for a maximum forward-current
rating of 20 mA. Todays white LEDs
deliver more light and thus must operate at ever-higher bias currents. Maintaining control of an LEDs bias point
while operating at high current near
its maximum rating requires a new
approach.
The simplest and most common
method of biasing an LED involves
connecting a resistor in series with the
LED to limit the LEDs maximum current, but this method directly impacts
power efficiency, which you define as
the ratio of power to the LED to the
total input power. For a white LED
operating at 350 mA, the corresponding forward-voltage drop across the
diode is approximately 3.2V. A series
resistor and LED connected to a 5V
power source operates at 64% efficiencythat is, 3.2V for a 5V source. The
power dissipates as heat, causing an
average power loss in the series resistor
of 36 mW at a forward current of 20
mA, which is acceptable, but this figure balloons to 630 mW at a forward
current of 350 mA.
In addition, using a series resistor
allows the diodes bias point and thus
its brightness to fluctuate as the

98 EDN | APRIL 27, 2006

power-supply voltage and the ambient


temperature vary. Based on National
Semiconductors (www.natsemi.com)
LM2852 switched-mode bucking regulator, which features internal compensation and synchronous-MOSFET
switches that can drive loads as large as
2A, the circuit efficiently provides constant-current drive to a high-current
LED and minimizes the effects of supply-voltage and temperature variations
on the LEDs brightness (Figure 1).
In this circuit, the LM2852 operates
at efficiency of approximately 93% and
directly controls a step-down-regulator
topology that maintains a constant
current flow through LED1, which
VIN
5.5 TO 2.85V
6, 7
1
CIN
22 F

2
4

CSS
2.7 F

8, 9

P_VIN
A_VIN
EN

SW
COUT
100 F

IC1
LM2852Y-1.2
SNS

SS
SGND
3

L1
10 H

D1
1N4001

14
CCW

PGND
10, 11

LED1
LXHL-BW02

CW
(BRIGHTER)

R1
2k
R2
1.2k

Figure 1 This circuit drives a high-current, white LED at 93% efficiency over
input voltage and temperature. Potentiometer R1 controls current through
LED1 and allows brightness adjustment. Diode D1 provides temperature
compensation for LED1s forward-voltage drop.

designideas
100

360

95

355

EFFICIENCY 90
(%)
85
80

CURRENT 350
(mA)

LED1 CURRENT
~100 mA
~300 mA
~500 mA
3

3.5

345
4.5

340

5.5

INPUT VOLTAGE
(V)

Figure 2 Circuit efficiency versus input voltage shows an


increase in efficiency for increasing LED current and
decreasing input voltage.

current through D1 approaches 1 mA,


and the current through LED1 averages
approximately 500 mA. Adjusting R1
counterclockwise reduces LED1s forward current from 500 mA to 0A.
When scaling the values of R1 and R2
for a different current-loop gain,
decreasing the gain impacts the circuits
conversion efficiency, and increasing
the gain makes the loop more sensitive
to component tolerances. To provide a
remote brightness control, you can
replace mechanical potentiometer R1
with a digitally programmed potentiometer. Luxeon (www.luxeon.com),
the manufacturer of LED1, an LXHL-

100 EDN | APRIL 27, 2006

45

60

75

Figure 3 Current through the LED varies less than 3%


over an operating-temperature range of 0 to 75C.

BW02, specifies limits of 350-mA continuous current and 500-mA peakpulsed current. Figure 2 shows the circuits efficiency versus variations in
input voltage. Note that the circuits
efficiency increases as input voltage
decreases, which helps extend operating time in battery-powered-system
applications.
As temperature fluctuates, the current through LED1 varies less than 3%
over the temperature range, a factor-ofthree improvement over a series-resistor current-limiting circuit (Figure 3).
Although more complex than a single
resistor, the circuit in Figure 1 requires

William Grill, Honeywell BRGA, Lenexa, KS


Although manufacturers offer
crystal and ceramic resonators
and packaged oscillators for many frequencies, nonstandard frequencies may
not be readily available. When a unique
integrator application required a 2021Hz fixed-frequency clock, the circuit in
Figure 1 solved the problem and
required only a few extra and inexpensive components. The heart of the oscillator comprises a small assembly-language process that exploits equalized,
fixed-length branch loops with only 12
instructions. A simple Visual Basic
program, available at www.edn.com/

30

TEMPERATURE
(C)

Programmed reference oscillator


generates nonstandard clock
frequencies


15

060427di2, provides a user-input window that calculates the number of loops


necessary to create the desired frequency and also determines the required
number of individual instruction periods needed to top off the duration of
the output period (Figure 2).
Including Microchips (www.micro
chip.com) PIC12F508 8-bit microcontroller, IC1, the circuit in Figure 1 uses
only four components. The microcontroller operates at clock-crystal frequencies as high as 4 MHz and includes
a configuration option that uses the
ICs internal 4-MHz oscillator, which is

only a few components. For L1, this prototype uses Coilcrafts (www.coilcraft.
com) MSS5131-103 surface-mount
inductor rated for 10 H.
National Semiconductors data
sheet for the LM2852 outlines criteria
for selecting capacitors CIN, CSS, and
COUT. For efficient heat removal, the
circuits pc board should include generous copper-mounting pads and traces
for IC1 and LED1. At a forward current
of 350 mA, LED1 dissipates 1.1W, so
consult the manufacturers data sheet to
review its thermal-design recommendations.EDN

accurate to 1% as the controllers


base frequency. Another version of the
microcontroller, the PIC16F505, can
operate at clock-crystal frequencies as
high as 20 MHz.
To calculate the constants to program
the microcontroller for the desired outC1
15 pF

VCC

2
X1

1
7
IC1
12F508

CLOCK
OUTPUT

5
4

C2
15 pF

8 V
SS

Figure 1 Delivering a fixed clock frequency, this preprogrammed oscillator uses few components.

designideas
put frequency, you use the Visual Basic
program, editing the clock frequency of
4 MHz in this example if necessary.
Next, you enter the clocks frequency
error in percentage points or parts per
million and the desired output frequency in hertz. When you click on the
Evaluate control, the program computes the high- and low-state coefficients, the number of appended
instructions, and the outputs duty
cycle. The program also calculates the
maximum initial percentage error of
the output frequency. The controllers
instruction-execution times and clock
frequency impose constraints on the
desired output frequency, duty cycle,
and frequency error. For the 2021-Hz
clock in this application and a 4-MHz
clock frequency, the program calculates
the coefficients and number of discrete
instructions as 20, 21, and three,
respectively. Before compiling the
code and writing the results to the
microcontrollers internal flash memory, you transcribe the coefficients into

102 EDN | APRIL 27, 2006

Figure 2 Use this Visual Basic program to calculate programming coefficients


for the clock circuit.

the microcontrollers assembly-language program.


The controllers assembly-language
listing, at www.edn.com/060427di2,
uses only 40 instructions, and its implementation leaves three of the controllers pins unused but available for a
user-defined enable input or for selecting one of several preset output fre-

quencies or coefficients. You can reduce


the pc-board area the basic design uses
if you select a microcontroller that
occupies a smaller package, such as
six-lead SOT-23 versions of the
PIC10F200 or PIC10F220, and use its
internal 4-MHz clock oscillator instead
of an external crystal.EDN

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

JFET cascode boosts


current-source performance

D Is Inside
76 Microcontroller delivers
voltage-multiplied dc power

Clayton B Grantham, Tucson, AZ

Many process-control sensors,


such as thermistors and straingauge bridges, require accurate bias currents. By adding a single current-setting resistor, R1, you can configure voltage-reference circuit IC1 to produce a
constant and accurate current source
(Figure 1). However, the sources
errors depend on the accuracy of both
R1 and IC1 and affect measurement
accuracy and resolution. Although you
can specify high-precision resistors
whose accuracy exceeds that of most
commonly available voltage-reference
ICs, the voltage references error dominates this current sources accuracy.
Although the manufacturer minimizes the voltage references temperature sensitivity and output-voltage
error, sensitivity to power-supply variations can affect its accuracy, especial-

80 Low-dropout linear regulators


deliver constant currents

ly in process-control applications that


must operate over a wide range of supply voltages.
A cascode-connected pair of JFETs,
Q1 and Q2, form a constant-current
source that minimizes the reference
circuits sensitivity to supply-voltage
fluctuations and extends IC1s operating voltage beyond its 5.5V maximum
rating. In addition, Q1 and Q2 effectively increase the current sources
equivalent resistance from a few
megohms almost into the gigohm
range. In the circuits Norton model,
equivalent resistance represents the
parallel resistance across an ideal current source.
An N-channel JFET operates as a
depletion-mode device at its maximum saturated drain current when its
gate-to-source bias voltage is 0V. In

 What are your design problems


and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
contrast to a depletion-mode MOSFET that requires a gate-bias voltage
to conduct, the JFET operates in a
default on-state and requires gate-bias
voltage to cut off conduction. As its
gate-to-source voltage becomes more
negative with respect to the source, a
JFETs drain current goes to zero at the
pinch-off voltage. The JFETs drain
current varies approximately with its
gate bias: IDIDSS(1VGS/VP)2,
where ID is drain current, IDSS is the sat-

4
3.5
POWER
SOURCE


Q1

Q2

D
S
MMBF4393

POWERSUPPLY
INPUT

R1=510

G
S
C1
0.1 F

VIN

VREF
IC1
LM4132-1.8V

EN

GND

IGND

POWER
RETURN

ISOURCE = (VREF/R1)  IGND.

R1
1k
0.1%
25 PPM/ C

3
CURRENTSOURCE
OUTPUT 2.5
(mA)

R1=750

2
R2
SENSOR
OR LOAD
REQUIRING
CONSTANTCURRENT
DRIVE

Figure 1 A pair of cascode-connected JFETs reduces the


effects of power-supply-voltage fluctuations on a current
sources accuracy.

R1=1k
1.5
1
3

15
21
27
POWER-SUPPLY VOLTAGE (V)

33

39

Figure 2 Setting R1 to values of 1 k, 750, and 510


delivers output currents of approximately 1.8, 2.5, and 3.6
mA that are insensitive to a wide range of power-supply
voltages.

MAY 11, 2006 | EDN 75

designideas
urated drain current, VGS is the gate-tosource voltage, and VP is the pinch-off
voltage.
Assume that IC1s output voltage,
VREF, remains constant at 1.8V. Because the output voltage drives Q2s
gate, IC1s input voltage, VIN, equals
VREFVGS(Q2), or 1.8V(1.2V)3V.
Thus, Q2s gate-to-source voltage rests
at its nominal pinch-off voltage of
1.2V and varies in step with small
changes in current source. As the
power-supply voltage varies from 3V to
more than 30V, then the input voltage
remains almost constant, as you would
expect, because VREF also remains constant. The cascoded-FET configuration
increases the current sources Norton
equivalent resistance beyond that of
the voltage reference and R1 alone. You

can use a single JFET, but stacking two


JFETs further enhances the circuits
effective impedance. Note that IC1
doesnt degrade accuracy because the
JFETs hold IC1s input voltage virtually constant, and IC1 effectively cancels
initial gate-to-source-voltage variations and temperature effects that Q1
and Q2 introduce.
Negative feedback in the Kirchhoffvoltage loop that comprises VIN, VREF,
and VGS(Q2) allows the drain current to
reach an equilibrium bias point that satisfies Q2s transfer equation. Comprising the sum of (VREF/R1) plus IC1s
internal housekeeping current, IGND,
Q2s drain current remains constant.
Adding Q1 reduces the effects of Q2s
output impedance to insignificance.
Adjusting the value of R1 varies the cir-

Microcontroller delivers
voltage-multiplied dc power

Aaron Lager, Masterwork Electronics, Santa Rosa, CA


5V
40V
OUTPUT

R2
7.3k

R3
1k

L1
22 H

D1
SCHOTTKY
DIODE
+ C
1
10 F

Q1
IRFD110
400 kHz
G
S

5V
INPUT
R1
1k

1
2
3
4
5
6
7
8
9
10
11
12
13
14

P0.7

VCC

P0.5

P0.6

P0.3

P0.4

P0.1

P0.2

P2.7

P0.0

28
27
26
25
24

23
P2.6
IC1
22
P2.3 CY8C27443 P2.4
21
P2.2
P2.1
20
P2.0
SMP
19
XRES
P1.7
18
P1.6
P1.5
17
P1.4
P1.3
16
P1.2
P1.1
15
P1.0
GND
P2.5

Figure 1 Use a pair of a PSOC microprocessors internal blocks and a few


external components to build a voltage-boost converter. Use a Schottky
diode rated for a peak-inverse voltage of 100V for D1. The PSOCs remaining
pins are available for application support.

76 EDN | MAY 11, 2006

cuits output current over a useful range


of 200 A to 5 mA, with Q2s saturated-drain-current specification imposing
an upper limit. If you select a JFET with
higher saturated drain current, make
sure not to exceed Q1s maximum
power dissipation.
Note that the circuits lower powersupply-voltage limit must exceed the circuits compliance voltage, 3V, plus the
voltage drop that the sensor introduces:
ISOURCER2. The circuits upper powersupply voltage must not exceed
ISOURCER230V. For example, supplying a current of 2.5 mA to a 1-k pressure-sensor bridge, R2, limits the powersupply-voltage range to 5.5 to 32.5V.
The circuits output current varies less
than 1 A over a wide range of powersupply voltages (Figure 2).EDN

The combination of an external circuit and a low-voltage


microcontroller occasionally requires
a significantly higher power-supply
voltage. You can use either an external boost converter to increase the
logic supply or a buck converter to
decrease an even higher voltage.
However, you can alternatively use
the microcontroller to create a higher voltage. For example, some of Cypress Semiconductors (www.cypress.
com) PSOC (programmable-systemon-chip) microcontrollers include a
configurable comparator block that,
with a PWM block, can form the
heart of a simple inductor-based boost
converter (Figure 1). A few external
components implement a 40V power
supply (Figure 2). When the feedback
voltage you apply to Pin 3 (P0.3)
exceeds the comparators softwaredefined threshold voltage, the comparator shuts off the PWM stage.
When the voltage drops below the
threshold, the comparator re-enables
the PWM block and thus regulates
the output voltage. The voltage regulator uses only hardware blocks and

designideas

Figure 2 A pulse-width modulator (top) and a comparator (bottom) can operate


independently of other PSOC functions. Unconnected pins are available for
additional functions.

HIGHVOLTAGE
OUTPUT

5V
INPUT
C1
1 nF

C3
1 nF

1
2

D4
BAV21

D3
BAV21

D2
BAV21

D1
BAV21

3
4
5

C4
1 nF

C2
1 nF

6
7
8
9
10
11
12
13
14

P0.7

VCC

P0.5

P0.6

P0.3

P0.4

P0.1

P0.2

P2.7

P0.0

28
27
26
25
24

23
P2.6
IC1
22
P2.3 CY8C27443 P2.4
21
P2.2
P2.1
20
P2.0
SMP
19
XRES
P1.7
18
P1.6
P1.5
17
P1.4
P1.3
16
P1.2
P1.1
15
P1.0
GND
P2.5

Figure 3 A few diodes and capacitors form a Villard Cascade voltage multiplier.

78 EDN | MAY 11, 2006

thus is immune to the effects of other


activities taking place in the PSOCs
CPU.
However, some microcontrollers
lack a built-in comparator. For these
devices, the Villard Cascade circuit
offers a less expensive alternative to an
external boost-voltage converter (Reference 1). Most engineers who are
familiar with the Villard Cascade
associate it with high-voltage applications and do not envision it as a lowvoltage dc-supply technique. The circuit in Figure 3 requires an ac input
source that you can easily simulate
using a PSOCs internal PWM and
inverter blocks. A square-wave output
voltage appears on Pin 1, and an
inverted version of the same square
wave appears on Pin 2. The voltage
difference between the two pins applies an ac square-wave voltage to the
cascade.
Figure 4 shows how to configure a
PSOCs internal blocks to drive the
circuit in Figure 3. The PSOCs output multiplexer inverts the PWMs
output and drives Port_0_5, and
Port_0_6 receives the PWMs noninverted output signal. Again, the
PSOC uses hardware blocks to drive
a Villard Cascade voltage multiplier,
and the circuit produces an output
voltage without regard to CPU activity. For an input voltage, VIN, a Villard
Cascade of N stages delivers an output
voltage of VIN2N. One stage comprises two diodes and two capacitors
(Figure 5). However, the series-connected capacitors and diodes introduce voltage drops that limit the output current available from a Villard
Cascade. In addition, the following
equation imposes a practical limit that
governs the cascades output voltage:

where V is the output-voltage drop, f


is the input frequency, C is the capacitance, I is the output current, and N
is the number of stages.
Both boost circuits can supply only
modest amounts of current, especial-

designideas

Figure 4 To drive a Villard Cascade multiplier, a PWM block and an inverter


block deliver a balanced ac voltage with respect to ground.

ly when they receive power from a 5


or 3.3V source. However, you can
charge a high-value storage capacitor
from the boost circuits output and
drive a load that presents a low duty
cycle (for example, solenoid actuation).EDN

C1
1 nF

+
D2
BAV21
HIGHVOLTAGE
OUTPUT

D1
BAV21

C2
1 nF

BALANCED
AC
INPUT
VOLTAGE

REFERENCE
Jochens High Voltage Page,
www.kronjaeger.com/hv/hv/src/mul/.

Figure 5 An isolated multiplier stage


eases analysis.

Low-dropout linear regulators


deliver constant currents
Budge Ing, Maxim Integrated Products Inc, Sunnyvale, CA

Linear voltage regulators offer a


simple method of producing a
constant current by connecting a fixed
resistor between the regulators output
and ground nodes. The regulators constant output voltage produces a constant current through the resistor. You
can use the basic circuit as either a
high-side or a low-side current source.
The high-side current source uses a positive-output linear voltage regulator,
IC1, a Maxim MAX1818, to provide a
constant current of 25 mA to the load
resistance (Figure 1). The design
imposes two conditions: First, the voltage between IC1s VCC and ground terminals must not exceed 5.5V. Second,
the voltage between IC1s input and
ground terminals must meet or exceed
2.5V, the minimum voltage for proper
operation. To satisfy these conditions,
choose an output-resistance value that
allows 2.5 to 5.5V between input and

80 EDN | MAY 11, 2006

ground and provides a fixed output of


1.5V across the output resistance at the
desired load current.
For example, if you use the circuit to
drive a constant current through a 100
maximum load resistance while applying 5V VCC between IC1 and ground, the
circuit functions properly when ROUT
equals or exceeds 60. This value allows
a maximum programmable current of
1.5V/60, or 25 mA. The voltage across
IC1 then equals the allowed minimum:
5V(25 mA100)2.5V. Available
in six-pin SOT-23 packages, the MAX1818 can source as much as 500 mA.
The low-side current-source circuit
draws a constant current of 2.5V divided by the output resistance through the
load resistance (Figure 2). In this example, IC1, a MAX1735 linear negativevoltage regulator, provides a fixed output voltage of 2.5V. As in Figure 1,
ensuring a voltage of 2.5 to 6.5V be-

designideas

VCC
IN

RLOAD

VCC
IN

IN

OUT
IC1
MAX1818EUT15
POWER OK

NC

ROUT

+C
OUT

SET
SHDN
CIN
4.7 F

10 F
IOUT

GND

RLOAD I
LOAD

Figure 1 This high-side constant-current source


delivers load current of 2.5V divided by the output resistance, provided that you choose the
output resistance to ensure that the voltage
between the regulators input and ground terminals is at least 2.5V.

82 EDN | MAY 11, 2006

and the input. When using the circuit


to draw current through a maximum
load of 100 with VCC at 5V, the output resistance should exceed 100,
which provides a maximum programmable current of 2.5V/10025 mA,
which in turn produces a minimum recommended voltage across the device of
5V(25 mA100)2.5V. The
MAX1735 can source as much as 200
mA and occupies a five-pin SOT-23
package.
In addition to the programmed load
current, both configurations allow the
regulators quiescent current to flow
through the load and introduce a source
of error that varies with the voltage you
apply between the regulators input and
ground connections. You can minimize
the error by choosing a voltage regulator that draws low quiescent current or
whose quiescent current remains constant through the operating range and
allows you to compensate the error by
adjusting the value of the output resist-

ILOAD

COUT
10 F
+

tween IC1s ground and input terminals


represents the only precaution for its
proper operation. To satisfy that condition, choose an output-resistance value
that allows 2.5 to 6.5V between ground

ROUT
IOUT
GND
OUT
IC1
MAX1735EUK25
SET
CIN
4.7 F

IN

SHDN

Figure 2 As in Figure 1, this low-side


constant-current source draws a load
current of 2.5V divided by the output
resistance through the load resistance, provided that you select the
output resistance to make the voltage
difference between IC1s input and
ground terminals at least 2.5V.

ance. Quiescent currents for the


devices in figures 1 and 2 typically
average 130 A and vary less than 40
A for a regulator input-voltage range
of 2.5 to 5V.EDN

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

JFET-based dc/dc converter


operates from 300-mV supply
Jim Williams, Linear Technology Corp, Milpitas, CA

You use a JFETs self-biasing


characteristics to build a dc/dc
converter that operates from power
sources such as solar cells, thermopiles,
and single-stage fuel cells, all of which
deliver less than 600 mV and sometimes as little as 300 mV. Figure 1
shows the drain-to-source characteristics of an N-channel JFET under zerobias conditions, which you can produce
by connecting its gate and source
together. Applying 100 mV causes a
current of 10 mA to flow through the
device, increasing to 30 mA at 350 mV.
Exploiting the JFETs ability to conduct
significant current at zero bias makes it
possible to design a self-starting, lowinput-voltage converter.
The circuit can supply 5V at currents

as large as 2 mAenough to serve


many micropowered applications or to
provide auxiliary bias for a higher power
switched-mode voltage regulator. At
300-mV input, the circuit starts up at
load currents of 300 A. A load current
of 2 mA requires an input of 475 mV.
In Figure 2, Q1, a parallel-connected pair of Philips Semiconductors
(www.semiconductors.philips.com)
BF862 JFETs, and Coiltronics (www.
coiltronics.com) Versa-Pac transformer, T1, form an oscillator in which
T1s secondary winding provides feedback to Q1s gate. When you first apply
power, Q1s gate rests at 0V, and drain
current flows through T1s primary
winding. T1s phase-inverted secondary
winding responds by delivering a neg-

Figure 1 At 100 mV between drain and source (horizontal axis), the drain
current reaches 10 mA (vertical axis) and increases to 30 mA at 300 mV.

D Is Inside
94 Configurable logic gates
Schmitt inputs make
versatile monostables
98 Stealth-mode LED
controls itself
100 Data-acquisition system captures 16-bit voltage measurements
using the USB
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
ative voltage to Q1s gate, which turns
off Q1 and interrupts current flow
through T1s primary winding. In turn,
T1s secondary voltage collapses, and
sustained oscillations begin. Although
the BF862s published specifications do
not cover the devices internal geometry, the device has a low on-resistance
and maintains a low gate-turn-on
threshold voltage. Using a pair of parallel-connected JFETs for Q1 ensures
the low saturation voltage for operation
at low power-supply voltages.
Rectifying and filtering the positivegoing flyback-voltage impulses on Q1s
drain produce a dc voltage across capacitor C1. To assist the circuits start-up,
a P-channel MOSFET, Q2, which
requires a gate-to-source voltage of
approximately 2V for conduction, initially isolates the output load from the
rectifier. When Q2 conducts, the output voltage increases toward 5V. Comparator IC1, a Linear Technology (www.
linear.com) LTC-1440, draws power
from Q2s source and imposes outputvoltage regulation by comparing its
internal voltage reference with a sample of the output voltage. The output

MAY 25, 2006 | EDN 91

designideas
from IC1 varies Q1s on-time through
Q3 to close the control loop and maintain output-voltage regulation. Figure
3 shows the ripple voltage present at
the power supplys output. When the
output voltage decays, comparator IC1
switches (Trace B, middle) and allows
Q1 to oscillate. The resulting flyback
events at Q1s drain (Trace C, bottom)
restore the output voltage.
Using Q3 as a simple but effective
shunt control for Q1s gate voltage
results in a 25-mA quiescent-current
drain from the power source. A modification reduces the quiescent drain to
1 mA (Figure 4). Inserting switch Q4
in series with T1s secondary winding
more efficiently controls Q1s gate.
Bootstrapping the voltage across T1s
secondary winding produces negativeturn-off-bias voltage for Q4. Figure 5
illustrates how to connect T1s wind-

Figure 3 The dc output (Trace A), comparator IC1s output, and the voltage
at Q1s drain (Trace C) have a horizontal-deflection factor of 5 msec.

7
+ 3
IC1
LTC1440
_ 4
5
1.18V
6
REFERENCE
OUT
8

R3
100

0.3 TO
1.6VIN

5
SECONDARY

R2
1.21M

T1 3
PRIMARY
D1
1N5817
S
7
6

R1
3.83M
Q2

C4
0.001

D2
BAT-85

Q1

C3
0.01 F

C1
6.8 F

TP0610L G

C2
100 F

5 VOUT,
2 mA MAXIMUM

D
G

Q3 VN2222L
S

NOTES:
1. USE 1%-TOLERANCE METAL-FILM RESISTORS FOR R1 AND R2.
2. CONNECT T1 AS SHOWN IN FIGURE 5.
3. Q1 COMPRISES PHILIPS BF862 JFETs CONNECTED IN PARALLEL.

Figure 2 A pair of parallel-connected JFETs allows this dc/dc converter to operate from power sources that supply as little
as 300 mV.

92 EDN | MAY 25, 2006

designideas
peak voltage would approach 15V and
reverse-bias Q4, an undesirable condition. Under normal operating conditions, excursions of approximately

ings. When Q4 switches off, it interrupts the current flowing in T1s secondary winding and drives T1s Pin 5
positive. Without diodes D4 and D5, the
R4
1M

Q4
BF862

0.8V appear at Pin 5, necessitating the


use of two series-connected diodes to
clamp the voltage at a safe level. Zener
diode D3 holds off bias-supply loading
to aid start-up during initial power
application.EDN

G
D
D6
1N4148

D4
1N4148
D5
1N4148

D2
D3 1N751
1N4148 5.1V

C4
+1 F

R3
51
5

0.3 TO
1.6VIN
+

T1

C5
10 F

D1
1N5817

5VOUT, 2 mA
MAXIMUM

S
G
Q1
BF862

2
4

Q2
TP0610L
S

C1
6.8 F

C2
100 F

TO VIN
R1
3.83M
1% METAL
FILM

1
12

PRIMARY
TO Q1
DRAINS

SECONDARY
6

9
11
8
10

12V
Q3
TP0610L

R5
470k

3

IC1
LTC1440

1
4
5
6
7

1.18V REFERENCE
OUTPUT

C3
0.01 F
R2
1.21M
1% METAL
FILM

NOTES:
1. USE 1%-TOLERANCE METAL-FILM RESISTORS FOR R1 AND R2.
2. CONNECT T1 AS SHOWN IN FIGURE 5.
3. Q1 COMPRISES PHILIPS BF862 JFETs CONNECTED IN PARALLEL.
4. T1 = COILTRONICS VP1-1400.

Figure 4 Adding Q3, Q4, and the bootstrapped negative-bias generator comprising D2, D3, and C4 reduces the circuits quiescent current from 25 mA to 1 mA.

Configurable logic gates Schmitt


inputs make versatile monostables
Glenn Chenier, Allen, TX

You can assemble a pulse-generation circuit from a simple


Schmitt-input AND gate plus a resistor-capacitor timing network. However, if you need a logic function thats not
a standard catalog item, you need a
Schmitt-input gate or inverter and an
additional logic gate. Drawing from an
earlier Design Idea (Reference 1) and
a recent design requirement for adding
pulse-generation functions to a crowded pc board, I searched Fairchild Semiconductors Web site (www.fairchild
semi.com) for small-footprint Schmitt-

94 EDN | MAY 25, 2006

TO R3

input logic gates and found only old


faithfulsfamiliar
Schmitt-input
AND gates and Schmitt buffers.
Disappointed, I investigated other
logic offerings from Fairchild and stumbled across a section of the Web site
that describes configurable logic
gates. Lo and behold, I suddenly realized I was looking at the solution to my
problem. The NC7SZ57 and NC7SZ58 (Reference 2) comprise tiny, six-pin
surface-mount packages that you can
configure as inverters or as AND, OR,
or XOR gates, all of which allow the

7
T1

TO Q1
GATES

Figure 5 Comprising six independent windings that offer more than


500 configurations, Coiltronics
VP1-1400 serves as a combination
feedback and flyback transformer in
this application. Connect the windings as shown.

inversion of one input. These devices


feature inverted outputs, overvoltageinput tolerance, and high current drive.
Every input has hysteresis, making
these devices ideal for timed pulse generation. A design that combines digital logic with analog interfaces often
requires timed pulses and delays, along
with pulse shorteners and stretchers.
For applications in which exact pulse
times are not critical, the added feature
of Schmitt inputs allows the delay of
one input using an RC (resistancecapacitance) timing network. When
the slowly changing RC circuits output
crosses the analog-level upper- or lowertrip-point thresholds, the Schmitt feature converts the slowly rising and
falling voltages to fast digital edges.
Texas Instruments (www.ti.com)

designideas
offers functional equivalentsthe SN74LVC1G57 and SN74LVC1G58
(Reference 3). Both companies devices offer upper- and lower-trip-pointvoltage thresholds averaging 37 and
63%, respectively, of VCC, or approximately one RC time constant on the
rising or the falling edges. According to
the published data sheets from the
manufacturers Web sites, Texas Instruments versions impose somewhat
tighter tolerances on the analog
threshold levels and thus deliver
tighter timing tolerances than do the
Fairchild parts.
For digital-analysis purposes, any
voltage below the upper trip point for
a rising edge effectively represents a
logic zero, and any voltage above the
lower trip point for a falling edge represents a logic one. These conditions
are true only after the input crosses a
respective trip point, such as a rising
edge that approaches but never crosses
the upper trip point. This voltage
remains a logic zero, even if the voltage then drops back to ground potential on its falling edge.
Figure 1a shows some typical circuit
implementations. Note that these circuits lack some of the niceties of genuine monostables. For example, a circuit doesnt retrigger until after its RC
network has stabilized or about five
time constants have elapsed. The RC
time constant must be five times shorter than the time between triggering
events. Devices from the SN74LVC1G57 family produce the waveforms in
Figure 1b, and circuits using the SN74LVC1G58-family devices produce
the inverse of these waveforms. The
circuits operation is straightforward.
The RC circuits delay one input, so
that the inputs momentarily rest at
opposite states. When one RC time
constant elapses, the delayed voltage
crosses the Schmitt upper- or lowertrip-point thresholds, and the delayed
input catches up to the straightthrough input.
Of unusual interest and unlike the
usual variety of monostable that triggers only from a voltage transition in
one direction, the XOR implementation functions as a monostable trig-

96 EDN | MAY 25, 2006

gered by both the rising and the


falling edges, enabling it to function
as a frequency doubler for generating
strobe pulses on rising and falling
clock edges. You can make any inverting-gate configuration into an oscillator by feeding back its inverted output to an RC-delayed Schmitt input
and enabling the gates remaining
input. However, once the XOR oscillators remaining gate switches off the
oscillation, the gates output state
hangs at either a one or a zero to produce a truly random state derived
from the oscillations nonsynchronous
relationship to the timing of the disabling input.EDN

REFERENCES
1 Roche, Stephan, Add a Schmitttrigger function to CPLDs, FPGAs,
and applications, EDN, Oct 13,
2005, pg 104, www.edn.com/
article/CA6262539.
2 NC7SZ57/NC7SZ58, TinyLogic
UHS Universal Configurable 2-Input
Logic Gates, Fairchild Semiconductor, April 2000, www.fairchildsemi
conductor.com/ds/NC/NC7SZ57
pdf.
3 SN74LVC1G57 Configurable
Multiple-Function Gate, Texas Instruments, November 2002, http://
focus.ti.com/lit/ds/symlink/
sn74lvc1g57.pdf.

INPUT

DEVICE CONNECTIONS
PIN 5 VCC
PIN 2 GND

UPPER
TRIP POINT

PIN 3 VARIES AS SHOWN

LOWER
TRIP POINTS

INPUT

1
4

PIN 3 VCC

3
R

1
R

FALLING-EDGE
PULSE

PIN 3 GND

4 OUTPUT

RISING-EDGE
PULSE

1
PIN 3 GND

1, 3
R

4 OUTPUT

INPUT

DELAYED FALLING
EDGE

PIN 1 GND

INPUT

4 OUTPUT

INPUT

OUTPUTS'
DELAYED RISING
EDGE

OUTPUT

C
INPUT

RC CIRCUIT'S OUTPUT

4 OUTPUT

FREQUENCY
DOUBLER

C
INPUT

1, 3
R

GATED
OSCILLATOR
RANDOMSTATE
GENERATOR

4 OUTPUT

C
(a)

(b)

Figure 1 One gate plus an RC network (a) can deliver a range of useful
timed outputs (b).

designideas
Stealth-mode LED controls itself

and triggers one-shot IC2A. The oneshot turns on transistor Q1 for an interval, lighting the LED for approximately 3 msec until the one-shots output
goes low. In a darkened room, the cycle
repeats at a 200-Hz rate, and the LED
blinks repeatedly with short off periods.
At high flash rates, the LED appears to
be continuously on.
The circuits current drain in the daylight state mainly comprises the current
driving the reference-bias network:
3.6V/162 k22 A. In both day and
night modes, with the LED drawing a
few milliamperes when illuminated, a
battery that can deliver 1 Ahr would
power the circuit for a couple of
months. You can reduce the current by
increasing the values of R1 and R2.
Given the circuits low and intermittent current drain in a well-lighted
environment, a 1-Ahr lithium cells
service life should approach its shelf
life.EDN

Howard Myers, Greensboro, NC

Since the LEDs invention more


than 30 years ago, its emission
efficiency has steadily increased, and,
although it may surprise you, the
increased conversion efficiency works
in two directions. Certain bright, efficient LEDs, such as Hewlett-Packards
(www.hp.com) HLMP-EG30-NR000,
a red emitter molded in clear encapsulation, also exhibit significant photovoltaic action. The circuit in Figure 1
shows how you can put an LEDs photovoltaic characteristics to work.
Using the same components, older, red
LEDs also function but with lower light
output in this circuit. This Design Idea
circuit describes an LED that controls
itself by determining whether its on or
off without the assistance of any light
sensor other than its own characteristics. When you darken the LED, it
turns on, and, when you illuminate it,

it turns off. The circuits main components comprise LED D1, micropower
operational amplifier IC1, one-shot
IC2A, and transistor switch Q1 to control current through the LED.
When dark, the LED produces no
photovoltaic current. When moderate
lighting, such as that in an office or a
lab, illuminates it, it generates 50 to
100 mV into a 4.7-M load resistor.
Comparator op amp IC1 compares the
voltage that the LED produces with a
threshold reference voltage of approximately 50 mV. You can vary the circuits sensitivity threshold by altering
the values of resistors R1 and R2 in the
voltage divider that connects to IC1s
Pin 2.
When ambient light decreases, the
LED produces less voltage, and, when
the voltage falls below the 50-mV
threshold, the op amps output goes low

REPEATED ONE-SHOT
PERIODS WHEN LED
SEES DARKNESS

3.6V
WHEN LED
SEES LIGHT

ONESHOT
0V

R1
160k

R5
10k

Q1
2N2907
R4
470

DETECTION
THRESHOLD
VOLTAGE
2

LED SEES
LIGHT

IC 7
1
OP-90
3 
4

R2
2.2k

R3
4.7M

LED SEES
DARKNESS
6
5

16

VCC

RESET
Q

IC2A
MC14528

CXRX

D1
RED LED

VSS

R6
100k

2
C1
0.22 F

GND

 3.6V
LITHIUM
CELL

NC

NOTE: CONNECT IC2B'S UNUSED INPUTS TO GROUND.

14
11

10
NC
IC2B

12

9
15

NC

13

Figure 1 An efficient LED forms the heart of a light-sensitive mystery lamp that contains no apparent photodetector.

98 EDN | MAY 25, 2006

designideas
Data-acquisition system captures 16-bit
voltage measurements using the USB
Terry Millward, Maxim Integrated Products Inc, Blonay, Switzerland

The USB has become the interface of choice for connecting to


PCs. Available on all relatively modern
PCs, the USB offers a standard connector and can supply power to peripherals at 5V and as much as 100 mA of
current. The circuit in Figure 1 combines Maxims (www.maxim-ic.com)
MAX1168, a low-power, 16-bit ADC,
with a small USB-interface module to
AVCC

make a simple, eight-channel, 16-bit


measurement system. The MAX1168
includes eight input channels, an SPI
(serial-peripheral-interface) port, a
4.096V reference, and a clock oscillator.
The MAX1168 operates from a 5V supply and can convert individual channels,
execute multiple conversions on one
channel, or scan the channels sequentially and store measured data on-chip.

Based on a Cypress (www.cypress.


com) CY7C63743 controller, USBmicros (www.usbmicro.com) U421 USBinterface module provides as many as 16
I/O lines and an option to use some of
those lines as an SPI port at selectable
clock rates of 62.5 kHz, 500 kHz, 1 MHz,
or 2 MHz. Firmware on the U421 allows
generic access to SPI read-and-write
devices, and the devices general-purpose
I/O lines can serve as slave-select lines
for addressing multiple SPI devices. One
I/O line controls the MAX1168s chipselect input. When you use it with an
51

10

AVCC
0.1 F

10 F

0.1 F

0.1 F

FB1


150 F

0.1 F

MAX
CH0

4230
+

AVCC

DVCC

AVCC
DSEL
0.22 F

MAX
CH1

5V
USB

AIN0
DSPR

4230
+
100 pF
AVCC
_

CH2

DSPX

AIN1

0.22 F

J1
USB
CONNECTOR

100 pF

MAX
4230
+
AVCC
0.22 F

IC101
USBMICRO
U421

AIN2
100 pF

USB
5V 1

MAX
CH3

4230
+

USB D

AIN3
AVCC

IC100
MAX1168

100 pF

0.22 F

USB D

MAX
CH4

USB
DGND 4

AIN4

4230
+
AVCC

EOC

100 pF
0.22 F

AIN5

MAX
CH5

PA.0

DOUT

PA.6/SPI MISO

DIN

PA.5/SPI MOSI

SCLK

PA.7/SPI SCK

4230
+
100 pF
AVCC

AIN6
0.22 F

CS

CH6

MAX
4230
+

PB.0

NC

AIN7
AVCC
100 pF

0.22 F

MAX
CH7

4230
+
REF REFCAP AGND AGND DGND
0.22 F

100 pF

NOTE:
RESISTOR-DIVIDER PAIRS ARE PRECISION-MATCHED, 100-k MAX5490s.

1 F

DGND

0.1 F
FB2

Figure 1 This simple data-acquisition system provides eight channels of 16-bit data to a host computer through a USB
interface.

100 EDN | MAY 25, 2006

designideas
HID (human-interface deof 1/11, to allow maximum readvice), the U421 USB conable inputs of 45V at resolutroller can transfer data at rates
tions of 687.5 V.
as high as 800 bytes/sec. With
Written in Microsofts Visuadditional filtering to reduce
al Basic.Net, Standard Edition,
noise, the USB port provides
the evaluation software pro5V power to the circuit.
vides commands to the U421
The MAX1168s samplethrough the USBm.dll DLL
and-hold circuit must acquire
(dynamic-linking-library) file.
the input voltage and charge
The demo program sets the
its 45-pF holding capacitor in
MAX1168 to scan all eight
3 sec and thus requires a fast
channels and display the
amplifier to minimize acquisiresults. When you run the protion errors. Available in dual
gram, the Visual Basic form
and quad versions, the MAXallows you to set the reference
4230 provides a 10-MHz
voltage to allow for the input
bandwidth, 2V/sec slew rate, Figure 2 User-interface software for the data-acquisidivider, select the scan time,
rail-to-rail inputs and outputs, tion system allows selection of operating parameters.
and enable any of the eight
and the ability to operate from In this image, the lower three channels are unselected
input channels for screen disa 5V rail or from voltages as and hence are not visible in the display.
play (Figure 2). You can downlow as 2.7V. The MAX4230s
load the evaluation software at
bias currenttypically, 50 pAallows ing, each buffer amplifiers input in- www.maxim-ic.com/MAX=1168DI.EDN
significant input impedance without cludes a 100-k precision-matched
affecting accuracy.
resistive divider. This application uses A C K N O W L E D G M E N T
To provide protection from over- Maxims MAX5490VA10000 10-to-1 Thanks to Robert Severson of USBmicro
voltages and apply input-voltage scal- dividers, which provide a scaling factor for his help with the interface.

102 EDN | MAY 25, 2006

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Obtain a lower dc voltage


from a higher voltage power supply

D Is Inside

Luca Bruno, ITIS Hensemberger Monza, Lissone, Italy

88 Line-powered driver lights up


high-power LEDs

90 Rectifier tracks positive and


negative peaks

You can use the circuit in Figure


1 to obtain a low regulated voltage, such as 5V dc, from a higher voltage, rectified, sinusoidal voltage source
without resorting to an electrically
noisy dc/dc converter or wasting watts
in a dropping resistor. This application
requires a regulated 5V-dc source, but
a transformer supplies 18V rms to a fullwave bridge rectifier. During the
charging phase, two equal-value electrolytic capacitors, C1 and C2, receive
charging current when connected in
series through forward-biased diodes D1
and D2. An enhancement P-channel
MOSFET transistor, Q1, an International Rectifier (www.irf.com) IRF9530, remains off because its gate

117V AC

92 Isolated indicator signals telephone lines status


94 Circuit converts DACs outputs
from single-ended to differential
mode
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
ward-biased diode D3. In effect, the two
capacitors charge in series and discharge in parallel into the load, halv-

D5
BRIDGE
RECTIFIER

T1
AC
LINE

receives a slightly positive reverse-gatebias voltage due to zener diode D4s forward-voltage drop. Each capacitor
charges to approximately one-half the
peak value of the rectified voltage
minus the forward-voltage drops that
D1 and D2 present. The full-wave bridge
rectifier, D5, or Graetz bridge, produces
these drops (Reference 1).
When the discharge phase begins, D1
gets reverse-biased, and capacitor C2
discharges through the load that voltage regulator IC1 presents. Subsequently, the anode voltage of diode D1
continues to decrease, Q1s gate-tosource voltage becomes negative, and
the transistor conducts, allowing C1 to
discharge into the load through for-

18V AC

TO ORIGINAL CIRCUIT
D1
1N4002

TRANSFORMER

C1
2200 F

R1
2.2k

R2
100

D4
15V
S
G

D2
1N4002

Q1
IRF9530

D3
1N4002

D
1

C2
2200 F

C3
100 nF

VIN

IC1
LM7805
GND
3

VOUT

5V
OUTPUT
C4
100 nF

Figure 1 In this unconventional step-down circuit, capacitors C1 and C2 charge in series and discharge in parallel, reducing the voltage applied to regulator IC1.

JUNE 8, 2006 | EDN 87

designideas
ing the raw rectified voltage and ripple
voltage at IC1s input. During C1s discharge, zener diode D4 protects Q1 by
clamping its gate-to-source voltage
within its maximum rating.
To function properly, the circuit
requires a minimum load current; the

regulators quiescent-current drain is


usually enough. Otherwise, capacitor
C2 charges to the peak voltage available
from D5. The values of C1 and C2 and
the ratings of the remaining components depend on the maximum load
current required. The values of resistors

Line-powered driver lights up


high-power LEDs
Aaron Lager, Masterwork Electronics, Rohnert Park, CA

Using LEDs has gained popularity as a method of saving


power for general-purpose lighting, but
an efficient method for driving them
has also become a necessity. For example, Lumileds (www.lumileds.com)
Luxeon devices create lighting effects
or room lighting. Providing power to a
few LEDs may require only a currentlimiting resistor, but illumination
applications need a string of 20 or more
LEDs to provide light over an area.
Based on On Semiconductors (www.
onsemi.com) NCP1200A, a 100-kHz

PWM current-mode controller for universal offline power supplies, the circuit
in Figure 1 provides a low-cost, offline
constant-current source for powering
multiple LEDs. Although designers typically configure it to provide a voltage
source, in this application, the
NCP1200A provides a constant-current source. Figures 2 and 3 show
close-ups of the circuit.
A full-wave bridge rectifier, D2 to D5,
and filter capacitor C1 provide approximately 160V dc to the conversion circuit, IC1, and its associated compo-

R1 and R2 are not critical. Note that Q1


functions as a switch; selecting a device
with low on-resistance limits Q1s
power dissipation.EDN
REFERENCE
1

www.answers.com/topic/graetz-ag.

nents. Resistor R3 alters the bias for


IC1s current-sense pin and, at 6.2 k,
allows the use of a 1.2 sense resistor
for R6. Decreasing R6 not only reduces
costs over a higher wattage sense resistor, but also improves the circuits efficiency. Capacitor C3 stabilizes the feedback networks current and carries a
400V rating in case of an open circuit
in the LED string. An RC network
comprising R5 and C4 provides a small
amount of lowpass filtering to the CS
pin.
Bleeder resistors R1 and R2 eliminate
any shock hazard across the ac-line
plugs prongs when you disconnect
it. Although you can use a 1-M
through-hole-mounted resistor, two
surface-mounted 500-k series resistors
cost less and provide the required track-

D1
MUR160

D2 THROUGH D5 + 4
BRIDGE
1
TO AC
LINE

R1
500k

R4
10

C2
0.1 F
250V

NC

+ C1

47 F
400V
2

ADJ

HV

7
IC1 NC
NCP1200
3 CS
VCC 6
4

GND

DRV

R2
500k

R3
6.2k

C4
470 pF

OPTIONAL PWM
DIMMING INPUT

Figure 1 An offline constant-current source drives a string of high-output LEDs.

C3
0.001 F
400V

5 G
S

88 EDN | JUNE 8, 2006

2 FB

IC2
4N35

L1
500 H

Q1
MTD1N60E

R5
43

C5
22 F
16V

R6
1.2

20
LEDs

designideas
to-track pc-board spacing for line-voltage applications. Use a capacitor rated
for line-bypass service for capacitor C2.
You can use any power MOSFET with
a suitable breakdown voltage and a low
on-resistance, such as an MTD1N60E
or IRF820, for Q1. Inductor L1, a 500H device, should be able to operate
at 100 kHz and handle more than 350
mA of continuous current. You can use
an inductor from Coilcrafts (www.
coilcraft.com) RFB1010 or DR0810
series of surface-mount inductors, or
you can experiment with inductors
manually wound on suitable core materials. As an option, adding optoisolator
IC2 allows microcomputer-controlled
illumination dimming using pulsewidth modulation of IC1s feedback terminal, Pin 2.
To understand the economic motivation for using LEDs as illuminators,
compare the light output of a string of
20 1W, white Luxeon emitters with a
standard incandescent light bulb. Each
LED provides 45 lumens, or 900 lumens
for a string of 20 LEDs. The average

forward voltage per LED is 3.42V for a


power dissipation of 1.197W each at a
forward current of 350 mA. Thus, the
20-LED string dissipates 23.94W. Factoring in a conservative 80% efficiency for the power supply, the power the
system consumes becomes 28.73W for
a light-emission-efficiency value of 900
lumens/29W or 31 lumens/W. The
Luxeon emitters also carry a rating for
100,000 hours, or approximately 11
years, of operation.

Figure 2 A close-up view of the circuit of Figure 1 shows inductor L1


in the upper right corner.

Rectifier tracks
positive and negative peaks
Harry Bissell Jr, Welding Technology Corp, Farmington Hills, MI

Signals ranging from music to


complex control-system waveforms may contain unequal positive
and negative peak amplitudes. An
envelope-follower circuit can track
unequal peaks, but the ability to select
a desired peak can enhance the circuits
performance (Reference 1). The circuit in Figure 1 applies a new twist to
a classic absolute-value circuit. Applying an input signal to R1 (full) produces
an output equal to the inputs absolute
value. Applying an input signal to R6
(positive) or R7 (negative) produces
outputs of positive or negative halfcycles, respectively. Figure 2 illustrates
all three modes of operation.
Understanding the circuit is simple if
you consider that op amp IC1A strives

90 EDN | JUNE 8, 2006

to maintain its inverting input at virtual ground. For example, applying


1V to the negative input, R7, drives
the anode of D1 to 333 mV. IC1As
output, Pin 1, drives D2s cathode positive enough to force D2s anode voltage to 333 mV. Because IC1As inputs
now rest at 0V, D1 is effectively reversebiased and out of the circuit. The 333
mV available at D2s cathode also
applies to IC1Bs noninverting input,
Pin 5, and IC1B must balance its input
voltages by driving its output, Pin 7, to
1V. IC1Bs inverting input, Pin 6, goes
to 333 mV. The voltage drop across R4
thus equals 666 mV. One-third of the
input current flows through the series
connection of R2 and R3, and twothirds flows in R4. To achieve unity

In contrast, a standard 60W Philips


incandescent light bulb produces 860
lumens for 1000 hours, or just over a
month, at an efficiency of only 14
lumens/W. From a power-consumption
viewpoint, the LED-based design is
twice as efficient as the incandescentbulb-based design and thus reduces
power consumption and cost. In addition, the LED design imposes no additional maintenance costs for replacement bulbs and labor.EDN

Figure 3 This version of the circuit


comprises three constant-current
driver channels. An LED light-bar
assembly is above the pc board.

gain, R7s value equals that of R2R3 in


parallel with R4.
Applying a positive input to R7 causes IC1As output to go negative by a
voltage equal to one forward-diode
drop and thus holds D1s anode at
ground. D2 is reverse-biased, and both
of IC1Bs inputs rest at 0V. The circuits
output is thus 0V. Applying an input
voltage at R6 yields similar operation.
A positive input causes an equal-value
positive output, and a negative input
produces a 0V output. You can ignore
the effects of IC1Bs high input impedance, which are negligible. To maintain
unity gain, the value of R6 is twice that
of R3.
Resistors R1, R2, R3, R4, and R5 are of
equal value and close tolerance. Note
that IC1s power-supply connections
require bypass capacitors (not shown).
To minimize errors, use a low-impedance source or buffer amplifier to drive
the circuit. You can use a three-posi-

designideas
NEGATIVE

R7
6.65k

FULL

R1
10k

INPUT
S1

POSITIVE

R4
10k

R2
10k

D1
1N4148

R3
10k

D2
1N4148

R6
20k

2 
IC1A
3 TL072


R5
10k

12V

8
6 
IC1B
5 TL072

4

OUTPUT

12V

NOTE: SCHEMATIC DOES NOT SHOW POWER-SUPPLY DECOUPLING CAPACITORS.

Figure 1 Use this versatile precision rectifier circuit to recover a signals positive peaks, negative peaks, or both in fullwave mode.

tion rotary switch for input-mode selection, or an on/on/on toggle switch, such
as C&K Components 7211, available
from Digi-Key Corp (www.digikey.
com) and other sources, or a similar
switch, wired as a three-way selector.
(See the manufacturers data sheet for
a connection diagram.) You can also
use separate connectors for the inputs,
but connect no more than one input at
a time.EDN

OUTPUTS
WITH SIGNAL
APPLIED TO:
R7 IN
R1 IN
R6 IN
INPUT

AMPLITUDE

TIME

REFERENCE
1 Bissell, Harry, Envelope follower
combines fast response, low ripple,
EDN, Dec 26, 2002, pg 59,
www.edn.com/article/CA265499.

Figure 2 This waveform plot shows the circuits outputs for a sine-wave input
connected to the negative, full, and positive inputs, respectively. Traces are
vertically offset for clarity.

Isolated indicator signals


telephone lines status
Yongping Xia, Navcom Technology, Torrance, CA

Part 68 of the FCCs (Federal


Communications Commission,
www.fcc.gov) telecommunications regulations requires that certain signaling
equipment connecting directly to the
public-telephone network must present
a line-to-line resistance of at least 5
M. In addition, status signals that
equipment derives from the phone lines
must include electrical isolation to pre-

92 EDN | JUNE 8, 2006

vent interaction between earth


grounds from the telephone network
and attached control or communications equipment. Although a transformer can provide isolation for voicefrequency signals, the telephone-linestatus-indicator circuit in Figure 1
meets FCC isolation requirements
without incorporating a transformer
(Reference 1). A diode bridge, D1

through D4, and R1, a 5.6-M resistor,


supply a small amount of dc power from
the phone line to a nanopowered combination comparator and a 1.2V voltage reference, IC1. The Maxim (www.
maxim-ic.com) MAX917 IC draws
only 0.75 A at 1.8VCC.
Resistors R2 and R3 form the detection-voltage divider, and R4 provides
hysteresis. When IC1s output goes low,
R4 and R3 form a parallel combination
of 3.26-M resistance. To reach the
comparators reference voltage of
1.245V, the voltage across C1 must
reach at least 5.06V. Once IC1s output

designideas
goes high, R4 and R2 form a parallel
resistance of 6.67 M, and the voltage
across C1 must reach 3.37V to deliver
a 1.245V input to the comparator. IC1s
output drives a photocoupler, IC2, a
Toshiba (www.semicon.toshiba.co.jp)
TLP190B. Unlike other photocouplers,
IC2 includes an array of photodiodes
that, when illuminated, delivers a voltage output. Although weak by powerconversion standards, the photocouplers output can deliver several microamperes at an open-circuit voltage that
exceeds 7V, or enough to drive a MOS-

FETs gate or a microprocessors input


pin. In addition, the TLP190B carries
a 2500V-rms emitter-to-detector isolation-voltage rating.
When a telephone is not in use, the
on-hook voltage across its line of
approximately 48V produces a current of 7 to 8 A through R1, which
imposes a low-leakage requirement on
C1. The prototype version of the circuit
uses an X5R-characteristic ceramic
capacitor. When the voltage across C1
exceeds 5.06V, IC1s output goes high
and drives IC2 through R5, discharging

C1. When the voltage across C1


decreases to 3.37V, IC1s output goes
low, and C1 recharges. The output from
IC2 comprises a 1.4-msec-wide voltage
pulse with a repetition period of
approximately 240 msec. When the
phone is off the hook, the voltage
across its lines drops to a few volts,
which dont sustain pulse generation.EDN
REFERENCE
1 www.fcc.gov/wcb/iatd/part_
68.html.

R4
20M

TO
TELEPHONE
LINE

R1
5.6M
7

D1 TO D4
1N4007

VCC

R2
10M

3 IN
NC

C1
1F

R3
3.9M

IC1
MAX917

2 REF

OUT 6

R5
2.2k


IC2
TLP190B

1.245V
 VEE
4

OUTPUT

Figure 1 Drawing minuscule amounts of power from a telephone line, this isolated-output circuit indicates whether the
line is in use.

Circuit converts DACs outputs


from single-ended to differential mode
Liam Riordan, Analog Devices, Limerick, Ireland

High-speed DACs, such as


Analog Devices AD9776/
78/79 TxDAC family, offer differential
outputs, but, for low-end ac applications or high-precision level-setting
applications, a single-ended currentoutput DAC with a differential-conversion circuit provides a novel approach to generating differentialwaveform-control functions. The basic
circuit in Figure 1 combines a currentoutput DAC, IC1, such as the 8-bit

94 EDN | JUNE 8, 2006

AD5424 DAC, with a single-ended-todifferential op-amp stageIC2, IC3A,


and IC3Bto generate the desired outputs. For dual-power-supply applications, you select the DACs unipolar
mode of operation to achieve optimum
performance from the DAC. Using a
single op amp, the DAC provides twoquadrant multiplication or a unipolar
output-voltage swing. The DACs output requires a buffer because changing
the code applied to the DACs input

varies its output impedance.


This equation defines the circuits
output voltage: VOUTVREF
(D/2N), where N defines the number of
input bits, VREF is the reference voltage,
and D is the decimal equivalent of the
binary code. To generate a positive
common-mode voltage, you use a negative voltage for the DACs reference
voltage. The DACs internal design
accommodates ac reference input signals of 10 to 10V. In this mode, the
DAC provides a 5M-sample/sec maximum update rate for one-quarter fullscale code changes when you operate it
from a 5V power supply. Use resistors
R1 and R2 only if your application
requires adjustable gain.

designideas
The
single-ended-to-differential
stage comprises two cross-coupled op
amps, which resistors R5 and R6 configure as a unity-gain follower. To yield
a symmetric circuit, the outputs also
drive each other as unity-gain inverters through R7 and R8. The voltage you
apply to the positive terminal of op amp
IC2 sets the circuits common-mode
voltage. Resistors R3 and R4 control the
amplitude of the differential voltage.
Review your applications output-load

its connection to IOUT1 prevents stray


capacitance effects. The DACs reference input sees an impedance that
varies with the applied code and thus
requires a low-impedance source.
Note that the switches in the DAC
ladder no longer have the same sourceto-drain drive voltage, which in turn
limits the input voltage to low voltages.
As a result, the switches on-resistances differ and degrade the DACs linearity. Also, this mode limits the max-

requirements and the op amps inputand output-voltage capabilities.


For single-supply applications, you
can use a current-output DAC in
reverse mode, in which you apply the
reference voltage, VIN, to the DACs
IOUT1 pin and take the output voltage
from the DACs VREF terminal (Figure
2). In this configuration, a positive reference voltage produces a positive output voltage. This circuit does not use
the DACs feedback resistor, RFB, and

R4
10k
R3
10k

AD8042


IC3A

VDD
5V

R2

0.6V P-P

VVS
1.4V

R5
2.2k

0V

C1
VDD

VREF
1.8V

RFB

IOUT1
IC1
IOUT2
AD5424
DB0 TO DB7
GND
VREF

R1

 IC
2A
AD8042


R7
2.2k

VOUT

R8
2.2k
R6
2.2k

8-BIT
DIGITAL
INPUTS


IC3B

0.6V P-P
VVD

1.4V




0V

1.4V
REFERENCE

Figure 1 This basic circuit combines a current-output DAC, IC1, with a single-ended-to-differential op-amp stageIC2,
IC3A, and IC3Bto generate the desired outputs.

R4
10k
R3
10k
VDD
5V
VIN
1V

IC2B
AD8042


RFB
IOUT1
IOUT2

AD8042


IC3A

8-BIT
DIGITAL
INPUTS


GAIN=1(R2/R1)=1.75

VDD DB0 TO DB7


IC1
AD5424 VREF

 IC
2A
AD8042

R2
15k

GND

0V

R8
2.2k
R6
2.2k

0.343V P-P
CM=0.8V

1.4V

R5
2.2k

R7
2.2k


IC3B

R1
20k





1.4V
REFERENCE

Figure 2 In this configuration, a positive reference voltage produces a positive output voltage.

96 EDN | JUNE 8, 2006

0.6V P-P

VVS

0.6V P-P
VVD
1.4V
0V

designideas
imum update rate to 1.5M samtime should determine the cirples/sec. You can use sections of
cuits maximum update rate.
a dual op amp to buffer the
The AD8042 in figures 1 and
DACs input and to amplify the
2 offers 170-MHz bandwidth
DACs output voltage (Figure
and a 225V/sec slew rate,
3). The circuits intended
allowing it to easily achieve
application determines your
these results. Other high-speed
choice of supporting amplifiers.
op amps, such as the AD8022,
For lower speed, precision apAD8023, and AD8066, also
plications, the op amp requires
work well in this application.
low input-bias currents and low
The DAC consumes only 0.4
input-offset voltage to avoid
A of power-supply current,
degradation of the DACs
and the op amps thus dominate
DNL (differential-nonlinearithe circuits power consumpty) performance. For example,
tion. To minimize the area for
Figure 3 The single-ended-to-differential conversion
the AD8628 offers 100-pA
the circuit on a pc board, you
of a digitized, eight-point sine wave produces differmaximum bias current at room
can replace all four op amps in
ential outputs.
temperature and 5-V maxiFigure 2 with a single AD8044
mum input-offset voltage. The
quad op amp. The singleop amps low-frequency noise is
For high-speed-system applications, ended-to-differential conversion of a
important in precision level-setting the op amps slew rate must not domi- digitized, eight-point sine wave in the
applications, and the AD8628 specifies nate the DACs slew rate. The op amps presence of a 1.4V common-mode
0.1- to 10-Hz noise of less than 0.5 V bandwidth must be large enough to voltage and a 0.6V differential signal
p-p. Its rail-to-rail inputs and outputs drive the feedback load and must not produces differential outputs (Figure
make it ideal for use in single-supply limit the circuits overall bandwidth, 3).EDN
circuits.
and the DACs output- voltage settling

100 EDN | JUNE 8, 2006

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Microcontroller, JFET form low-cost,


two-digit millivoltmeter
Noureddine Benabadji,
University of Sciences and Technology, Oran, Algeria

The circuit in Figure 1 offers an


inexpensive alternative to commercial digital voltmeters. Although it
has only two digits, it provides considerable flexibility and thus lends itself
to customization by means of a microcontroller and its software. As one
of Microchips (www.microchip.com)
least expensive offerings, the PIC16F84A lacks an internal ADC. However, you can use a classic RC time-delay
circuit to implement an analog-to-digital conversion by connecting capacitor
C3 between lines RB7 (output) and
RA4 (input) and in series with an equiv-

alent unknown resistor consisting of


Q3s drain-to-source on-resistance, plus
R4, plus R5. Q3, a BF245A JFET, presents
the on-resistance. Q3s A suffix is
important because it corresponds to an
on-resistance of 200 to 2 k for a gateto-source voltage of 0 to 1V (Figure 2).
Other devices in the BF245 family
exhibit a less pronounced change of
resistance versus gate-to-source voltage.
To correct the measurement nonlinearity inherent in Q3s gate-to-source voltage versus drain-to-source on-resistance
transfer, the microprocessors software
includes a 100-point look-up table that

5V

C2
18 pF

4
15

4-MHz
CRYSTAL
16
13
C3
0.1 F

R6
6 560 A
RB0
VDD
R7
560 B
MC LR
RB1 7
R8
CLKOUT
560 C
RB2 8
R9
560 D
CLKIN
RB3 9
IC1
R10
PIC16F84A
RB7
10 560 E
RB4
R11
11 560 F
RA4
RB5
R12
12 560 G
RB6
R1
10k
17
RA0
R2
10k
18
VSS
RA1
5
14

C4
R3
0.1 F
10k
C1
18 pF

3
D

DS2
(TENS)

G
VIN
Q3
INPUT
S
MEASURE
R4
0.01V
2.7k
0.99V
R5
470
CALIBRATION

VIN
RETURN
NOTES: Q2=Q1=BC237/BC337/BC546 ... 550.
Q3=BF245A. (USE "A" GRADE ONLY.)
C1, C2=SEE TEXT.
DS1, DS2=COMMON-CATHODE, SEVEN-SEGMENT LED DISPLAY.

Q2

DS1
(UNITS)

Q1

Figure 1 Build a low-cost, two-digit dc millivoltmeter from a microprocessor


and a few components.

D Is Inside
72 Inexpensive envelope tracker
handles wide signal variations
76 Hartley oscillator requires
no coupled inductors
 What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
provides correction for a two-digit
display.
For an application requiring the display of readings of 0.01 to 0.99V, you
can use a 4-MHz crystal and Microchips PIC16F84A microprocessor for
IC1. To display the rightmost three
digits of readings in the 0.001 to
0.999V range, use a 20-MHz crystal
and a PIC16F84A-20 microprocessor.
Choose 15- to 33-pF values for capacitors C1 and C2, which the PICs data
sheet describes. Listing 1, which is
available online at www.edn.com/
060622di1, includes the full assembler source code for the PIC16F84A. The most critical portion of the
firmware comprises a subroutine that
provides a precision time delay according to the following steps:
1. Configure RA4 as an input to
sense the voltage across C3 during
the charging interval. When you
configure RA4 as an input, it
serves as a Schmitt trigger with
1.6V low-threshold and 3.2V
high-threshold voltages when
drain-to-drain voltage is 5V.
2. Configure RB7 as an output and
set it high to begin charging C3.
Initialize a counter (register 0CH)
to its maximum value of FFH.
3. Decrement the counter in a loop

JUNE 22, 2006 | EDN 71

designideas
until RA4 senses a low state. At
that time, C3 charges to nearly
66% of the power-supply voltage.
4. Use the time it takes to produce a
low on the RA4 input as a jump
value in the linearity-correction
look-up table to extract a value for
the two-digit LED readout.
5. Configure RB7 as an input and set
it low to discharge capacitor C3.
6. After a time delay, repeat Step 2.
To round out the design, another
software subroutine solves the problem
of driving a two-digit LED display at
adequate visibility with a minimum
amount of current. Although an LCD
would use less current, LCDs arent
visible in darkness. The display subroutine examines the eight bits of the
units and tensregisters 11H and
12Hand tests each one in sequence;
if the subroutine sets a bit, then the
subroutine puts a short-duration high
state on its corresponding segment-

sumption of the circuit


remains relatively constant
even if you add a third LED
display to build a 999-count
102
millivoltmeter.
Persistence of vision
DRAIN-TOeliminates
the need to keep
1
10
SOURCE
the displayed digits continON-RESISTANCE
(k)
uously visible, and mainBF245B
BF245A
1
taining the segments on for
approximately 33% of a 1BF245C
sec refresh interval allows a
101
good and sufficient display
0
1
2
3
4
GATE-TO-SOURCE VOLTAGE (V)
effect. Transistors Q1 and Q2
are never simultaneously
Figure 2 Gate-to-source-voltage-versus-drain-toon, and only one display
source-resistance-transfer curves for three selectsegment lights at a time. You
ed grades of the BF245 JFET show maximum
can further optimize the
resistance variation for the A grade at low gate
hardware by removing curvoltage.
rent-limiting resistors R6
through R12, lifting the
driver line, RB. Doing so lights only emitters of Q1 and Q2 from ground, and
one LED segment at a time, and, con- inserting a single 560 resistor between
sequently, the maximum current con- the emitters and ground.EDN
103

Inexpensive envelope tracker


handles wide signal variations
Anthony H Smith, Scitech, Bedfordshire, England

Converting band-limited NRZ


(non-return-to-zero) data to a
digital format suitable for microprocessors and other digital systems poses
problems when a signals duty cycle or
amplitude varies or when its average
level unpredictably wanders within a
given dc range. Transferring the signal
to a fixed-reference comparator using
ac coupling produces poor results
because changes in duty cycle cause
variations in average signal level that
result in jitter or distortion of the output signals timing.
Based on diodes and RC networks,
an envelope tracker creates a voltage
between the input signals excursions
(Reference 1). Using the midpoint
voltage as a reference, the comparator
generates a digital output signal that
faithfully replicates the original signals
timing information. Although highly
effective for relatively large signals, a

72 EDN | JUNE 22, 2006

diode-based circuit can introduce


errors or even fail completely for inputs
that are small relative to a diode forward-voltage drop or when the inputs
average level drifts toward either of the
circuits supply-voltage rails.
Requiring no diodes, the single-supply circuit in Figure 1 reconstructs a
band-limited NRZ data stream whose
duty cycle can vary from less than 5%
to more than 95% and whose amplitude varies from less than 100 mV to
the supply-rail voltage5V, for example. Furthermore, the circuit tolerates
an average signal level that falls
between the two supply rails. The circuit comprises triple analog switch IC1,
dual comparator IC2, and a few passive
components.
The circuit functions as a self-clocking envelope tracker by sampling the
input signals upper and lower levels, VU
and VL, and generating corresponding

dc levels, VUC and VLC, on capacitors


C3 and C4. Two equal-valued resistors,
R4 and R5, between C3 and C4, produce
a third voltage, VMID, thats equivalent
to the input signals midlevel voltage,
VM. Capacitor C2 smoothes and filters
VMID, which serves as a reference potential for output comparator IC2B. R2, R3,
and C1 provide temporal hysteresis,
ensuring clean switching of VOUT, even
for relatively small inputs.
To understand the circuits operation,
assume that C4, C2, and C3 all discharge; that is, VLC, VMID, and VUC are
all 0V. Because input signal VIN is
greater than VMID and the potential at
IC2As inverting input, both comparators outputs go high and cause the
three analog switches to assume the
positions in Figure 1. Now, assume that
VIN is at its positive peak amplitude,
VU. Capacitor C3 now charges through
R1 and the on-resistances of the three
switches. Provided that C3 is not too
large, VUC rapidly acquires a value
roughly equal to VU.
When VIN falls below VUC, comparator IC2As output goes low and

designideas
5V

IC2A
_

VIN

15

10
IC1B

9
IC1C

R1

14

11
IC1A

R3
100k
13

R2
1k

12
R4
560k

VU

R5
560k

VL
INPUT SIGNAL, VIN

IC2B

VMID

C3
10 nF

VM

C1
100 pF

VUC

VLC
C4
10 nF

VOUT

C2
1 nF
OUTPUT SIGNAL, VOUT

NOTES: IC1: 74HC4053 (PIN 16: V+; PINS 6, 7, 8: 0V).


R1, IC2: SEE TEXT.

Figure 1 This circuit tracks an NRZ signals envelope excursions and recovers the original waveform.

500 mV/DIV

100 mV/DIV

2V/DIV
5V/DIV
500 SEC/DIV

100 SEC/DIV

Figure 2 The lower trace shows the envelope trackers


response to a bandwidth-limited, low-duty-cycle, lowamplitude input signal. The horizontal line in the upper
trace shows the signals recovered midpoint voltage, VMID.

forces analog switch IC1C to change


state and disconnect C3 from VIN.
Ignoring comparator input-bias currents and assuming negligible switchleakage currents, C3 can now discharge
only through R4. If R4 is large enough,
the relatively slow discharge rate
allows VUC to remain roughly equal to
VU.
During C3s charging interval, C2 also
charges through R4. Depending on the
values of C2 and R4 and on the duration of the input signals positive-going
pulse, voltage VMID may exceed the
input signals lower level, VL. If VMID
exceeds VL, comparator IC2B trips when

74 EDN | JUNE 22, 2006

Figure 3 The lower trace shows the envelope trackers


output signal recovered from an inductively coupled data
transceiver.

VIN approaches VL, and the resulting


low level at VOUT causes both IC1A and
IC1B to change state. Capacitor C4 now
connects to VIN through R1 and the
switches on-resistances and quickly
charges to a level at which VLC approximately equals VL.
Depending on component values
and on the input signals timing parameters, several cycles may elapse before
the circuits voltage levels stabilize at
their quiescent values, at which
VUCVU, VLC VL, and VMID VM.
However, careful selection of components ensures that the circuit rapidly
reaches equilibrium. Ensuring that the

comparator trips properly when VIN


goes below VU or above VL requires that
R1 provide a minimum amount of
impedance of 100 to 1 k between
VIN and IC2As inverting input. Higher
values result in sluggish charging of C4
and C3. In many designs, the combined
on-resistances of IC1B and IC1C may
allow omission of R1.
The presence of IC1B, IC1C, and IC2A
ensures that C3 can charge when VIN is
close or equal to VU and that C4 can
charge only when VIN is close or equal
to VL. Without IC1B, IC1C, and IC2A
that is, with VIN connected directly to
R1C3 would discharge on the downward slope of VIN between VU and VM

designideas
and would thus pull down VUC. Similarly, C4 would continue to charge on
the upward slope of VIN between VL and
VM and would thus pull up VLC.
Although VMID might be roughly equal
to VM, such a minimal configuration performs relatively poorly, particularly for
small signals and at extreme duty cycles.
The components in Figure 1 produce
good results for input frequencies of 5 to
50 kHz. Frequencies lower than 5 kHz
may require larger capacitor values, and
operation higher than 50 kHz may require reduction of capacitors values and
selection of a comparator with minimal
response time. With properly selected
components, the circuit performs well at
baud rates to or exceeding 128 kbps.
The values of R5, R4, C2,,and, to a lesser extent, the analog switches on-resistance and R1, C4, and C3 determine the
circuits response time to a sudden
change in input-signal amplitude or

average level. Making C2 approximately 10 times smaller than C4 and C3


ensures a rapid attack time, but too
small a value can result in excessive ripple and noise on VMID. For reliable operation, use equal values of close-tolerance
resistors of 100 k to 1 M for R4 and
R5. If you use high-value resistors for R4
and R5, choose a comparator with low
input-bias currents for IC2. For detection
of signals that might approach the positive-supply rail, the 0V rail, or both,
make sure that IC2 offers rail-to-rail
input capability. Bypass each ICs
power-supply connections with lowimpedance ceramic capacitors.
Note that, with no input signal present (that is, when applying a dc level
to VIN) VOUT may contain random pulses caused by noise and the comparators
attempts at maintaining VMID equal to
VINs average dc level. To eliminate the
pulses, remove C1 to replace temporal

Hartley oscillator requires


no coupled inductors

hysteresis with normal hysteresis, but


ensure that the hysteresis levels that R2
and R3 set are not excessively large relative to the minimum input-signal
amplitude.
Figure 2 shows the circuits response
to a bandwidth-limited input signal of
approximately 5% duty cycle and 75mV amplitude. The horizontal trace,
VMID, neatly bisects the waveform. The
bottom trace shows the reconstructed
signal at VOUT. In Figure 3, the circuit
processes the real-world output of an
inductively coupled transceiver (upper
trace) of approximately 200 mV p-p.
Again, the lower trace shows the reconstructed signal at VOUT.EDN
REFERENCE
1 Whipple, Roger C, Envelope
tracker quells jitter, EDN, July 7,
1994, pg 102, www.edn.com/
archives/1994/070794/14di8.htm.

L1LM. The rest of the equations for


the equivalent circuit are:

Jim McLucas, Longmont, CO

Examine a traditional Hartleyoscillator circuit, and youll


note its trademark: a tapped inductor
that determines the frequency of oscillation and provides oscillation-sustaining feedback. Although you can
easily calculate the total inductance for
a given frequency, finding the coupling
coefficient, k, may require experimental, or cut-and-try, optimization. This
Design Idea presents an alternative

equivalent circuit that allows you to


model the circuit before building the
prototype.
Figures 1a and b show the Hartley
oscillators equivalent tuned circuit, the
equations that calculate its components, and component values for an 18MHz oscillator. The mutual inductance
is LMkL1L2. For the equivalent
circuit, the equations are: LALM,
LBL2LAL2LM, and LCL1LA

L2
815 nH
C
67 pF

k=0.250
LM=92.5 nH

(a)

and

Unfortunately, a truly equivalent circuit requires a negative inductance, LA.

LB
907.5 nH

LB
907.5 nH
C
67 pF

L1
168 nH

(b)

LA
92.5 nH
LC
260.5 nH

C
67 pF

CA
845 pF
LC
260.5 nH

(c)

Figure 1 A traditional Hartley oscillators resonant circuit comprises a tapped inductor and resonating capacitor (a).
Allowing for mutual coupling between windings produces an equivalent circuit containing a negative inductance (b).
Replacing the negative inductance with a capacitor yields an easily modeled equivalent circuit (c).

76 EDN | JUNE 22, 2006

designideas
L1
8.3 H

9.5V
2%

C1
0.01 F

NOTES:
L1, L2: SIX TURNS AWG #22 WIRE ON A FAIR-RITE 2643002402 CORE.
L3: FIVE TURNS AWG #26 WIRE ON A CWS BYTEMARK FT-23-61 CORE.
LB: 11 TURNS AWG #22 WIRE AIR CORE, 0.450-IN. AVERAGE DIAMETER, LENGTH=0.450 IN.
LC: SEVEN TURNS AWG #22 WIRE AIR CORE, 0.300-IN. AVERAGE DIAMETER, LENGTH=0.275 IN.
AVERAGE DIAMETER IS THE DIAMETER OF THE CORE PLUS ONE WIRE DIAMETER.
D1
1N4370A

C2
0.01 F
D

R1
10k

G1

CA=680 pF+150 pF+15 pF=845 pF.


TANK

C4
27 pF

OUTPUTLEVEL
ADJUSTMENT
R15
5k
R16
3.01k

C5
33 pF

LB
0.9075
H

C6
10 pF

LC
0.2605
H

CA
845 pF

C3
560 pF

C18
4.7 F

C19
0.22 F

C10
0.01 F

R4
4.3k

Q1
S BF998

C7
18 pF

R5
47k

C12
0.01 F
Q2
BF998
D
G1
G2
S

R2
C8
39 pF 100k

CONTROL VOLTAGE
R17
73.2k

G2

R6
10k

C9
0.01 F

R3
39

D2
SD101C

D3
SD101C

R18
43.2k
C20
220 pF

L2
8.3 H

C13
0.01 F

R8
22

C21
220 pF

R7
27k

C11
220 pF

R9
220

R11
13k

C15
0.01 F

R12
22
C16
240 pF
OUTPUT

L3
620 nH

C17
240 pF

Q3
2N3904

LOAD
R19
50

C14
560 pF
R13
10k

R14
220

R10
220

Figure 2 This buffered-output, 18-MHz oscillator has a resonant circuit that doesnt rely on mutual coupling for operation.

However, for frequencies near the resonant frequency, f0, you can replace the
negative inductor with a capacitor, in
which CA replaces LA (Figure 1c).
Note that the equivalent circuits derivation neglects parasitic winding
resistances and capacitances.
Figure 2 illustrates an oscillator and
output buffer using the equivalent circuit. The constructed circuit generally
performs as you would expect from an
initial Spice simulation. During testing,
several components values required
tweaking, and multiple iterations of
Spice analysis ultimately yielded the
final design. The oscillators tank circuit
comprises LB, LC, C4, and C5, plus
capacitance provided by voltage
divider C6, C7, and C8. This capacitance of approximately 6 pF
includes Q1s and Q2s input capacitances and some stray capacitance. The
total tank capacitance of 66 pF approximates the calculated value of 67 pF.
Capacitors that connect to the tuned
circuit feature ceramic-dielectric construction with NP0 temperature coefficients.

78 EDN | JUNE 22, 2006

Inductors LB and LC comprise air-core


coils with their axes at right angles to
each other to minimize stray coupling.
However, vibration affects their inductances, and, in a final design, both
should comprise windings on dielectric
or toroidal cores, providing that the
toroids temperature coefficients of inductance are acceptable for the intended application. Reference 1 provides basic designs for both inductors,
and adjusting the spacing of their turns
tunes the oscillator to exactly 18 MHz.
For a more rigorous design, you can
measure the inductors before installation, but parasitic effects may require
readjusting the inductors values.
The capacitive voltage divider comprising C6, C7, and C8 applies the proper signal levels to Q1 and Q2. Because
the divider sees the tank circuits
effective capacitance as only 6 pF, the
remaining 60 pF can comprise a variable capacitor if the design calls for a
tunable oscillator. In this example, the
output stage comprising Q3 and its
associated components would require
modification to provide more band-

width if the oscillator requires a tuning range exceeding 2 MHz.


Capacitor C3 bootstraps Q1s Gate 2
to Q1s source to provide additional
gain from Q1 and to reduce its Gate 1
input capacitance below its value of
approximately 2.1 pF (Reference 2).
An 8.3-H inductor, L2, connects to
Q1s source and presents relatively high
impedance at 18 MHz and provides a
dc path from Q1s source to ground
through R3. The impedance of L2 at 18
MHz comprises an inductive reactance
of about 940 in parallel with a resistance of approximately 3.5 k, which
results in a choke with low resistive
losses. You can substitute a smaller
inductor for L2 provided that its inductance and reactance approximate the
originals values. You can use a standard-value 8.2-H choke for L2 provided that its resistive losses meet these
low-loss criteria and that its inherent
series resistance is 2 or lower to avoid
upsetting Q1s dc bias voltage. The
inductance and resonance of the
choke for L1 are less critical than those
for L2, but using a choke with low resis-

designideas
tive losses at L1 helps avoid spurious
resonances.
Source follower Q2 drives the output
stage, which uses a pi-matching network to transform the 50 output load
to 285 at Q3s collector. Bootstrapping
Q2s Gate 2 by one-half of its output
voltage increases the source followers
gain and dynamic range and reduces its
input capacitance. Potentiometer R5
adjusts the circuits output level from
about 0.9V p-p to approximately 1.5V
p-p across a 50 load. The circuits frequency remains stable at a constant
room temperature of about 23 C. Also,
the output-level-control circuit remains stable even if you apply no load
to the output. For a fixed-frequency
oscillator, the output circuits loaded
resistive losses of approximately 4 provide adequate bandwidth without retuning L3, C16, and C17.
To set the output level to a safe maximum, connect a 50 load to the output and adjust the output to 1.5V p-p.

80 EDN | JUNE 22, 2006

The drain-to-source voltage you apply


to Q1 remains at a safe level for all loads
from 50 to no load, even though the
output-voltage level increases as the
load resistance increases. To avoid
exceeding Q1s specified maximum 12V
drain-to-source voltage, do not exceed
an output-voltage setting of 1.5V into
a 50 load. Note that zener diode D1
reduces Q1s drain voltage to provide an
additional safety margin.
In a previous Design Idea, an operational amplifier and a diode-rectifier
circuit control the oscillators gain by
applying a variable voltage to Q1s
Gate 2 (Reference 3). In this design,
a simple passive circuit serves the same
purpose. A portion of the signal at Q3s
collector drives a voltage doubler comprising D2, D3, C20, and C21. The voltage doubler develops a negative voltage, part of which drives the junction
of R18 and C19, the control-voltage
node. This control-voltage node also
receives a positive voltage through R17

from variable resistor R15, and the


resultant voltage sets the output-signal
level. At start-up, only a positive voltage is present at Q1s Gate 2, and Q1s
maximum gain easily starts the oscillator. When the output reaches steady
state, the control voltage decreases
and maintains oscillation at a signal
level that the output-level control
determines.EDN
REFERENCES
1 Reed, Dana G, Editor, Calculating
Practical Inductors, ARRL Handbook
for Radio Communications, 82nd
Edition, American Radio Relay
League, 2005, pg 4.32.
2 Practical FET Cascode Circuits,
Designing with Field-Effect Transistors, pg 79, Siliconix, 1981.
3 McLucas, Jim, Stable, 18-MHz
oscillator features automatic level
control, clean-sine-wave output,
EDN, June 23, 2005, pg 82,
www.edn.com/article/CA608156.

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Error compensation improves


bipolar-current sinks

D Is Inside

Christian de Godzinsky, Planmeca Oy, Helsinki, Finland

90 Microcontrollers single I/O-port


line drives a bar-graph display

You can improve a current sinks


accuracy by at least two orders of
magnitude by adding two standard 1%tolerance resistors. As a bonus, you also
compensate for errors that a low-current-gain pass transistors base current
introduces. To do so, you measure the
transistors base current and add a proportionally scaled error term to the
sources reference voltage. When you
design a current sink, you can use a
MOSFET for the sinks pass transistor
because of its nearly infinite power gain
and low gate current. However, a highpower MOSFET presents high input
and output capacitances that reduce
the sinks high-frequency output impedance.
As an alternative, a low-current-gain,
bipolar power transistor presents a much
lower output capacitance than does a

86 Phase-sequence indicator uses


few passive components

MOSFET of comparable power ratings.


Figure 1 shows a design for a bipolartransistor-based current sink that unfortunately suffers from accuracy errors due
to Q1s base currents flowing into the
current-measurement resistor R1. The
base current varies with changes in Q1s
collector current and current gain,
which in turn depend on Q1s production tolerances, junction temperature,
and collector-emitter voltage.
You can use a Darlington transistor
to increase the circuits current gain and
reduce the output error, but few Darlington transistors offer good high-frequency parameters. Superbeta power
transistors are rare, have typically lower
unity-gain-bandwidth frequencies, and
are more expensive. In other words,
even though a bipolar transistor presents higher output impedance at high

VC
REGULATED
CURRENT

R4
1k

+
_

+
IC1

+
VREF

R2
47
Q1
CCOMP

2N3020
R3
1k
R1
1

Figure 1 This typical quickly responding constant-current sink uses a bipolar


transistor but suffers from base-current-induced error. Its nominal output current
is IOUT(VREF/R1)IB.

What are your design problems


and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
frequencies, the error from its base current makes it a poor choice for a highprecision current sink. You could compensate for base-current errors by measuring the output transistors collector
current and introducing a correction
factor, but that approach increases circuit complexity and reduces the sinks
output impedance.
Figure 2 shows a better approach,
which adds a differential amplifier, IC2,
and resistors R6 through R9 to measure
Q1s base current by sampling the voltage across R2. Resistors R4 and R5 scale
and sum the error and reference voltages you apply to differential amplifier
IC1. Because IC1s inverting input connects to current-shunt resistor R1s
upper end and not to ground, the reference voltage, VREF, determines the
error voltage applied to Q1, preserving
output scaling and allowing output-current calculation as VREF/R1. As a result,
the regulated voltage across R1 represents the sum of the desired output current plus the transistors base current.
Because the transistor inherently subtracts its base current, its collector current and, hence, the output current
have no base-current error.
You can simplify the circuit and preserve its error-correction properties by
combining IC1 and IC2; better yet, you
can add two resistors to Figure 1 to

JULY 6, 2006 | EDN 83

designideas
achieve the same effect. Figure 3 shows
the final circuit. To understand its operation, think of the circuit as a voltage
regulator that delivers a voltage equal
to VREF across R1. If you short-circuit
base resistor R2, note that any commonmode error that resistors R5 and R6
introduce cancels and thus has no effect
on Q1s base voltage. When you feed
the voltage drop back to IC1s input
through R5 and R4, the voltage drop
across R2, representing Q1s base current, increases the regulated voltage
across R1 by the ratio of R5/R4. If the
ratio of R5/R4 equals that of R2/R1, the
voltage across R1 includes an error term
that effectively cancels the base current. If R3R4 and R5R6, the following equation describes the output current, IOUT:

VC

+
IC2

R6
47k
R5
47k

R9
47k

+
_

R8
47k
REGULATED
CURRENT
R7
47k

VCC

+
_

R2
47k

IC1

Q1

R4
1k

CCOMP

2N3020
R3
1k
R1
1

VREF

Figure 2 Adding base-current error compensation improves the circuits performance. Using perfectly matched resistors simplifies the output-current equation to IOUT(VREF/R1).

Because the base current, IB, appears


twice with opposite signs and cancels,
the equation simplifies to: IOUT
(VREF/R1).
To optimize the circuits perform-

ance, use the following resistor ratios:


R2/R1R5/R4, R5R6, R3R4, R5
R4, and R3R1. Using standard 1%tolerance resistors in the circuit of Fig-

R5
47k
REGULATED
CURRENT

VC
R4
1k

R2
47

IC1

+
VREF

Q1
CCOMP

2N3020
R6
47k
R3
1k
R1
1

Figure 3 You can further simplify the current sinks design by adding only two
resistors, R5 and R6, to the original in Figure 1. The output-current equation
remains IOUT(VREF/R1), as in Figure 2.

84 EDN | JULY 6, 2006

ure 3 reduces the error from Q1s base


current to about one-one-hundredth of
its uncompensated level. Without
compensation, a low-gain power transistor with a typical current gain of 25
at Q1 would introduce a full-scale current error of 4%. The circuit corrects
the error to 0.04% and raises Q1s current gain to an effective current gain of
2500. Perfect matching would result in
an immeasurably small base-current
error. Note that IC1s input commonmode-voltage range must include the
negative-supply-voltage rail. Equal
resistances at both of IC1s inputs balance the op amps input-bias currents.
The minimum power-supply voltage
depends on IC1s maximum currentsourcing capability and on the sum of
the worst-case voltage drops across Q1s
base-emitter junction, R1 and R2. The
circuits maximum output current depends on Q1s worst-case minimum current gain times IC1s worst-case minimum output current.
To ensure stable operation, use a
unity-gain-stable op amp for IC1.
When the circuit operates within its
nominal current range, an op amp
whose response time is substantially

designideas
REGULATED
CURRENT
R2
47
TO REMAINDER
OF CIRCUIT

Q1

R6
47k

2N3020
Q2
R3
1k

RSPEEDUP
470

2N3020

R1
1

Figure 4 Adding RSPEEDUP improves the performance of a two-transistor


Darlington output stage.

longer than Q1s generally doesnt


require installation of compensation
capacitor CCOMP. However, a small

capacitor of a few tens of picofarads


guarantees stability under all conditionsfor example, when the circuits

output current and the feedback voltage across R1 approach zero.


The circuit in Figure 3 works equally well if you use a Darlington transistor
for Q1 because its higher current gain
further improves the circuits operation.
If you use two discrete bipolar transistors,
you can improve the composite Darlington transistors turn-off time by connecting a resistor between the output
transistors base and emitter to remove
its excess base charge (Figure 4).
You can use either a fixed or an
adjustable reference-voltage source, but
for the smallest possible error, the reference sources output impedance
should be fairly low to sink feedback
current from R4. You can also proportionally increase the values of resistors
R3 through R6 to reduce the amount of
current that the reference source
absorbs. Its amazing what you can
achieve by adding only two resistors to
an already-simple circuit.EDN

Phase-sequence indicator uses


few passive components
Metodi Iliev, University of CaliforniaBerkeley

In a three-phase ac system, a
power source with three wires
delivers ac potentials of equal frequency and amplitudes with respect to
a zero-potential wire, each shifted in
phase by 120 from one wire to the
next. Two possibilities exist for establishing a phase sequence. In the first,
voltage on the second wire shifts by
120 relative to the first, and, in the
second, a 120 shift occurs with
respect to the first wire. Phase order
determines the direction of rotation of
three-phase ac motors and affects other
equipment that requires the correct
phase sequence: a positive 120 shift.
You can use a few low-cost passive
components to build a phase-sequence
indicator.
Figure 1 shows a conceptual circuit
that can detect both phase sequences.

86 EDN | JULY 6, 2006

For certain component values, the following conditions apply: The voltages
across R1 and C2 are equalthat is,
their magnitudes and phases are the
sameonly when VS2 occurs exactly
120 ahead of VS1, which indicates the
correct phase sequence. In this case, the
voltage between points A and B is zero.
Conversely, the voltages across C2 and
R3 are equal only when VS2 is ahead of
VS3 by 120, which corresponds to a
reversed sequence.
Referring to the phasor diagram in
Figure 2, when the voltages across R1
and C2 are equal, VC1VR2, VC1
VR1VS1, and VC2VR2VS2. The following equations satisfy these conditions:
|VR1||VC2|(1/2)|VS2|
(1/2)|VS1|, and |VC1||VR2|
cos(30)|VS1|cos(30)|VS2|. You
calculate the component values by

VS1

VS2

VS3

C1
I1

A
R1

C3

R2
I2

B
C2

I3

C
R3

Figure 1 This conceptual circuit can


detect both phase sequences.

solving the following equations:


|XC1|tan(60)R13R1, and
R2tan(60)|XC2|, where XC
j[1/(2fC)], and f represents the
frequency of the VS voltages.
Also, to ensure detection of a
reversed phase sequence, C1C3, and
R1R3; that is, the components in the

designideas

VR2
VS2

60
VS3

VC2
VR1

VR3

120

VC3
VS1

VC1

Figure 2 When the voltages across


R1 and C2 are equal, VC1VR2,
VC1VR1VS1, and VC2VR2VS2.

third branch are identical to those in


the first branch. The phase-sequencedetection circuit in Figure 3 eliminates
the requirement for an accessible
ground wire by adding resistors R4 and
R5 that connect in parallel with the first
and third branches. Eliminating the
ground-wire requirement also dictates
a ratio between |XC1R1| and
|XC2R2|. For no current to flow to
ground from Node G, the sum of currents in the branches must equal zero,
and, if you disconnect Node G from

VS1

ground, its potential with respect to


ground is also zero.
As long as the proportions of XC1 to
R1, XC2 to R2, and XC3 to R3 remain as
noted, the balance of voltage drops
remains across R1, C2, and R3. Multiplying the impedance of any branch by
a constant influences only the magnitude of the currents through the respective branch. The current through any
branch presents the same phase angle
as the voltage across a resistor in the
branch. The phasor diagram in Figure
4 shows the currents in Figure 3. From
this diagram, if |I2|tan(60)|I1|,
then I1I22I3. Thus, I3 has half
the magnitude of and an exactly opposite direction from (I1I2).
A vector diagram of the currents
shows that adding two currents, each
with magnitudes equal to I3 and the
same phases as VS1 and VS3, produces a
summed current with the same magnitude and phase as I3; therefore, the total
current at Node G is zero: I1I2
I3I1I3I1I22I30. To make
the sum of the currents equal zero,
R4R5|R1XC1||R1j[1/(2
fC1)]|. The two LEDs in Figure 3
indicate correct or reversed-phase
sequence. When LED2 lights and LED1
remains dark, the voltage between
nodes A and B is 0V, which corresponds

VS2

VS3

I1'

I1
R4 A
93.1k

C3
33 nF

R2
46.4k

C1
33 nF
I2
R6
499k

I3

LED1

LED2
B

R7
499k

I3'
C
R5
93.1k

R1
46.4k

D1
1N4004

D2
1N4004

C2
100 nF

R3
46.4k

Figure 3 This phase-indicator circuit balances branch voltages and currents and
requires no ground reference. These component values are for a 60-Hz line frequency.

88 EDN | JULY 6, 2006

VS2

I1+I2

I2
VS3

I3 '

60
120

I3

I1

I1 '

VS1

Figure 4 I3 has half the magnitude


and an exactly opposite direction to
(I1I2) in Figure 3.

to a correct phase sequence. A reversed-phase sequence lights LED1


while LED2 remains dark. The diodes
connected in parallel with the LEDs
protect against exceeding the LEDs
reverse-breakdown voltages, and resistors R6 and R7 limit forward currents
through the LEDs. For greater sensitivity, you can replace the LEDs with
high-input-impedance ac-detector circuits.
The circuits final version includes
indicators that show whether all three
phases carry voltage. In the circuit in
Figure 3, a phase that carries 0V lights
both LEDs. Depending on your application, you can connect voltagedetection circuits comprising LEDs and
protection diodes in series with currentlimiting resistors between VS1, VS2, and
VS3 and Node G. You can also use lowwattage neon lamps with appropriate
series-current-limiting resistors.
When selecting components, ensure
that their values conform to the following proportions. For an arbitrarily
chosen value for C1, R1R2
R31/(2fC1tan(60)), C1C3,
C23C1, and R4R52R1. When
you select a value for C1, the currents
through the detection circuitry should
be significantly lower than the currents
through the branches, which excludes
arbitrarily low values for C1.EDN

designideas
WIDTH T1

Microcontrollers single I/O-port


line drives a bar-graph display

LONG
MICROPULSE
CONTROLLER
OUTPUT
T1
NAND
OUTPUT
(T1T2)
T2

R Jayapal, PhD, Bharat Heavy Electricals Ltd, Trichy, India

Instrument designs featuring a


digital display may benefit from
a secondary display that provides an
analog version of the displayed parameter. A bar-graph display provides an
easily interpreted graphical indicator
that allows comparison with its fullscale value, but a conventional microcontroller-based design uses at least one
eight-line I/O port to drive an eightsegment-bar-graph LED display.
As an alternative, some microcontrollers include a PWM (pulse-widthmodulated) output. You can minimize
the number of required I/O lines by
using the PWM output to drive
National Semiconductors (www.
national.com) LM3914 bar-graph-display-driver circuit or an equivalent. In
operation, the microcontrollers program adjusts the PWM outputs pulse
width such that the average voltage
that feeds to the LM3914 circuit illuminates the required number of bars in
the display.
The design in Figure 1 obviates the
shortcomings of these approaches and
uses only one port line to drive an
eight-segment bar graph. This design
does not use a PWM output and hence
can apply to any microcontroller.

Referring to the timing diagram in Figure 2, whenever the bar-graph display


requires an update, the microcontrollers software delivers a pulse train
through its output port. The first pulse
comprises a pulse of width T1 thats
longer than the width of the pulse T2,
which triggering monostable IC1, a
74123 or equivalent, produces. You
apply both pulses to IC3, a 7400 or
equivalent NAND gate, which together with IC1 forms a long-pulse detector.
Use the equation in IC1s data sheet to
select values for C1 and R1 that yield a
value of approximately 1.5 msec for T2s
output pulse. Typical widths for T1 and
T3 are 3 and 1 msec, respectively.
The output pulse from IC3 goes low
for a duration of T1T2, and this pulse
clears IC2, an 8-bit serial-in parallel-out
shift register, which forces all of IC2s
outputs to go low and lights all segments
of the bar-graph array (LED1 to LED8).
To light N segments of the bar-graph
array, the microcontroller immediately
sends a serial train of (8N) pulses of
width T3 through the output-port line.
Because the width of these pulses is less
than T2, NAND gate IC3s output always
remains high and thus does not clear the
shift register. The rising edge of each of
SERIAL
IN A 5V

SERIAL
IN B

5V
1
C2
0.1 F

PORT
LINE

R1
40k

Q1
A1
1

GND
8

(QC) 5
6
(QD)
IC2
74164
10
(QE)

C1
100 pF
1
2 IC3

3 CLEAR
CLOCK

(QF)
(QG)
(QH)
GND
7

C3
0.1 F

MOST
SIGNIFICANT
SEGMENT R2
750
3

(QB) 4

REXT1 15
IC1
74123
CEXT1 14

MICROCONTROLLER

2 14
(QA)

3 11 16
VCC

QA

5V

R3
750
R4
750
R5
750
R6
750

11

R7
750

12

R8
750

13

R9
750

EIGHT-SEGMENT
LEAST
LED BAR GRAPH
SIGNIFICANT
SEGMENT

Figure 1 You can add a multisegment bar-graph display to a microcontroller that


has only one output line.

90 EDN | JULY 6, 2006

ALL PULSES ARE


OF WIDTH T3

T3 T4
SEGMENT
IS OFF
(HIGH)

QB
QC
QD
QE

SEGMENT
IS ON
(LOW)

QF
QG
QH
LEAST SIGNIFICANT
SEGMENT

Figure 2 During the first pulse of the


microcontrollers output-pulse
sequence, the NAND gates output
clears the shift register and lights all
of the displays segments.

the microcontrollers output pulses


loads a high to one of IC2s outputs.
Note that shift register IC2s QA output connects to the bar graphs most significant segment. Hence, the first pulse
switches off the most significant segment. Starting with the most significant segment, for (8N) pulses, 8N
segments switch off, and N segments
beginning with the least significant segment remain lighted. Using this
reverse logic takes advantage of the
shift registers outputs ability to sink
more current than they can source8
versus 0.4 mA, respectively, and thus
produce a brighter bar-graph display
without adding output buffers. Figure
2 shows a sample timing diagram that
lights five of eight display segments.
If a second output-port line is available, you can omit using monostable
multivibrator IC1 and NAND gate IC3
and use the second port to clear the
shift register by outputting a zero whenever the bar graph requires an update.
To obtain finer resolution, you can add
segments to the bar graph by cascading
additional shift registers. To light N segments of a display that is M segments
long, the first output port sends MN
pulses to the shift registers clock input.
This design lends itself well to situations in which unused I/O-port lines are
at a premium, as is the case for microcontrollers with reduced pin counts, or
if you need to retrofit a bar-graph display by adding a daughterboard to a
design.EDN

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Microprocessor generates
programmable clock sequences

D Is Inside

William Grill, Honeywell BRGA, Lenexa, KS

86 Ceramic output capacitors


enhance internally compensated
integrated switchers

90 Tapped inductor, boost regulator deliver high voltage

To produce trains of pulses suitable for keying transmitters,


testing circuits, and debugging data
links, designers requiring continuous or
event-driven pulse sequences have traditionally relied on pulse generators or
collections of simple circuits. Todays
inexpensive microprocessors make it
possible to design and build low-cost,
dedicated pulse-sequence generators
with a minimum of resources. In a
small, SOT-23-packaged, 10F200 controller from Microchip (www.micro
chip.com), the design in Figure 1 uses
a code-based embedded table algorithm to generate an application-settable period and table-based PWM
(pulse-width-modulation) sequence.
The application produces a continuously pulsed sequence and requires
only three constants and a pulse-width
profile table that it copies into the
microprocessors assembler-based code
before compiling (Figure 2).
All code branches undergo equal-

ization to produce a group of 29 constant instruction times. During software development, you can use coded
constants and a table-based approach
as a flexible method of modifying the
pulse sequence. The three parameters
that Figure 2 highlights include the
number of PWM cycles that execute
between tabled steps, which the algorithm passes as temp_cntK. This
parameter defines how many PWM
periods of a range from one to 255
repeat within each tabled step. For
three cycles per table step, you use
#define temp_cntK .3. The next
parameter is the number of 29instruction loops that execute during
each PWM period. All branches of
the coded instructions equalize to
constant 29-instruction periods.
When you copy this parameter as
loopsK, it can range from one to
255. Using the 10F200s internal 4MHz clock and an 8-bit counter to
generate 1-sec instruction periods,
you can gener-

What are your design problems


and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
ate a PWM period range of 58 to 7395
sec, which corresponds to a frequency range of 17,241 to 135 Hz. For
a 1-msec PWM-cycle period and the
sequence in Figure 2, you require 31
base loops per cycle, which you obtain
by dividing 1 msec by the 29-sec
instruction period: #define loopsK
.31.
You then equate the total number of
table profile steps to table_maxK.
The total number of profile steps that
a look-up table includes and that you
copy into the code may vary from one
to 252. In this application, five tabled
steps correspond to pulse duty cycles of
25, 50, 87.5, 12.5, and 75%. These val-

2 TO 5.5V
VDD
1

R1
10k

ENB

PWMOUT

IC1
PIC10F200/202
VSS

VDD

6
PWMOUT

PWM CYCLE
STEP

ENB

MODE

PROFILE

VSS

Figure 1 A microcontroller and a resistor can deliver a complex PWM output.

Figure 2 This waveform profile comprises five steps, each


using one of three PWM cycles. In continuous mode, the
circuits output repeats indefinitely.

JULY 20, 2006 | EDN 83

designideas
ues undergo scaling according to the
following equation: Duty cycleINT
(%TDTY/100loopsK0.5), in which
INT is the integer value and %TDTY is
the percentage of the total duty cycle.
In this example, loopsK31. The
number of steps in the table passes to
the program as #define loop_maxK .5.
The pulse-duty cycle can vary only in
increments of a single 29-instruction
base loop, and, as a consequence, the
pulse duty cycles resolution varies as
the number of basic loops for the waveforms desired period, which you define
as loopsK31 loops. Thus, the dutycycle resolution equals 1/(loopsK), or
1/(31)3.22% for this application.
You can use a spreadsheet or manually calculate the translated and
scaled duty-cycle values and store
them in the data-profile table. For
example, you calculate the value for a
25% duty cycle as INT(25/resolution
0.5)=INT(25/3.220.5), where INT
represents extraction of the integer
value of the computed quantity. For
required duty cycles of 25, 50, 87.5,
12.5, and 75%, the values that pass to
the data-profile table are retlw_8, 16,
27, 4, and 23, respectively. The assembly-language program available for

Figure 3 After undergoing lowpass-filtering, the controllers pulse-width-modulated output (lower trace) reveals its sine-wave origin.

downloading from the online version


of this Design Idea at www.edn.com/
060720di1 includes these duty-cycle
values and the three other parameters.
The program includes two additional features: Connecting Pin 1 to ground
enables a continuous-output mode.
Connecting Pin 1 to VDD evokes a
single output waveform. Pin 3 serves as
a high true-output enable when you
connect it to VDD or as a positiveedge trigger input when you pull the
pin to ground and release it. Note that
the program currently includes no contact-debounce routines for either
input.

80
75
70
DUTY65
CYCLE
TABLE
VALUES 60
55
50
45
1

15 22 29 36 43 50 57 64 71 78 85 92 99
PULSE-POSITION TABLE ENTRIES

Figure 4 Devised for testing a serial links error response, this waveform plot
displays pulses locations within the waveform (horizontal axis) versus the
duty cycle for each pulse (vertical axis). The waveform cycle repeats after
pulse 100 ends.

84 EDN | JULY 20, 2006

In the example in Figure 3, the controller delivers a pulse-width-modulated output (lower trace), which, after
processing by a single-pole lowpass filter, corresponds to a sine wave (upper
trace). Using another version of the
circuit, you can evaluate how a critical midword error affects a serial links
characteristics, system timing, and
response latency.
The waveform in Figure 4 comprises 100 pulses, 99 of which exhibit a
nominal duty cycle that varies from 48
to 51%, and a single error pulse with a
75% duty cycle. The waveform-table
entries use values of loopsK100,
temp_cntK1, and table_maxK100
to produce a pulse sequence comprising 74 pulses with nominal duty cycles,
a single pulse with a 75% duty cycle,
and a final sequence of 25 clocks with
nominal duty cycles. The entire
sequence repeats at a 345-Hz rate.
Using a 4-MHz-clock-rate version
of Microchips 10F220 controller
constrains the basic software-timing
loop to a 29-sec period. You can
compile the program into an 8-MHz
10F220 to reduce the timing loop to
14.5 sec and extend the outputs
usable bandwidth. You can modify the
code in the listing to suit other compatible microprocessors to obtain
greater bandwidth and integrate additional functions. As is, the circuit
requires only 155 bytes of internal
EEPROM and occupies an SOT-23
pc-board footprintnot bad for a
processor that costs less than $1.EDN

designideas
Ceramic output capacitors enhance
internally compensated switchers

filter circuit, the ICs designer includes


a Type 3 compensation circuit to optimize the ICs performance for aluminum capacitors characteristics.
Robert Kollman, Texas Instruments, Dallas, TX
Note that a Type 3 compensation cirIntegrating compensation com- age-source, E2, which represents the cuit includes a pole at the origin of the
ponents with a power-supply modulator and the power switches. circuits pole-zero plot to provide high
controller and buck regulators power Support components external to the IC gain at dc and an integratorlike highswitches can minimize pc-board area, include output-filter components and frequency roll-off augmented with
improve reliability, and eliminate their parasitic resistances, a resistor rep- pairs of poles and zeros to provide
assembly errors by reducing the num- resenting an external load, and a phase and gain margins at certain freber of components and solder joints. divider comprising R1 and R2 that sets quencies (Reference 1).
However, integration also limits a de- the output voltage. The compensationThe regulators LC-output modulasigners range of choices in the selection circuit design accommodates a certain tor/filters amplitude-response curve
of output-filter components. Figure 1a range of output-filter inductance and peaks at the resonant frequency set by
presents a typical switching regulator capacitance and their associated para- the filters inductor and output capacbased on Texas Instruments (www.ti. sitics.
itor, and then it decreases at a 40Figure 2 shows Bode diagrams for dB/decade rate until it reaches a zero
com) TPS5430. The boxed area in Figure 1b shows a simplified version of the the error-amplifier and modulator- at a frequency set by the output capacICs internal small-signal-equivalent gain blocks (2a) and the entire regu- itor and its ESR (equivalent series
circuit, which includes an error ampli- lator system (2b). Envisioning that resistance). Beyond that frequency,
fier, E1; passive-compensation compo- end users would specify aluminum the output inductors and the capacinents; and a voltage-controlled volt- electrolytic capacitors for the output- tors ESRs determine the attenuation
curves slope, resulting in a
20-dB/decade rate.
IC1
For good regulation, the
L0
C5
TPS5430DDA
10 H
J2
J1
0.01 F
error amplifier provides a high
7
VIN
VOUT
VIN
BOOT 1
dc gain at low frequencies.
5
C4
ENA
NC
However, to ensure stability,
GND
C0
D2
GND
8
1 F
2
PH
NC GND
the loop gain must decrease as
MBRM140 22 F
3
frequency increases. The goal
NC GND
6
is to approximate a 20-dB/
4
GND
VSNS
R1
decade roll-off at all frequen2.1k
PWPD
cies. Placing two zeros at the
9
R2
output filters resonant fre1.2k
quency helps cancel the two
(a)
poles representing the resonance. Adding a pole to the
error-amplifier response cancels the zero that the output
INTERNAL
RINT4
E1
TO TPS5430
1000
capacitor and its ESR introCINT1 RINT1
R1
L0
+
V1
RIND
20 pF 332k
E2
2.1k
duce. Adding a final pole
10 H
0.03

+
+
above the power supplys
1V AC
RINT2
C0
R2

crossover frequency helps fur3676k


22 F
1.2k
RL
ther increase the regulator
RESR
RINT3
CINT3
loops stability. Figure 2b
0.001
3072k
1 pF
shows the sum of the gains of
CINT2
20 pF
the error amplifier and moduCINT4
lator/filter gain. The power
1.6 F
supplys characteristics show a
(b)
30-kHz bandwidth and a 60
phase margin that ensures staFigure 1 This TPS5430 power-supply design includes an aluminum electrolytic outputble operation.
filter capacitor, C0 (a). A circuit model includes parasitic resistances associated with
The power-supply-control-

output-filter components L0 and C0 (b).

86 EDN | JULY 20, 2006

(continued on pg 90)

designideas
40

160

OVERALL PHASE

120

ERROR AMPLIFIER

20

PHASE ()

GAIN (dB)

80

60 PHASE
MARGIN
40

0
20

OVERALL GAIN

MODULATOR/FILTER
40

40
100 Hz

1 kHz

10 kHz
FREQUENCY

100 kHz

1 MHz

80
100 Hz

1 kHz

10 kHz
FREQUENCY

100 kHz

1 MHz

(b)

(a)

Figure 2 Gain (a) and phase (b) plots show that the circuit of Figure 1a includes adequate compensation and phaseangle margin for an aluminum electrolytic output-filter capacitor.

200

40

OVERALL PHASE

ERROR AMPLIFIER

150

20

PHASE ()

GAIN (dB)

100
0

50

20
0

NO PHASE
MARGIN

OVERALL GAIN

MODULATOR/FILTER
40

50

100

60
100 Hz

1 kHz

10 kHz
FREQUENCY

100 kHz

100 Hz

1 kHz

1 MHz

(a)

10 kHz
FREQUENCY

100 kHz

1 MHz

(b)

Figure 3 Gain (a) and phase (b) plots show that using a ceramic-dielectric output-filter capacitor erodes the phase-angle
margin and pushes the circuit dangerously close to oscillation.
160

V1
1V AC

C1
2.5 nF

+
R1
2.1k

TO PIN 4,
VSNS, OF IC1
C2
0.5 F

R2
1.2k

R3
75

GAIN (dB) AND PHASE ()

120

OVERALL PHASE

80

45 PHASE
MARGIN

40

OVERALL GAIN
40

80

100 Hz

1 kHz

10 kHz

FREQUENCY

Figure 4 A few passive components supplement R1 and R2


and stabilize the circuit for use with a ceramic-dielectric output-filter capacitor.

88 EDN | JULY 20, 2006

100 kHz

1 MHz

Figure 5 The phase-angle plot for the circuit of Figure 4


shows a sufficient phase-angle margin to allow stable
operation with a ceramic output-filter capacitor.

designideas
loop response (Figure 3) illustrates the
circuits behavior when the design
includes ceramic-dielectric output-filter capacitors and the same integratedcompensation components in Figure 1.
Ceramic capacitors present a much
lower ESR than do aluminum electrolytic capacitors, and their capacitance determines the filters attenuation rather than their ESR. Consequently, at high frequencies, the LC filters characteristics include a double
pole and a steeper, 40-dB/decade
slope. In addition, filter attenuation increases at the desired crossover frequency, degrading phase and gain margins. Figure 3b indicates that the power
supply is unstable and, with no phase
margin, will likely oscillate.
Replacing the divider network, R1
and R2 in Figure 1 with the passive network in Figure 4 stabilizes the regulation loop and allows an internally compensated controller to use ceramic output capacitors. The networks compo-

nents add two sets of poles and zeros to


the compensation network to cancel
the consequences of using ceramic output capacitors. For example, C2 and R3
provide attenuation that reduces the
crossover frequency. You select C2 to
provide attenuation at frequencies
much lower than the crossover frequency. Unfortunately, C2 adds a negative-phase shift that R3 returns to
nearly zero at the designs crossover frequency. Adding C1 introduces a phase
lead that compensates for the ceramic
capacitors negative effects. Without
C1, the filters 180 phase shift would
reduce the regulators phase margin to
nearly zero.
The phase angle starts increasing at
a frequency that C1 and R1 determine,
and they introduce a zero in the phaseplane plot at that frequency (Figure 5).
At a frequency that C1 and R3 determine, a pole in the phase-plane plot
terminates the phase angles increase.
The geometric mean of the pole and

Tapped inductor, boost regulator


deliver high voltage
David Ng and Adam Huff, Linear Technology Corp, Milpitas, CA

When you face the task of generating a regulated voltage


thats higher than the available
power-supply voltage, you may consider a boost regulator. Although a
boost converter can in theory gener-

ate almost any voltage thats higher


than its input, practical considerations
limit the output to approximately
eight times its applied voltage. To generate an even higher voltage, consider using a tapped-inductor boost top-

L1
COILTRONICS
CTX02-17409-R
1-TO-6 TURNS RATIO
L1A
L1B

VIN+
3V
C1
22 F
6.3V

R1
37.4k

IC1
LT1949
8
LBO
7
3
LBI
SHDN
1
5
VC
SW
4
2
GND
FB
6

C2
1 nF
GND

VIN

NC
NC

R4
2k

C4
10 pF

D1
BAS21

C3
0.1 F
250V

R2
1M

VOUT+
100V
5 mA

R3
12.4k
GND

Figure 1 Using a tapped inductor extends a boost-topology switching regulators practical output-voltage range.

90 EDN | JULY 20, 2006

zero frequencies determines the maximum phase-angle boost.


As a starting point, you can place the
first pole, which C2 and the parallel
combination of R1 and R2 determine, at
a low frequency, such as 100 Hz. Next,
adjust the values of C2 and R3 to set the
first zeros frequency at 1 kHz, which is
much less than the gain curves 0-dB
crossover frequency. Finally, set the
zero that C1 and R1 introduce to a frequency thats at least a factor of two
below the zero-gain crossover frequency to ensure a 45 phase margin
at the crossover frequency. The Bode
plot in Figure 5 features a 30-kHz regulation-loop bandwidth that provides
good transient response and more than
45 of phase margin to ensure good stability.EDN
REFERENCE
1 Optimal Feedback Amplifier
Design For Control Systems, Venable
Industries, www.venable.biz/tp-03.pdf.

ology. Figure 1 shows an implementation of a converter that boosts a 3V


input to 100V dc. The connections to
the regulator chip are similar to those
of a traditional boost converter, but, to
achieve the high boost ratio, this
design uses L1, a 1-to-6-turns-ratio,
tapped inductor.
The waveforms in Figure 2 show
the input voltage, the voltage at
power-switch IC1s output, Pin 5, and
rectifier diode D1s anode voltage. As
in any boost circuit, inductor L1s core
stores energy when IC1s internal output switch conducts. When the
switch turns off, the voltage across its
terminals and L1A goes higher than the
input voltage. Due to inductive coupling and the larger number of turns
that make up L1B, the voltage at rectifier diode D1s anode and hence the
output voltage goes much higher.
Resistors R2 and R3 form a feedbackvoltage divider that closes the regulation loop. The R4-C4 network forms a
snubber circuit that suppresses the
impact of diode D1s small parasitic
capacitance. Without the network,

designideas
Figure 3 The entire boostconverter circuit occupies
a footprint of less than
1.51.25 cm on a singlesided pc board.

Figure 2 For a 3V-dc input (lower trace, horizontal line), the voltage at regulator IC1s SW pin reaches a peak of approximately 18V (lower trace, pulsed
waveform). The 1-to-6 step-up turns ratio of inductor L1 further increases the
peak output voltage to 160V (upper trace) to produce 100V dc. The upper
traces lower limit goes to 6VIN(18V) due to the tapped inductor.

power switch IC1 sees a capacitance


thats 36 times larger due to the multiplicative effect of the tapped inductors turns ratio.

Measuring only 5.663.4 mm,


Coiltronics (www.coiltronics.com)
CTX02-17409 tapped inductor, L1,
and Linear Technologys (www.linear.

com) LT1949 monolithic regulator,


IC1, available in an eight-lead MSOP
package, present small pc-board footprints. When you implement the circuit on a single-layer pc board, the
entire circuit occupies less than 1.9 cm2
of board space (Figure 3). For best
results, review the board-layout suggestions in the devices data sheet (Reference 1) and use multilayer-ceramic
capacitors for C1 and C3.EDN
REFERENCE
1 www.linear.com/pc/productDetail.
do?navId=H0,C1,C1003,C1042,C1
031,C1061,P1958.

JULY 20, 2006 | EDN 91

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Low-dropout regulator, SMPS cascade


suppress ripple, maintain efficiency

D Is Inside
82 Novel circuit isolates temperature sensor from its host

Scot Lester, Texas Instruments, Dallas, TX

A step-down SMPS (switchedmode power supply) efficiently


converts unregulated power to a regulated output voltage. However, unwanted switching-induced ripple and
input transients may appear on the output. Applying noisy power to an RF
power amplifier can inject spurious signals or modulated noise into the broadcast spectrum. Analog- and RF-system
engineers favor traditional low-noise
power-supply designs that comprise a
transformer, rectifier, and filter followed
by a linear voltage regulator. A lowdropout linear regulators low output
noise and high PSRR (power-supply
rejection ratio) ensure clean power that
imposes no interference on a power
amplifiers output.
Unfortunately, a transformer-and-

86 Find resistor values for arbitrary


programmable-amplifier gains

rectifier power supply delivers a fluctuating output voltage that depends on its
input voltage. As the difference between its input and output voltage
increases, a low-dropout regulators efficiency decreases, and its power dissipation increases. To remain in regulation at low ac-line voltages, even a lowdropout regulator requires a certain
amount of head-room input-to-output
voltage.
To overcome the disadvantages inherent in both circuits, you can use an
SMPS to maintain high efficiency and
a low-dropout regulator to reduce the
output noise and ripple voltage of the
SMPS. Setting the output voltage of
the SMPS slightly higher than the lowdropout regulators minimum dropout
voltage reduces the regulators power

What are your design problems


and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
dissipation, accommodates the voltage
margin you need for good switchingnoise rejection, and maintains high efficiency. The regulators PSRRs add, and
the combined circuits PSRR exceeds
that of either the regulator or the
SMPS alone.
Figure 1 shows a cascade circuit comprising an SMPS followed by a linear
regulator. This circuits output voltage
ranges from 1.5 to 5V at an output cur-

V+
UNREGULATED
INPUT

VSET

RT
2.61k

R4
100k

D2
R3
768k

RB
1k

C2
B2
A2
C1
10 F

FB

VOUT

ADJ
IC2 SYNC
TPS62300YED
EN
VIN

SW

D1
VCC
OUTPUT
VOUT

C1
L1
2.2 H

VPS
1

B1

GND A1

C2
10 F

C4
0.1 F

IN
IC1 OUT
TPS736XXDCO
5
EN

GND

NRFB
GND
6

R1
31.6k

C3
47 F

R2
10k

Figure 1 Connected in cascade, a low-dropout linear regulator and a switched-mode power supply improve output-voltage ripple and maintain overall efficiency. (Note: In IC1s part designation, XX represents the regulators output voltage.)

AUGUST 3, 2006 | EDN 81

designideas
rent as high as 400 mA. Although a
fixed 6V supply powers the cascaded circuit, its design accommodates any input
voltage at least 0.5V higher than the
cascaded pairs desired output voltage.
Adjusting the reference voltage,
VSET, over 0 to 1.105V linearly varies
the circuits output voltage. Resistors R1
and R2 and reference voltage VSET
determine the low-dropout regulators
output voltage and thus the cascaded
pairs output voltage. Resistors RT, RB,
R3, and R4 divide VSET to maintain the
SMPS output voltage, VPS, at a constant 0.2V higher than the regulators
output voltage, reducing the regulators
power dissipation to 80 mW at full output current and any output voltage.
At its maximum output current of
400 mA, the cascaded supply reaches
a maximum efficiency of 89% with a
6V input and a 4.69V output (Figure
2). The overall efficiency decreases as
the output voltage decreases. Figure 3
compares the PSRRs of the SMPS
alone and of the SMPS cascaded with
the regulator, which improves PSRR by
46 dB at 500 Hzessentially that of the
regulator alone at 500 Hz.
Over a frequency range of 100 Hz to
100 kHz, the low-dropout regulator
improves PSRR by at least 25 dB (Figure 3). Circuit-layout and -measurement techniques compound the diffi-

92
88
84
EFFICIENCY
80
(%)
76
72
1.5

2.5

82 EDN | AUGUST 3, 2006

4.5

Figure 2 The regulator cascades combined efficiency improves as the


unregulated output voltage increases.

100
90

CASCADED PAIR

80
70
60
PSRR
(dB)

50
40
30

SWITCHED-MODE
POWER SUPPLY
LOW-DROPOUT
REGULATOR

20
10
0
10

100

1000

10,000

100,000

1 MILLION

FREQUENCY (Hz)

Figure 3 The power-supply rejection ratio improves significantly (blue trace)


when you cascade switched-mode (yellow trace) and linear (red trace) voltage regulators.

culty of making accurate small-signal


measurements, and the graphs PSRR
values may not appear additive. The linear regulator governs the circuits
switched-load transient response,

Alfredo H Saab and Tamer Mogannam,


Maxim Integrated Products Inc, Sunnyvale, CA
Temperature sensors must sometimes operate at locations whose
return potentials differ considerably
from that of the data-acquisition systems commonthat is, equipotentialground. In consequence, the temperature sensors support circuitry must
provide galvanic isolation between the
sensor and its data-acquisition system.

3.5

OUTPUT VOLTAGE (V)

Novel circuit isolates


temperature sensor from its host


Also, the data-acquisition system seldom provides an isolated source of


power for the sensor. The circuit in Figure 1 solves both problems by isolating
the sensors signal and power supply.
The complementary, fixed-frequency
square-wave outputs of a power-transformer driverIC1, a Maxim (www.
maxim-ic.com) MAX845drive a Halo

which may represent an improvement


over the response of the SMPS. However, the cascade circuits low output
ripple and high efficiency make the circuit well worth investigation.EDN

Electronics (www.haloelectronics.com)
TGM-010P3 1-to-1-to-1 transformer
with dual primary windings and a single untapped secondary winding (Reference 1). The secondary winding
feeds a Graetz-bridge rectifier that generates approximately 4.5V to power
IC2, a Maxim MAX6576 sensor. Combining a temperature sensor, signal-processing electronics, and an easy-to-use
digital-I/O interface in a low-cost package, the MAX6576 draws little current
from a single supply source and maintains its specified accuracy over a 3 to
5V supply-voltage range.

designideas
INSULATION
BOUNDARY

5V

R5
1k
D1

R1
2.2k

OUT

VCC

D1

C4
10 F

T1

FS
D2

SD

D3

5V
Q1
2N3904

0
T
C1
0.1 F

C3
1 nF

D2
GND1 GND2
D4

C2
20 nF

VCC

R3
390

IC1
MAX845

TS0
IC2
MAX6576

OUT
R4
10k

Q2
2N3904

TS1
GND

R2
75
NOTE: D1 THROUGH D4: MBR0520L.

Figure 1 Transformer T1 isolates the temperature sensor, IC2, from the equipment under test. The period of IC1s digital
output varies as a function of temperature. The circuits output period varies at a rate of 10 sec/K. User-selected scale
factors range from 10 to 640 sec/K.

MAX6576 OUTPUT
MAX6576 OUTPUT
0V

0V

2V/DIV

OUTPUT
FROM Q1'S
COLLECTOR

0V

2V/DIV

OUTPUT
FROM Q1'S
COLLECTOR

0V

1 SEC/DIV

1 SEC/DIV

Figure 2 Measured from the positive-going edge of


IC2s output to the circuits output at Q1s collector, the
relative jitter averages less than 1 sec.

If you connect the sensor as Figure


1 shows, it operates as an absolute temperature-to-period converter and provides a nominal conversion constant of
10 sec/K, which, at room temperature, yields a period of approximately
2.980 mseca frequency of 335 Hz.
You can adjust the conversion constant
from 10 to 640 sec/K. Note that
longer conversion constants allow
more signal-integration time to minimize noise effects. The sensors symmetrical square-wave output drives
NPN transistor Q2s base through R4, a
10-k resistor. A 390 resistor, R3,
serves as Q2s collector load and connects to the same lines that deliver
power to the temperature sensor.

84 EDN | AUGUST 3, 2006

Figure 3 As in Figure 2, Q1s average output jitter with


respect to IC1s negative-going output also averages
less than 1 sec.

When Q2 conducts, it draws an asymmetrical power-supply current that


exceeds the supply current during the
sensor outputs positive half-cycle.
In IC1s sensor output-to-ground
return on the data-acquisition systems
side, resistor R2 and capacitor C2 shunt
Q1s base-emitter junction. The values
of R2 and C2 ensure that the sum of
IC2s current and transformer T1s magnetizing current cannot drive Q1 into
conduction. When Q2 conducts, it
draws about 12 mA from the isolated
4.5V power-supply line. Reflecting to
the primary, Q2s conduction current
flows from the 5V supply into IC1, out
through its ground terminals, and partly through R2. The voltage drop across

R2 exceeds Q1s base-emitter voltage


threshold and supplies sufficient base
current to turn on Q1.
Thus, when Q2 conducts, so does Q1,
which copies IC1s isolated square-wave
output to Q1s collector circuit. As the
waveforms of figures 2 and 3 show, Q1s
output rise and fall times, jitter, and
propagation delay total about 2 sec.
The equivalent measurement error due
to timing jitter amounts to less than
0.1K at the fastest conversion constant
of 10 sec/K. Varying the circuits supply voltage through a range of 4.5 to
5.5V introduces an error of less than
0.1K. The output at Q1s collector can
sink several milliamperes at a voltage
excursion of 0 to 5V.

designideas
This design can accommodate temperature-to-frequency converters and
other types of temperature sensors.
For further information on IC1 and
IC2, review the devices data sheets
and the data sheet for the MAX845
evaluation kit (references 2, 3, and
4).EDN

REFERENCES
PCMCIA DC/DC Conversion
Isolation Modules, Halo Electronics
Inc, www.haloelectronics.com/pdf/
lowpower-oper.pdf.
2 Isolated transformer driver for
PCMCIA applications, Maxim Inc,
October 1997, http://pdfserv.
1

maxim-ic.com/en/ds/MAX845.pdf.
3 SOT Temperature Sensors with
Period/Frequency Output, Maxim Inc,
April 1999, http://pdfserv.maxim-ic.
com/en/ds/MAX6576-MAX6577.pdf.
4 MAX845 Evaluation Kit, Maxim Inc,
October 1997, http://pdfserv.maximic.com/en/ds/MAX845EVKIT.pdf.

Find resistor values for arbitrary


programmable-amplifier gains

(1)

Sid Levingston, DML Engineering Inc, Aloha, OR

When available fixed-gain values match design


requirements, a PGA (programmable-gain-amplifier)
IC offers a drop-in choice, but what does a designer do when
a suitable PGA is unavailable? Before the PGAs advent, a
circuit designer who needed selectable, fixed amounts of gain
chose a suitable operational amplifier and designed a
switched-resistor gain-setting network. This Design Idea discusses two methods of designing the desired resistive network.
Figure 1 shows a series-ladder-resistor network comprising a string of resistors whose junctions connect to switchselectable taps that determine the circuits gain. Little current flows through the switch, and the resistance of the
switch thus doesnt affect the design. A circuit with N discrete-gain values requires an N-position switch, usually an
analog multiplexer, and N1 resistors in its ladder. Equation 1 describes the circuits gain in the general case:
VIN
+

VOUT

You can solve Equation 1 for the resistor summations and


expand a few terms as follows:
(2)

(3)
(4)
(5)

and
(6)

VIN
+

VOUT

R1

S1

G1 TAP

G2 TAP

R1

G1 TAP

R2

G2 TAP

R2
S1

GN TAP
R[N+1]

Figure 1 A series-resistor-ladder network and a single-pole, multiple-throw switch form a custom-value


programmable-gain amplifier.

86 EDN | AUGUST 3, 2006

RG

RN

GN TAP

SN

Figure 2 In a parallel-resistor-ladder network, connecting one


resistor at a time in parallel with R1 determines the circuits
gain.

designideas
Next, normalize R1 to 1 and solve the equations for R1:
(7)
(8)

The nth value of RP equals the nth1 value of RP in parallel with the ladders nth resistor. Solve the following equations for the nth resistor value:
(16)

and
(9)

(17)

and
(18)

(10)

A network that synthesizes N gain values results in an


NN matrix whose upper echelon equals the desired gains
minus one, in ascending order, and its lower echelon equals
negative one. To produce the resistor values for the desired
gains, invert the matrix and calculate its dot product with
a unity matrix. For example, a circuit requiring four gain values of three, five, 24, and 50 also requires five resistors. Stuffing and solving the matrix yields:

To find the desired networks resistors, select the desired


gain values and RG and then use Equation 14 to calculate
the parallel values. Use the resulting values to solve Equation 15 and find the required resistor values. As in the previous example, a circuit must produce gain values of three,
five, 24, and 50. Four gain values require four resistors. Let
RG1. Solving Equation 14 for the parallel-values matrix
yields:

(11)

(19)

(12)

Substituting these values into Equation 15 yields the resistors values:


(20)
(21)

Scale the resistors values to 1 k and select the closest


available standard resistor values to produce gains of:

(22)

and
(23)

(13)

Figure 2 shows a parallel-resistor-ladder network. To select


a gain value, connect an additional resistor in parallel with
the other resistors. A circuit with N discrete gains requires
N resistors in the ladder; an additional gain resistor, RG; and
N1 switches. Equation 14 describes the circuits gain in
the general case:
(14)

Scaling to 1 k and selecting the closest available standard-value resistors yields gains of:

(24)

Reference 1 provides a review of the matrix math.EDN


REFERENCE

and Equation 15 describes the parallel-resistor combination


for each gain:
.

88 EDN | AUGUST 3, 2006

(15)

1 Freeman, Larry, Review of Matrices, Math Refresher,


Dec 19, 2005, http://mathrefresher.blogspot.com/
2005/12/review-of-matrices.html.

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Ultralow-cost, two-digit counter


features few components

D Is Inside
70 Two-wire, four-by-four-key keyboard interface saves power

Noureddine Benabadji,
University of Sciences and Technology, Oran, Algeria

The ultralow-cost, two-digitcounter circuit in Figure 1 represents an attempt to reduce the number of components using a mostly software approach and a low-cost microcontroller, the PIC16F84A. The circuit lacks the current-limiting resistors
that normally connect to a seven-segment LED displays pins because a software routine lights only one of the displays segments at a time, first in the 10s
display and then in the units display.
Doing so keeps the circuits maximum
current consumption at a nearly constant level, even if you add a third LED
display to implement a three-digit
counter. The circuit also lacks digitselection switching transistors that clas-

sic multiplexed circuits switching


transistors typically use, and the circuit
includes one common-cathode and one
common-anode display. The reason for
this approach is that each of the microprocessors I/O Port A and Port B lines
can assume one of three states: high,
low, and floatingthat is, high impedance. Programming a line as an input
places it in a high-impedance state,
which turns the display off.
In addition, the program drives only
one segment at a time and executes the
following sequence: To drive the 10s
display, program the line RB0 output
and drive it high to light the corresponding segment of the commoncathode display and then program RB0
VCC
2.7V

VCC
2.7V

VCC
2.7V

R3
10k

14

4-MHz
CRYSTAL

C2
18 pF

VDD

6
RB0
7
IC1
RB1
8
PIC16F84A
RB2
15
CLK OUT
9
RB3
10
RB4
11
RB5
16
CLK IN
12
RB6
VSS
4

C1
18 pF

DS1
SC52=11EWA
(10s)

MC LR

R1
180 OR
220

A
B
C
D
E
F
G

NOTE: SELECT R1 AND R2 FOR DISPLAY CURRENT,


ID, OF 5 mA AT OPERATING VCC.

ID

R2
180 OR
220

Figure 1 This low-cost, two-digit counter uses few components.

ID

DS2
SA52=11EWA
(UNITS)

74 Gain-of-three amplifier requires


no external resistors
What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
as an input. Repeat this procedure for
lines RB1 through RB6. To drive the
units display, repeat the process while
applying a low output from RB0 to
drive the common-anode display. Figure 2 shows the circuits timing diagram. The prototype display uses Kingbrights (www.kingbright.com) SC5211EWA (DS1) and SA52-11EWA
(DS2) high-efficiency, seven-segment
displays that emit 2000 to 5600 cd at
a forward current of 10 mA. At a forward current of approximately 5 mA,
the displays remain readable.
Early motion pictures displayed at an
18-Hz rate, which produces marginal
flicker. The software executes at a rate
of 180 Hz, or 10 times the minimum
flicker rate. Each of the displays seven
segments must illuminate for an interval of 1/(1807) sec, or approximately 0.8 msec. To simplify the timing routine (section Delay3 of Listing 1, available at www.edn.com/060817di1), the
software uses a refresh interval of 1
msec.
Although this approach provides
adequate segment-drive current, the
displays internal LEDs carry a 3V maximum reverse-voltage rating. Driving
any I/O line high applies forward bias
to one segment of the common-cathode digit but applies reverse bias to the

AUGUST 17, 2006 | EDN 69

designideas
corresponding segment of the common-anode display. The 16F84A requires a minimum of 2V for operation,

and thus the circuit must operate in a


2 to 3V power-supply range. The assembler source code in Listing 1 counts

DISPLAY ON
(349.633 MSEC)

from 0 to 99 sec and serves as an unoptimized proof-of-concept software test


bed for the display.EDN

DISPLAY OFF
(651.78 MSEC)

REPEATED 160 TIMES

RB0 (SEGMENT A)

HIGH Z

RB1 (SEGMENT B)

HIGH Z

RB2 (SEGMENT C)

HIGH Z

RB3 (SEGMENT D)

HIGH Z

RB4 (SEGMENT E)

HIGH Z

RB5 (SEGMENT F)

HIGH Z

RB6 (SEGMENT G)

HIGH Z

10s
DIGIT

UNITS
DIGIT
TIME

Figure 2 The timing diagram illustrates segment- and digit-drive intervals.

Two-wire, four-by-four-key keyboard


interface saves power
Stefano Salvatori, University of Rome, Rome, Italy,
and Gabriele Di Nucci, EngSistemi, Rome, Italy

You can use a microcontroller


that includes an ADC to design
a two-wire-plus-ground keyboard interface. For example, you can use a
resistive voltage divider to identify a
pressed key (Reference 1). A microcontrollers integrated ADC typically
presents an input resistance on the
order of hundreds of kilohms, and, for
adequate accuracy, its keypad divider

70 EDN | AUGUST 17, 2006

should comprise relatively low-value


resistors of 10s of kilohms. However, in
battery-powered systems, a resistive
divider can consume a few hundred
microamperes, forcing a designer to
choose an alternative classic digitalmatrix array of switches and multiple
I/O lines. Moreover, portable-equipment designs typically place constraints
on the number of components.

To satisfy both requirements, the circuit in Figure 1 uses a matrix keypad


and a resistor network divided into two
row and column sections. For the fourby-four-key keypad, seven resistors are
sufficient to encode any pressed key, and
the circuit consumes power only while
a key remains closed. Conversely, with
no keys pressed, the standby current
approaches zero. Using only two values
of resistors, let RARBRCR1 and
RDRERFRGR2. Assigning values
from zero to three for the keys x and y
addresses, you can calculate the voltage
across resistor RG for any key closure by
solving the following equation:

designideas
RC

S(3,3)

S(2,3)

RB

RA

S(1,3)

S(0,3)

VREF

40.2k

S(3,2)

S(2,2)

S(1,2)

40.2k

40.2k

VREF=VCC

S(0,2)

RD

10k

S(3,1)

S(2,1)

S(1,1)

S(0,1)

RE

1
S(3,0)

S(2,0)

S(1,0)

S(0,0)

RF

PERIPHERALS

VOUT

10k

IC1
MC68HC908QT4

10k

Y
3

10k

RG
X

Figure 1 A two-wire resistive voltage-divider interface


encodes a four-row-by-four-column keypad.

TABLE 1 SINGLE-KEY OUTPUT CODES

Keys pressed/resistance ()


X
3
2
1
0
1/
2/
3/
A/
3
15 to 16
21
32
63 to 64
4/
5/
6/
B/
2
17
23
36
85
7/
8/
9/
C/
1
18
25
42
127
*/
8/
#/
D/
0
19
28
51
255
Note: The figures preceding the slashes represent
the keypads key labels.

Driving the resistor array from VREF,


the ADCs reference voltage, allows
you to perform a ratiometric conversion
that eliminates errors in key encoding
due to fluctuations in VREF. The following equation describes the voltagedivision ratio, r(x,y), for any keystroke.

The ratio pR1/R2 represents the


ratio between row- and column-group
resistors values. For p4, you calculate
16 values of r(x,y), in the [1/16, 1]
range, as a function of the pressed keys
position. In general, the minimum difference between r partitioning ratios

72 EDN | AUGUST 17, 2006

Figure 2 Using the microcontrollers analog reference-voltage


output and ratiometric analog-to-digital conversion ensures
correct encoding of the keypad.

TABLE 2 TWO-KEY OUTPUT CODES


Keys pressed
C+#
C+0
C+*
B+#
B+0
B+9
B+8
A+8
A+7
A+6

occurs for the nearest keys as the (3,2)


and (3,3) x,y indexes indicate. For an
N-bit ADC and a ratio of p4, the
ADC should have a resolution that satisfies the following equation: 2
r(3,2)r(3,3)15 116 1240 1.
Note that the reciprocal of 240
(0.0041...) exceeds the reciprocal of 28,
and the circuit thus requires an ADC
capable of at least 8-bit resolution
(N8 bits).
Unfortunately, standard-value components with nominal tolerance, T,
cannot provide an ideal solution to this
equation. Instead, you calculate a partitioning-ratio difference, dr(3,2)
r(3,3), for the worst-case condition.
The lowest value of d occurs for a minimum value of RG and RD and the maximum value of RA, RB, RC, RE, and RF.
You can account for all the resistors
values and define a generic ratio, p, for

Resistance ()
141 to 142
134 to 135
132
109
98
91
88
76
70 to 71
68

the nominal values of R1 and R2:

The same value of T applies to all


resistors. If n8 and p4, the previous
equation yields a solution of T0.018,
which indicates that resistors of 1%
tolerance correctly encode 16 keys.
Moreover, if you now impose the chosen fixed tolerance, T, you can solve the
equation to obtain the required limit
on the p ratio between the values of R1
and R2. If T0.01, the solution to the
equation becomes p4.074.
The circuit in Figure 2 uses Freescales
(www.freescale.com) Nitron MC68HC908QT4 microprocessor, which serves
as a test bed for a keypad based on the
above-calculated values, and uses pow-

designideas
er-supply voltage VCC as the resistor
matrixs reference voltage, VREF. To satisfy the requirement for p(4.074
p 4), use R110 k1% tolerance
and R240.2 k1% tolerance, both
standard values that the E48 series
offers. Table 1 lists output codes corresponding to 16 individually pressed keys,
and Table 2 lists data obtained when
simultaneously pressing two keys and
illustrates that two-key combinations
can evoke special functions.
If your application requires a microcontroller that lacks an internal inter-

rupt that the ADC generates, you can


connect an external comparator to the
output voltage in Figure 1. Set the
comparators threshold lower than the
lowest voltage developed at the output
voltageapproximately VREF divided
by 16 in the exampleand the comparators output serves as a keypadinterrupt source for the microcontroller.
Note that a microcontroller with a
10-bit ADC, such as a Freescale MC68HC908QB or a Texas Instruments
(www.ti.com) MSP430F11 can service
a five-row by six-column keypad

Gain-of-three amplifier
requires no external resistors
Marin tofka, Slovak University of Technology, Bratislava, Slovakia

Analog Devices ADA4862-3


comprises three wideband am-

plifiers, each configured by an internal,


fixed-value resistive-feedback network

C1
4.7 pF
8

matrix encoded by 10 resistors. Repeating the analysis shows that a rowto-column p ratio of 5 to 5.51 and a
required resistor tolerance of less than
4.3% correctly encode the keys. You
can use values of 10 k for R1 and 51.1
k or 53.6 k for R2 of the 1%-tolerance E48 series.
REFERENCE
1 Amorim, Vitor, and J Simes,
ADC circuit optimizes key encoding,
EDN, Feb 4, 1999, pg 101, www.
edn.com/article/CA56657.

as a noninverting gain-of-two amplifier. Due to its internal feedback networks, the device offers a bandwidth of
300 MHz and excellent insensitivity to
stray capacitance, variations in pc-board
layout, and proximity of other devices.
According to its specifications, each of
IC1s three internal amplifiers offers

+VS=2.5V
4

R
550

IN

R
550

R
550
R
550

10

A1

OUT

+
IC1
ADA4862-3

R
550
13

A3

R
550

A2
C2
100 nF

12

14

11
VS=2.5V

NOTES:
CONNECT TO VS FOR ENABLE.
CONNECT TO +VS FOR DISABLE.

Figure 1 A one-IC amplifier with a voltage gain of three provides flat response to more than 60 MHz.

74 EDN | AUGUST 17, 2006

C3
47 nF

designideas
three gain configurationstwo, one, or
negative one (Reference 1). When you
configure it for a gain of two, a cascade
of two or three amplifiers yields gains of
four or eight, respectively. If your application requires a gain of three, you can
use the circuit in Figure 1. Amplifier A3
serves as an impedance converter with
a net voltage gain of one and a lowimpedance driver for A1s gain-setting
network. Amplifier A2 provides a gain
of two at its noninverting input.
In addition, A3 introduces the proper time delay (phase shift) in A1s
inverting-input path and thus roughly
equalizes the time delay in A1s noninverting signal path. This configuration
improves the circuits dynamic performance over that you can achieve
when A1s inverting input connects
directly to the input signal. A 4.7-pF
chip capacitor that connects from voltage follower A3s output to ground

76 EDN | AUGUST 17, 2006

MORE AT EDN.COM
+ For more Design Ideas, visit
www.edn.com/designideas.
+ For our best entries, go to
www.edn.com/bestofdesignideas.

reduces the voltage followers output


impedance at frequencies of 100 MHz
and above to ensure A1s stability.
If you configure it as a differential
amplifier, A1 amplifies the input signal
by a factor of two at its noninverting
input and by a factor of negative one at
its inverting input. The final voltage at
A1s output comprises the algebraic sum
of both components: VOUT4VIN
VIN3VIN. In a conventional voltage
amplifier, reducing negative feedback
increases the overall gain. In contrast,
cascading amplifiers with negative-voltage-feedback networks only slightly

reduces the circuits bandwidth. The net


gain decrease at a frequency of 65 MHz
amounts to 0.1 dB, or approximately
1.15% of a single gain-of-two amplifiers dc gain. For the gain-of-three amplifier in Figure 1, the gain decrease at 65
MHz amounts to approximately 2.3% of
the circuits dc gain.
For the best high-frequency performance, connect the ADA4862s internal
amplifiers as Figure 1 shows to minimize
the lengths of the devices external interconnections. You can cascade additional ADA4862-3 ICs to produce any gain
expressed as 3M2N, where M and N represent integers, including zerothat is,
gains of six, nine, 12, and so on.EDN
REFERENCE
1 ADA4862-3 data sheet, Analog
Devices Inc, www.analog.com/
UploadedFiles/Data_Sheets/
360747397ADA4862_3_a.pdf.

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

PIC microprocessor drives


20-LED dot- or bar-graph display
Noureddine Benabadji,
University of Sciences and Technology, Oran, Algeria

The circuit in Figure 1 uses only


five I/O lines to drive a dot- or
bar-graph display of 20 LEDs. Although
this version of the design uses a small
and inexpensive one-time-programmable microprocessor, such as a Microchip (www.microchip.com) PIC12C508A, you can use other microprocessors with N I/O lines to drive as
many as N(N1) LEDs. For software
development or modification, you
can use a PIC12C508A-JW reprogrammable-EPROM version of the
PIC12C508A, or you can substitute a
less expensive PIC16F84A with flash
memory.
To avoid application of excessive
reverse voltage to the LEDs, the circuits power supply, VDD, must not
exceed 3V dc. You can drive other types
VCC
3V

C2
0.1 F
R1
4.7k

14

R2
10k
4

MCLR
16
3V

C1
22 pF

CKIN

R3
10k

RB0 6
GP0 7
RB1 7
GP1 6
RB2 8
GP2 5
RB4 10
GP4 3

S1

72 PCs serial port controls programmable sine-wave generator


74 I2C interface connects
CompactFlash card to microcontroller
76 IC and DMM form direct-readout temperature probe
What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
miniature pushbutton switch requires a
delay of at least 1 msec for successful
debouncing.
Consuming fewer than 256 words,
the software avoids a C12C508A programming restriction that requires
placement of subroutines only in page
0. Other features of the software
include a two-level stack, the use of files
common to both the PIC12C508A and

IC1
PIC12C508A/PIC16F84A

VDD

of loads and provide electrically isolated interfaces by replacing the LEDs


with appropriately rated optocouplers.
For demonstration purposes, IC1s
input line, GP3, connects to a pushbutton display-mode-selector switch
and a pulldown resistor that simulates
a digital-input-signal source with a voltage amplitude of 3V p-p.
Listing 1, available with the online
version of this Design Idea at www.
edn.com/060901di1, performs a variety
of functions. To conserve battery
power, the basic software drives one
LED at a time in dot or bar mode with
a minimum amount of current. Approximately 2 mA flashes a highbrightness LED. The software includes
a delay routine that solves the problem
of contact bounce. Tests show that a

D Is Inside

9 RB3
RB5 11
4 GP3
VSS GP5 2

R4
56

LED LED LED LED LED LED LED LED


1
2
3
4
5
6
7
8
LED LED LED LED LED LED
9 10 11 12 13 14

R5
56
R6
56
R7
56

LED LED LED LED


15 16 17 18
LED LED
19 20

R8
56

5 8

Figure 1 A dot- or bar-graph display uses either a one-time-programmable PIC12C508A or, for experimentation, a reprogrammable and reusable PIC16F84A. Use high-brightness diodes for LED 1 through LED 20.

SEPTEMBER 1, 2006 | EDN 71

designideas
the PIC16F84A in the 0CH to 1FH
range, use of the RETLW 00H instruction instead of Return, and avoidance
of the ADDLW and SUBLW instruc-

tions. The software defaults to the dotdisplay mode. Pressing and holding S1
before and during power application
selects the bar-display mode. Note that

PCs serial port controls


programmable sine-wave generator
Yongping Xia, Navcom Technology, Torrance, CA

This Design Idea describes a circuit that uses a PCs serial port
to control a sine-wave generator that
covers a frequency range of 2 Hz to 20
kHz in 1-Hz steps (Figure 1). The circuits output voltage of approximately
2.2V p-p remains constant over the
entire frequency range. The circuits
signal source, a Linear Technology
(www.linear.com) LTC6904, IC1, consists of a digitally programmable
square-wave oscillator that, without
using a clock crystal, covers a frequency of approximately 1 kHz to 68 MHz
at 0.1% resolution and a few percentage points of accuracy. The LTC6904
features an I2C serial-communications
interface that controls the output frequency according to: OSCCLK2a

2078 Hz/[2(b/1024)]. The variables


a and b represent 4- and 10-bit digital codes, respectively, and the equations frequency unit, OSCCLK, is in
hertz.
The OSCCLK output from IC1 at Pin
6 drives IC2, a 14-stage 74HC4020
binary counter whose outputs at Q4
and Q10 serve as the clock and input
signals for IC3, a Maxim (www.maximic.com) eighth-order, switched-capacitor MAX291 lowpass filter.
The 3-dB corner of the filters frequency response occurs at one-onehundredth of IC3s clock frequency.
Fixed at one-sixty-fourth of the clocksignal frequency, only the input square
waves fundamental frequency can pass
the filter without undergoing consid-

J1
TO PCs
RS-232
PORT

CD
RX
TX
DTR
GND
DSR
RTS
CTS
RI

the configuration settings for the


MPASM assembler vary according to
which microprocessor you select for
programming.EDN

erable attenuation. The filters eighthorder response removes higher order


harmonics, and the filters output thus
consists of a sine wave at the inputs
fundamental frequency. The filters
clock and input always occur in a 64to-1 frequency ratio, and the sine
waves output amplitude thus remains
constant over the entire frequency
range.
To generate a 1-kHz sine wave, the
circuit requires a filter clock at a frequency of 64 kHz, which sets the
OSCCLK frequency 64 times higher, or
1.024 MHz. To satisfy the equation, the
LTC6904 requires programming constants of a09H and b3d8H to generate an OSCCLK frequency of 1023.94
kHz and the nearest output frequency
of 999.9 Hz.
Written for IBM-compatible PCs,
the C-language program accompanying
this Design Idea, which is available at
www.edn.com/060901di2, accepts an

TO 5V
POWER SUPPLY

1
2
10

Q1
Q4
Q5
11
RST
Q6
Q7
IC2
74HC4020 Q8
Q9
Q10
16
VCC
Q11
Q12
8
Q13
GND
Q14

7
SDI IC1 OE
LTC6904
3 SCK
CLK 6

D3
1N4148

GND

4 ADR

D4
1N4148

CLK 5

7
8
9

D1
1N5232

D2
1N5232

R1
20k

R2
20k

C1
47 F
10V

C2
0.1 F

CLK

9
7
5
4
6
13
12
14
15
1
2
3

CLK

IN

IC3 V 7
MAX291
3 OP OUT GND 6

OP IN

C3
0.1 F

OUT

C4
0.1 F

R3
20k

OUTPUT

R4
20k
GND

Figure 1 Three ICs and a few passive components generate sine waves under the control of a PCs serial port.

72 EDN | SEPTEMBER 1, 2006

designideas
output-frequency request, calculates
the nearest values of programming
codes a and b, transmits the codes
to IC1, and shows the calculated fre-

quency on the PCs display. Although


a PCs serial port delivers RS-232 signals, diodes D1 through D4 limit the
voltages available at Pin 4, the data-ter-

minal-ready pin, and Pin 7, the readyto-send pin, to levels compatible with
the I2C buss SDI and SCK signals,
respectively.EDN

I2C interface connects


CompactFlash card to microcontroller

while toggling the ports WRN pin from


Logic 1 to Logic 0 to Logic 1 to generate the write signal. Address bits A2,
A1, and A0 select the register that
receives the written data. Applying
Logic 0 to the CE pin while RDN rests
at Logic 1 enables the CompactFlash
card. To read from a register, configure
Port 1 as an input port and apply three
writes to Port 2 while toggling the ports
RDN pin from Logic 1 to Logic 0 to
Logic 1 to generate the read signal.
After the three writes, the microcontroller reads Port 1 and makes the
data available. Address bits A2, A1,
and A0 address eight internal registers
and allow read and write access (Table
1). Register 0x00 contains data for
exchange between the host and the
CompactFlash card. Registers 0x03,
0x04, 0x05, and 0x06 specify the track

Fons Janssen, Maxim Integrated Products Inc, Sunnyvale, CA

Logging data from a large number of monitored channels usually requires a lot of memory for storing the measured data. Unfortunately,
smaller microcontrollers offer only limited amounts of internal data RAM and
EEPROM and may also lack spare
address and data ports for adding external memory. Many low-end microcontrollers include an industry-standard
I2C interface for attaching external
ADCs, DACs, real-time clocks, and
other peripherals.
The circuit in Figure 1 connects a
CompactFlash card to a microcon-

trollers I2C interface through IC1, a


16-bit I2C I/O extender. In memorymapped mode, an 8-bit-wide data bus
controls the CompactFlash card. Microcontroller IC1s Port 1 (I/O lines 0
through 7) connects to the CompactFlash cards data bus and provides read
and write access to the cards data registers. Port 2 provides the cards address
and control registers and generates the
read and write signals.
To write to a register, configure Port
1 as an output and write the data to the
port. Next, write the register-control
data three consecutive times to Port 2
V+

TO HOST
MICROCONTROLLER
2

I C BUS

D3
D4

1
2

26
27

28

D5
D6
D7
INT

D0
D1
D2
D3
D4
D5
D6
D7

V+

V+

CE

29

30

31

7
8

32
33

34

AD1

SDA

AD2

SCL

10

35

I/O0

AD0

11

36

I/O1
I/O2

IC1
MAX7311

I/O3
I/O4

I/O15

A2

I/O14

A1
A0

I/O13
I/O12

I/O5

I/O11

I/O6

I/O10

I/O7
GND

RDN

I/O9
I/O8

CE

A2
A1
SEE
TEXT

RDN
WRN

A0

12

37

13

38

14

39

15

40

16

41

17

42

18

43

19

44

20

45

21

46

22
D2 23
24
25

48
49
50

D0
D1

J1
50-PIN
COMPACTFLASH
CONNECTOR

WRN
D1
1N4148

R1
10k

RESETN
C1
10 F

47

Figure 1 A 16-bit I/O extender, IC1, and a CompactFlash connector add external data storage to a microcontrollers
I2C bus.

74 EDN | SEPTEMBER 1, 2006

designideas
for reading or writing data. Each track
contains 512 data bytes. The processor
indicates reading and writing tracks and
other functions by writing to 0x07, the
command register, and registers 0x01
and 0x07 contain error conditions and
status information.
Two unused pins, 10 and 11, on Port
2 are available to drive LEDs that display circuit activity and status. As an
alternative, the pins can support a userinstalled configuration jumper. In this
configuration, IC1s interrupt output
should connect to the host microcontrollers interrupt input so that installation or removal of the jumper can signal the microcontroller to recognize or
ignore the CompactFlash card. Selecting a CompactFlash-card connector
with hot-plugging contacts allows insertion or removal of a card without
switching off power or disturbing an
ongoing data-logging process.
With software modifications, a host
microcontroller can switch between
two CompactFlash cards. Adding a second MAX7311 supports an additional
CompactFlash card and expands the
circuits storage capacity, and the hotplug feature supports removal of a fully
loaded card for data processing on
another system. Microcontrollers that
include hardware-based I2C interfaces
can use two relatively simple I2C software functions to read and write a CompactFlash card through IC1s I/O ports.
The first function is: Write_MAX
3711(slv,prt,dat). This procedure

TABLE 1 ADDRESSES AND REGISTERS


Address
0x00
0x01
0x02
0x03

Register
Data
Error/features
Sector count
Sector number

starts the I2C bus and sends a data byte


(dat) to a port (prt) on the MAX7311
using a slave address (slv). The other
procedure, Read_MAX3711(slv,prt),
starts the I2C bus and reads a data byte
from a port on the MAX7311 at a slave
address. These functions serve as
foundations for two additional functions, which read and write to the
CompactFlash cards registers. The
first, Write_CF_REG(reg,dat), uses
Write_MAX3711 to place the data on
Port 1. Use the same procedure to place
the register address (reg) and other
control signals on Port 2. Executing
this function three times while toggling
WRN generates the write signal. The
Read_CF_REG(reg) procedure uses
Write_MAX7311 to address the CompactFlash cards register and generates
the read signal. Invoking Read_MAX
7311 then reads the data from the
register.
These functions, which in turn read
and write the cards registers, create
functions that access the CompactFlash-card sectors: Write_CF(cyl,
head,sec). To perform a write operation, this procedure uses Write_CF_
REG to designate the CompactFlash
cards target cylinder, head, and sector

IC and DMM form


direct-read-out temperature probe
Alfredo H Saab and Bich Pham,
Maxim Integrated Products Inc, Sunnyvale CA

The simple temperature-measurement probe in Figure 1 can


serve as an indispensable tool for troubleshooting and debugging electronic
circuits. To measure temperature at
several points, you can equip IC1, a
Maxim (www.maxim-ic.com) MAX6610, with a probe, or you can perma-

76 EDN | SEPTEMBER 1, 2006

nently integrate one or more devices


into a pc board or attach them to components. Resistors R1, R2, and R3 set the
circuits temperature-scaled voltage
output to various values (Table 1). Figure 2 shows the circuits representative
output versus temperature.
You can display the circuits temper-

Address
0x04
0x05
0x06
0x07

Register
Cylinder low
Cylinder high
Select card/head
Status/command

registers (0x03 to 0x06). Next, writing


0x30 to the command register configures the CompactFlash card to accept
data. Executing Write_CF_REG 512
times writes data in the microcontrollers global array to the data register. The CompactFlash card automatically adds this data to the current
track. To perform a read operation, the
Read_CF(cyl,head,sec) procedure uses
Write_CF_REG to designate the target
cylinder, head, and sector. Next, writing 0x20 to the command register configures the CompactFlash card to deliver data to the host processor. Executing
Read_CF_REG 512 times reads all 512
bytes through the data register from the
current CompactFlash cards track and
places the data in a global array.
If the microcontroller lacks sufficient
internal memory to store 512 data
bytes, the software can write each digitized data-point measurement directly to the CompactFlash card. For additional information on controlling
CompactFlash cards, review the material in Reference 1.EDN
REFERENCE
1 CF and CompactFlash specification, www.compactflash.org.

ature-proportional dc output voltage on


any DVM (digital voltmeter) or handheld DMM (digital multimeter). The
circuit draws only 200 A from a nominal 3V power supply, such as a pair of
AA alkaline cells. A CR2016 lithiumcoin cell can operate the circuit continuously for several hundred hours or
for several years if you equip the circuit
with a normally open, momentary-contact pushbutton switch.
To produce the error curve in Figure
3, immerse the circuit and a platinumresistance standard thermometer in a

designideas
temperature-controlled oil bath. The
circuits relative error with respect to
the standard thermometer varies only
4C over 40 to 125C. The MAX6610s data sheet includes additional
information on temperature-measurement error and output range.
To apply the circuit as a temperature
probe, solder a 5-mm length of 1-mmdiameter, uninsulated copper wire
directly to a small copper pad at IC1s
GND pin. The wire should make thermal and electrical contact with the
GND pin and thus provide a path of
low thermal resistance from the sensor
IC to the point of probing. Glue the
wire to the pc board to add mechanical support. Heat loss affects the temperature measurements accuracy, and,
to minimize heat loss from the probe
through the pc board, use long and thin
copper traces to make electrical connections from IC1 to its supporting
components.
Applying the MAX6610 as a pcboard temperature sensor differs somewhat from using it as a temperature
probe. For board-temperature sensing,
IC1 must reside in intimate thermal
contact with the board. Connect large
copper areas immediately to the ICs
pins and use short, thick tracesor
none at allbetween the copper areas
and the ICs pins. The copper areas
guarantee accurate temperature readings by providing thermal contact with

the board and good heat transfer between the board and the sensor.EDN

Voltage References, MAX6610/6611


data sheet, Maxim Integrated Products, November 2003, http://
pdfserv.maxim-ic.com/en/ds/
MAX6610-MAX6611.pdf.

REFERENCE
1 Precision, Low-Power, 6-pin
SOT23 Temperature Sensors and

TABLE 1 TEMPERATURE-SCALED VOLTAGE OUTPUT


10 mV/C
1 mV/C
R1 (k)
68.1
68.1
R2 (k)
2.8
2.8
R3 (k)
Open
2.21
Note: All resistors are of 10% tolerance.

1 mV/F
68.1
19.6
3.32

NORMALLY OPEN PUSHBUTTON


PUSH TO READ

S1

VCC

C1
0.1 F

TEMP

SHDN

BT1
+
CR2016
3V LITHIUM-
COIN CELL

IC1
MAX6610
R1

R3

TO DMM INPUTS

REF
GND
R2

Figure 1 One IC and a few passive parts directly display temperature on an


external voltmeter. See Table 1 for values for R1, R2, and R3.

10

1500

1250

1000
750
OUTPUT
VOLTAGE
(mV)

500
250
0
250
500

750
50 25 0
25 50 75 100 125 150
NOTE:
TEMPERATURE (C)
SCALE FACTOR=10 mV/C.

Figure 2 The circuit of Figure 1 exhibits a nearly linear


output-voltage-versus-temperature characteristic.

78 EDN | SEPTEMBER 1, 2006

4
2
TEMPERATURE
ERROR VERSUS 0
STANDARD
2
THERMOMETER
4
(C)
6
8
10
50 25

25 50 75 100 125 150


TEMPERATURE (C)

Figure 3 Immersed in a temperature-controlled oil bath


and compared with a platinum-resistance standard thermometer, the circuit of Figure 1 exhibits 2C error over
40 to 125C.

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

Brick-wall lowpass audio filter


needs no tuning

D Is Inside

Diego Puyal and Pilar Molina, University of Zaragoza, Zaragoza, Spain

When a systems specifications


call for a lowpass filter with a
steep frequency-cutoff characteristic,
an engineer can opt for a brick-wallfilter design that features a sharp transition band. For example, in an FM
stereophonic-broadcast system, the
lowpass filter in the baseband audios
left and right channels should have a
3-dB cutoff frequency of at least 15
kHz, a passband ripple of less than 0.3
dB, a stopband start frequency of at
least 19 kHz, a stopband attenuation
greater than 50 dB, and identical phase
response for both channels.
The filter should provide adjustable
gain to maximize SNR at the audio
processors first stage. The filters frequency response should also include a
notch at 19 kHz to achieve maximum
attenuation at the FM-subcarrier pilottone frequency and thus minimize
phasing problems. To reduce manufacturing costs, the filter should require no
in-process adjustments. Conventional

R1
50
SIGNAL
SOURCE
VIN

L1
560.32 H

INPUT
TO
FILTER

analog active-filter designs cannot meet


these goals at reasonable cost and complexity without time-consuming adjustments. This Design Idea outlines an
active-filter-synthesis approach that
reduces a filters sensitivity to passivecomponent tolerances and enables
construction of inexpensive, high-order
and highly selective filters.
The design process begins with selection of an appropriate passive-filter
topologyin this example, a seventhorder elliptic filter with 50 input and
output impedances (Figure 1). Setting
the beginning of the stopband frequency span at 18.72 kHz produces a
notch at the 19-kHz stereo-pilot frequency. Using the following equation
to transform each components impedance leaves the filters amplitudeversus-frequency response characteristics unaltered.

L3
81.741 H

L5
722.53 H

L7
420.89 H

L2
73.7801 H

L4
365.31 H

L6
264.74 H

C1
270.08 nF

C2
192.24 nF

C3
198.41 nF

OUTPUT

R2
50

Figure 1 This seventh-order, elliptic, lowpass, passive-filter prototype features


a 15-kHz cutoff frequency and stopband rejection exceeding 50 dB.

74 Fast-settling picoammeter circuit handles wide voltage range


What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.

As a result of the transformation, all


resistors undergo transformation into
capacitors, and adjusting the value of
parameter k yields reasonable capacitance values for using 10%-tolerance
parts. In this instance, select a value of
2.2 nF for C1:

Inductors transform into resistors,


and using 2%-tolerance or better components meets the circuits requirements. Capacitors transform into
supercapacitors whose impedance
exhibits a 1/s2 dependence:

Selecting a topology for a passive filter that contains the maximum number of inductors and references all
capacitors to ground yields a transformed filter that consists of many resistors, several supercapacitors, and only
two capacitors. You cannot obtain a
supercapacitor as an off-the-shelf component, but its electrical analog comprises a few operational amplifiers and
resistors (Figure 2). The following
equation defines the gyrators input
impedance, ZIN, with respect to
ground:

SEPTEMBER 14, 2006 | EDN 73

designideas
Selecting Z1Z31/Cs in the equation, setting capacitor value C at 2.2 nF,
replacing impedances Z2 and Z5 with
R11 k, and setting Z4R4 yield a
solution for Di:

Figure 2 shows the filters final


schematic. Potentiometer R1 adjusts
the overall gain, and connecting resistors R2 and R26 in parallel with capacitors C1 and C8 prevents dc blocking.
The finished filter design uses medium-tolerance resistors, only eight
capacitors, and two LF347 quad oper-

ational amplifiersfew amplifiers for


a seventh-order active filter that
requires no component adjustments to
meet its specifications. Thanks to the
designs precise implementation of the
pilot-tone-rejection notch, the filters
measured attenuation at 19 kHz exceeds 60 dB.EDN

GAIN
ADJUSTMENT
R1
100k

INPUT

R28
100k
R27
10k
C1
2.2 nF

IC1A
LF347

R3
5.1k

R10
6.2k

R11
1.2k

R5
560

R4
110

R7
5.6k

OUTPUT

IC2D
LF347
C8
2.2 nF

R13
11k

C5
2.2 nF

Z3

Z4

R14
3.9k

Z2

Z5

IC2B
LF347
_

IC2A
LF347
+

C7
2.2 nF

IC2C
LF347
+

R22
910

R16
11k

R9
11k

R20
11k

R21
3.6k

R15
470

R8
510

C6
2.2 nF

IC1C
LF347

R26
270k

Z1

IC1D
LF347

R6
11k

C3
2.2 nF

R25
150

C4
2.2 nF

R24
3.6k
R19
2.4k

R12
3.3k

ZIN

C2
2.2 nF

IC1B
LF347

R18
360

R2
270k

R17
6.2k

GYRATOR

R23
11k

Figure 2 The finished circuit design eliminates inductors and substitutes gyrators as supercapacitors. Using medium-tolerance components and quad op amps to reduce component count minimizes circuit cost.

Fast-settling picoammeter circuit


handles wide voltage range
Rob Whitehouse, Analog Devices, Wilmington, MA

Evaluating analog switches, multiplexers, operational amplifiers,


and other ICs poses challenges to IC-

74 EDN | SEPTEMBER 14, 2006

test engineers. A typical test scenario


requires application of a test or forcing
voltage to a devices input and meas-

urement of any resultant leakage and


offset currents, often at levels of 1 pA
or less. In contrast to slow and expensive commercially available automated testers, the low-power measurement circuit in figures 1 through 3 can
force a wide range of test voltages and
offer fast settling to maximize devicetest throughput. Extensive use of surface-mounted components minimizes

designideas
RN3
10k

TO THE
JUNCTION OF
R4 AND F1

RN1
5k
1

RN3
10k

15V

RN1
1k
3

2 7
V
IC3
OP1177
3 V

C1
10 pF

DEVICEUNDERTEST
INPUT

OUTPUT
6

J1

4
R1
100M
VCC
R2
100

D1A

D1B
D1

15V

VCC
NC
2 7
V 1
IC2
6
AD795
3 V 5
NC
4

NC
2 7
V 1
IC1
6
AD795
3 V 5
NC
4

RN2
10k

RN2
10k
2

VEE

VEE
NOTE: RN1, RN2, AND RN3 ARE VISHAY MPM-SERIES RESISTOR NETWORKS.

Figure 1 This IVC uses a feedback-ammeter topology, which subtracts an unknown current from a feedback current and
delivers an output voltage proportional to the unknown current.

its pc-board-space requirements and


allows packaging of multiple measurement circuits close to the test fixture.
The circuit comprises a forcing-voltage buffer/amplifier, a floating-rail
power supply, and an IVC (current-tovoltage converter). Applying a forcing
voltage to a device under test induces
leakage current, which the circuit converts to an output voltage proportional to the leakage current. In a conventional IVC, the current to be measured
develops a voltage across a shunt resistor. The IVC uses a feedback-ammeter
topology in which operational amplifier IC1, an Analog Devices AD795, subtracts an unknown current from a feedback current and delivers an output
voltage proportional to the unknown
current (Figure 1).
In this design, the inputs dc resistance consists mostly of R2 and IC1s
effective input resistance, or slightly
more than 100 at dc. At frequencies
in the power-line range of 50 to 300 Hz,
the circuits ac impedance averages approximately 10 k, or 1000 times less
than a typical shunt-resistance IVCs
input resistance of approximately 10

76 EDN | SEPTEMBER 14, 2006

M. The circuits 100-M feedback


resistor, R1, provides a current-to-voltage-conversion ratio that exceeds the
shunt-conversion ratio by a factor of 10.
This design settles much faster and provides better interference rejection at
power-line frequencies than shunt
converters. It also reduces unwanted

voltage-divider effects when testing


operational amplifiers input currents.
R1 produces a current-to-voltageconversion ratio of 100 V/pA. Amplifier IC2, an AD795, provides an additional voltage gain of 10, boosting the
ratio to 1 mV/pA and reducing the
effect of errors that differential ampli-

R3
47k

TO D1A, RN1,
AND RN3
(FIGURE 1)
TO F1
(FIGURE 3)

30V
VFORCE
INPUT

8
FLAG
3

7
V
R4
15

IC4
OPA551

V
5

C2
220 pF

1
30V

2
3

RN4
10k

RN4
5k

Figure 2 A gain-of-three high-voltage amplifier derives forcing voltages as high


as 22V from voltages of 7V from test equipment.

designideas
fier IC3s CMRR (common-mode-rejection ratio) introduces. Differential
amplifier IC3, an OP1177, subtracts the
forcing voltage from the IVCs output
and provides a ground-referenced output signal.
A back-to-back pair of BAV199
diodes, D1A and D1B, protects IC1 from
voltage overloads by shunting high currents to the forcing-voltage amplifier,
IC4, and its protective fuse, F1. When
the forcing voltage rapidly slews from
one value to another, the diodes greatly improve the IVCs settling time by
providing high-drive currents during
high-slew-rate intervals.
Operating from 30V supply rails, a
lightly compensated, gain-of-three,
high-voltage OPA551 amplifier, IC4,
derives forcing voltages as high as
22V from ordinary ATE (automatictest-equipment) voltages of 7V (Figure 2). In case of a catastrophically
shorted device under test, fuse F1 prevents further damage by limiting fault
current from IC4, which can deliver as
much as 380 mA of short-circuit current.
The output of IC4 also drives a regulator circuit that produces 5V floating-power-supply voltages referenced
to the test-input forcing voltage (Figure 3). This part of the circuit dissipates less than 100 mW of power with
30V supplies. Vishay/Siliconix (www.
vishay.com) SST505 JFET constantcurrent regulator diodes Q1 and Q4 provide 1-mA constant-current sources,
which transistors Q2 and Q3 buffer.
Each current-regulator diode carries a
45V maximum rating, and the buffers
provide overvoltage protection by limiting the voltages applied across the
diodes to approximately 3V.
Applying 1 mA to resistors R5 and R6
develops the 5V rail voltages. Diodes
D2 and D3 compensate for the baseemitter-voltage drops across emitter followers Q6B and Q7B. Transistors Q6A and
Q7A provide overvoltage protection
when a defective device under test
short-circuits its power supply to the
IVCs input node. Transistors Q5 and

78 EDN | SEPTEMBER 14, 2006

30V

R11
100

Q1

SST505

Q5
BC856

R7
6.04k
Q2
R8
53.6k

BC856

Q6B
D2
BAS16

C3
1000 pF
FROM IC4
PIN 6

R5
4.99k

F1
140 mA

VCC
3
BCB46BDW1T1 Q6A

R12
12.4k

R13
750

4
4

BCB56BDW1T1
R6
4.99k

C4
1000 pF

BC846BDW

Q7A

D3
BAS16

R14
750

C5
0.1
F

C6
0.01
F

D4
MMBD301

R15
12.4k

VEE
Q7B
BCB856BDW
R9
53.6k

Q3
R10
6.34k

BC846

Q8
Q4

BC846
SST505

R16
100

30V

Figure 3 This floating-regulator circuit produces 5V floating-power-supply


voltages VCC and VEE referenced to the test inputs forcing voltage.

1
0.8
0.6

CURRENT MEASUREMENT

0.4
MEASURED 0.2
CURRENT 0
(pA)
0.2

LINEARITY

0.4
0.6
0.8
1

20

15

10

5
0
5
FORCE VOLTAGE (V)

10

Figure 4 Over a 20V forcing-voltage span, the circuit produces an


unloaded-output current-measurement error of 31 fA/V.

15

20

designideas
Q8 limit the floating supplies output
currents by shunting the current
diodes. Diode D4 protects against polarity inversion of the floating-supply rails
during unusual start-up conditions.
In operation, the circuit delivers an
output of 0.999V/nA over a 4-nA
full-scale input range at an effective
transresistance of 1 G. The circuits
output offset corresponds to approximately 143 fA. Beyond the forced-voltage span of 22V, the floating-supplyrail voltages begin to saturate, the
input-CMRR limitations of IC3
become evident, and the IVCs output
voltage becomes nonlinear. Figure 4
shows the circuits current-measurement error of 31 fA/V from the circuits unloaded output over a 20V
forcing-voltage span. The differential
amplifier comprising IC3, RN2, and RN3
contributes most of the circuits gain,
and IC1s low input-bias current contributes to the low offset error. Output

80 EDN | SEPTEMBER 14, 2006

THE CIRCUITS SLEWRATE CAPABILITY


VARIES CONSIDERABLY, BUT IN GENERAL THE OUTPUT FAITHFULLY SLEWS THE
ENTIRE 40V FORCING-VOLTAGE SPAN
IN 100 SEC OR LESS.
linearity over the 20V forcing-voltage range averages 111 fA p-p.
The circuits slew-rate capability
varies considerably, but in general the
output faithfully slews the entire 40V
forcing-voltage span in 100 sec or less
as D1 drives the device under test.
Once the high-slew period completes,

the IVC comes out of saturation, and


its output becomes an exponential
voltage with a time constant of 1 msec.
The output settles to 100 fA in approximately 10.6 msec. Under no-load conditions, the circuit consumes approximately 10.2 mA from the 30V supplies and 400 A from the 15V supplies. The prototype circuits layout
occupies approximately 1.5 in.2 on a
single-sided pc board, and placing
components on both sides of a doublesided board would reduce the area to
1 in.2 For best performance, the layout
must include guard rings around the
input terminal and all traces attached
to Pin 2 of IC1. The circuits size allows
its placement on a device-under-test
fixture to minimize lead lengths and
power-line-induced electromagnetic
interference. Although able to measure currents as small as 1 pA, the circuit can accommodate larger currents
by reducing the value of R1.EDN

EDITED BY BRAD THOMPSON


AND FRAN GRANVILLE

designideas
READERS SOLVE DESIGN PROBLEMS

High-impedance buffer amplifiers


input includes ESD protection

D Is Inside
192 Composite-VGA encoder/
decoder eases display upgrade

Eugene Palatnik, Waukesha, WI

Certain measurement applications, such as for pH (acidity)


and bio-potentials, require a highimpedance buffer amplifier. Although
several semiconductor manufacturers

offer amplifier ICs featuring low bias


and offset-input currents, attaching a
sensor cable to an amplifier circuit can
inflict damage from ESD (electrostatic discharge). Figure 1 shows one

What are your design problems


and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.

D1A

R1

IC1

VOUT

D1B

3V

Figure 1 In a conventional ESD-suppression circuit, diodes clamp an amplifiers input voltage to its power-supply rails but introduce unwanted leakage
currents.
J1
INPUT

VIN

3V

3V

D1
MMBD1503A
R1
1k

D1A
D1B

3V

C2
0.1 F

C3
0.1 F

R2
1k

IC1
AD8603
_

VOUT

LEAKAGE GUARD
3V
D2
MMBD1503A

3V
R3
270

D2A

D2B

196 SPST pushbutton switch


combines power-control, user-input
functions
198 Electronic circuit replaces
mechanical push-push switch

3V

VIN

194 Solenoid-protection circuit


limits duty cycle

C1
1 nF

3V

Figure 2 In this alternative design, voltage across both halves of D1 normally


approaches 0V and introduces no leakage currents. During an ESD event,
both D1 and D2 conduct to protect IC1s inputs.

unsatisfactory approach to ESD protection. Resistor R1 limits an ESD events


discharge current, and diodes D1A and
D1B clamp amplifier IC1s input to its
power-supply rails. Unfortunately,
when shunting a pH sensors 400-M
input impedance, even low-leakage
diodes, such as Fairchild Semiconductors (www.fairchildsemi.com) MMBD1503A, introduce significant offset
voltages.
The circuit in Figure 2 offers an
alternative approach. An Analog Devices (www.analog.com) low-inputbias, low-offset-current AD8603 amplifier, IC1, serves as a unity-gain input
buffer. For any normal input, the circuits output voltage, VOUT, equals its
input voltage, VIN. Thus, the voltage
across ESD-protection diode D1A or D1B
approaches 0V, and neither diodes
leakage current affects the sensors output signal. Depending on the polarity
of an ESD event you apply to the circuits input connector, its high-voltage
spike discharges through diode D1A or
D1B into the positive or the negative

SEPTEMBER 28, 2006 | EDN 191

designideas
power-supply rail. Capacitor C1 acts as
an intermediate charge reservoir that
slows the ESD spikes rate of rise and
protects IC1s output stage from latching until diode D2A or D2B begins diversion of the ESD transient into the positive or the negative supply rail. In
effect, C1 compensates for D1s parasitic
capacitance. Resistor R3 allows IC1 to
drive the capacitive load that C1 presents without going into oscillation.
During an ESD event, both D1 and
D2 can conduct, but the voltage at VIN
exceeds the power-supply-rail voltage
by only two forward-biased diode voltage drops. Resistors R1 and R2 limit the
amplifier inputs currents below the
manufacturers recommended 5-mA
maximum rating.
When packaging the circuit, pay special attention to the pc boards layout.
Imperfections in the boards dielectric

Figure 3 For best performance, place copper traces around the amplifiers
high-impedance points to intercept leakage currents.

properties can provide parasitic-leakage-current paths. Adding copper


traces on both sides of the board to form

guard rings around the circuits highimpedance nodes diverts leakage currents (Figure 3).EDN

Composite-VGA encoder/decoder
eases display upgrade

However, the VGA standard uses separate horizontal and vertical positivegoing synchronization signals. Adding an
extra coaxial cable to the original cables
to carry the separate synchronization signals presented a difficult and expensive
proposition. An obvious solution would
be to combine the separate synchronization signals into a composite format.

Werner Schwiering, Joystick Scoring Ltd, Whitby, ON, Canada

An older computer system fed


RGB video and composite-synchronization signals through four 75
coaxial cables to an RGB color monitor

150 feet away. To upgrade it, the replacement VGA video cards could directly
drive the 75 loads that the VGA monitors internal terminations presented.

12V
0.1 F
VERTICALSYNCHRONIZATION
INPUT

HORIZONTALSYNCHRONIZATION
INPUT

D1
D2
D3
1N4148 1N4148 1N4148

D4
1N4148

J1

R6
1k

HORIZONTALSYNCHRONIZATION
OUTPUT

Q2

C2
0.01 F

J2
COAXIAL
CABLE

R5
4.7k

R4
4.7k

SIMPLE VGA-COMPOSITE
SYNCHRONOUS ENCODER/DECODER

2N3904
Q1

R1
75

2N3904

R3
1k

R2
2.2k

12V
SYNC
OUT

R7
4.7k

SYNC
IN

R8
1k

Q4

VERTICALSYNCHRONIZATION
OUTPUT
2N3904

Q3
C1
0.01 F

2N3904

Figure 1 The synchronization-pulse combiner and recovery circuits comprise readily available and inexpensive components.

192 EDN | SEPTEMBER 28, 2006

designideas
The combiner circuit in Figure 1 offers
simplicity, low cost, and rapid assembly
from readily available spare parts.
In operation, two 1N4148 diodes, D1
and D2, attenuate the VGA signals 5V
logic-level vertical-synchronization
pulses by 1.4V, and diodes D3 and D4
form a diode-logical-OR gate to combine the vertical- and horizontal-synchronization pulses. The resultant output signal comprises an approximately 4.3V horizontal-synchronization
signal superimposed on a 2.9V verticalsynchronization signal.
At the receiving end, a capacitively

coupled highpass filter extracts the horizontal-synchronization signal, and a


simple RC (resistor-capacitor) lowpass
circuit removes horizontal-synchronization pulses from the directly coupled vertical-synchronization signal.
Transistors Q1 and Q2 amplify the
recovered horizontal-synchronization
pulses, and transistors Q3 and Q4 amplify the vertical-synchronization pulses.
The circuits resulting outputs consist
of clean synchronization pulses that
closely approximate those of the original and provide extremely stable synchronization pulses for a VGA moni-

tor operating at 640480-pixel resolution (Figure 2).EDN

Solenoid-protection circuit limits duty cycle

words of my tutor: Decrease the number of dangerous components to


decrease the risk of danger. A simple
analog circuit would be safer, smaller,
and easier to maintain. The circuit in
Figure 1 uses a traditional analog
method of measuring time: the charge
and discharge behavior of a resistancecapacitance circuit.
Figure 2 highlights the circuits timing components. Capacitor C2, a tantalum electrolytic with 10% tolerance, diode D1, and resistors R2 and R5
constitute a double-RC (resistor-

Figure 2 Applying the diode-gated


composite-synchronization waveform to a 75 load results in clean
synchronization pulses.

Panagiotis Kosioris, Inos Automation Software, Stuttgart, Germany

Several safety-critical solenoids


in a laser-measurement system
on an automotive-assembly line
required protection from internal
overheating during normal operation.
After a 60-sec activation, the solenoids
required 180 sec to cool before their
next activation. One apparently
straightforward protection circuit
would comprise a timer based on a

microcontroller, some support components, and a short program written in


C. However, the project would
require evaluation and selection of a
suitable microcontroller, purchase or
rental of a device programmer, and considerable time in programming the
microcontroller and evaluating its
operational hazards.
As an alternative, I recalled the

12V
R1
5.5k

8
3

D1
1N4148

R2
2.2M

C1
100 nF

IC1A
2 _AD822

R4
10k

D2
1N4148

IC1B
6 _AD822

R3
1k
TRIGGER IN

+ C
2

R5
2.2M

68 F

R6
10k

R7
1k

Q1

6
7

IN

OUT
OUT

LOCKDIS
IC2
TC4432

1
VDD
VDD 8
4
GND
5
GND

IRL3705N
TO SOLENOIDS

Figure 1 An externally triggered solenoid driver features an analog duty-cycle limiter.

194 EDN | SEPTEMBER 28, 2006

2
NC
24V

designideas
capacitor) circuit. During solenoid
activation, R2 provides a charging path
for C2, and diode D1 prevents C2 from
discharging through the solenoids.
When the solenoids are off, the discharge path comprises R2 plus R5, which
provides a longer time constant. The difference between the two time constants
determines the solenoids activation and
recovery periods. A Schmitt trigger designed around one-half of IC1, an Analog Devices (www.analog.com) AD822
dual operational amplifier, senses the
voltage across C2 and defines the solenoids cutoff- and turn-on-timing intervals. An intermediate buffer stage,
IC1B, drives a Microchip (www.microchip.com) TC4432 MOSFET driver,

which in turn controls the gate of Q1,


an N-channel power MOSFET that
drives the solenoids from 24V.
When Q1 switches on, the voltage
level across C2 increases, and, after 60
sec, the output of the Schmitt trigger
falls from 12 to 0V. The buffer stage
drives the cathode of diode D2 to 0V.
The voltage at D2s anode reaches 0.7V
and is insufficient to trigger MOSFETdriver IC2. Q1 now switches off, removing supply voltage from the solenoids and reverse-biasing diode D1.
Capacitor C2 starts to discharge
through R2 and R5, and the input voltage you apply to the Schmitt trigger
falls at a slower rate than during the
charging interval. After 180 sec, the

C2
DISCHARGING 68 F

Figure 2 A resistance-capacitance
circuit determines on- and off-time
intervals.

Schmitt triggers output rises to 12V,


and the circuit awaits arrival of another external trigger pulse through resistor R3.EDN

When selecting components, ensure that Q1s gate-source breakdown


voltage exceeds the highest possible
input voltage; otherwise, use a zener
diode to limit Q1s applied gate-source
voltage. You can omit Q1 if voltage
regulator IC1 includes an on/off-control pin. To replace Q1 with a different power-switching device, such as
an NPN bipolar transistor or a relay,
specify Q2 to provide the control current that the switching device requires. To further reduce the circuits
component count, replace diodes D1

196 EDN | SEPTEMBER 28, 2006

through diode D2 and signals the button-pressed event to the firmware.


After completing its program, the
microcontroller asserts its output P1.1
low to turn off Q2 and, consequently,
Q1, removing power from the system
until the user presses S1 and restarts the
process.
Q1
P-MOSFET
S
+
BT1
BATTERY

R1
100k

IC1
REGULATOR

IN
+ C
1

TO IC1A,
PIN 2

CHARGING
R5
2.2M

Eugene Kaplounovski, Vancouver, BC, Canada


This Design Idea describes an
enhancement to a previous one
(Reference 1). The circuit in Figure 1
uses a normally open SPST pushbutton
switch, S1, instead of the SPDT switch
that the original design required. You
can use a membrane switch to significantly simplify the industrial design of
the device and enhance its ergonomics.
In addition, this circuit slightly reduces
the current drain in active mode by
eliminating current flow through the
unactuated switch.
In standby mode, MOSFET Q1
remains off and consumes less than 1
A of leakage current from the battery.
Pressing switch S1 turns on Q1 by
pulling its gate to ground through diode
D1. Voltage regulator IC1 turns on and
supplies power to microcontroller IC2.
The microcontroller boots up and
asserts its P1.1 output high, turning on
transistor Q2 and latching on the systems power to allow release of S1.
Meanwhile, resistor R3 pulls the microcontrollers input, P1.2, to VCC. Pressing the switch a second time pulls the
microcontrollers P1.2 input low

2.2M

FROM
SOLENOIDS

SPST pushbutton switch combines


power-control, user-input functions


R2

D1
1N4148

VCC

OUT
GND

C2
10 F

10 F

VCC
POWER HOLD
D1
1N914

S1
SPST

Q2
2N3904

R2
10k

R4
47k

R3
47k
SWITCH

D2
1N914

C3
10 nF

P1.1
IC2
P1.2
GND

Figure 1 One switch can provide power control and user inputs to a microcontroller-based system.

designideas
and D2 with a suitable common-cathode dual-diode array, such as the
BAV70. Omit resistor R3 if IC2 includes built-in pullup resistors, as do

Electronic
circuit replaces
mechanical pushpush switch
Donald Schelle, Maxim Integrated
Products Inc, Sunnyvale, CA

Mechanical push-pushbutton
switches (also known as alternate-action or push-on/push-off switches) can be bulky and expensive. As an
alternative, an electronic version uses a
cheaper, NO (normally open), momentary-on switch (Figure 1). A supervisory microprocessor, IC1, serves as a combination switch debouncer and intelligent controller. Applying power holds
IC1s LBO output (Pin 4) low, which in
turn resets flip-flop IC2s output to a
logic-low state (off) (Figure 2). Pressing
the NO momentary-contact switch, S1,
evokes a pulse from the RESET output
(IC1, Pin 5), which triggers IC2s CK
input (Pin 1) and toggles IC2s output to
a logic-high state (on). Pressing the
switch a second time triggers another
RESET pulse that toggles flip-flop IC2s
output to a logic-low state (off).
You can add an optional watchdog
timer, IC3, to reset IC2s output to the
logic-low state after a user-selectable
interval as long as 60 sec. You can select
shorter reset times using IC3s programming pins: SET0, SET1, and
SET2. The entire circuit costs about $2
(1000) and occupies a pc-board area
thats no larger than its mechanical
counterpart.EDN

MORE AT EDN.COM
+ For more Design Ideas, visit
www.edn.com/designideas.

+ For our best entries, go to


www.edn.com/bestofdesignideas.

198 EDN | SEPTEMBER 28, 2006

many modern microcontrollers.EDN

serves dual duty in small, microcontroller-based system, EDN, March


30, 2006, pg 96, www.edn.com/
article/CA6317068.

REFERENCE
1

Hageman, Steve, Single switch

VCC
3.3V

VCC
3.3V

VCC
3.3V

C2
0.1 F

VCC
3.3V

R2
470k
7
C4
0.1 F

R1
470k

C1
0.1 F

VDD

VCC

7
PR

LBO

HTHIN

OUTPUT

IC2
NC7SV74

LTHIN
RESET

MR

GND
S1

CLR

IC1
MAX6847

8
VCC

CK
D

GND
4

OPTIONAL
VCC
3.3V

C3
0.1 F

8
VCC
NC

SET2

IC3
MAX6369
7

SET1
SET0

VCC
3.3V

6
5
4

WDI 1

WDO
GND
2

Figure 1 This simple electronic circuit uses a momentary-contact pushbutton


switch, S1, to replace a more expensive mechanical push-on/push-off switch.
VCC
VALID ONLY IF OPTION IC3 IS ATTACHED.

GND
SWITCH
BOUNCE

SWITCH
BOUNCE

SWITCH
BOUNCE

SWITCH
BOUNCE

S1

GND
225 mSEC
OUTPUT

GND

225
mSEC
OUTPUT IS ZERO
AT START-UP.

225
mSEC

60
SEC

225
mSEC

TIME

Figure 2 Repeatedly pressing the circuits momentary-contact switch toggles


the circuits output on and off. After a preselected interval, an optional watchdog timer resets the output to the logic-low state.

designideas
Edited By brad thompson
and Fran Granville

readerS SOLVE DESIGN PROBLEMS

Soft limiter for oscillator circuits uses


STEVE edn060928DI3902
figure1 pair
emitter-degenerated
differential
Herminio Martnez and Encarna Garcia,
Technical University of Catalonia, Barcelona, Spain

Most oscillator circuits include


a nonlinear amplitude control
that sustains oscillations at a desired
amplitude with minimum output distortion. One approach uses the output sinusoids amplitude to control a
circuit elements resistance, such as
that of a JFET operating in its triodecharacteristics region. Another control method uses a limiter circuit that

allows oscillations to grow until their


amplitude reaches the limiters threshold level. When the limiter operates,
the outputs amplitude remains constant. To minimize nonlinear distortion and output clipping, the limiter
should exhibit a soft characteristic.
Based on a waveform shaper that
imposes a soft limitation or saturation
characteristic, the circuit in Figure

VCC12V

AMPLIFIER
BLOCK

RG
10k
RC1
33k

VCC12V

Q4
2N3906

VOUT

IC1
TL081

VIN

Q1
2N2222

RE1
100

RE2
100

VOUT

Q2
2N2222
VEE12V

RE3
100k

IEE

VEE12V
R3
10k

R2
10k

R1
10k
C1
1 nF

100 Feedback circuit enhances


phototransistors linear operation
104 Three-phase sinusoidal-waveform generator uses PLD
EWhat are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
1 comprises a simple RC (resistorcapacitor)-ladder phase-shift oscillator and an amplitude-control limiter
circuit. R1, R2, and R3 have values of
10 kV each, and C1, C2, and C3 have
Equationoffor1 DI
values
nF3902
each. The following
equation defines output voltage VOUTs
frequency, fO.
fO =

RC2
33k

Q3
2N3906

D Is Inside

C2
1 nF

C3
1 nF

FREQUENCY-DETERMINATION NETWORK

Figure 1 A phase-shift RC-oscillator circuit uses an emitter-coupled amplitude


limiter.

6
6
=
39 kHz.
2RC 2 10 k 1 nF

The inverting-amplifier block in


Figure 1 comprises transistors Q1 and
Q2, a differential pair that presents a
nonlinear-transfer characteristic, plus
an IVC (current-to-voltage converter)
based on operational amplifier IC1.
For oscillation to occur, the inverting
amplifiers gain magnitude must exceed
29. Selection of appropriate values of
bias current, IEE; the transistor pairs
emitter-degeneration resistances, RE1
and RE2; and RE3 produces the amplifiers nonlinear-transfer characteristic,
VOUT versus VIN (Figure 2).
A small input voltage produces a
nearly linear-amplifier-transfer characteristic. However, large values of input
voltage drive Q1 and Q2 into their
nonlinear region, reducing the amplifiers gain and introducing a gradual
bend in the transfer characteristic. A
current mirror comprising Q3 and Q4
converts the shaping circuits output

october 12, 2006 | EDN 99

designideas
to a single-ended current, which operational amplifier
IC1 converts to an output voltage. In the prototype circuit, calibration trimmer RE3 has a value of approximately
33 kV. Figure 3 shows the oscillators output voltage for
the component values in Figure 1, and Figure 4 shows
the sinusoidal outputs spectral purity.
The nonlinear amplifiers wave-shaping action occurs
independently of frequency, and this circuit offers convenience for use with variable-frequency oscillators. Note
that IC1s gain-bandwidth product limits the circuits performance. To use the limiter portion of the circuit with a
noninverting amplifier, such as a Wien-bridge oscillator,
apply the signal input voltage to Q2s base, and ground
Q1s base.EDN

Figure 3 For the component values in Figure 1, the oscillators output voltage reaches full amplitude in approximately
400 msec, or 15 cycles after start-up.

Figure 2 The transfer-characteristic output voltage versus


input voltage for the nonlinear amplifier shows a gradual
onset of limiting at approximately 100-mV input.

Figure 4 The oscillators output spectrum shows only a


slight amount of third-harmonic output.

Feedback circuit enhances


phototransistors linear operation
JC Ferrer and A Garrigs, University Miguel Hernndez, Elche, Spain

A designer who uses a phototransistor to convert a modulated optical signal to an electrical


signal frequently encounters problems
when high-intensity background light
saturates the phototransistor. When
its base terminal floats, a phototransistors collector-to-emitter voltage
depends only on the photocurrent
generated by the superposition of
the signal and background light. The
phototransistors gain and its activeregion range depend on R 1s resistance. For higher values of R 1, the
circuits gain increases, but the phototransistor saturates more quickly. In
Figure 1, without background illumination, the transistor operates in
its linear region at bias point f2, and
Q1s collector voltage varies linearly

VHIGH

IC

R1

MAX

VOUT

LOAD LINE (1/R1)


3

CURRENT

NC

IC

Q1

BIAS POINT
2

IC

1
VCE(SAT)

VCE

VHI

VCE

MODULATED LIGHT
PRODUCES
AC-OUTPUT SIGNAL, VOUT

Figure 1 Varying levels of ambient-light flux affect the bias point of a basic
phototransistor circuit. Higher levels force the bias point closer to saturation
and compress the desired signal, VOUT.
EDN061012DI3851FIG1

100 EDN | october 12, 2006

AMBIENTLIGHT
FLUX
()

MIKE

designideas
around VCE. Its output,
R4
R3
R7
R8
VOUT, faithfully repro18k
47k
10k
10k
VCC
duces ampltude fluctuaVCC
VCC
tions in the modulated
VCC
optical signal. Applying
R1
_
_
extraneous steady-state
1k
R2
IC1
IC2
VOUTPUT
470k
TL082
background illuminaTL082
+
+
tion shifts the circuits
operating point to bias
C1 +
R5
VDD
Q1
VDD
500 F
point f 3, and the output
1k
BPX43
voltage compresses and
R6
distorts.
1k
Unlike photodiodes
and photovoltaic cells
Figure 2 A feedback circuit consisting of a single-pole lowpass active filter and a Howland
that have only two
source diverts current from the phototransistors base to avoid saturation at excessive backleads, a phototransistors
ground-light levels.
base connection allows a
feedback circuit to control the devices quency below the signal frequency to R5 sets the current sources transconedn061012di38512 DIANE
bias point. Diverting current from the sample Q1s collector voltage. Apply- ductance: GM51/R5. Altering these
base terminal reduces collector cur- ing a reference voltageVCC, in this resistors affects the amount of current
rent. In Figure 2, phototransistor Q1 exampleto R3 sets the filter circuits drained from the phototransistors
detects an optical signal plus back- dc operating point midway between base and the circuits operating point.
ground light that illuminates its base the phototransistors cutoff and satura- The phototransistor has much lower
region. A lowpass active filter samples tion voltages. The lowpass filters out- capacitance than the filter, ensuring
the collector voltage generated by put drives a Howland current source to that the circuit in Figure 2 cannot
the background light, and a Howland produce a current proportional to the oscillate. However, replacing the firstcurrent source alters the circuits bias filters output. As background illumi- order lowpass filter with a secondpoint by draining current from the nation increases, Q1s collector voltage order lowpass filter requires careful
phototransistors reverse-biased col- decreases. The current sources output selection of the capacitors values to
lector-base junction.
subtracts from Q1s base current, which avoid oscillation.
In general, extraneous background in turn raises Q1s collector voltage to
Illuminating the phototransistor
illumination fluctuates more slowly avoid saturation.
with a 100W incandescent light bulb
than the desired signal. For simplicity,
The ratio of R4 to R3 establishes the provides high-intensity-light backthis design uses a first-order lowpass active lowpass filters gain according ground lighting plus a rapidly changfilter, C1 and R2, with a cutoff fre- to the equation AV511(R4/R3), and ing signal due to the applied ac-line

Figure 3 A 100W light bulb at a 40-cm distance illuminates a collector-emitter voltage of a phototransistor with
a feedback circuit (a) and with no feedback (b). Both bias
points remain in the linear region.

102 EDN | october 12, 2006

Figure 4 A 100W light bulb at a 20-cm distance illuminates


the collector-emitter voltage of a phototransistor with a feedback circuit (a) and with no feedback (b). Saturation of the
circuit with no feedback prevents signal detection.

designideas
voltage. Figure 3 shows Q1s collector-to-emitter voltage with the light
bulb 40 cm from the phototransistor
with the feedback circuit active (Figure 3a) and for the circuit with the
phototransistors base floating (Figure
3b). The responses appear similar because the phototransistor doesnt saturate at the applied light intensity.

Repositioning the light bulb at 20


cm from the phototransistor increases
the background-light level and drives
the phototransistor closer to saturation. When you apply feedback, the
phototransistor delivers a higher amplitude signal, although its bias point
remains almost unchanged (Figure
4a). The average dc-voltage level at

Three-phase sinusoidal-waveform
generator uses PLD

5V
748 Hz
NC
NC

Eduardo Perez-Lobato, University of Antofagasta, Antofagasta, Chile

Using the circuit in this Design Idea, you can develop and
implement a lightweight, noiseless,
inexpensive, three-phase, 60-Hz sinusoidal-waveform voltage generator.
Q3
1
2
3
4

CLK
V
OPOUT

IN
IC2
MAX294

OPIN

V+
GND
OUT

Q1s collector remains almost the same


as at the lower light level (Figure 3a).
However, with no feedback applied,
the phototransistors bias point moves
close to saturation, and the ac-modulated light variations are barely detectable (Figure 4b).EDN

Although targeting use as a circuit for


testing power controllers, it can serve
other applications that require three
sine waves with a 1208 relative phase
difference. A 22V10 PLD (programmable-logic device)
5V
at IC1 generates
three three-phase,
8
60-Hz, square1.5k
1.5k
7
wave voltages.
6
Internal register
5
IC1 and Q0, Q1,
100 nF
A PHASE
and Q2 bits set the

NC
NC
NC
NC
NC
NC
NC
NC

1
2

VCC 24
23

22

21

20

IC1
Q5 19
22V10
Q4 18

CLK

7
8

Q3 17
Q 16

10

Q1 15
Q 14

11

12 GND

13

NC
NC
NC
NC
Q5
Q4
Q3
NC
NC
NC
NC

Figure 1 An external 748-Hz clock


source drives this PLD-based,
three-phase sine-wave generator.

5V

Q4
1
2
3
4

CLK
V
OPOUT

IN
IC3
MAX294

OPIN

V+
GND
OUT

CLK

8
1.5k

1.5k

6
5
100 nF

B PHASE

Q0

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

Q1

0 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 0

Q2

1 1 1 0
0 0 0 0 1 1 1 0 0 0 edn061012di39371
1 1 1 0 0 0 DIANE

Q3
Q4
Q5

5V

Q5
1
2
3
4

CLK
V
OPOUT
OPIN

IN
IC4
MAX294

V+
GND
OUT

A PHASE

8
1.5k

B PHASE

5
100 nF

6 kHz

1.5k

C PHASE

C PHASE

Figure 2 Switched-capacitor filters remove all but the


sinusoidal fundamental signal from the PLDs three-phase
square-wave outputs.
edn061012di39373

60

120 180

240 300
PHASE ()

Figure 3 The timing diagram shows the relationship


between the clock and the three-phase outputs.

DIANE
edn061012di3937fig2

104 EDN | october 12, 2006

360 420 480 540

mike

designideas
Q3 bit to lead the Q4 bit by 1208 and
set the Q5 bit to lag behind the Q3 bit
by 2408 (Figure 1). Setting IC1s clock
frequency to 748 Hz produces 60-Hz
outputs at Q3, Q4, and Q5.
IC1s three square-wave output voltagesQ3, Q4, and Q5drive IC2, IC3,
and IC4, three Maxim (www.maximic.com) MAX294 eighth-order, lowpass, switched-capacitor filters to produce three 2V sinusoidal waveforms
(Figure 2). When you connect IC5, a
common 555 timer as an astable oscillator, it produces a 6-kHz, TTL-level
source that clocks all three filters at
100 times the desired 60-Hz output frequency. A 100-nF dc-blocking capaci-

tor at each filters output ensures that


the three-phase outputs swing from
12 to 22V with respect to ground.
Note that each filter inverts its output
and introduces a 1808 phase shift with
respect to its input square wave.
Figure 3 depicts the phase relationships among IC1s outputs and yields
Boolean equations (Table 1). The
equations translate into set/reset signals that produce 64 logic states when
you apply them to a 6-bit sequencer
block in IC 1. Outputs Q5, Q4, and Q3
represent the three
most-significant bits,
1
and Q2, Q1, and Q0

TABLE 1 boolean equations


Set_Q0=Q0

Reset_Q0=Q0

Set_Q1=Q13Q0

Reset_Q1=Q23Q13Q0+Q23Q13Q0

Set_Q2=Q23Q13Q0

Reset_Q2=Q23Q13Q0

Set_Q3=Q33Q23Q13Q0

Reset_Q3=Q33Q23Q13Q0

Set_Q4=Q43Q23Q13Q0

Reset_Q4=Q43Q23Q13Q0

Set_Q5=Q53Q23Q13Q0

Reset_Q5=Q53Q23Q13Q0

2
6 kHz
5V

3
4

represent the three least-significant


bits. After translation, an emulated
Basic program (Listing 1), which
you can download from www.edn.
com/061012di1, produces fuse-programming code for IC1s sequencer
and logic states. Although only 16
logic states define the sequencers
functions, its remaining 48 states also
require definition to avoid anomalous
operation.EDN

5V

12k
8
IC5
555

NC

10 nF

Figure 4 A garden-variety 555 timer IC provides a 6-kHz


clock for the switched-capacitor filters.
edn061012di39374

edn061012di39373

106 EDN | october 12, 2006

6.2k

DIANE

designideas
Edited By brad thompson
and Fran Granville

readerS SOLVE DESIGN PROBLEMS


D Is Inside

PSoC microcontroller and LVDT


measure position

110 Single microcontroller pin


senses ambient light, controls
illumination

Sigurd Peterson, Sig3 Consulting, Aloha, OR

Connecting an LVDT
(lin-EDN061026DI3924
output signals amplitude
and phase
STEVE
FIGURE1
ear-variable-differential trans- into a form compatible with a microformer) to a microcontroller can prove controllers internal ADC usually
challenging because an LVDT requires requires additional external circuitry.
ac-input excitation and measurement
In contrast with conventional microof ac outputs to determine its mov- controllers, Cypress Semiconducable cores position (Reference 1). tor Corps (www.cypress.com) PSoC
Most microcontrollers lack dedicated microcontrollers include user-configuac-signal-generation and -processing rable logic and analog blocks that simcapabilities and thus require external plify generation and measurement of ac
circuitry to generate harmonic-free, signals. PSoC devices have the unusual
amplitude- and frequency-stable sine- feature of being able to generate analog
wave signals. Conversion of an LVDTs signals without demanding continuous

112 Hartley oscillator requires no


coupled inductors
EWhat are your design problems

and solutions? Publish them here


and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
CPU attention. The PSoCs flexible
analog and digital blocks can drive an
LVDT and measure its outputs without
requiring any external circuitry. Figure
1 shows the complete circuit of the
LVDT interface, and Figure 2 shows
VCC
5V

C3
1 F

C2
0.1 F

J2
1
2
3

C1
0.01 F

POWER
CONNECTOR

ANALOG-REFERENCE GROUND
SINE-WAVE DRIVE

DC ANALOG OUTPUT

MEASUREMENT SIGNAL
TRANS TEK#
0218-0000
4-IN. LVDT
YELLOW

REF_CLOCK_TP
19

PRIMARY

WHITE

VCC

CORE
SECONDARY B

SECONDARY A

BLACK ORANGE
BLUE RED

NOTE: IC1 PINS WITH

XRES

13
P1(1)/XI/SCLK
28
VDD
15
P1(0)/XO/DAT

SMP

P0(7)
P0(6)
P0(5)
P0(4)
10
P0(3)
P1(7)
IC1
18
P0(2)
P1(6)
CY8C27443- P0(1)
11
P1(5)
24PXI
17
P0(0)
P1(4)
12
P1(3)
16
P2(7)
P1(2)
P2(5)
14
VSS
P2(3)
23 P2(6)/VREF
P2(2)
P2(0)
22 P2(4)/AGND
P2(1)

9
1
27
2
26
3
25
4
24
5
6
7
21
20
8

VCC

R1 LCD CONTRAST ADJUST


J1
10k
1
2
3
4
5
6
7
8
9
10
11
12
13
14

LCD-MODULE
CONNECTOR
LUMEX
LCM-S01602DSR

INDICATE NO CONNECTION.

Figure 1 A single PSoC can excite an LVDT, digitize the position of its core, and present the data to an external LCD.

october 26, 2006 | EDN 105

designideas
MODULATOR

VOLTAGE
REFERENCE

PROGRAMMABLEGAIN AMPLIFIER

SINE WAVE

SWITCHED-CAPACITOR
BANDPASS
FILTER

CARRIER-FREQUENCY
SQUARE-WAVE
GENERATOR

OUTPUT
PIN

24-MHz
SYSTEM
CLOCK

SAMPLE-CLOCK
GENERATOR

MODULATOR

INPUT
PIN

SAMPLE-CLOCK
GENERATOR

SWITCHED-CAPACITOR
LOWPASS
FILTER

SWITCHEDCAPACITOR
ADC

OUTPUT
PIN
DC

Figure 2 The LVDT-interface circuit requires many analog functions.

the PSoC microcontrollers internal


circuit blocks.
The PSoC uses pairs of user-configurable switched-capacitor blocks to
implement both bandpass and lowpass
filters. You can create a high-quality
sine wave by generating a square wave
and applying it to a PSoC switchedcapacitor filter through a modulator
built into the first switched-capacitor block. Passing the square wave
through a narrow bandpass filter
centered on the square waves fundamental frequency removes most of the
harmonics.
To obtain the highest fidelity sine
waveform from a PSoC switchedcapacitor bandpass filter, use the
highest possible oversampling ratea
factor of approximately 33or 33
steps per sine-wave cycle. The resultant sine wave is smooth enough to
drive an LVDT, which attenuates
any residual higher order harmonics.
Scaling the PSoCs internal voltage
reference with a programmable-gain
amplifier provides coarse control over
the square waves amplitude before it
undergoes filtering. To compensate
for the waveforms dc-offset voltage,
an amplifier buffers the 2.6V internal
analog-ground reference and drives an
output pin that serves as the LVDTs
analog-ground return.

106 EDN | october 26, 2006

The LVDTs output consists of a


variable-amplitude sine-wave voltedn061026di39242
age whose
phase angleDIANE
with respect
to the sine-wave excitation voltage
undergoes a significant and variable
shift that sometimes exceeds 1808. A
signal from the LVDT drives one of the
PSoCs programmable-gain amplifiers,
whose output feeds a switched-capacitor lowpass filter followed by a modulator for synchronous rectification.
The rectified signal drives an output
pin and one of the PSoCs switchedcapacitor ADCs.
Applying the LVDTs output to a
synchronous rectifier followed by a
lowpass filter produces a dc voltage
that can feed an ADC or directly drive
an analog feedback-control system.
In a PSoC microcontroller, a lowpass
switched-capacitor filter connected to
an ADC requires that the same sample
clock drive both circuits, resulting in a
conversion rate for the PSoCs 11-bit
delta-sigma ADC thats approximately
one-half of the lowpass filters corner
frequency. Synchronous rectification
produces a ripple frequency twice that
of the excitation frequency and thus is
easier to remove with a lowpass filter.
Relocating the lowpass filters corner
frequency to one-third of the excitation frequency allows measurements of
the LVDTs output to 11-bit resolution

with a standard deviation of 1 LSB


(least significant bit) or less.
Dividing the PSoCs 24-MHz internal system clock with logic blocks
configured as counter chains generates all of the digital clock signals
the switched-capacitor analog-circuit
blocks require. After power application
or a reset, the PSoCs CPU configures
all the configured analog and digital blocks and starts their operation.
From then on, the hardware excites
the LVDT and measures its output at
500 samples/sec without further intervention by the CPU. With the PSoCs
CPU running at 12 MHz, processing
the ADCs housekeeping activities
and interrupts consumes less than 3%
of the CPUs resources.
Plenty of the PSoCs resources
remain available for calculating the
LVDTs position and for displaying
the results in text format on an LCD
module. Four analog blocks, five logic
blocks, and many I/O pins remain
available to support a more demanding application. Figure 3 (next page)
shows configurable blocks that are
available for adding features.EDN
R e fe r e nce
1 Linear variable differential transformer, Wikipedia, http://en.wikipedia.
org/wiki/Lvdt.

designideas

Figure 3 You can use the unlabeled circuit blocks for expansion.

108 EDN | october 26, 2006

designideas
Single microcontroller pin senses
ambient light, controls illumination
Loren Passmore, Berkeley, CA

As in a previous Design Idea


(Reference 1), this design uses
an LED as a transducer to measure the
ambient-light level and to provide illumination. This Design Idea uses the
same principle as its predecessor but
consists of only one LED, two resistors,
one IC, and one 0.1-mF bypass capacitor. This circuit for providing ambient-light feedback requires no additional components. Despite requiring
only a few components, the circuit in
Figure 1 offers considerable flexibility
because the microprocessors software
controls the LEDs brightness and its
relationship to ambient-light levels.
For night-light applications, one mode
turns on the LED when ambient light
decreases. Conversely, for power-saving regulation of a portable devices
LCD backlight, a second mode turns
on the LED when the ambient-light
level increases.
You can download Listing 1, sample
code for this Design Idea, at www.edn.
com/061026di1. The code provides 64
levels of PWM (pulse-width-modulated) intensity control over the LEDs
brightness in either mode. In operation, one of the microprocessors multifunction pins drives the LED with a

PWM waveform for several hundred


milliseconds. After the waveforms
final cycle, the software switches the
microprocessors pin to input mode
and connects the LED to the microprocessors internal 16-bit sigma-delta
ADC. Ambient light illuminates the
LED, producing voltage, which the
ADC measures, and the microprocessor computes the PWM waveforms
parameters for the next series of illumination cycles. The cycle rates high
repetition frequency eliminates any
discernible flickering of the LED.
In the listing, when the software and
ambient-light level specify that the
LED should turn off for an extended
interval, the CPU goes into a lowpower state for 250 msec. During its
sleep mode and for a few hundred
microseconds while performing ADC
conversions, the circuit draws only
about 20 mA and thus suits itself well
to battery-powered-system applications.
At start-up, the microprocessor
stores an initial voltage level, which
the LED produces, and uses this value
to scale the PWM levels. Shading
the LED or moving the circuit into a
darker area immediately increases the

LEDs brightness, which the listings


64 PWM levels control in small steps.
The MSP430F2013s ADC presents
input impedance of approximately 200
kV. When driving this impedance, an
LED occupying a small, 0805, surface-mount footprint generates only
a few 10s of millivolts. However, the
MSP430F2013s 16-bit ADC resolves
the LEDs voltage with sufficient resolution to ensure good performance
under normal room-lighting levels.
In addition, the MSP430F2013
includes a four-level PGA (programmable-gain amplifier), offering gains
of one, four, eight, and 16 to further
amplify the LEDs minuscule output
voltage. The circuit also exploits the
microprocessors onboard low-frequency clock oscillator, which allows
low-powered operation without an
external crystal. The resultant circuit
includes only six components, including a battery. Note: The code can
execute on Texas Instruments (www.
ti.com) eZ430 demonstration board
without hardware modifications
because the board includes an LED
connected to port P1.0.EDN
R e fe r e nce
1 Myers, Howard, Stealth-mode
LED controls itself, EDN, May 25,
2006, pg 98, www.edn.com/article/
CA6335303.

VCC
C1
100 nF
R1
330

1
P10

D1
GREEN
LED

2
3
4
5
6
7

NOTE: IC1S PINS WITH

VCC

GND

P1.0
P1.1
P1.2

XIN
IC1
MSP430F2013

XOUT
TEST

P1.3

RST

P1.4

P1.7

P1.5

P1.6

R2
47k

14
13
12
11
10

SBWTDIO

9
8

INDICATE NO CONNECTION.

Figure 1 An LED, a microprocessor, two resistors, and one capacitor constitute the entire circuit.

edn061026di39391

110 EDN | october 26, 2006

DIANE

designideas
Hartley oscillator requires
no coupled inductors
Jim McLucas, Longmont, CO

Editors note: EDN originally


ran this Design Idea in its June
22, 2006, issue. However, due to a number of schematic and textual errors, we
have decided to run a corrected, up-todate version here. We apologize for the
errors and hope this version clears up
any and all confusion.
Examine a traditional Hartley oscillator circuit, and youll note its trademark: a tapped inductor that determines the frequency of oscillation and
provides oscillation-sustaining feedback. Although you can easily calculate the total inductance required for a
given frequency, finding the coupling
coefficient, k, poses technical difficulties and may require experimental
optimization, also referred to as the
cut-and-try method. This Design
Idea presents an alternative equivalent
circuit that allows you to model the
circuit before building the prototype.
Figure 1 shows the Hartley oscil
lators equivalent tuned circuit
and component values for an 18MHz oscillator. The mutual induct
ance is LM=k=L13L2. For the equiv
alent circuit, the equations are:
LA=1LM, LB=L21LA=L2+LM, and LC=
L11LA=L1+LM. The rest of the equa
tions for the equivalent circuit are:

and

Unfortunately, a truly equivalent


circuit requires a negative inductance,
LA. However, for frequencies near the
resonant frequency f0, you can replace
the negative inductor with a capacitor
as (Figure 1c), where CA replaces
LA. Note that the equivalent circuits
derivation neglects parasitic winding
resistances and capacitances.
Figure 2 illustrates an oscillator and
output buffer using the equivalent
circuit. When constructed, the circuit
generally performed as expected from
an initial Spice simulation. During
testing, several components values
required tweaking, and multiple
iterations of Spice analysis ultimately
yielded the final design.
The oscillators tank circuit consists of
LB, LC, C4, and C5, plus the capacitance
provided by the voltage divider C6, C7,
and C8approximately 6 pF, including
Q1s and Q2s input capacitances and
some stray capacitance. The total tank
capacitance of 66 pF approximates the
calculated value of 67 pF. Capacitors
that connect to the tuned circuit
feature ceramic-dielectric construction
with NP0 temperature coefficients.
Inductors LB and LC consist of aircore coils mounted with their axes at
right angles to each other to minimize
stray coupling. However, vibration

L2
815 nH
C
67 pF

k=0.250
LM=92.5 nH

LB
907.5 nH
C
67 pF

LA
92.5 nH
LC
260.5 nH

L1
168 nH

(a)

affects their inductances, and, in a


final design, both should consist of
windings on dielectric cores or on
toroidal cores, providing that the
toroids temperature coefficients of
inductance are acceptable for the
intended application.
The information in Reference
1 provided basic designs for both
inductors, and adjusting the spacing
of their turns tuned the oscillator to
exactly 18 MHz. For a more rigorous
design, you can measure the inductors
before installation, but parasitic effects
may require some adjustment of the
inductors.
The capacitive voltage divider, C6,
C7, and C8, applies the proper signal
levels to Q 1 and Q 2. Because the
dividers effective capacitance as seen
by the tank circuit amounts to only
6 pF, you can replace the remaining
60 pF consisting of C4 and C5 with a
variable capacitor if the design calls for
a tunable oscillator. In this example,
the output stage consisting of Q3
and its associated components would
require modification to provide more
bandwidth if the oscillator requires a
tuning range exceeding 62 MHz.
Capacitor C 3 bootstraps Q 1 s
Gate 2 to its source, which provides
additional gain and reduces Q1s Gate
1 input capacitance below its alreadylow value of approximately 2.1 pF
(Reference 2). An 8.3-mH inductor,
L 2, of less than 2V dc resistance
connects to Q1s source and presents a
relatively high impedance at 18 MHz
and provides a dc path from Q1s source
to ground through R3. At 18 MHz, L2
has an impedance that consists of an
inductive reactance of about 940V

(b)

LB
907.5 nH
C
67 pF

CA
845 pF
LC
260.5 nH

(c)

Figure 1 A traditional Hartley oscillators resonant circuit consists of a tapped inductor and resonating capacitor (a).
Allowing for mutual coupling between windings produces an equivalent circuit containing a negative inductance (b).
Replacing the negative inductance with a capacitor yields an easily modeled equivalent circuit (c).

112 EDN | october 26, 2006

edn060608di38541

DIANE

designideas
L1
8.3 H

9.5V
2%

C1
0.01 F

NOTES:
L1, L2: SIX TURNS AWG #22 WIRE ON A FAIR-RITE 2643002402 CORE.
L3: FIVE TURNS AWG #26 WIRE ON A CWS BYTEMARK FT-23-61 CORE.
LB: 11 TURNS AWG #22 WIRE AIR CORE, 0.450-IN. AVERAGE DIAMETER, LENGTH=0.450 IN.
LC: SEVEN TURNS AWG #22 WIRE AIR CORE, 0.300-IN. AVERAGE DIAMETER, LENGTH=0.275 IN.
AVERAGE DIAMETER IS THE DIAMETER OF THE CORE PLUS ONE WIRE DIAMETER.
D1
1N4370A

C2
0.01 F
D

R1
10k

G2

CA=680 pF+150 pF+15 pF=845 pF.


TANK

C4
27 pF

OUTPUTLEVEL
ADJUSTMENT
R15
5k
R16
3.01k

C5
33 pF

LB
0.9075
H

C6
10 pF

LC
0.2605
H

CA
845 pF

C3
560 pF

C18
4.7 F

C19
0.22 F

C10
0.01 F

R4
4.3k

Q1
S BF998

C7
18 pF

R5
47k

C12
0.01 F
Q2
BF998
D
G2
G1
S

R2
C8
39 pF 100k

CONTROL VOLTAGE
R17
73.2k

G1

R6
10k

C9
0.01 F

R3
39

D2
SD101C

D3
SD101C

R18
43.2k
C20
220 pF

L2
8.3 H

C13
0.01 F

R8
22

R7
27k

C11
220 pF

C21
220 pF

R9
220

R11
13k

C15
0.01 F

R12
22
C16
240 pF
OUTPUT

L3
620 nH

C17
200 pF

Q3
2N3904

LOAD
R19
50

C14
560 pF
R13
10k

R14
220

R10
220

Figure 2 This buffered-output, 18-MHz oscillator features a resonant circuit that doesnt rely on mutual coupling for
operation.

in parallel with a resistance of about


3.5 kV, which results in a very-low-Q
choke. Provided that its inductance
and reactance approximate L2s original
values, you can substitute a physically
smaller inductor for L2. Inductor L1s
properties are less critical, but it should
present a low Q of 4 to 6 and a dc
resistance of approximately 5V or less.
You can use a standard-value choke for
L1 if it meets these requirements.
Source follower Q2 drives the output
stage, which uses a pi-matching
network to transform the 50V output
load to 285V at the collector of Q3.
Bootstrapping Q2s Gate 2 by onehalf of the stages output voltage
increases the source followers gain and
dynamic range and reduces its input
capacitance.
You can use potentiometer R15 to
adjust the circuits output level from
about 0.9V p-p to approximately 1.5V
p-p across a 50V load. At a constant
room temperature of about 238C, the
frequency remains stable, and the
circuitry that controls output level
remains stable even with no load on
the output. For a fixed-frequency

114 EDN | october 26, 2006

application, the output circuits loaded


Q of 4 provides adequate bandwidth to
eliminate retuning of the output circuit
for small changes in frequency.
To set the output level to a safe
edn060608di38542
DIANE
maximum,
connect a 50V
load to the
output, and then adjust the output to
1.5V p-p. The drain-to-source voltage
applied to Q1 will remain at a safe
level for all loads from 50V to no
load, even though the output-voltage
level increases as the load resistance
increases. To avoid exceeding Q1s
specified maximum 12V drain-tosource-voltage rating, do not exceed
an output-voltage setting of 1.5V into
a 50V load. Note that zener diode D1
reduces Q1s drain voltage to provide
an additional safety margin.
In a previous Design Idea, an
operational amplifier and a dioderectifier circuit set the oscillators gain
through a control voltage applied
to Q1s Gate 2 (Reference 3). In
this design, a simple passive circuit
serves the same purpose. A portion
of the signal at Q3s collector drives
a voltage doubler consisting of D2,
D3, C20, and C21. Part of the negative

voltage developed by the voltage


doubler drives the junction of R18 and
C19, the control-voltage node, which
also receives a positive voltage from
variable resistor R15 through R17, and
the resultant voltage sets the output
signal level. At start-up, only a positive
voltage is present at Q1s Gate 2, and
Q1s maximum gain easily starts the
oscillator. When the output reaches
a steady state, the control voltage
reduces and maintains oscillation at
the signal level determined by the
output level control.EDN
R e fe r e nce s
1 Reed, Dana G, Editor, Calculating
Practical Inductors, ARRL Handbook
for Radio Communications, 82nd Edition, American Radio Relay League,
2005, pg 4.32.
2 Practical FET Cascode Circuits,
Designing with Field-Effect Transistors, Siliconix Inc, 1981, pg 79.
3 McLucas, Jim, Stable, 18-MHz
oscillator features automatic level
control, clean-sine-wave output, EDN,
June 23, 2005, pg 82, www.edn.com/
article/CA608156.

designideas
Edited By brad thompson
and Fran Granville

readerS SOLVE DESIGN PROBLEMS

LED senses and displays


ambient-light intensity

D Is Inside

Dhananjay V Gadre and Sheetal Vashist,


ECE Division, Netaji Subhas Institute of Technology, New Delhi, India

In addition to their customary


roles as indicators and illuminators, modern LEDs can also serve
as photovoltaic detectors (references
1 and 2). Simply connecting a red
LED to a multimeter and illuminating
the LED with a source of bright light,
such as a similar red LED, produce a
reading of more than 1.4V (Figure
1). One model for a reverse-biased
LED comprises a charged capacitor that connects in parallel with a
light-dependent current source (Reference 1). Increasing the incident
light increases the current source and
more rapidly discharges the equivalent
capacitor to the supply voltage.
Figure 2 shows a method of using an
LED as a photovoltaic detector. Connecting one of the microcontrollers
outputs, Pin 2, to the LEDs cathode
applies reverse bias that charges the
LEDs internal capacitance to the supply voltage. Connecting the LEDs
cathode to Input Pin 3 attaches a
high-impedance load to the LED. Illuminating the LED generates photocur-

rent. Originally charged to the supply


voltage, the LEDs internal capacitance discharges through the photocurrent source, and, when the voltage on the capacitor falls below the
microcontrollers lower logic threshold voltage, Pin 3 senses a logic zero.
Increasing the incident-light intensity
more quickly discharges the capacitor,
and lower light levels decrease the discharge rate. The microcontroller, an
Atmel AVR ATtiny15 (www.atmel.
com/dyn/products/product_card.
asp?part_id=2033), measures the time
for Pin 3s voltage to reach logic zero
and computes the amount of ambient
light incident on the LED. In addition, the microcontroller flashes the
same LED at a frequency proportional
to the incident lights intensity.
Figure 3 shows a 3-mm, superbright-red LED, D1, from Everlight
Electronics Co Ltd (www.everlight.
com), which comes in a water-clear
encapsulant as an ambient-light sensor. Having only four components,
the circuit operates from any dc-

128 AC line powers microcontroller-based fan-speed regulator


130 Simple circuits sort out the
highest voltage
EWhat are your design problems

and solutions? Publish them here


and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
power source from 3 to 5.5V. The
circuit uses only three of six of the
AVR ATtiny15s I/O pins, and the
remaining pins are available to control or communicate with external
devices. The sensor LED connects to
the AVR microcontrollers port pins
PB0 and PB1; another port pin, PB3,
produces a square wave with a frequency proportional to the incidentlight intensity. The circuit operates by
PIN 1

LED
MICROCONTROLLER

VCC
PIN 2

INPUT

PIN 3

DIGITAL VOLTMETER

RED LED
AS SENSOR

RED LED
AS EMITTER

Figure 1 Two identical LEDs, closely spaced in a light-shielded housing, form


a photovoltaic-characterization fixture. Choose resistor R and voltage source V
to apply nominal forward current to the illuminating LED.

edn061109d839801

Figure 2 Connecting one of the


microcontrollers outputs, Pin 2, to
the LEDs cathode applies reverse
bias that charges the LEDs interedn061109di39802
DIANE
nal
capacitance to the
supply
voltage. Connecting the LEDs
cathode to Input Pin 3 attaches a
high-impedance load to the LED.
(Note that pin numbers are representative only and not actual pin
numbers.)

DIANE

november 9, 2006 | EDN 125

designideas
VCC
3 TO 5.5V

VCC

C1
10 F
16V

PB3

IC1 PB1
ATTINY15
4

GND

PB0

SQUARE-WAVE
OUTPUT
(FOUT)

3
R1
100

D1
5

Figure 3 An LED doubles as a light-level sensor. Output PB3 delivers a


square wave whose frequency increases as light intensity increases.
120
100

edn061109di39803

DIANE

80
IC1 PIN 3
OUTPUT
FREQUENCY
(Hz)

60
40
20
0

0.5

1.5

2.5

ILLUMINATING LED FORWARD CURRENT (mA)

Figure 4 The frequency of the circuits square-wave output exhibits good


linearity versus light level for identical sensor and source LEDs.

resistors and repeat the measurements.


For a representative LED under constant illumination and shielded from
stray ambient light, we measured a
photocurrent of approximately 25 nA
for all three resistor values. For the
same level of illumination applied to
the sensor LED, measure the frequency
generated at Pin PB3.
To calculate the LEDs reversebiased capacitance, substitute the
delay-loop time, the LEDs photovoltaic current, and the microcontrollers
logic-one and -zero threshold voltages into the equation and solve for
C, the LEDs effective reverse-biased
junction capacitance: (dV/dt)=(I/C),
where dV is the measured logic-one
voltage minus the logic-zero voltage,
dt is the measured time to discharge
the LEDs internal capacitor, and I is
the calculated value of LEDs photocurrent source. The calculated values
for the selected LED range from 25 to
60 pF. This range compares with the
data in references 3 and 4, although
Reference 3 reports only the current
sources values. You can download the
AVR microcontrollers assembly-language firmware, Listing 1, from this
Design Ideas online version at www.
edn.com/061109di1.EDN
R e fe r e nce s
Dietz, Paul, William Yerazunis, and
Darren Leigh, Very Low-Cost Sensing and Communication Using Bidirectional LEDs, Mitsubishi Research Laboratories, July 2003, www.
merl.com/reports/docs/TR200335.pdf.
2 Petrie, Garry, The Perfect LED
Light, Resurgent Software, 2001,
www.resurgentsoftware.com/perfect_
led_light.html.
3 Miyazaki, Eiichi, Shin Itami, and Tsutomu Araki, Using a Light-Emitting
Diode as a High Speed, Wavelength
Selective Photodetector, Review of
Scientific Instruments, Volume 69,
No. 11, November 1998, pg 3751,
http://rsi.aip.org.
4 Optocoupler Input Drive Circuits,
Application Note AN-3001, Fairchild
Semiconductor, 2002, www.fairchild
semi.com/an/AN/AN-3001.pdf.
1

first applying forward bias to the LED fairly linear (Reference 2). To test
for a fixed interval and thenEDN061109DI3980FIG4
applying theMIKE
circuit, couple the light output
reverse bias to the LED by changing of a second and identical LED to the
the bit sequences you apply to PB0 and sensor LED, D1, in Figure 3. Ensure
PB1. Next, the microcontroller recon- that external light doesnt strike the
figures PB0 as an input pin. An inter- sensor LED by enclosing the LEDs in a
nal timing loop measures the interval, sealed tube covered with opaque black
T, for the voltage you apply to PB0 to tape. Varying the illuminating LEDs
decrease from logic one to logic zero.
forward current from 0.33 to 2.8 mA
Reconfiguring pins PB0 and PB1 to produces a relatively linear sensorapply forward bias to the LED com- flash-frequency plot (Figure 4).
pletes the cycle. Time interval T varies
The efficiency of an LED as a sensor
inversely with the amount of ambient depends upon its reverse-biased interlight incident on the LED. For lower nal-current source and capacitance.
light, the LED flashes at a lower fre- To estimate the reverse photocurrent,
quency, and, as the incident-light inten- connect a 1-MV resistor in parallel
sity increases, the LED flashes more fre- with a sensor LED and measure the
quently to provide a visual indication of voltage across the resistor while applythe incident-light intensity.
ing a constant level of illumination
For low values of forward current, from an external source. Replace the
an LEDs light-output intensity is 1-MV resistor with 500- and 100-kV

126 EDN | november 9, 2006

designideas
AC line powers microcontrollerbased fan-speed regulator
Abel Raynus, Armatron International Inc, Malden, MA

A microcontroller requires
stevedc
operating power in the 2 to
5.5V range, an amount that a battery
or a secondary power source can easily
supply. However, in certain situations,
a microcontroller-based product must
operate directly from a 120 or 220V-ac
power outlet without a step-down transformer or a heat-producing, voltagedecreasing resistor. As an alternative,

120V
AC

C1
2 F
250V

R1
51

a polyester/polypropylene FIGURE
film capaciEDN061026DI3912
1

tor rated for ac-line service can serve


as a nondissipative reactance (Figure
1). Capacitor C1, a 2-mF AVX (www.
avxcorp.com) FFB16C0205K rated for
150V rms, provides a significant acvoltage drop that reduces the voltage
you apply to a diode-bridge rectifier,
D1. A flameproof metal-film resistor,
R1, limits current spikes and transient

voltages induced in the ac-power line


by lightning strikes and abrupt load
changes. In this application, the ac
current does not exceed 100 mA rms,
and a 51V, 1W resistor provides adequate current limiting. R2, a 5W, 160V
Yageo (www.yageo.com) type-J resistor,
and D2, a 1N4733A zener diode, provide 5V regulated power for the microcontroller, a Freescale (www.freescale.
com) C68HC908QT2.
The schematic shows a representative circuit for a microcontrollerbased fan-speed regulator in which
a thermistor senses air temperature
and the microcontroller drives a

DC LOAD
R2
160
5W
D1
KB152

DC LOAD

C2
100 F

R4
10k

120V
AC RETURN

FIGURE 2

3
IC1
2
MC68HC908QT2 7

D2
1N4733A

COOLING
FAN

TH
steve EDN061026DI3912
1

+
_

Q1
IRF520

R3
100k

LED

Figure 1 C1 provides capacitive reactance, which limits ac-input current without dissipating excessive heat in this dc fanspeed controller.

AC LOAD
120V
AC

R1
51

C1
3 F
250V

D2
1N4003

+
D1
1N4003

120V
AC RETURN

R2
330
5W

C2
100 F

AC LOAD

D3
1N4733A

R4
20k

1
2

PR1
VT90N1

R3
470

IC1
MC68HC908QT2 7
8

2
3

Q1
1 LZ004F31

LED
D4

Figure 2 A two-diode rectifier and lamp-control bidirectional thyristor share a common return path to the ac line.

128 EDN | november 9, 2006

designideas
fans motor. Figure 2 illustrates a
light-intensity regulator based on an
inexpensive two-diode rectifier and
a bidirectional-thyristor-lamp controller that share a common ground.

120V
AC

IC2, a Fairchild (www.fairchildsemi.


com) MOC3021-M bidirectionalthyristor-driver optoisolator, separates the lamp-return path from the
microcontrollers ground return (Fig-

ure 3). In each of the three circuits,


the Kingbright (www.kingbright.com)
W934GD5V0 LED indicator includes
a built-in current-limiting resistor
(not shown).EDN

AC LOAD

C1
R1 2 F
51 250V

D1
KB152

+
_

C2
100 F

AC LOAD

R4
180

R2
160
5W

D3
1N4733A

120V
AC RETURN

R4
20k
2

1
3

IC1
MC68HC908QT2 7

PR1
VT90N1

R3
470

3
6

1
LED

Q1
1 L2004F31

4
IC2
MOC3021M

Figure 3 An optoisolator separates the bidirectional thyristors high-current ac-line return path from the microcontrollers power supply.

Simple circuits sort out


the highest voltage
Ezio Rizzo, Nova SNC, Genoa, Italy, and
Vincenzo Pronzato, Felmi SRL, Genoa, Italy

In a water-cooled power converter, analog-output sensors


measure the cooling water temperature at three locations. If any of the
three temperatures rises above a preset threshold, an alarm sounds and
attracts the attention of the systems
operator. When the alarm activates,
knowing which measurement site has
reached the highest temperature saves
troubleshooting time and prevents
system damage. The circuit in Figure
1 delivers an analog-output voltage
equal to the highest of three input
voltages that drives a display for continuous temperature monitoring. LED
indicators identify which of three sensors shows the highest temperature.
An external adjustable-threshold
comparator (not shown) monitors the

130 EDN | november 9, 2006

analog-voltage output and activates


an audible alarm.
Each of three analog input signals
spans a range of 0 to 10V. Driven by
the highest-voltage input, which you

The circuit delivers


an analog-output voltage equal
to the highest of
three input voltages that drives a
display for continuous temperature
monitoring.

apply at IN1 in this example, operational amplifier IC1A functions as a


voltage follower with diode D1 in its
feedback path. The op amps openloop gain divides the diodes forwardvoltage drop to a fraction of its nominal value, producing an ideal diode
with a voltage drop of millivolts.
Op amps IC1B and IC1C function as
high-input-impedance inverting comparators. Each sees the highest input
voltage on its inverting input and one
of two lower input voltages, IN2 and
IN3, on its noninverting input and
delivers an output voltage near that
of the negative-supply-voltage rail.
Thus, only IC1A delivers a positivevoltage output to MOSFET Q1s gate,
and IC1B and IC1C deliver negative
outputs to the gates of Q2 and Q3. Q1
turns on, lighting LED D4 and drawing
approximately 5 mA to develop 11V
across R3, which guarantees that Q2
and Q3 and their corresponding LEDs
remain off. The voltage that develops
across R1 represents the largest voltage
of the three inputs, and resistor R4 and

designideas
capacitor C1 form a lowpass filter that
reduces high-frequency noise that the
sensor cables pick up. Voltage follower
IC1D buffers the filters output voltage.
Figure 2 (pg 136) shows the results of
an LTSpice simulation featuring three
sinusoidal inputs and the resultant
analog output summed with a small
dc-offset voltage for clarity.
The breadboarded circuit works as
designed. Given its electrically noisy
location near a 300-kHz, 30-kW
switched-mode power converter, it

uses slow-switching 1N4004 diodes to


avoid malfunctions, which the rectification of stray high-frequency interference introduces. In less noisy environments, use any small-signal diode
whose peak-inverse voltage exceeds at
least 30V. Most varieties of operational
amplifiers work well in the circuit, but
for greater high-frequency immunity,
use a JFET-input quad op amp, such
as Texas Instruments (www.ti.com)
TL084.
Although the circuits prototype

uses red-LED indicators, LEDs of other


colors work well. To change the LEDs
current to another value, change the
values of R2 and R3, keeping approximately the same 3-to-2 ratio. For
example, values of 1.8 kV for R2 and
1.2 kV for R3 drive the on LED with
approximately 10 mA. If you increase
the LED current, note that the resistors continuously dissipate power. For
greatest reliability, choose resistors
rated for twice the calculated power
dissipation.EDN

15V
R2
3.3k
D4
3-mm
RED
LED

15V

IN1

4
IC1A
LM324

D1
1N4004

Q1
2N7000

2 _

11

D5
3-mm
RED
LED

15V

IN2

IC1B
LM324

D2
1N4004

Q2
2N7000

6 _

D6
3-mm
RED
LED

IN3

10

IC1C
LM324

D3
1N4004

Q3
2N7000

9 _

12

R1
22k

15V

R3
2.2k

R4
22k

C1
10 nF

IC1D
LM324
13 _

14

15V

Figure 1 This circuits output voltage tracks and indicates the highest of three input voltages and can drive an external
strip-chart recorder or alarm comparator.

132 EDN | november 9, 2006

OUT

designideas

Figure 2 Three sine waves of different frequencies provide input voltages (lower traces) that evoke the greatest-of-three
response in the current through R2 (top trace, in which colored horizontal segments match the largest inputs).

136 EDN | NOVEMBER 9, 2006

designideas
Edited By brad thompson
and Fran Granville

readerS SOLVE DESIGN PROBLEMS

Chopper-stabilized amplifier
cascade yields 160 to 10,240
programmable gain

D Is Inside
76 Current-mode instrumentation
amplifier enhances piezoelectric
accelerometer
78 Low-cost RF sniffer finds
2.4-GHz sources

Jerome E Johnston, Cirrus Logic Corp, Austin, TX

Certain medical and scientific


instrumentation applications
require amplification and measurement of microvolt-level signals. For
example, accurately measuring the
output of a thermopile-based microcalorimeter demands an amplifier that
achieves high gain and exhibits excellent thermal stability and low noise.
Figure 1 illustrates how combining
two amplifiers yields a programmablegain amplifier that provides selectable
gains of 160 to 10,240. The circuit also

offers typical offset voltage of 5 mV, offset drift of 20 nV/8C, and equivalent
input-noise voltage of 9 nV=Hz at 0.1
Hz. IC1, a Cirrus Logic (www.cirrus.
com) CS3301 low-voltage, differential-input, differential-output, chopperstabilized programmable-gain amplifier,
serves as an input-amplifier stage and
drives IC2, a higher voltage INA114
instrumentation-amplifier output
stage. The CS3301 provides seven programmable gains of one to 64, and the
INA114 provides a fixed gain of 160.

IN2

INA+

INB+

The combination achieves gains of 160


to 10,240. A thermopile produces a 1mV signal, yielding 10.24V output from
the INA114. To select other values of

16
VA

EWhat are your design problems


and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.

3.3V

2.5V
1

IN1

80 Triangle waves drive simple


frequency doubler

IC1
CS3301

VD

680

MULTIPLEXER 0

10

R1
1k

680

11

15V

400
GAIN0
TO MICROCONTROLLER 24
OR DIPSWITCH 23
INPUT
SELECT

GAIN1

GAIN2

TO MICROCONTROLLER
OR DIPSWITCH
GAIN
SELECT
C1
0.1 F

400
680

IN1
IN2

INA

INB

MULTIPLEXER 1

R3
316

5 13

2
IC2
INA114
15
10

4 7

11
OUTPUT

15V

R2
1k

680
3

LPWR PWDN DGND

12

18

19

15 13

17

14

VA
2.5V

Figure 1 Combining a programmable-gain, chopper-stabilized amplifier with an instrumentation amplifier delivers high gain
and low noise over a subaudible frequency range.

edn061109di39861

DIANE

november 23, 2006 | EDN 75

designideas
gain, change the value of the INA114s
gain-setting resistor, R3.
External DIP switches and pullup resistors, which connect to the
3.3V supply (not shown), program
the CS3301s gain- and multiplexercontrol pins. A microcontroller that
can drive 3.3V logic can also control
these control inputs. Connecting the
CS3301s outputs and the INA114s
inputs, an RC lowpass filter composed
of R1, R2, IC1s output resistors, and C1
limits noise above 500 Hz.
Figure 2 illustrates the combined
amplifiers measured input-referred
noise performance at a gain of 10,000.
With its 1/f noise corner at 0.08 Hz,
the amplifier cascade achieves an
equivalent input-noise voltage of
about 9 nV=Hz at 0.1 Hz. The noiseversus-frequency plot represents the
results of FFT processing of more than
2 million output samples over an 18-

Figure 2 A three-octave plot displays the cascaded amplifiers low equivalentinput-noise voltage versus frequency.

hour period. For simplicity, the schematic doesnt show power supplies and
bypass capacitors. Due to the circuits
extreme amplification factor, use con-

Current-mode instrumentation
amplifier enhances
piezoelectric accelerometer
Dave Wuchinich, Modal Mechanics, Yonkers, NY

A typical piezoelectric sensor comprises a disk of PZT5A ceramic material with metallized
electrodes on its surfaces. Applying

electrically conductive epoxy to the


electrodes connects external wiring
to the sensor. An insulating adhesive
attaches the assembly to the struc-

PIEZOELECTRIC-SENSOREQUIVALENT CIRCUIT

ES/2
VCM

R1
10M

ES/2

ei

ture under test and isolates the sensor


from ground-referenced potentials.
The disk faces the direction of the
expected acceleration. When you
mount the piezoelectric disk on a target structure, it serves as a simple force
sensor and accelerometer by producing a voltage thats directly proportional to the force acting parallel to
the disks direction of polarization. A
piezoelectric disks capacitive impedance presents a large reactance at
R3
10k

VSS

7
IC1
2 INA121

4
3

CS

struction techniques that maintain


thermally balanced component placement and electrically balanced pctrace lengths.EDN

1 V
SS

R4
10k

6
8
RG
100

eoAei

VSS
2

7
IC2
TL081
3

eO
6

VSS
C1
0.1 F

R2
10M
R5
10k

VSS
2

7
IC3
TL081
3
4

E
6

VSS

Figure 1 Three amplifiers and a handful of passive components suppress stray noise pickup on a piezoelectric accelerometer and its wiring.

76 EDN | november 23, 2006

edn061123di39941

DIANE

Equations for DI3994

designideas
low frequencies, making the disk and
its wiring susceptible to interference
that surrounding electrical equipment
and power lines produce. Placing the
sensor in a remote location requires
shielded interconnecting cable, but
even shielding is not entirely effective
in removing common-mode signals
because noise pickup can still occur at
the disks conductive surfaces.
One method of extracting the sensors signal employs an instrumentation amplifier, which amplifies only
the potential the sensor produces; the
amplifier rejects common-mode-coupled noise potential that appears on
each of the sensors terminals.
A typical miniature piezoelectricdisk sensor thats 0.125 in. in diameter
and 0.0075 in. thick presents a capacitance of approximately 500 pF. If the
measurement application requires a
dynamic response to force excitation
frequencies of 10 Hz or below, the
sensors output reactance ranges into
the tens of megohms. The circuits
pc-board insulating substrate and
ambient humidity impose a practical
limit of approximately 10 MV on the
amplifiers input resistance.
You must carefully choose insulation
and apply guarding potentials, and you
must use an amplifier with picoampere
input-bias currents. Otherwise, the
sensors capacitance and the amplifi-

ers input-bias-current resistors impose


a phase shift on the signal you apply
to the instrumentation amplifier. To
eliminate guarding and elaborate
insulation requirements, the circuit
in Figure 1 uses an instrumentation
amplifier with feedback to measure
Equations
for DI3994
the sensors
short-circuit
current and
not its open-circuit voltage. VCM, the
common-mode voltage between the
sensor and the signal ground, results
from nearby noise sources resulting
from stray
capacitive
coupling. The
Equation
1
following equation relates the sensors
output current, i, and its open-circuit
output voltage, ES:

2A + 1
E ,
i=
S

(2A + 1)
2R +

jC S

where A represents IC1s voltage gain,


and R5R15R2 in Figure 1. Resistors
R1 and R2 provide feedback and inputbias-current-return paths for IC1, an
Equation
2
INA121
instrumentation
amplifier,
and resistor RG sets the amplifiers
gain. The INA121s input-bias-offset
current of 0.5 pA produces 5 mV of
RCacross
E its 10-MV feedvoltage offset
E = S S .
back resistors.
an amplifier gain
C(RAt
5)
of 500, IC1s output offset amounts to
2.5 mV. Amplifier IC2, a TL081, provides unity-gain signal inversion.

Low-cost RF sniffer finds


2.4-GHz sources
Vladimir Dvorkin, Linear Technology Corp, Milpitas, CA

Whether you measure or use


RF circuits that operate in
the popular 2.4-GHz ISM (industrial/scientific/medical) band, cordless telephones, Wi-Fi access points,
Bluetooth devices, and microwave
ovens can radiate RF signals, causing
unwanted interference. A spectrum
analyzer remains the instrument of
choice for detecting and identifying
interference sources, but analyzers are
expensive, bulky, and sometimes not
readily available.
The circuit in Figure 1 shows an
easily assembled, low-cost, and porta78 EDN | november 23, 2006

ble RF sniffer that provides a quick


and reliable reading of the ambientRF-signal level in the 2.4- to 2.5GHz frequency band. At the circuits
heart, a Linear Technology (www.
linear.com) general-purpose LT5534
RF-power detector, IC 1, measures
RF-signal strengths from 255 to 25
dBm and provides an RSSI (receivedsignal-strength-indicator) dc-output
voltage (Reference 1).
An antenna for this frequency band
drives FL1, a Toko (www.toko.com) filter (Part No. TDFU2A-2450T-10A),
which restricts the circuits passband

If 2A11..2RjvC S , then i>


Equation 1
jvCSES, and amplifier IC1s input voltage, VI, vanishes because the amplifiers input terminals act as a virtual
short circuit across the sensor. Taking

loop
the sum of voltages
around the
instrumentation
and
comprising the
2A + 1

E ,
i
=
inverting amplifiers
output, the
S two

(2A + 1)
2R and

feedback resistors
+ the instrumen
jC S terminals,

tation amplifiers
input
whose potential difference is zero,
yields eO5jvRCES, where eO represents IC1s output and also the negative value of IC2s output.
An operational-amplifier-based
Equation 2
integrator, IC3, delivers the value for
ES at IC3s output, E9 in the following
equation.
RC E
E = S S .
C(R 5)

For the component values in Figure


1, IC1 provides a gain of 500. Resistors R1 and R2 are equal at 10 MV,
and the piezoelectric sensors capacitance measures 500 pF. For the highest frequency of interest, 10 Hz, the
quantity 2RvCS50.6,,2A115501
and the sensors output, ES, appear
without phase error as E9. This circuit can measure quasistatic force
changes; the circuits ability to sustain a charge on C1 imposes the ultimate limit on the circuits frequency
response.EDN

to 2.4 to 2.5 GHz and limits out-ofband interference. The filter drives
IC1, whose internal circuitry comprises
a cascade of RF detectors and limiters.
The detectors and limiters summed
outputs generate an accurate logarithmic-linear voltage proportional to the
RF input in decibels. A single discrete
transistor, Q1, converts IC1s RSSI
output to a current that drives a lowcurrent-LED signal-strength indicator.
You can connect a digital voltmeter to
IC1s RSSI output to provide a digital
readout of signal strength or rely on
the lighted LED to visually indicate
an RF signal. Two 1.5V alkaline batteries or three nickel-cadmium cells
provide 3V power for the circuit.
The LT5534s frequency range of
50 MHz to 3 GHz covers the VHF,
UHF, 800-MHz-cellular-telephone,

designideas
902- to 928-MHz-ISM, 2-GHz-PCS
(personal-communications-system)/
UMTS (Universal Mobile Telecommunications System), and 2.4-GHzISM bands. For the 2.4- to 2.5-GHz
range, use a Laird Technologies (www.
lairdtech.com) BlackChip antenna or
a Toko dielectric antenna (Part No.
DC2450CT1T). To build a sniffer for
the 915-MHz band, replace the antenna with Part No. ANT-916-JJB-ST
from Antenna Factor (www.antenna
factor.com) and replace the input
filter with a Toko 4DFA-915E-10
ceramic filter that provides 26 MHz of
bandwidth centered on 915 MHz.EDN
R e fe r e nce
1 LT5534 data sheet, Linear Technology, www.linear.com.

VCC
3.6V

FL1 RF
ANTENNA BANDPASS
FILTER
TDFU2A-2450T-10A

EN

80 EDN | November 23, 2006

D1
MMBT3904
Q1
180

RF DETECTORS

VOUT 1k

RSSI
OUTPUT
1 nF

2, 5

Figure 1 For best results, assemble this 2.5-GHz circuit on a double-sided pcboard layout according to the LT5534s data sheet and application notes.
edn061026di39751

DIANE

Jim McLucas, Longmont, CO


If you use a function generator,
you may occasionally require
a sine-wave output at a higher frequency than the generator can provide. If your function generator also
produces a triangle-wave output, you
can use a frequency doubler to extend
the generators available frequency by
as much as a factor of two. A previously published Design Idea describes
a triangle-wave-driven frequency-doubler circuit employing op amps that
produce output frequencies limited to
about 20 kHz (Reference 1).
This Design Idea describes a frequency doubler that provides a sinewave output with a frequency of 4 to
6.7 MHz, with an output level that
can range from 110 mV p-p to 1.30
V p-p into a 50V load. As Reference 1 describes, applying a symmetrical triangle wave to a full-wave
rectifier produces a triangle wave of
twice the input frequency and offset
by a dc level. Any asymmetry in the
input waveform allows some of the
input signals fundamental frequency
to pass through to the output. Also,

24k

IC1
RF DETECTOR LT5534

Triangle waves drive


simple frequency doubler

LED

1 F

VCC

the circuits input transformer, T1, may


cause amplitude or phase imbalance,
allowing some of the input signal to
pass through to the output.
To construct a wideband transformer with good amplitude and
phase balance, twist three AWG #30
enameled wires together at about 10
twists/in. Wind seven turns of the
bundled wires onto a Fair-Rite (www.
fair-rite.com) 2643002402 toroidal
core. (Each pass through the cores
central opening counts as one turn.)
Connect the wires as shown in Figure
1. (Refer to Reference 2 and Figure 2
for additional information on this type
of transformer.) This technique results
in a wideband transformer with good
amplitude and phase-balance characteristics.
To achieve maximum input-frequency attenuation, use a matched
pair of Schottky diodes for D1 and
D2. However, the prototype produced
high-quality signals with unmatched
Schottky diodes. In Figure 1, diode
D3 applies a small negative bias to D1
and D2 that allows operation at low

signal levels. Capacitor C1 passes the


rectified and frequency-doubled triangle wave to the bases of a complementary emitter follower comprising
Q3, Q4, and associated components. A
simple, two-element lowpass filter at
the followers output removes higher
frequency harmonics. Use any 1.6mH inductor with a Q of 20 or greater
for L1. Although an inductor with a
Q as low as 10 will not noticeably
change the filters frequency response,
a value lower than 20 increases the
inductors insertion loss and decreases
the maximum available output-signal
amplitude.
A simple, two-element, lowpass
output filter provides adequate performance for a symmetrical-trianglewave input because the outputs frequency components consist of the
doubled input frequency signal and
only the desired output signals odd
harmonics. For a 5-MHz output, the
third harmonic occurs at 15 MHz with
an amplitude of 219 dB relative to
the 5-MHz signal. The lowpass filter
imposes 15 dB more attenuation at 15
MHz, diminishing the 15-MHz signal to 234 dB relative to the 5-MHz
output signal and attenuating higher
order harmonics to even lower levels.
The complementary emitter followers unfiltered output signal consists

designideas
10V

C2
0.01 F
T1: SEVEN TURNS OF #30 AWG
WIREWOUND TRIFILAR
ON A FAIR-RITE 2643002402 CORE.

SIGNAL
GENERATOR
50

R1
220

D2
SD101C

R9
15

Q4

R6
500

R2
750

INPUT
A

Q3

C1
0.01 F

C5
L1: EIGHT TURNS OF #28 AWG WIRE,
0.01 F WOUND ON AN AMICON FT-23-61 CORE.

2N3904

2N3906

F
E

C3
0.01 F

R4
750

D1
SD101C

T1

R5
22

R7
750

C6
0.01 F

L1
1.6 H

OUTPUT

C8
560 pF

LOAD
R10
50

0.11 TO 1.30V P-P OUTPUT


R3
1500

D3
1N914

C4
0.01 F

R8
22

C7
0.01 F

10V

INPUT-SIGNAL SPECIFICATIONS:
2- TO 3.35-MHz FREQUENCY
0.5 TO 5V P-P INPUT

Figure 1 A full-wave rectifier, buffer, and lowpass filter produce a sine-wave output at twice the frequency of a triangularwave input.

of a triangle wave of twice the input


signals frequency, plus odd harmonics
of the doubled input frequency. For
example, applying a 2.5-MHz triangle
wave to the circuits input produces
a 5-MHz triangle-wave signal at the
lowpass filters input. For a nearly perfect triangle wave, the filters input
consists of a 5-MHz fundamental and
only its odd harmonics. At 219 dB
below the 5-MHz signal, the 15-MHz

third harmonic represents the closest


DIANE
spurious signal and one that you can
easily filter.
To use the circuit at higher frequencies, divide the values of output-filter
components L1 and C8 by a factor of
F NEW/5, where F NEW represents the
desired output frequency in megahertz. For example, a nominal output
frequency of 20 MHz requires division
of the values of L1 and C8 by a factor of

edn061123di39721

E
A
C

four, producing new values of 0.4 mH


and 140 pF, respectively. Simulating
the circuit with the revised filter in
Spice shows adequate harmonic rejection over an output range of 16 to 26.8
MHz. Although designed for 5-MHz
operation, the remainder of the circuit
works well at 20 MHz without additional modifications. This frequency
doubler also accepts a sine-wave input
signal. However, the circuits unfiltered output contains higher levels
of the desired signals even- and oddorder harmonics and requires additional filtering to produce a high-quality sine-wave output.EDN
R e fe r e nce s

D
F
TRIFILAR-WOUND TRANSFORMER

Figure 2 Transformer T1 from Figure 1 consists of three windings on a toroidal


ferrite core. For ease of assembly, twist three wires of different colors into a
bundle to form the windings.

82 EDN | november 23, 2006


EDN061123DI3972FIG2

MIKE

1 Belousov, Alexander, Frequency


doubler operates on triangle waves,
EDN, March 14, 1996, www.edn.com/
archives/1996/031496/06di4.htm.
2 Demaw, MF Doug, Applying
Toroidal Cores: Ferromagnetic-Core
Design and Application Handbook,
ISBN: 0133140881, Prentice Hall,
1996, pg 97.

designideas
Edited By brad thompson
and Fran Granville

readerS SOLVE DESIGN PROBLEMS

Two-channel audio amplifier


drives stepper motor

D Is Inside

Phill Leyva and Bill Quach, Maxim Integrated Products, Sunnyvale, CA

Although relatively expensive,


monofilar-wound, bipolar stepper motors provide strong torque for
a given physical size. However, each
of the motors two windings requires
eight driving transistors connected in
groups of four in an H-bridge configuration. Each transistor must withstand
and quickly recover from overloads
and short-circuit conditions, and a
driver must consequently include
complex and large discrete-component protective circuitry.
VDD
5V

C2
1000 pF

As an alternative, Figure 1 shows a


motor-driver circuit based on Maxims
(www.maxim-ic.com) MAX9715, a
tiny, surface-mount, 2.8W Class D audio amplifier, which typically drives 4
or 8V speakers. Each of IC1s two outputs consists of a MOSFET H-bridge
that drives a pair of output lines,
OUTR1 and OUTR2 and OUTL1
and OUTL2, that connect to the
stepper motors A and B windings, respectively. Each pair delivers a differential-pulse-width-modulated signal

VDD

L1
FERRITE

14

C1
0.1 F

7
13

C3
1 F

PVDD

VDD

C4
0.1 F
PGND

GND

16

B STEP

OUTL

INL

2
BLUE
3

RED
B

IC1
MAX9715

C8
1 F

L3
FERRITE

OUTR

15 INR

A STEP

C9
1 F

STEPPER
MOTOR

10

YELLOW

OUTR+ 11

WHITE

VDD
NOTES:
L1, L2, AND L3 ARE TDK PART NO.
MPZ1608S101A.
IMPEDANCE IS 100 AT 100 MHz.
DC RESISTANCE IS 50 m,
AND MAXIMUM CURRENT IS 3A.

C5
100 F

BIAS
OUTL+

L2
FERRITE

6
5

SHDN

PVDD

GAIN
NC

PGND

12

C6
0.1 F

C7
100 F

Figure 1 A single surface-mount circuit and a few passive components can


drive a bipolar, monofilar-wound stepper motor.

edn061201di38891

DIANE

100 Active-filter circuit and


oscilloscope inspect a Class D
amplifiers output
102 Voltage-to-pulse-width converter spares microprocessors
resources
104 Precision voltage reference
delivers 80 mA
EWhat are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
with a nominal switching frequency
of 1.22 MHz. The circuits low-interference design eliminates the requirement for output-line filters.
Capacitors C1, C3, C4, and C6 provide bypassing for IC1s power input
and bias pins, and C 5 and C 7 provide bulk-holdup capacitance for
the Class D power amplifiers outputs. Capacitors C8 and C9 limit the
amplifiers input bandwidth to 16
Hz, and L 2 and L 3 suppress electrical-noise pickup by the long input
cables. Comprising C1, C2, and ferrite bead L1, a pi-section noise filter
suppresses noise on IC1s power-sup-

Table 1 A_Step and B_


Step pulse sequence

VDD
8

98 Get power from a telephone


line without disturbing it

Step

A_Step

B_Step

december 1, 2006 | EDN 97

designideas
ply input. A suitable controller feeds
digital pulses to IC 1s A_Step and
B_Step inputs, which respectively
drive the motors right and left channels. Internal short-circuit and thermal protection guards the amplifier
against overcurrent and short circuits caused by the stepper motor or
its connecting leads.
Table 1 illustrates the A_Step and
B_Step pulse sequence that rotates a
typical stepper motor in one direction by continuous application of
steps 0 through 4. Step 4 returns the
motors shaft to its starting position
and completes its 3608 rotation. To
reverse the motor, begin at the bottom of the table to reverse the pulse
pattern and work upward. You can
disable both of the amplifiers channels by applying a logic-low signal to
Pin 8, IC1s active-low SHDN input.
Figure 2 illustrates the circuits input
and output waveforms.EDN

Figure 2 Waveforms from the circuit in Figure 1 include the A_Step input (Channel 1), B_Step input (Channel 2), outputs OUTR1 (Channel 3) and OUTR2
(Channel 4), and the signal that arrives at the motors windings (OUTR1 minus
OUTR2, middle trace), which the oscilloscopes math function computes.

Get power from a telephone line


without disturbing it
Yongping Xia, Navcom Technology, Torrance, CA

An idle telephone line tempts


designers to use its 48V potential as a power source. However, Part
68 of the US Federal Communications
Commissions telecommunications
regulations states that any device that
connects to the phone line and is not
actively communicating must present

TO
PHONE
LINE

D1 TO D4

a resistance of at least 5 MV (Reference 1). To meet this requirement, a


devices continuous-current drain must
not exceed 10 mA. Fortunately, many
devices that connect to the phone
line do not require continuous power
and can remain off for long intervals,
awakening only for a short time before

R1
5.6M

Q2

S
R2
20M

IN4004

C1
1.5F
2.5V

IC1
MAX917
1

2
3

R3
20M

R4
20M

NC

NC

REF

VCC

IN+

OUT

VEE

NC

8
7

Q1

6
5

L1
22 H

G FDN304PZ

FDN339AN

C2
0.1 F

ON

FDN339AN
Q3

CONTROL
INPUTS

relapsing into power-off mode. Providing power for these applications


from the phone line presents obvious
advantages by eliminating the need for
a battery or another power source and
the cost of battery maintenance.
The circuit in Figure 1 charges
a 1.5F supercapacitor, C1, from the
phone line through a diode bridge and
a 5.6-MV resistor. A Maxim (www.
maxim-ic.com) MAX917 nanopower
comparator, IC1, consumes only 0.75
mA from its power supply. Resistors

R5
324k

OFF

6
SW IC2 VIN
LTC3459
5
GND
VOUT
4
3
FB
SHDN

R8
1M

R6
1M

C3
47 pF

C4
1 F

R7
2.2M
C5
4.7 F

5V

OUTPUT

R9
1M

Figure 1 This power-conversion circuit delivers intermittent bursts of regulated voltage from a supercapacitor charged by a
trickle of current from a telephone line.

98 EDN | december 1, 2006

edn061201di39971

DIANE

designideas
R2 and R3 halve the voltage across
C1 and apply it to IC1s positive input
voltage at Pin 3 for comparison with
its built-in 1.245V reference. For
voltages across C1 that do not exceed
2.49V, IC1s output at Pin 6 remains
low. When C1s voltage reaches 2.5V,
Pin 3s voltage exceeds the reference
voltage, and IC1s output goes high,
turning on Q1 and Q2.
Several days must elapse before C1
becomes fully charged, given its huge
capacitance and a charging current of
less than 10 mA. The voltage on C1
can never exceed 2.5V because, once
it reaches 2.49V, Q1 and Q2 turn on,
connecting C1 to a switched-modepower-supply circuit. Because the
power-supply current exceeds the

charging current, the voltage across


C1 starts to decrease when Q2 turns
on. Transistor Q3 holds Q2 on when
C1s decreasing voltage causes Q1 to
turn off.
The switched-mode-power-supply
circuit comprises a Linear Technology
(www.linear.com) LTC3459 micropower boost converter, IC2, and its
associated components, which deliver
5V at 10 mA. A fully charged C1 can
supply power to a 10-mA load for
approximately 40 sec. With no load,
the circuit can sustain its 5V output for
more than 10 hours. For greater output current and shorter operating time,
select another boost converter that can
operate at a low input voltage.
Mechanical switches, open-drain

MOSFETs, open-collector transistors,


or a microcontrollers open-drain output pins can drive two external control
inputs to force the circuit on and off.
Pulling the On input low forces Q2 to
turn on and deliver power from C1 to
the power converter, and pulling the
Off input low turns off Q2 and removes
power from the converter. Note that
the power converters output-return
line connects to the telephone line
and thus should not connect to an
earth ground or to grounded equipment.EDN
R e fe r e nce
1 Part 68, Federal Communications
Commission, www.fcc.gov/wcb/iatd/
part_68.html.

but such amplifiers also require


Active-filter circuit
and
oscilloscope
STEVE
EDN061201DI3963
FIGURE 1 new techniques for evaluation. For
consider a basic sine-wave
inspect a Class D amplifiers output example,
test of a linear amplifier. You apply

John Guy, Maxim Integrated Products Inc, Sunnyvale, CA

The increasing acceptance of


Class D amplifiers has helped
them gain market share from their

R5
8.06k

C4
1.5 nF

R1
11k
R6
11k

C3
100 pF

2
3

VDD
GND

C5
100 nF

GND

IN

C8
R10
10 F
8.06k
C11
1.5 nF

C12
100 pF

R12
8.06k

C1
470 pF

R3
22k

R4
100

R7
11k

19

18

IC1
VSS 17
MAX9727
+ 16

7
8 SHDN
9 PVDD
10 C1P

14
PVSS 13
C1N 12
PGND 11
C10
1 F

15

C7
100 nF

C6
1 F

C9
1 F

Figure 1 Use this third-order, 30-kHz filter circuit to observe a Class D amplifiers output signal on an oscilloscope.

100 EDN | december 1, 2006

OUT
GND

20

4 VDD

R11
22.1k

R2
11k

R9
22.1k

IN

R8
8.06k

C2
10 F

linear Class AB brethren. That


acceptance is no surprise; the advantages of Class D amplifiers are legion,

power, apply a sine wave of suitable


amplitude to the input, and connect
an oscilloscope probe to the output.
Youll see a replica of the input, usually offset by about half the power-

designideas
supply voltage. Even if the linear
amplifier drives a BTL (bridge-tied
load), youll still see a recognizable
replica of the input at either end of
the load, albeit at half of the output
signal thats available.
Testing a Class D amplifier poses
more difficulties. The amplifiers
output comprises a PWM (pulsewidth-modulated) signal that swings
between ground and the supply voltage at a frequency thats usually 200
kHz to 2 MHz. However, when you
view this PWM output on an oscilloscope, youll see no resemblance to the
sine-wave input.
You can observe a Class D audio
amplifiers output if you introduce
the filter circuit in Figure 1. Based
on Maxims (www.maxim-ic.com)
MAX-9727 quad-audio-line driver,
IC 1, the circuit combines separate
single-ended filtersone for each
of the BTL outputs phaseswith a
third amplifier that provides a difference signal with additional filtering.
The first stage of each single-endedfilter section contributes the com-

plex-conjugate pole pair of a thirdorder, 30-kHz multiple-feedback


Butterworth filter, for which many
design guidelines and equations are
available. Each third-order-filter section comprises a complex-conjugate
pole-zero pair and one real pole.
To improve the match between the
signal paths, the two separate multiple-feedback filters share a real pole,
which 470-pF capacitor C1 and 11-kV
resistors R1 and R6 provide. The circuit
implements that pole as a difference
amplifier, thereby producing a filtered
output that presents a single-ended
version of the BTL amplifiers outputs.
The filters signal paths present 5.5kV impedances to each of the A and
B amplifier sections inputs. By inspection, the net 5.5-kV impedance from
Section Bs output to C1 comprises
the Thevenin-equivalent impedance
of resistors R6 and R7. Similarly, the
net impedance from Section As output to C1, also 5.5 kV, comprises the
Thevenin impedance of resistors R1
and R2. Note that the virtual ground
from Amplifier Ds inverting input

Voltage-to-pulse-width converter
spares microprocessors resources
James Christensen, Kris Design Co, El Cajon, CA

Although not an ADC in the


classic stream-of-ones-and
zeros sense, this voltage-to-pulsewidth converter produces a logic-level
output pulse whose variable width
represents an analog of the input
voltage. Based on Atmels (www.
atmel.com) AT89LP4052 microprocessor, IC1, this circuit makes efficient
use of the target microprocessors
limited analog-port pinout and code
space by using a modified version of
the classic timed-discharge-RC (resistor-capacitor) ADC design.
The timed-RC ADC allows a
capacitor to charge through a resistor while the microprocessor increments a counter. When a comparator detects that the capacitor voltage

102 EDN | december 1, 2006

and analog- input voltage are equal,


the count terminates, and its stored
value represents the ADCs output.
However, an RC networks exponential charging characteristic produces
a nonlinear conversion. Various software and hardware techniques can
partially correct the nonlinearities,
but all entail adding code, increasing the circuits development time, or
consuming additional I/O-port pins
required for other purposes.
To produce a linear-charging
characteristic that needs no correction, the circuit in Figure 1 uses an
LM334 constant-current source, IC2,
to drive capacitor C2, which connects
to IC1s AIN0 analog-input port. An
internal timer in the microcontroller

effectively grounds resistor R2.


Matched resistors attenuate each of
Amplifier Ds differential inputs by 6
dB (IN1 by R1 and R2 and IN2 by
R6 and R7). A 22-kV feedback resistor, R3, provides Amplifier D with a
gain of two, which sets a unity-gaintransfer function in the circuits passband. The circuits single-ended output with respect to ground allows the
oscilloscopes ground to also serve as
the output signals ground. A version
of this circuit using conventional op
amps would require a negative-powersupply-voltage source, but Maxims
MAX9727 already includes a negative-voltage source, which its internal charge-pump circuit generates.
When you operate the circuit from a
5V supply, the circuits output delivers more than 2.5V rms. Although
its third-order filter is inadequate for
precise measurements of distortion or
noise, the circuit provides an excellent tool for troubleshooting and
evaluating Class D-amplifier circuits
and inspecting their outputs on an
oscilloscope.EDN

measures the elapsed time from the


charging ramps start to the instant
when the ramp voltage crosses the
analog-input-voltage threshold at
IC1s AIN1 port.
In this application, potentiometer
RV1 provides an analog-input voltage
proportional to its position. The width
of the positive-going pulse at the output, P1.5, varies in proportion to the
analog-voltage input. Note that I/Oport pin AIN1 serves a dual purpose as
an analog input and as an open-drain
output that discharges ramp-forming
capacitor C2 before the next conversion cycle.
An 8-bit voltage-to-pulse-widthconversion cycle completes in less
than 4 msec. The code performs the
conversion function and outputs a
pulse train at IC 1s port P1.5 (Pin
17) with a period of 100 msec and
a positive-going pulse width proportional to the analog-input voltage at
Pin 13 (AIN 1). Programming connector J1 provides access to IC 1 for

designideas
uploading the compiled code. The
AT89LP4052 microprocessor typically executes one instruction per
clock cycle, and a 10-msec timer
routine can perform the required

STEVE EDN061201DI3977
housekeeping functions with plenty
of time left over for other program
tasks, including a future application
that requires a binary-coded analogto-digital output. You can download

VDD

VDD
5V

V (IC1, PIN 12)


2.8 mSEC

VDD

4.25V

PROGRAMMING
CONNECTOR
C1
10 F

LSCK

LMISO 3

LRST

10 mV
0
0

VDD

R1
17.4k

1 mSEC

5
7

6
8

J1

NC
LMOSI 9

TIME

C2
2200 pF

R3
6.04k

12

LSS

RV1
25k

R4
499
C3
30 pF

VARIABLE-WIDTH OUTPUT PULSE

VDD

VDD

LSS

R2
22k
VOUT

IC2 LM334

NC

10

R
V

Listing 1, which is written in C for


the Keil Software (www.keil.com)
compiler, from the online version of
this Design Idea at www.edn.com/
061201di1.EDN

Y1
12 MHz

12
VCC
P1.5 17
6
P3.2/INT0
15 P1.3
19
P1.7
16 P1.4
2
P3.0
IC1
3
AT89LP4052 P3.1
11 P3.7
14
P1.2
9
13 P1.1/AIN1
P3.5
1
7
RST/VPP
P3.3/INT1
8
P3.4/T0
5
18
XTAL1
P1.6
10
4
XTAL2
GND
P1.0/AIN0

LMOSI

VOUT

TIME

LSCK

LRST
LMISO

C4
30 pF

Figure 1 An analog-voltage-to-pulse-width converter features minimal parts. Subgraphs show timing-network and outputvoltage waveforms. IC1s unlabeled pins are available for user functions.

Precision voltage reference


delivers 80 mA
James Horste and Gary Staiman,
Maxim Integrated Products Inc, Sunnyvale, CA

Large analog systems that present many loads to a voltage-reference source can often demand more
current than a single reference IC can
deliver. However, if the reference IC
includes force and sense terminals, you
can easily add a buffer to the circuits

104 EDN | december 1, 2006

feedback loop without affecting the


references accuracy. For example, the
circuit in Figure 1 provides the same
0.04% initial accuracy and 7-ppm/8C
temperature coefficient as IC1, a standalone MAX6033. The buffer circuit
delivers as much as 80 mA.

When you design a buffer stage for


a force/sense-control loop, the buffer
must provide unity-voltage gain with
no phase inversion. In addition, the
circuits power supply must provide
head-room voltage to accommodate
the reference voltage plus voltage
drop across the buffer stage. The simplest buffer circuit comprises an NPN
transistor that connects as an emitter follower, which requires a drive
voltage that exceeds the references
output voltage by one transistor base-

designideas
emitter voltage drop. If you add the
required minimum power-supply
voltage plus the maximum allowable
base-emitter voltage, the configuration runs out of head room. Using a
PNP stage to drive the emitter drive
stage solves the head-room problem
but inverts the output voltage and
prevents the force/sense loop from
functioning. Adding a second PNP
stage cancels the phase inversion but
destabilizes the force/sense loop by
adding excessive gain.
The modified complementary Darlington, or Sziklai, connection (Reference 1) in Figure 1 solves both problems by providing an emitter followers
unity-voltage gain with no inversion.
The output PNP stage provides plenty
of head room, but the NPN stage does
not. You can easily overcome this
drawback by adding diode D1 to shift
the NPN transistors emitter voltage
downward by a diode drop. Thus,
to a first approximation, the diodes
voltage drop and the transistors baseemitter voltage cancel one another,
leaving plenty of voltage head room.

106 EDN | december 1, 2006

5V

5V

C1
0.1 F

IN
OUTF
IC1
MAX6033A
OUTS
GND

R1
10k
C2
0.1 F

Q2
Q1

2N2907
2N2222
VOUT =
4.096V
D1
1N4148

CLOAD

RLOAD

R2
2.7k

Figure 1 Add a two-transistor output buffer to a 4.096V, 15-mA reference IC to


boost its output current to 80 mA or higher.

Transistor Q2, a 2N2907, provides lim- reference-voltage ICs cannot accomited current gain, which in turn
limits modate
edn061201di39311
DIANE a fast-changing load-curthe circuits maximum output current rent step; thus, the circuits transient
to 80 mA. Substituting a higher gain response and its ability to supply fast
transistor can increase the output cur- current spikes depend on the output
rent to any reasonable level.
capacitor, CLOAD. Values of CLOAD as
For stability, the MAX6033 requires high as 10 mF do not affect the cir0.1-mF ceramic bypass capacitors on its cuits stability.EDN
In and OutF pins. Capacitor C2 determines the circuits response speed, but R e f e r e n c e
the buffer circuit exerts no significant 1 Sziklai Pair, Wikipedia, http://
effect on transient response. Most dc- en.wikipedia.org/wiki/Sziklai_pair.

designideas
Edited By brad thompson
and Fran Granville

readerS SOLVE DESIGN PROBLEMS

Three microcontroller ports


drive 12 LEDs

D Is Inside

Nedjeljko Lekic and Zoran Mijanovic, University of Montenegro,


Department of Electrical Engineering, Podgorica, Montenegro

72 Dynamic siphon steals

70 Magnetic-field probe requires

few components

current from USB port


Based on a previously pub- three LEDs, D8, D9, and D10 and D11,
EWhat are your design problems
lished Design Idea (Reference D12, and D 13) connect among IC 1s
and solutions? Publish them here
1), the circuit in Figure 1 uses on- ports and two voltage dividers that
and receive $150! Send your
ly three I/O lines to drive 12 LEDs. supply reference voltages VREF1 and
Design Ideas to edndesignideas@
In this application, the circuit serves STEVE
VREF2. Varying
the values of resistors
EDN061215DI3993
FIGUREreedbusiness.com.
1
as a tachometer for a motor-vehicle R5, R6, and R7 adjusts the brightness
engine and displays relative engine of the middle six LEDs, and R1, R2,
speed on an array of LEDs arranged and R4 control the brightness of the
The circuit uses Microchips (www.
in a line or a circular arc. Three pairs outer six LEDs. In general, this cir- microchip.com) PIC10F200 microof inverse-parallel-connected LEDs cuit can use N of a host micropro- controller, IC1, a small, inexpensive,
(D2 and D3, D4 and D5, and D6 and cessors I/O lines to drive as many six-pin device that provides only
D7) receive drive current from IC1s as N(N21)12N LEDs, or 2N more three I/O pins and one input-only pin.
ports through current-limiting resis- LEDs than the circuit in the original The I/O pinsGP0, GP1, and GP2
tors R 5, R 6, and R 7. Two groups of Design Idea could drive.
drive a 12-LED bar graph comprising

VCC

INPUT

VDD

GP2

R5
100

D8

D9

GP3

GP1

D6

VCC
5V

D10

IC1
PIC10F200

D1
1N4148
R3
390k

Q1
BC182C

VREF1

R1
3.3k

D7

R6
100

D5
D4
D2

VSS

GP0

D3
R4
2.2k

R7
100
D11

R2
2.7k

D12

D13
VREF2

Q2
BC213C

NOTE: LEDs ARE PANASONIC SSG LN224 SERIES (RED), LN324 SERIES (GREEN), AND LN424 SERIES (YELLOW).

Figure 1 A PIC microprocessor and a 12-LED bar-graph display form a simple tachometer circuit. (The decoupling capacitors are not shown.)

december 15, 2006 | EDN 67

designideas
START

INITIALIZATION

COUNT INCOMING
PULSES

NO

Figure 2. The bar graph displays 12 LEDs can form a linear array or circular
arc (not shown).
EDN061215DI3993FIG2 MIKE

TIMER0
OVERFLOW?

YES
NEXT LEDS
DRIVE TIME
SLOT
KK1

NO

K200?
YES
K0

SET LED PATTERN


VERSUS
PULSE COUNT

Figure 3. This flow chart shows


the LED-driver software routine.
(See the listings at www.edn.
com/061215di1 for the complete
tachometer routine.)

four yellow LEDs, four green LEDs,


and four red LEDs driven in multiplexed mode (Figure 2).
The microprocessors input-only
pin, GP3, serves as the input for pulses coupled from the ignition coils primary terminal. Resistor R3 and diode
D1 provide input-signal conditioning,
and a software-debouncing routine removes ringing effects from the pulses.
Given R3s high value of 390 kV, the
circuit tolerates high-voltage input
spikes and prevents latch-up of the
PIC10F200. Port GP3, which serves
as the processors programming port,
differs from the processors other ports
because it incorporates an internal
protection diode. The 20-mA diode
prevents GP3 from negative-going
transient voltages. The circuit oper-

68 EDN | december 15, 2006

Figure 4 A digital oscilloscope captures the waveforms of GP0, GP1, and


GP2 (upper to lower traces, respectively), which show a transition in the LED
pattern from Case 7 to Case 8 (lines 62 and 63 in Listing led121.c.pdf).

ates reliably, but you can add an external protection diode for enhanced
protection against transient-induced
latch-up. Connect the diodes anode
to ground and its cathode to pin GP3
of IC1.
You can configure the bar graph to
indicate engine speed by the number
of LEDs turned on (bar mode) or by
illuminating only one or two LEDs
(dot mode). The color scheme in Figure 2 uses yellow LEDs to indicate
too-low speed, green LEDs for nominal speed, and red LEDs for excessive
speed. Figure 3 shows the indicator
softwares flow chart. The processors
internal clock drives Timer0 to overflow every 512 msec, which represents one time slotthat is, a multiplexing phase. Of eight time slots,
one drives the three upper LEDs,
and a second drives the three lower LEDs. For software simplicity, the
last six time slots drive the middle

LEDs one by one. At the start of the


main loop, the microprocessor counts
clock pulses and waits for Timer0 to
overflow. After overflow occurs, the
output ports drive the LEDs according to their assigned time slots. After
eight time slots elapse, the processor
sets the ports to the same state. After
200 time slots, the processor counts
incoming tachometer pulses and sets
the LED pattern according to the incoming pulse countthat is, according to input frequency.
The tachometer indicates rotary
speed as high as 120 cycles/sec. The
accompanying software listings available at www.edn.com/061215di1 include files in C language (led12.c.pdf)
and in assembly language (led12.asm.
pdf). The source zip file contains a
complete MPLab project. Figure 4
shows the waveforms, which a digital
oscilloscope captured at ports GP0,
GP1, and GP2.EDN

designideas
Magnetic-field probe
requires few components

a larger full-scale-measurement range,


use a 9V battery to feed a 5V regulator
IC, such as a 7805 voltmeter and add
an on/off switch if desired. Place the
Rama Sarma, EMI-EMC Centre, RCI, Hyderabad, India
batteries near the meter. Otherwise,
the batteries steel cases will disturb
Popularly known as gauss meThe probes breadboard version com- the magnetic field under observation.
STEVE
FIGURE
1
ters, various makes and mod- prises a small piece of pc
board of EDN061215DI3942
suf- Use 10-nF SMD capacitors
to decouple
els of magnetic field meters are avail- ficient length to fit the operators hand the sensors input and output pins. Alable on the market at prices that make (Figure 2). The sensors leads connect though any DMM offering high dc acthem unaffordable to many hobbyists to a length of high-quality, three-con- curacy and an ac bandwidth exceeding
and engineers. This Design Idea com- ductor shielded cable and two 10-nF 50 kHz can display the sensors output,
bines a commonly available DMM surface-mounted decoupling capaci- a DMM with a RELD (relative-differ(digital multimeter) with a single semi- tors. The sensors power supply compris- ence-from-reference-reading) funcconductor component to measure mag- es three series-connected, miniature, tion, such as a Fluke (www.fluke.com)
netic-flux density and, in turn, mag- 1.5V batteries for a total of 4.5V. For model 187 DMM, eases measurement
netic-field intensity.
Figure 1 illustrates the measurement
IC1
equipment, comprising a probe, its batLINEAR HALL-EFFECT SENSOR
(ALLEGRO PART NO. A1323)
tery pack, and a DMM. The probes ac3
tive element consists of a linear Hall1
2
effect sensor. Although virtually any
PACKAGE LH
linear Hall sensor will work in this ap(SOT-23W)
plication, this version of the probe usPIN 1 VCC
C1 C2
PIN 2 VOUT
es an Allegro MicroSystems Inc (www.
0.01 0.01
PIN
3
GND
allegromicro.com) A1323 sensor,
F F
which produces a voltage proportionDIGITAL MULTIMETER
al to an applied magnetic field (ReferPROBE
ence 1). Operating from a power supply of 4.5 to 5.5V, the A1323s quiesPC BOARD
cent output voltage (zero-field output)
rests at 50% of the supply voltage. GivREL
en its nominal sensitivity of 2.5 mV/
gauss, the A1323 provides a full-scale
range of 1800 gauss (4.5V/2.5 mV/
gauss51800 gauss) for a supply voltA
V
COMM
age of 4.5V.
SHIELDED
Applying a magnetic field orientCABLE
ed south of the sensors face increases
TWO 4-MM
the sensors output voltage in proporBANANA PLUGS WITH
tion to the applied field perpendicular
19-MM SPACING
to the sensors branded face, and applyBATTERY PACK
ing a magnetic field north of the same
THREE 1.5V CELLS
face causes a proportional decrease in
output voltage. For a supply of 4.5V,
_ +
RED
the sensors quiescent output voltage
BLACK
of 2.25V can increase to 4.5V for a
WHITE
900-gauss, due-south field or decrease
to 0V for a 900-gauss, due-north field.
SHIELD
Although the sensor can detect the intensity and polarity of a dc magnetic
Figure 1 A digital multimeter and a Hall-effect sensor form an easily assemfield, its ac-field bandwidth extends to
bled magnetic-field probe.
30 kHz.

70 EDN | december 15, 2006

designideas
and polarity detection of a dc magnetic
field (Reference 2).
After assembling the circuit, connect
the probes output to the DMM using
two 4-mm banana plugs. Allow a oneminute warm-up and place the probes
sensor in a magnetically shielded enclosure. (Editors note: You can use salvaged steel, or tin, concentrically fitting food cans to build a magnetically
shielded enclosure. Arrange the cans
so that their unopened ends point in
opposite directions. Drill a small opening in the larger cans unopened end
to accommodate the sensors output
cable.) Press the DMMs RELD function key. The DMMs display will show
the sensors quiescent voltage output of
2.25V as 0.0000V, indicating that the
probe is calibrated for a zero magnetic
field and ready for use.
Remove the probe from the shielded enclosure and measure the magnetic field under observation. To achieve
maximum sensitivity, place the sensors
face perpendicular to the field. If the
fields direction is unknown, rotate the
probe about its longest axis to search
for maximum voltage. To calculate the
magnetic-flux density, divide the out-

Dynamic siphon
steals current
from USB port

Figure 2 The digital multimeters


relative-change mode (RELD)
displays a near-zero magnetic field
reading and the sensors nominal
zero-field output voltage of 2.25V.

put-voltage reading by the sensitivity


(2.5 mV/gauss). For example, if the
meter reads 21.9800V, then the magnetic field is 792 gauss due north. For
an ac-magnetic-field measurement, use
the DMMs true-rms mode to read the
sensors ac output voltage.
You can calculate a magnetic fields
intensity in air by applying the follow-

ing formula: B5m03H, where B represents magnetic-flux density in teslas, H represents magnetic-field intensity in amperes per meter, and
m054p31027H/m (the permeability
of free space). Given that the tesla represents a relatively large measurement
unit, a 1T field is quite strong.
For greater measurement resolution,
apply the following conversion factors
to use the gauss, a more popular unit:
10,000 gauss51T, 1 gauss579.6 A/m,
1.2560 mT51 kA/m. Applications
for the magnetic-field sensor include
troubleshooting moving-magnet linear-position detectors, fabrication of
dc motors and audio speakers, investigation of low-frequency-magneticfield interference, and designing and
fabricating electromagnetic-interference shields.EDN
R e fe r e nce S
1 A1323 Ratiometric Linear HallEffect Sensor Data Sheet, Allegro
MicroSystems Inc, www.allegromicro.
com/sf/1321.
2 Users Manual, Model 187 & 189,
True RMS Multimeter, Fluke Corp,
www.fluke.com.

300 mA MAXIMUM TO
100 mA TYPICAL

USB CURRENT
HIGH POWER=500 mA MAXIMUM
LOW POWER=100 mA MAXIMUM

ESSENTIAL
CIRCUITRY

Donald Schelle, Maxim Integrated


Products Inc, Sunnyvale, CA

A USB port offers a handy


source of 5V power for auxiliary devices. A USB port not only supplies power to a microcontroller and
other essential circuitry, but also provides enough extra current head room
to charge a small battery or supercapacitor energy-storage element. One typical approach to exploiting a USB ports
leftover-current capability begins with
an estimation of the essential circuitrys maximum current drain. You then
place an appropriate current-limiting

USB PORT

CURRENTLIMITING
DEVICE
LIMITS CURRENT
TO 200 mA

Figure 1 In this typical method for drawing power from a USB port, the storage-element current is limited to a fixed value that is less than optimal.

edn061201di39431

72 EDN | december 15, 2006

ENERGY-STORAGE
ELEMENT (BATTERY,
CAPACITOR)

DIANE

designideas
TO ESSENTIAL
CIRCUITRY
C6
150 F
10V

VUSB
5V FROM USB PORT

+ C5
150 F
10V

4
RS+

C1
0.1 F
1 IN
3
NC
4
NC

12 3

GND
1

C4
1 F

5
RS

IC1
VCC MAX4173- OUT
FEUT

C2
0.1 F

R1
0.1
1%

0 TO 500 mA=
0 TO 2.5V
6

4 _

IC2
MAX6129AEUK25

Q1

5 6 7 8

C3
0.1 F

VUSB

2.5V REFERENCE

TO ENERGYSTORAGE ELEMENT

4 FDS6679

GND
2

OUT 5

R2
1k

IC3
+

5
1

MAX4238AUT

Q2
FDN359AN

GND
2

Figure 2 This circuit continuously monitors the total current drawn from the USB port and dynamically adjusts the storageelement current to avoid exceeding the ports maximum output capability.

edn061201di39432

DIANE

Figure 3 These waveforms taken from Figure 2 show that the sum of the essentialcircuitry current (middle trace) and storage-element current (bottom trace) never
exceeds the 500 mA maximum that the USB port (top trace) specifies.

74 EDN | december 15, 2006

device in the path of the energy-storage device (Figure 1). Although easy
to implement, this method doesnt use
all of the current available from the
USB port, and the energy-storage device slowly charges or recharges.
The circuit in Figure 2 uses all available USB power by dynamically adjusting the amount of current delivered to the energy-storage device and
thereby siphoning a relatively constant
and maximum current from the USB
port. IC1, a Maxim (www.maxim-ic)
MAX4173FEUT; IC2, a Maxim MAX6123AEUK25; and the load-switch
circuit comprising Q1, Q2, R2, and C4
form a control loop that limits the current flowing through Q1. The circuit
maximizes current flowing to the energy-storage element (Figure 3) by
ensuring that the sum of battery and
essential-circuitry currents never exceeds the maximum of 500 mA for a
high-power USB device. To reconfigure the circuit for low-power USB operation of 100 mA maximum, you can
replace IC1 with a MAX4173HEUT, a
device with 100V/V gain, and R1 with
a 0.25V resistor.EDN

You might also like