6406730.pdf

(373 KB) Pobierz
659318675 UNPDF
design ideas
EDITED By BrAD ThoMPSoN
AND FrAN GrANVIllE
readerS SOLVe deSIGN PrOBLeMS
Microcontroller drives logarithmic/
linear dot/bar 20-LED display
D Is Inside
84 Optical feedback extends
white LEDs’ operating life
88 Sequencer controls power
supplies’ turn-on and turn-off
order
92 Use dual op amp
in an instrumentation amp
E What are your design problems
and solutions? Publish them here
and receive $150! Send your
Design Ideas to edndesignideas@
reedbusiness.com.
Dhananjay V Gadre and Anurag Chugh,
Netaji Subhas Institute of Technology, New Delhi, India
Available for more than 20
years, National Semiconduc-
tor’s (www.national.com) venerable
LM3914 dot/bar-display driver still en-
joys wide popularity among designers.
The LM3914 can sense an analog volt-
age level and display it on 10 LEDs by
illuminating one of 10 in dot mode or
by progressively illuminating LEDs in
bar-graph mode. Recently, an appli-
cation needed an analog-input-volt-
age display capable of displaying more
than 10 levels in linear- and logarith-
mic-scale formats. According to the
LM3914’s data sheet, you can cascade
multiple 3914s to display more than 10
levels ( Reference 1 ), but, even so, the
LM3914 offers only linear displays of
its input voltage. ( Editor’s note: Na-
tional Semiconductor also offers the
LM3915, a logarithmic, 3-dB-per-step
version, and the LM3916, which dis-
plays its input in volume units, for
audio applications.)
This application required more flex-
ibility than the LM3914 offers, and it
uses a circuit based on an Atmel (www.
atmel.com) AVR-family ATTiny13 mi-
crocontroller, which features 1 kbyte of
program memory; a four-channel, 10-
bit ADC; and six general-purpose I/O
pins. Altering the circuit’s firmware al-
lows linear or logarithmic scaling of
the 0 to 5V input-voltage range.
The circuit in Figure 1 continuous-
ly displays the input voltage in 20 lev-
els. When closed, switch S 1 freezes the
displayed reading at its then-current
level. Five of the microcontroller’s six
I/O pins control all 20 LEDs and the
switch. Configured as an ADC-input
channel, the remaining I/O pin re-
ceives the analog-input voltage. The
microcontroller uses Charlieplexing, a
method of using I/O lines to drive as
many as N3(N21) LEDs, to drive 20
LEDs with only five I/O pins ( refer-
ences 2 through 4 ).
The firmware is written in C and
compiled using AVR-GCC, a freeware
C compiler and assembler available in
Windows and Linux versions at www.
avrfreaks.net. It uses the Tiny13’s in-
ternal 10-bit ADC operating in free-
J 1
V CC
J 2
GND
INPUT 0 TO 5V
C 1
0.1 F
(RESET)PB5
(XTAL2)PB4
(XTAL1)PB3
(SCK)PB2
(MISO)PB1
(MOSI)PB0
1
3
2
C 2
10 F
IC 1
ATTINY13
7
8
VCC
GND
6
5
4
R 8
3.9k
8
13
D2 10 D2 9 D2 8 D2 7
10
11
9
12
7
14
6
5
4
3
10
11
D2 2 D1 1 D1 10 D1 9
1
20
9
12
6
15
D1 8 D1 7 D1 6 D1 5
7
14
5
16
2
19
D1 4 D1 3 D1 2 D1 1
3
18
1
20
17
D2 6 D2 5 D2 4 D2 3
16
18
R 1
100
R 2
100
R 3
100
R 4
100
R 5
100
NOTES:
ALL LEDs ARE SUPERBRIGHT, 3 MM DIAMETER.
S 1 IS NORMALLY OPEN IN RUN MODE, CLOSED TO HOLD READING.
S 1
Figure 1 Based on a low-cost microcontroller, this dot/bar LED driver operates in linear or logarithmic modes.
january 18, 2007 | EDN 83
2
19
8
13
4
17
15
659318675.023.png 659318675.024.png 659318675.025.png 659318675.026.png 659318675.001.png 659318675.002.png
design ideas
running, interrupt-driven mode to
convert the analog-input voltage into
a digital number. Upon completion of
each conversion, the ADC generates
an interrupt that a subroutine reads;
the interrupt stores the ADC’s con-
verted output in a shared variable.
To provide a flicker-free display, an
internal timer generates a 1875-Hz in-
terrupt derived from the 9.6-MHz sys-
tem clock to drive the multiplexed
LEDs at a rate exceeding 90 Hz. Di-
viding the ADC count by a constant
yields a linear display of the input
voltage. A look-up table scales the
ADC count to produce a logarithmic
display. Figure 2 shows the logarith-
mic-conversion curve that defines the
look-up table’s values. Versions of the
ATTiny13’s control programs for lin-
ear and logarithmic scales are avail-
able for downloading from the online
version of this Design Idea at www.
edn.com/070118di1. You can modify
the source code to display only a par-
ticular subrange of the input voltage
of 0 to 5V. For example, you can spec-
ify a linear-display range spanning 1
to 3V or a logarithmic scale for input
voltages of 2 to 3V. EDN
1200
1000
800
SERIES1
ADC COUNT
(0 TO 1023)
600
400
200
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
LED NUMBER
Figure 2 A linear-to-logarithmic-conversion curve defines the input voltage
required to illuminate a particular LED.
R e f e R e n c e s
Application Note 1880, Feb 10,
2003, http://pdfserv.maxim-ic.com/
en/an/AN1880.pdf.
Benabadji, Noureddine, “PIC
microprocessor drives 20-LED dot-
or bar-graph display,” EDN , Sept 1,
2006, pg 71, www.edn.com/article/
CA6363904.
LM3914 data sheet, www.national.
com/pf/LM/LM3914.html.
Lancaster, Don, “Tech Musings,”
August 2001, www.tinaja.com/glib/
muse152.pdf.
“Charlieplexing: Reduced Pin-
Count LED Multiplexing,” Maxim
2
4
3
Optical feedback extends white LEDs’ operating life
Bjoy Santos, Intersil Corp, Milpitas, CA
Regardless of its color, an LED’s
light output varies as a function
of forward current and ambient tem-
perature. As Figure 1 shows, an LED’s
light output can vary by as much as
150% over its operating-current
range. In response, a designer’s first at-
tempt to solve the problem focuses on
driving the LEDs with a constant cur-
rent. The most common white-LED-
driver circuits use an inductor-based
dc/dc boost-converter topology simi-
lar to the circuit in Figure 2 . A cur-
rent-feedback controller ensures that
the voltage across current-sensing re-
sistor R 1 remains constant. As a result,
the controller varies the voltage across
the entire string to maintain the LEDs’
current constant without regard to
150
100
LED-OUTPUT
CHANGE (%)
50
0
�50
�100
5
10
15
20
25
LED FORWARD CURRENT (mA)
Figure 1 An LED’s light output changes considerably as a function of its for-
ward current, even within the sweet spot (oval area) of its nominal operating
current.
84 EDN | january 18, 2007
1
659318675.003.png 659318675.004.png 659318675.005.png 659318675.006.png
design ideas
V IN
5V
GND
L 1
22 H
V OUT TO
ADDITIONAL
LED STRIP
D 1
BAT54C
C 3
10 F
C 4
0.1 F
D 2
D 3
C 1
0.22 F
C 2
0.22 F
GND
D 4
D 5
6
1
D 6
D 7
VIN
LX
DIM/BRIGHT
CONTROL
INPUT
4
IC 1
EL7630
(SC 70 PACKAGE)
3
D 8
D 9
ENAB
FB
D 10
D 11
GND
PGND
2
5
D 12
D 13
NOTE:
D 2 TO D 13 : WHITE LEDs.
R 1
5
R 2
5
Figure 2 One method of driving an LED illuminator samples current through a string and adjusts the voltage across the
entire string to maintain a constant current.
the LEDs’ actual light output.
Driving series-connected white LEDs
with a current source relies on the as-
sumption that, at constant current, an
LED’s light output remains constant.
Unfortunately, all LEDs exhibit a non-
linear decrease in brightness as a func-
tion of operating time. Although less
obvious in colored LEDs that find use
as indicators, the decrease in bright-
ness of a white-LED-illuminator-array
source becomes noticeable over an ex-
tended period. Brightness also varies as
Figure 3 Even at a
constant forward cur-
rent, an LED’s light
output correlates
strongly with tem-
perature and can vary
by as much as 100%
over the entire oper-
ating-temperature
range (upper curve).
3
2.5
2
CURRENT FEEDBACK
RELATIVE
LUMINOUS
INTENSITY
1.5
1
0.5
OPTICAL FEEDBACK
0
�40 �20
0
20
40
60
AMBIENT TEMPERATURE (�C)
V CC
L 1
22 H
V IN
5V
GND
V OUT TO
ADDITIONAL
LED STRIP
D 1
BAT54C
C 3
10 F
C 4
0.1 F
D 2
D 3
C 1
0.22 F
C 2
0.22 F
GND
D 4
D 5
6
1
VIN
LX
D 6
D 7
V CC
IC 1
EL7630
(SC 70 PACKAGE)
C 5
0.1 F
DIM/BRIGHT
CONTROL
INPUT
4
ENAB
FB
3
D 8
D 9
GND
PGND
D 10
D 11
VCC
2
5
IC 2
ISL29000
3
D 12
D 13
EN
5
OUT
NC
4
R 1
100
GND
NC
NOTE:
D 2 TO D 13 : WHITE LEDs.
2
R 2
1k
Figure 4 Photosensor IC 2 , an Intersil ISL29000, resides near an LED to detect brightness fluctuations and provides com-
pensating feedback to IC 1 , the current controller, which is an Intersil EL7630 pulse-width regulator.
86 EDN | january 18, 2007
659318675.007.png 659318675.008.png 659318675.009.png 659318675.010.png 659318675.011.png
design ideas
a function of temperature, which can
affect an illuminator’s performance
over an extended-temperature range
(upper curve, Figure 3 ).
To compensate for LED-output vari-
ations due to aging and temperature
fluctuations, the control loop needs
more information in addition to volt-
age or current data. Adding an ambi-
ent-light sensor and optical feedback
to the control loop can ensure that a
white LED’s light output remains uni-
form and consistent over time and tem-
perature variations. An optical sensor
can measure the LED’s light-output in-
tensity and provide a feedback signal
for the control loop, which can adjust
the current to produce a relatively con-
stant light output. As the LEDs’ light
outputs decrease, increased current
compensates for aging and tempera-
ture-induced variations (lower curve,
Figure 3 ).
The circuit in Figure 4 includes an
optical-feedback loop based on Intersil’s
(www.intersil.com) ISL29000 light-to-
current optical sensor, IC 2 , which senses
changes in the LEDs’ light output and
decreases the feedback voltage applied
to IC 1 , the current controller, an Inter-
sil EL7630. The pulse-width-modulat-
ed controller then increases the LED-
drive current’s duty cycle, boosting the
LED current until the feedback voltage
reaches its nominal value. As ambient
temperature decreases, the LEDs’ light
output tends to increase, and IC 2 de-
livers a higher feedback voltage to the
controller, which responds by lowering
the duty cycle to decrease the LEDs’
current and thereby compensates for
the decrease in temperature. EDN
Sequencer controls power supplies’
turn-on and turn-off order
Eric Schlaepfer, Maxim Integrated Products Inc, Sunnyvale, CA
that, during shutdown, the power-sup-
ply rails switch off in reverse order. Al-
though various vendors provide pro-
grammable-sequencing ICs, these
components are usually too expensive
for cost-sensitive applications.
Offering an alternative to program-
mable-sequencing ICs, the circuit of
Figure 1 can sequence and cheaply
When a design based on mul-
tiple point-of-load dc/dc con-
verters requires a specific power-sup-
ply-start-up sequence, wiring each con-
verter’s power-good output to the next
converter’s enable input produces the
desired voltage cascade. Although this
approach works well for simple designs,
it fails to satisfy a requirement of many
modern microprocessors and DSPs:
(continued on pg 92)
C 3
0.1 �F
C 4
0.1 �F
R 7
10k
R 6
10k
R 5
10k
R 4
10k
R 3
33k
EN1
EN4
EN3
EN2
VCC
IN2
OUT2
1.2V REERENCE
3.3V
VCC
EN2 EN3 EN4 EN1
+
IN
OUT
IN1
IN3
DC/DC
CONVERTER 1
OUT1
OUT3
3.3V REFERENCE
1.8V REFERENCE
EN
2.5V
+
+
IN4
5V
INPUT
POWER
IN4
IN
OUT
DC/DC
CONVERTER 2
OUT4
OUT4
2.5V REFERENCE
2.5V REFERENCE
EN
1.8V
+
+
IN3
IN
OUT
IN1
DC/DC
CONVERTER 3
OUT3
OUT1
1.8V REFERENCE
3.3V REFERENCE
EN
1.2V
+
+
IN
OUT
IN2
COLY1
COLY2
COLY3
COLY4
NC
NC
NC
NC
DC/DC
CONVERTER 4
OUT2
IC 2
MAX16029
1.2V REFERENCE
EN
+
NC
NC
NC
NC
COLY1
COLY2
COLY3
COLY4
IC 1
MAX16029
NR RESET
CRESET
TH1
TH0
GND
TOL
CRESET
TOL GND TH0 TH1
RESET
NR
NC NC
NC
5V
C 2
5V
NC
R 1
100k
R 2
33k
POWER OK
C 1
POWER ON/OFF
CONTROL INPUT
(ON=HIGH)
(OFF=LOW
Figure 1 Comprising a pair of inexpensive ICs, this circuit applies four supply voltages in a specified order at power-up
and then removes them in reverse order at power-down.
88 EDN | january 18, 2007
659318675.012.png 659318675.013.png 659318675.014.png 659318675.015.png 659318675.016.png 659318675.017.png 659318675.018.png 659318675.019.png 659318675.020.png
design ideas
(continued from pg 88)
and effectively monitor four power-
supply rails. Four dc/dc power supplies
provide the application circuit with
3.3, 2.5, 1.8, and 1.2V. A quad super-
visor circuit, IC 1 , monitors each rail,
generating the master POK (power-
OK) signal and ensuring that, during
power-up, the next supply in the se-
quence does not turn on until the pre-
ceding supply voltage is valid. Using an
RC circuit comprising R 1 , R 2 , R 3 , and
C 1 , a second quad supervisor, IC 2 , cre-
ates the power-up and power-down se-
quences. Each supervisor’s internal-
ly preset voltage threshold eliminates
the need for external resistive-voltage
dividers.
Connecting the power-on/off signal
to 5V initiates a power-up sequence,
which charges C 1 through R 2 . As the
capacitor’s voltage gradually exceeds
1.2, 1.8, 2.5, and 3.3V, each of IC 2 ’s
corresponding open-drain outputs
floats, thereby allowing the power sup-
plies to turn on in the prescribed se-
quence. After a time delay, which C 2
sets, and after all four supplies turn on,
the POK signal asserts—that is, goes
high.
To monitor the supply rails, allow
Figure 2 Beginning with a dc/dc converter, the circuit in Figure 1 switches on
three additional converters in sequence and generates a POK signal. Pulling
the circuit’s on/off input low removes the POK signal and switches off all four
converters in reverse order.
the power-on/off-control input to float.
Resistors R 1 and R 3 sustain the voltage
across C 1 and maintain the POK sig-
nal high to keep the power supplies on.
When an output-voltage fault occurs,
POK rapidly deasserts, discharging C 1
through R 1 and shutting off all of the
power supplies. To remove power in an
orderly sequence, connect the power-
on/off signal to ground. Capacitor C 1
discharges through R 2 and also through
R 1 when POK deasserts, turning off
each power supply in reverse order
( Figure 2 ). EDN
Use dual op amp
in an instrumentation amp
Jerald Graeme, Burr-Brown Corp, Tucson, AZ
a voltage (V 1 1 V 2 ) across the gain-set-
ting resistor R G . Signal current in the
combined feedback path is thus propor-
tional to the differential input voltage
and inversely related to R G . The out-
put voltage, V OUT , equals G(V 1 1 V 2 )—
that is, V OUT =2(1+R/R G )(V 1 1 V 2 ).
You choose R G for the desired gain
G, which may range from a value of
2 (R G omitted) to a maximum that
is limited only by the op amps’ open-
loop gain, the allowable gain error, and
the required bandwidth. The Figure 1
circuit provides a 2-kHz bandwidth at
a gain of 2000; in general, the band-
width is about 2 MHz/G. What’s more,
the output offset equals the difference
in op-amp offsets multiplied by G.
The dc CMR (common-mode rejec-
tion) is an important spec for instru-
mentation amps; in Figure 1 , CMR de-
pends primarily on matching values for
the four resistors labeled R. DC CMRR
Editor’s note: Here’s an oldie but good-
ie. EDN editors regularly field requests for
copies of articles that predate our online
archives (www.edn.com/archives). But
this Design Idea from our Feb 20, 1986,
issue has generated many more requests
than normal. We aren’t sure how readers
know of this Design Idea, but its endur-
ing popularity has led us to publish it once
again, and now it will be available in our
online archives.
Although monolithic instru-
mentation amplifiers are more
cost-effective than their discrete and
modular predecessors, the limited va-
riety of monolithic instrumentation
amps restricts their use. You can widen
your options, however, by deriving the
differential response of an instrumenta-
tion amplifier from a dual op amp ( Fig-
ure 1 ). The circuit uses FET-input op
amps to provide lower noise and lower
input-bias currents than monolithic
instrumentation amps can offer.
In Figure 1 , feedback networks for
the two op amps are interconnected to
establish IC 1B as an inverting amplifier
in the feedback path of IC 1A . Each am-
plifier provides an external signal input
with the high impedance expected of
an instrumentation amplifier. (Input-
bias currents for this circuit are 2 pA
at 258C.)
Feedback from each amplifier forces
92 EDN | january 18, 2007
659318675.021.png 659318675.022.png
Zgłoś jeśli naruszono regulamin