You are on page 1of 5

designideas

Edited By Martin Rowe


and Fran Granville

readerS SOLVE DESIGN PROBLEMS

Use an LM317 as D Is Inside


0 to 3V adjustable regulator 56 Alarm monitors rotational speed
of dc motor
Vladimir Rentyuk, Modul-98 Ltd, Zaporozhye, Ukraine
58 Add charging status


Most engineers know that they age regulator. The two 1N4001 diodes to simple lithium-ion charger
can use an inexpensive, three- it employs do not provide the needed
terminal adjustable regulator, such potential bias of 1.2V, and they have 58 555 timer drives multiple LEDs
as Fairchild Semiconductor’s (www. additional temperature instability of from one NiMH cell
fairchildsemi.com) LM317, as an ad- approximately 2.5 mV/K (Reference 60 Microcontroller inputs
justable regulator to only some neces- 3). Hence, additional temperature parallel data using one pin
sary value of voltage, such as 36 or 3V. drifting of the output voltage is approx-
This value cannot be less than 1.25V imately 100 mV; it is more than 6% for EWhat are your design problems
without employing other approaches, a 1.5V output voltage and 10% for a and solutions? Publish them here
however. The devices’ inner reference 1V output voltage if you adjust the and receive $150! Send your
voltage is 1.25V, and their output volt- temperature to 208C—a typical indoor Design Ideas to edndesignideas@
age accordingly cannot be less than situation. You can solve these problems reedbusiness.com.
this value without potential bias (Ref- by using a Fairchild Semiconductor ETo see all of EDN's Design
erence 1). One way to solve this prob- LM185 or an Analog Devices (www. Ideas, visit www.edn.com/design
lem is to use a reference-voltage source analog.com) AD589 adjustable-volt- ideas.
based on two diodes (Reference 2). age-reference IC. These devices are
Although this approach is suitable for expensive, however, and, in this case,
a 1.2 to 15V or higher-voltage regula- they require not only additional zero are 1.215 to 1.255V and 1.2 to 1.25V
tor, it is not appropriate for an extra- adjustment but also matching. These for the LM185 and AD589, respective-
low-voltage fixed- or adjustable-volt- adjustments at their reference voltages ly. Note that the reference voltage of
the LM317 is 1.2 to 1.3V.
Figure 1 shows an inexpensive ap-
VIN 3 IC1 2
VOUT
proach using a simple 0 to 3V adjust-
LM317T able regulator. You implement the
R1 � C2
INPUT RANGE: C1 OUTPUT RANGE:
5V < VIN <10V 0.1 �F 1 620 10 �F
0V < VOUT <3V
necessary potential bias using a simple
TANTALUM temperature-stabilized constant-cur-
GND GND
rent source (Reference 4). You cal-
R2 OUTPUT
1.5k ADJUSTMENT
culate this current source using the
following equation: I5(VF2VEBO)/
R4 R3
(R51R6), where VF is D1’s forward
510 82 voltage of approximately 2V and VEBO
is Q1’s emitter-base voltage of approxi-
Q1
mately 0.68V. The current is approxi-
BCW33
mately 1.32/(R51R6). The constant-
R5 current source creates a bias voltage of
D1 15
RED
approximately 21.25V on resistor R3.
VSS RANGE:
�5V < VSS <�10V
R6 ZERO You implement the zero adjustment
100 ADJUSTMENT
using resistor R6, which can change the
�VSS
current of the constant-current source.
Resistor R5 protects transistor Q1. You
Figure 1 This circuit is an inexpensive approach using a simple 0 to 3V adjust-
can use D1 as a light indicator. You can
able regulator.
adjust the output voltage using resis-

edn080821di43211 DIANE
october 2, 2008 | EDN 55
designideas
tor R2. Calculate the output voltage as with an output voltage of 1.56V for Semiconductor Corp, 2001, www.
follows: VOUT5VREF(11R2/R1)2VR3, development projects.EDN fairchildsemi.com/ds/LM/LM350.pdf.
where VREF is the reference voltage of 3 Schenk, C, and Ulrich Tietze,

IC1 and VR3 is some compensative volt- R e fe r e nce s Halbleiter-Schaltungstechik, Spring-


