Upload
moditha-lakshan
View
232
Download
0
Embed Size (px)
Citation preview
8/11/2019 Pushbuttons and Digital Potentiometer
1/5www.edn.com February 17 , 2005 | edn 77
ideasdesign
Digitally controlled potentiome-ters are useful for generating analogcontrol voltages under the control
of a microcontroller. In some applica-tions,manual pushbutton switches couldreplace a microcontroller and simplifyproduct design. Mechanical switches ex-hibit contact bounce, and, when a useractuates them, they may open and closemany times before reaching a stable state.
A digital potentiometers control inputslack switch-debouncing capabilities,andits up/down control is not suited for
pushbutton operation. Figure 1 illus-trates solutions to these issues and showshow to use a digital potentiometer tocontrol a boost converter.
The potentiometer,IC1, a MAX5160M,
presents an end-to-end resistance of 100k. To increment the wipers position, W,you press and hold the U/D pushbutton,S
2, to pull the U/D pin high and then
press and release pushbutton S1
to pulsethe INC input. Similarly, you decrementthe wiper position by releasing S
2and
pulsing S1.
A time-delay network comprising R1,
R2, and C
1masks S
1s switch bounce,
which would otherwise toggle the wipers
position between VDD and approximate-ly 0V. When you press S1, capacitor C
1
charges via R2
and causes the INC pinto ramp slowly toward 0V, thereby re-moving the effects of S
1s contact bounce.
The R1C
1time constant requires that
you depress S1
for several millisecondsbefore the INC input takes effect.
In this application, switching convert-er IC
2,, a MAX1771, operates as a stan-
dard boost converter and increases its 5Vinput to a higher voltage positive output.You can use Equation 1 to set IC
2s out-
R1100k
R210k
S1R610k
2
1
3
4
5V
5V
S2
C10.1 F
5V
VIN
MAX5160
IC17
6
5
VIN
VDD 8
CS
L
W
IC2
MAX1771
GND
5
4
6
REF
SHDN
AGND
EXT
CS
FB
VOUT5 TO
16V
R333k
+
+
VIN5V
C468 F
C20.1 F
2
1
8
3
V+
L147 H
D11N5817
R510k
R44.7k
7
R70.1
Q1IRF530
200 F
C6
INC
U/D
H
GND
5V
C30.1 F
Pushbuttons and digital potentiometercontrol boost converterSimon Bramble, Maxim Integrated Products Inc, Wokingham, UK
A digital potentiometer, IC1, and two pushbutton switches, S1 and S2, let you adjust the regulated output voltage of boost con-verter IC
2over a 10V range.
Pushbuttons and digital potentiometer
control boost converter ................................77
Microcontroller protects dc motor..............78
Improved Kelvin contacts boost
current-sensing accuracy
by an order of magnitude ..........................80
Active pullup/pulldown network
saves watts ......................................................82
Sine-wave step-up converter uses
Class E concept ..............................................82
Publish your Design Idea in EDN. See theWhat s Up secti on at www.edn.co m.
Edited by Brad Thompson
The best ofdesign ideas Check it out at:
www.edn.com
F igure 1
8/11/2019 Pushbuttons and Digital Potentiometer
2/578 edn | February 17 , 2005 www.edn.com
ideasdesign
Although any overloadeddc motor can draw exces-sive current and sustain
damage, a cooling fans motoris particularly vulnerable dueto fouling by dust, insects,ormisplaced objects. A fewfans include built-in overloadprotection, and others can use
an external warning device,such as Microchips TC670 fan-failure detector.
In many products, its essen-tial not only to detect an over-loaded motor, but also toswitch off the motor to preventfailure. Although you can de-sign a protection systemaround the TC670, a low-endmicrocontroller can offer a lessexpensive, more flexible, andeasier to implement alterna-
tive. If a product includes a mi-crocontroller, only two sparepins are necessary for motorprotection.
Figure 1 shows a dedicatedprotection circuit based on asmall microcontroller and apower FET. This project uses aneight-pin flash-memory MC68HC-908QT2 from Freescale and an IRF520AFET from Fairchild to control a dc brush-less-fan motor rated for 0.72A at 12V dc.A high or low output voltage on output
PA5 of IC1 controls Q1, an N-channel FET
that in turn controls the motor. Currentthrough the motor develops a voltage, V,thats proportional to the motor currentacross sense resistor R
1. A lowpass filter
comprising R2
and C1
reduces noise on
the sense voltage you apply to input PA4
and IC1s built-in A/D con-
verter. Voltage regulator IC2
provides stable 5V power forIC
1.
Under normal operation,the voltage across R
1measures
approximately 0.52V. Whenthe motor undergoes an over-load, voltage increases until it
reaches a preset upper limit of0.85V. The output on PA5then drops to a low level,switching off transistor Q
1to
stop the motor, and lightingD
1to indicate the overload.
When the motor stops, itdraws no current, and thesense voltage falls below theminimum threshold value of0.3V. The microcontrollersoutput on PA5 remains lowand holds off Q
1, a state that
it maintains indefinitely untilyou cycle the circuits poweroff and then on.
The control program,in as-sembly language for the MC-68HC908, features a straight-
forward algorithm adaptableto other microcontrollers that
include an A/D converter. A 2.5-sec de-lay routine prevents the motor fromstarting until the systems power-supplyvoltage stabilizes. You can download thelisting from the online version of this
Design Idea at www.edn.com.
LED
78L051 3
2
IC2
D1
IC1
12V
DC
MOTOR
Q1
IRF520
R1
1.3
R2100k
C1
10 F
2
3
1
8
1
2
3
MC68HC908QT2
PA5
PA4
V
NOTE:D1,A LITE-ON LTL-4223-R2, INCLUDES A BUILT-IN RESISTOR.
F igure 1
Microcontroller protects dc motorAbel Raynus, Armatron International Inc, Malden, MA
Controller for dc brushless fan motor features minimal parts count.
put to a nominal 12V output without thedigital potentiometer:
Connecting IC1s wiper via 10-k re-
sistor R5
to IC2s FB (feedback) node sets
IC2s voltage-feedback level. Although
inclusion of feedback resistors R3, R
4,
and R5
and digital potentiometer IC1
complicates the precise calculation ofIC
2s output voltage, you can simplify the
math by calculating the output voltages
at the potentiometers extreme settings.Thus, with IC
1s wiper set to 0V, R
equals the paralleled resistance of R4
and
R5, and IC2s maximum output voltagebecomes Equation 2:
or VMAX16.84V.
With IC1s wiper set to 5V, you can at-
tempt to calculate the minimum outputvoltage by summing voltages into thefeedback node:
which simplifies to VMIN0.48V.However, Equation 3 provides an incor-rect value for V
MINbecause a boost con-
verters output voltage cannot go belowits input voltage. You can approximateV
MINby substituting a value of 10 k for
R5
in Equation 3 and solving for VMIN
:V
MIN4.93V. Refer to the manufacturers
application notes for additional compo-nent information.
(2)
(3)
(1)
8/11/2019 Pushbuttons and Digital Potentiometer
3/580 edn | February 17 , 2005 www.edn.com
ideasdesign
Many power-supply designs relyon accurately sensing the voltageacross a current-sense element.
Multiphase regulators use the sense volt-age to force current sharing among phas-es, and single-phase regulators to controlthe current-limit setpoint. As internalcomplexity and clock speeds increase,processors impose narrower operating
margins for power-supply voltages andcurrents, which in turn make accuratecurrent sensing critically important.Themost accurate of several available meth-ods involves inserting a low-value cur-rent-sensing resistor in the power sup-plys output path. Another populartechnique uses the parasitic resistance ofa switching regulators output inductoras the sense element. For either method,currents of 20A or more per power-sup-ply phase impose a sense-resistance lim-it of approximately 1 m. Precision re-
sistors of 1% accuracy are available atreasonable cost, but an error of 1% of 1m amounts to only 10 .
The resistance of solder joints that at-tach a sense resistor or inductor can eas-ily exceed 10 and,worse yet,can varysignificantly during a production run.Inthe past, discrete four-wire resistors pro-vided separate high-current and sense-voltage connections, allowing accurateKelvin sensing and excluding voltagedrops that the high-current connectionsintroduce. Unfortunately,four-wire sense
resistors or inductors are unavailable inlow cost SMD packages. Thus,most pow-er-supply designers use two-wire sensecomponents and apply a Kelvin-connec-tion pc-board-layout technique (Figure1). However, test results reveal that ap-plying conventional Kelvin sensing tech-niques to low-value resistors introducestransduction errors as high as 25%anunacceptable error margin for designsthat require high accuracy.
So, whats a power-supply designer todo? The answer involves a slight variation
on an old idea that requires only a minor
change in a sense resistors mountingfootprint. To compare performance ofconventional Kelvin connections versusthe proposed method, a test board in-cludes three pc-layout footprints for in-stallation of 1-m, 1%-accurate,surface-
mount resistors. In all three patterns,current enters and exits the resistor viatraces (not shown) on the pads left andright sides, respectively.
In Figure 1a, applying a current of4.004A produces a sense voltage at theKelvin terminals of 4.058 mV, a 1.35% er-ror. At 8.002A, the sense voltage at theKelvin terminals measures 8.090 mV, a1.1% error. In Figure 1b, a current of4.004A produces a sense voltage at theKelvin terminals of 5.01 mV, a 25% error.At 8.002A,the sense voltage at the Kelvin
terminals measures 9.462 mV for an er-
ror of 18.2%. Figure 2 shows an im-proved component footprint. Each largesolder pad includes a central cutout area
that partially surrounds a narrow padthat solders directly to the sense elementand thus carries no current. This ap-proach removes from the sense path thelarge-area solder joints that mount thepart and carry high load current.
When you apply a current of 4.002A tothe pads in Figure 2, voltage at the Kelvinterminals measures 4.004 mV, a 0.05%error.At 8.003A, the sense voltage meas-ures 8.012 mV, an error of only 0.11%and an order of magnitude improvementover Figure 1a. Sense-voltage variation
over temperature should greatly improve,and solder-thickness variation no longeraffects the sense voltage. Best of all, thetechnique costs nothing to implement.
Obviously, the technique in Figure 2works only with terminations sufficient-ly wide to allow dividing the solder padinto three sections and still retain ade-quate soldering area to handle the high-current connections. However, for manydesigns, this simple technique can signif-icantly improve the accuracy of currentsharing, V-I load-line characterization,
and current-limit setpoints.
CURRENT FLOW
S1 S2
CURRENT FLOW
(a)
(b)
S1 S2
S1 S2
Improved Kelvin contacts boost current-
sensing accuracy by an order of magnitudeCraig Varga, National Semiconductor Corp, Phoenix, AZ
Conventional solder
pads offer two choices
for Kelvin connections: on the pads inner
edges (a) or outer corners (b).
Modified pads provide
isolated Kelvin connec-
tions that eliminate errors introduced by volt-
age drops across soldered connections carrying
high current.
F igure 1
F igure 2
8/11/2019 Pushbuttons and Digital Potentiometer
4/582 edn | February 17 , 2005 www.edn.com
ideasdesign
Many power applications rangingfrom luminescent and fluorescentlighting to telephone-ringing volt-
age generators require a more or less si-nusoidal-drive voltage. These applica-tions typically require a waveform of onlymoderate quality, and its frequency isntespecially critical. However, avoiding
waveform discontinuities that cause un-wanted current peaks, excessive device
dissipation,and EMC problems rules outusing filtered square waves or otherstepped waveforms. Sometimes, a trape-zoidal drive may be acceptable but itsonly a second choice at best. This DesignIdea proposes a method of generatingsine waves that offers a number of ad-vantages over more complex methods:
The circuit requires only one power-switching device, and you can use an ana-
log or a digital signal to drive the switch-ing device. The circuit also requires onlya few components: a diode, a switchingtransistor or a MOSFET, an inductor ora transformer, and a capacitor. Further,the designs circuit losses are low, and theswitching device experiences minimalstress during operation. Figure 1 shows
the basic circuit, and Figure 2 illustrates
Sine-wave step-up converter uses Class E conceptLouis Vlemincq, Belgacom, Evere, Belgium
The control circuit in Figure 1presents a relatively low input resist-ance and thus imposes a low value on
external pulldown resistor R1
to providethe desired low-level input voltage. Inturn, R
1wastes power by drawing a rela-
tively high current through switch S1.For
example,suppose that the control circuitpresents an input resistance of 2.2 k andrequires a logic-low input of 5V or less.
At a VCC of 24V, R1 must not exceed 500for a current drain of 24/50048 mA.The power dissipated in R
1is thus
242/0.51152 mW, which requires a 2Wresistor for reliable operation.
In this application,the system includesthree controls with three input circuits,which present a total current of 432 mA
and adds approximately 10W to the pow-er budget. To reduce wasted power,it usesan active pulldown circuit (inside thedashed line in Figure 2).As long as switchS
1remains closed, PNP transistor Q
1s
base voltage exceeds its emitter voltagedue to diode D
1s forward voltage drop.
Thus, Q1
doesnt conduct, and the con-trol circuits input voltage rests atV
CC0.7V (D
1s forward voltage drop).
Opening S1 reverse-biases D1, and thebase current flowing through resistor R1
turns on Q1, which saturates and pulls the
circuits input to VCE(SAT)
. Closed-circuitcurrent through S
1is thus V
CC/R
1. For ex-
ample, with VCC
of 24V and R1
having avalue of 10 k, I24/102.4 mA, and R
1
dissipates 0.058W, or approximately 20times less power than in Figure 1. In thisapplication, current demand of the ninecontrol-circuit inputs decreases from 432to 22 mA and saves pc-board space byeliminating the need for using 2W. As a
variant, Figure 3 shows an active-pullupversion of the circuit.
ENABLE
D2
S1
VCC
R22.2k
R1500
I ENABLE
D2D1
Q1
S1
VCC
R22.2k
R110k
I
D1
Q1
R110k
S2
VDD
Active pullup/pulldown network saves wattsJB Guiot, DCS Dental AG, Allschwil, Switzerland
A conventional network
requires a low-value pulldown resistor.
An active pulldown cir-
cuit substitutes a saturated transistor for a
power-consuming pulldown resistor.
Rearranging the circuit and
using an NPN transistor for Q1yields an active-
pullup network.
F igure 1F igure 3F igure 2
(continued on pg 86)
8/11/2019 Pushbuttons and Digital Potentiometer
5/586 edn | February 17 , 2005 www.edn.com
ideasdesign
waveforms within the circuit.In operation, the sine-wave output ap-
pears across inductor L in a series LC cir-cuit. An external clock source pro-duces gate drive for transistor Q at afrequency thats lower than the LC cir-cuits natural resonant frequency. Whenthe transistor conducts, the inductor re-ceives a charging current via diode D.When conduction ends, energy stored inthe inductor transfers to capacitor C,anda damped oscillation begins (uppermosttrace in Figure 2). The voltage across ca-pacitor C approximates a sine wave (toptrace). Drain current in transistor Q
shows that no current flows until the ca-pacitor voltage forward-biases diode D(middle trace). The gate-drive pulse in-terval is lower than the series-resonantfrequency that L and C present (bottomtrace).
During the negative-going portion ofthe cycle,the external clock source appliesgate drive to the transistor.Diode D is stillreverse-biased, and thus no current flowsinto Q. When the voltage across C goespositive, diode D conducts and allows
current to recharge the inductor and re-plenish energy lost in the previous cycle.In balanced operation, energy suppliedduring the conduction phase replenish-es energy supplied to the load and dissi-pated in component losses.
To produce a higher peak voltage, youextend the conduction interval by raising
the drive frequency or by extending theon interval. You can regulate the output
voltage by applying conventional closed-loop feedback techniques to a variable-frequency clock oscillator or, in digitalsystems, by altering the clocks duration.For most applications in which load cur-rent is relatively fixed, such as in an elec-troluminescent panel lamp,an open-loopadjustment or manual control offers suf-ficient flexibility once you determine aclock-frequency range that correspondsto the desired degree of illumination.
For peak voltages not exceeding 10times the power-supply voltage, you can
connect the load directly to the junctionof D, L, and C. You can achieve highervoltage-to-step-up ratios at the expenseof applying additional voltage and cur-rent stress to L and C. Instead, you canadd an isolated secondary step-up wind-ing to the inductor. For optimum effi-ciency, use components designed forhigh-frequency power handlingfor ex-ample, a polypropylene-dielectric capac-itor and a low-loss inductor.
If the load consists of an electrolumi-nescent panel that behaves as a lossy ca-
pacitor, you may be able to eliminate theuse of external capacitor C. Transistor Qmust obviously be able to withstand peakvoltages and currents that the circuit im-poses, but its specifications are otherwiserelatively noncritical. No switching lossoccurs at the beginning of the conduc-tion due to the Class E mode of opera-tion, and the output capacitor assists thedevices turn-off recovery. For outputvoltages not exceeding approximately50V, you can improve efficiency by se-lecting a Schottky or other fast-recovery
diode for use in the circuit.For powering lamps and generating
telephone-ringing signals, the sine wavesflat spots are of little consequence be-cause of their relatively short durationand low harmonic-energy content. Youcan minimize these intervals by reducingthe LC ratio and thus increasing theloaded Q factor of the LC circuit. How-ever, for a given output voltage, increas-ing Q factor also increases the peak cur-rent because the same amount of energymust transfer to the inductor in less
time.
OUTPUT
L
D
QGATE-DRIVE
INPUTC
F igure 1
Few components are necessary to produce a
pseudo sine wave.
The circuit in Figure 1 produces these waveforms.
VOLTAGE
ACROSS
CAPACITOR
VCC
GROUND
DRAIN
CURRENT
GATE
DRIVE
TRANSISTOR
OFF INTERVAL
TRANSISTOR Q
CONDUCTION
INTERVALF igure 2
(continued from pg 82)