Professional Documents
Culture Documents
Design by R. Lucassen
experimental power
supply for PCs
adjustable between 1 V and 12 V,
and from 50 mA to 1.5 A
Profile
To begin with, a profile was drawn of
the desired power supply. After some
thought, the following must have
points were noted:
V input voltage: 12 V;
V output voltage adjustable
between 1 V and 12 V;
BD244
overload; F1 L1 R14 T1
047
V LED indicator for too high output 2A T
3A
3W P3
R1
voltage or too low input voltage; K1 D4 1k T2
VOLTAGE 10k
V short-circuit resistant; K2
1k
10k
10k
100
10k
R10
In order to explain the final design of 100
820
100n 1000 15V 0%1 0%1 63V
2W
the circuit, the above aspects will be 25V
10k
IC4b
1k
UREF
any PC. Other standard voltages are * voir texte R19 0%1
IC4a
7 12V
12 V and +5 V, and hardware fans 12V 10k
2 3
2 3
68k
R12
1k
2
way of a fuse. These voltages can be 100n
1 1
R25 < 12V
R26 IC3a 1k
a great help when working on appli- 10k
3
R20
7 6
IC5b 100k 1N4148
used as the power source. 5
R7 P1 R21
If you want to be able to power as C 12V
*
1k
1M
2V5
IC2 10k
many different circuits as possible, the lin. C5
CURRENT D2
supply really has to be adjustable. If, R
100n
however, we want to be able to turn R8 6
R22 I - LIMIT
TL431
1k5
1V 2 7
the output voltage up to 12 V while the A 1 UREF
R24
5
IC3b 1k
1V IC5a 10k
input voltage is also 12 V, then there is 3
UREF = 1V
no way to avoid the use of a low-drop R9
R23
10M
C6
voltage regulator. After all, to operate
1k
12V
1
properly a normal regulator will typi- 25V
TL431
cally require a voltage difference of at TL431 IC1 = LM358
8 C7 8 C10 8 C8 8 C9
C 1 8 REF IC1 IC3 IC4 IC5
least 2 to 3 V between its input and 2 7
IC3 = LM393
4 100n 4 100n 4 100n 4 100n
IC4 = LM358
output. 3 6 A
IC5 = LM358
4 5
Adjustable current limiting is a must (LP package)
980057 - 11
(JG or P package)
on any experimenters power supply, REF C
A
while the LED indicators belong in the
class of useful add-ons.
Because a complete volt-
age/current readout based on an LCD
Figure 1. IC2 and IC5a produce the reference voltage, T1 and T2 act as a voltage reg-
or even a moving-coil instrument
ulator, and IC3a and IC3b drive the LED indicators. The rest of the circuit handles all of
would take up a lot of space and con-
the current limiting and short-circuit protection.
siderably add to the cost of the power
supply, this facility had to be dropped
in the design.
The two last requirements, short-cir-
cuit protection and simple construc- appear rather tangled, so wed better
tion, should really be considered self- start explaining the various sub-func- Reference voltage
evident features. tions. In principle, it would have been possi-
To begin with, the connections and ble to use the PCs internal 5-V supply
Circuit diagram controls: the 12-V input voltage is con- as the reference source. However, to
Although there is no lack of integrated nected to K1, while the regulated out- make sure the power supply can also
voltage regulators on todays elec- put voltage is available on K2. Pot P1 is be used without a PC, a precision
tronics market, and it is very tempting used to set the current limit, and P3 to shunt regulator type TL431 is applied.
to use one of these black boxes, they adjust the output voltage. Preset P2 In the circuit diagram you find this
generally introduce so much voltage enables the exact range of the output component identified as IC2. Some
loss that a circuit consisting of discrete voltage to be accurately adjusted. confusion may arise from the double
parts is often the best solution. Next, the structure of the circuit. This appearance of this IC in the circuit
Consequently, the circuit diagram in can be divided into four sub-circuits: diagram, but that is due to the fact
Figure 1 shows a good many opamps reference voltage source, voltage that the TL431 is supplied in two differ-
and a couple of transistors. regulator proper, current limiter and ent packages, and that both may be
At first blush the circuit diagram may LED drivers. used on the PCB. So you only have to
R6
R7
R8
R9
F1 IC2 age is reduced to 1 V by potential
2AT R4 D4 C5
divider R6-R9, and then buffered by
R20 R21 IC5a. The output of this IC, pin 1, sup-
980057-1 plies a stable and fairly robust voltage,
C1
C9 1-750089
C7 UREF, of 1 V, which is used as a refer-
IC5 IC1
ROTKELE )C(
ence for other sub-circuits in the power
R2
D5
C2
T2
R19 C4 supply.
R16 R24 R18
D2
R13 R22 D1 Voltage regulator
R14
L1
R15 R23 This part of the circuit is designed to
the standard recipe, and excels in
R17
R11
R10
C10
R1
R3
R5 IC4 IC3 simplicity. IC4a compares the refer-
C3
H2
H1
K2
P3 P1
- + receives a proportional amount of
base drive via T2. In this way, P3
enables the output voltage to be
adjusted. The lower side of the volt-
age divider has been made
adjustable with preset P2 to enable
the highest value of the output voltage
to be set.
Especially when the output voltage
set with P3 is relatively low, and a rela-
tively large current is supplied, T1 will
turn a lot of power into heat. So, you
will not be surprised to learn that that
this transistor has to be cooled to allow
for its dissipation!
(C) ELEKTOR
980057-1
Current limiter
Series resistor R14 acts as a current
sensor, and its value actually deter-
mines the maximum output current.
The value 0.47 indicated in the cir-
cuit diagram results in a highest cur-
rent of 1 A. For 1.5 A, R14 has to be
lowered to 0.33 .
The voltage across R14 is applied to
Figure 2. The PCB is clearly laid out, and spacious, so that populating it will not present
opamp IC4b by way of R13 and R17.
undue problems.
To this voltage the opamp adds the
reference level applied via R16. Using
COMPONENTS LIST C3 = 100F 63V radial IC1a the resultant, output current
C6 = 1F 25V radial dependent, voltage is amplified 7.8
Resistors:
times (ratio R18/R19), so that the IC
R1,R4,R7,R9,R11,R12,R22,R25 = 1k Semiconductors: output supplies 1 V at I = 0 A, and
R2 = 100 2W D1 = 1N4148
4.86 V at I = 1.5 A.
R3,R5,R19,R24,R26 = 10k D2,D3,D4 = LED
D5 = 15V, 400mW zener diode Next, the amplified measurement
R6,R8 = 1k5 voltage is applied to the + input of
T1 = BD244
R10 = 820 IC1b, which acts as a combined com-
T2 = BC640
R13,R15,R16,R17 = 10k 0.1% IC1,IC4,IC5 = LM358 parator, integrator and amplifier. The
R14 = 047 3W IC2 = TL431 or TL431P input of the said opamp is supplied
R18 = 68k IC3 = LM393 with a voltage between 1 V and 5 V,
R20 = 100k emanating from P1 and buffered by
Miscellaneous:
R21 = 1M IC5b. As long as the amplified mea-
L1 = suppressor choke, min. 2A
R23,R27 = 10M F1 = fuse, 2A, slow, with PCB holder surement voltage (i.e., the value of the
P1,P3 = 10k linear potentiometer K1 = 4-way PC power supply connector output current) remains below the
P2 = 500 preset H K2 = 2-way PCB terminal block, pin dis- threshold set with P1, the output of
tance 5mm IC1b will remain at 0 V. As soon as the
Capacitors: Heat-sink for T1, e.g. Fischer SK59 set limit is exceeded, however, the
C1 = 1000F 25V radial PCB, order code 980057-1, see Readers
voltage level at the + input of IC4a will
C2,C4,C5,C7-C10 = 100nF Services page.
be pushed up by the output of IC1b.
By B. Kainka
do more
with the gameport
some examples of alternative programming
7 6 5 4 3 2 1 0 read:
A0
gameport register (address 201)
A1
write:
A2 x x x x x x x x reset A0 - A3
A3
982064 - 12b
A4
A5
A6
A7
982064 - 12a
Figure 2. Reading the gameport register at address 201H is cru- Figure 3. Writing to the jgameport register at I/O address 201H
cial to any experimental use of this port. resets the analogue inputs.
time-out function is built into the pro- allow us to measure voltages in a very than 3.3 V, however, in all cases.
gram. simple way. After all, not only changes Figure 3 shows how input A3 may be
The analogue inputs are suitable for in resistance value cause a capaci- used to measure voltages. To enable
direct resistance measurement. tors charge time to be modified, but voltages between 0 and 3.3 V to be
However, because of the tolerance of also any change in the input voltage. measured also, the measurement is
the charging capacitors, these mea- The charge voltage has to be greater carried out with respect to the com-
surements are marked by poor accu-
racy. Consequently, each input has to
be calibrated separately. Once that
has been done, temperatures may be
measured using an NTC resistor with a
value of about 100 k.
The four digital inputs are TTL-compati-
ble. They have 1-k pull-up resistors
and 47-pF noise suppression capaci-
tors. An open inputs is read as a
logic 1. The digital inputs are intend-
ed for switches connecting to ground,
but they can also be driven by TTL IC
outputs, or by transistors. Listing 2
shows a small program you may want
Figure 4. Using this simple circuit it becomes possible to employ the gameport to mea-
to use to get started with reading the
sure analogue voltages. The additional 0.22-F capacitor will only be required if you
digital inputs. This program looks at the
have an old, slow PC.
upper four bits of address 201H.
Because of the pull-up resistors, a fair-
ly large current flows when an input is
pulled to ground (approx. 5 mA).
Although this amount of current should
not be a problem when, say, a switch
position is being read, it may be too
high when CMOS IC outputs are used.
Consequently, some applications do
require the use of input drivers.
The digital inputs enable you to do all
kinds of experiments. One thing should
be kept in mind, however: just like the
parallel printer port, the gameport has
no overload protection, so that errors
and accidents may cause serious
damage. The supply voltage outputs
in particular are a major headache: a
short-circuit here can cause the PC to
crash or, worse, the internal power sup-
ply to be destroyed.
Voltage measurement Figure 5. If you want to use a PC to monitor temperature, voltage or status, the game-
port can provide excellent services.
The analogue inputs of the gameport
puters supply voltage. That is also the (initial value) contains the preloaded The relation between counter value
reason for splitting the charging resis- counter state at a test measurement and input voltage is not linear but
tor, preventing short-circuits when the using an input voltage of 5 V (or with described by an exponential function.
measurement wire accidentally touch- the input short-circuited, if the mea- The actual conversion and lineariza-
es the computer case (ground!). surement is with respect to the supply tion is performed by the function
Unfortunately, this setup only allows voltage). This reference value has to called Uin.
measurements to be carried out on be established empirically for any The measurement method as
potential-free objects like batteries individual computer, using, for exam- described here offers only limited
and the like. ple, the counter program from accuracy. The main error sources are
When, in certain applications, the Listing 1. The procedure Calibrate the computer power supply and the
voltage to be measured area is allows this value to be fine-tuned while temperature co-efficient of the
always greater than 4 V, it is also pos- the program is running. If we want to charge capacitors. None the less,
sible to carry out measurements with use more than one input at a time, the effective resolution of 0.1 V
respect to ground. The program say, for multiple voltage measure- across the measurement range up to
shown in Listing 3 offers both possibil- ments, each channel has to be cali- 30 V will be satisfactory for a good
ities. The variable called Nullvalue brated via its very own counter value. many applications.
Listing 1
Program Joystick_Resistance;
uses crt;
function Counter (Channel : Integer) : Word;
var n : word;
Portvalue : Byte;
begin
Portvalue := 1; {A0}
if Channel=2 then Portvalue := 2; {A1}
if Channel=3 then Portvalue := 4; {A2}
if Channel=4 then Portvalue := 8; {A3}
n:=0;
Inline ($FA); {block interrupt}
port[$201]:= 0; {reset timers}
repeat
n:=n+1; {count until bit = 0}
until ((Port [$201] and Portvalue) = 0) or (n>10000);
Inline ($FB); {enable interrupt}
Counter := n;
end;
begin
repeat
writeln (Counter(1),' ',Counter(2),' ',Counter(3),' ',Counter(4));
delay (200);
until KeyPressed;
end.
Program Joystick_Digital;
uses CRT;
function Din: Byte;
begin
Din := Port [$201] AND 240; {read bits 4-7}
end;
begin
ClrScr;
rpeat
GotoXY (10,10);
write (Din AND 16 div 16,' '); {D4}
write (Din AND 32 div 32,' '); {D5}
write (Din AND 64 div 64,' '); {D6}
write (Din AND 128 div 128,' '); {D7}
until KeyPressed;
end.
Both the resolution and the accuracy longer charging periods and, conse- The temperature co-efficient may
may be improved by fitting an addi- quently, higher counter values, so that, also be improved by the use of a foil
tional 0.22-F capacitor as illustrated in the end, the input voltage is mea- capacitor. Unfortunately, there is
in Figure 3. This modification results in sured using smaller steps. nothing you can do about supply
Listing 3
Program Joystick_Voltage;
uses CRT;
var Nullvalue: Word;
Ch : Char;
function Counter (Channel : Integer) : Word;
var n : word;
Portvalue : Byte;
begin
Portvalue := 1; {A0}
if Channel=2 then Portvalue := 2; {A1}
if Channel=3 then Portvalue := 4; {A2}
if Channel=4 then Portvalue := 8; {A3}
n:=0;
Inline ($FA); {block interrupt}
port[$201]:= 0; {reset timers}
repeat
n:=n+1; {count until bit = 0}
until ((Port [$201] and Portvalue) = 0) or (n>>10000);
Inline ($FB); {enable interrupt}
Counter := n;
end;
function Uin: Real ;
begin
Uin := 3.33 * (1/(1-exp(-Counter(4)/Nullvalue))-1/(1-exp(-1)));
end;
procedure Calibrate;
begin
Nullvalue := Counter (4); {measurement via A3}
end;
begin
Nullvalue := 340;
ClrScr;
repeat
repeat
GotoXY (1,10);
writeln ('Voltage w.r.t. +5V = ',Uin :3:1, 'V');
writeln ('Voltage w.r.t. ground = ',Uin+5 :3:1, 'V');
delay (200);
until KeyPressed;
Ch := upcase (ReadKey);
If Ch = 'K' then Calibrate;
until Ch = chr(27);
end.
Program Joystick_Limits;
uses CRT;
var Nullvalue: Word;
Ch : Char;
procedure Reset;
begin
Port [$201] := 0;
end;
function Input (Channel: Integer): String;
var State : String;
Portvalue : Byte;
begin
Portvalue := 1; {A0}
if Channel=2 then Portvalue := 2; {A1}
if Channel=3 then Portvalue := 4; {A2}
if Channel=4 then Portvalue := 8; {A3}
if (Port [$201] AND Portvalue) = 0 then Input := 'yes'
else Input := 'no'
end;
begin
ClrScr;
writeln (Limit Checking <<Reset>> <<Esc>>');
repeat
repeat
GotoXY (1,4);
writeln ('Channel 1: ',Input(1));
writeln ('Channel 2: ',Input(2));
writeln ('Channel 3: ',Input(3));
writeln ('Channel 4: ',Input(4));
delay (200);
until KeyPressed;
Ch := upcase (ReadKey);
If Ch = 'R' then Reset;
until Ch = chr(27);
end.
voltage fluctuations caused by the be monitored by means of a voltage The inputs may be reset at any time,
PC itself. divider. An NTC may be employed to and the state displayed on the screen.
check if a certain temperature is It is possible to leave the program at
Checking the limits exceeded, for instance, in the PC any time, and start it again later. In this
itself! The sensor then has to be mount- way, it becomes possible to analyse
A useful property of the timer used for ed on a temperature-critical compo- events that occurred in the meantime.
the gameport is that the condition of nent (like the CPU) to check if this is
the analogue inputs (threshold adequately cooled. Switching output
reached or not) can be stored in flip- In addition to analogue quantities, it is
flops, completely independent of also possible to monitor individual The absence of digital outputs unfortu-
other applications. So, it is possible to pulses (having a minimum length of nately limits the application range of
reset the timers at any moment, and about 2 ms), or switch positions. In this the gameport. With just a handful of
then concentrate on other matters. way, it becomes possible to tell for sure parts, however, it is easy to create at
After some time, each input may be whether or not a certain event least one digital output. After a soft-
checked to see if the input voltage occurred at least once during a cer- ware start of the timers, the analogue
has exceeded the trigger threshold of tain period of active monitoring. inputs are supplied with a single ramp-
3.3. V. Listing 4 provides an example of a shaped pulse with a peak value of
Figure 5 shows some ways of realizing program that effectively monitors the 3.3 V, but only if this output is is pulled
this in practice. Higher voltages may extreme values (measurement limits). to +5 V by a resistor. A large number of
Listing 5
program Four_Channel_Counter;
uses CRT;
var ch : Char;
procedure Counter;
var z1,z2,z3,z4: word;
Input, InputAlt: Byte;
begin
ClrScr;
write (' Event counter <<spacebar>> = Reset <<Esc>>');
Z1:=0; Z2:=0; Z3:=0; Z4:=0;
InputAlt := Port[$201]; {read D4-D7}
gotoXY (10,5); write (Z1);
gotoXY (10,7); write (Z2);
gotoXY (10,9); write (Z3);
gotoXY (10,11); write (Z4);
repeat
Input := Port[$201];
if (Input and 16) << (InputAlt and 16) then begin
Z1 := Z1 + 1; {D4}
gotoXY (10,5); write (Z1);
end;
if (Input and 32) << (InputAlt and 32) then begin
Z2 := Z2 + 1; {D5}
gotoXY (10,7); write (Z2);
end;
if (Input and 64) << (InputAlt and 64) then begin
Z3 := Z3 + 1; {D6}
gotoXY (10,9); write (Z3);
end;
if (Input and 128) << (InputAlt and 128) then begin
Z4 := Z4 + 1; {D7}
gotoXY (10,11); write (Z4);
end;
InputAlt := Input;
until KeyPressed;
{delay (40);} {key debounce}
end;
begin
repeat
Counter;
Ch := ReadKey;
until Ch = chr(27);
end.
such pulses result in an average volt- transistor is automatically switched off The inputs may be directly connected
age of about 2 V, which is sufficient to when no reset commands are issued. to switches, push-buttons or reed
switch on a transistor. relays. Obviously, counting errors may
Figure 4 shows a circuit that turns an A digital counter be introduced by contact bounce
analogue input into a digital output. which is inherent to nearly all mechan-
Here, the transistor turns on an LED By reading the digital inputs of the joy- ical switches. An effective debouncing
when the joystick timer is reset all the stick directly, it becomes possible to method is to introduce a short pause
time. The output signal from the joy- realize various types of digital counter. of a few milliseconds, for example,
stick connection is smoothed by a 2.2- As shown in Figure 6, the digital inputs delay(40). When the pulses are sup-
F capacitor, which also provides soft may be connected directly to switch- plied by electronic sources like
turning on and off of the LED. es or TTL outputs. To illustrate just one of Geiger-Muller counters or clock oscil-
Listing 5 supplies you with a program the options that become available, an lators, these pauses must be omitted
for an LED-based flashing light. event counter is described below. because they lower the highest possi-
Because it is not essential for the reset Listing 6 provides the program of a ble input frequency.
pulses to arrive quickly one after quadruple pulse counter. All four dig- (982064)
another, a BASIC program will do fine. ital inputs are continuously monitored
In line 20, 5000 successive reset com- by the procedure Counter.
mands are given. These are sure to Incoming pulses are independently
switch on the transistor. If you happen counted and displayed on the com-
to use a slow PC, the required thresh- puter screen. Because the latter
old voltage may not be reached. In occurs during the counting opera-
that case, it is necessary to lengthen tion, the maximum input frequency is
the timers charging period by mount- limited to about 1 kHz when using a
ing the dashed 0.22-F capacitor. The simple and slow PC.
Software by J. Feltes
10
None the less, real measurements
using this simple test program
Next i
End Sub
2 tact [ms] Pause
10000
failed to indicate that the SLEEP func-
tion provides better resolution than the
well-known timer-interrupt ticks. In fact, 1000
the accuracy that can be achieved is
about equal. The result of the mea-
surement is shown in Figure 1. The hor-
100
izontal axis shows the target value, the
vertical axis, the real value. Both are in
milliseconds. This particular test was
carried out on a Pentium 133 PC run- 10
ning Windows 95. The diagram shows
that the duration of the pauses is
almost correct only when the length is 1
not less than about 14 ms.
If, however, you want to control, say,
stepper motors, you will soon require tnom [ms]
much shorter, repeatable and CPU- .1
.1 1 10 100 1k
independent delays in the millisec- 982062 - 12
onds range. Neither the Timer nor the
Design by B. de Graaff
small VGA-tester
check computer displays within seconds
- battery powered;
- simple and reliable
- simple to use
- adjustable frequency
- adjustable line-sync levels;
- recognisable picture on display.
In practice
Although the above list of requirements
may cause different assumptions, the
present project is simple and easy to
reproduce, even without blocking the
way to a fairly universal design. The cir-
cuit diagram of the tester is shown Fig-
ure 1. As you can see, the design is
based on common-or-garden CMOS
logic and a handful of discrete com-
ponents. Because VGA displays can
handle many different line frequencies
between (roughly) 30 kHz and 100 kHz,
The VGA standard (video graphics pliant computer monitors are capable there is a point in making the line fre-
array) is widely accepted as the current of handling line frequencies from quency adjustable. In this circuit, that
industry standard. Modern VGA-com- 30 kHz up to 100 kHz and more. Con- has been achieved by means of a sim-
C2
10n
IC2a IC2b IC3a IC3b 14 15
CTRDIV10 CTRDIV10 CTRDIV10 CTRDIV10 RCX CX JP2
2 3 10 11 2 3 10 11 11 10
E 1 0 E 1 0 E 1 0 E 1 0
1 + 4 9 + 12 1 + 4 9 + 12
C 1 C 1 C 1 C 1 1
5 13 5 13 12 IC4b 9
2 2 2 2
7 6 15 14 7 6 15 14
CT=0 3 CT=0 3 CT=0 3 CT=0 3 R
13
D1 D4 D6 D8 5V
R7
D2 D5 D7 D9
D3
C3
120p
2 1
D1 ... D9 = 1N4148 RCX CX JP1
5 6
1
4 IC4a 7
P1 5V R
5V 3
R1
50k
T1
IC1d R14 5V
5V 16 C5 16 C6 16 C7
13 1k5
11 IC2 IC3 IC4
12 & 100n 100n 100n R16 K1
8 8 8
68 VGA
C1 BC547B
T2 6
R11
1n5 1 11
IC1 = 4093 1k5
7
IC5 IC2, IC3 = 4518 R13
2 12
L4805 5V IC4 = 4528
68
BC547B 8
BT1 T3 3 13
R8
IC1a IC1b IC1c 9
1k5
C10 C9 C8 14 C4 4 14
3 4 10 R10
9V IC1 R15 R12 R9 10
& & &
68
10 100n 220 7 100n
63V 25V BC547B 5 15
1 2 5 6 8 9
980054 - 11
Figure 1. Circuit diagram of the VGA display tester. The circuit is simple and cheap thanks to the use of commonly available parts.
ple R-C oscillator consisting of compo- dividers whose scaling factor is preset generate a colour pattern as well as
nents IC1d, C1, R1 and P1. In the pro- by means of diodes. The divider cas- the video sync signals. More about this
totype, the values of the passive parts cade IC2a-IC3b divides by 525. This further on.
were found to guarantee a raster fre- unusual divisor is achieved by making
quency range from 47 Hz up to 115 Hz, IC2a divide by 7, IC2b and IC3a by 5, From pulse to picture
which should be ample for all applica- and IC3b by 3. The pulse train supplied
tions. by the divider cascade is shown in Fig- Any VGA display requires three essen-
The clock signal is processed by four ure 2. The pulse sequence is used to tial signals: horizontal sync pulses, ver-
tical sync pulses, and video informa-
tion. Most VGA displays have three
analogue inputs. Unusually, the present
tester drives these inputs with digital sig-
nals, so that the screen will only show
fully saturated colours. Based on 3-bit
colour information up to eight different
colours can be displayed: red, green,
blue, magenta, cyan, yellow, white
and black.
The circuit diagram shows that each of
the three video inputs on the monitor is
driven by a separate buffer transistor.
Each of these output drivers is pro-
tected by a 68- series resistor to make
it short-circuit resistant and at the same
time define the desired output source
Figure 2. All the necessary signals are derived from central clock signal by means of a impedance.
divider cascade. That leaves us with the sync pulses to
C4 R4 0 + C9
of the circuit board designed for the
C5 VGA display tester may be found in Fig-
H1
H2
R5
D6
D7
980054-1
ure 3. The single-sided board is com-
IC5
R2
R3
D8
C10 K1 pact, contains all parts and is simple to
IC2
IC3
C8
fit in a small plastic case.
D5
R14
D9
D4
R11
Connector K1 is a PCB-style 15-pin
R15
R16
D3
D1
D2 R8 high-density VGA socket. If so desired,
R7 C2 the two jumpers for the sync polarity
R1 T1
selection may be replaced by toggle
R6
C3
R12
switches. This is, in fact, recommended
IC1
IC4
R13
R10
T2 whenever the circuit is to be used on
JP2
P1 C6 T3 the road.
C1 C7 R9
H3
H4
HD Pick up CD Pick up
= 650 nm = 780 nm
NA = 0.6 NA = 0.45
focused on focused on
HD layer CD layer 980065 - 11a
Protective Layer
b
Standard Reflective Layer
PC Substrate
Semi-Transmissive Layer
PC Substrate
3
OVERSAMPLED 20 BIT ADC STRUCTURE OVERSAMPLED 20 BIT DAC STRUCTURE
64 fs fs fs 64 fs 64 fs Analog
1 bit ADC Decimation PCM Interpolation Delta-Sigma Low Pass
Front End Digital Filter Recorder Digital Filter Modulator Filter
1 bit 20 bit 20 bit 24 bit 1 bit
64 fs 64 fs Analog
1 bit ADC DSD
Low Pass
Front End Recorder
1 bit 1 bit Filter
980065 - 13
laser-controlled
burglar deterrent
simple, effective and inexpensive
Design by L. Lemmens
SAFETY FIRST!
Any laser, even the smallest, forms a
danger for the human eye. In laser
technology there is one rule that must
be obeyed at all times: Never, ever
look into a laser beam or even into its
reflection! In this context, it should be
borne in mind that even a 1 mW laser
is about 1000 times as bright as sum-
mer sunlight. Before you start any
work on a laser project, take off any
rings, watches, bracelets and other
shiny personal ornaments that may
reflect the laser beam. Also, make sure
at all times that there is nobody else
in the path of the beam. Children are tances, a laser can be used to set up a A drawback of a laser diode is that
particularly curious and will want to simple but effective burglar alarm. For it generates a constant beam of light.
find out what happens in the beam. instance, a laser and a few mirrors For the present purpose, it would be
placed in appropriate positions can much better if the light were modu-
INTRODUCTION form an invisible barrier around a lated so that the intensity of the light
Lasers generate a light beam that, building or a valuable object. beam can be adjusted. Fortunately, this
owing to its coherent character, can be
used to span large distances. Most
lasers available in the retail market are
semiconductor types. One version that 9V
recently has been in the news (owing
to its nefarious use by some unthink- 2
ing youths) is the laser pointer. This is R1 R3
a small semiconductor laser mounted
10k C3
in a slender, light and easy- t o- h o l d 1%
500k
case intended for presentation pur- IC1 10
C1 R2
poses. The law in most countries lim- 2
7 IC2 8
1k
its its output to 1 mW. 6 3 6
100n 1% A741 1 C2
Since the light beam emitted by a 3 5
laser can span relatively large dis- LM386
4 2
C4 220
T1 R4 4 LS1
Figure 2. Circuit diagram of IR
7
100
general-purpose AM receiver
R5
with which modulated laser 10k
signals can be received and LPT85A
decoded. The demodulated 0W5
signal may be used to drive a
loudspeaker or a relay. 980086 - 12
9V
active
magnetic antennas
have general coverage receiver,
will travel
The combination of a
wire loop with the size
of an A4 sheet, cou-
pled to a carefully
matched and easily
tuned amplifier offers
high-quality
MW/LW/SW radio
reception in your liv-
ing room. The excel-
lent performance of
the two all-portable
directional active
antennas described in
this article makes
them direct rivals of
many extensive out- The active antenna designs discussed the received signal. When used
in this article are the result of many indoors, they loose 70-90% of the
door antennas. Meet years of comparative signal level mon- received voltage as compared with a
the Omega-2 and itoring using various long-wave, mounting position on the roof. By con-
medium-wave and short-wave anten- trast, small loop-antennas exhibit a
Omega-3! nas for indoor and outdoor use. The totally different behaviour, mainly
antennas available for this research because they are sensitive to the mag-
work were a 5-m high vertical ground netic component of the RF signal pro-
plane, a magnetic loop with a diameter duced by the transmitter. As long as the
of 1.2 m, an active rod antenna [1] and thickness of the wall or other obstacle
various small magnetic antennas to be traversed is much smaller than
including round and square loops, and the wavelength, a magnetic field is
ferrite rods coupled to suitably dimen- hardly reduced in strength. Conse-
sioned amplifiers. quently, the level differences between
General antenna theory tells us that magnetic antennas mounted indoors
Designs by long wires and rod antennas are only and outdoors were found to range
Dipl. Ing. Jo Becker, DJ8IL sensitive to the electric component of from negligible to 50% at the highest
220
100k
C3 L3
T1
1n8
S1a S1b
R3
T2
* zie tekst
4V5 1M
* see text
75
5V
CVAR
4V3 BFR193
R5
22
S1c
L7 L8 C1 C2 R1 R6
* C4
*
220
100k C5
2x
350p 100n 100n
L7 L8
980062 - 11
Figure 1. Circuit diagram of the Omega-2 active magnetic antenna for LW/MW/SW reception from 150 kHz
to 30 MHz in four ranges. Note that the amplifier is only suitable for the indicated loop antenna. The heavy
lines in the diagram indicate connections made in solid wire to preserve the Q factor of the antenna.
on one occasion. LW/MW/SW frequency range from including experimental ones, which
There are still other marked differ- 150 kHz to 30 MHz. It is powered by are simply plugged in.
ences between antennas responding to either the receiver or its own power
the electric field, and their counter- supply, via the RF output cable and a The electronics
parts designed to convert the magnetic simple RF/DC splitter. Current con- Although the two-stage amplifier
component into an electric voltage. sumption will be of the shown in Figure 1
Whereas the currently popular active order of 20 mA at a supply Figure 2. Construction is based on the
electric antenna (say, the combination voltage of 9 V or 12 V. The details of the trans- design presented in
of the small telescopic rod with a amplifier accepts a number formers and the [1], a short discus-
matching amplifier) typically exhibits of inductive loops and coils, LW/MW rod antenna sion on its opera-
wideband behaviour, magnetic anten- used in the Omega-2.
nas generate competitive voltage lev-
els only in resonance, that is, when
accurately tuned to the desired receive
frequency. Wideband systems unfortu- 2 a b
nately suffer from susceptibility to
intermodulation in the vicinity of
strong transmitters, a problem that
calls for rather special remedy [2].
Another advantage of magnetic active L2 L1 L1 L2 L3 L4 L3 L4
(L5) (L6) (L5) (L6)
antennas is that they supply an RF sig-
nal with an unusually low background
L7 L8
noise level. c
W- 2 ANTENNA
F O R LW / M W / S W
The first antenna discussed here pro-
4x 25 turns 0.3 Cu(Teflon) 2x 18 turns 0.6 CuL 980062 - 12
vides seamless coverage of the
1-260089
ROTKELE )C(
980062-1
(C) ELEKTOR
T
R6 its entire frequency range, and offers
T2
R4 excellent large-signal behaviour con-
C5
R5
R2
sidering its modest current consump-
T1
tion. This is achieved by operating the
R1
C3
R3
C4
H1
L1 L2
L7
L8
and practically constant drain current:
its operating resistance of 75 exists in
parallel with the base and emitter of
the next transistor rather than with
respect to ground. The BFR193 is an
SMA bipolar RF transistor whose fre-
quency response is linearised by
means of strong feedback (R5>>rD). In
CVAR
S1
H2
IN2
+
28.6
6 8
4.2
3.5
8
8 6
8.2
8
2.5 2.5 2.5
13 3
24
71
43.5
51.7
3.5
3
8
15
12
7.5
3
12 10 10 12
4 4
17
BF245A
7 L1 / L2
as in 2
L2
telescopic antenna
L1 G D
S
2 0.5 ... 1m
2 1
A = 0.05 m2
L = 0.65 H 1 220
F
tube 4 mm
10n
BF245A
= wire 1.5 ... 2 mm
Tuning Range: 1 = 7.4 ... > 30 MHz 100H
2 = 1.8 ...8.8 MHz
14 ... 685 p +2 ... 3V
(4mA)
in receiver 980062 - 15
Figure 1. Diagram-
matic outline of the
Digital Controller (left-
hand channel).
MORE FACILITIES
Digital signal processing offers more
possibilities than described so far. For
instance, from the specification of the
relevant components, such as the
amplifier or loudspeaker, it is possible
to find statements in the digital data
stream pertinent to the real load. This
is, however, only so if none but linear
b errors occur in the loudspeaker, ampli-
fier and other components in the sys-
tem. These may be recognized by the
fact that the percentage error remains
the same when the signal level is var-
ied. Linear errors are ascertained and
corrected during calibration.
Errors caused, for instance, by par-
tial oscillations or too small a maximum
linear deflection of the loudspeaker
cone are non-linear errors. When the
signal level is raised, the percentage of
c these errors increases. Such errors can-
not be corrected by the digital con-
troller. It is, of course, possible to keep
them to an absolute minimum by the
use of high-quality components. If this
is the case, as for instance in the DS4,
no active control is used (or needed) in
the bass band. Such control would
Figure 3. Steps in the signal result in system feedback, causing an
paths: (a) frequency unbounded impulse response, which
computer power, response; (b) inverted fre- tion, the theoretical is, of course, incompatible with the
the frequency quency response; (c) band- result is error-free basic design of an error-free loud-
domain of each pass window of the inverted transfer. However, as speaker system with finite (bounded)
channel is divided frequency response. already mentioned, impulse response.
into four bands: in practice there is
SUB, BASS, MID and always a delay L I M I T I N G VA L U E S
HIGH. Four-times downsampling is which depends on the quality of equal- Provided that the components follow-
used for the MID band, and 16 for the ization. ing the digital controller operate lin-
BASS and SUB bands. This arrangement Of course, high-quality equalization early, it is possible to correct all linear
conforms to subsampling which low- over the frequency range makes sense errors in the digital data stream. The
ers the upper frequency. In the MID only if efficient loudspeakers are used. limiting values of the individual com-
band, the upper frequency is 4 kHz, If this were not so, the error correction ponents that program the controller
and in the BASS and SUB bands, 1 kHz. would need too much amplifying permit an early warning when opera-
In this way, the requisite computing power which the loudspeaker would tion of the system goes outside the lin-
speed is reduced by factors of about 4 not be able to handle or the resulting ear range, for instance, when one of
and 16 respectively. This makes it pos- sound pressure delivered by it would the components is overloaded. The
sible to compute 8000 input values for be too small. limiter functions in the program then
one output value in the SUB band, so So as to limit the number of errors come into operation.
that correction of the transfer function resulting from rounding-off (unavoid- Limiter functions provide protec-
is possible even at the lowest fre- able with the large number of com- tion for the various components by
quency. puting operations), processing is car- interrupting the data stream when lim-
ried out with long internal words. The iting values are reached. This is not
EQUALIZATION word length between the functions done by a power-off, but by a specified
The system is equalized by evaluating shown in Figure 1 is 48 bits, but that limitation of the output signal of the
each of the bands once over the entire used internally by the processor is digital controller. Owing to this limita-
signal path. This requires special mea- even greater. At the next processing tion, signal components that lie above
suring and equalizing software that step, the resulting, complex-inverted the limiting values will be distorted but
enables a frequency response as that in transfer function is expanded into a fil- will not cause any damage. If the dis-
Figure 3a to be obtained. As a first step ter function (for instance, band-pass tortion factor is accepted at peak levels,
in the process, all eight transfer func- see Figure 3c). This process enables a loudspeaker reproducing music at
tions are inverted, both as regards phase-locked filters with a skirt steep- mid-frequencies can be operated at
amplitude and phase (Figure 3b). ness of up to 300 dB per octave to be higher volume levels. To ensure distor-
When a loudspeaker is driven by its designed. tion-free reproduction, the limiter
own, complex-inverted transfer func- The bandpass response (see Fig- function represents the upper thresh-
Figure 4. Bandpass
old. characteristic of the interpolation at equal
The digital con- DS4 system. increases of the sam-
troller of the DS4 sys- pling rate. This results
tem provides three dif- in a large number of
ferent limiter functions: intermediate values which enable
a peak limiter that reacts to peak much higher quality digital-to-ana-
impulses; logue conversion.
a thermal limiter, which reacts to The digital data stream is also out-
thermal loads on the loudspeaker put in 48-bit words and applied to the
via temperature sensors on the dither and noise shaper. In the dither,
magnet and voice coil; a digital noise signal is superimposed
an overshoot limiter, which enables on the data stream, so that the rectan-
better utilization of the power sup- gular shape of the signal that ensues
ply of the output amplifier since the when low level signals are sampled is
short-term pulse power output is resolved.
normally higher than the continu- The noise shaper following the
ous power output. dither stage is a high-pass section that
acts only on the superimposed noise
BACK TO ANALOGUE signal and shifts the noise floor to an
The final step in the controller process irrelevant high frequency range. At the
is the reconversion of the digital signal same time, the 48-bit signal is con-
into an analogue one. In this, the word verted into 20-bit words needed for the Figure 5. The loud-
length is reduced to 24 bits, while the digital-to-analogue conversion. This speaker used in the
SUB/BASS band is computed by real conversion is performed in each band DS4 system.
24-bit 4 oversampling, and the by a 20-bit DAC from Burr-Brown.
MID/HIGH band by real The resulting ana-
24-bit 8 oversam- Figure 6. Amplitude logue signal is applied
pling. Oversampling response measured to the single output XLR links. These links are highly
should be seen as an along the axis (a), and amplifier via balanced immune to noise. An amplifier, whose
measured circumfer- output is linked directly to the appro-
entially (b). priate driver in the loudspeaker, is
needed for each band.
LOUDSPEAKER
6 CONSTRUCTION
The radiation pattern of a loudspeaker
affects the energy mix in the listening
a room. This means that loudspeakers
with different radiation patterns, even
when they have the same transfer
function at 0, produce differently
coloured sound in a room. The shape
of the DS4 enclosure (Figure 5) pro-
duces sound focusing that is propor-
tional to the frequency. This is consid-
ered the most favourable method by
the AES (Audio Engineering Society).
The signal chain is corrected over
the entire audio range as regards fre-
quency response, phase response (con-
b stant group transit time), and decay
time with the aid of a digital controller.
With skirt steepnesses up to 300 dB per
octave, crossover ranges are virtually
non-existent, so that the acoustic draw-
backs of traditional multi-way loud-
speakers are eliminated.
9
a
After this article had been prepared, it was
learnt that the worlds first digital loud-
speaker has been developed by Cambridge-
based research group 1Limited. This
consists of a flat panel matrix of small
piezoelectric transducers, each of which is
driven directly by digital signals. More
b details of the design will be published in a
forthcoming issue of Elektor Electronics.
[Editor]
16 2 3 4 5 6 7 8 9 2 3 4 5
AN4
15
AN5
14
AN6
13
AN7
R101 1 8x 4k7 R81 1 4x 4k7 980029-1
28 RD
P3.7 RD
27 WR
P3.6 WR 5V 1
26 C17
P3.5 T1
25 SSTR
P3.4 T0 3
10
PSEN 49 24 SCLK
PSEN P3.3 INT1 16V 11
23 SD
P3.2 INT0 10
22
P3.1 TxD 12
21
4 P3.0 RxD 9
PE
12 10 4
VAGND RESET 5V 5V C18
EA VSS X1 X2 R96 R79
5
10
51 38 40 39
10k
10k
16V
X1
R93
2k2
SOE
1k
C12 C9 T2
C15 R97
1%
27p 12MHz 27p
47 16V
XTAL
BC547
K2
C6 = LM324 U IN
SWITCHBOARD
Switchboard allows PRIVATE READERS of Elektor Electronics one
FREE advertisement of up to 106 characters, including spaces, com-
mas, numerals, etc., per month. The advertisement MUST relate to LAB CLEAROUT Surplus components FOR SALE EPROM programmer GP
electronics, and it MUST INCLUDE a private telephone number or
for sale: digital & analogue ICs, resis- EP8000 75, Spectron D-586 datas-
name and address; post office boxes are NOT acceptable.
tors, capacitors, switches, pots, bare cope 185, Intel MDS + ICE with
Elektor Electronics (Publishing) can not accept responsibility for any
correspondence or transaction as a result of a free advertisement or PCBs (all unused) plus test equipment, manuals etc. 100. P. Clark (01344)
of any inaccuracy in the text of such an advertisement. incl. Microprocessor development sys- 868985.
Advertisements will be placed in the order in which they are tem, PROM programmer, UV light, etc.,
received. Elektor Electronics (Publishing) reserve the right to refuse Send SAE for list to D. Fittes, 8 Elisa- FOR SALE Due to workshop clear-
advertisements without giving reasons or without returning them. beth Court, Warwick CV34 6QB, or tel. ance: 3 multimeters, transistor tester,
01926 493092. frequency counter, valve voltmeter.
Phone for detailed list. Ken Phillips,
FOR SALE Handheld Dataman S4, FOR SALE Ex-hobbyists tools, oscil- FOR SALE Lotus Smartsuite for Win- phone (01376) 323164 (Essex).
complete with mains charger, manu- loscope, transformers, many compo- dows (123 Spreadsheet, Amipro word FOR SALE Sony SMC-70GP video ti-
al, s/w and MCS51 ROM. 175. nents. Phone Rae Kozary on (0181) processor & Harvard Graphics), 20. tler with books, software, etc. Twin
Phone Mike on (01749) 670016. 9429377. Blackwells Idealist for Windows, data- 3.5 drives, integral keyboard, gen-
base and retrieval system, unopened, locker, PAL superimposer and separate
FOR SALE Kits of 1992/93 Elektor FOR SALE Graphtec MP3100 plotter unregistered, 20. All original disks colour monitor. Job lot: untested and
1.2GHz Multifunction Frequency Meter, (A3). WANTED Gould OS300 mains with manuals. J. Hopkins, tel. 01243 sold as seen. First 50 secures.
complete with case, front panel foil and transformer (or dead scope). Phone G. 784159. Trevor Wiltshire, Reading (0118)
all parts. Superb design and project, Coast on 01634 314999 9701163.
few available, 75 plus P&P. Anita, Sib- WANTED A VHF to UHF convertor, or
berkerkstr. 100, NL-6301-AW, Valken- WANTED Book 2 of Formant Music circuits, as I have a display unit with a FOR SALE PSU PCBs, 45W, I/P
burg, Netherlands. Email Synthesizer, by M. Aigner. Klaus VHF output, and I wish to connect a 240VAC, O/P DC +5V (x2), +12V,
techtext@worldonline.nl. Nielsen, Viborggade 4, 4th. DK-2100, TV. Mr. T. Collins, 215 Arlott Crescent, 12V, 5 each. Tel. Paul on (01942)
Coperhagen, Denmark. Oldbrook, Milton Keynes MK6 2QT. 706769 after 6pm.
418/433 MHz
control system
8 switching channels, 6 modes
Various electronics mail order outlets are currently advertising simple
and relatively cheap wireless control system for use in and around the
house. Although these systems are type-approved1, that is no warrant
whatsoever for sufficient range and reliability. The 433/418 MHz wireless
control system discussed in this article does not aim to compete with
these low-cost systems. Instead, it offers high-quality technology for a
large number of applications,
with special emphasis on relia-
bility, security and connectivity.
Main Specifications
High-quality licence-exempt1
transmitter and receiver modules
Transmitter power 1 mW or 10 mW.
8 universal control outputs with protection diodes.
6 different receiver modes.
Up to 256 transmitter idents.
High transmission security
Multiple transmitters with one receiver
Low current consumption
Based on a
Heiland Application Note
1.Readers should note that wireless signalling using short-range devices (SRDs) and certain allocated frequencies in the 70-cm band is
subject to country-specific regulations. In the UK, Regulation no. MPT1340 applies, the full text of which is available from the DTI. MPT1340
specifies that the band section identified as 433 MHz is for vehicle keys only. All other telecommand, telemetry and alarm systems
should use a band section around 418 MHz.
This article is based on SRDs which are type-approved in Germany. Where 433 MHz is mentioned in relation to remote control, UK read-
ers should read 418 MHz (also for type numbers). When constructing the project described here, all readers should make sure the
equipment complies with the SRD regulations that apply in their country.
47k
47k
47k
47k
regulations specified for the 70-cm 100n 4 TXE 2
DIN
band (430-440 MHz). The alternative is HE433T
to use a type-approved, licence-exempt 2 5 6 11
NC
NC
FUNC
RESET
SRD module as supplied by a number 1
1 S1
7
of manufacturers, including RadioTech TX/RX
27
and Germany-based Heiland Electron- C4
3
ADDR0
26
OSCIN ADDR1
ics. The article 418/433 MHz short- 25
5V 22p X1 ADDR2
range communication in Elektor Elec- IC2
ADDR3
24
10k
28
cm band, but also contribute consider- R6
DAT0
DAT1
DAT2
DAT3
DAT4
DAT5
DAT6
DAT7
ably to the repeatability and reliability
1k
19 18 17 16 15 14 13 12
of a project for home construction.
D1
D26
D25
D24
D23
D22
D21
D20
D19
D2
D3
D4
D5
D6
D7
D8
D9
TRANSMITTER
The circuit diagram of the handheld
transmitter (Figure 1) remains quite
simple thanks to the use of a ready-
made module. The module type
HE433-1/T (or optionally the HE433-
10T) is a frequency-modulated trans-
mitter operating on 433.92 MHz. An
SAW (surface-acoustic wave) resonator
is used to stabilize the transmitter fre-
D10
D11
D12
D13
D14
D15
D16
D17
2 5V
R2
R3
39k
22k
R7
12k R8 R9 R10
12k C8
47k
47k
47k
R4
8k2
R5 100n
4k7
R6
2k2
2 5 9
5V D0
NC
NC
SE/QT
M1 6 1 S3
FUNC
7 8 7
DIG-OUT TX/RX 27
ADDR0
C2 26
C7 HE433 2/R 3 ADDR1
2 OSCIN 25
AM-OUT ADDR2
100n 3 22p X1 IC1 24
F/A-IN ADDR3
1 4 23
FM-OUT ADDR4
6 5 C1 8MHz HE8 22
REF 4 ADDR5
OSCOUT 21
ADDR6
22p 20
11 ADDR7
5V RESET
8 10
R12 DS/DE
28
47k
DAT0
DAT1
DAT2
DAT3
DAT4
DAT5
DAT6
DAT7
R11
5V
IC3
1k
RST 19 18 17 16 15 14 13 12
D2 7805
5V
S2 C3 D1
1N4001 R14
+5V
100n
1k
9...12V C4 C5 C6 Um
D3
100 100n 10 S4 10
25V 10V R13
2 1 +VS 18
I1 O1 1
3 2 17
I2 O2 2
4 3 16
I3 O3 3
5 4 15
1 I4 O4 4
5V 6 5 IC2 14
I5 O5 5
7 6
I6
ULN O6
13
6
8 7
2803 12
I7 O7 7
9 8 11
I8 O8 8
VEE
8x 270k
9
980063 - 12
Figure 2. The receiver employs the same data
encoder/decoder IC as the transmitter. The behaviour of
the eight outputs is determined by six different modes
selected by DIP switches in array S1. is capable of demodulating AM as well
as FM signals. To select FM demodula-
tion, the FM/AM-IN input (pin 3) of the
module is tied to the FM output
is not much more economical at about contact pulls the relevant IC input to (pin 4). This is also the case in the cir-
30 mA. LED D1 provides a useful ground at the same time as the SE/QT cuit diagram of the receiver shown in
transmitter on indication because it input. That is achieved with the aid of Figure 2. In case AM demodulation is
lights whenever a button is pressed. diodes D2-D9, with a special function required, the AM output (pin 2) is sim-
The positive battery terminal has a reserved for S2 because when pressed ply connected to pin 3. In FM mode,
fixed connection to the input of the 5- this switch connects the battery to the AM output acts as a signal strength
volt regulator. The negative terminal, ground via D19, causing the circuit to meter output supplying a direct volt-
however, is taken to the transmitter be switched on. Initially, however, age between 0 and 0.75 V which is log-
push-buttons, so that the current flow is pin 9 is not logic low, because C2 has to arithmically proportional to the RF
only established when one of the be charged first, just as with a power- input level.
switches is pressed. The push-buttons up reset network for a microcontroller. FM-OUT and AM-OUT are ana-
are decoupled by diodes D10-D18 The delay so obtained results in S2 logue demodulator outputs. The FM
which ensure that any one of the actu- being able to clear the switching func- output is internally connected to a
ated key can pull the supply voltage to tions stored in the receiver. Using S2, comparator stage that converts
ground, although only the one associ- all actuated receiver outputs may be received pulses into a TTL-compatible
ated input of IC2 goes to ground, i.e., reset in one go provided the receiver is output signal available at the data out-
the input assigned to that particular in the so-called overwrite mode. Any put (DIG-OUT, pin 8). The comparator
switch. one of modes the receiver is capable of reference voltage is also available at the
An exception is formed by push- working in may be selected by means REF output (pin 2). It has a level of
button S2, which can only be con- of DIP switches. 2.4 V 100 mV, and can be loaded with
nected to ground via a diode, but is not up to 1 mA.
connected to an IC input via a second RECEIVER In the circuit diagram of the
diode. By contrast, all other switches The receiver module used for this pro- receiver, the digital output, DIG-OUT,
have a third diode that connects them ject (type HE433 2/R) contains a super- is directly connected to the TX/RX
to the SE/QT input of the IC. The pur- heterodyne receiver with an interme- input of the decoder (IC1), which
pose of this arrangement is to enable diate frequency of 10.7 MHz. The local receives the data signal.
S2 to act as the clear push-button. The oscillator is frequency-stabilized by a The configuration of the HE8 with
push-buttons connected to the encoder SAW resonator. The datasheet states a its external quartz oscillator and DIP
inputs are only capable of actuating bandwidth of 280 kHz for this module, switch array is the same as in the trans-
one of the control channels when the and a sensitivity of 2.2 V. The receiver mitter. New, however, is the decoder
D26 D13
3
H3
H1
D1
S10 S6
D17
D5
1-360089
980063-1
ROTKELE )C( M1
D9 D22
9V D25
R6
D12
S9 S5
D16
D4
R3
R4
R2
R1
D8 D21 -
R5
D24 D11 D18 C2 C4
BT1
D15
D3
S8 S4 S2
X1 IC1 +
D7 D20 IC2
D23 D10
D14
D2
S7 S3 S11 C1
H2
H4
S1 C3
D6 D19
(C) ELEKTOR
980063-1
H3
H1
S3 D2
R11
C4
R8
R9
IC3
S2 C5
T 9V
2-360089 D3 +
IC1
C6 5V
R7
R14
ROTKELE )C( C3 1
980063-2
RST
R10 R13
2
R12
3
4
5
IC2
6
R6 7
8
H2
H4
R2
R3
R4
R5
S1 R1 S4 Um
(C) ELEKTOR
980063-2
It is often necessary
for an electrical quan-
tity to be measured
and displayed, so
that a certain
action can be
instigated if
and when it
has reached
a limiting
value. Today,
this is readily
accomplished with
the aid of a processor
and a good quality
analogue-to-digital
converter (ADC). This
article describes the
design of such a
setup, complete with Features
power supply and a 12-bit converter operating at up 70,000 samples/sec
general-purpose preamplifier
number of input and on-board power supply
output facilities. printed-circuit board allows experimental layouts
CPU options: Matchbox for simple programming
AT89S8252 for fast programming via a PC and adaptor
87C51 for economy
may be used as general-purpose card for an 8051 controller
Interfaces: 12-bit analogue input
RS232
LCD (parallel or I2C)
two relays
ports for I/O
SPI with AT89S8252 CPU
I2C with Matchbox CPU
Design by M. Ohsmann
1 C1
*
100n 100n
5V C12 5V C21
5V
R2 P4 R21 100n C11 100n
D2
* 10k
* 1
1 16V 44
P3
* 8V
23
NC IC1 P0.6
37
36 5V
100n
5V 2 P0.7
P1.0
R19 K4 3
P1.1
C20 P2
8V R20
* REF 5
4
P1.2
87C51
P2.0
24
25
P1.3 P2.1
100n 10k PLCC44
R16 R17 R7 R18
* C13
6
7
P1.4 P2.2
26
27
P1.5 P2.3
8V
* * 8V
* * 10 16V
8
9
P1.6 P2.4
28
29
P1.7 P2.5
30
zie tekst P2.6
* see text 12
NC
P2.7
31
* 1
NC
* siehe Text IC6 K6 19
RD/P3.7
* voir texte 7805 5V 5V 18
WR/P3.6 INT0/P3.2
14
15
INT1/P3.3 JP1
T1 13 16
C14 TXD/P3.1 T0/P3.4
K7 R22 11 RXD/P3.0 T1/P3.5 17
10 3k3
X1 X2
25V
22 21 20
BC560 X1
TR1 R11
D3 3k3
RE1 C3
K10 C1 C2
IC7 R12
22p 22p 3k3 5V
7808 8V 1N4148 5V
2 R13
B1 11.0592MHz
V+ 1 3k3
K8 16 C1+ C5
5V C7 C8 5V
C10 C15 IC2 3 C23 5V
C1
14 11
T2
100n T1OUT T1IN K5
2200 10 100n
2x 9V B80C1500 13 12 8
25V 25V R23 R1IN R1OUT
4VA5 K9 7 10
3k3 T2OUT T2IN 7
C16 C17 8 9 TEST
R2IN R2OUT
IC5
4 1 6
BC560 C2+ C6 A0 SCL
220 10
25V 25V MAX232 2
A1
PCF SDA 5
15
K3 5 3 8582
RE2 D4 C2 A2
V-
6 4
7908 8V 1N4148 C4
AMPLIFIER OPTIONS
0 ... 1V
R11
0
* To clarify some of the many possibili-
ties available, here are some examples.
4,096. U ein
4,096. U ein
U ein R1
R9 Input 01 V
10k
R7
the ADC to be driven over the full
siehe Text
* range. In this application, the circuit of
which is shown in Figure 3, the input
8V
impedance should be high, if at all pos-
sible. In Figure 2, RA=30.096 k,
RB=10 k, RC=0, UA=0, UB=Um,
Figure 4. Matchbox program for where Um is the measured voltage.
voltage adaptation.
INTEGER K,ADvalue
START:
P1.0:=1 ; CS inactive
P1.1:=0 ; set clock line LOW
P1.0:=0 ; CS active
P1.1:=1 ; clock high
ADvalue:=0 ; get AD result there
K:=11 ; MAX 187 is ready here
WHILE K>=0 DO
P1.1:=0 ; clock goes low
ADvalue:=(ADvalue SHL 1)+P1.2 ; shift in the bit
P1.1:=1 ; clock high again
K:=K-1 ; do 12 bits
WHEND
FORMAT(RS232 D DP=3 DPSHOW=3 l N LENGTH=6 ) ; RS232 decimal output
PRINT( SCALE(ADvalue,1000,4096),' Volt "0D"0A') ; display AD*1000/4096
GOTO START ; restart again
END
47k
39k
the input signal level. This is accom-
plished by driving the ADC, where-
upon the result of the conversion is
weighted (with the correction of the
amplification factor) and read in 12-bit * siehe Text 980074 - 14
Current 1 A to +1 A
Currents between 1 A and +1 A are
10k U aus
measured with the circuit configured I ein
as in Figure 6. Since this current range
-1...+1A
is symmetrical around 0 A, the input to
the ADC when the current is zero must
2k2
01
10k
R2+P4=19.48R1=42.856 k. 7 C16
A2
A3
P4 P1 P2 K4
1-470089 K1
ROTKELE )C(
IC1
C12
K2
C19
R10
C11
R9
C18
C22
C13
IC3
IC4
IC9
C20
C21
T JP1
R21
R2
R3
C9
D1
R16
R17
R18
R19
R20
R15
R14
IC5
-
R1
R8
R4
R7
R5
R6
D2
C23
X1
+
P3
C17
R22
R11
R12
R13
R23
K5
C1
C2
C16 IC8 T1 T2
D3 D4 C5
C8
IC7
TR1
C15
RE1
RE2
C3
IC2
C7
B1 C10
C6
C4
C14
~ ~
IC6
A4
A1
K10 K7 K6 K9 K8 K3
(C) ELEKTOR
980074-1
(NTC) or positive-temperature-coeffi-
The displayed value of (2048-AD) cient (PTC) resistors, or magnetic-field
sensors, may also be used. The con- face. A special programming unit is IC6, is connected to a fairly high input
troller does not only compute the test not needed. voltage and dissipates about 2 W when
results, but also carries out any requi- the relays are energized. It must, there-
site linearization. 87C51 fore, be fitted on a suitable heat sink.
Neither the AT89S8252 nor the Match- The relatively high supply voltage
CPU OPTIONS box is cheap. If there is no objection to for the analogue section obviates the
The digital section of the circuit in Fig- the use of a number of test cards with need for rail-to-rail op amps in the IC3
ure 4 is a straightforward design. The fixed programs, the well-known 87C51, and IC4 positions to drive the con-
central processing unit (CPU) is linked AT89C51 or AT89C52 may be used. verter over its full range. If, apart from
to the outside world via an RS232 inter- These are the most economical con- the two op amps, no other loads are
face. Circuit IC2 converts the single 5 V trollers available, but they need a spe- connected to the 8 v line, regulators
supply into 12 to 15 V as required cial programming unit, which is prob- IC7 and IC8 do not need heat sinks.
in RS232 communications. ably available to many readers. There is not much that need to be
The ports of the CPU are used for said about the construction and use of
the various inputs and outputs. F I N A L LY the test card other than has already
Depending on the CPU used, a variety The test card permits the parallel con- been mentioned. One important point
of facilities are possible. nection of a liquid-crystal display is that all ICs should be seated in an
There is also an I2C EEPROM avail- (LCD) to port P2 (4-bit mode). If, how- appropriate socket.
able, not only for compatibility with ever, the Matchbox is used, its excellent Before the card is taken into use, the
the Matchbox, but also for use with a LCD output capabilities should not be supply lines should be checked care-
number of other applications, for ignored, but made full use of via the fully before the ICs are inserted into
instance, the storing of measurement I2C bussee Figure 7. their sockets.
data. The power supply of the test card [980074]
provides a regulated +5 V line for the
Matchbox digital section and a regulated 8 V
The printed-circuit board is designed line for the analogue section of the cir-
to cater for a number of different cuit. The regulator for the +5 V line,
CPUs. The best of these for less experi-
enced readers is the Matchbox. This
controller enables an application to be
programmed in BASIC, whereupon all
the input and output facilities as well
Applications:
as the various interfaces are operated multimeter with serial output
via the controller. heating controller
AT89S8252 serial test network
If use of the full speed of an 8051 con- data processor monitor
troller is desired, that is, by program- processing controller
ming in the assembler, the AT89S8252 linearized thermometer
is recommended. The program gener-
ated in the PC is then stored in an a.c. measurement with dB display
internal EEPROM via a simple inter- data logger
versatile aid
for experimenters
with signal tracer &
continuity tester
Design by P. Lay
15V 15V
most at home owing to electric
0V 0V
shock. In fact, in a public place, such 10V 10V
D5
D4
D3
R10
D2
K1 R8 A
D7
D6
D8
IC1 D1
C8
C10 C1 K
C3 C2
C4
HF
R6
R4
R5
R3
R2
R1
C7 T
former to BS3535. Such a device
P1
ensures that (a) the equipment on test 980056-1 LF
T
POWER
transformer rating (and relevant fuse). 9V
0
L' N'
Mind any inadvertent earth connec- LF HF TEST
1M5
100k
BC547B T1
verts the 240 V mains voltage to 30 V, P1 C5
100k
ments here: (1) it is advisable to use a dou- 4n7
1k
LF R6
ble-pole switch and, in line with common T2
R5 BC557B LS1
practice, also switch the N(eutral) mains C2 C4
IC1 = TLC272
1M
7809
R10
TRACER & TESTER 2k2
15V
R11
D7 D5
C10 8
makes a low voltage available, the LED
C7 C8 C9 IC1
designer felt that some additional com- D2 D3 4x 1N4002
4
D8
H1
H3
K Resistors:
T1 T2 R9
D5
D4
D3 R1, R7 = 10 k
R10
D2
K1 R8 A R2, R3 = 100 k
~15V R7 C6 R4 = 1.5 M
C9 C5 A R6 = 1 k
R11 R8 = 470
D7
D6
D8
C8
IC1 D1 R9 = 8.2
C10 C1 K R10, R11 = 2.2 k
C3 C2
IC2 P1 = 220 k, linear
HF
C4
R6
R4
R5
R3
R2
R1
C7 T Capacitors:
C1, C2 = 150 pF, ceramic
1-650089 C3 = 0.0047 F, metallized polyester
H4
H2
tnemgeS )C( P1
980056-1 LF
T C4, C9 = 10 F, 16 V, radial
C5 = 100 pF, ceramic
C6 = 470 F, 16 V, radial
C7 = 2200 F, 25 V, radial
(C) Segment
980056-1
C8, C10 = 0.1 F, ceramic
Semiconductors:
D1, D2 = 1N4148
D3, D8 = LED, low current
D4D7 = 1N4002
T1 = BC547B
T2 = BC557B
Integrated circuits:
IC1 = TLC272CP
IC2 = 7809
Miscellaneous:
F1 = fuse holder and fuse, 1 A, slow
LS1 = miniature loudspeaker, 8 ,
500 mW
Tr1, Tr2 = 180 VA mains transformer
Figure 3. The printed-circuit with 2 15 V secondary
board for the ancillary circuits . S1 = mains on/off switch, double
pole preferred, see text
K1 = heat sink for IC2, 5 K W1
8 off banana socket
1 off mains entry
4 1 off mains output socket (panel
mounting)
CIRCUIT DESCRIPTION
The circuit diagram of the composite
isolating transformer is shown in Fig-
ure 2.
The input for the 9 V regulated
power supply is taken from the 15 V
secondary of Tr1. This voltage is recti-
fied by bridge D4D7, smoothed by
capacitor C7, and stabilized by regula-
Figure 4. Photograph
of the completed
printed-circuit board.
The d.c. operating point of IC1a is feasible to IC2 so as to suppress any No. 980056
arranged by R4 and R5 to ensure max- interference pulses as effectively as F = 1A
imum drive to the op amp. Any resid- possible.
RC-5-Codes RC-5-Codes
9/98
Command Codes for
RC-5 Command Allocations DATASHEET 09/98 Specific System Addresses DATASHEET 09/98
Elektor Electronics
C5 C4 C3 C2 C1 C0 General Audio Video
34 1 0 0 0 1 0 picture slow run reverse
numerical values
0-9 37 1 0 0 1 0 1 picture frame by frame reverse
0-9
38 1 0 0 1 1 0 slow run forward
12 0 0 1 1 0 0 standby
39 1 0 0 1 1 1 slow run reverse
13 0 0 1 1 0 1 mute
40 1 0 1 0 0 0 picture slow run forward
14 0 0 1 1 1 0 personal preference
41 1 0 1 0 0 0 picture frame by frame forward
15 0 0 1 1 1 1 display
42 1 0 1 0 1 0 picture fast run forward
16 0 1 0 0 0 0 volume + 44 1 0 1 1 0 0 picture moderate run reverse
17 0 1 0 0 0 1 volume 45 1 0 1 1 0 1 eject
18 0 1 0 0 1 0 brightness + 46 1 0 1 1 1 0 picture moderate run forward
19 0 1 0 0 1 1 brightness 47 1 0 1 1 1 1 picture normal run reverse
21 0 1 0 1 0 1 colour saturation
49 1 1 0 0 0 1 erase
66
53 1 1 0 1 0 1 play
Command Codes for Specific System Addresses
54 1 1 0 1 1 0 stop
Phono (system address = 21)
55 1 1 0 1 1 1 recording Command Code
Command Symbol
Command Allocation
56 1 1 1 0 0 0 --- connect Address C5 C4 C3 C2 C1 C0 (IEC417)