age of resistor R3. You should establish 1 “LM317 3-Terminal Positive Adjust- er-Verlag Berlin Heidelberg, 2002,
this voltage to equal the reference volt- able Regulator,” Fairchild Semicon- ISBN: 3540428496.
age for its compensation. In this case, ductor Corp, June 2005, www. 4 Rentyuk, Vladimir, “The Simple

VOUT5VREF(R2/R1). With R2 having a fairchildsemi.com/ds/LM/LM317.pdf. Temperature-Stabilized Constant-Cur-


value of 1.2 kV, this circuit found use 2 “LM350 3-Terminal 3A Positive Ad­ rent Source,” Electronics World, No-
as the equivalent of a typical battery justable Voltage Regulator,” Fair­child vember 2006.

Alarm monitors rotational motherboard connector; the frequen-


cy of commutation is proportional to
speed of dc motor the rotation speed. Optionally, the
output of the trigger resets the timer
Peter Demchenko, Vilnius, Lithuania
with two time-out periods; the expira-


You can use the circuit in Fig- down, the BIOS powers down the PC tion of the first time-out activates the
ure 1 to monitor the rotating at the beginning of the boot sequence, alarm buzzer.
speed of a dc fan motor and sound an not allowing you to go into BIOS set- After the second time-out, transistor
alarm if the motor stalls. One poten- tings to correct the situation. So, the Q5 powers down the PC with or with-
tial application of the circuit is moni- manual often advises you to disable out the relay switch. The relay switch-
toring the CPU-fan speed in a PC in this fan function. The circuit in Figure ing is more consistent, is less prone to
which overheating the CPU can ruin 1 shows how to implement continuous interference, and is preferable when
the whole system. A PC BIOS (basic monitoring and sound an alarm and the distance between this circuit and
input/output system) often has a limit- automatically power off the system if a the power-switch connector on the
ed capability for monitoring the speed fan problem occurs. motherboard exceeds 20 to 30 cm. You
of CPU or chassis fans during boot-up. The impulses on R1, arising from com- must connect the collector of Q5 or the
Moreover, if you enable the CPU-fan- mutation in the fan’s brushless motor, contacts of the relay in parallel with
protection function of BIOS today, you start up the Schmitt trigger, Q1/Q2, the power-switch button. The alarm
can have a problem with it tomorrow: which controls transistor switch Q3, circuit comprises Q4 and a three-ter-
If the fan’s starting acceleration slows commutating the sense pin of the fan’s minal piezoelectric buzzer.EDN

R2
150

C2
R9 R10 C3 D2
0.47 �F R4 R6 12V
120k 51k 6.8 nF 1N4148
39k 15k 10
� 11 R
CLK1
FAN 12
M BC849 RES C 9
R12
1 1.5k
C1 R Q2 R BUZZER
BC849 7 IC1
3
10 nF 1k 120k TO COLLECTOR
FAN BC849 CD4060
6 BC849 OF Q5 FOR
CONNECTOR Q1 Q7
Q3 RELAY SWITCH
R11 Q4
R1 D1 680k
R5 R8
13 1N4148
470 15k
3
Q14
R13
120k TO ATX POWER-
Q5 SWITCH
CONNECTION
BC849 WITHOUT RELAY

Figure 1 This circuit provides an optional audible alarm after a time-out when a brushless-dc fan motor slows down. Then,
after a second time-out, the circuit powers down the PC.

edn080724di42851 DIANE
PLACED IN THE 8-7 FOLDER

56 EDN | october 2, 2008


designideas
voltage mode. As the cell voltage gets
Add charging status closer to this 4.2V terminal voltage, the
current through D1 drops, and at 15 to
to simple lithium-ion charger 40 mA, both LEDs illuminate.
Tests measured this range for sev-
Peter T Miller, Applied Inspirations, Bethlehem, CT eral 2N3904 transistors. Testing with


