Us200401 PDF
Us200401 PDF
Us200401 PDF
Climate Logger
Recording temperature and humidity
Design by T. Poms http://chripo.icb.at/Rooney
+U HUM +U HUM
R4
220Ω
R2 R5
14
68k
100k
C10 C8
R10
IC1 R11
150k
10k
IC1.A 5
P1 MCP6041
8
OUT TR 250k
CNTR
HS1101 2
THR 11
6
TR R3 R13
CNTR C9 C5
47k
10M
3 IC1 = TS556
10µ 100n
C3 C2 C1 16V
+5V
LM385-2.5
* * *
IC2
+5V
* see text C11
R14
D5 78L05 +5V
10k
100n
1N4148
R16 R17
24 K5 K4 C7 C6
1k
1k
1 19 330n 22µ
VBAT RST
R21 R19 R20 20 16V
2 IC4 I/O
1k
1k
100k
X1 21 T2
X1 SCLK R15
C7
1-670030 030076-1
ROTKELE )C( R15 (C) ELEKTOR
R17 T1
IC2
R3 C6
Y
H2
H3
R4 K6
R10 P1 K4 D4
R9 K2 R18
R11
K3 D5
R12 C5 C11 K5 R16
D3 R14
IC3
R20
IC4 R19
Bt1- C8
+
D2 R21
X1
P2
Bt2
JP1
R5
R8
C4
- +
R7 R6
R13 C10 030076-1
IC1
K1
H1
C9
H4
R1
D1
R2
C1C2C3
Figure 5. Layout and component mounting plan for the single-sided printed circuit board.
timer requires CPU power to operate, which COMPONENTS LIST T1,T2 = BC547
can have an impact on performance in older IC1 = TS556
computers. For this reason the timer period Resistors: IC2 = 78L05
can be set as desired under Settings/Perfor- R1,R7,R14,R15,R18 = 10kΩ IC3 = MCP6041-I/P (Microchip)
mance. The new value is stored in RAM so R2,R21 = 100kΩ (Farnell # 396-8790)
that the timer period does not need to be R3 = 47kΩ IC4 = DS1616
entered every time the software is started up. R4 = 220Ω
R5 = 68kΩ Miscellaneous:
When the DS1616 begins a mission, only
R6,R11,R13 = 10MΩ JP1 = pushbutton, 1 make contact
the active channels are sampled and
R8 = 470kΩ K1 = 3-way pinheader
recorded. The data logging memory of the Humidity sensor type HS1101
R9,R12 = 1MΩ
DS1616 has a capacity of 2048 bytes. The (www.humirel.com), available from
R10 = 150 kΩ
more channels are enabled, the shorter the Unitronic (www.unitronic.de)
R16,R17,R19,R20 = 1kΩ
maximum recording time available. If just one P1 = 250kΩ preset (vertical K2-K6 = 4-way pinheader
channel is enabled, up to 2048 values can be mounting) BT1 = 3V Lithium cell
recorded; with two channels enabled the P2 = 2MΩ preset (vertical mounting) X1 = 32.768 kHz quartz crystal
maximum is 1024. If four channels are BT2 = 2 UM-5 (AM-5) or AA
enabled, then the maximum is 512. Capacitors: batteries (depending on available
The main window displays only the two C1,C2,C3 = see text enclosure)
most important values: humidity (ADC2) and C4,C5,C8,C10,C11 = 100nF 9-way sub-D socket (female), angled
temperature. The remaining values can be C6 = 22µF 16V radial pins, chassis mount
shown by selecting ADC Channels/Show C7 = 330nF ABS enclosure with battery
Channels. C9 = 10µF 16V radial compartment (OKW size # 3 for AA
cells, e.g. RS Components # 583-
Semiconductors: 218)
Sample Rate
D1 = LM385-2.5 PCB, order code 030076-1 (see
‘Sample rate’ specifies the time interval in min-
D2= LED, red, 3mm, low-current Readers Service page)
utes between measurements. The registers of D3 = LED green, 3mm, low-current Disk, Windows software, order code
the DS1616 are eight bits wide, and so the D4,D5 = 1N4148 030076-11 or Free Download
maximum value that can be set is 255 minutes.
For the RTC to work correctly, and so that a
series of measurements can be initiated, the
sample rate must be set to a value greater than surements. The enabled channels Serial Number
or equal to one. When the battery is changed and the sample rate should already Each DS1616 is factory-programmed
the sample rate is reset to zero; if the RTC is set have been set: incorrect settings with a unique serial number. When
but the sample rate not set to a value of at least will case a pop-up to appear. Real- a save command is issued, this num-
one, the RTC will not operate properly. time values of temperature and ber is stored along with the mea-
humidity will no longer be updated sured data, so that the particular
Start Mission once per second, but rather at the module that produced the data can
This button initiates a sequence of mea- preset sample rate. be identified.
Other Windows
The ADC Channels window can be called up
under ADC Channels/Show ADC Channels in
the main menu. It provides up-to-date read-
ings from the analogue channels. Disabled
inputs are displayed in grey, as shown on the
right in Figure 8. Threshold values can also
be set for the analogue inputs: these operate
Temperature Thresholds Temperature in the same way as the temperature thresh-
These threshold values set the tem- and Other Graphs olds.
perature limits above or below The Alarm Settings window (Figure 9)
which the alarm flag in the Status 1 This window provides information includes the various settings relating to the
register will be set, which in turn about the measured temperature val- RTC (real-time clock).
pulls the interrupt output INT low. ues (Figure 7). Sample 1 corre- The RTC can be set to the PC’s system
This latter signal is available on K2 sponds to the time given under Mis- time using Set. The remaining settings can be
and K3 and can be used, for exam- sion started @. This allows the date used, for example, to implement a time
ple, to trigger an acoustic warning and time of each stored sample to be switch function. An interrupt on INT is gen-
signal. The ‘Clear’ button must be determined. In order not to waste erated when the RTC value agrees with the
pressed to reset the alarm flag. CPU time needlessly, an automatic preset alarm time. RTC and alarm settings
update feature is not provided. The can only be changed while the DS1616 is not
graph can be updated by re-opening busy taking a sequence of readings.
Under Settings/Performance is a facility for
setting to any desired value the timer period
which governs the regular reading of data
Calculating the battery life from all the sensors and analogue inputs. The
greater this value, the greater the interval
The type CR1620 backup battery (3 V, 60 mAh) supplies only the DS1616 and its
between samples, and the correspondingly
internal temperature sensor. The humidity measurement circuit consumes rather
smaller the amount of CPU time consumed by
more current and so is supplied from two AA cells to give a reasonable battery
the software. An optimum value for the timer
life. The life of the coin cell depends on the selected sample rate; in order to cal-
period can be found using the System Moni-
culate the battery life, its capacity must simply be divided by the average current
tor (a Win XP utility) to accurately measure
consumption of the circuit (Iavg).For example, with a sample period of 60 s we
the CPU load and performance. PCs and lap-
have:
tops that have plenty of memory and proces-
sor power should have no problem with a
Battery life=battery capacity / I avg
timer interval of one second. The functions of
the System Monitor are described in more
where the average current is given by
detail in the help.
I a v g = [ t t c ⋅ i t c + ( T – t t c ) ⋅i O S C ] ] / T
Operation
where tTC is the duration of one measurement (150 ms), iTC is the current
The climate logger is connected to a free ser-
drawn while carrying out a temperature measurement (0.5 mA), iOSC is the qui-
ial port on the PC or notebook using an ordi-
escent current consumption (450 nA), and T is the sample period (60 s).
nary serial cable (straight-through, not a null-
modem cable). The first time the logger soft-
The calculated battery life is approximately four years.
ware is run the selected COM port must be
specified; this setting is stored and need not
IC2
+5V +5V
S1 7805 +5V
R8
K1
D1 D2 C3 C6
C4 C5
10k
+9V
0V
22u 100n 100n 10u
R1 R2 16V 16V
15
S2
470Ω
470Ω
12 1
P1.0 P0.0
11 20
P1.1 IC1 P0.1
+5V 10 19
P1.2 P0.2
9 18 P1 P2
P1.3 P0.3
8 17 CTS 10k 6 CTS 10k 6
K2 P1.4 P0.4 7 7
T2 4 16
R6 P1.5 P0.5 5 5
1 3 87LPC767 14
10k P1.6 P0.6 8 8
6 2 13 4 4
P1.7 P0.7
2 RxD BC557
7 R7 X1 X2
3 5 6 7
4k7
X1 1 2 3 1 2 3
8
4 DTR +5V
C1 C2
9
5
R5 27p 27p
11.0592MHz
1k
SUB D9
K3 T1
R3 P3 P4 P5 P6
1k
5k 5k 5k 5k
R4
BC547
100k
030066 - 11
+5V
Figure 1. Circuit diagram of the FMS Encoder. All intelligence is vested in microcontroller IC1. Connector K3 allows you to connect your
own R/C transmitter unit via its ‘buddy/trainer’ outlet.
– 19200 baud
– 8 bit data, 1 stop bit, no parity
– RTS set to HI
– DTR set to LOW
HOEK1
K2
HOEK2
R3,R5 = 1kΩ
S1 R4
R4 = 100kΩ
R7
R6,R8 = 10kΩ R3
T2 S2
R7 = 4kΩ7
R2
R1
P1 P2
P1,P2 = mini joystick, CTS model
R6
T1
25A104A60TB (order code
CTS25A from www.dil.nl)* X1
C1
IC1
P3-P6 = 5kΩ preset P4 P6
R8
R5
Capacitors:
C1,C2 = 27pF P3
C6
C2 P5
C3 = 22µF 16V axial C4
1-660030
C5
C4,C5 = 100nF 030066-1
ROTKELE )C(
C3
C6 = 10µF 16V axial IC2
HOEK3
HOEK4
Semiconductors:
D1 = LED, green, 3mm
D2 = LED, red, 3mm
IC1 = 87LPC767BN,
programmed, order code (C) ELEKTOR
030066-1
030066-41
IC2 = 7805CP
T1 = BC547B
T2 = BC557B
Miscellaneous:
K1 = 9-V battery with clip-on
leads
K2 = 9-way sub-D socket
(female), PCB mount
K3 = 3.5mm mono jack socket,
chassis mount
S1 = on/off switch
S2 = pushbutton, 1 make contact
X1 = 11.0952MHz quartz crystal
PCB, order code 030066-1 Figure 4. Copper track layout and component mounting plan of the PCB designed for the
3 wire links FMS Encoder (board available ready-made).
RS-232 cable (non-crossed)
Case, e.g., Pactec WM-46 (Conrad
Electronics # 54 13 03 )
* Worldwide distributor
information from
www.ctscorp.com
Advertisement
RIAA Preamp
with FETs
SRPP equaliser for moving magnet (MM) cartridges
Design by H. Breitzke
This preamplifier and equaliser is based around field effect transistors and
is an updated version of the SRPP valve preamp we published in March
and April 1987. Various changes are necessary due to the fact that the
FET SRPP configuration offers a considerably higher gain and output
impedance than its valve sibling.
The Shunt Regulated Push-Pull (SRPP) topol- for use with bipolar transistors or increased. Using FETs, however, we
ogy is frequently used in high-frequency with operational amplifiers because can employ the SRPP topology as
applications, but is seldom seen in audio cir- the circuit does not employ negative effectively as with valves.
cuits. This is simply because SRPP works feedback.
well with valve technology, but is not suitable As a result distortion is considerably
030162 - 14 Figure 2. The circuit of the RIAA equaliser includes a high-quality power supply.
T2.B BF245B
7 T4
C7 C8
6
5 100n T5 100µ
40V
P1
C3
P2 BC550C
1k
1µ C6 K2 L
250Ω
T1.A
1
L K1 T3 1µ R11
2 T2.A R7
47k
1
68k
3 C2 R6
2
1k33
R10
1µ 3 220k
BF245B
R1 R2 R3 R4 R5 R8 R9 R12
C1 C4 C5
100Ω
100Ω
470Ω
47k
47k
10k
15k
12k1
+24V
T1 = 2SK389
T2 = 2SK389 T6.A
1 BF245B T8
T6 = 2SK389 C15 C16
2
3 100n T9 100µ
40V
P3
C11
P4 BC550C
1k
1µ C14 K4 R
T1.B 250Ω
7
R K3 T7 1µ R23
6 T6.B R19
47k
7
68k
5 C10 R18
6
1k33
R22
1µ 5 220k
BF245B
R13 R14 R15 R16 R17 R20 R21 R24
C9 C12 C13
100Ω
100Ω
470Ω
47k
47k
10k
15k
12k1
TR1
K5 C25 C22
L1 IC1
C27 C26
47n 47n
R28 LM317 24V
X2 X2 B1 22Ω
R27 R25
100n 100n
C24 C23
274Ω
250V
10k
250V
2x 27mH
47n 47n C18 C17
D1 R26
2x 12V C19 10µ 100n
B80C1500 C21 C20
4k87
1VA8 63V
030162 - 11
COMPONENTS LIST
K1 K3
C27 L1 C26
R14
H5
H2
H6 H3
R2
Resistors: ~ K5 L R
R1,R3,R11,R13,R15,R23 = 47kΩ C8
T1
C16
R1 R13
R2,R4,R14,R16 = 100Ω C2 C10
C1 C9
R5,R17 = 12kΩ1
R4 R16
R6,R18 = 1kΩ33
C13
C5
R15
R7,R19 = 68kΩ
R3
~ T2 C3 C11 T6
R8,R20 = 470Ω
C7
C15
R9,R21,R27 = 10kΩ P1 P3
R10,R22 = 220kΩ TR1
R12,R24 = 15kΩ R5 R17
R18
R6
R25 = 274Ω P2 R7 R19 P4
R10 R22
R26 = 4kΩ87
C21 C24
R28 = 22Ω C25 T3 T4 T8 T7
C20 B1 R8 R20
P1,P3 = 250Ω preset
030162-1
ROTKELE )C(
1-261030
R12 R24
R11 T5 C4 C12 T9 R23
P2,P4 = 1kΩ preset C22 +
R28
C23 K2 R9 R21 K4
C6
C14
C19
L R
Capacitors: R25
R26
0
OUT1 OUT2
C18 +
C1,C9 = 27pF R27
H8
H4
H7 H1
C17
D1 IC1 0
C2,C3,C6,C10,C11,C14 = 1µF
MKT, lead pitch 7.5mm
C4,C12 = 220nF
C5,C13 = 82nF
C7,C15,C17,C20 = 100nF
C8,C16 = 100µF 40V radial
(C) ELEKTOR
030162-1
C18,C19 = 10µF 63V radial
C21 = 1000µF 63V radial
C22-C25 = 47nF ceramic, lead
pitch 5mm
C26,C27 = 100nF 250 VAC (Class
X2), lead pitch 15mm
Inductors:
L1 = suppressor choke 2 x 27mH
(Epcos # B82721-K2401-N21)
Semiconductors:
B1 = B80C1500 bridge rectifier,
rectangular case (80V piv, 1.5 A)
D1 = LED, low current
T1,T2,T6 = 2SK389-BL (Toshiba),
(www.reichelt.de)
T3,T4,T7,T8 = BF245B (see text)
T5,T9 = BC550C
IC1 = LM317 (TO220 case) Figure 4. Printed circuit board layout.
Miscellaneous:
K1-K4 = cinch socket, PCB mount
age regulator produces a stable and so that the voltages at the source connections
(Monacor/Monarch # T-709G)
clean 24 V supply. of T2b and T4 are each equal to Ub/2. The
K5 = 2-way PCB terminal block,
Figure 4 shows the layout for the input capacitance of the circuit is formed by
lead pitch 7.5m
TR1 = mains transformer, 2 x 12V printed circuit board, which has an capacitor C1 and the input capacitance of T1,
/ 1.8VA (e.g. Gerth # 304.24-2) extensive ground plane. Unless the which, in the case of the 2SK389, is around
PCB, available from The PCBShop. board is to be mounted as a whole 20 pF. The optimum input capacitance
inside the enclosure, the power sup- depends on the type of cartridge, and will
ply section should be cut off before normally be found in the specifications of the
populating the board. The layout system.
the primary side of the small 24 V and the component arrangement (030162-1)
transformer. On the secondary side are practically symmetrical, and
capacitors are connected across the there are two wire links, near to K2 Internet address:
diodes in the rectifier bridge, which and K4. www.tubecad.com/may2000/
suppress interference caused when Alignment of the circuit involves
the diodes switch. The LM317 volt- adjusting potentiometers P1 and P2
Multi-event
Alarm Clock
In control of many daily events
Design by K.-U. Mrkor
4k7
4k7
4k7
ing a microseconds range. Assuming 8 3
C4 100n
you have such an instrument (or VCC VBAT
100n 7
have access to it) then the probe R1 C3 SQW/OUT
X1
1 32.768kHz
BT1
X2
1k
may be connected to pin 7 of the 6
IC2
1µ 63V 20 SCL
DS1307 and the trimmer adjusted for DS1307 2 3V
1 5 X2
a reading that’s acceptable. Failing RST
12 SCL
SDA
C5
P1.0 GND
the above, C5 is best omitted from 2
IC1 13 SDA
P3.0 P1.1 4
the circuit. 3
P3.1 P1.2
14 RS
25p
6 15 E
P3.2 P1.3
7 16 D4
P3.3 P1.4
D1 AT89C2051
Power supply 8
9
P3.4
-12PC
P1.5
17
18
D5
D6
P3.5 P1.6
19 D7
The power supply for the circuit is of P1.7 +5V
11
a less conventional design, consist- P3.7
X1 X2 LCD1
ing of a low-drop voltage regulator,
4 RS
14 D7
12 D5
E
10 5 4
16 K
K
IC3, with its usual satellite parts. Its X1
10
8
6
2
S1 S2
Backlight
function is to turn the external sup-
C1 C2
ply voltage (from a battery or a
A 15
D6 13
D4 11
9
7
5
3
1
mains adapter) into a stable 5-V sup- 33p 6MHz 33p
100Ω
rent circuit around T2-T3-T4 (actually R10
BC557C P2
a current mirror) only works when a JP1 T3 220Ω
BZ1
rent for the backlight lamp(s).
The current consumption of the IC3
4805 +5V
circuit with the exception of the LCD T1 BT2
C8
amounts to just 5 mA which may be 6V
lowered even further by a small 220µ 10V R3
C11 C10 C9
47k
COMPONENTS LIST
C11 = 470µF 16V radial chassis mount
Resistors: LCD1 = LC display, 16 characters (2
R1 = 1kΩ Semiconductors: lines x 8), e.g. AV0820 from Anag
R2,R3 = 47kΩ D1 = LED, red, 5mm, low current Vision) plus 16-way boxheader
R4 = 10Ω (optionally with chassis-mount X1 = 6MHz quartz crystal (parallel
R5,R6,R7 = 4kΩ7 holder) resonance)
R8 = 1Ω5 D2 = 1N4001 X2 = 32.768 kHz quartz crystal
R9 = 100Ω T1 = BC547B BT1 = 3V Lithium cell type CR2032
R10 = 220Ω T2 = BD242 with PCB mount holder (22.75mm
P1 = 10kΩ preset T3 = BC557C diam.)
P2 = 2kΩ5 preset T4 = BF256C BT2 = see text
IC1 = AT89C2051-12PC, BZ1 = 5V or 6V DC buzzer (active
Capacitors: programmed, order code 020304- piezo)
C1,C2 = 33pF 41
C3 = 1µF/63V radial IC2 = DS1307 PCB, available from The PCB Shop
C4,C6,C7,C10 = 100nF IC3 = 4805
C5 = 25pF (trimmer) Disk, microcontroller C (source) and
C8 = 220µF 10V radial Miscellaneous: hex files, order code 020304-11 or
C9= 10µF 63V radial JP1 = 3-way pinheader with jumper Free Download
S1,S2 = pushbutton, 1 make contact,
T2
A
H2
H3
K
R9
R8
T4
LCD1 C7
T3
C9 P2 C3
R10
P1 D1
IC1
IC3
C4
R1
X1
C11
C10 R2
C2 R3
C1
S1 S2
R4
R7
R5
R6
IC2
C8
+ JP1
D2
H1
0 + 020304-1 C5 BZ1
Figure 3. Copper track layout and component mounting plan of the PCB designed for the Multi-event Alarm Clock.
Web pointer
2 1 2 1
DS1307 datasheet at
http://pdfserv.maxim-ic.com/en/ds/DS1307.pdf
2 1 2 1
Free Downloads
Microcontroller C (source) and hex files.
File number: 020304-11.zip
PCB layout in PDF format.
File number: 020304-1.zip
020304 - 13
www.elektor-electronics.co.uk/dl/dl.htm,
select month of publication.
Figure 4. Operating the clock could not be easier using the built-in menu.
HV9901
A novel LED driver
By E. Haug
LEDs have been around for years now but it’s only recently that things
have started to get interesting with white and superbright versions
appearing at reasonable cost. LEDs of course require some form of
driving circuit and there is a lot of interest in more efficient or versatile
techniques for driving them. This circuit isn’t fussy; it outputs a constant
current suitable for high power LEDs and it doesn’t care whether the
input is 12 V or 230 V!
(P)DR127-102 (SMD)
PE-53120 D2
SWC-0.95-1000 1N4148
+9V
LED C2
D1 350mA 47µ
optional 16V
surge protection and mains filter LUXEON 1W
1 16
L F1 VIN VDD
UF4004 L1
1mH IC1
15
500mA/M CY1 500mA VREF
C3
STD5NM50(-1)
(from 12V AC*/DC)
265V
300mA
0.5A 33n
4Ω7
4Ω7
1n 6 11
N 275V COM ENI
HV9901P
current compensated choke 7 10
S10K275 CDV-1.0-A / 42V15 10 01 SYNC ENO
S07K275 2% resistors
R2
PE 8 9
560k RT POL
GND
local ground – do not bond out
030212 - 14
220k
5 12 CMOS-IC
drive a blue or white 1 W Luxeon LED. Over- CS VCC
C4 100n
voltage protection and a mains filter is
max 1 mA current
+5V
included on the input to the circuit to comply consumption
(see HV9901 datasheet)
with EMC recommendations for any mains 6
ENI
11 ON
control output
COM
powered clocked circuit. Other types of LED HV9901P
7 10
can also be driven from this circuit providing SYNC ENO (inverted ENI return)
1M
LEDs can be connected in series and driven 4 13
GT FB 4 8
from this circuit provided there is sufficient
R
supply voltage available. The minimum sup- 5
CS VCC
12
DIS
7
R10
ply voltage required to drive an LED is 12 V DC IC2
150k
6 11 ON 3 2
or AC but with a rectified AC supply of less COM ENI OUT TR
2k7
100k
5 12
sive Luxeon LED it is a good idea to substi-
CS VCC
tute a power zener diode instead of the LED.
6
COM ENI
11 A zener diode has almost identical electrical
HV9901P R7 characteristics providing you choose one with
7 10
SYNC ENO the same conduction voltage as the LED. The
10k
8 9
zener diode is a little more robust that the
RT POL C6 LED and any errors during testing will be far
1µ less costly. Connect a standard red LED
GND together with a 180 Ω series resistor in paral-
lel with the zener diode so that you can get a
030212 - 17
visual indication that the circuit is driving the
LED with equal brightness at different input
Figure 7. Simple dimmer control. voltages.
All tests must be carried out initially using
a low voltage (12 V) input. If the circuit is
useful in some applications: The LED required and VCC is connected to powered from the mains it is important to be
can be switched on and off by a logic VDD. The logic threshold levels of aware that the chip will have lethal voltages
signal applied to the ENI input (gal- the ENI and POL inputs will also cor- on its pins and all appropriate safety guide-
vanically isolate this input logic sig- respond to this supply voltage (Fig- lines must be adhered to. Early tests using
nal via an optocoupler). The polarity ure 6). The circuit flashes an LED an isolated variable transformer to provide an
of the ENI signal can also be (not shown) at approximately two- adjustable input voltage were unsuccessful
inverted by changing the level on second intervals. The POL input is but a mains transformer with tapped secon-
the POL input. The HV9901 also con- used to invert the sense of the timer daries gave better results for test purposes.
tains an auxiliary voltage regulator output. In a similar manner a switch- If the input mains filter is not fitted it is
that can be used to power additional on or switch-off delay can be simply important to keep supply leads to the circuit
circuitry. Two resistors are used to implemented with some additional as short as possible.
program the auxiliary voltage in the logic gates. Light level detector cir- On the positive side the circuit does not
range from 2 V to 5.5 V the maximum cuits or PIR movement detectors can employ large reservoir capacitors on the high
output current is only 1 mA but this is also be powered from the HV9901. voltage side so once the ReLED is discon-
enough to power a couple of CMOS Resistors connected to the H/D nected from the mains supply any high volt-
chips or a CMOS 555 timer or even a input of the HV9901 are used to pro- ages lurking around the circuit will be quickly
low power microcontroller so that gram the relay pull-in and holding discharged.
many more applications can now be currents when the device is used to (030212-1)
realised using flashing lights or drive a relay coil but this feature can
timed light control etc. (Figure 5). also be used to implement a simple
External circuits can also be pow- dimmer when an LED is used in Web Pointer
ered from 9 V available from VDD, in place of the relay (Figure 7). HV9901 datasheet from:
this case the two resistors are not The HV9901 can also be used as www.supertex.com/pdf/datasheets/HV9901.pdf
www.elektor-electronics.co.uk
1/2004 Elektor Electronics 39
AUDIO&VIDEO
OTL Headphone
Amplifier with ECC82 (12AU7)
An ‘iron-free’ valve amplifier
Design by H.-J Friedli, PhD
10k
impedance of at least 300 Ω. 10µ 400V 47µ 400V
6 V1.B
The circuit C2
7
330Ω
1M
R3 63V
cation. In Europe, ‘special quality’ 1µ
400V 3
R4
(SQ) versions of this valve with bet-
82k
ter specifications and longer service R1 R2 R5 R7
C3
life are also available under type
470Ω
1k8
4k7
1M
numbers E802CC and E82CC, 47µ 63V
470Ω
4k7
1k8
1M
to generate signal amplitudes suffi- 47µ 63V
R15
cient to adequate drive a head-
82k
phone. The triode section with base 3 R17
330Ω
R14
pins 1, 2 and 3 is used for this pur- C7
1M
2 C10
470µ
pose. The input signal arrives at the R 1µ
circuit board via an external 50-kΩ 400V
63V R
V2.A 1
logarithmic potentiometer (P1, not 8
+12V6 V1 V2
shown in the schematic) that serves K1 C8
7
as a volume control, and it is directly 5 5
9 9 1µ
coupled to the preamplifier stage via 4 4
400V
6 V2.B
C1. R1 provides the necessary nega- R19
C11 C12
tive grid bias. The gain is essentially
10k
JP1
determined by R8, while the maxi- 10µ 400V 47µ 400V
R20 R21 R22
mum input voltage is determined by 33k 2k2 2k2
R2. R9 is dimensioned such that the +200V
V1, V2 = ECC82 020195 - 11
quiescent anode current is situated
in the most linear possible portion of
the characteristic curve. Figure 1. Schematic diagram of the amplifier using two ECC82 (12AU7) valves.
The inverted and amplified input
signal on the anode is coupled to F1
TR1 TR2
the grid of the second stage via C2.
100mA T
The cathode resistor of the second K1 C7 D7 D5 C5
12V
+200V
C8 D8 D6 C6 K3
while the voltage division provided
R2
by the resistor pair allows the grid C13 C14
100k
12V 12V
4x 1N4007
bias to be set to the proper level. 16VA 10VA
4x 47n 275V X2 10n 47µ
The bias voltage is decoupled from 400V 400V
D10
the load and stabilised by R4 and
C3 before being applied to the grid.
The anode current flowing through POWER JP1
the triode, which depends on the IC1
C3 D3 D1 C1 LM2940CT-12
grid voltage and corresponding
characteristic curve, generates a
voltage across the combination of +12V6
K2
R5 and R6 that is exactly propor- C4 D4 D2 C2
tional to the current. This voltage is C9 C10 D9 C11 C12
in turn fed to the headphone via 4x 1N4002
2200µ 25V 220n 220n 10µ
coupling capacitor C4. R7 holds the 4x 47n 1N4148
63V
output at ground potential for DC
signals in order to avoid crackling 020195 - 12
noises when the headphone is
plugged in. Figure 2. Two mains transformers are used to generate the high voltage.
+12V6
COMPONENTS LIST K1 K2
H2
H3
(Amplifier) R22
JP1
R21
Resistors: R10 C5 R11 C11
C6 R20 C12
ROTKELE )C(
R9
1-591020
R1,R3,R12,R14 = 1MΩ
020195-1
R19
R2,R13 = 470Ω
R8
R4,R15 = 82kΩ V1 V2
R5,R16 = 1kΩ8
R6,R17 = 330Ω
R14
R15
R16
R17
R6
R5
R4
R3
R7,R18 = 4kΩ7
R12
R13
R2
R1
R8,R19 = 10kΩ
R9,R20 = 33kΩ
R10,R11,R21,R22 = 2kΩ2 C3 C9
Capacitors:
C1,C2,C7,C8 = 1µF 400V (MKP4 or MKS4, C2 C8
C1 C7
R7 R18
250V)
C4 C10
C3,C9 = 47µF 63V radial OUT1
T L T T R T OUT2
H4
H1
L R
C4,C10 = 470µF 63V radial
C5,C11 = 10µF 400V radial, e.g., Panasonic
ECA2GHG100n (Farnell # 219-9320)
C6,C12 = 47µF 400V radial (e.g., Conrad
Electronics # 475858)
Valves:
V1,V2 = ECC82 or 12UA7, with Noval (9-
way) socket (Chelmer Valve Corp.)
Miscellaneous:
JP1 = 2-way PCB pinheader with jumper
K1 = 2-way PCB terminal block, 5mm lead
pitch
K2 = 2- way PCB terminal block, 7.5mm
lead pitch
(C) ELEKTOR
020195-1
PCB, available from The PCBShop
Power supply icon diode in the ground lead. are physically larger, which makes
The power supply for the headphone ampli- LED D10 not only serves as a pilot them better for audio purposes.
fier is shown in Figure 2. The high voltage is light, but also works together with For the large-volume electrolytic
generated using a standard mains trans- R1 and R2 to provide a minimum capacitors (C6 and C12), types with
former. The winding normally intended to be load and ensure that capacitor C14 lead spacings of 5 or 7.6 mm can be
used as a secondary winding is connected to is discharged, even if no load is con- used, or radial snap-in types with
the 12-V terminals of the actual mains trans- nected to K3. lead spacings of 10 mm. The latter
former. This results in an open-circuit voltage type of capacitor has a larger diam-
of around 200 VAC on the primary winding of eter and thus absorbs less heat from
the ‘reversed’ transformer, which serves as Layout the nearby valves. Low-inductance
the anode supply transformer. This AC volt- The layout of the printed circuit board electrolytic capacitors designed for
age is rectified and then smoothed by C14. for the amplifier, as shown in Fig- high-frequency switching applica-
The DC filament voltage is rectified by ure 3, is designed such that it is pos- tions should preferably be used, and
D5–D8 and then smoothed by C15. The sible to use not only ‘normal’ MKS4 in any case they must be specified
capacitors connected in parallel with the capacitors for C1, C2, C7 and C8, but for operation at 105 °C .
diodes suppress high-frequency noise gener- also coupling capacitors with lead Power is supplied to the individ-
ated by the diodes. A voltage of 12.6 V is gen- spacings of 15 or 22.5 mm, such as ual channels via the combination of
erated in a simple manner using an WIMA MKP4 types. These capacitors R10 and R11 or R21 and R22, respec-
LM2940CT12 (for low voltage drop) with a sil- have higher breakdown voltages and tively. These resistors dissipate
1M
BUZ41A
component of an unstabilised
same package size (such as 1/4-W supply voltage. Naturally, this
K1 K2
metal film resistors), and the PR01 results in a voltage drop of a
series from BC Components can even C2 D1 few volts. Here a MOSFET suit-
handle 1 W. In any case, it won’t do 10n 10V
able for use with high voltages
any harm to fit these four resistors 400V C1 1W3 C3 (a BUZ41A, rated at
well clear of the circuit board in order 500 V / 4.5 A) is wired as a sim-
47µ 10n
to improve their cooling. 400V 400V ple source follower. The gate is
In the circuit board layout, atten-
020195 - 13 very slowly brought up to the
tion has also been given to keeping desired voltage via the R1/C1
network. It takes four minutes (five RC time constants) for the output voltage to reach
the signal paths of the two stereo
99 percent of its nominal value. As the valves also take a while to warm up, this delay does
channels as widely separated as not matter. The effect of using the filter can be clearly seen in Curve B.
possible. The connections between The voltage drop across T1 is primarily determined by the gate–source cutoff voltage
the ground terminals of the four and is approximately 3.5–4 V. The gate is protected against excess voltages by Zener diode
anode decoupling capacitors and the D1. C2 and C3 are necessary to eliminate the tendency of the circuit to oscillate. No circuit
common ground point are routed board layout has been designed for the filter circuit, but it can easily be built on a small piece
separately for each channel. Inci- of prototyping board. The filter dramatically reduces the amplitude of the ripple voltage.
dentally, there is one wire bridge on
the amplifier board (between C5/C11
and C1/C7).
The power supply circuit is voltage. For a transformer with a formers is that the high voltage is isolated
housed on a second printed circuit nominal secondary voltage of 9 V, from the filament voltage. Nevertheless, the
board, to which the amplifier board this can easily be 12 V. two ground potentials must be intercon-
can be attached in sandwich fash- To balance out the reactive nected. This can be done on the amplifier
ion. However, the amplifier is some- power, an X1-type capacitor rated at board and/or on the power supply board
what sensitive to the stray fields around 150 nF / 250 V can be con- (JP1).
emanated by the transformers, nected across the secondary wind-
whose magnitude depends on the ing of TR2. This will cause the anode
type of transformer used. The 50-Hz voltage to actually increase slightly, Construction
components in the frequency spec- but the mains power consumption Fitting the components to the circuit boards
trum (see measurement curves A and current will decrease by around should not present any problems. All com-
and B) clearly indicate the presence 6–7 percent. ponents are fitted on the ‘normal’ compo-
of the two transformers, which were An advantage of using two trans- nent side.
located at distance of 20 cm. Diodes
D1–D4 are ‘solid’ 1N4002 types, but
there is enough room for even more
robust types. Capacitors C5–C8,
which have a lead spacing of 15 mm,
must be X2 types.
If you want to fully eliminate any
ripple in the filament voltage, you
can use a 15 V / 20 VA transformer
for TR1. As this is a slightly larger
type, it will not fit on the circuit
board. Although the dissipation of
IC1 will increase in this case, the
specified heat sink is fully adequate.
We also tried using a 15 V / 16 VA
transformer, but it drew 23 VA from
the mains (significantly overloaded).
You are welcome to experiment with
various transformers; a wide variety
of results may be obtained, depend-
ing on the transformer type, open-
circuit voltage, loaded voltage, core
size, and material. The winding ratio
is always determined by the design
value of the open-circuit secondary
IC1
polarity. However, it is also necessary to
H2
H3
C14
four 1-µF capacitors. As the grid terminal is
C10
0 +12V6 K2 K3
the most sensitive point in a valve circuit, it
D2 D4 JP1
must be connected to the inner foil of the C13 R2
C1 C3
C2 C4 C7 C5 R1 C6
capacitor. The outer foil, which is sometimes D1 D3 C8
marked by a stripe, then has a screening
D10
effect. C9
D7
D8
H7
D5
D6
The Cinch sockets, potentiometer, phone
socket and mains switch must be wired TR1
COMPONENTS LIST
(Power supply) 2-591020
ROTKELE )C(
Resistors: H5 H6
R1,R2 = 100kΩ
020195-2
Capacitors:
C1-C4 = 47nF ceramic
C5-C8 = 47nF 275 VAC, Class X2, lead
100mA T
pitch 15mm
C9 = 2200µF 25V radial TR2
F1
C10,C11 = 220nF K1
C12 = 10µF 63V radial ~ ~
H4
H1
Semiconductors:
D1-D4 = 1N4002
D5-D8 = 1N4007
D9 = LED red, low current
IC1 = LM2940CT-12 with heatsink, Fischer (C) ELEKTOR
Miscellaneous:
JP1 = 2-way PCB pinheader with jumper
K1,K3 = 2-way PCB terminal block, lead
pitch 7.5mm
K2 = 2- way PCB terminal block, lead pitch
5mm
F1 = fuse, 100mAT (slow), with PCB mount
holder
TR1 = mains transformer 12V / 16VA (ERA
BV054-5383.0K (Conrad Electronics #
506575)
TR2 = mains transformer 12V /10VA (ERA
BV048-5383.0H (Conrad Electronics #
506478)
PCB, available from The PCBShop
Figure 4. The power supply printed circuit board can be fitted to the amplifier board ‘sandwich’ fashion.
-10
The distortion components (right channel) amount to 2.3 percent, but this is -20
primarily due to the second harmonic. Besides this, an enormous effect can -30
be seen from the ripple voltage of the unstabilised anode voltage supply. To -40
-50
remedy this, we developed an active filter (see box) that almost fully sup- -60
presses the 100-Hz component and its harmonics. The results obtained using d
B
r
-70
this filter can be seen in Curve B. The third curve, C, shows the distortion as A -80
-90
a function of output power. The distortion level increases quite linearly with -100
the output power level. The amplifier ‘runs out of room’ at around 5 mW. -110
-130
equipment using bare figures alone. The most noticeable aspect of the -140
sound is dynamic range: what is supposed to be loud is loud, and what is -150
20 50 100 200 500 1k 2k 5k 10k 20k
supposed to be soft is soft. The sound is warm and spacious, and although it Hz 020195 - 14
is perhaps slightly lacking in clarity of detailing at the upper edge of the fre- Measurement curve A. Frequency spectrum without a
quency spectrum for high volume levels, this by no means reduces the pre-filter for the anode voltage.
enjoyment of opera voices. The sound is very pleasant and remains so
during
extended lis- +0 100
-10
tening. Low -20
50
it is certainly d
B -70
r %
2
quite enjoy- A -80
-90 1
able to listen -100
0.5
to music with -110
-130
components, -140
0.1
Measurement curve B. Using a filter provides a clear Measurement curve C. The distortion level increases
benefit, with significantly reduced 100-Hz components. linearly with output amplitude.
regard to its visual aspect, so there as possible from the signal inputs. If heard if the Cinch sockets are open and the
is no reason not to use an enclosure the transformers are too close to the volume control is turned up full.
design featuring a visible circuit inputs, a typical 50-Hz hum will be (020195-1)
board with its valves and other com-
ponents. If you would rather conceal
the circuit board but still wish to
have the valves visible, you should
etch the circuit board using a mirror
image of the layout. In this case, the
tube sockets are fitted to the copper
side of the board, with all other com-
ponents being mounted in the usual
manner so they face downward after
the board is fitted in the enclosure.
All polarisations remain the same.
All 230-V wiring must be made
using wire with sufficiently thick
insulation. It is essential to apply
additional insulation to the solder
points and fit an insulating sheet
between the mounting panel and
the undersides of the transformers.
You must also provide for good ven-
tilation. A double-pole on/off switch
must be fitted in series with the 230-
volt wiring. The transformers should
be fitted in the enclosure as far away
Burglar Alarm
With individual sensor signalling
Design by E. Martens
This is a circuit of a simple but effective burglar alarm, which shows the
status of each sensor with a separate LED. This allows you to see at a
glance whether any doors or windows aren’t closed properly before
switching the alarm on.
microcontroller provides all the func- when the alarm is armed and after
Main Specifications tionality of the burglar alarm. It also the exit-delay has expired, the entry-
– Maximum number of sensors that can be takes care of (software) filtering of delay (60 seconds) will begin. Under
connected: 8 the signals at the inputs. Only after normal circumstances, the alarm will
– Monitoring and signalling of each sensor an input has remained unchanged be deactivated with key switch S1
for activation and cable continuity for 30 milliseconds, is this new sig- during the entry-delay. In the event
– Tamper input nal level passed on for processing by of a burglary, the alarm will trigger
– Panic pushbutton the microcontroller program. after the entry-delay has expired.
– Exit delay: 60 seconds The schematic for the burglar The entry-delay can only be inter-
– Entry delay: 60 seconds alarm (Figure 1) is simplicity itself rupted by switching the alarm off
– Power supply: 230 VAC or backup battery
and only a small number of compo- with key switch S1.
– LEDs indicate:
nents are required. The special ‘panic button’ S2, can
- alarm armed
be used for those situations — what-
- alarm activated
ever the reason may be — that
- tampering Sensors require the alarm signal to be acti-
- backup battery active
– Outputs: 2 (12 VDC, 500 mA) A maximum of 8 sensors can be con- vated. The alarm signal will be acti-
– Alarm duration: 60 seconds nected to the burglar alarm. These vated immediately, independent of
can be found along the left side of the armed or disarmed status of the
Figure 1. These sensors need to burglar alarm. The alarm will be
have their contacts closed when in silenced after 60 seconds or after
Please note: Readers Circuits have not been tested or the inactive state (i.e. Normally pressing the panic button again.
post-engineered by the Elektor Electronics design laboratory.
Closed). In addition, each sensor
needs to have its tamper connection
This article describes a design of a burglar wired as well. A power supply volt- Sabotage
alarm that can monitor up to eight sensors. age of +12 VDC is available for each The purpose of tamper input K11 is
The status of each individual sensor is indi- sensor at the corresponding wiring to detect tampering attempts when
cated with an LED. This LED shows whether terminals (K3 through K10). the alarm is armed. Possible scenar-
the sensor has been activated and whether ios are opening of the burglar alarm
the wiring to the sensor is in order. enclosure, the cutting of cables, etc.
Obviously, this burglar alarm also has an Operation The tamper input needs to be nor-
input to ‘arm’ the alarm, a tamper input and The alarm is switched on by opening mally closed (NC). A number of NC-
a couple of outputs to control a siren and/or a key switch S1, at which point the so- contacts and wires can be con-
strobe light. The alarm is also fitted with a so- called ‘exit-delay’ begins. This time nected in series (the cables to the
called ‘panic button’. delay (60 seconds) allows you to alarm sensors, for example).
leave the protected area without
triggering the alarm. The alarm is
Circuit description deactivated when key switch S1 is Signalling
The burglar alarm is built around the closed. Eight LEDs (D10 through D17) indi-
AT89C51 microcontroller from Atmel. This If a sensor contact is opened cate the status of the corresponding
green
green
10K
10K
10K
10K
green
green
10K
green
green
10K
green
10K
10K
10K
10K
10K
10K
10K
10K
green
green
10K
C6 63V K12
red
red
red
red
C5
D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22
R21
R14
R18
R20
R15
R19
R12
R10
R13
R17
R16
R11
R6
R8
R9
R7
IC3 BUZ11
40
R22 R23 R24 R25 R26 R27 R28 R29 R30 R31 R32 R33 R34
9 Vcc 31
alarm R5 RST EA
3K3
1K
1K
1K
1K
1K
1K
1K
1K
1K
DC output Y
1K
1K
1K
sensor 0
tamper
8K25
12 Vdc max 500mA
power
alarm active
sabotage
battery powered
sensor 1
sensor 3
sensor 0
sensor 7
sensor 5
sensor 2
armed
sensor 6
+12Vdc
sensor 4
+
0V -
AT89C51 T2
K13
alarm
1 39
sensor 1
tamper 13 P23
14
P33
P34
+12Vdc 15 R2 R3 R4
P35
16
P36
0V 17
P37 DIV1
10K
10K
10K
alarm 30 D7 IC2
ALE/P TR1 D1-D4
sensor 4
1K
R1
12 MHz 18 10uF 10uF
XTAL2 330N 100N
alarm C1 63V 63V
panic
arm
GND
sensor 5
sabotage
tamper S1
230V
1N4001
D5 D6
1N4001
X1 20
+12Vdc 470uF D8 C4 C5
C7 C8 K1 15Vac 4x1N4001 63V 1N4001
0V
33pF 33pF +
12Vdc
alarm -
sensor 6
tamper
BT1 K2
+12Vdc
0V
alarm
tamper
sensor 7
+12Vdc
0V 020422 - 11
K3-K10
Figure 1. The alarm consists mainly of a microcontroller, a number of sensor inputs and a set of indicator LEDs.
sensors. When the alarm has been Outputs age is subsequently reduced to about 12 V
activated, the LED of the sensor that by diode D7. Voltage regulator IC2 in turn
caused the alarm will light up, or The burglar alarm is provided, from changes this 12 V into a stabilised 5 V power
flash in the event of a cable failure. the viewpoint of reliability, with two supply voltage.
When the alarm is armed, the separate outputs (K12 and K13). Both In the event that the mains voltage at K1
LED ‘alarm armed’ (D18) will flash outputs are controlled by a BUZ11 disappears, the 12-V lead-acid battery con-
during the exit-delay. After the exit- (T1 and T2) and can switch up to nected to K2 will immediately take over the
delay, the LED will light continu- 500 mA at 12 V. This is more than power supply for the circuit. The battery is
ously. D18 turns off, of course, when enough for all common signal sources continually being charged via resistor R1 and
the alarm is disarmed. such as strobe lights and sirens. If diode D6, when the mains voltage is present.
The LED ‘alarm triggered’ (D19) more power is required or a signal D7 and D8 prevent the charging current from
flashes during the entry-delay and source with a different voltage needs flowing in the wrong direction.
will turn on continuously once an to be controlled, then a 12-V relay can
actual alarm has been generated. be connected directly to the alarm
D19 turns off only when the alarm is output and it in turn can then switch Software
switched off with key switch S1. the signal source on and off. The software that is required for the alarm is
When an alarm has taken place, it of a relatively simple design. The flow chart
can be determined afterwards shown in Figure 2 illustrates this. This really
which sensor (or tamper input) Power supply shows a kind of logical summary of all the
caused the alarm to trigger. The circuit is provided with its own things that have been described above.
The LED ‘tamper’ (D20) lights up mains power supply. It follows the After the reset-phase of the microcon-
when the tamper input (K11) is usual design of transformer, bridge troller, all the LEDs are switched on for a
opened. This LED will also continue rectifier (D1 through D4) and filter period of two seconds. This allows for a quick
to be on until the alarm is switched capacitor (C1) and generates an lamp test to check if all the LEDs are func-
off. input voltage of about 18 V for volt- tional and are connected correctly.
Finally, the LED ‘battery opera- age regulator IC1. With the addition In the source code for the software, the
tion’ (D22) indicates that lead-acid of diode D5 in the ground connec- values for the various timers can easily be
battery BT1 has taken over the tion, the output voltage if IC1 adjusted to suit your own requirements. It
power supply for the burglar alarm. amounts to about 12.65 V. This volt- concerns the following timers:
CONTROL
&
INDICATORS
020422- 13
Figure 3. A practical implementation of the burglar alarm separates the control and indication
from the other parts.
Relaxation Machine
A servo-powered pendulum
Design by B. Kainka
For example, a servo that’s not used anyway of about 0.25 Hz which corresponds trolled, while the ‘space’ length is
could be attached to a large pendulum of to one full period in four seconds. not affected.
which the smooth and steady motion may The sinewave generator employs a A PCB was designed for the Relax-
help people relax and even fall asleep. For phase shifting network and supplies ation machine (see Figure 2). Like all
this (psychological) effect to be achieved the a sinewave with very low distortion. PCB designs that appear in this mag-
movement has to be sine-shaped like that of a If you want to lengthen the period, azine the artwork files to enable you
real and very long pendulum. simply increase the value of C1, C2 to make your own board may be
The small circuit of the Relaxation and C3 a little. found among this month’s Free
Machine you find in Figure 1 consists of two The generator drives the control Downloads on the Publisher’s web-
parts. A pulse generator based on a 555 sup- input of timer component IC1 via an site at www.elektor-electronics.co.uk.
plies positive pulses with a length between electrolytic capacitor. IC1, by the With the board available, the cir-
1 and 2 ms (‘mark’) and a pause of 20 ms way, should be a 7555, 555C or cuit should be easy to build up. All
(‘space’), representing a typical servo control another CMOS version of the 555. you need to do is follow the parts list
signal. In addition there’s a sinewave gener- The generator drive scheme ensures and the components mounting plan.
ator designed to supply a very low frequency that the timer ‘mark’ duration is con- There is one wire link on the board
1k
15k
10k
C E 1.2 ...1.7 ms
B
100k C4, too, has an effect on the amplitude.
4V8
0V2...3V
C1
BC549C 4 8 The current consumption of the circuit is
P1
22µ 10V 7
R 0V of the order of 10 mA excluding the servo.
4s DIS 16 ms
0V5...1V4 The 3-way pinheader in position K1 will
10k IC1
0V6 0V8 3V...3V5
6
THR K1 allow most servos to be connected up easily.
3
T1 R3 R4 C4 OUT If you are using a ‘less than standard’ servo,
5
CV
100k 100k
555 then a small adapter may be required. The
220µ
BC549C 10V 2
TR
connections of a couple of well-known servos
R5 R7 are shown in Figure 3.
C2 C3 C5
Using our circuit, a correctly connected
1k
1
220k
H3
R6
R8
D1
C5
Warning
R7
IC1
This circuit should not be used on (or by) per-
1-921010
C4
R1
0 (010129-1)
010129-1
T2
T1 R2
R4
R3
H4
H2
C1 C3 COMPONENTS LIST
Resistors:
Figure 2. PCB design. R1 = 15kΩ
R2,R3,R4 = 100kΩ
R5, R8 = 1kΩ
Graupner R6 = 10kΩ
Conrad Futaba Multiplex Robbe Microprop Simprop
/JR R7 = 220 kΩ
P1 = 10kΩ preset
Capacitors:
C1,C2,C3 = 22µF 10V
000160-13
C4, C6 = 220µF 10V
C5 = 100nF
Figure 3. Servo pinouts.
Semiconductors:
D1 = 1N4148
T1, T2 = BC 549C
which should not be forgotten. The this means that C suffix devices will
IC1 = 555C or 7555 (CMOS)
link is best made using thin isolated work best, i.e., the hfe should exceed
wire because it runs dangerously about 300. Suggested types include Miscellaneous:
close to the pins of IC1. the BC547C, BC548C, BC549C and K1 = 3-way pinheader
Positions T1 and T2 can take BC550C. 2 solder pins
almost any NPN transistors with a Preset P1 is adjusted until the PCB, available from The PCBShop
sufficiently high gain. In most cases, servo covers the full motion in both
LED Roulette
using LEDs instead of a ball
Design by P. Goossens
Roulette
In the game of roulette, a random
number is chosen for each round
using a dished, spinning wheel
within which a small ball circulates
in the opposite direction. The ball
ultimately lands in one of 37 com-
partments (numbered 1–36 and 0),
with each compartment having a
colour (black, red or green). The play-
ers can bet on the number, colour,
etc, of the compartment where the
ball ends up.
Roulette is not played very often
at home, since it requires a proper
roulette wheel. Any irregularity in
the construction of the wheel will
distort the probabilities and thus
make the game unfair. A good
roulette wheel is not cheap, and it
also takes up a lot of space. An elec-
tronic version provides a solution to
these problems: it doesn’t cost a lot
and it doesn’t take up much space.
Implementation
In this circuit, the circulation of the
ball is simulated by a number of
The game of roulette has been known for cen- turntable, which is the dished wheel LEDs arranged in a circle.
turies, and it is played all over the world. In used with a small ball to select a ran- Our electronic wheel has more to
order to make it easier to play this game at dom number for each round of the offer than just a simulation of a cir-
home, here we a present an electronic roulette game. You will have to make the play- culating ball. As anyone who has
game. This electronic version only replaces the ing field and the counters yourself. ever visited a casino knows, at first
74HCT373
IC3
Another nice feature of our 11
C1
‘wheel’ is that as soon as the ball 1
EN
10k
10k
74HCT373
higher or lower than the current 1µ 16V 100n IC4
number. 11
C1
20 1
EN
R41 1
RST
Schematic diagram
10k
12 D0 D0 3 2 D17 R17
P1.0 1D 1k
2 IC1 13 D1 D1 4 5 D18 R18
P3.0 P1.1 1k
Figure 1 shows the schematic dia- 3
P3.1 P1.2
14 D2 D2 7 6 D19
1k
R19
6 15 D3 D3 8 9 D20 R20
P3.2 P1.3
gram of the roulette wheel. As is 7 16 D4 D4 13 12 D21
1k
R21
P3.3 P1.4 1k
common nowadays with relatively 8
P3.4 P1.5
17 D5 D5 14 15 D22
1k
R22
9 18 D6 D6 17 16 D23 R23
complex digital circuits, it is based P3.5 P1.6
19 D7 D7 18 19 D24
1k
R24
AT89C2051 P1.7 1k
on a microcontroller. 11
P3.7 74HCT373
In this case the microcontroller is X1 X2 IC5
10 5 4
an AT89C2051 (IC1), which requires X1
11
C1
1
only a small number of external com- S1 S2 EN
R29
D29
R28
D30
D28
D31
D 27
R38
R30
17 34 6 R27
2
D3
27
6
25
D2
3
13
D3
R31 R26
2
5
D2
C4
D3 36
R32 4 21 C3
IC5 4 R25
11 D2
R39
R33 D3 4 R24
5
30 D2
3
R34 19 R23
D36 8
IC6
R35 C6
IC4 D22 R22
15
R36 D37 23 R21
D21
32 D38
R37 R20
D1 C7 10
R41 IC1 D20
R1 0 C5
R19
C12 5 D39
R2 D2 X1 R43 R18
26 D19 D40
R42
R3
D3
C1 C2 24 R17
K1
S1
3 D18
IC2
R4 R16 +9V
16
R40
C8 S2 0V
R5 D4 35 D17 R15 C9
IC3 33
IC7
R6 D5 12 D1 R14
1 6
R7 28 D1 R13
20
D6
5
R8 7 14 4 R12
D7
29 31 D1 C11
18 22
3
9
D8
D1
R9 R11
D 12
D9
D10
D11
C10
HOEK1
HOEK2
R10
(c) ELEKTOR
030168-1
Figure 2. The double-sided printed circuit board holds the entire circuit except for the 9-V battery.
bits of port 1, so R42 and R43 have been Construction electronic roulette game. A double-
added to ensure that a well-defined ‘high’ sided printed circuit board is used
signal is also present on bits 0 and 1 when Figure 2 shows the printed circuit here, because otherwise too many
their outputs are not low. board that has been designed for the wire bridges would be needed to
Sense resistors in series with the load are central to regulating current in
switch-mode power supplies. It is possible to optimise the power loss in
these resistors, as we show with an example converter circuit that drives
eight white LEDs from a 4.8 V battery.
L1 D2
Switch-mode regulator ICs generally include K1 BZV55C6V2 BZV55C24V 2 x 4 white LEDs
10µH
a reference voltage generator and a differen- SS24 K3 K5
D1 J2 D3
tial amplifier. This combination is used to BAT 1 C1 C2
6Ω8
3
R3
820k
10k
Key points U ADJ
Figure 1 shows a typical switching regulator 020430 - 11
If you have
an innovative or otherwise original design you would like to see in print
in Europe’s largest magazine on practical electronics
above average skills in designing electronic circuits
experience in writing electronics-related software
basic skills in complementing your design with an explanatory text
a PC, email and Internet access for efficient communication with our
in-house design staff
then do not hesitate to contact us for exciting opportunities in getting your designs published on a regular basis.
Elektor Electronics
K. Walraven, Head of Design Dept.
P.O. Box 75, NL-6190-AB Beek, The Netherlands, Fax: (+31) 46 4370161
Email: k.walraven@segment.nl
64-K 80C552
Flash Board
Inexpensive, multifunctional and in-circuit programmable
Design by L. Hamers
Features
– 80C552 microcontroller clocked
at 11.0592 MHz
– 64 KB Flash ROM, 32 KB RAM
– in-circuit programmable
(max 64 KB)
– compatible with the MSC1210
source code debugger for in-cir-
cuit debugging
– address logic fully implemented
in GAL
– nine chip-select signals for exter-
nal devices connected to the
data bus
– eight 10-bit A/D inputs or eight
digital inputs
– eleven free I/O pins
– I2C bus
– watchdog timer, battery voltage
monitor, RAM backup battery
– true RS232 interface (MAX232)
– two 36-way pin headers (2.54
mm) for all connections
3k3
10k
3k3
4 T0 R17 100n C12 C13 D1 4
R11
20
1k
5 INT1 C11 D2 5
0Ω
6 IC3 100n 100n
INT0 D3 6
RST
7 SDA 100n 10 D4 7
2
8 SCL 32 D5 8
9 P1.5 T1 59 61 A0 12 28 D6 9
AVREF+ AVDD A0
10 P1.4 15 IC3 A1 11 D7 10
RST A1 10 A0
11 P1.3 57 D0 D0 2 19 A0 A2 10 A0 11 CE0
AD0 1D A2 9 A1
12 P1.2 P1.0 16 56 D1 D1 3 18 A1 A3 9 A1 12 CE1
BC516 P1.0 AD1 A3 8 A2
13 P1.1 P1.1 17 55 D2 D2 4 17 A2 A4 8 A2
D0 13
IC5 D0 D0 11 13 CE2
P1.1 AD2 A4 D0 7 A3
14 P1.0 P1.2 18 54 D3 D3 5 16 A3 A5 7 A3
D1 14
D1 D1 12 IC8 14 CE3
P1.2 AD3 A5 D1 6 A4
15 P4.7 P1.3 19 53 D4 D4 6 15 A4 A6 6 A4
D2 15
D2 D2 13 15 CE4
P1.3 AD4 A6 D2 5 A5
16 P4.6 P1.4 20 52 D5 D5 7 14 A5 A7 5 A5
D3 17
D3 D3 15 16 CE5
P1.4 AD5 A7 D3 4 A6
17 P4.5 P1.5 21 IC4 51 D6 D6 8 13 A6 A8 27 18 D4 D4 16 RAM A6 17 CE6
K3 P1.5 AD6 A8 D4 D4 3 A7
18 P4.4 22 50 D7 D7 9 12 A7 A9 26 A7
SCL/P1.6 AD7 A9 29F010 D5 19 D5 D5 17
D5 25 A8
18 CE7
1 19 P4.3 23 A10 23 20 D6 D6 18 A8 19 WR
SDA/P1.7 A10 D6 D6 62256 24 A9
6 20 P4.2 39 A8 A11 25 21 D7 D7 19 A9 A12 20
A8 A11 D7 D7 21 A10
2 21 P4.1 P4.0 7 40 A9 11 1 A12 4 A10 A14 21
P4.0 A9 C1 EN A12 23 A11
7 22 P4.0 P4.1 8 41 A10 A13 28 A11 A13 22
P4.1 A10 A13 2 A12
3 23 P4.2 9 42 A11 74HC573 A14 29 20 A12 A7 23
P4.2 A11 A14 CE 26 A13
8 24 P4.3 10 43 A12 A15 3 A13 A8 24
P4.3 A12 A15 1 A14
4 25 STADC P4.4 11 44 A13 A16 2 A14
CE 22
A6 25
P4.4 A13 A16
9 26 P5.0 P4.5 12 45 A14 30 OE WE A9 26
P4.5 A14 A17
5 27 P5.1 P4.6 13 46 A15 1 22 14 27 A5 27
P4.6 A15 A18
28 P5.2 P4.7 14 WE OE A11 28
P4.7
29 P5.3 80C552 48 31 16 24 A4 29
SUB D9 ALE
30 P5.4 P5.0 1 A3 30
P5.0
31 P5.5 P5.1 68 47 A10 31
P5.1 PSEN
32 P5.6 P5.2 67 A2 32
P5.2
33 P5.7 P5.3 66 24 A1 33
P5.3 RXD
34 AVREF– P5.4 65 25 A0 34
P5.4 TXD +5V +5V
A16
35 AVREF+ P5.5 64 26 INT0 35
P5.5 INT0
36 RST P5.6 63 27 INT1 C8 C7 36
P5.6 INT1
P5.7 62 28 T0
P5.7 T0
+5V 29 T1 100n 100n
T1
4 30 20 16
PWM0 WR
R6 5 31 A11 1 12
CE ROM
PWM1 RD I0 F0
8 19 CE IO0 5 9 CE6
I7 F7 & 6
C5 C1 C2 R1 9 4 7 CE7
P1.2 I8 7
0Ω
CE RAM
D/R 11
P4.2 I9
1µ 33p 33p 0Ω
2 8
11.0592MHz R2 10
1 V+ 16
C3 C1+
CE IO1
3 IC2
1µ C1–
14 11 +5V
T1OUT T1IN
13 12
R1IN R1OUT +VRAM
7 10
T2OUT T2IN 030042 - 11
8 9
R2IN R2OUT 3 R15
4 P4.1
C4 C2+ 0Ω
1 2 P1.1
MAX232 VBAT VOUT 0Ω
1µ 5 15 R9
C2– JP1 IC1 11 R16
330k
V- WDI R13
10 INT1
6 PFO 0Ω
C6 INT0
9
MAX691 0Ω
PFI
16 12 R14
1µ BT1 RST CE OUT
15 13
RST CE IN
R10
C9
3V
130k
4
100n
The circuit I/O. The PSEN and RD lines are used /CE_RAM = /A15+/PRG*/PSEN
to generate output-enable signals in +/WR*/RD*/D_R*PRG
Processor and memory the address regions where these sig- +D_R*/RD*/WR*/PSEN
Figure 4 shows the complete schematic dia- nals are necessary. /CE_ROM = PRG*/PSEN
gram of the microcontroller board. The vari- +/WR*/RD*/PRG+D_R*A15*PRG
ous elements that make up the circuit can be GAL /CE_IO0 =
quite easily recognised. The GAL is the central element for /(/A11*/A12*/A13*/A14*/A15*
The microcontroller is a Philips 80C552 switching between the various oper- PRG*/PSEN)
(IC4). Its most important added features com- ating modes of the system. Several /CE_IO1 = A15+CE_IO0+/PRG+PSEN
pared with a standard 8051 microcontroller processor signals are applied to its A16 = D_R
an I2C interface, an 8-channel 10-bit A/D con- inputs, including PGM (which
verter, and an extra I/O port. As usual, the causes the GAL to switch to the pro- The file upboard.pds (available on
lower eight bits of the address bus are multi- gramming mode when it is ‘0’) and diskette or the Elektor Electronics
plexed, and they are separated from the AD D/R (‘0’: normal run mode; ‘1’: website under order number 030042-
signals by IC3. debugging mode). The GAL outputs 11) can be read using the program
A 32-KB RAM (IC8) and a 128-KB Flash control the memory ICs and the chip- Palasm, which is available on the
ROM (IC5) are connected to the address bus. enable signals for memory-mapped Internet as freeware. However, if the
Only 96 KB of the Flash ROM is actually used. I/O. The GAL programming descrip- GAL programming does not require
The central address decoder is a 16V8 GAL tion is as follows: any modifications, it can be pro-
(IC6), which generates the control signals for grammed directly using the JEDEC
both memory ICs and the memory-mapped /OE = /PSEN*/RD file upboard.jed.
H1
H2
R14
C11 IC7
nal hardware are fed out via headers K1 and
C12
C7
R13 IC1 C13
K2. Besides the full data and address buses,
they include several chip-select signals that
IC3
R10
IC5
R11
R12
IC8
C10
IC4 X1
decoder IC7.
C1
R6
C2
If even more control signals are needed,
R5 030042-1 the CE IO1 signal can be used to handle the
remainder of the I/O range (from 0008 to
7FFF). If a MOVX command is executed in
R17 T1 this region, the CE IO1 signal goes to ‘0’.
D1
IC6 R8 R7
The 5-V signals from the serial port of the
microcontroller are converted to genuine
C8
C3 C4
C6
R3
R4
allow the circuit to be connected directly to a
H3
H4
R2 R1
K1
PC. If RXD and TXD are connected as shown
in the schematic diagram, it is not necessary
to use a null modem cable; a regular 1:1 ser-
ial cable can be used instead.
The 80C552 has a full I2C interface that
supports the complete standard in both sin-
gle-master and multi-master modes. Activity
(C) ELEKTOR
030042-1 on the clock line of the bus is indicated by
LED D1. This line is also used by the monitor
program to display system status during
start-up by means of blink codes.
The A/D inputs (P5.0–P5.7) are connected
directly to K1. The supply voltage for the
microcontroller serves as the reference volt-
age. If this is not sufficiently accurate, resis-
tors R11 and R12 can be removed and an
external 5-V reference voltage can be con-
nected to K1.34 and K1.35.
XA Development Board:
with a PC/104 interface for 16-bit microcontrollers, 64 KB of program memory and 64 KB of RAM.
The XA family was presented as a 16-bit successor to the 80C32, but it essentially goes much further.
The XA core is considerably faster than its 8-bit predecessor. Described in the May and June 2003
issues.
Analogue
Filter Design By Harry Baggen
In electronics, filters are required for all sorts of applications, ranging from
a simple audio circuit to the speech processor in a GSM phone. Filter
theory being complex stuff for the average electronics worker and
certainly no part of everyday chores, a couple of Internet addresses may
come in handy if you’re suddenly faced with selecting and dimensioning
a filter for an application on hand. In this month’s instalment of Electronics
Online we look at a dozen or so calculation aids for analogue filters.
Electronic filters represent a complex matter From the latter group we made a and band-pass filters to be dimen-
which is not, or not fully, mastered by many selection, with an eye for software sioned, enabling you to select
electronics enthusiasts. Not to worry, that’s offered free of charge. We between filter responses like Bessel,
because lots of professional engineers will begin with a number of calculation Butterworth and Chebyshev, all with
also admit defeat to the niceties of modern fil- tools that can be run directly off the various ripple responses.
ter design. Fortunately, neither the hobbyist relevant website. A helping hand for passive filter
nor the professional worker needs to have a Analog Devices on their massive design is offered by various tools on
few dozen equations in his head — what website [2] offer a number of online the Max Froding website [3]. We
matters is to know where the information can calculation aids for active filters. The found a page discussing the design
be found when it is needed. To help you on scripts allow second-order through of passive Butterworth filters (high-
the way, and perhaps add a few bookmarks eighth-order high-pass, low-pass or low-pass) with up to 25 ele-
in your Favourites folder, we searched the
Internet for software tools that considerably
lighten the job of passive and active analogue
filter design.
We can only answer questions or remarks of general interest to our readers, concerning projects not older than two
years and published in Elektor Electronics. In view of the amount of post and email received, it is not possible to
answer all correspondence, and we are unable to respond to individual wishes and requests for modifications to,
or additional information about, Elektor Electronics projects.
Directional Microphone vide any substantial amplifica- The missing diode was already transistor-based Zener diode
In Elektor November 2003 on tion of the microphone signals. noticed before we received your achieves an accuracy of about
page 26 the author tells us that Even at extremely high volumes letter (see Corrections & 10% which is more than ade-
the low-pass filter frequency is no more than about 8 mA of out- Updates). It failed to show up in quate for this application.
determined by the combination put current will flow (not count- the circuit diagram because the A Goldcap, then, can be
R8 and C3 — this makes me sad. ing the external load), which is author employs the charger and expected to pump a short-circuit
I believe the references should be way below the maximum of the step-up converter as separate current of up to 6 A, which
to C7 and R9 (else I have taught ±50 mA specified for the units (as shown in the photo- defeats the use of a largish diode
all my students the wrong thing opamps used. graph). The ersatz Zener may as you suggest and can only be
for more than 15 years !). look haphazard but in reality is a stopped by a fuse. In the unfor-
good choice because the only tunate event of a short-circuit,
Also, I wonder, what is the mean- Flawed Mini Project requirement for the Zener voltage we’d rather see a small diode
ing of resistors R19 -R30? As far Dear Editor — your ‘SuperCap is better stability than that of the destroyed than the coil.
as I can see they are all paralleled Battery’ article (October 2003, battery. Also, the use of a reverse- Arguably, every project publica-
with P2 which is ‘only’ 1 kOhm. Ed.) suffers from a couple of biased transistor fits the bill of a tion can be optimised or
Besides, resistors R37-38 (470 design flaws I’d like to mention. Mini Project because most hob- extended in some respect. How-
Ohm) will work as RL’s — when byists will have a few spare tran- ever, a Mini Project should be
you look in the data-sheet from The Goldcap is discharged by R1 sistors lying around but no Zener simple, brief and open to experi-
TI you’ll see that all data are and R2, so a diode behind the diodes. In our experience, the ments.
measured at RL> 10 kOhm. I’ve charger circuit would have been
used the TCL2272 series and in order. Without such a diode,
found that the distortion of you will be unable to justify the
these op-amps will be rather ‘2-mA under no-load conditions’
high (>1% at 1 kHz) when RL is claim made in the article, simply
smaller than 10 kOhm at an out-
put swing greater than a few
because the series combination of
R1 and R2 already draws more at
CORRECTIONS&UPDATES
hundred milliVolts. 2.3 V. An additional load is formed
by the voltage regulator, because Rev Counter for R/C Models
current flows into its output. November 2003, p. 56-61, 024111-1.
I think it’s sad that Elektor
Electronics brings articles with A 4.7 kΩ resistor should be inserted between pin 7 of IC1 and the
such essential faults ! To use a reverse-biased transis- base of T4. Without the series resistor, the comparator output is
Soeren Ploug, Denmark tor b-e junction as a Zener diode short-circuited to ground by way of the base-emitter junction of T4.
(by email). is ludicrous for a circuit sup- The resulting current will however not damage the TLC272.
posed to be reproducible — the
There’s no reason for sadness Zener voltage will stray far too
caused by one typo. The refer- much. Also, a transistor with Electric Charge Meter
ence to C3 in the formula on higher gain (C-suffix version) November 2003, p. 20-21, 030018-1.
page 26 is wrong and should would help to reduce the no-load On the PCB overlay, the symbols ‘+ ‘ and ‘–‘ near K2 should be
have been to C7 (see Corrections current, as it would have allowed swapped. This error does not affect the operation of the circuit.
& Updates elsewhere in this a higher value for R3 (approx.
issue). Still, the two components 4.7 kΩ). Diode D2 is clearly
R8 and C7 are not related to the under-dimensioned. This diode Directional Microphone
low-pass filter function, and no can be expected to carry high November 2003, p. 24-30, 030046-1.
such statement is made in the currents as the full Goldcap volt- The equation in the article text on page 26 contains a wrong
article. Obviously, the low-pass age is applied to the load by way component reference and should be amended to read:
filter roll-off frequency is deter- of the coil and the diode. In this R8 = d / (c · C7)
mined by R9-C7, see also the position I would have liked to see
inset at the end of the article a Schottky diode capable of pass-
and in particular, equation 16. ing in excess of 1 A, or failing USB-RS232 Interface
The function of R19-R30, then, is that, an 1N4002 as the bare min- April 2003, p. 60-65, 0200375-1.
to prevent audible clicks in the imum. The statement that the In the circuit diagram on page 62, the value of R10 should be
output signal when the rotary coil resistance should be under amended to read: 100 kΩ. This does not affect the Components
switch is operated, which is 1 Ω is incorrect — although it List or the PCB layout.
achieved by providing a DC path stands to reason that the con-
to ground for all capacitors C11- verter efficiency drops with coil
C22 when they are not selected resistance. I would have like to Supercap Battery
by S2. After all, the output of see this mentioned. October 2003, p. 52-53, 030109-1.
IC1.D is at roughly half the sup- Components IC1, R1 and R2 cause a rather too high discharge
ply potential (you may have Finally, it would have been nice current of about 5 mA on the Goldcap battery. This can be pre-
missed this point). to see a graph with efficiency vented by an additional diode between the Goldcap and the
Contrary to what you seem to plotted against output current. LM317.
assume, the circuit does not pro- Dr T. Scherer