You are on page 1of 30

042 Battery Discharger

J. Friker R1 R4
D3
The battery discharger published in the June 1998 issue of this

4Ω7

4Ω7
magazine may be improved by adding a Schottky diode (D3). BAT43
red
This ensures that a NiCd cell is discharged not to 0.6–0.7 V, R2 R3 L1 rood
D2

100Ω

100Ω
but to just under 1 V as recommended by the manufacturers. An Bt1
additional effect is then that light-emitting diode D2 flashes C1 C2
LOW
4mH7 CURRENT
when the battery connected to the terminals is flat. 220n 470n
D1 rot
rouge
The circuit in the diagram is based on an astable multivi-
brator operating at a frequency of about 25 kHz. When transis- BAT48
T1 T2
tor T2 conducts, a current flows through inductor L1, where-
upon energy is stored in the resulting electromagnetic field. R5 R6

When T2 is cut off, the field collapses, whereupon a counter- BC639 BC639

3k9

3k9
emf is produced at a level that exceeds the forward voltage
(about 1.6 V) of D2. A current then flows through the diode so
994072 - 11
that this lights. Diode D1 prevents the current flowing through
R4 and C2. This process is halted only when the battery voltage
no longer provides a sufficient base potential for the transis- The flashing of D2 when the battery is nearing recom-
tors. In the original circuit, this happened at about 0.65 V. The mended discharge is caused by the increasing internal resist-
addition of the forward bias of D3 (about 0.3 V), the final dis- ance of the battery lowering the terminal voltage to below the
charge voltage of the battery is raised to 0.9–1.0 V. Additional threshold level. If no current flows, the internal resistance is of
resistors R5 and R6 ensure that sufficient current flows through no consequence since the terminal voltage rises to the thresh-
D3. When the battery is discharged to the recommended level, old voltage by taking some energy from the battery. When the
it must be removed from the discharger since, in contrast to the discharge is complete to the recommended level, the LED goes
original circuit, a small current continues to flow through D3, out. It should therefore be noted that the battery is discharged
R2-R3, and R5-R6 until the battery is totally discharged sufficiently when the LED begins to flash. [994072]

7-8/2000 Elektor Electronics 71


SUMMER CIRCUITSCOLLECTION
043 8 Channel D/O Card for RS232
G. Vastianos
The author is a Student at the
Electronics Department, Tech-
nological Educational Institute
of Piraeus, Greece.
This article describes a
card with 8 open-collector dig-
ital outputs for external con-
nection to a PC serial port. The
design of this card is based on
direct accessing of the PC’s
UART registers to adapt the
communication from serial to
parallel.
A computer may have one
to four serial ports (COM1 to
COM4) where each port occu-
pies eight locations on its
memory map as shown in
Table 1.
The basic lines that a UART
uses in serial communication
for transmission and recep-
tion, are TXD and RXD. Also a
group of extra lines (DCD, DSR, RTS, CTS, DTR, RI) is used to a serial port (RS232 levels) are officially –12V for logic 1 and
establish different types of serial communication. Some of +12 V for logic 0.
these extra lines work as inputs and others as outputs, but The computer’s serial port is connected to the card through
each of them (except RXD) may be controlled through a bit in the connector K1. The three available outputs of the serial port
the UART register as shown in Table 2. The voltage levels on (TXD, DTR, RTS) are applied to R1-D1, R2-D2, R3-D3 to ensure
5V
R4 R6 R5 IC2
IC3
10k

10k

10k

9 2 19 2 18 R14 D11
0 1D 1k
CTR12 7 3 18 3 17 R13 D10
K1 R1 D1 1 1k
RST 11 6 4 17 4 16 R12 D9
2k2 CT=0 2 1k
1 IC6 5 5 16 5 15 R11 D8
1N4148 1 6 5 3 1k
14 3 6 15 6 14 R10 D7
IC1 4 1k
2 2 7 14 7 13 R9 D6
5 1k
15 CT 4 8 13 8 12 R8 D5
6 1k
3 13 9 12 9 11 R7 D4
2
4N28 4 4040 7 1k
16 12
R3 D3 8
4 LEN 10 14 11
2k2 + 9 C1
17 IC8 15 1 1
1N4148 1 6 5 10 EN & EN
5 1 19
11
18 74HC573
6
74HC541
19
2 4
7 4N28
D2 V++
R2
20 CLK
2k2
8 IC7 10
1N4148 1 6 5
21 1 +VS 18
I1 O1 D0
9 2 17
I2 O2 D1
22 3 16
I3 O3 D2
10 4 15
2 4 I4 O4 D3
23 4N28 5 IC4 14
IC5 I5 O5 D4
11
5V
6
I6
ULN O6
13
D5
D12 7805 2803
24 7 12
I7 O7 D6
12 8 11
1N4001 I8 O8 D7
25 16 20 20 VEE
9V
13
6 ... 40mA C4 C3 IC1 C1 C2 IC2 IC3 9
8 10 10
330n 100n 100n 100n
004032 - 11
SUMMER CIRCUITSCOLLECTION
0 + COMPONENTS LIST
D12 IC5
K1 H1
C2 C4 T Resistors:
C3
D11 R1,R2,R3 = 2kΩ2
IC7

R14
D0 R4,R5,R6 = 10kΩ
R2

R5
D2

R13 D10
R7-R14 = 1kΩ
R12 D9
R11 D8 Capacitors:
IC1
IC8

IC2

IC3

IC4

R10 D7 C1,C2,C3 = 100nF


R3

R6
D3

R9 D6 C4 = 330nF
R8 D5
C1 Semiconductors:
IC6

R7 D4
R1

R4

D7 D1,D2,D3 = 1N4148
D1

D4-D11 = LED, high efficiency