Like other simple, single-cell versus 1.7V—the voltage across D 2 2N4401s gave a lower range of 4 to 18
lithium-ion battery chargers, and Q1 is less than the turn-on volt- mA. When the current drops below
Microchip’s (www.microchip.com) age of the green LED, D3, and it re- about 15 mA, Q1 turns off D2. The volt-
MCP­73812 provides no means of in- mains off. age across D3 now rises above its for-
dicating the charging status. You can For the last part of the charging cycle, ward-voltage threshold, and the green
remedy this situation by adding four the controller switches to constant- charging-completed LED lights.EDN
components (Figure 1). Add one more
LED, and you also get a charging-com- 1 CE IC1
MCP73812 J3
plete indication. This two-LED con- 5V DC
VBAT 3 1
4
figuration has the added benefit that VDD
POSITIVE
one of the LEDs is always on, provid- J1 R1 5 VSS
2
� SINGLE
PROG C2
ing an indication that the charger is 300 C1 � 1 �F LITHIUM-ION
1 �F CELL BT1
powered. R2
2.4k
While the cell is in the constant- J4
D2 1
current charging mode, 401 mA flows
RED
through the 1N4001 diode, D1. The OPTIONAL
CHARGING
NEGATIVE
CHARGING-
additional 1 mA is the supply cur- COMPLETE
LED
2N3904
rent of the control chip. Because the LED
D3 Q1
1N4001 conducts before the base- GREEN
emitter junction of Q 1, it prevents CHARGING-
I
COMPLETE
Q1 from turning on until the forward LED
D1
NOTES:
GND 1N4001
voltage across it reaches about 450 R2 SETS MAXIMUM CHARGE CURRENT TO 400 mA.
mV. Q1 then starts to conduct and CURRENT IS 400 mA WHILE CHARGING AND
J2 ALMOST ZERO WHEN CYCLE COMPLETES.
turns on D2, a red LED that indicates
charging. Because the forward-volt- Figure 1 Adding a few components to a lithium-ion cell charger provides
age drop for a green LED is typically an indication of charging status.
higher than that of a red LED—2.1

555 timer drives


edn080710di42911 DIANE
(PLACED IN 8-7 FOLDER)
1.25 TO 2.5V

multiple LEDs 220 �H

from one 8 4 Q > 90


RA
1k VCC RESET

NiMH cell
7
DISCH AS MANY AS SEVEN LEDs
555 �3000 MCD
RB
CMOS
10k
Chuck Irwin, Hendersonville, NC TIMER


6 3
THRESH OUTPUT
Using a CMOS 555 timer and 2
TRIG 1k
a single NPN transistor, you GND CTRL 2N4401
C
can drive as many as seven LEDs 470 pF 1 5
NPN OR
EQUIVALENT
using a minimal amount of volt- CHARGE
0.01 �F

age and power from a single NiMH


(nickel-metal-hydride) AA cell. The DISCHARGE
circuit works by creating much high-
er-voltage pulses than the voltage Figure 1 Using a CMOS 555 timer configured as a switching power supply,
for powering the circuit by pulsing a you can drive seven high-brightness LEDs from a single 1.25V cell.
high-Q power inductor. The circuit

edn080710di42901 DIANE

58 EDN | october 2, 2008


designideas
creates voltage pulses of 23V using the millicandela rating, the brighter LEDs, regardless of their individual
a 1.25V NiMH cell with seven con- the LED will appear. forward-voltage drops and millicandela
nected LEDs. You can connect the LEDs in parallel ratings. Each additional LED decreases
The circuit uses a CMOS timer be- if their forward voltages match; other- additional voltage and lowers the re-
cause it functions on low voltages—in wise, the LED with the lowest forward sulting current into the series string of
this case, as low as 1V. A single white voltage will dim out the other LEDs. LEDs, lowering their brilliance. Using
LED rated at 9300 mcd maintains its Using the parallel connection, all LEDs seven LEDs with a single 1.25V cell
brilliance down to this low voltage. will glow with equal brightness if their draws a current of only 8 mA. By add-
The circuit works for 192 hours using forward voltages match. Adding LEDs ing a 1.25V cell to the power input,
a 2000-mAHr-rated NiMH cell. The does not increase the current drawn the LEDs become so brilliant that it is
output of the timer is a 4.5-msec pulse from the battery but reduces the bril- difficult to look at them. With a 2.5V
repeating at a 222-kHz rate. Although liance of all of the connected LEDs. supply, the peak voltage pulses increase
you can use the circuit to power any The advantage of connecting the to 70V with no connected LEDs. With
LED, it works best using high-bright- LEDs in series—which is possible be- the LEDs connected, the output volt-
ness, high-power LEDs rated at 3000 cause of the high pulse voltage they age peaks at 25V. Current draw at 2.5V
mcd or higher. Obviously, the higher produce—is equal brilliance of all is 20 mA.EDN