1-230400 V++ D12 = 1N4001
ROTKELE )C(
IC1 = 4040
H2

004032-1
IC2 = 74HC573
IC3 = 74HC541
IC4 = ULN2803
IC5 = 7805
(C) ELEKTOR
IC6,IC7,IC8 = 4N28 or
004032-1 CNY17-2
Miscellaneous:
K1 = 25-way sub-D socket
(female), PCB mount
12 solder pins
Table 1. PC COM port addresses The RST and CLK lines drive 12-bit binary counter IC1 of
Register Name COM1 COM2 COM3 COM3 which only 8 bits are used. The eight least significant outputs
Transmit/Receive Buffer 3F8h 2F8h 3E8h 2E8h of the binary counter are applied to latch IC2, together with
Interrupt Enable Register 3F9h 2F9h 3E9h 2E9h the LEN line.
Interrupt Identification Register 3FAh 2FAh 3EAh 2EAh The normal operating sequence is as follows. First an RST
Line Control Register 3FBh 2FBh 3EBh 2EBh pulse is generated to reset the counter. Next, we produce the
Modem Control Register 3FCh 2FCh 3ECh 2ECh
number of the CLK pulses needed to get the desired logic
states on all counter outputs. Finally, we produce a LEN pulse
Line Status Register 3FDh 2FDh 3EDh 2EDh
to hold the logic states at the outputs of the latch.
Modem Status Register 3FEh 2FEh 3EEh 2EEh
Buffer IC3 (74HC541) drives LEDs D4-D11, which give a
Scratch Pad Register 3FFh 2FFh 3EFh 2EFh
visual representation of the output logic states. Another buffer,
IC4, this time a ULN2803A, is the actual output stage of the
card. The eight open collector outputs of the ULN2803 are
safe driving of the optocouplers IC6, IC7 and IC8. So when a available as solder pins at the card edge. Note that the
serial port output line is at +12 V, the internal transistor of the ULN2803 has open-collector outputs. Each of these is capable
relevant optocoupler works is driven to saturation. Conversely, of switching up to 50 V, while the total load current on all out-
when this line is at –12V, the same transistor will be cut off. puts should not exceed 500 mA.
The logic equations between the TXD, DTR, RTS and the RST, The card has its own voltage regulator and may be powered
CLK, LEN lines are the following : RSTTTL= NOT TXDRS232 ; by any mains adapter rated at 9-15 V.
CLKTTL= NOT DTRRS232; LENTTL= NOT RTSRS232. The software for the communication with the card has been
developed in Turbo Pascal.
The communication routine
Table 2. UART bit locations is called CARD08DO. Calling
Pin 25pin 9pin COM1 COM2 COM3 COM3 Bit I/O this routine (from any pro-
Name Connector Connector gram written in Turbo Pas-
TXD #2 #3 3FBh 2FBh 3EBh cal) should comply with the
2EBh 6 O
DTR #20 #4 3FCh 2FCh 3ECh following syntax:
2ECh 0 O
RTS #4 #7 3FCh 2FCh 3ECh 2ECh 1 O
CTS #5 #8 3FEh 2FEh 3EEh 2EEh 4 I CARD08DO (COMADDRESS,
DSR #6 #6 3FEh 2FEh 3EEh 2EEh 5 I VALUE, DELTIME)
RI #22 #9 3FEh 2FEh 3EEh 2EEh 6 I
Where
DCD #8 #1 3FEh 2FEh 3EEh 2EEh 7 I
COMADDRESS: Word type
variable, must contain
SUMMER CIRCUITSCOLLECTION
(before calling) the base address of the serial port. Acceptable The source code of the communication routine
values of this variable are $3F8 (for COM1), $2F8 (for COM2), (CARD08DO.SUB) and a demonstration program
$3E8 (for COM3), $2E8 (for COM4). (08DOCARD.PAS), with an executable version of the demon-
VALUE: Byte type variable, must contain (before calling) the stration program (08DOCARD.EXE) may be downloaded from
arithmetic value of the 8 channels group. The 8 logic states of the author’s website at
the 8 channels make a Byte with LS Bit Ch0 and MS Bit Ch7.
Acceptable values of this variable are 0 to 255. http://members.xoom.com/robofreak/download/08docard.htm
DELTIME: Byte type variable, must contain (before calling)
the value of ‘delay time’. Acceptable values of this variable are The PCB shown here is unfortunately not available ready-
0 (for a slow 8086 computer at 8 MHz) to 4 (for a fast Pentium made through the Publishers’ Readers Services.
computer running at 266 MHz). (004032-1)
044 Infra-Red Light Barrier
Pradeep G. 1 9V
This is a short-range light barrier for use as an intruder alarm R1
17mA
in doorposts, etc. The 555 in the transmitter (Figure 1) oscil-
15k

lates at about 4.5 kHz, supplying pulses with a duty cycle of C2


about 13% to keep power consumption within reason. Just P1 10μ
about any infra-red LED (also called IRED) may be used. Sug- 16V
10k
gested, commonly available types are the LD271 and SFH485. 4 8
The exact pulse frequency is adjusted with preset P1. The 7 R
DIS T1
LEDs are pulsed at a peak current of about 100 mA, deter- R2
IC1 R3
mined by the 47 Ω series resistor.
2k7

3
555 OUT 330Ω
In the receiver (Figure 2), the maximum sensitivity of photo- TLC555 BD140/
6
diode D2 should occur at the wavelength of the IREDs used in THR
2 TR
BD136
R4
the transmitter. You should be okay if you use an SFH205F,
47Ω
CV f = 4kHz5 (10Ω)
BPW34 or BP104. Note that the photodiode is connected 5 1 222μs 29μs 1W
reverse-biased! So, if you measure about 0.45 V across this D1
device, it is almost certainly fitted the wrong way around. The C1
D2
received pulses are first amplified by T1 and T2. Next comes 15n D1, D2 = LD271
a PLL (phase lock loop) built with the reverenced NE567 (or (SFH485)
LM567). The PLL chip pulls its output, pin 8, Low when it is
004001 - 11
locked onto the 4.5 kHz ‘tone’ received from the transmitter.
When the (normally invisible) light beam is interrupted (for
example, by someone walking into the room), the received sig- Switch the receiver off and on again a few times to make sure
nal disappears and IC1 will pull its output pin High. This it locks onto the transmitter carrier under all circumstances. If
enables oscillator IC2 in the receiver, and an audible alarm is necessary, re-adjust P1, slowly increasing the distance
produced. between the transmitter and the receiver.
The two-transistor amplifier in the receiver is purposely over- (004001-1)
driven to some extent to ensure
that the duty cycle of the output
pulses is roughly 50%. If the 2 5V
transmitter is too far away from
R1 R2 R13 R8 R9 11/19mA
the receiver, overdriving will no C10 C11

1k
6k8

3k3

2k2

4k7
longer be guaranteed, hence IC1 100n 22μ
will not be enabled by an alarm 10V
condition. If you want to get the
most out of the circuit in respect
of distance covered, start by C2 2V
3V4 4 4 8
modifying the value of R2 until 3
IN OUT
8 7
DIS
R
T2 5 R7
the amplifier output signal again 0V6 47p R R6 IC2
IC1

100k
R5 3
has a duty cycle of about 50%. OUT

1M
NE567

10k
T1 NE555
The circuit is simple to adjust. C1 (LM567) 6
2x THR
Switch on the receiver, the BC 6 1 2 TR
10n RC C3
buzzer should sound. Then 549C 1V4 C2 CV
R10
switch on the transmitter. Point 470k
2 7 5 1 Bz1
the transmitter LEDs to the D1
R4
C4 C5 C6 C7 C8 C9
receiver input. Use a relatively SFH205F

1k8
BPW34
small distance, say, 30 cm. BP104 220n 22n 2μ2 4μ7 47n 100n
10V 10V
Adjust P1 on the transmitter
until the buzzer is silenced.
4kHz5 Tone Amp PLL Alarm
74 Elektor Electronics 7-8/2000
SUMMER CIRCUITSCOLLECTION

045 2 × Dual = 1 × Quad

3 8 12 10 3 8

1 14 8 1
IC1a IC3d IC3c IC2a
2 13 9 2

5 3 5 5
7 1 7 7
IC1b IC3a IC3b IC2b
6 2 6 6

4 4

11

004088 - 11

T. Giesberts IC3
This is a sort of sequel to the article ‘2 × single = 1 × dual’.
In this case, two dual opamps are combined to make one new IC2 IC1
quad opamp. This allows many possible variations, and again
it allows two completely different types of dual-opamps to be 1-880400 004088-1
used.
It is very easy to replace a quad opamp if you use the printed
circuit board shown here. The schematic diagram shows the well as that of the quad opamp to be replaced. Nowadays,
interconnections between the two dual opamps and the pin most types have ‘standard’ pinouts, but there are a few exotic
locations of the quad opamp. The two dual opamps are sol- types that do not conform to the standard.
dered on top of the board, and two 7-pin contact strips are sol- The PCB shown here is unfortunately not available ready-
dered to the bottom side. These can then be plugged into the made through the Publishers’ Readers Services.
socket of the original quad opamp. (004088-1)
When selecting the opamps, carefully check their pinouts, as
046 Mains Powered!
K. Walraven
R1 C1 D1
Many circuits can be powered directly from the mains with the 1001
aid of a series capacitor (C1). The disadvantage of this 1W 220n 1N4004
12V
approach is that usually only one half cycle of the mains wave- 250V
X2
form can be used to produce a DC voltage. An obvious solu- 15mA
tion is to use a bridge rectifier to perform full-wave rectifica- D3

tion, which increases the amount of current that can be sup-


plied and allows the filter capacitor to be smaller. The 1N4004
D2 D4
accompanying circuit in fact does this, but in a clever manner C2
that uses fewer components. Here we take advantage of the
470μ
fact that a Zener diode is also a normal diode that conducts 12V 12V 16V
1W 1W
current in the forward direction. During one half wave, the cur-
rent flows via D1 through the load and back via D4, while dur- 004097 - 11
ing the other half wave it flows via D3 and D2.
Bear in mind that with this circuit (and with the bridge rectifier
version), the zero voltage reference of the DC voltage is not to drive a triac, which normally needs such a connection. How-
directly connected to the neutral line of the 230-V circuit. This ever, circuits that employ relays can benefit from full-wave rec-
means that it is usually not possible to use this sort of supply tification.

76 Elektor Electronics 7-8/2000


SUMMER CIRCUITSCOLLECTION
The value of the supply voltage depends on the specifications A final warning: this sort of circuit is directly connected to
of the Zener diodes that are used, which can be freely chosen. mains voltage, which can be lethal. You must never come in
C2 must be able to handle at least this voltage. The amount of contact with this circuit! It is essential to house this circuit
current that can be delivered depends on the capacitance of safely in a suitable enclosure (see the ‘Safety Guidelines’ page
C1. With the given value of 220 nF, the current is approxi- that appears occasionally in Elektor Electronics).
mately 15 mA. (004097-1)
047 Voltage Reference for Battery Powered Circuits
The LM4050 from National Semiconductor is a high precision
micropower shunt voltage reference in a sub-miniature, sur- 12V

face-mount, three pin, SOT-23 package. The unit operates in C1


the industrial temperature range of –40°C to +85°C. The
100n
design eliminates the need for an external stabilising capaci-
tor and is at the same time stable when operated into any 8
2
capacitive load. The unit is available in several different, fixed LM4050
R1 IC1a
1 -2.5
reverse breakdown voltages from 2.500 V, 4.096 V, 5.000 V, 3
R2

15k
8.192 V to 10.000 V. The minimum operating current ranges 4

2k5
from 60 μA for the LM4050-2.5 to 100 μA for the LM4050-10.0
this, along with its tiny outline, makes it ideal for use in bat-
tery powered applications. The LM4050 is available in three
different grades of accuracy of 0.1%, 0.2% and 0.5%, all have UZ 2V5 I
I= = = 1mA
a low temperature coefficient of less than 50 ppm/°C. R2 2k5
During the manufacturing process, the use of fuse and 1
IC1a = /2 LMC6062, (1...9V)
1
zener-zap reverse breakdown voltage trimming ensure that /2 TLC272
the premium (or A grade) components have an accuracy of
better than ± 0,1% at 25°C. Stable reverse breakdown accu-
racy over a wide range of temperatures and operating currents RZ

2k5
LM4050
is achieved by bandgap reference temperature drift curvature
1
correction and a low dynamic impedance. Altogether this is a 3
versatile component with an impressive specification. 2
U out
The full data sheet is available from the web site:
www.national.com 004027 - 11
(004027)
048 Diode Radio for Low Impedance Headphones
B. Kainka
If you ever look at construction notes for building old detector A1 * zie tekst
see text
* siehe Text
voir texte
type radios the type of headphones specified always have an * *
impedance of 2 × 2000 Ω. Nowadays the most commonly
available headphones have an impedance of 2 × 32 Ω, this rel- L1 D1

atively low value makes them unsuitable for such a design. *


AA119
*
Tr1

However, with a bit of crafty transformation these headphones Ge


can be used in just such a design. To adapt them, you will C1
C2
need a transformer taken from a mains adapter unit, the type
that has a switchable output voltage (3/4.5/6/9/12 V) without 500p 10n
the rectifying diodes and capacitor. Using the different taps of 2x 321
this type of transformer it is possible to optimise the imped-
30 : 1
ance match.
004033 - 11
For the diode radio (any germanium diode is suitable in this
design) the key to success is correct impedance matching so
that none of the received signal energy is lost. The antenna used it should be connected to a lower tap point to reduce its
coil on the 10 mm diameter by 100 mm long ferrite rod is made damping effect on the circuit. You can experiment with all the
up of 60 turns with a tap point at every 10 turns; this is suit- available tapping points to find the best reception. With such
able for medium wave reception. If a long external aerial is a simple radio design, the external aerial will have a big influ-

7-8/2000 Elektor Electronics 77


SUMMER CIRCUITSCOLLECTION
ence on its performance. Tip: If your house has metal gutter- able to connect a loudspeaker directly to the output or if the
ing and rain water pipes, it will be possible to use these as an volume is too low, why not try connecting the active speaker
aerial, as long as they are not directly connected to earth. system from your PC?
Those who live in the vicinity of a broadcast transmitter may be (004033)
049 Single-Opamp 10-MHz Bandpass Filter
H. Steeman
A bandpass filter is usually used to pass frequencies within a 15V
R
certain frequency range. If a high-performance opamp is used,
1101
such a filter can also be used at relatively high frequencies. As
shown in the schematic diagram, here we have chosen an OPA603
U in R C
OPA603, which is a fast current-feedback opamp with a 3
U out
1101
100 MHz bandwidth for gain values between 1 and 10 (0 to 100p IC1
6

20 dB). If the circuit only has to handle a narrow range of fre- 2

quencies, as in this case, the gain can be increased. With a


C1
current-feedback opamp, just as with an ordinary opamp, the
R1 5p
5111
2R R2
C

2201

2611
100p

G = 70
fC = 10 MHz

004059 - 11 15V
fC = 1
2√2 π RC
22 dB

negative feedback between the output and the inverting input


determines the gain. In addition, the impedance of the feed-
back network determines the open-loop gain and the fre-
quency response. With the component values shown in the
schematic diagram, signals outside the passband are attenu-
ated by 22 dB. The centre frequency of the filter is 10 MHz. As
indicated by the printed formula, the centre frequency can eas-
ily be altered. However, keep in mind that 10 MHz is roughly the
1
maximum frequency at which this circuit can be used. The cir-
/2fC fC 2fC
004059 - 12
cuit can be powered by a supply voltage of ±15 V.
(004059-1)
050 Analogue Optical Coupler
H. Steeman
U B1 U B2
It is sometimes necessary to make an electrically isolated con- 5V 5V
R3 R5 R7
nection in a circuit. An optocoupler is usually the key compo-
LED

10k

10k

4701
nent in such a situation. In most optocouplers, a single light-
emitting diode (transmitter) and a single photodiode (receiver) U out

are optically coupled inside the package. This solution is sat- R2


T2 T4
isfactory for transferring digital levels (such as the control sig-

68k
nals for a thyristor), since only two logical states (LED on or T1 T3
U in R1
LED off) have to be transferred. An exact (analogue) coupling 2N3904 2N3904
68k
is thus not necessary.
PD1 2N3906 R4 PD2 2N3906 R6
If an analogue voltage must be transferred, then it is impor-

101

101
tant that the voltages at the input and the output closely track
each other. To make this possible, the transmitter and receiver
must employ comparable components that are incorporated PD1 + PD2 + LED = IC1
into an analogue circuit. The type CNR200 and CNR201 opto- = CNR200/CNR201 004056 - 11

78 Elektor Electronics 7-8/2000


SUMMER CIRCUITSCOLLECTION
couplers that are available from Agilent (formerly Hewlett- mitter amplifier is the same as that of the receiver. Assuming
Packard) contain all the essential components for such a func- a supply voltage of 5 V, analogue voltages in the range of 0 to
tion. There are two photodiodes and one LED in a single pack- 3 V can be readily transferred. The isolation voltage between
age, with an optical coupling between the LED and one of the the input and output of this optocoupler is 1000 V. The value
photodiodes. The schematic diagram shows how the trans- that can be achieved in practice depends on the printed cir-
mitter LED is optically coupled to the photodiode in the cuit board layout.
receiver. The remaining photodiode is incorporated into the (004056-1)
transmitter and ensures that the characteristic of the trans-
051 Single-Chip Switch Debouncer
2V7 ... 5V5
2V7 ... 5V5
1
t
100n
100n
2 5
4
5 40ms t MAX6817
1 6
IN1 OUT1
1 IC1 2 1 6
2 3 IC1
IN OUT 2 5
MAX6817
MAX6816 MAX6816 3 4
IN2 OUT2 3 4
S1 1 4
S1 S2 SOT23 - 6
1
2
2 3
SOT143
004043 - 11 004043 - 12
G. Kleine
Contact bounce is an age-old problem with all types of push- 2V7 ... 5V5
button switches and keypads that are connected to digital
components. The measures that are used to deal with the
repeated closing of the contacts when the switch is first acti- 100n
vated include RC networks, flip-flop circuits and software rou- 20 11 MAX6818
tines. Now there is a single IC that takes over this task and CH
1 20
delivers clean digital pulses to the following circuitry. 2 19
IN0 OUT0
The MAX 6816, MAX 6817 and MAX 6818 ICs are well-pro- 3 18
2 19
tected pushbutton switch debouncers with one, two and eight IN1 OUT1
3 18
4 IC1 17
inputs, respectively. The wiring for these ICs is simple, as IN2 OUT2 4 17
shown in Figure 1. No external components are needed. The 5
IN3 OUT3
16
5 16
switches connected to the inputs need only make contact to 6 15
IN4 OUT4 6 15
earth. Internal pull-up resistors are provided. These ICs work MAX6818
7 14 7 14
with supply voltages between 2.7 V and 5.5 V, with a current IN5 OUT5
consumption of less than 20 μA. The inputs can handle (fault) 8
IN6 OUT6
13 8 13
voltages up to ±25 V and electrostatic discharges up to 9 12 9 12
IN7 OUT7
±15 kV. 10 11
EN
Each MAX 681x IC works with an internal oscillator that clocks S1 S8
10 1 SSOP20
a counter. The counter is always reset whenever the input
level changes within 40 ms. Only after the level applied to the
input remains stable for longer than 40 ms will the counter 004043 - 13
increment to its final count and enable the output signal. This
sort of debouncing is used for both closing and opening the
switch.
The MAX 6818 can be connected directly to a data bus, since
it has an enable input (/EN) that switches the outputs to a stituted for the latter IC.
high-impedance (tri-state) condition when a High level is The MAX 6816 comes in a tiny SOT-143-SMD package, while
applied. There is also a Change output (/CH), which indicates the MAX 6817 comes in a 6-pin SOT23 SMD package and the
a change of state of one of the pressed keys. The /CH output MAX 6818 in a SSOP20 package. Data sheets for these
can be directly connected to the interrupt input of a micro- debouncer ICs can be obtained via the Internet from
processor system. The pinout of the MAX 6818 corresponds to www.maxim-ic.com.
that of the well-known 74xx573 latch, so it can be directly sub- (004043-1)
7-8/2000 Elektor Electronics 79
SUMMER CIRCUITSCOLLECTION
052 Switch ICs with Adjustable Current Limiting
MIC2545
MIC254xA-1
Enable > 2V4 EN
MIC254xA-2
Enable < 0V8 OUT
1
+2V7...+5V5 EN
FLG
5 6 current trip level
IN OUT
overheating switch-off
7 8
IN OUT
MIC2545A
100k

MIC2549A
MIC2549
2 4 EN
ERROR FLG ILIM
RSET
OUT
3
100n 33μ FLG reset
current trip level flip-flop
overheating
004041 - 11 switch-off
004041- 12
G. Kleine The MIC2454A-1 switches on the MOSFET when the Enable
input is High (Vin > 2.4 V), while the MIC2454A-2 version
Transistors are often used for switching power supply volt- switches on the MOSFET when the Enable input is Low (Vin
ages. MOSFETs are most often used, since they have low ‘on’ < 0.8 V). The IC typically draws 90 μA when the switch is
resistances, and they are also available for large currents. enabled, but it draws less than 1 μA in the switched-off state.
What a discrete transistor or MOSFET lacks are protective This means that it can also be used for switching on battery-
functions, such as current limiting and overtemperature pro- operated equipment. The low operating current consumption
tection. of the MIC2545A makes a mechanical battery switch unnec-
The MIC2545A from Micrel can provide a solution to this prob- essary.
lem. This MOSFET switch has programmable current limiting, The operating state of this high-side switch is indicated by an
as well as undervoltage and overtemperature cutouts. It works open-gate flag output. An error condition (overcurrent, under-
with input voltages between +2.7 V and +5.5 V. With a typical voltage or overtemperature) in signalled by a low resistance
‘on’ resistance of only 35 mΩ, this IC can switch up to 2.5 A in at this output, so that an external pull-up resistor is pulled to
a DIP8, SO8 or TSSOP14 package. It also includes a soft-start earth.
circuit, which limits the switch-on current for the first two mil-
liseconds. An integrated charge pump generates the gate volt- The MIC2545A switches on again after an overtemperature
age needed for switching the MOSFET. cutout as soon as the chip temperature has dropped suffi-
The current limiting level can easily be set by an external ciently. However, in some cases it may be desirable to save
resistor between the ILIM pin and earth. The resistance value the overtemperature state and prevent the output from auto-
can be calculated using the following simple formula: matically being switched on again after an overtemperature
excursion. In such cases, the derivative type MIC2549A can
Rset = 230 / Ilim be used. It contains a flip-flop, which must be reset by deac-
tivating the Enable signal before the switch can be re-enabled.
where the current Ilim is in ampères and the resistance Rset is The MIC2549A is also available in two versions, namely the
in ohms. For a maximum current between 0.5 and 2.5 A, the MIC2549-1 with active high Enable and the MIC2549-2 with
resistance thus lies between 460 Ω and 92 Ω. In case of a short active low Enable.
circuit, the current is limited to around 1.6Ilim. The overtemperature cutout is triggered at a chip temperature
The MIC2454A is controlled via an Enable input. In order to of approximately 130 oC. The switch can be re-enabled after
satisfy all possible applications, it is available in two versions. the temperature drops below 120 oC.
1
+2V7...+5V5 EN
5 6
MIC2545A IN OUT
MIC2549A 7
IN OUT
8
2 4 MIC2545A

100k
FLG ILIM
MIC2549A
2 4

2201
1k
RESET FLG ILIM
3

6801
3

2k2

004041 - 13 BSS123
004041 - 14
SUMMER CIRCUITSCOLLECTION
The MIC2545A has an interesting feature that allows the RSET = 230 V/ILIM
switch-on current for a following assembly to be increased. If 0.5 A ≤ ILIM ≤ 2.5 A
a series RC combination is connected in parallel with Rset, the
effective resistance connected to the ILIM pin is reduced for a
ILIM⏐t<RC = 230 V / (1 kΩ⏐⏐220 Ω) ≈ 1.3 A
short time immediately after switch-on. During the charging
ILIM⏐t>RC = 230 V / 1 kΩ ≈ 0.23 A
time for the capacitor (corresponding to the time constant of
the RC combination, t = RC), the two resistors are connected RC = 220 Ω ⋅1 μF = 220 μs
in parallel, and the current limit value is thus increased. Once
the capacitor is charged, only the normal resistor is effective. ILIM = 230 V / 2.2 kΩ ≈ 100 mA
An additional interesting possibility is to switch the current ILIM = 230 V / (680 Ω⏐⏐2.2 kΩ) ≈ 440 mA
limiting level to a different value by means of a transistor,
which can for example be driven by a reset IC or a supply volt-
age monitoring IC. This allows the switch-on current to be lim- OK, the RESET signal goes High and switches on the FET.
ited to a lower level. As long as the input voltage is not high Both resistors are now connected in parallel, and the current
enough, the current limiting level is switched to a low value, limiting level lies at a higher value. You can obtain more infor-
since RESET is Low and the FET is cut off, so that only one of mation at www.micrel.com.
the two resistors is effective. As soon as the input voltage is (004041-1)
053 Opto-Isolated RS232 Interface
A. Grace +12V

–12V
This design is for a simple half-duplex optically isolated inter- D2

face that converts a 20 mA current loop (connected to J2) into U+


R1
J1 1N4148
an RS232 signal (on J1) which can be monitored by, say, a lap-

10k
D4
top PC. In the author’s case, the system operates at 1200 baud. 1 IC1c
10
The signal to be monitored should be a fully digital on-off com- 6
1N4148
8
& 9
9V
1V5
2 0V3 1V4
munications signal, rather than the usual 4/20 mA (industrial) D6
7 IC2
analogue transmission standard. 5 6 1
3
The overall action of the interface is of double inversion. 1N4148 R2 J2
8 D7

47k
C1
The current in the comms signal is normally present when no 4
data is being sent, and the current is switched off to represent 9
100μ 16V
data. Consequently the transistor in the opto-isolator is nor- 5 4
4N32
2

mally switched on, giving a low at the input to IC1c. This is 1N4148
C2 *
CNY17-2
inverted to give a high (+12 V) on the RS232 input, which is U+
100μ 16V
the default condition for no data. 3 6 11
D5 IC1a IC1b IC1d
The interface itself is powered by the serial (RS232) port
used to monitor the comms signal. This is achieved by steal- 1N4148
1 & & 14

ing power from unused RS232 signal lines. The standard RS232 IC1 7
D3 2 5 4 13 12
1
connector is a 9-way male ‘D’ type whose connections are
shown in the table. 1N4148
The positive and negative supply rails for IC1 are set up by D1 IC1 = 1488
U– U–
rectifying the unused RS232 potentials via diodes D1 through
1N4148 004014 - 11
D6, with C1 and C2 acting as reservoir capacitors.
Opto-isolator devices normally switch on reasonably fast
but are relatively slow to switch off. Resistor R2 speeds up
turn-off time. Diode D7 has been included to protect the opto- drive, a current limiting resistor is required at the opto-isola-
isolator against excessive reverse voltages — these may occur tor input. This resistor will typically be between 330 Ω and
when the interface is accidentally wired back to front. 1 kΩ, and the LED current should always be kept well below
If voltage drive is used instead of 0/20 mA pure current 50 mA to prevent damage to the opto-isolator.
The circuit may be modified for compatibility with 4/20 mA
industrial current-loop systems by carefully matching the
Pin no. Signal In/Out value of R2 to the opto-isolator used. In general, the lower the
1 DCD In value, the less sensitive the interface will become. Almost any
2 RxD In opto-isolator device may be used provided its transfer is close
3 TxD Out to 100% (or ‘1’ — check datasheets). Good results were
4 DTR Out obtained with, among others, the Siemens CNY17-2. This
5 Common device boasting a breakdown voltage specification of 5,300 V,
6 DSR In
it is Class-2 compliant provided the distance between the pins
is greater than 6 mm. This however will require some bend-
7 RTS Out
ing. For Class-1 safety requirements, the normal pin distance
8 CTS In
governed by an 8-way DIL socket is adequate.
9 RI In
(004014-1)

7-8/2000 Elektor Electronics 81


SUMMER CIRCUITSCOLLECTION
054 Universal Symmetric Power Supply
T. Giesberts
This power supply has been specially designed for the
20th-order filter described elsewhere in this issue, but it
can also be used for a legion of other opamp circuits.
The supply voltage is set to ±17.5 V, in light of the max-
imum output level of the filter. This benefits the signal
to noise ratio. The specified absolute maximum supply
voltage for most opamps is ±18 V, and we have inten-
tionally kept a bit below this limit.
The transformer is one of a series made by Hahn
(model UI 30), so the circuit can be easily adapted for
higher power levels by using a different transformer.
All transformers in this series have the same footprint
(53 × 44 mm), with only the height changing accord-
ing to the power capacity. The series consists of 3, 4,
6, 10 and 16-VA models, which are respectively 16.3,
18.3, 21.8, 27.7 and 37.6 mm high. There are two sec-
ondary windings, with standard voltages of 2 × 6, 2 ×
9, 2 × 12, 2 × 15 and 2 × 18 V. We chose a 4 VA trans-
former with 2 × 18 V secondaries for this application.
Certain models are also available from other manufac-
tures, but the locations of the secondary connections
are different. The circuit board layout can accommodate
two different types. put voltage (LM317) is
The circuit is based on the well-known LM317 and LM337 volt-
age regulators. Since the output voltages are set by voltage Vout = 1.25·(1+R2/R1) + Iadj·R2
dividers, any voltage between 1.25 V and 40 V is possible. In
case you don’t already know, the formula for the positive out- The same formula applies to the negative regulator, using R3
F1 Tr1
L1 = B82721-K2401-N21
32mA T
K1 C14 C11
L1 IC1
C16 C15
22n 22n LM317 17V5
B1
C13 C12

2491
R1
2x 27mH
22n 22n C9 C7 C3 C1
C15, C16 = 100n / 275V 220μ 100n C5 10μ 100n

3k24
X2 40V R2 63V
2x 18V B80C1500
4VA
10μ 63V
LM317 LM337 D1 C6

3k24
R4
C10 C8 10μ 63V C4 C2
POWER
220μ 100n 10μ 100n

8k2
R5

2491
40V R3 63V
LM337 17V5
adj. adj.
IC2 004064 - 11
COMPONENTS LIST C9,C10 = 220μF 40V radial (80V piv, 1.5A peak)
C11-C14 = 22nF ceramic Semiconductors: F1 = fuse, 32mA slow, with PCB
Resistors: C15,C16 = 100nF 275VAC class D1 = high-efficiency LED mount holder and cap
R1,R3 = 249Ω 1% X2 IC1 = LM317T (TO220 case) Tr1 = mains transformer, PCB
R2,R4 = 3kΩ24 1% IC2 = LM337T (TO220 case) mount, secondary 2x18 V/4VA
R5 = 8kΩ2 Inductors: (e.g., Hahn type BV UI 302
L1 = 2x27 mH (e.g., Siemens type Miscellaneous: 0156)
Capacitors: B82721-K2401-N21) K1 = 2-way PCB terminal block, PCB, order code 004064-1
C1,C2,C7,C8 = 100nF ceramic (Electrovalue) raster 7.5mm
C3...C6 = 10μF 63V radial B1 = B80C1500, rectangular case
SUMMER CIRCUITSCOLLECTION

+ 0 - and R4 instead. Capacitors C5

32mA T
1-460400 004064-1
ROTKELE )C(
C1 and C6 increase the ripple

H3
H4

C2

F1
TR1 C3 suppression to 80 dB. Depend-

C5

C4
ing on the application and the

C6
C15

R2 R4 output power, it may be nec-


R1 R3
essary to use heat sinks for

IC1

IC2
the regulator ICs.

C7
C8 The power supply has a sim-
L1

D1
ple mains filter to suppress

C10
C9
common-mode interference.
C16

This is primarily needed if the

C13
B1 C11
supply is used to power sensi-

R5
tive circuits. The coil is a
K1

Siemens type that has been


used in many other Elektor

H1
H2

C12 C14
~
~

Electronics projects. D1 acts as


a mains voltage indicator. The
indicated value of the fuse,
both in the diagram and on
the circuit board, is 32 mA
(slow). This value will have to
be modified for higher power
levels (as will the label on the
circuit board!). With lower out-
put voltages and larger output
currents, the filter capacitors
C9 and C10 must be made
larger. The working voltage
can then be reduced, so the
physical dimensions will prob-
ably remain the same.
The PCB shown here is avail-
able ready-made through the
(C) ELEKTOR Publishers’ Readers Services.
(004064-1)
004064-1
055 Sensitive Overload Sensor
H. Steeman
The best way to measure the current in a circuit is to place a U SUPPLY RS
sense resistor in the current path. The higher the resistance,
the more exact the measurement will be. However, the draw-
IS
back of a high resistance is that it affects the operation of the
circuit in which the measurement is being made. If an active IC1
D1
7
sort of sensor is used, the sense resistance can be kept small. 2 U OUT
6
The circuit diagram shows how a sensitive overload indicator LF351
3
can be built using a simple opamp (such as an LF351) and a R1 4
sense resistor in the current path. A voltage difference is gen-

1k
erated between the plus and minus inputs of the opamp with
the help of a diode. Usually, the voltage drop across D1 (a
Schottky diode) will be 0.2 to 0.3 V. This value can be influ-
004058 - 11 U
enced somewhat by R1, which affects the amount of current
that flows through the diode. The larger the value of R1, the
smaller the voltage drop across the diode. The inverting input
of the opamp is connected to the positive supply voltage fol- age drop across D1, the output of the opamp will switch to the
lowing the sense resistor Rs. Consequently, the voltage level positive supply voltage level. An indicator lamp or relay can
at the output of the opamp will be equal to the negative sup- be connected to the opamp output. The maximum supply volt-
ply voltage, for example –5 V. As the current that flows through age for the opamp is ±15 V, so the circuit can readily be used
the sense resistor Rs increases, the voltage on the inverting to monitor symmetric power supplies with voltages between
input of the opamp decreases. As soon as the voltage drop 5 and 15 V.
across Rs (= Is × Rs) becomes slightly greater than the volt- (004058-1)

7-8/2000 Elektor Electronics 83


SUMMER CIRCUITSCOLLECTION
056 20th-Order Measurement Filter
T. Giesberts
This circuit is based on the
configuration of a fifth-order
Butterworth filter using only
one opamp (see p 116 of the
1995 Summer Circuits issue).
Here we achieve a 20th-order
filter by connecting four fifth-
order sections in series. The
first three sections are tapped
off at TP1, TP2 and TP3. As
you will see, the transfer char-
acteristic is not a pure 20th-
order Butterworth, but it does
have the steepness of such a
filter. The desired bandwidth
for the whole filter is achieved
by adjusting the turnover
point of each section to a
higher value. The –3 dB band-
width of the total filter is the-
oretically set to 22 kHz, which
means that a value of 26 kHz must be used for each section. tics of the filter. There are 12 components per section that must
The measured total bandwidth of the prototype is 20.9 kHz. In be selected within this tolerance (with each parallel network
this regard, we have to point out that all components must be counting as one component)! Even with selected components,
selected with a tolerance of less than 0.1 percent, since it is the practical implementation will always vary a bit from the
otherwise pointless to try to copy the circuit. Excessive toler- theoretical behaviour (with a somewhat lower turnover point,
ances in the component values will degrade the characteris- for example).
TP1 TP2
R46 R48
C2 C4 C7 C9
2k00

2k00
1n5 1n 1n5 1n
R1 R3 R5 R7 R9 R12 R14 R16 R18 R20
6 2
K1 4k64 5k49 4k64 4k42 4k99 4k64 5k49 4k64 4k42 4k99
7 1
IC2b IC2a
R2
422k
R4
357k
R6
412k
R8
* R10
374k
5
R13
422k
R15
357k
R17
412k
R19
* R21
374k
3
R11 R47 R22 R49
* C1 C3 C5
* C6 C8 C10
2k00

2k00
2n7 2n2 2n7 2n2
390p 390p
TP3
R50 R52
C12 C14 C17 C19

2k00

2k00
1n5 1n 1n5 1n
R23 R25 R27 R29 R31 R34 R36 R38 R40 R42
2 6
9k53 5k49 4k64 4k42 4k99 9k53 5k49 4k64 4k42 4k99 R45 K2
1 7
IC1a IC1b 751
R24
340k
R26
357k
R28
412k
R30
* R32
374k
3
R35
340k
R37
357k
R39
412k
R41
* R43
374k
5
R33 R51 R44 R53
C11 C13 C15 C16 C18 C20
9k09

2k00

9k09

2k00
2n7 2n2 2n7 2n2
390p 390p
004094 - 11
17V5 17V5
C23 C21
* see text
10μ
63V
100n 8 8 * siehe Text
IC1 IC2 IC1, IC2 = AD828AN
C24 C22 4 4
* zie tekst
* voir texte
10μ 100n
63V
17V5 17V5
SUMMER CIRCUITSCOLLECTION
Elektor
The filter calculations employ exact E12 values for the capac- +6
itors, which produces rather ‘strange’ values for the resistors. -0
-6
It is necessary to connect resistors with E96 values in paral- -12
lel to achieve the necessary resistance values. Table 1 sum- -18
-24
marises the resistor values. -30
The choice of opamp is even more critical than the precision -36
-42
of the components. The opamps must have a very large band-
-48
width and low distortion in the audio band, and they must be d
B -54
r
able to supply enough current. This last factor comes from the -60
-66
fact that the dimensions of the filter components represent a -72
compromise between the amount of noise generated by the -78
-84
impedance of the filter network itself, the load on the opamp -90
due to the negative feedback and the load of any following -96
-102
network. In practice, a video amplifier must be used to avoid -108
affecting the filter characteristics. The chosen opamp, an Ana- -114
10k 20k 30k 40k 50k 60k 70k 80k 90k 100k 200k
Hz 004094 - 12
log Devices AD828AN, does not however have the desired dis-
tortion specifications. It is only possible to achieve better spec-
ifications by using a discrete amplifier specially designed for Table 1
this application. With such an amplifier, it is possible to sig- Resistors (A = 2 x) Parallel Theoretical
nificantly reduce the impedance of the filter network and R1, R12 = 4k64
increase the maximum current, in order to improve the speci- R2, R13 = 422 k 4k5895 (4k58974)
fications. R3, R14, R25, R36 = 5k49
This circuit was originally intended to be used to measure R4, R15, R26, R37 = 357 k 5k4069 (5k40684)
codecs, for example. Their specifications are often given only R5, R16, R27, R38 = 4k64
for the audio band, for which a steep measurement filter is
R6, R17, R28, R39 = 412 k 4k5883 (4k58787)
used. The mixer products with the sampling frequency, which
R7, R18, R29, R40 = 4k42
lie outside the audio band, are often not attenuated by any
R8, R19, R30, R41 = (5M62) 4k4200 (4k41649)
more than 50 to 70 dB by digital filtering.
R9, R20, R31, R42 = 4k99
In order to produce a 5th-order filter using the illustrated
arrangement, each section must have a gain of 2. In order to R10, R21, R32, R43 = 374 k 4k9243 (4k92361)
prevent the amplification of the overall filter from becoming to R11, R22 = open
large, extra attenuators have been added to the last two sec-
tions. We chose 2 Veff as the maximum allowable signal level. Alternative values:
The attenuators form the first resistances of the filter sections, R7, R18, R29, R40 = 4k53
which means that the parallel impedance of R23, R24 and R33 R8, R19, R30, R41 = 178 k 4k4176 (4k41649)
is equal to that of R1 and R2. The printed circuit board layout
allows such networks to be used for all four sections (with Extra 6 dB attenuation:
positions R11 and R22 open). If the measured values of R7, R23, R34 = 9k53
R18, R29 and R40 match the desired theoretical value (which R24, R35 = 340 k
falls within the tolerance range of a 1% 4k42-Ω resistor), no R33, R44 = 9k09 4k5896 (4k58974)
parallel resistors are necessary in these
positions. Make sure that the signal source
has DC coupling. It is recommended to use R1

TP1
R5 R9 R20 R16 R12
a very good audio opamp in series with the R2

R46
H8

H6
R6 R10 R21 R17 R13
input, to provide a well-defined input

R48
C1

C2

C3

C4
C5

C10
C9

C8

C7

C6
impedance.

IC2

1-490400
R11

R22
T
R4 R8 R19 R15

004094-1
The brief specifications of the filter are as R3 R7 R49 R18 R14

R47

TP2
C23

T
follows:

ROTKELE )C(
R37 R42 C22 R31 R24

C24
C21

R53
R36 R43 R51 R32 R23

R45
C16

C17

C18

C19
C20

C15
C14

C13

C12

C11
supply voltage ±17.5 V

IC1
OUT

R33
bandwidth (–3 dB) 20.9 kHz R44 R39 R41 R50 R30 R28 R26
suppression (40 kHz, 2 Veff in) 78 dB

R52
R34 R38 R40 R29 R27 R25

H5
H7
THD+N (1 kHz, 1 Veff in) 0.005 %
R35

0
TP3

-
THD+N (1 kHz, 2 Veff in) 0.009 %
S/N (2 Veff in) 94 dB
gain (10 kΩ load) 7.75
output impedance 75 Ω
current consumption 28 mA

004094-1 (C) ELEKTOR


Figure 3 shows the measured characteris-
tics of each of the cumulative sections. The
ultimate suppression is around 94 dB
before the signal disappears below the
noise level. The gain of the first section is
naturally 6 dB lower.
(004094-1)
SUMMER CIRCUITSCOLLECTION

057 E12 Series in Excel


K. Walraven
You can do all sorts of neat
things with Excel, such as
computing the nearest E12
value. Select the cell under
‘Input’ and enter the value
that you want to have rounded
off. Type the value with all
necessary zeros, thus ‘6800’
instead of ‘6k8’ and ‘1200000’
instead of ‘1M2’. The nearest
E12 value will appear in the
cell just to the right. It’s handy
to permanently install this pro-
gram on your computer, so
that it’s always available
when you need it.
The program also works with
values less than 1 Ω; all you
have to do is to enter a leading
period as a separator. The
result will be displayed to two
decimal places, but Excel nat-
urally works internally with
more decimal places. If you
want to see them, select the
cell and click on ‘Increase Decimal’. Since the worksheet is arithm of the entered value is taken to determine the power of
protected, you will first have to delete the protection via Tools ten that it contains, and the entered value is then divided by
→ Protection → Unprotect Sheet. this number to yield a value between 1 and 10. Next, this value
Maybe you have another nice application that might interest is looked up in a normalised E12 table. The result is then mul-
other readers, or you may just want to modify the worksheet. tiplied by the power of ten, to produce a value with the proper
After you have deleted the protection, you can start to work. number of zeros. Of course, we could have just made a big E12
First make the hidden columns visible by selecting columns B table containing all possible values, but that is not such an
and F and then selecting Format → Column → Unhide. The log- elegant solution. (004072-1)
058 PC Battery Charger
B. Kainka
Some workbenches can’t help ending up looking like a rats
nest of cables and equipment, so its always an advantage if a
D1
piece of mains equipment can be removed from somewhere to
TXD – 10V
free up an extra mains socket. Here we are using the ubiqui-
tous PC as a battery charger. An unused serial interface port D2 R1
can supply enough current to charge (or trickle charge) low- DTR 1001
BT1
capacity Nickel Cadmium (NiCd) batteries. You could for exam-
ple, use the batteries in a radio and charge them during use. D3

The three serial port connections TxD, DTR, and RTS, when RTS
not in use, are at –10 V and can supply a current of around 10 3x 4V8
to 20 mA (they are short-circuit protected). The circuit shown 1N4148 NiCd
supplies a charging current of approximately 30 mA. If it is
necessary to alter the polarity of the charging circuit then it is
GND
a simple job to reverse the diodes and using software, switch
the port signals +10 V. Those interested could also write a 004036 - 11
software routine to automatically recharge the batteries.
(004036)

96 Elektor Electronics 7-8/2000


SUMMER CIRCUITSCOLLECTION
059 Coaxial S/PDIF Output
5V
IC1d
13
11
12 =1
C1 R3 K2
IC1c Tr1
10 751
8
9 =1 100n
R2
2201

IC1b
5
K1 R1 6
4 =1
1M

20:2
IC1a
2 C2
3
1 =1
47n
L1 5V
K3
47μH
+5V
C3 C4 14
GND
IC1 IC1 = 74HC86
GND
100n 47μ 7
+12V 25V
004066 - 11
T. Giesberts The PCB shown here is unfortunately not available ready-
This circuit is an alternative to the optical S/PDIF output made through the Publishers’ Readers Services.
described elsewhere in this issue. The quality of the connec- (004066-1)
tion provided by this link is usually better than that of an opti-
cal link (less jitter). In order to avoid earth loops, a small output
transformer is normally used for digital audio signals. The con-
struction of such a transformer has been described several
times in Elektor Electronics. It is based on a Philips toroidal
core, with 20 turns on the primary and 2 turns on the second-
ary, both using 0.5-mm varnished copper wire. An output sig-
nal of 0.5 Vpp across 75 Ω must be delivered, which means that
10 Vpp is necessary on the primary. This signal is provided by COMPONENTS LIST
a quad EXOR gate (74HC86). A clean symmetrical buffer stage Semiconductor:
is created by wiring two EXORs as inverters (IC1c and IC1d) Resistors: IC1 = 74HC86
and letting the other two work without inversion (IC1a and R1 = 1MΩ
IC1b). Using EXOR gates makes the delay times of the two R2 = 220Ω Miscellaneous:
R3 = 75Ω K1 = 2-pin SIL header
buffers the same, and using two gates in parallel on each side
K2 = cinch socket, PCB mount
allows more current to be delivered. R1 ensures that the gates Capacitors: (e.g., Monacor/Monarch T-
have a defined level if there is no connection to the signal C1,C3 = 100nF ceramic 709G)
source, In the absence of an S/PDIF signal, C1 prevents a C2 = 47nF ceramic K3 = 4-pin SIL header
short-circuit current from flowing. R2 damps any overshoots C4 = 47μF 25V radial Tr1 = ferrite ring core Philips type
(which mainly occur if there is no load). C2 provides an HF TN13/7,5/5-3E25. Primary 20
earth connection for the screen of the interconnecting cable. Inductor: turns, secondary 2 turns
L1 = 47μH
The power supply is well decoupled by L1, C3 and C4. The
current consumption with a signal and load is around 4 mA,
but with no S/PDIF signal it drops to zero.
+ TT
K3 004066-1
5V

C1
H3
H1

OUT
TR1
K1

L1
T
R3

IC1
R2
C4 K2

R1
C2
1-660400 004066-1

H2
H4
C3 ROTKELE )C( (C) ELEKTOR
SUMMER CIRCUITSCOLLECTION
060 Pressure Switch
modified as described below.
Start with the sensor sensitiv-
ity specification from the data
sheet (approximately
60 mV/bar/volt in our case).
Since the supply voltage of the
sensor is 5 V minus 3 diode
drops, or around 3 V, the net
sensitivity is thus 180 mV/bar.
The range of the sensor is 0 to
350 mbar, so the maximum
output voltage is 63 mV. The
following amplifier has a gain
of approximately 30, so the
output signal ranges between
0 and 1.89 V. This voltage is
compared to the voltage on
the wiper of P1, which can be
varied between 0 and 2.5 V. If
the sensitivity differs from the
nominal value, the amplifica-
tion can be adjusted as neces-
sary using R10.
Finally, a remark on the tem-
perature compensation. The
sensor used here has a tem-
perature coefficient of
J. Schuurmans 2100 ppm/degree. Other types of sensor will have somewhat
A simple pressure switch with a range of 50 to 350 mbar can be different values (consult the data sheet). The supply voltage
made using a pressure sensor. If you can accept somewhat should thus increase by 2100 ppm of 3 V for every degree,
reduced linearity, the sensor can even be used up to 500 mbar. which is 6.3 mV per degree. The voltage across a silicon diode
As shown in the schematic diagram, the circuit contains very drops approximately 2 mV per degree, so the supply voltage
few components other than the sensor. D1, R1, C1 and D5 form of the sensor increases as the temperature increases. This
a simple voltage stabiliser that holds the supply voltage for compensates for its decreased sensitivity. With the indicated
the sensor and opamps at 5 V. The three diodes in series with sensor, three diodes in series are needed to just about fully
the sensor provide temperature compensation (more on this compensate for its temperature coefficient. Two diodes are suf-
later). The differential output signal from the sensor is amplified ficient for the previously mentioned Exar sensor.
30× by an instrumentation amplifier composed of opamps (004070-1)
IC1a, IC1b and IC1c. The
amplification factor can be
adjusted if necessary by mod- OC
ifying the value of R10. The
amplified output signal is R1 R3 R2
D2
compared to the voltage on

4701

10k

1k
R8 4
the wiper of P1. If the voltage 1N4148
3
IC1

1k
R4 R5
1
that results from the pressure D1 D3 IC1a 10k 39k 11
D4
2
R6
being measured is less than 1N4148

10k
1N4148
rood rot
the value set by P1, the output I = 10mA R7 red rouge
of comparator IC1d is High J1 VSUP
IC2 1 270k
Vexc+
and LED D4 is on. An external 12V
C1
D6
Vout+
2 R10 9
0

3k9
8
load can be switched via the GND
MLX90240 IC1c
13
14 R8
T1
15 10
open-collector output of T2. 33μ Vout– IC1d 4k7
12
16V Vexc–
We used a Melexis MLX90240 16
2x
T2
BZX79 R12 R11 BC547
sensor (www.melexis.com), D6
5V1

10k
12k
but unless you work in the groen grün 6
R13
automotive industry, you green vert
IC1b
7
10k
won’t be able to obtain this 5
R14
IC1 = LM324
sensor. An Exar sensor (such D7

39k
P1
as the SM5310-005-G-P; see 1N4148 10k
www.exar.com) or a Motorola
type can be used instead. If OUT 004070 - 11
necessary, the circuit can be
SUMMER CIRCUITSCOLLECTION
Clap Activated Switch 001
B. Trepak
+8V
R1 1 R614 D5
This circuit has been designed to IC1 = 4049
IC1 IC2
C4 C1
10k

4M7

IC2 = 4013
respond only to two hand claps which 8 7
100n
100μ
8V2
25V 0V 0V
3V68 3V68
occur in (relatively) quick succession, C5
and to ignore one hand clap or even con- 3V68 3V68
1n
5V52
tinuous clapping, as well as most other R2
100k
R3
1M
R8
470k
sounds which normally have a lower fre- 3V45
IC1.A IC1.B IC1.C IC1.D IC1.E IC1.F
quency contents than a hand clap. Even C2
3 2
C3
5 4
R4
7 6
D1
9 10
R7
11 12 14 15
1 1 22k 1 1 47k 1 1
so, the system is not foolproof but is 1n 100n 1N4148
1
should be adequate for simple domestic 8V02 2 3
MIC1 R5
5V6

C6
applications such as switching lights on
330k

and off. 1n
The circuit diagram and the accompa-
nying timing diagram will be discussed
briefly to explain the basic operation of +8V R14
I 5 40mA
+12V
the circuit. D7
1501
R12
The sound picked up by the electret C8
10k

microphone is first amplified to a level R10


470μ D6 Re1
0V 16V
1k

suitable for further processing. This is


3x D3
done with two inverters from a 4049 IC, 1N4148 1N4148
0V
which is normally listed as a ‘hex 4 D4
5 1
D
inverter’ package. By connecting high IC2.A 9
D
13
6
3 2 R11 IC2.B
value feedback resistors between the C D2
11 12
0V1
470k

S R C R13 12V
input and output of each inverter, and 6 4 S R

4k7
5
coupling the inverters with a capacitor R9
8 10 T1
C7
(C3), a primitive but otherwise perfectly
10k

0V 0V58
0V79
2μ2
BC547B
adequate analogue amplifier is created. 16V 0V
The value of capacitor C2 at the amplifier 014001 - 11
input is such that only higher frequency
sounds are amplified. The amplifier out-
put signal is ‘squared’ before being used to charge C4 via LED D1 is connected to the Q output of IC2a and will
D1. The final two inverters from the 4049 package, IC1e and indicate the time slot available for the two successive claps.
IC1f, are configured to act as a Schmitt trigger. The first The circuit is best powered from a mains adaptor set to
inverter of this pair produces a negative pulse each time a achieve about 12 V DC output voltage when loaded with
sound of sufficient amplitude is picked up by the micro- 40 mA plus the relay coil current.
phone. The duration of this pulse is determined by that of
the sound and the values of C4-R6 which are chosen to
ensure that the output will only go high when the sound
ceases. The final inverter produces a corresponding posi- 1
tive pulse.
The rising edge of the Schmitt trigger output signal is
2
differentiated by C6-R9 producing a positive going pulse
when the sound ceases. This triggers monostable IC2a
3
built around one half of a 4013 dual D flip-flop. If a second
pulse appears on D3 after the first one has ceased, while 4
the output of the monostable is still high, the clock input of
toggle flip-flop IC2b will go high causing the Q output to 5
go high and T1 to be turned on. Consequently relay Re1 is
energized and the load is switched on and will remain on 6
until a valid clap command is received (toggle function). 014001- 12
SUMMER CIRCUITSCOLLECTION

The microphone is an electret (a.k.a. ‘condenser’) type the manufacturer and a minimum contact distance of 6 mm
with an internal amplifier which is normally supplied with- between all contacts and wires carrying the mains voltage.
out any leads. The pad connected to the microphone The coil resistance of the relay should not be lower than
encapsulation is usually the negative terminal. about 400 Ω to prevent overloading of T1 and the supply
When the relay is used to switch mains-powered loads, voltage dropping when the relay comes on. Only the make
electrical safety precautions should be observed, includ- contact of the relay is used.
ing compliance with the relay contact ratings specified by (000167-1)
Dual High Side Switch Controller 002
One of the most frequent uses of n-channel MOSFET’s is as
a voltage controlled switch. To ensure that the MOSFET +1V8...+5V5
delivers the full supply voltage to the load it is necessary for
C1
the gate voltage to be a few volts above the supply voltage
level. This can be a problem if no other suitable higher volt- 10μ
6 T1
age sources are available for use elsewhere in the circuit. D

The LTC 1982 dual high-side switch controller from Lin- 1 5 G


SHDN1 GATE1
ear Technology (www.linear-tech.com) solves this problem S
IC1 T2
by incorporating a voltage tripler circuit in the gate driver LTC1982
D

stage. The gate voltage is limited to +7.5 V which is 2.0 V 3


SHDN2 GATE2
4 G

above the IC’s maximum operating voltage. It can directly S

drive the gate of logic-level MOSFET with a VGS(th) from R L1 R L2


2
1.0 V to 2.0 V. A suitable n-channel logic level MOSFET
would be the BSP 295. This device can switch up to 1.5 A
and is available in an SOT 233 SMD package.
014134 - 11
(014134-1)

You might also like