Microcontroller inputs accomplishes this pulse by sending as


output a long pulse on the microcon-
parallel data using one pin troller-pin line. R2 and C2 introduce
a delay, and, once the pulse exceeds
Rex Niven, Forty Trout Electronics, Eltham, Victoria, Australia that delay, the PL line goes low, and


Inputting multiple bits of in- technique for outputting signals with the data loads.
formation using a single entry a single pin. The data from switch After the PL signal rises, shorter
pin of a microcontroller without the bank S1 first presents itself to IC3, a pulses on the microcontroller’s I/O
complexity of UARTs can prove use- 74HC165 parallel-to-serial convert- port generate pulses at the shift reg-
ful. Such a scheme could allow scan- er from NXP Semiconductors (www. ister’s clock input, CP, but not at the
ning of a keyboard, mode switches, nxp.com, Figure 1). Loading the PL input. The duration of these clock
or any relatively slowly changing data into the shift register requires a pulses must be long enough to exceed
digital data. Reference 1 details a pulse on the PL line (Pin 1). Line CK delay R1C1 but not R2C2. These clock

QQ
R3
9 7
1k
QH QH
D2
BAT54 IC3
74HC165 VCC
VCC GND
IC1 R4 RP1
GP5 GP0/AN0 SH/LD CLK INH CLK SER A B C D E F G H
PIC12F683 R2 1k PULLUP
GP4/AN3 GP1/AN1 IC2A 1 15 2 10 11 12 13 14 3 4 5 6
100k 1
1 2 PL 16
GP3/MCLR GP2/AN2
CK C2 2 15
74HC14 3 14
2.2 nF
4 13
5 12
D1
BAT54 6 11
7 10
8 9
R1 IC2B
10k 16 15 14 13 12 11 10 9
3 4 CP
C1 74HC14
3.3 nF S1

1 2 3 4 5 6 7 8

Figure 1 Careful adjustment of the RC time constants allows a microcontroller to input a serial-data stream using a single
I/O pin. edn080626di42721 DIANE

60 EDN | october 2, 2008


designideas
pulses shift the data so that the 8 bits HIGH
< 0.3R2C2
appear in sequence at the shift-register 2.5R1C1 2.5R2C2 IMPEDANCE/READ
output, QQ.
If the microcontroller’s data direc-
tion briefly changes to input with CK
high impedance, this shift-register
data dominates because of the rela- QQ
tive values of R1, R2, and R3, with R3
being a much lower value. The high- CL
impedance state must exist only for a
time less than the R1C1 time constant
PL
(Figure 2). The microcontroller now
reads the single bit of data. The action �R4C1
of three differing periods generates
three functions: load, clock, and data Figure 2 The high-impedance state must exist only for a time less than the R1C1
read. The time the microcontrollers time constant.
need to change port direction, read
the pin data, and reset the pin’s direc- place the RC delays with a precision rect sequencing of LD and CP. Diodes
tion to output determines the timing. retriggerable monostable multivibra- D1 and D2 quickly discharge the capac-
For example, a 1-msec microcontroller tor, such as NXP’s 74HC123, and logic itors to “reset” the delay function of
requires 10 msec. gates. You can expand the scheme with R1C1 and R2C2.EDN
To avoid spurious CP pulses, this time more shift registers to read dozens of
constant must be less than 0.33R1C1, so signals. R e fe r e nce
edn080626di42722 DIANE
R1C1 could be 30 msec and R2C2 could Note that internal PLACED
logic in the
IN 8-7 FOLDER Niven, Rex, “RC lowpass filter
1

be 200 msec. These settings would 74HC165 shift register prevents the expands microcomputer’s output
allow a complete 8-bit read in about 1 CP signal from shifting data when LD port,” EDN, June 21, 2007, pg 74,
msec. To achieve faster operation, re- is active. Resistor R4 ensures the cor- www.edn.com/article/CA6451248.

62 EDN | october 2, 2008

You might also like