418/433-MHz field- strength meter

54
TEST & EASUREMENT 418/433 -MHz field- - strength meter Reliable data trans- mission using a radio link requires the trans- mitter signal to be received as clean as possible, and at suffi- cient fieldstrength. Particularly inside buildings this is often problematic because of reflections and attenuation. The field - strength meter pre- sented in this article is specifically designed for type -approved licence -exempt 418/433 MHz short- range signalling devices (SRDs), allowing the local RF fieldstrength to be measured, and receivers and trans- mitters to be installed in favourable positions. range -test and equip- ment positioning aid for 70 -cm SRDs Based on an Application Note from Heiland Electronics Main Specifications - Simple construction using few parts - Simple to use - Quantitative and qualitative evaluation of fieldstrength - AM/FM modulation detection - LED bar readout (dot mode) - Compact construction with integrated antenna - Battery operated A 1 4 Elektor Electronics 10/98 Elektor Electronics 10/98 Reliable data trans- mission using a radio link requires the trans- mitter signal to be received as clean as possible, and at suffi- cient fieldstrength. Particularly inside buildings this is often problematic because of reflections and attenuation. The field- strength meter pre- sented in this article is specifically designed for type-approved licence-exempt 418/433 MHz short- range signalling devices (SRDs), allowing the local RF fieldstrength to be measured, and receivers and trans- mitters to be installed in favourable positions. 14 Based on an Application Note from Heiland Electronics 418/433-MHz field- strength meter range-test and equip- ment positioning aid for 70-cm SRDs Main Specifications - Simple construction using few parts - Simple to use - Quantitative and qualitative evaluation of fieldstrength - AM/FM modulation detection - LED bar readout (dot mode) - Compact construction with integrated antenna - Battery operated TEST & MEASUREMENT

Transcript of 418/433-MHz field- strength meter

Page 1: 418/433-MHz field- strength meter

TEST & EASUREMENT

418/433 -MHz field-- strength meter

Reliable data trans-mission using a radio

link requires the trans-mitter signal to be

received as clean aspossible, and at suffi-

cient fieldstrength.Particularly inside

buildings this is oftenproblematic because

of reflections andattenuation. The field -

strength meter pre-sented in this article isspecifically designed

for type -approvedlicence -exempt

418/433 MHz short-range signallingdevices (SRDs),

allowing the local RFfieldstrength to be

measured, andreceivers and trans-

mitters to be installedin favourable

positions.

range -test and equip-ment positioning aid

for 70 -cm SRDs

Based on an Application Note from Heiland Electronics

Main Specifications- Simple construction using few parts- Simple to use- Quantitative and qualitative evaluation of fieldstrength- AM/FM modulation detection- LED bar readout (dot mode)- Compact construction with integrated antenna- Battery operated

A 1 4 Elektor Electronics 10/98Elektor Electronics 10/98

Reliable data trans-mission using a radio

link requires the trans-mitter signal to be

received as clean aspossible, and at suffi-

cient fieldstrength.Particularly inside

buildings this is oftenproblematic because

of reflections andattenuation. The field-

strength meter pre-sented in this article is

specifically designedfor type-approved

licence-exempt418/433 MHz short-

range signallingdevices (SRDs),

allowing the local RFfieldstrength to be

measured, andreceivers and trans-

mitters to be installedin favourable

positions.

14

Based on an Application Note from Heiland Electronics

418/433-MHz field-strength meter

range-test and equip-ment positioning aid

for 70-cm SRDs

Main Specifications- Simple construction using few parts- Simple to use- Quantitative and qualitative evaluation of fieldstrength- AM/FM modulation detection- LED bar readout (dot mode)- Compact construction with integrated antenna- Battery operated

TEST & MEASUREMENT

Page 2: 418/433-MHz field- strength meter

The field-strength meter isbased on ar e a d y - m a d eSRD receivermodule with afactory-installedoutput that supplies a voltage between0.2 V and 1 V which is logarithmically-proportional to the RF signal strengthat the receiver input. The receivermodule type HE433/2R (UK:HE418/2R), by the way, is the same asthe one used in the 418/433 MHz Con-trol System described in last month’sissue.

The pinning of the receiver moduleis shown in Figure 2. The receiver iscapable of demodulating AM (ampli-tude modulation) and FM (frequencymodulation) transmissions. For FMuse, the AM output doubles as the sig-nal strength (S meter) output, supply-ing a direct voltage which is logarith-mically proportional to the level of thereceived RF signal. Also of good use isthe 2.4-volt (±100 mV) reference volt-age at pin 2 of the module. This voltagemay be loaded with up to 1 mA. In thepresent circuit, it acts as a referencepotential for an LED bargraph display.

B A R G R A P H R E A D O U TAs you can see from the circuit dia-gram in Figure 3, the electronics con-sist of no more than a type-approvedand licence-exempt SRD receiver mod-ule coupled to an LED driver IC typeLM3916 (alternative: LM3914). This ICaccurately converts a direct voltageapplied to its input into LED scaleunits. Many of you will be familiarwith the basic operation of theLM3914/16, because it is often used forbargraph LED readouts. Ten compara-tors compare the input voltage withdiscrete values supplied by a voltagedivider. As you can see, the voltage tobe divided is obtained from the refer-

ence voltagesource. Eachindividual com-parator outputdirectly drivesthe associatedLED. The scale of

the readout is linear in case of theLM3914, and logarithmic in case of theLM3916. The latter scale has dB stepsas usually applied in VU (volume unit)meters. As indicated by the block dia-gram of the LM3916 (Figure 4), theinternal potential divider is connectedbetween the pins labelled RHI (pin 6)and RLO (pin 4). In the circuit of thefieldstrength meter these two pins areconnected to an external voltagedivider (R1, R2, R3, P1 and P2). Thisdivider is supplied with the referencevoltage from the receiver module(2.4 V), so that the internal referencevoltage of the IC is not required here.This is in contrast with the standardapplication circuit of this integrated cir-cuit.

The output labelled REFOUT(pin 7) is therefore only connected toground via resistor R5. This resistor isneeded because the load on theREFOUT pin determines the LEDbrightness.

The internal voltage divider pins,RHI and RLO, are taken to the wipers

of two preset potentiometers in theexternal voltage divider. In this way,the RHI and RLO pins receiveadjustable voltage levels representingthe upper and lower switching thresh-old, which define the range of the bar-graph readout.

The measurement input of theLM3916, labelled SIG (pin 5), is notconnected directly to the AM output ofthe SRD module, but via peak detector,D1-C2, and a level control, P3-R4.When a frequency-modulated trans-mitter is being received, the level at theAM output is virtually independent ofthe modulation signal. After all, thecarrier level remains virtually constantwhen FM is used. In that case, thediode and capacitor have no function— the diode could be replaced by awire link, and the capacitor could beomitted. The situation is different incase an AM transmitter is used becausethe demodulated signal then appearsat the AM output of the receiver mod-ule. In that case, the diode-capacitorcombination ensures that the peakvalue of the demodulated signal istaken as a measure of the fieldstrength.Preset P3 allows the signal voltage tobe attenuated to some extent, enablingthe scale factor of the LED bar to be set.Because pin 9 (MODE) of the readoutdriver is not connected, the LED bar isoperated in ‘dot’ mode, in which onlyone LED lights at a time.

The circuit is powered by a 9-V bat-tery in combination with a 5-volt fixedvoltage regulator type 78L05 (IC1).Instead of a regular on/off switch, apush-button is used to power theinstrument. After all, your in-situ field-strength readings should only take afew seconds at different locations.

Because the current consumption ismodest at just 13 mA or so, the batterywill have along life. Finally, diode D12acts as a polarity reversal protection,and LED D14 as an on/off indicator.

C O N S T R U C T I O NProvided you stick to the componentmounting plan shown in Figure 5,building the fieldstrength metershould not cause problems.

If you do not have an RF signalgenerator available for the final align-

15Elektor Electronics 10/98

Technical DataReceiver type: SAW-stabilized superheterodyne receiverPower supply: 9-V battery (IEC6F22)Current consumption: approx. 13 mAReceiver frequency: 433.92 MHzRange: 30-90 dBµVIntermediate frequency: 10.7 MHzModulation detection: AM and FMTemperature range: 0-50 ºCSize: 142 x 57 x 24 mm

selectionRF input stage

oscillator

AF amplifierpulse shaper

IF amplifierFM demodulator

mixer

Ub = 5V OUT 980038 - 16

Figure 1. Block diagram of thereceiver module. This is basicallya superheterodyne receiver witha SAW-stabilized local oscillatorand an intermediate frequency of10.7 MHz.

1

Page 3: 418/433-MHz field- strength meter

ment of the instru-ment, only the cathodeof diode D1 should besoldered — the anodeterminal remains open as yet for directvoltage measurements. It is not possi-ble to connect the module the wrongway around because its pinningmatches the PCB layout. A differentreceiver module can only be used if ithas an S-meter output supplying thesame voltage range as the HE433/2R.Also, you have to take a serious look atthe connections to the readout circuit,the readout range, the supply voltages,etc., and, of course, the final adjust-ments. Unfortunately, no SRD receivermodules other than the ones from Hei-land Electronic could be tested for thisdesign.

The printed circuit board fits exactlyin the transparent case mentioned inthe parts list. The board should not be

fitted in the case, how-ever, until it has beenadjusted.

The antenna con-nected to the receiver input is a straightpiece of solid wire with a length ofabout 17 cm (see photograph).

A D J U S T M E N TAs already mentioned, there exists alogarithmic relationship between thelocal fieldstrength and the voltage levelat the AM output of the receiver mod-ule. Using the linearLM3914, you thereforeobtain an LED scale (dBscale) with a logarith-mic range. The charac-teristic shown in Fig-ure 6 illustrates thedirect voltage at theAM OUT output (pin 2of the receiver module)

as a function of the RF signal level (indBmV) available at the antenna input.Because this characteristic was foundto be repeatable on several modules wehad on test, the possibility exist to enterdBmV marks on the curve, where theadjustment is carried out using directvoltages. This adjustment is the samefor the LM3914 and the LM3916 — theonly difference is the print around thereadout.

Connect the 9-V supply voltage tothe board (LED D14 lights), short-cir-cuit the push-button contacts, and firstcheck the presence of the 5-V supplyvoltage at pin 7 of the receiver module.Next, see if the 2.4-V reference is pre-sent at pin 5 (normal tolerance:±100 mV). If this value is correct, thenthe voltage at the wiper of P2 is set to200 mV, and that at the wiper of P1, to700 mV. Because of the loading of thesetwo pins by the internal voltagedivider in IC1 (between RHI andRLO), the two settings will interact tosome extent. Consequently, the wipervoltages mentioned above will only beachieved by alternate tweaking of thetwo presets.

Next, connect the anode of D1 tothe above-mentionedauxiliary voltage forthe adjustment of P3(scale factor). Thishelper voltage is bestderived from the stabi-lized 5-volt supply lineby means of a 3.9-kΩseries resistor and a 1-kΩ preset. The wiper

16 Elektor Electronics 10/98

GN

D

AN

TRM 2,54

50

980083 - 12

AM

OU

TF

M/A

M IN

FM

OU

TR

EF

GN

DV

CC

DA

TA

OU

T

HE 433-2/R

30

Figure 2. Pinout of theSRD receiver modulefrom Heiland Elec-tronic.

D7

D6

D9

D8

D10

D2

D11

D4

D3

D5

R5

3k

3

REFOUT

REFADJ

LM3916

IC1

MODE

SIG

RHI

RLOL10

17

16

15

14

13

12

11

10L9

L8

L7

L6

L5

L4

L3

L118

L2

9

5

8

4

6

7

3

2

1

5V

C3

100n

MAX

MIN

C1

100n

D1

BAT82

C2

330n

R4

39

0k

R1

3k

3

R2

22

R3

39

100k

P3

1k

P1

1k

P2

5V

78L05

IC2

C5

10µ10V

C4

100µ16V

R6

82

D13

4V7

0W5

D14

D121N4001

BT1

9V

S1

980083 - 11

DIG-OUT

AM-OUT

F/A-IN

FM-OUT

HE433

M1

REF

2/R

2

1

7

6

3

4

5

8

5V

*

see text*voir texte*

zie tekst*siehe Text*

Figure 3. Circuit dia-gram of the field-strength meter. Themodule has an AMdemodulator outputsupplying a voltagewhich is proportionalto the fieldstrength.This S-meter voltage isprocessed by a LEDbargraph driver.

3

2

Page 4: 418/433-MHz field- strength meter

4

THIS LOADDETERMINES

LEO

BRIGHTNESS

rIO

REF

OUT 7

REF

ADO 0

_L

H3

FLO 4

SIG 1 5

N

18131118

LEO PROGRAMCURRENT

1087

970

923

1531

COMPARATOR1 OF 10

IT

_ _ _ _ _ _ __J

of the preset is then connected to theanode of D1, and a voltage of 0.75 V isset. According to the graph in Figure 6,

LED

i

14

II

fJ

CONTROLSTYPE OFDISPLAY. OAROR SINGLELED

980083. 13

that direct voltage level corresponds toa field strength of about 60 dB,uV. Next,adjust P1 to a voltage of 530 mV at the

Figure 4. Block diagram of theLED driver type LM3916. It dif-fers from the LM3914 and3915 in respect of the valuesof the resistors in the internalvoltage.

ak

SIG input (pin 5 of IC1). LED D7 (theone at pin 15 of IC1) should just go out,and LED D6 (at pin 14) should start tocome on.

If you have a calibrated RF test gen-erator available, its output is connectedto the antenna input of the receivermodule. Next, you set a generator out-put level of 45.5 dBm, which equalsabout 1.3 mV at the antenna input, or60 dB,uV across 60 Q. D1 has to be sol-dered in place at this point, and P1 isadjusted to 530 mV at pin 5, asdescribed above.

When the LM3916 is used, the scaleshown in Figure 7 may be used, thedivisions were established on the basisof field trials. The scale is shown at truesize for convenient copying (for privateands personal use only).

When the LM3914 is used, the LEDscale has divisions of 5 dB,uV per LED,allowing the respective values to beeasily printed on the case.

APPLICATIONSThe fieldstrength meter is suitable forchecking the operation of AM and FMtransmitters operating at 418 MHz or433 MHz, as well as for the evaluationof transmission paths, the absoluterange of a certain transmitter, receptionquality and the suitability of certainlocations for a transmitter or receiver.Also of great importance is the abilityto spot sources of interference, and thepresence of foreign transmitter signalsin the area normally covered by yourown receiver system.

If, for example, you plan to imple-ment a wireless data transmission sys-tem using SRD modules for the 70 -cmband, the fieldstrength meter isinstalled at the planned receiver loca-tion, and the 'test' push-button ispressed. If the readout already showsan indication, that is, with your owntransmitter switched off as yet, thenanother user is on the same frequency.Obviously, this signal may interferewith that to be picked up from yourown transmitter. It is a simple matter todetermine whether the interfering sig-nal is AM or FM. In the case of FM, afixed number of LEDs will light all thetime. If an AM signal is picked up, thereadout will show some variation.

Figure b. ingle-sidedprinted circuit boarddesigned for theinstrument.

Elektor Electronics 10/98 17

of the preset is then connected to theanode of D1, and a voltage of 0.75 V isset. According to the graph in Figure 6,

that direct voltage level corresponds toa fieldstrength of about 60 dBµV. Next,adjust P1 to a voltage of 530 mV at the

SIG input (pin 5 of IC1). LED D7 (theone at pin 15 of IC1) should just go out,and LED D6 (at pin 14) should start tocome on.

If you have a calibrated RF test gen-erator available, its output is connectedto the antenna input of the receivermodule. Next, you set a generator out-put level of 45.5 dBm, which equalsabout 1.3 mV at the antenna input, or60 dBµV across 60 Ω. D1 has to be sol-dered in place at this point, and P1 isadjusted to 530 mV at pin 5, asdescribed above.

When the LM3916 is used, the scaleshown in Figure 7 may be used, thedivisions were established on the basisof field trials. The scale is shown at truesize for convenient copying (for privateands personal use only).

When the LM3914 is used, the LEDscale has divisions of 5 dBµV per LED,allowing the respective values to beeasily printed on the case.

A P P L I C A T I O N SThe fieldstrength meter is suitable forchecking the operation of AM and FMtransmitters operating at 418 MHz or433 MHz, as well as for the evaluationof transmission paths, the absoluterange of a certain transmitter, receptionquality and the suitability of certainlocations for a transmitter or receiver.Also of great importance is the abilityto spot sources of interference, and thepresence of foreign transmitter signalsin the area normally covered by yourown receiver system.

If, for example, you plan to imple-ment a wireless data transmission sys-tem using SRD modules for the 70-cmband, the fieldstrength meter isinstalled at the planned receiver loca-tion, and the ‘test’ push-button ispressed. If the readout already showsan indication, that is, with your owntransmitter switched off as yet, thenanother user is on the same frequency.Obviously, this signal may interferewith that to be picked up from yourown transmitter. It is a simple matter todetermine whether the interfering sig-nal is AM or FM. In the case of FM, afixed number of LEDs will light all thetime. If an AM signal is picked up, thereadout will show some variation.

17Elektor Electronics 10/98

Figure 4. Block diagram of theLED driver type LM3916. It dif-fers from the LM3914 and3915 in respect of the valuesof the resistors in the internalvoltage.

4

(C) E

LEK

TOR

980083-1

(C) ELEKTOR

980083-1

9V

C1

C2

C3

C4

C5

D1

D2

D3

D4

D5D6

D7

D8

D9

D10

D11

D12

D13

D14

IC1

IC2

M1

P1P2 P3

R1

R2

R3R

4

R5

R6

S1

980083-1

BT1 +-

Figure 5. Single-sidedprinted circuit boarddesigned for theinstrument.

5

Page 5: 418/433-MHz field- strength meter

18 Elektor Electronics 10/98

Page 6: 418/433-MHz field- strength meter

19Elektor Electronics 10/98

Weak interferencefrom an AM trans-mitter is generallynot a problem if youuse FM yourself.

The fieldstrengthmeter also enablesyou to get an ideahow often an inter-fering transmitter isactually on the air.When the off-airperiods are sufficiently long, thereshould not be problems if your systemis designed to perform measurements

and transmit theresults at certain inter-vals. In that case, itwill typically be suffi-cient if a temperaturevalue is transmittedevery minute or so.

For reliable recep-tion of the kind of sig-nals transmitted byapproved SRDs for70 centimetres, a field-

strength of about 50 dBµV is required,or about 360 µV at the receiver input.In many cases, a small change in the

position of the receiver or the trans-mitter will enable them to be movedout of a ‘dead zone’.

(980083-1)

1.1

1.0

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0.00 10 20 30 40 50 60

980083 - 14

70 80 90

threshold 18 dB V approx. 8 V

U OUT

(V

) 6

Figure 6. Logarithmiccharacteristic of the S-meter output. The dia-gram shows the relationbetween the direct volt-age at pin 2 of thereceiver module and theRF signal voltage at theantenna input, measuredon three modules of thesame type.

COMPONENTS LIST

Resistors:R1,R5 =3kΩ3R2 =220ΩR3 =390ΩR4 =390kΩR6 =820ΩP1,P2 =1kΩP3 =100kΩ

Capacitors:C1,C3 =100nF ceramicC2 =330nF MKTC4 =100µF 16V radialC5 =10µF 10V radial

Semiconductors:D1 =BAT82D12 =1N4001D2...D11=LED red high efficiencyD14 =LED green high efficiencyD13 =4V7/500mWIC1 =LM3916 (LM3914) (see text)IC2 =78L05

Miscellaneous:BT1 = 9V PP3 battery with clip and

wiresS1 = push-button 1x makeM1 =HE433 2/R* (UK: HE418 2/R*,

see text)Case: Heddic type 222*PCB, order code 980083-1 (see

Readers Services page)

*Manufacturer: Heiland Electronics,D-48351 Everswinkel, Germany. Tel.(+49) 2582 7550, fax (+49) 25827887.

dBµV, dB and dBmBecause the values involved may be considered (logarithmic) ratios rather thanphysical units, measuring and expressing relative signal levels, both RF andAF, is easier if the dB unit is consistently applied instead of, say, millivolts, micro-volts or milliwatts. In principle, the dB (decibel) may be used to express theratio of two (measured) values. For voltage and power ratios, the following basicequations apply for expressions using dB numbers (here, expressed as ‘a’):

Voltage ratio a = 20 log10 (U1/U2)

Power ratio a = 10 log10 (P1/P2)

The really practical thing about this notation is that it makes calculations involv-ing gain and attenuation figures much easier. Whereas gain and attenuationfactors have to be multiplied to arrive at the overall gain or attenuation figureof a certain circuit or system, the same values expressed in dB are simplyadded or subtracted.A value expressed in dB always expresses a ratio between two arbitrary volt-age or power values. In RF technology, dBµV and dBm represent two of themost popular reference units. The first is referred to 1 µV, the second, to 1 mW.So, a level of 20 dBm means 100 mW.

To enable two dBµV values to be compared to one another, the indi-cation has to be based on one and the same impedance at which the voltageshave been measured. In RF technology, the reference impedance is normally50 Ω, 60 Ω or 75 Ω (the first is the most popular).If you are interested in knowing the exact antenna voltage in µV, this value maybe calculated using the above equation for voltages, by using the referencevalue 1 µV for 0 dBµV.

The same applies to power levels expressed in dBm, only then theequation for power ratios is used, and a reference level of 1 mW is assumed.Here, too, it makes no sense to compare values unless they refer to the sameimpedance. Converting from dBm to dBµV and the other way around is noproblem if the impedance, Z, is known. The relation between the three units isexpressed by

P[dBm] = U[dbµV] – 10 log Z[Ω]

ON 20 45 55 65 75 85

980083 - 15

Figure 7. Suggested scale(actual size) for the LED read-out if the LM3916 is used.

Page 7: 418/433-MHz field- strength meter

GENERAL INTEREST

Digital cameras maynot yet have capturedthe imagination of the

consumer market(although most pho-tographic retail out-lets stock them), but

with enhanced imageresolution made pos-sible by recent devel-

opments, and pricefalls they will take anincreasing slice of the

market over the nextfew years. Market

research* indicatesthat the digital cam-

era market in the USAwill grow from

US$240 million in1997 to US$ 930 by

the end 2004.Europe, too, will seea dramatic increase

in this market,although spending

on cameras has fallensteadily over the pastfew years. This article

takes a brief look athow a digital camera

works.

By our Editorial Staff

*Source: Frost & Sullivan

digital camerashow do they work?

All the well-known names are active inthe digital camera market: Agfa,Canon, Casio, Epson, Fuji, Kodak,Mu stek, Olympus, Ricoh, but few pro-duce models in each product segment.There is currently no clear marketleader. Manufacturers are currentlybuilding up their product portfoliosand concentrate on the increasingsophistication of the image resolutionprovided by their cameras. Prices inthe consumer market at the time ofwriting (July 1998) vary from £200 to£700.

In terms of product types, themegapixel camera is leading the field.Ranking in second place is the

extended graphics adaptor type, fol-lowed by vertical grid array camerasand greater than megapixel types.Market researchers* expect that themegapixel camera will retain its lead,followed by greater than megapixeltypes and extended graphics adaptorsby 2004. The vertical grid array cam-era's market share will then havedropped to below 1 per cent. This arti-cle will concentrate on megapixel cam-eras.

DEVELOPMENTSDigital cameras are about to become areal force in the market. Owing torecent developments, manufacturers

22 Elektor Electronics 10/98Elektor Electronics 10/98

All the well-known names are active inthe digital camera market: Agfa,Canon, Casio, Epson, Fuji, Kodak,Mustek, Olympus, Ricoh, but few pro-duce models in each product segment.There is currently no clear marketleader. Manufacturers are currentlybuilding up their product portfoliosand concentrate on the increasingsophistication of the image resolutionprovided by their cameras. Prices inthe consumer market at the time ofwriting (July 1998) vary from £200 to£700.

In terms of product types, themegapixel camera is leading the field.Ranking in second place is the

extended graphics adaptor type, fol-lowed by vertical grid array camerasand greater than megapixel types.Market researchers* expect that themegapixel camera will retain its lead,followed by greater than megapixeltypes and extended graphics adaptorsby 2004. The vertical grid array cam-era’s market share will then havedropped to below 1 per cent. This arti-cle will concentrate on megapixel cam-eras.

D E V E L O P M E N T SDigital cameras are about to become areal force in the market. Owing torecent developments, manufacturers

Digital cameras maynot yet have capturedthe imagination of the

consumer market(although most pho-tographic retail out-lets stock them), but

with enhanced imageresolution made pos-sible by recent devel-

opments, and pricefalls they will take anincreasing slice of the

market over the nextfew years. Market

research* indicatesthat the digital cam-

era market in the USAwill grow from

US$240 million in1997 to US$ 930 by

the end 2004.Europe, too, will seea dramatic increase

in this market,although spending

on cameras has fallensteadily over the pastfew years. This article

takes a brief look athow a digital camera

works.

*Source: Frost & Sullivan

22

how do they work?

digital cameras

phot

o: P

hilip

s

GENERAL INTEREST

By our Editorial Staff

Page 8: 418/433-MHz field- strength meter

are finally able toproduce a digitalcamera that iscost-efficient, hasa reasonably storage capacity, and hasa resolution that makes it suitable fora number of applications.

Although a breakthrough is insight, developments are nowhere nearat an end. Two years ago, the few dig-ital cameras on the retail market had aresolution of about 280×340 pixels;today, some of the better-quality digi-tal cameras have a resolutionapproaching one million pixels. Ofcourse, compared with film, this reso-lution is low. A film has not less than100 lines per millimetre, which meansthat a standard 35 mm film image hasa resolution of some 2400×3600 pixels.It is expected that within a few yearsthere will be digital cameras in theshops with a resolution of two millionpixels, which is, of course, still signifi-cantly less than the 8.5 million of con-ventional film.

T E C H N O L O G YThe technology that has made digitalcameras possible comes partly fromthe semiconductor industry and partlyfrom the film industry.

The semiconductor industry hasdeveloped compact , high-resolutionimage sensors, while the film industryhas developed advanced compressionalgorithms, such as JPEG (Joint Photo-graphic Experts Group), which areable to convert the enormous amountof data that form a picture into verycompact files.

Today, microprocessors used in dig-ital cameras are able without any dif-ficulty to compress in a very short timea digital file of several Mbytes to somehundreds of Kbytes. These processorsare complemented by memory cardsthat can store these data in semi-per-manent form.

L I G H T C O N V E R T E RA digital camera needs a converter thattransforms the light incident on the

lens into electricalsignals. In mostdigital camerasthis task is per-

formed by a charge-coupleddevice–CCD.

A CCD is a semiconductor storagedevice in which an electrical charge ismoved across the surface. Zeros andones are represented, respectively, bythe absence or presence of a charge. Inmost digital cameras, the charge trans-fer system, in which a charge is createdby an impinging photon, is containedin MIS (metal insulated semiconduc-tor) or MOS (metal oxide semiconduc-tor) capacitors fabricated on a singlecrystal wafer.

Photons, which may be consideredas elementary particles of light, passthrough the lens of the camera on tothe CCD. The energy contained in aphoton is converted by the CCD intoan electron/hole pair. If the totalenergy is sufficient, electrons may passfrom the valence band to the empty(conduction) band. This causes a holein the valence band. This chargem o v e m e n treduces theamount of

energy contained in the incident pho-tons by an amount equal to the energydifference between the empty andvalence bands. This means that for acharge to be moved, the energy of theincident light must be greater than theforbidden band. In CCDs, this nor-mally means that photons can createan electron/hole pair if their energy isgreater than 1 eV (electron-volt) andtheir wavelength is <1 µm. After thisenergy has been stored in the sub-strate, the negative electrons and pos-itive holes must be separated. This iseffected by applying an electric fieldacross the substrate, whereupon theelectrons are freed and the holes dis-appear into the substrate.

Unfortunately, it is virtually impos-sible to move a free electron since itsenergy is so tiny. Therefore, theenergy, that is, the free electrons aregathered over a given period to makediscrete packets of charge available.These packets are then moved to theoutput, for which a small capacitor isused.

Figure 1 shows two variants of aphoto-sensitive cell: in (a) a metallur-gical n-p junction and in (b) a voltage-induced n-p junction. Both use ap-type substrate. The separation ofholes and electrons is effected by anelectric field across the n-p junction.When the fieldstrength across thejunction is reduced, the capacitance ofthe capacitor diminishes and the den-sity of the charge carriers increases.This means that the sensitivity of thesensor can be adjusted with a controlpotential.

C H A R G E T R A N S P O R TThe next link in the imaging chain isthe transport of the packets of chargefrom the integrating sites towards theoutput of the device. There are two

ways of doingthis: eitherwith a MOS

23Elektor Electronics 10/98

n+

Photon

n+

Photon

Gate

SiO2

p-Si

a b 980081 - 11

Figure 1. Two photon-convert-ing cells: (a) a metallurgicalnp-junction, and (b) a voltage-induced np-junction.

a

b

n+ n+ n+

Photon

p-Si

980081 - 12

n+ n+

Photon

p-Si

1

2

Figure 2. Read-out structure to con-nect the photodiode to the outsideworld: (a) a MOS switch, and (b) aCCD shift register.

Page 9: 418/433-MHz field- strength meter

switch containing a sense line or witha CCD shift register (see Figure 2). Inboth, the imaging cell or pixel consistsof a photodiode constructed on ap -type substrate. The choice betweena MOS switch with a sense line and aCCD shift register depends to somedegree on the application. Both havetheir advantages and disadvantages.For the MOS switch with sense line,the fabrication technology is rathersimple, but the switch connects thesmall capacitance of the pixel to therather large capacitance of the senseline. This arrangement causes the sig-nal-to-noise factor to be rather poor.

On the other hand, the technologyfor the CCD shift register is more com-plex in production and requires a clockto shift the packets of charge to theoutput capacitor via various interme-diate capacitors. However, the chargepacket taken from the small pixelcapacitance is transferred to the smallcapacitance of the output diffusionand this results in an excellent signal-to-noise factor.

With reference to Figure 2, the con-version from a packet of charge to avoltage at the output pin of the imageris done in a classical way: sensing ofthe voltage changes on a floatingn+ -region by means of a source -fol-lower.

IMAGER CONFIGURATIONSSo far, only the operation of a singleimaging cell or pixel is explained. Inpractical applications, images can bebuilt up in a one-dimensional path, forinstance, facsimile, or in a two-dimen-sional configuration, for example,home video or

1ce a

frame transfer image sensor.

Output

camcorders.

FRAME TRANSFERDigital cameras use frame transfer (FT)CCDs, which are different from othertypes of CCD in the way imaging dataare transported from the light-sensitivecell or pixel to the output. In FT-CCDs,MOS cells, that is, cells that use MOScapacitors, are used. Since the imag-ing elements, the light-sensitive sensorand the capacitors are fabricated inMOS technology, they can be, andoften are, combined in a single design.

Each photo -sensitive CCD array isextended by a CCD shift register of

equal length-

Horizontal output CCD register980081 - 13

see Figure 3. The CCD shift register isshielded from any incident light,which means that it can be used as abuffer memory.

The cycle of operation is then as fol-lows. In the mode in which light isregistered, all cells are set to the inte-grating mode. One part of the CCDcells is connected to a high direct volt-age, and another to a low direct volt-age. In this mode, photons create acharge, which are gathered into pack-ets. At the termination of a definedintegration period (in a camera, this isthe shutter time), the CCD shift regis-ters ensure that their charge is storedin the light -immune part of the array.The charge transport takes place asquickly as possible to prevent mutila-tion of the data.

When all packets of charge havebeen transported, a start is made withreading the CCD. During this phase ofthe process, the packets of charge onone and the same horizontal line (buton different vertical lines) are clockedto a CCD output register, whereuponthe packets are shifted to the output(parallel -to -serial conversion) and con-verted into a direct voltage. Once aline has been processed, the next oneis clocked to the output register. Thisprocess continues until all lines havebeen read. The video signal is thenavailable.

In principle it is possible for thephoto -sensitive part of the CCD to beactive while data are read from itslight -immune part.

COLOURSince all CCD cells react to incidentlight in a similar manner, the devicesare suitable for black -and -white imag-ing only. For colour operation, the cellsare combined with colour filters to

Co

0_CCL

24 Elektor Electronics 10/98

switch containing a sense line or witha CCD shift register (see Figure 2). Inboth, the imaging cell or pixel consistsof a photodiode constructed on ap-type substrate. The choice betweena MOS switch with a sense line and aCCD shift register depends to somedegree on the application. Both havetheir advantages and disadvantages.For the MOS switch with sense line,the fabrication technology is rathersimple, but the switch connects thesmall capacitance of the pixel to therather large capacitance of the senseline. This arrangement causes the sig-nal-to-noise factor to be rather poor.

On the other hand, the technologyfor the CCD shift register is more com-plex in production and requires a clockto shift the packets of charge to theoutput capacitor via various interme-diate capacitors. However, the chargepacket taken from the small pixelcapacitance is transferred to the smallcapacitance of the output diffusionand this results in an excellent signal-to-noise factor.

With reference to Figure 2, the con-version from a packet of charge to avoltage at the output pin of the imageris done in a classical way: sensing ofthe voltage changes on a floatingn+-region by means of a source-fol-lower.

I M A G E R C O N F I G U RAT I O N SSo far, only the operation of a singleimaging cell or pixel is explained. Inpractical applications, images can bebuilt up in a one-dimensional path, forinstance, facsimile, or in a two-dimen-sional configuration, for example,home video or

camcorders.

F R A M E T R A N S F E RDigital cameras use frame transfer (FT)CCDs, which are different from othertypes of CCD in the way imaging dataare transported from the light-sensitivecell or pixel to the output. In FT-CCDs,MOS cells, that is, cells that use MOScapacitors, are used. Since the imag-ing elements, the light-sensitive sensorand the capacitors are fabricated inMOS technology, they can be, andoften are, combined in a single design.

Each photo-sensitive CCD array isextended by a CCD shift register of

equal length—

see Figure 3. The CCD shift register isshielded from any incident light,which means that it can be used as abuffer memory.

The cycle of operation is then as fol-lows. In the mode in which light isregistered, all cells are set to the inte-grating mode. One part of the CCDcells is connected to a high direct volt-age, and another to a low direct volt-age. In this mode, photons create acharge, which are gathered into pack-ets. At the termination of a definedintegration period (in a camera, this isthe shutter time), the CCD shift regis-ters ensure that their charge is storedin the light-immune part of the array.The charge transport takes place asquickly as possible to prevent mutila-tion of the data.

When all packets of charge havebeen transported, a start is made withreading the CCD. During this phase ofthe process, the packets of charge onone and the same horizontal line (buton different vertical lines) are clockedto a CCD output register, whereuponthe packets are shifted to the output(parallel-to-serial conversion) and con-verted into a direct voltage. Once aline has been processed, the next oneis clocked to the output register. Thisprocess continues until all lines havebeen read. The video signal is thenavailable.

In principle it is possible for thephoto-sensitive part of the CCD to beactive while data are read from itslight-immune part.

C O L O U RSince all CCD cells react to incidentlight in a similar manner, the devicesare suitable for black-and-white imag-ing only. For colour operation, the cellsare combined with colour filters to

24 Elektor Electronics 10/98

980081 - 13Output Horizontal output CCD register

Mem

ory

arr

ayP

ho

to-s

ensi

tive

CC

D a

rray

Figure 3. Device architecture of aframe transfer image sensor.

3

phot

o: S

ony

Page 10: 418/433-MHz field- strength meter

ccd chip formatsThe roots for describing the size of imaging sensors in inches go back to the time when there were only vidicons. Avidicon with a diameter of 1 inch (25.3 mm) had a rectangular, active window with a diameter of 0.6 in (16 mm). Thisformat has been retained until today.

CCDs are available in various sizes: 1 in, 2/3 in, 1/2 in, and 1/3 in. Nowadays, 1 in chips are used rarely, whereas1/2 in and 1/3 in types have experienced a constant growth in applications, mainly in the field of surveillance, miniaturecameras, and home video cameras

Reducing the active sensor surface results in smaller pixels, eventually lowering the resolution. For most applica-tions, a highly detailed picture is more important than the size of the CCD and thus more important than the size of the

1" 2/3v,

8.8

CO

CO

6.4

dimensions in mm

CO

ri

V

980081 - 16

camera. For instance, the Olympus C -1400L uses a 2/3 in CCD containing 1.4 million pixels. The horizontal resolution is1280 pixels, and the vertical, 1024 pixels. Note that this deviates somewhat from the usual4:3 picture ratio.roots for describing the size of imaging sensors in inches go back to the time when there were only vid icons. A vidi-

con with a diameter of 1 inch (25.3 mm) had a rectangular, active window with a diameter of 0.6 in (16 mm). This for-mat has been retained until today.

CCDs are available in various sizes: 1 in, 2/3 in, 1/2 in, and 1/3 in. Nowadays, 1 in chips are used rarely, whereas1/2 in and 1/3 in types have experienced a constant growth in applications, mainly in the field of surveillance, miniaturecameras, and home video cameras

Reducing the active sensor surface results in smaller pixels, eventually lowering the resolution. For most applica-tions, a highly detailed picture is more important than the size of the CCD and thus more important than the size of thecamera. For instance, the Olympus C -1400L uses a 2/3 in CCD containing 1.4 million pixels. The horizontal resolution is1280 pixels, and the vertical, 1024 pixels. Note that this deviates somewhat from the usual4:3 picture ratio.

make them react to the green, blue orred component of the incident lightonly. Since the human eye is more sen-sitive to green than to the othercolours, there are more green -sensitivecells than red and blue ones.

The measured light intensity percell is divided into 256 levels of bright-ness. In this way, each composite pixelgives 2563 shades of colour, so that truecolour operation is possible.

There are two types of CCD: onefor video cameras and the other forfilm cameras. CCDs for video applica-tions have rectangular cells and are fil-tered with cyan, magenta and yellowfilters. Moreover, in these CCDs use ismade of the fact that television pic-tures are built up from two halves(frames).

It might appear as if this type ofCCD could also be used in film cam-eras, but this is not so because in thecase of fast moving objects the differ-ence between the two frames wouldbe so large that serious distortionwould ensue. Nevertheless, this typeof CCD is easy and inexpensive to pro-duce and it is therefore used in inex-pensive digital film cameras. Up-mar-ket digital cameras use a CCD specially

developed for them: the progressiveCCD.

PROGRESSIVE CCDProgressive CCDs use square pixelswhich are filtered in the primarycolours: red, green and blue (RGB).Moreover, each pixel is associated withonly one primary colour. To ensurethat a perfect image is constructed

with this arrangement, the camera isfitted with advanced software. Thequality of this determines to a very sig-nificant degree the quality of the out-put image (picture). Finally, a progres-sive CCD captures the picture in oneoperation, that is, it does not use twohalves (frames). Mutilation of fastmoving objects therefore does notoccur.

Elektor Electronics 10/98 25

make them react to the green, blue orred component of the incident lightonly. Since the human eye is more sen-sitive to green than to the othercolours, there are more green-sensitivecells than red and blue ones.

The measured light intensity percell is divided into 256 levels of bright-ness. In this way, each composite pixelgives 2563 shades of colour, so that truecolour operation is possible.

There are two types of CCD: onefor video cameras and the other forfilm cameras. CCDs for video applica-tions have rectangular cells and are fil-tered with cyan, magenta and yellowfilters. Moreover, in these CCDs use ismade of the fact that television pic-tures are built up from two halves(frames).

It might appear as if this type ofCCD could also be used in film cam-eras, but this is not so because in thecase of fast moving objects the differ-ence between the two frames wouldbe so large that serious distortionwould ensue. Nevertheless, this typeof CCD is easy and inexpensive to pro-duce and it is therefore used in inex-pensive digital film cameras. Up-mar-ket digital cameras use a CCD specially

developed for them: the progressiveCCD.

P R O G R E S S I V E C C DProgressive CCDs use square pixelswhich are filtered in the primarycolours: red, green and blue (RGB).Moreover, each pixel is associated withonly one primary colour. To ensurethat a perfect image is constructed

with this arrangement, the camera isfitted with advanced software. Thequality of this determines to a very sig-nificant degree the quality of the out-put image (picture). Finally, a progres-sive CCD captures the picture in oneoperation, that is, it does not use twohalves (frames). Mutilation of fastmoving objects therefore does notoccur.

25Elektor Electronics 10/98

ccd chip formats The roots for describing the size of imaging sensors in inches go back to the time when there were only vidicons. Avidicon with a diameter of 1 inch (25.3 mm) had a rectangular, active window with a diameter of 0.6 in (16 mm). Thisformat has been retained until today.

CCDs are available in various sizes: 1 in, 2/3 in, 1/2 in, and 1/3 in. Nowadays, 1 in chips are used rarely, whereas1/2 in and 1/3 in types have experienced a constant growth in applications, mainly in the field of surveillance, miniaturecameras, and home video cameras

Reducing the active sensor surface results in smaller pixels, eventually lowering the resolution. For most applica-tions, a highly detailed picture is more important than the size of the CCD and thus more important than the size of the

camera. For instance, the Olympus C-1400L uses a 2/3 in CCD containing 1.4 million pixels. The horizontal resolution is1280 pixels, and the vertical, 1024 pixels. Note that this deviates somewhat from the usual 4:3 picture ratio.roots for describing the size of imaging sensors in inches go back to the time when there were only vidicons. A vidi-

con with a diameter of 1 inch (25.3 mm) had a rectangular, active window with a diameter of 0.6 in (16 mm). This for-mat has been retained until today.

CCDs are available in various sizes: 1 in, 2/3 in, 1/2 in, and 1/3 in. Nowadays, 1 in chips are used rarely, whereas1/2 in and 1/3 in types have experienced a constant growth in applications, mainly in the field of surveillance, miniaturecameras, and home video cameras

Reducing the active sensor surface results in smaller pixels, eventually lowering the resolution. For most applica-tions, a highly detailed picture is more important than the size of the CCD and thus more important than the size of thecamera. For instance, the Olympus C-1400L uses a 2/3 in CCD containing 1.4 million pixels. The horizontal resolution is1280 pixels, and the vertical, 1024 pixels. Note that this deviates somewhat from the usual 4:3 picture ratio.

12.8

8.86.4

4.4

9.6 6

.6 4.8

3.316 11 8 6.5

980081 - 16

dimensions in mm

1" 2/3" 1/2" 1/3"

phot

o: O

lym

pus

Page 11: 418/433-MHz field- strength meter

To ensure optimum results from theCCD, taking account of various prop-erties, the device has twice as manygreen-sensitive cells as red- or blue-sensitive ones.

It should be noted that in (good)digital cameras a separate sensor isused for each primary colour. Thespecified resolution does thereforeconform to the actual number of sen-sors. It might be thought that eachpixel is built up by three sensors, eachreacting to a different primary colour.However, manufacturers have taken adifferent route by computing thedesired colour data with the aid ofrefined algorithms. The colour infor-mation for each pixel is therefore theresult of an arithmetic analysis inwhich the data of adjacent pixels arealso taken into consideration.

C O M P R E S S I O NWhen the digital data representing apicture have been gathered, they are

compressed in the camera with the aidof a microprocessor. Of a picture con-sisting of 1028 × 768 pixels, each pixelmust be stored with a resolution of 24bits. This is equivalent to 2.25 Mbyte ofdigital data. In other words, the inter-nal memory of a camera, usually2–4 Mbyte, would be able to containonly a few pictures.

The solution to this problem is anintegral compression algorithm. A dis-tinction must be made between loss-less compression and redundant-bitcompression. With loss-less compres-sion, for instance, the TIFF (TaggedImage File Format) with LZW (LempelZiv Welch – a Unisys patent) com-pression, use is made of the data struc-ture. Sequential series of identicalinformation are clustered as shown inFigure 4, which results in a significantcompression of data.

Much better efficiency is providedby redundant-bit compression, inwhich, as the name implies, data are

made redundant. In such compressionalgorithms, for instance, JPEG, use ismade of the fact that the human eyecan perceive only about 2000 shades ofcolour, which is appreciably fewerthan the 16.7 million that are regis-tered.

How such an algorithm analyses aseries of colour shades and replaces itwith a much more compact series isshown in Figure 5. The higher thecompression, the more detail is lostand the poorer the quality of thereproduced image. Nevertheless, withthe use of this kind of algorithm andwithout much discernible loss of qual-ity, a 2 Mbyte file can be reduced to100 Kbyte or less. The data so obtainedmay be stored in the internal memoryor on the added memory card.

[980081]

26 Elektor Electronics 10/98

white-white-white-white-white-red-red-red-yellow-yellow etc.

source file

lossless compression

5x 3x 2x

980081 - 14

white-white-bright red-pink-red-dark red-red-pink etc.

source file

2x white-2x dark red-3x red-1x bright red etc.

light compression

2x white-6x red etc.

heavy compression

980081 - 15

Figure 4. Picture data may be compressed loss-less, for instance, by LZW compression assketched.

Figure 5. Much more severe compression is pos-sible if certain data can be made redundant.Illustrated is how the degree of compressiondetermines the loss of detail.

MOS or CMOS?Currently, CCDs are produced in MOS technology, which has several disadvantages. For example, it is not suitable forenergy-saving circuits, and it is a deviant production pro-cess.

The semiconductor industry pre-fers energy-saving CMOS technology and researchers are therefore workingon the development of CCDs in this technology. Recently, it was announced that the first CMOS CCDs had been produced.This will, in time, bring down the price of CCDs and, perhaps more importantly, it will become possible to add intelli-gence to the device. For example, it will then be possible for the data of each and every pixel or cluster of pixels to beprocessed on the CCD.

Moreover, a single pixel may be accessed so that new functions, such as picture analysis, can be provided bythe CCD.

The Fraunhofer Institute for Microelectronic Circuits recently announced the design of a CMOS CCD with120,000 imaging cells and associated logic circuits.

Another research institute has succeeded in developing a single-row photosensor 2048 pixels wide and anexposure-time range from 100 ns to 4 s. Each imaging cell in this design has its own read-out amplifier, a buffer anddark compensation. This enables the CCD to be used even at very low light intensities.

4 5

Page 12: 418/433-MHz field- strength meter

MICROPROCESSORS

versatile controlsystem PLC87(A)

part 1: a PLC based on theSimatic S5 instruction set

In the industry, there isno such thing as

process automationwithout ProgrammableLogic Controls (PLCs).

These systems are typi-cally quicker and easier

to program than justabout any microcon-

troller circuit, and theyalso allow variables to

be observed during pro-gram execution. The

PLC87 and 87A boardsdescribed here are basi-

cally 8751 (or 87C550)based systems capableof executing Simatic-S5

oriented commandsequences, the S5 com-

mand set representinga well -establishedindustry standard.

Design by R. Geugelin

The PLC87 is a small plug -on boardcontaining a microcontroller systemthat may be programmed like a tradi-tional PLC. It also allows an LC (liquidcrystal) display to be connected in asimple way. In addition to the micro -controller, an 87C51 or 87C550, thesmall single -sided board also containsa serial EEPROM and a level convertertype MAX232. When the 87C51 is used,the PLC87 has 16 digital inputs and 12digital outputs. When the 'analogue'version, the PLC87A, is built, the87C550 controller used, and the system

then has 10 digital inputs and outputsas well as 6 analogue/digital inputsavailable for your applications.

The PLC87 board is connected tothe application circuit by way of fourboxheaders. The LCD module has twolines of 16 characters, and is connectedto another boxheader without the needfor any additional hardware. If addi-tional input keys are required, thesemay be connected to the multiplexinputs.

The PLC87 board processes a com-mand sequence (CS) which is 'built' on

28 Elektor Electronics 10/98Elektor Electronics 10/98

The PLC87 is a small plug-on boardcontaining a microcontroller systemthat may be programmed like a tradi-tional PLC. It also allows an LC (liquidcrystal) display to be connected in asimple way. In addition to the micro-controller, an 87C51 or 87C550, thesmall single-sided board also containsa serial EEPROM and a level convertertype MAX232. When the 87C51 is used,the PLC87 has 16 digital inputs and 12digital outputs. When the ‘analogue’version, the PLC87A, is built, the87C550 controller used, and the system

then has 10 digital inputs and outputsas well as 6 analogue/digital inputsavailable for your applications.

The PLC87 board is connected tothe application circuit by way of fourboxheaders. The LCD module has twolines of 16 characters, and is connectedto another boxheader without the needfor any additional hardware. If addi-tional input keys are required, thesemay be connected to the multiplexinputs.

The PLC87 board processes a com-mand sequence (CS) which is ‘built’ on

28

Design by R. Geugelin

versatile controlsystem PLC87(A)

part 1: a PLC based on theSimatic S5 instruction set

In the industry, there isno such thing as

process automationwithout ProgrammableLogic Controls (PLCs).

These systems are typi-cally quicker and easier

to program than justabout any microcon-

troller circuit, and theyalso allow variables to

be observed during pro-gram execution. The

PLC87 and 87A boardsdescribed here are basi-

cally 8751 (or 87C550)based systems capableof executing Simatic-S5

oriented commandsequences, the S5 com-

mand set representinga well-establishedindustry standard.

MICROPROCESSORS

Page 13: 418/433-MHz field- strength meter

Irr

IC4

5V

112mom

100n1

R4 i R5

AO

1C36

Al SCL3 5

A2 SDA

X24C16

K6

0

,

0

O

5V

C2

ID

5V

C) K1

2

4

6

10

12

16

14

O 0O 0O 0O 0O 0O 0O 0O 0

5V

0C6

63

31

9

40

29

30

3

5

7

9

11

13

15

2

3

4

5

6

7

8

12

13

14

13

9

8

C'.711 C10 7-

V

0IC2

TOUT

R2IN

T2OUT

Cl

Cl

TlIN

R1OUT

R2OUT

T2IN

MAX232

C2

11

10

3

11

12

CS

601

a PC using a special program calledPLC87. The command sequence isactually the programming language ofthe PLC, and will be the subject ofpart 2 of this article, to be publishednext month. The CS mnemonics aretransferred from the PC to the PLC87by way of a serial link. The PLC87 pro-gram also allows the values of variablesto be checked and modified. The samesoftware is used for the analogue ver-sion PLC87A. The command sequenceis heavily based on the Simatic S5instruction set, to with added com-mands for display control and datalogging. Program structuring is, how-ever, not possible because that wouldexhaust the resources offered by themicrocontroller. Also, the PLC87(A) isnot suitable for fast events because thecommand sequence is marked by a rel-atively long cycle time.

The analogue version PLC87Aenables you to capture temperaturesand other measurement values fromthe 'real world'. The only differencewith the all -digital PLC87 is the modi-fied pinning of the control board. Anyanalogue input may also be configuredas a digital input.

The PLC87(A) board may be theheart of a small system for machine

9

10

4

5

EA/VP

RESET

PSEN

ALE/PP

P1.0

P1.1

P1.2

P1.3

P1.4

P1.5

P1.6

P1.7

IC1

87C51

INTO/P3.2

En/P3.3

TXD/P3.1

RXD/P3.0

P0.0

P0.1

P0.2

P0.3

P0.4

P0.5

P0.6

P0.7

P2.0

P2.1

P2.2

P2.3

P2.4

P2.5

P2.6

P2.7

TO/P3 4

Tl/P3 5

WR/P3 6

RD/P3.7

X1 X2

19:100n

39

R1 1 8x 10k

2 3 4 5 6 7 8 9

38

37

36

35

34

33

32

21

22

5V

K3 0c70.0000000-.

15 0114.,

3

7

9

11

13

23

24

25

26

27

28

14

15

16

C2 ... C5; C10 = 4x 10µ / 63V

20

C7 CB

277 77p11.0592MHz

K2

5V

02 0 0

O

17

0 0 5

K5

5 0 0 5

V

0 000-0 00 0

0

2

14

16

O ooO

01L..)

000114.,

O

K4

12

T980066 - 11

Figure 1. The PLC87 is really no more than a small microcon-troller system.

K7

0 0 0 0 0 0 0 0 0 0 0 O

14

K8

000000

0013

O 7000

D3 I D4 D5

X7

0

8x

1N41!8

control, or a simple text output systemif its LC display is used. Alternatively,you may want to use it to learn thebasics of PLC programming, for exam -

D10

L.7

19

R7

980066 - 12

ple, to implement an intelligent heat-ing control, a code lock, a garage dooropener or even a simple datalogger.The PLC87 board may also be used to

Elektor Electronics 10/98 29

a PC using a special program calledPLC87. The command sequence isactually the programming language ofthe PLC, and will be the subject ofpart 2 of this article, to be publishednext month. The CS mnemonics aretransferred from the PC to the PLC87by way of a serial link. The PLC87 pro-gram also allows the values of variablesto be checked and modified. The samesoftware is used for the analogue ver-sion PLC87A. The command sequenceis heavily based on the Simatic S5instruction set, to with added com-mands for display control and datalogging. Program structuring is, how-ever, not possible because that wouldexhaust the resources offered by themicrocontroller. Also, the PLC87(A) isnot suitable for fast events because thecommand sequence is marked by a rel-atively long cycle time.

The analogue version PLC87Aenables you to capture temperaturesand other measurement values fromthe ‘real world’. The only differencewith the all-digital PLC87 is the modi-fied pinning of the control board. Anyanalogue input may also be configuredas a digital input.

The PLC87(A) board may be theheart of a small system for machine

29Elektor Electronics 10/98

K3

10

11 12

13 14

15 16

1 2

3 4

5 6

7 8

9

K4

10

11 12

13 14

15 16

1 2

3 4

5 6

7 8

9

K5

10

11 12

13 14

15 16

1 2

3 4

5 6

7 8

9

K1

10

1112

1314

1516

12

34

56

78

9

8x 10k1

2 3 4 5 6 7 8 9

R1

X1

11.0592MHz

C7

27p

C8

27p

C9

100nC1

10n

C6

10µ63V

R3

10

k

12

34

56

78

910

K2

R2

1k

K6

1

2

3

4

5

6

7

8

9MAX232

R1OUT

R2OUT

T1OUT

T2OUT

IC2

T1IN

T2IN

R1IN

R2IN

C1–

C1+

C2+

C2–

11

12

10

13

14

15

16V+

V-

7

8 9

3

1

4

5

2

6

C3

C4

C10

C2

C5

C11

100n

X24C16

IC3 SCL

SDA

A0

A1

A2

1

6

8

4

5

2

3

7

INT0/P3.2

INT1/P3.3

TXD/P3.1

RXD/P3.0 RD/P3.7

WR/P3.6

T0/P3.4

T1/P3.5

EA/VP

ALE/P

RESET

87C51

P0.0

P0.1

P0.2

P0.3

P0.4

P0.5

P0.6

P0.7P1.0

P1.1

P1.2

P1.3

P1.4

P1.5

P1.6

P1.7

P2.0

P2.1

P2.2

P2.3

P2.4

P2.5

P2.6

P2.7

PSEN

IC1

39

38

37

36

35

34

33

32

21

22

23

24

25

26

27

28

31

19

X1

18

X2

20

40

17

16

29

30

11

10

12

1314

15

1

2

3

4

5

6

7

8

9

R4

2k

2

R5

2k

2C12

100n

7805

IC4

C14

470µ25V

C13

4µ763V

D2

1N4002

D1

R6

1k

5

C2 ... C5; C10 = 4x 10µ / 63V

> 9V 5V

5V

5V

5V

5V

5V

5V

5V

980066 - 11

1

K8

10

1112

1314

1516

12

34

56

78

9

K7

D3

S1

D4

S2

D5

S3

D6

S4

D7

S5

D8

S6

D9

S7

D10

S8

R7

1k

8x 1N4148 980066 - 12

Figure 1. The PLC87 is really no more than a small microcon-troller system.

control, or a simple text output systemif its LC display is used. Alternatively,you may want to use it to learn thebasics of PLC programming, for exam-

ple, to implement an intelligent heat-ing control, a code lock, a garage dooropener or even a simple datalogger.The PLC87 board may also be used to

Page 14: 418/433-MHz field- strength meter

design simple microprocessor circuitsif you don’t know the first thing aboutassembly-language programming. Theonly thing that will constantly seem tobe in your way is the relatively slowprogram execution due to the serialEEPROM. Depending on the configu-ration, the pin assignment of the PLC

board is divided into control pins andsignal pins, and input and output pins,by the software as shown in Table 1.

H A R D W A R E : F U N C -T I O N , C O N S T R U C T I O NA N D T E S TThe PLC87(A) is simple to build andtest, after all, it is an ordinary ‘mini-mum configuration’ microcontrollersystem with the usual ingredients: con-troller with integrated ROM for the CSinterpreter, an EEPROM acting as the

CS program memory,and a serial interface toestablish the link to thePC. These sub-circuits areeasily identified in thecircuit diagram shown inFigure 1. The 87C51 con-troller exploits only a partof its port P3 for internaloperations (EEPROM,serial interface) — allother port lines are freelyavailable for PLC applica-tions. The LC display andthe input keys are wiredto connector K5. Becausethe PLC87 inputs andoutputs make direct useof the controller portlines, it should be notedthat input signals are TTLcompatible, and outputsignals can not be loadedtoo heavily. In general, itwill therefore be neces-sary to add drivers to thecontroller port lines.

The few parts arequickly installed on thesmall printed circuitboard which is single-sided. It is best to startwith the smaller compo-nents like capacitors andresistors, and finish withthe boxheaders and theintegrated circuits. Werecommend using sock-ets for the ICs. The cop-per track layout andcomponent orientationaid of the board areshown in Figure 2.

Once the board isfully populated, it is wiseto run a thorough checkon the orientation of allelectrolytic capacitorsand integrated circuits.Then inspect the solderside of the board for dryjoints and short-circuitscaused by excess solder. Ifeverything appears to bein order, you connectpin 20 to ground andpin 40 to the +5 V supplyline. Launch the PLC87program on the PC, and

establish the hardware connectionbetween the PC and the PLC87 board.Once the right interface (COM port)has been selected, and ENTER ispressed in the ONLINE menu, theactual connection is made. If every-thing works so far, a menu pops up.Note that for first-time use the displayhas to be excluded in the CONFIGmenu if it is not connected. If you forgetto do this, the controller will not startproperly, or simply ‘hang’. If this hap-pens, the only solution is to switch the

30 Elektor Electronics 10/98

980066-1

(C) ELEKTOR

(C) ELEKTOR

980066-1

C1

C2

C3

C4

C5

C6

C7

C8

C9

C10

C11

C12

C13

C14

D1

D2

D3

D4

D5

D6

D7

D8

D9

D10

H1 H1

H2

H2

H3 H3

H4

H4

H5

H6

H7

IC1

IC2

IC3

IC4

K1

K2

K3

K4

K5

K6

K7

K8

R1

R2

R3

R4

R5

R6

R7

S1

S2

S3

S4

S5

S6

S7

S8

X1

+ 0

980066-1

980066-1

980066-1

(C) E

LEK

TOR

(C) E

LEK

TOR

980066-1

2

Figure 2. Although the printed cir-cuit board was designed to be ascompact as possible, we managedto keep it single-sided.

Page 15: 418/433-MHz field- strength meter

COMPONENTS LIST

Resistors:R1 = SIL array 8x10 k52R2,R7 = 1 k52R3 = 10 k52R4,R5 = 2k522R6 = 1k525

Capacitors:Cl = 10nF ceramicC2-C6,C10 = 10µF 63V radialC7,C8 = 27pFC9,C11,C12 = 100nF ceramicC13 = 4,ttF7 63V radialC14 = 470,uF 25V

Semiconductors:D1 = high efficiency LEDD2 = 1N4002D3 = 1N4148IC1 = 87C51 (digital version, order

code 986513-1) or 87C550 (ana-logue version, order code 986514-1)

IC2 = MAX232CP (Maxim)IC3 = X24C16 (Xicor) or PCF85116-3

(Phillips) or M24C16-BN6 (SGS)IC4 = 7805

Miscellaneous:X1 = crystal 11.0592 MHzK1,K3,K4,K5 = 16 -way boxheaderK2 = 10 -way boxheaderK6 = 9 -way sub -D socket (female),

PCB mount, angled pinsLCD module, 2 x 16 charactersS1 -S8 = presskey D6 -C-90 (ITC) with

cap BTN-ED6-90 (Conrad Electron-ics o/n 700622)

IC socketsSolder pinsPCB, order code 980066-1 (see

Readers Services page)Disk, order code 986026-1 (see

Readers Services page).

PLC87 off, remove the EEPROM fromits socket, start the PLC87 without theEEPROM, and only then insert thememory chip again.

PC SOFTWARE PLC87The DOS program PLC87 on the disksupplied for this project will also rununder Windows 95. It creates, archives,modifies and debugs commandsequences for the PLC87 board. Insertthe disk (order code 986026-1) intoyour floppy disk drive and at the DOSprompt type install. The program willautomatically install itself into the sub -directory c:\p1c87, and can be launchedfrom there by typing PLC87. Formouse support under DOS you startthe program by typing PLC87 +M. Nomouse support is available under Win-dows 95 because of possible conflicts.A list of options appears, and individ-ual options may be selected in theusual way by means of the arrow keys(and Enter) or the underlined letter.

To begin with, you select the serialinterface used to talk to the PLC87board, the printer, and the colours you

want to use. Save these settings.By pressing F1 you will be able to

obtain online Help for most menuoptions. In the Help windows, you cannavigate using the arrow keys, andjump to references indicated by < ....> .A press on Enter then takes you to thisreference. You can leave Help by press-ing the Esc key.

These are the main menu options:

SETUPThe SETUP window opens the follow-ing options:

COLOURS menu colour selection.MOUSE mouse speed setting.EXT PROGRAM path, name and

parameters of an external pro-gram that may be launched fromthis menu.

COM selection of COM port to beused with PLC87 board.

PRINTER printer selectionSAVE SETUP save selections made in

this submenu, and the pathsdefined in the OPTIONS menu.

OPTIONSIf you open the OPTIONS window, amenu list appears with the followingentries:

DIR shows the contents of the currentdirectory.

PATH defines the path followed tostore command -

,,te

0.01.4

2

sequence pro-grams with theextension .S87.

DOS SHELL exit to DOS level (typeexit to return to PLC87).

EXT PROG launch an external pro-gram as defined in the SETUPmenu.

QUIT Leave PLC87, same as ALT -X.

ONLINEOnce the link to the PLC87 board is upand running, and you select theONLINE window, a options listappears on the screen. Of theseoptions, STATVAR and READ PDSopen sub -menus.

START execute command sequence inPLC87 board.

STOP stop execution of commandsequence in PLC87 board.

ERASE erase command sequence inPLC87 board.

STATVAR interrogate/control vari-ables.

SYS-INFO call up status of PLC87board.

READ PDS read out Polling DataMemory.

CONFIG configure PLC87 board.

ONLINE submenu: STATVARHere you can observe the status of vari-ables in the PLC87 board on-line. Tomake use of this powerful option, sim-ply type in the desired variable in thewindow (for example, MB1 or T5). Thereadout is launched by pressing F2.Three columns appear showing the

value of the variable indecimal, hexadecimaland binary notation.Using the F3 key (con-

rFigire3. Completedprototype and a com-mand sequence onpaper.

71 rOckwOrts wenn

Z1 wird crelOscht wennE0.2 1

Z1 wird mit den Wert 25 geladen

wenn E0.3 - 1

Wenn Z1 , 0 dann A0.0 - '1'

zzar.,2,7 20

Elektor Electronics 10/98 31

PLC87 off, remove the EEPROM fromits socket, start the PLC87 without theEEPROM, and only then insert thememory chip again.

P C S O F T W A R E P L C 8 7The DOS program PLC87 on the disksupplied for this project will also rununder Windows 95. It creates, archives,modifies and debugs commandsequences for the PLC87 board. Insertthe disk (order code 986026-1) intoyour floppy disk drive and at the DOSprompt type install. The program willautomatically install itself into the sub-directory c:\plc87, and can be launchedfrom there by typing PLC87. Formouse support under DOS you startthe program by typing PLC87 +M. Nomouse support is available under Win-dows 95 because of possible conflicts.A list of options appears, and individ-ual options may be selected in theusual way by means of the arrow keys(and Enter) or the underlined letter.

To begin with, you select the serialinterface used to talk to the PLC87board, the printer, and the colours you

want to use. Save these settings.By pressing F1 you will be able to

obtain online Help for most menuoptions. In the Help windows, you cannavigate using the arrow keys, andjump to references indicated by <....>.A press on Enter then takes you to thisreference. You can leave Help by press-ing the Esc key.

These are the main menu options:

SETUPThe SETUP window opens the follow-ing options:

COLOURS menu colour selection.MOUSE mouse speed setting.EXT PROGRAM path, name and

parameters of an external pro-gram that may be launched fromthis menu.

COM selection of COM port to beused with PLC87 board.

PRINTER printer selectionSAVE SETUP save selections made in

this submenu, and the pathsdefined in the OPTIONS menu.

OPTIONSIf you open the OPTIONS window, amenu list appears with the followingentries:

DIR shows the contents of the currentdirectory.

PATH defines the path followed tostore command-sequence pro-grams with theextension .S87.

DOS SHELL exit to DOS level (typeexit to return to PLC87).

EXT PROG launch an external pro-gram as defined in the SETUPmenu.

QUIT Leave PLC87, same as ALT-X.

ONLINEOnce the link to the PLC87 board is upand running, and you select theONLINE window, a options listappears on the screen. Of theseoptions, STATVAR and READ PDSopen sub-menus.

START execute command sequence inPLC87 board.

STOP stop execution of commandsequence in PLC87 board.

ERASE erase command sequence inPLC87 board.

STATVAR interrogate/control vari-ables.

SYS-INFO call up status of PLC87board.

READ PDS read out Polling DataMemory.

CONFIG configure PLC87 board.

ONLINE submenu: STATVARHere you can observe the status of vari-ables in the PLC87 board on-line. Tomake use of this powerful option, sim-ply type in the desired variable in thewindow (for example, MB1 or T5). Thereadout is launched by pressing F2.Three columns appear showing the

value of the variable indecimal, hexadecimaland binary notation.Using the F3 key (con-

31Elektor Electronics 10/98

COMPONENTS LIST

Resistors:R1 = SIL array 8x10 kΩR2,R7 = 1 kΩR3 = 10 kΩR4,R5 = 2kΩ2R6 = 1kΩ5

Capacitors:C1 = 10nF ceramicC2-C6,C10 = 10µF 63V radialC7,C8 = 27pFC9,C11,C12 = 100nF ceramicC13 = 4µF7 63V radialC14 = 470µF 25V

Semiconductors:D1 = high efficiency LEDD2 = 1N4002D3 = 1N4148IC1 = 87C51 (digital version, order

code 986513-1) or 87C550 (ana-logue version, order code 986514-1)

IC2 = MAX232CP (Maxim)IC3 = X24C16 (Xicor) or PCF85116-3

(Phillips) or M24C16-BN6 (SGS)IC4 = 7805

Miscellaneous:X1 = crystal 11.0592 MHzK1,K3,K4,K5 = 16-way boxheaderK2 = 10-way boxheaderK6 = 9-way sub-D socket (female),

PCB mount, angled pinsLCD module, 2 x 16 charactersS1-S8 = presskey D6-C-90 (ITC) with

cap BTN-ED6-90 (Conrad Electron-ics o/n 700622)

IC socketsSolder pinsPCB, order code 980066-1 (see

Readers Services page)Disk, order code 986026-1 (see

Readers Services page).

Figure 3. Completedprototype and a com-mand sequence onpaper.

Page 16: 418/433-MHz field- strength meter

33Elektor Electronics 10/98

trol) you can modify variables, bytesand words on-line. Before you can doso, you have to select the variable usingthe arrow keys. Note, however, thatonly flags and output bytes/words maybe controlled in this way. Variables thatmay be controlled have a colouredbackground. Next, you have to pressthe Tab key to select one of the threecolumns, enter a new value, and trans-mit it to the PLC87 board by pressingEnter. Pressing the F4 key causes thevariables displayed in the window tobe cleared.

ONLINE submenu: READ PDSThe PDS (Polling Data Storage) is acyclic memory with a capacity of512 bytes in EEPROM. It is used forlong-term storage of the variable states(values). When the PDS is read, thedata are stored in a CSV (comma-spacedelimiter) file for further processingusing, for example, Excel. Before read-ing in the file, you have to define thenumber of columns of the CSV file.

PROGRAMIf you open the window, a number ofoptions are shown which allow the fol-lowing operations to be carried out:

NEW clear program memory.LOAD FROM FD load command

sequence from disk into memory.SAVE TO FD save command

sequence on disk.LOAD FROM PLC transfer command

sequence from PLC87 board toprogram memory.*

SAVE TO PLC transfer commandsequence from program memoryto PLC87 board.

COMPARE compare program mem-ory and PLC87 board memory.

PRINT print program and cross-refer-ence list.

The options marked with an asterisk(*) only appear when the PLC87 boardis already on-line.

E D I T O RThe Editor is a simple word processorprogram that allows a commandsequence (CS) to be written line byline. The CS program memory on thePLC87 board has a size of 1520 bytes,so that up to 1520 CS lines may bememorised. In general, however, com-mands will be longer than onemnemonic, so that the number of com-mands per CS. If a CS does not fit intothe available memory, the program willreport this during the downloadprocess.

Although the creating of the CS(PLC program) will be discussed innext month’s second and last instal-ment, a few guidelines may already bementioned. A CS line is divided intothree columns. The editor program

supports column-oriented inputting ofdata. The individual columns have thefollowing meanings:

1st column: branch markers (4characters)

2nd column: directives3rd column: comment (max. 40

characters)

The cursor defaults to the second col-umn. To enter a branch (jump) marker,you first move the cursor into the left-hand column using Shift-Tab. The right-hand column (for your comment) canbe reached by pressing the Tab keyonly. Once a line is complete, you fin-ish it with Enter. Input in the left-handand centre columns is in principle inupper case — lower case characters are

only allowed in the comment column.When the Enter key is pressed, the Edi-tor checks the syntax of the CS linesand produces an error report whennecessary. If the PLC87 board is on-line, the status of variables may bechecked by pressing the F2 key.Because the variable states are read outat random instants, they may not rep-resent the actual values.

The main subjects of next month’sinstalment will be the creating of com-mand sequence lists for the PLC87.

(980066-1)

PLC87 board PLC87A board

16 digital inputs 10 digital inputs12 digital outputs 6 analogue/digital inputs

16 timers (0.1-2550s, 4 functions) 16 timers (0.1-2550s, 4 functions)8 counters 8 counters256 flags 256 flags1 flash pulse 1 flash pulse1520 byte mnemonic memory 1520-byte mnemonic memory512 byte polling data memory 512-byte polling data memory

Both Power GND Pin 20Vcc +5V Pin 40

Table 1. Pin functions (independent of configuration):PLC87Outputs A0.0-A0.7 Pin 1-8 (Port 1)Inputs E0.0-E0.7 Pin 39-32 (Port 0)

PLC87AOutputs A0.0-A0.5 Pin 39-34 (Port 0)Inputs E0.6-E0.7 Pin 33-32 (Port 0)Analogue inputs AE0-AE5 Pin 3-8 (Port 1)

E0.0-E0.5 (if AEx > 2.7 V)Reference voltage Avcc/Aref+ Pin 1

Agnd/Aref- Pin 2

Standard configuration:Outputs A1.0-A1.3 Pin 14-17 (Port 3)Inputs E1.0-E1.7 Pin 21-28 (Port 2)

Status configuration: (system Status display via pins)Outputs A1.0-A1.1 Pin 14-15 (Port 3)Inputs E1.0-E1.7 Pin 21-28 (Port 2)Status AWL loaded Pin 16 (Port 3)

‘RUN’ Pin 17 (Port 3)

Display configuration: LC display 2*16 connectedInputs* E1.0-E1.7 Pin 21-28 (Port 2)Display D0-D7 Pin 21-28 (Port 2)

Enable Pin 16 (Port 3)R/W Pin 15 (Port 3)RS Pin 14 (Port 3)

* Inputs 1.0-1.7 are only available as multiplex inputs. They use pin 17 as a common reference andmay only switch it via a potential-free contact. The inputs must be mutually decoupled using a diodeto pin 17.

Page 17: 418/433-MHz field- strength meter

GENERAL INTEREST

There are people whofeel that every moped

and motor scootershould be fitted with

a tachometer (revcounter) as standard.There are others whofind it a dodgy instru-ment since it tends to

distract the rider'sattention from the

road. If you belong tothe first category and

have a scooter ormoped without a revcounter, this article is

for you. It describes astraightforward

design of such aninstrument that can

be fitted to any modelof moped or scooter.

Design by L. Lemmens

tachometerfor mopeds and(motor) scooters

Like many low-priced cars and motor-cycles, mopeds and (motor) scooterstend not to have a rev counter fittedby the manufacturer, presumably ongrounds of economy. However, suchan instrument is relatively inexpensiveand may be very useful, particularlyon vehicles with manual gear change.For instance, the combined readings ofthe speedometer and tachometer givea good indication of whether the rightgear has been selected. A falling read-ing on the rev counter is a sign tochange down, while a rising onepoints to the need of changing up.Many riders who do not have the con-

venience of a rev counter argue thatgear changing is done by ear, but thecompulsory safety helmet does notalways allow this: the sound insulationof some helmets is very good indeed!Best is, of course, to have an automaticgearbox, fortunately chosen by moreand more riders. Second best is tobuild and fit the present tachometer.

The combined readings of speedo-meter and rev counter may also beuseful in improving fuel consumption,but this implies that the power curveof the engine is known.

A34 Elektor Electronics 10/98Elektor Electronics 10/98

Like many low-priced cars and motor-cycles, mopeds and (motor) scooterstend not to have a rev counter fittedby the manufacturer, presumably ongrounds of economy. However, suchan instrument is relatively inexpensiveand may be very useful, particularlyon vehicles with manual gear change.For instance, the combined readings ofthe speedometer and tachometer givea good indication of whether the rightgear has been selected. A falling read-ing on the rev counter is a sign tochange down, while a rising onepoints to the need of changing up.Many riders who do not have the con-

venience of a rev counter argue thatgear changing is done by ear, but thecompulsory safety helmet does notalways allow this: the sound insulationof some helmets is very good indeed!Best is, of course, to have an automaticgearbox, fortunately chosen by moreand more riders. Second best is tobuild and fit the present tachometer.

The combined readings of speedo-meter and rev counter may also beuseful in improving fuel consumption,but this implies that the power curveof the engine is known.

There are people whofeel that every moped

and motor scootershould be fitted with

a tachometer (revcounter) as standard.There are others whofind it a dodgy instru-ment since it tends to

distract the rider’sattention from the

road. If you belong tothe first category and

have a scooter ormoped without a revcounter, this article is

for you. It describes astraightforward

design of such aninstrument that can

be fitted to any modelof moped or scooter.

34

Design by L. Lemmens

tachometerfor mopeds and(motor) scooters

GENERAL INTEREST

Page 18: 418/433-MHz field- strength meter

D E S I G NThere are various waysof constructing atachometer, that is, themanner of its readout.Basically, there are threeways of achieving this:in figures via a seven-segment display,via an analogue scale consisting oflight-emitting diodes (LEDs), or via atraditional moving coil meter withpointer.

The moving-coil type is the sim-plest construction, but is also vulnera-ble to shocks and vibrations. Thismakes it not really suitable for use ona moving vehicle.

A readout via a seven-segment dis-play is highly accurate, but perhapstoo sophisticated for use on a moped.The high accuracy is not needed andwould make the design more complexthan necessary.

An analogue (LED) readout is bothsimple and robust. It can make use ofseveral types of control IC that enablean analogue voltage to be displayedon a bar of LEDs with only a fewexternal components. If the bar con-sists of, say, 20 diodes, the readout issufficiently accurate for most purposes.

The only other itemthat is needed is anelectronic circuit with asensor that providespulses in proportion tothe number of enginerevolutions. These

pulses are converted by the electroniccircuit into an analogue direct voltageto drive the LED bar.

S E N S O RIdeally, the sensor should produce apulse for each engine revolution andthis is most easily achieved with theaid of an inductor (coil) to pick up theignition pulses inductively. Since thevoltage in the ignition pulses is fairlyhigh, it suffices to construct the coilfrom 10–20 turns of insulated circuitwire around the spark-plug cable.

While the voltage level of the igni-tion pulses is fairly high, their shapevaries appreciably. Therefore, the sen-sor is followed by a pulse shaper totransform the ignition pulses into sta-ble, uniform count pulses. This ensuresthat random variations in the widthand amplitude of the ignition pulsesdo not affect the readout.

C I R C U I T D E S C R I P T I O NThe complete circuit diagram of thetachometer is shown in Figure 1. Thepick-up coil (sensor) is linked to capac-itor C3. This capacitor, in conjunctionwith resistors R3 and R4, forms a dif-ferentiating circuit that narrows theignition pulses into usable triggerpulses – an arrangement that preventsdouble triggering of the rev counter.The reshaped pulses are applied to thetrigger input of monostable (multivi-brator) IC3. This circuit outputs pulseswhose width can be preset with P1.

The pulses output by IC3 are inte-grated by a simple low-pass filterformed by R6 and C1. This filter alsoremoves any short-duration variationsof the output which otherwise mightmake the readout unstable.

The LED readout is driven by twodisplay drivers, IC1 and IC2. These cir-cuits are specially designed for thispurpose and contain a reference volt-age source and an accurate decadescaler.

Each of the drivers can control amaximum of ten LEDs, so that thetachometer can use up to 20 diodeswhich gives a sufficiently accuratereadout. Each of the LEDs representsabout 500 engine revolutions. The

35Elektor Electronics 10/98

D5

D6

D3

D4

D2

D10

D1

D8

D9

D7

R1

22

k

D15

D16

D13

D14

D12

D20

D11

D18

D19

D17

R2

2k

2

REFOUT

REFADJ

LM3914

IC1

MODE

SIG

RHI

RLOL10

17

16

15

14

13

12

11

10L9

L8

L7

L6

L5

L4

L3

L118

L2

9

5

8

4

6

7

3

2

1

REFOUT

REFADJ

LM3914

IC2

MODE

SIG

RHI

RLOL10

17

16

15

14

13

12

11

10L9

L8

L7

L6

L5

L4

L3

L118

L2

9

5

8

4

6

7

3

2

1

R7

22

k

JP1

TLC555

IC3DIS

THR

OUTTR

CV

2

7

6

4

R

3

5

8

1

R6

10

0k

C2

10n

C4

100n

C1

10µ16V

R5

22

k

R3

22M

R4

15M

50k

P1

C3

10n

5V

5V

5V

5V

5V

980077 - 11

groen

geel

rood

green

yellow

red

grün

gelb

rot

4805IC4

C5

10µ25V

C6

10µ10V

C7

100n

5V6...7V

6000 rpm

8000 rpm

10000 rpm

Figure 1. The circuit ofthe tachometer con-sists of a pulseshaper, an integratingcircuit, and a readout.The sensor is placedaround the spark plugcable.

1

Setting upThe pulse width of the output of the pulse shaper, and thus the drive voltagefor the readout, can be set within a wide band with P1.

Calibrating the scale may be done in a number of ways: with anothertachometer as reference, with a pulse generator, and also without any specialequipment. This is possible by using the pick-up coil to sense the frequencyof the mains voltage (in a safe manner!). This very stable signal at 50 Hz isexcellent for calibration purposes, since it corresponds to 50¥60=3000 rev/min.So, if the proposed maximum of 10000 rev/min is adopted, P1 should beadjusted at 50 Hz so that D6 (3000 rev/min) lights.

An ideal source for the 50 Hz mains frequency is a demagnetizer for acassette deck. The electric field radiated by this is readily picked up by thetachometer sensor. Never, never connect the input of the rev counter sirectlyto the mains: this may be lethal and, even if you’re lucky to survive, will destroythe tachometer.

Page 19: 418/433-MHz field- strength meter

2

LEDs may be of different colours tocreate, say, a safe (green) range of rev-olutions of 500-6000 rev/min (D1-D12);a caution (yellow) range of 6000-8000rev/min (D13-D16); and a danger (red)range above 8000 rev/min (D17-D20).Different ranges may, of course, bechosen to individual requirements.

Comparators are driven via each ofthe junctions of the scaler in the dis-play drivers in such a way that everytime the input voltage to the displaydriver increases the next comparator isenabled. The comparator outputs arecapable of driving an LED directly.

The LED bar may be operated inthe dot or bar mode. In the dot mode,pin 9 of the IC must be left open, andin the bar mode it should be linked tothe positive supply rail. In the presentapplication the bar mode is used.

Parts list

Resistors:R1, R5, R7 = 22 kf2.R2 = 2.2 kf2.R3= 22 MD.R4= 15 MD.R6 = 100 kflP1 = 47 kf2. (50 kf2.) preset

Capacitors:Ci = 10 [IF, 16 V, radial02, C3 = 0.01 [IF, pitch 5 mmC4 = 0.1 [IF, pitch 5 mm

Semiconductors:D1-D13 = low -current LED, greenD14-D16 = low -current LED, yellowD17-D20 = low -current LED, red

Integrated circuits:IC1,102 = LM3914IC3 = TLC555

Miscellaneous:J101 = 2 -terminal 2.54 mm pin strip

and pin jumper (Maplin)Enclosure: Conrad Type 842230-55

(see text)Sensor: see textPCB Order No. 980077 (see Readers'

services towards the end of thisissue).

Figure 2. Constructionof the tachometer isstraightforward whenthis printed -circuitboard is used. It isavailable through ourReaders' services.

POWER SUPPLYThe tachometer needsa power supply of5-6 V The supply railsshould be stable, which

Figure 3. The com-pleted board in theConrad enclosurementioned in the text.

means that the circuit cannot be con-nected directly to the battery terminalsof the moped or scooter. A stable sup-ply is obtained by the use of a 5 V reg-ulator between the battery and the revcounter as shown in Figure 1. Sincethe voltage at the battery terminals isonly about 6-7 V the regulator must bea low -drop type such as the 4805: astandard 7805 will not do!

It is also possible to power thetachometer indepen-dently by a pack of

436 Elektor Electronics 10/98

means that the circuit cannot be con-nected directly to the battery terminalsof the moped or scooter. A stable sup-ply is obtained by the use of a 5 V reg-ulator between the battery and the revcounter as shown in Figure 1. Sincethe voltage at the battery terminals isonly about 6–7 V, the regulator must bea low-drop type such as the 4805: astandard 7805 will not do!

It is also possible to power thetachometer indepen-dently by a pack of

36 Elektor Electronics 10/98

Parts list

Resistors: R1, R5, R7 = 22 kΩR2 = 2.2 kΩR3 = 22 MΩR4 = 15 MΩR6 = 100 kΩP1 = 47 kΩ (50 kΩ) preset

Capacitors:C1 = 10 µF, 16 V, radialC2, C3 = 0.01 µF, pitch 5 mmC4 = 0.1 µF, pitch 5 mm

Semiconductors:D1–D13 = low-current LED, greenD14–D16 = low-current LED, yellowD17–D20 = low-current LED, red

Integrated circuits:IC1, IC2 = LM3914IC3 = TLC555

Miscellaneous:JP1 = 2-terminal 2.54 mm pin strip

and pin jumper (Maplin)Enclosure: Conrad Type 842230-55

(see text)Sensor: see textPCB Order No. 980077 (see Readers’

services towards the end of thisissue).

(C) ELEKTOR

980077-1

(C) ELEKTOR

980077-1

C1C2

C3

C4

D1

IC1

IC2

IC3

P1

R1

R2

R3

R4R5

R6

R7

T

+0

980077-1

LEDs may be of different colours tocreate, say, a safe (green) range of rev-olutions of 500–6000 rev/min (D1–D12);a caution (yellow) range of 6000–8000rev/min (D13–D16); and a danger (red)range above 8000 rev/min (D17–D20).Different ranges may, of course, bechosen to individual requirements.

Comparators are driven via each ofthe junctions of the scaler in the dis-play drivers in such a way that everytime the input voltage to the displaydriver increases the next comparator isenabled. The comparator outputs arecapable of driving an LED directly.

The LED bar may be operated inthe dot or bar mode. In the dot mode,pin 9 of the IC must be left open, andin the bar mode it should be linked tothe positive supply rail. In the presentapplication the bar mode is used.

Figure 2. Constructionof the tachometer isstraightforward whenthis printed-circuitboard is used. It isavailable through ourReaders’ services.

2

3

P O W E R S U P P L YThe tachometer needsa power supply of5–6 V. The supply railsshould be stable, which

Figure 3. The com-pleted board in theConrad enclosurementioned in the text.

Page 20: 418/433-MHz field- strength meter

four series -connected chargeable or dry1.5 V batteries (AA= HP7= LR6 orC= HP11= LR14). A regulator is then,of course, not needed. The life of suchbatteries is lengthened by using thedisplay drivers in the dot mode (inwhich pin 9 of the devices is left open).

CONSTRUCTIONThe electronics is best built on theprinted -circuit board shown in Fig-

ure 2. It is generally agreed that a cir-cular readout is to be preferred andthis is why the 20 LEDs have beenarranged in a circle on the board. Inview of the sparsity of components,populating the board is simplicity itselfif the circuit diagram and the parts listare followed carefully.

Pin strip and jumper JP1 enablesthe circuit to be checked on comple-tion of the construction. During such

Figure 4. This photoclearly shows how thepick-up coil is wound(25 turns) auround theignition cable.

a check, the jumper should beremoved.

When pulses are applied to capac-itor C3, it should be possible to varythe low direct voltage at the terminalofJP1 linked to junction R6 -C1 with P1.If this is so, the pulse shaper operatescorrectly.

When a variable direct voltage at alevel of a few volts is applied to theother terminal of JP1, one of the dis-play diodes should light.

Forming the pick-up coil aroundthe spark plug cable (10-20 turns ofthin insulated circuit wire) should notpresent undue difficulties. The coilshould be linked to the input pin ofthe tachometer via insulated strandedcircuit wire.

In some areas it may be possible toobtain a round enclosure to house therev counter. A suitable one is producedby Conrad (Germany) and may beavailable from our regular advertiserStippler Elektronik via another regularadvertiser, View com Electronics. Themodel number of the enclosure isgiven in the parts list.

[980077]

Elektor Electronics 10/98 37

four series-connected chargeable or dry1.5 V batteries (AA=HP7=LR6 orC=HP11=LR14). A regulator is then,of course, not needed. The life of suchbatteries is lengthened by using thedisplay drivers in the dot mode (inwhich pin 9 of the devices is left open).

C O N S T R U C T I O NThe electronics is best built on theprinted-circuit board shown in Fig-

ure 2. It is generally agreed that a cir-cular readout is to be preferred andthis is why the 20 LEDs have beenarranged in a circle on the board. Inview of the sparsity of components,populating the board is simplicity itselfif the circuit diagram and the parts listare followed carefully.

Pin strip and jumper JP1 enablesthe circuit to be checked on comple-tion of the construction. During such

a check, the jumper should beremoved.

When pulses are applied to capac-itor C3, it should be possible to varythe low direct voltage at the terminalof JP1 linked to junction R6-C1 with P1.If this is so, the pulse shaper operatescorrectly.

When a variable direct voltage at alevel of a few volts is applied to theother terminal of JP1, one of the dis-play diodes should light.

Forming the pick-up coil aroundthe spark plug cable (10–20 turns ofthin insulated circuit wire) should notpresent undue difficulties. The coilshould be linked to the input pin ofthe tachometer via insulated strandedcircuit wire.

In some areas it may be possible toobtain a round enclosure to house therev counter. A suitable one is producedby Conrad (Germany) and may beavailable from our regular advertiserStippler Elektronik via another regularadvertiser, Viewcom Electronics. Themodel number of the enclosure isgiven in the parts list.

[980077]

37Elektor Electronics 10/98

Figure 4. This photoclearly shows how thepick-up coil is wound(25 turns) auround theignition cable.

4

Page 21: 418/433-MHz field- strength meter

GENERAL INTEREST

Faultfinding, or trou-ble shooting, is an art

to some and a sci-ence to others. Somepeople never get the

knack of finding afault or short -comingreadily, whereas oth-

ers seem to havedivine guidance when

it comes to locatingone. For those whofind faultfinding analmost impossible

and tedious task, thisarticle gives a num-ber of hints to make

the process a littleeasier. It is also

describes a randomlychosen actual case.

By our technical staff

faultfinding

art or science?

No matter how much care is taken inthe construction of an electronic cir-cuit, there is always the possibility thatit will not work in the first instance. Ifthat happens, stay calm. This is impor-tant. There are constructors who can-not accept that they may have madean error or that something unforeseenhas happened. They are unnerved bysuch a situation and start doing allsorts of thing without considering thematter calmly. This is wrong.

Take your time to check the com-pleted printed -circuit board (PCB) or

surface -mount assembly (SMA) sys-tematically and thoroughly on thebasis of the circuit diagram, the com-ponent layout drawing and the com-ponents/parts list.

Are all components and parts fittedin the right place? Errors often happenin the case of small resistors and capac-itors. Are all integrated circuits, elec-trolytic capacitors and diodes fittedwith correct orientation? Have the pos-itive and negative supply lines beeninterchanged? Is there evidence of anydry joints? Is there a short-circuit

A40 Elektor Electronics 10/98Elektor Electronics 10/98

No matter how much care is taken inthe construction of an electronic cir-cuit, there is always the possibility thatit will not work in the first instance. Ifthat happens, stay calm. This is impor-tant. There are constructors who can-not accept that they may have madean error or that something unforeseenhas happened. They are unnerved bysuch a situation and start doing allsorts of thing without considering thematter calmly. This is wrong.

Take your time to check the com-pleted printed-circuit board (PCB) or

surface-mount assembly (SMA) sys-tematically and thoroughly on thebasis of the circuit diagram, the com-ponent layout drawing and the com-ponents/parts list.

Are all components and parts fittedin the right place? Errors often happenin the case of small resistors and capac-itors. Are all integrated circuits, elec-trolytic capacitors and diodes fittedwith correct orientation? Have the pos-itive and negative supply lines beeninterchanged? Is there evidence of anydry joints? Is there a short-circuit

Faultfinding, or trou-ble shooting, is an art

to some and a sci-ence to others. Somepeople never get the

knack of finding afault or short-comingreadily, whereas oth-

ers seem to havedivine guidance when

it comes to locatingone. For those whofind faultfinding analmost impossible

and tedious task, thisarticle gives a num-ber of hints to make

the process a littleeasier. It is also

describes a randomlychosen actual case.

40

By our technical staff

faultfinding

art or science?

GENERAL INTEREST

Page 22: 418/433-MHz field- strength meter

caused by a tiny beadof solder between thetracks of the board?Have all wire bridges been soldered inplace? This is often a cause of mal-functining of newly built equipment.

Admittedly, all these questions mayseem irrelevant and the answers obvi-ous, but it is a proven fact that aboutthree quarters of all faults are causedby small errors in construction. Theother quarter is normally caused by acomponent that has given up theghost during soldering. It is very rarefor the fault to lie with the design ofthe circuit or its adjustment.

When the construction has beenchecked carefully and the circuit still

malfunctions, a morethorough investigationis necessary. To start

with, all voltages, particularly thoseindicated on the circuit or wiring dia-gram, should be checked with a goodmultimeter. It is normally advisable tostart at the output of the circuit.

It is virtually impossible to givegeneral rules for measuring the vari-ous voltages and currents in a circuit.There is too great a variety of designsand layouts. It is undoubtedly muchmore instructive to describe a possibleprocedure on the basis of a practicalmalfunctioning equipment, in this casea power supply.

P R O C E D U R EThe ‘variable power supply’, publishedin the March 1998 issue of Elektor Elec-tronics, was built by one of our ownemployees, who could not get it towork and called in the help of ourCentral Design Department.

The trouble was that the unit pro-vided an output voltage, but that thiscould not be regulated. The unit hadbeen inspected thoroughly but noth-ing untoward had been found.

Initial inspection The completed board was removedfrom the unit and given a thoroughgoing-over on the workbench in com-parison with the circuit diagram (Fig-ure 1).

It appeared that a few small mis-takes had been made by the construc-tor. The first of these concerned IC3,which was a 12 V type instead of a 9 Vtype. This is not entirely correct, but itcannot be the cause of the malfunc-tion. Also, R1 was found to have avalue of 100 ½ instead of 1 k½. This isan instance of careless work, but,again, cannot result in a non-variableoutput.

All this did not bring us closer tothe root of the trouble, and it wastherefore time to apply voltage to theboard. This was done carefully using avariable power supply connectedacross C7-C8. The output of the supplywas increased slowly while the amme-ter was watched intently. Nothinguntoward happened, however. At asupply output of 25 V the output ofthe board was measured and provedto be 25 V. So far, so good. However,turning P1 made no difference to theoutput which remained stable.

Measurements Since in the previous inspection tran-sistors T1 and T2 passed the voltagefrom input to output, but nothing else,the question arose whether these FETswere connected properly or whetherthey were perhaps faulty. Their termi-nals were therefore checked with adigital multimeter. The drain andsource voltages were low and aboutequal, which seemed to be all rightsince the output voltage was maxi-mum. Also, the potential differencebetween gate and source was 5–6 V,indicating that the FETs were con-ducting (a lower difference wouldhave been sufficient). So, how was itpossible that the FETs were driven intofull conduction by the control circuit,although they should be cut off withP1 set to minimum.

Backwards To find the cause of the high controlvoltage, the gate potential of T1-T2 wastraced from back to front.

The potential at the cathode of

41Elektor Electronics 10/98

24V 1A25

TR1

B1

B80C2200

D6

1N

D5

1N4001

D1

BAT85

D3

BAT85

D7

5V6

T1

BUK455

R10

220Ω

R12

5W

T2

R11

220Ω

R13

5W

R14

4k7

R9

4k7

R20

22

k

R18

22

k

R19

2k

7

R8

4k7

R7

15

k

P2

1k TLC271

IC22

3

6

7

48

1

5

D4

R16

3k

3

D2

R17

3k

3

R5

3k

9

R15

3k

3

1W

C1

100n

C2

100µ40V

R3

27

4k

R4

46

k4

R2

46k4

R1

1k

P1

1k

TLC271

IC1

2

3

6

7

48

1

5 R22

10

0k

1%

R24

10

0k

1%

R21

1k

02

1%

R23

1k

02

1%

1%

4001

C3

C4

C5

C6

C7

2x 1000µ63V

C11

10µ63V

C8 C9

100µ16V

C10

100n

7809

IC3

K1

+9V

0

160mA T

C3 ... C6 = 4x 100n

+U

+U

9V

9V

+V

–V

9V

2x

1%

1%

R6

274k

1%

+I

–I

A

B

C

D

E

F G

H

I

J

K

K

A 8V86

B

C

D

E

F

G

H

I

J

K

L

M

4V4

4V17

4V24

1V

4V25

4V69

0V5

0V48

2V3

0V48

0V47

V

I

980024 - 21

L

K

M

N

1V9

N

*

* *

*

1V1(0V56)zie tekst*see text*siehe Text*voir texte*

(8k2)

V

A

Figure 1. The circuitdiagram of the ‘vari-able power supply’published in ourMarch 1998 issue.

1

Page 23: 418/433-MHz field- strength meter

zener diode D7 was measured andfound to be almost exactly the zenervoltage, which is, of course, correct.This potential is derived from the 9 Vauxiliary supply via R5 and the designof the unit is such that it can be low-ered via D3 by reducing the currentwith P2 or via D1 by reducing the volt-age with P1.

Since the voltage setting was clearlythe culprit, this branch was traced backfurther by measuring the potential atthe cathode of D1 (test point E). Thispotential was found to be much toohigh: about 8 V This indicated thatsomething was not quite right with the

circuit around operational amplifierIC1. This device was overdriven, defector it had no connection to earth.Again, a number of possible causes.

Locating the faultOnce it was known that the error wassomewhere around IC1, it could belocated more accurately. For this pur-pose, the voltages at all pins, not thesocket, of the op amp were measured(carefully). This ensured that a faultysocket or a broken track would notcloud the issue. The measured valueswere written down so that they couldbe evaluated. Pin 7: 8.9 V; pins 4 and 8:0 V; pin 3: 5.2 V; pin 2: 3.6 V

Pin 7 is linked to the auxiliary pos-itive supply line, so 9 V is correct. Pins4 and 8 are linked to the negative aux-iliary supply line, so 0 V is also correct.If this potential were different, itwould indicate something not quiteright with the earth connection of theop amp, whereupon this might act ina totally unpredictable manner.

The voltages at pins 2 and 3 werequite different, which, since these arethe inverting and non -inverting inputsof the op amp, could not be right. (Bydefinition, these voltages should beequal or very nearly so). Thisexplained why the output of the opamp was high: the non -invertinginput potential was higher than that atthe inverting input, so that the outputvoltage was nearly equal to the supplyvoltage.

The net closesIt was clear that the cause of the mal-function lay in the inequality of theinput voltages of ICi.

The requisite voltage at pin 2 wascalculated readily since it is deter-mined by potential divider R3 -R4 andthe supply voltage. Since the supplywas still 25 V the potential at test pointD had to be 46.41(46.4+ 274)x25=3.62 v. This was virtually identical tothe measured voltage, which is correct.

So, the voltage at pin 3 remained asthe only possible culprit. It will be seenfrom the circuit diagram that this volt-age arrives from the wiper of P1. And,indeed, when this potentiometer wasturned, the voltage at pin 3 varied, butremained higher at all times than thatat pin 2. It was not surprising, there-fore, that the circuit did not functioncorrectly.

That's it!The potential at test point G was thesame high output voltage that was notaffected by adjusting the potentiome-ter. However, the potential at test pointC, that is, the wiper of P1, variedbetween 4 V and 5 V, although itshould have been 0 V with the wiperfully anticlockwise. This indicated afaulty potentiometer and, indeed,when it was replaced by a new one,the regulation of the unit worked fine.

Another problemFor completeness' sake, the action ofthe current limiting circuit was alsotested. For this purpose, a 10 52, 10 Wresistor was connected across the out-put terminals and the output voltageset to few volts with P1. Subsequently,the current limit was slowly turned toa lower level with P2. At a given level,D4 lighted and the output voltagedropped back. All perfectly in order.

However, just when the tests wereabout to be terminated, it smelled as ifsomething somewhere in the unit was

A42 Elektor Electronics 10/98

zener diode D7 was measured andfound to be almost exactly the zenervoltage, which is, of course, correct.This potential is derived from the 9 Vauxiliary supply via R5 and the designof the unit is such that it can be low-ered via D3 by reducing the currentwith P2 or via D1 by reducing the volt-age with P1.

Since the voltage setting was clearlythe culprit, this branch was traced backfurther by measuring the potential atthe cathode of D1 (test point E). Thispotential was found to be much toohigh: about 8 V. This indicated thatsomething was not quite right with the

circuit around operational amplifierIC1. This device was overdriven, defector it had no connection to earth.Again, a number of possible causes.

Locating the faultOnce it was known that the error wassomewhere around IC1, it could belocated more accurately. For this pur-pose, the voltages at all pins, not thesocket, of the op amp were measured(carefully). This ensured that a faultysocket or a broken track would notcloud the issue. The measured valueswere written down so that they couldbe evaluated. Pin 7: 8.9 V; pins 4 and 8:0 V; pin 3: 5.2 V; pin 2: 3.6 V.

Pin 7 is linked to the auxiliary pos-itive supply line, so 9 V is correct. Pins4 and 8 are linked to the negative aux-iliary supply line, so 0 V is also correct.If this potential were different, itwould indicate something not quiteright with the earth connection of theop amp, whereupon this might act ina totally unpredictable manner.

The voltages at pins 2 and 3 werequite different, which, since these arethe inverting and non-inverting inputsof the op amp, could not be right. (Bydefinition, these voltages should beequal or very nearly so). Thisexplained why the output of the opamp was high: the non-invertinginput potential was higher than that atthe inverting input, so that the outputvoltage was nearly equal to the supplyvoltage.

The net closes It was clear that the cause of the mal-function lay in the inequality of theinput voltages of IC1.

The requisite voltage at pin 2 wascalculated readily since it is deter-mined by potential divider R3-R4 andthe supply voltage. Since the supplywas still 25 V, the potential at test pointD had to be 46.4/(46.4+274)´25=3.62 v. This was virtually identical tothe measured voltage, which is correct.

So, the voltage at pin 3 remained asthe only possible culprit. It will be seenfrom the circuit diagram that this volt-age arrives from the wiper of P1. And,indeed, when this potentiometer wasturned, the voltage at pin 3 varied, butremained higher at all times than thatat pin 2. It was not surprising, there-fore, that the circuit did not functioncorrectly.

That’s it! The potential at test point G was thesame high output voltage that was notaffected by adjusting the potentiome-ter. However, the potential at test pointC, that is, the wiper of P1, variedbetween 4 V and 5 V, although itshould have been 0 V with the wiperfully anticlockwise. This indicated afaulty potentiometer and, indeed,when it was replaced by a new one,the regulation of the unit worked fine.

Another problemFor completeness’ sake, the action ofthe current limiting circuit was alsotested. For this purpose, a 10 ½, 10 Wresistor was connected across the out-put terminals and the output voltageset to few volts with P1. Subsequently,the current limit was slowly turned toa lower level with P2. At a given level,D4 lighted and the output voltagedropped back. All perfectly in order.

However, just when the tests wereabout to be terminated, it smelled as ifsomething somewhere in the unit was

42 Elektor Electronics 10/98

Page 24: 418/433-MHz field- strength meter

getting too hot and it was found to bethe FETs, although these weremounted on a correct heat sink. It wasfound that this heat sink was cool andthe FETs hot. On close inspection it

was discovered that the FETs were notin close contact with the heat sink.Were the screws tightened sufficiently?Yes; in fact, they could not easily beundone. Once the FETs were removed

from the heat sink, it was found thatowing to careless drilling and debur-ring, the FETs could not be fastenedclose to the heat sink. Once the holeswere deburred, and the FETs rein-stalled (with heat conducting paste), allwas found to be in proper order.

FinallyThe foregoing shows that the numberof possible causes of a malfunction isgreat. Our engineer had never founda defect potentiometer in this type ofequipment. The malfunctioning of theheat sink was also a rare occurrence.

It also shows that what was said atthe beginning of this article is invari-ably true: that a completed board mayat first sight look in perfect order, buton close inspection prove to have beenfinished, in some instances, in a care-less manner. Also, in the case consid-ered, there were two components withincorrect rating. There was nothingwrong with the circuit diagram norwith the component layout.

[980089]

Elektor Electronics 10/98 43

getting too hot and it was found to bethe FETs, although these weremounted on a correct heat sink. It wasfound that this heat sink was cool andthe FETs hot. On close inspection it

was discovered that the FETs were notin close contact with the heat sink.Were the screws tightened sufficiently?Yes; in fact, they could not easily beundone. Once the FETs were removed

from the heat sink, it was found thatowing to careless drilling and debur-ring, the FETs could not be fastenedclose to the heat sink. Once the holeswere deburred, and the FETs rein-stalled (with heat conducting paste), allwas found to be in proper order.

Finally The foregoing shows that the numberof possible causes of a malfunction isgreat. Our engineer had never founda defect potentiometer in this type ofequipment. The malfunctioning of theheat sink was also a rare occurrence.

It also shows that what was said atthe beginning of this article is invari-ably true: that a completed board mayat first sight look in perfect order, buton close inspection prove to have beenfinished, in some instances, in a care-less manner. Also, in the case consid-ered, there were two components withincorrect rating. There was nothingwrong with the circuit diagram norwith the component layout.

[980089]

43Elektor Electronics 10/98

Page 25: 418/433-MHz field- strength meter

clipping indicator

A little while ago areader wrote to say

that he had foundoverdrive on some of

his compact discs.This sort of news

comes of course likea thunderbolt since itis assumed by mostpeople that compact

discs are examples ofthe quality of today's

digital technology.The first reaction to

such an allegation isone of outright disbe-lief or at least scepti-

cism. Moreover, it hasbeen alleged by other

readers that severalproducers have

admitted (sic!) tooverdriving, that isclipping, of CDs at

the request of the rel-evant artists. Be thatas it may, it was rea-

son enough to designan indicator to bring

overdrive to light andhelp the consumer in

his/her quest not tobuy flawed CDs*.

*It should be noted that overdrive ona CD is not a legal reason for askingyour money back.

Designed by T. Giesberts

A46

for compact disc

Most people will not believe that thereare CDs that are overdriven by theproducer: they generally assume thatmanufacturers know what they aredoing and supply discs that are tech-nically correct within the confines ofmodern digital technology. If the expe-riences of some of our readers areaccepted, this may not always be true.

One reader wrote to say that hehad noticed that some CDs in his col-lection sounded 'less than perfect' andothers even 'downright poor'. Since hethought that his ears were playing himtricks, he decided to check the level

with a VU (visual unit). To his surprisehe found that the level varied around0 dB. A surprise, indeed, for the levelon a CD should reach 0 dB only dur-ing very brief peaks in the signal. Theaverage signal strength should be notless than 6 dB and preferably 10-12 dBbelow 0 dB.

In view of these findings, ourreader decided to take his investigationa little further and connected an oscil-loscope to the output of his CD player.This showed that on certain CDs thesignal was clipped; on one or two, theclipping led to 'audible distortion'. Fig-

Elektor Electronics 10/98Elektor Electronics 10/98

Most people will not believe that thereare CDs that are overdriven by theproducer: they generally assume thatmanufacturers know what they aredoing and supply discs that are tech-nically correct within the confines ofmodern digital technology. If the expe-riences of some of our readers areaccepted, this may not always be true.

One reader wrote to say that hehad noticed that some CDs in his col-lection sounded ‘less than perfect’ andothers even ‘downright poor’. Since hethought that his ears were playing himtricks, he decided to check the level

with a VU (visual unit). To his surprisehe found that the level varied around0 dB. A surprise, indeed, for the levelon a CD should reach 0 dB only dur-ing very brief peaks in the signal. Theaverage signal strength should be notless than 6 dB and preferably 10–12 dBbelow 0 dB.

In view of these findings, ourreader decided to take his investigationa little further and connected an oscil-loscope to the output of his CD player.This showed that on certain CDs thesignal was clipped; on one or two, theclipping led to ‘audible distortion’. Fig-

A little while ago areader wrote to say

that he had foundoverdrive on some of

his compact discs.This sort of news

comes of course likea thunderbolt since itis assumed by mostpeople that compact

discs are examples ofthe quality of today’s

digital technology.The first reaction to

such an allegation isone of outright disbe-lief or at least scepti-

cism. Moreover, it hasbeen alleged by other

readers that severalproducers have

admitted (sic!) tooverdriving, that isclipping, of CDs at

the request of the rel-evant artists. Be thatas it may, it was rea-

son enough to designan indicator to bring

overdrive to light andhelp the consumer in

his/her quest not tobuy flawed CDs*.

*It should be noted that overdrive ona CD is not a legal reason for askingyour money back.

46

Designed by T. Giesberts

clipping indicator

for compact disc

AUDIO & HI-FI

Page 26: 418/433-MHz field- strength meter

ure 1 shows a few examples (not nec-essarily the worst!).

Apart from leading to distortion,clipping also results in another phe-nomenon. Since the average signalstrength is too high, the dynamicrange of the music is reduced, so thatthe reproduced sound is much too flat,which can easily lead to 'listeningfatigue'.

COINCIDENCE?Could these findings be coincidence?It is hard to say, but evidence fromother readers and our own measure-ments seem to indicate that there areCDs on which the signal has been pur-posely overdriven. [The allegation byanother reader that two producersadmitted to him that they sometimesused overdrive on CDs at the requestof the relevant artists seems far-fetched-because it would be contrary to their

Tek Rani 2S. OkSis11-

$4 Acqs

CO@ VAi.= -XIX) let

...1 00 V

Tek Run! 23.01 Sample T

commercial acu-men - but notimpossible. Also,the reasongiven by theseproducers that they 'dared not goagainst the wishes of these artists'seems highly suspect. No artist is big-ger than a bona fide recording studio.Editor].

142 (Mints :I11 i 3 VD V 1 Jan tikM#22A0!03

Figure 1. Two clear cases of over -rive allegedly measured on mod -n compact discs (Sony Music9748 393227/1996 and 0997488421/1997).

doh

DETECTIONWhat can the consumer do to avoidbuying a flawed disc? After all, a CDcannot be repaired or enhanced. Over-drive used in the recording studio can-not even be eradicated during manu-facture of the disc.

The only thing a consumer can dois not to buy the suspect CD. But howis he/she to detect that a certain CDsuffers from overdrive? Listening to it

6: 6.00 V-3.ao

1Ja15I40622:47:44

at the retailer'spremises nor-mally does notindicate any-thing awry, but

once it is played on a good -qualityinstallation at home a deficiency maycome to light.

The solution appears to be a smallportable indicator that can be taken tothe retailer, assuming that it is possibleto connect it to the retailer's playbackequipment.

What should the indicator react to?It is clear that on a good -quality CDthe 0 dB level will be reached onlyduring short high -signal peaks. If the0 dB level is sustained for more thana fraction of a second, there may bereason to be suspicious. Consequently,the indicator is designed so that anLED lights when two or more samples

Elektor Electronics 10/98 47

ure 1 shows a few examples (not nec-essarily the worst!).

Apart from leading to distortion,clipping also results in another phe-nomenon. Since the average signalstrength is too high, the dynamicrange of the music is reduced, so thatthe reproduced sound is much too flat,which can easily lead to ‘listeningfatigue’.

C O I N C I D E N C E ?Could these findings be coincidence?It is hard to say, but evidence fromother readers and our own measure-ments seem to indicate that there areCDs on which the signal has been pur-posely overdriven. [The allegation byanother reader that two producersadmitted to him that they sometimesused overdrive on CDs at the requestof the relevant artists seems far-fetched– because it would be contrary to their

commercial acu-men – but notimpossible. Also,the reasongiven by theseproducers that they ‘dared not goagainst the wishes of these artists’seems highly suspect. No artist is big-ger than a bona fide recording studio.Editor].

D E T E C T I O NWhat can the consumer do to avoidbuying a flawed disc? After all, a CDcannot be repaired or enhanced. Over-drive used in the recording studio can-not even be eradicated during manu-facture of the disc.

The only thing a consumer can dois not to buy the suspect CD. But howis he/she to detect that a certain CDsuffers from overdrive? Listening to it

at the retailer ’spremises nor-mally does notindicate any-thing awry, but

once it is played on a good-qualityinstallation at home a deficiency maycome to light.

The solution appears to be a smallportable indicator that can be taken tothe retailer, assuming that it is possibleto connect it to the retailer’s playbackequipment.

What should the indicator react to?It is clear that on a good-quality CDthe 0 dB level will be reached onlyduring short high-signal peaks. If the0 dB level is sustained for more thana fraction of a second, there may bereason to be suspicious. Consequently,the indicator is designed so that anLED lights when two or more samples

47Elektor Electronics 10/98

Figure 1. Two clear cases of over-drive allegedly measured on mod-ern compact discs (Sony Music099748 393227/1996 and 099748698421/1997).

1

Page 27: 418/433-MHz field- strength meter

of the signal reachthe peak value. Theprobability thatsome clipping then occurs is great.When the LED lights only once ortwice per track, it must be assumedthat this is caused by a couple ofstrong signals. If it lights more often,or it remains on for longer than a sec-ond, there is something not quite right.

To make a possible error indicationas clear as possible, two LEDs areused: the green one lights as long as allis well, and the red one when there issomething amiss. For those who havenot the patience to keep an eye on theLEDs during the entire time the CD isplayed, there is an optional facility forconnecting a counter module. Thisshows how many times during theplayback clipping may have occurr e d .

In the design of the indicator it wasassumed that the studio recording wast r a n s f e rred 1:1 to the manufacturedcompact disc.

C I R C U I T D E S C R I P T I O NThe circuit diagram of the indicator isshown in Fi g u re 2. Audio socket K1 i sfor linking the indicator to the digitaloutput of the CD player.

The relevant data are retrievedfrom the S/PDIF† signal with the aid of

I C1, an integrated interface receiverType CS8412 (see Data Sheets else-where in this issue). This circuit canhandle virtually all current samplingfrequencies. The serial audio data(S DATA) are read with the aid of a bit-clock and a word-clock (S C K and F S Y N C

respectively). The output of the IC isset to a special format (normal modeF M T 4: M0= M1=0; M2=1 M3=0) inwhich a clock pulse follows each audiosample, irrespective of left or right.

The audio data are coded in 2scomplement. To check whether a peakvalue has been reached, the MSB(most significant bit) must be inspectedand compared with the remaining bits.In the case of digital minimum andmaximum values, all remaining bitsmust be the opposite of the MSB. Theminimum and maximum values arec h e c ked with an XOR function.

Gates & bistablesThe comparing and indexing of thebits is carried out by a number of gatesand D-bistables. The timing diagramof the most important signals is shownin Fi g u re 3.

At the start of a new sample, a clock

signal is generatedexclusively for theMSB in D-b i s t a b l e

I C3 a- I C3 b. The F S Y N C signal is clocke dinto IC3 a by the inverted bit-clock( I C2 d). The output of IC3 a (signal A)f o rms the clock for the MSB.

The clock input of IC3 b goes high inthe middle of the MSB, after which thebit is held for the duration of the audiosample (pin 9 of IC3 b) .

To ensure that the MSB is appliedto comparator IC2 c s i m u l t a n e o u s l ywith the next bit, it is clocked again inD-bistable IC4 b.

The remaining bits are clocked byI C4 a. Since signal A is applied to theS-input of this bistable, the invertedoutput remains low until the first ofthe remaining bits is clocked (signal C).

Use of the inverted output ensuresthat all bits there have the same levelas the MSB if and when a minimum ormaximum value is reached. If the levelis not the same, IC2 goes high at a cer-tain moment, which causes IC5 b to bec l o c ked. This means that the output ofI C5 b is high when there is neither aminimum nor a maximum value.

So as to enable the actual state ofeach sample to be determined, mostbistables, including IC5 b, are reset bysignal A. Before this happens, the sta-

Figure 2. The circuit of the indicator consists of an integrateddigital audio interface receiver and a number of gates and bista-bles forming the signalling section.

C1

10n

C2

10n

C3

47n

C5

47n

C7

47n

C8

100n

C9

100n

C4

10µ 25V

C6

10µ 63V

C13

4µ763V

C14

220µ25V

R1

R2

1k

K1

L1

47µH

R3

S/PDIF

12

1311

IC2d

=1

IC3b11 C

10

S12D

13

R

9

8

IC4b

11 C

10

S12D

13

R

9

8

IC5b11 C

10

S12D

13

R

9

8

IC4a3 C

4

S2D

1

R

5

6

4

56

IC2b

=1

10

98

IC2c

=1

IC3a3 C

4

S2D

5

6

1

R

IC5a3 C

4

S

2D

5

6

1

R

2

13

IC2a

=1

CS8412

SDATA

FSYNC

IC1

FILT

VERF

FCK

RXP

RXN

SEL

SCK

MCK

CBL

ERF

21

22

13

10

20

16

17M3

18M2

24M1

23M012

19

15

14

26

11

27F2

F1

F0

E2

E1

E0

25

28

7

8

A D

DA9

C1

U

2

3

4

5

6

7805

IC6

R5

R4

R6

R7

R9

R12

R8

47k

R10

220Ω

R11

47k

T2

BC547B

T1

BC557B

D1

BAT82

JP2

JP1D2

D3

PEAK

AVG

PEAK

AVG

IC214

7

IC314

7

C10

100nIC414

7

C11

100nIC514

7

C12

100n

D4

1N4002

CLIPPING

PU

TTL

PD

980072 - 11

MSB MSB'

A

CD

> 8V 5V

5V

5V

5V

IC2 = 74HCT86

IC3, IC4, IC5 = 74HC74

2

Page 28: 418/433-MHz field- strength meter

tus of IC5b for each sample is clockedto IC5a by the FSYNC signal inverted byIC2b. Since IC5a is not reset by signal A,the data transferred to it are retained.Pin 6 of this bistable therefore remainslow as long as there is no sample thatcontains a minimum or maximumvalue. If a peak value does occur, pin 6briefly goes high.

Converting the change in level atthe output of IC5a into a usable opticalindication is not too difficult. Thedesign basis was to make a (red) LED(D3) light for about one second if twoor more consecutive samples reachpeak value. Time constant R4-C8 aver-ages a number of samples, while thedischarge time of C8, determined byR5, results in an afterglow of about onesecond. The potential across C8 isbuffered by IC2a. The indication

becomes much clearer by the additionof a second (green) LED (D2). Thelight-up behaviour of this diode is the

opposite of that of D3, so that whenclipping occurs there is a distinctivechange of colour.

49Elektor Electronics 10/98

16

FSYNC

SCK

SDATA

SCK

A

MSB

MSB'

C

Dexor

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

16

16

980072 - 13

Figure 3. Timing diagram of the most importantsignals in the indicator.3

(C) ELEKTOR980072-1

C1

C2 C3

C4

C5

C6

C7

C8

C9

C10C

11C12

C13

C14

D1

D2 D3

D4H1 H2

H3H4

IC1

IC2

IC3 IC4

IC5

IC6

JP1

JP2

K1

L1

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

T1

T2

avgavg peak

+0

TTL

T T

PD

PU+

980072-1

(C) ELEKTOR980072-1

4

Figure 4. The printed-circuitboard for the indicator makesconstruction child’s play.

Parts list

Resistors:R1 = 75 ΩR2, R7 = 1 kΩR3 = 4.7 ΩR4, R10 = 220 ΩR5 = 10 MΩR6 = 560 ΩR8, R11 = 47 kΩR9, R12 = 100 Ω

Capacitors:C1, C2 = 0.01 µF, ceramicC3 = 0.047 µFC4, C6 = 10 µF, 63 V, radialC5, C7 = 0.047 µF, ceramicC8–C12 = 0.1 µFC13 = 4.7 µF, 63 V, radialC14 = 220 µF, 25 V, radial

Semiconductors:D1 = BAT82D2 = LED, green, high efficiencyD3 = LED, red, high efficiencyD4 = 1N4002T1 = BC557BT2 = BC547B

Integrated circuits:IC1 = CS8412 (Crystal Semiconduc-

tor)IC2 = 74HCT86IC3, IC4, IC5 = 74HC74IC6 = 7805

Miscellaneous:L1 = choke 47 µHJP1, JP2 = 3-way, 2.54 mm pin strip

and pin jumper (Maplin)K1 = audio connector (male) for

board mountingEnclosure 120 × 65 × 41 mm

(L× W× H), e.g., Bopla 430 (avail-able from Phoenix 01296 398355)

PCB Order no. 980072 (see ReadersServices towards the end of thisissue)

Page 29: 418/433-MHz field- strength meter

COUNTER OPTIONAs mentioned earlier, there is provisionfor linking a counter module to theindicator to show the number of timesthat clipping has occurred over a givenperiod. There are three outputs: TTL,pull -down (PD), and pull-up (PU), sothat almost any current type of mod-ule can be used.

Owing to the averaging by R4 -C8,the output remains active even whenbrief interruptions occur. If, however,the output of IC5 is used, count pulsesare obtained for all discrete samples orstrings of them. Both facilities may beused thanks to JP1 and JP2. Thisarrangement gives a choice at the TTLor PD output of either an averagedcount of the number of times clippinghas occurred or a count giving thepeak value.

In practice, peak counting may bea little too severe, since normally noth-ing much happens when the peak sig-

nals just reach the0 dB level. The aver-aged count is a morerealistic measure of the number of clip-ping occurrences. A drawback of theaveraged count is that the toggling ofIC2a may cause high -frequency pulsesthat may adversely affect fast countermodules. However, most modernmodules are immune to these pulsesand in any case the risk can beremoved by connecting a 1µF capaci-tor across the counter input.

CONSTRUCTIONThe indicator is best built on the PCBshown in Figure 4. Populating theboard with reference to the compo-nents list and the circuit diagramshould not present any undue diffi-culties. Sockets should be used for theICs. Mind the the polarity of the elec-trolytic capacitors and diodes. Notethat D1 must be of the type specified

Figure 5. Photograph ofthe completed proto-

'type indicator board. in view of the permis-sible leakage current.

Since the circuitprovides for a 5 V regulator, IC6, amains adaptor with an output of notless than 8 V may be used as powersource. The circuit draws a current ofabout 25 mA. This low current alsofacilitates the use of a 9 V battery ifportable use is desired. A dry batterywill give some 10 hours operation.

For portable use it is, of course,essential that the circuit is housed ina small, neat enclosure such as thatspecified.

[980072]

Elektor Electronics 10/98 5151Elektor Electronics 10/98

C O U N T E R O P T I O NAs mentioned earlier, there is provisionfor linking a counter module to theindicator to show the number of timesthat clipping has occurred over a givenperiod. There are three outputs: TTL,pull-down (PD), and pull-up (PU), sothat almost any current type of mod-ule can be used.

Owing to the averaging by R4-C8,the output remains active even whenbrief interruptions occur. If, however,the output of IC5 is used, count pulsesare obtained for all discrete samples orstrings of them. Both facilities may beused thanks to JP1 and JP2. Thisarrangement gives a choice at the TTLor PD output of either an averagedcount of the number of times clippinghas occurred or a count giving thepeak value.

In practice, peak counting may bea little too severe, since normally noth-ing much happens when the peak sig-

nals just reach the0 dB level. The aver-aged count is a morerealistic measure of the number of clip-ping occurrences. A drawback of theaveraged count is that the toggling ofIC2a may cause high-frequency pulsesthat may adversely affect fast countermodules. However, most modernmodules are immune to these pulsesand in any case the risk can beremoved by connecting a 1 µF capaci-tor across the counter input.

C O N S T R U C T I O NThe indicator is best built on the PCBshown in Figure 4. Populating theboard with reference to the compo-nents list and the circuit diagramshould not present any undue diffi-culties. Sockets should be used for theICs. Mind the the polarity of the elec-trolytic capacitors and diodes. Notethat D1 must be of the type specified

in view of the permis-sible leakage current.

Since the circuitprovides for a 5 V regulator, IC6, amains adaptor with an output of notless than 8 V may be used as powersource. The circuit draws a current ofabout 25 mA. This low current alsofacilitates the use of a 9 V battery ifportable use is desired. A dry batterywill give some 10 hours operation.

For portable use it is, of course,essential that the circuit is housed ina small, neat enclosure such as thatspecified.

[980072]

5

Figure 5. Photograph ofthe completed proto-type indicator board.

Page 30: 418/433-MHz field- strength meter

APPLIC ' ION NOTEThe content of this note is based on information received from manufacturers in theelectrical and electronics industries or their representatives and does not imply prac-tical experience by Elektor Electronics or its consultants.

ompact 3.3 V chargepump converter

in 5 -pin SOT -23 package

1VIN

SIN

C1

0.1µF

C1 C1*

CHARGE PUMP

800kHzOSC

LTC1517-3.3

THERMAL 1 215VSHDN REF

2.05M

1.25M

VDU

LOUT

980078 -11

As more and more circuits are pow-ered by battery, there is a growing

need for voltage converters that canderive a stable 3.3 V supply from awide range of input voltages. This

need may be met by Linear Technol-ogy's LTC1517-3.3 and LT1517-5

d.c.-d.c. converters

® LTC and LT are registered trade-mark of Linear Technology Corpo-ration.

'" Burst Mode is a trademark of Lin-ear Technology Corporation.

A Linear Technology Application

Figure 1. Block dia-gram of theLTC1517-3.3. Capaci-tor C1, which formspart of the chargepump, is the heart ofthe circuit.

GENERALDESCRIPTIONThe LTC®1517-3.3 is a micropowercharge pump d.c.-d.c. converter thatproduces a regulated 3.3 V output froman input voltage range of 2-4.4 V.Extremely low operating current (typi-cally 6 µA with no load) and low externalparts count (one 0.1 µF flying capacitorand two small bypass capacitors atinput and output) make the part ideallysuited for small, light -load, battery -powered applications. The totalprinted -circuit board area of the appli-cation circuit in Figure 2 is only 29 mm2.

The LTC1517-3.3 operates as a burst -mode switched -capacitor doubler toproduce a regulated output. It has ther-mal shutdown capability and can sur-vive a continuous short-circuit betweenoutput and ground. The device is avail-able in a 5 -pin SOT -23 package.

With an input voltage of 2 V and anoutput current of 0.1-10 mA, the effi-ciency of the LTC1517-3.3 is 80%.

There is also a 5 V variant of the IC:the LTC1517-5. This IC provides a reg-ulated output of 5 V from an inputvoltage range of 2.7-5 V The maximumoutput current is 20 mA.

452 Elektor Electronics 10/98Elektor Electronics 10/98

G E N E R A LD E S C R I P T I O NThe LTC®1517-3.3 is a micropowercharge pump d.c.–d.c. converter thatproduces a regulated 3.3 V output froman input voltage range of 2–4.4 V.Extremely low operating current (typi-cally 6 µA with no load) and low externalparts count (one 0.1 µF flying capacitorand two small bypass capacitors atinput and output) make the part ideallysuited for small, light-load, battery-powered applications. The totalprinted-circuit board area of the appli-cation circuit in Figure 2 is only 29 mm2.

The LTC1517-3.3 operates as a burst-mode™ switched-capacitor doubler toproduce a regulated output. It has ther-mal shutdown capability and can sur-vive a continuous short-circuit betweenoutput and ground. The device is avail-able in a 5-pin SOT-23 package.

With an input voltage of 2 V and anoutput current of 0.1–10 mA, the effi-ciency of the LTC1517-3.3 is 80%.

There is also a 5 V variant of the IC:the LTC1517-5. This IC provides a reg-ulated output of 5 V from an inputvoltage range of 2.7–5 V. The maximumoutput current is 20 mA.

As more and more circuits are pow-ered by battery, there is a growing

need for voltage converters that canderive a stable 3.3 V supply from awide range of input voltages. This

need may be met by Linear Technol-ogy’s LTC1517-3.3 and LT1517-5

d.c.–d.c. converters

52

A Linear Technology Application

in 5-pin SOT-23 package

Figure 1. Block dia-gram of theLTC1517-3.3. Capaci-tor C1, which formspart of the chargepump, is the heart ofthe circuit.

1

compact 3.3 V chargepump converter

® LTC and LT are registered trade-mark of Linear Technology Corpo-ration.

™ Burst Mode is a trademark of Lin-ear Technology Corporation.

The content of this note is based on information received from manufacturers in theelectrical and electronics industries or their representatives and does not imply prac-tical experience by Elektor Electronics or its consultants.APPLICATION NOTE

Page 31: 418/433-MHz field- strength meter

TECHNICALDESCRIPTIONThe block diagram of the LTC1517-3.3is shown in Figure 1. The IC uses aswitched -capacitor charge pump toboost VIN to a regulated output of3.3 V ±4%. It achieves regulation bysensing the output voltage through aninternal resistor divider and enablingthe charge pump when the dividedoutput drops below the comparator'slower trip point, which is set by V.

When the charge pump is enabled,a 2 -phase non -overlapping clock con-trols the internal charge pumpswitches. Flying capacitor C1 is chargedto Vi, on phase 1 of the clock. Onphase 2 of the clock, C1 is in series withthe input and connected to the outputvia an internal switch. This sequence ofcharging and discharging the flyingcapacitor occurs at a free -running fre-quency of 800 kHz (typical) and con-tinues until the divided output voltagereaches the upper trip point of thecomparator.

Once the output is back in regula-tion, the charge pump is disabled. Thismethod of bursting the charge pumpon and off enables the LTC1517-3.3 toachieve a high efficiency at extremelylow output loads.

A typical application diagram isshown in Figure 2.

CAPACITORSELECTIONFor best performance, it is recom-mended that low ESR (equivalentseries resistance) capacitors be used forboth CA, and CT to reduce noise andripple. The CA, and CT capacitorsshould be either ceramic or tantalumand have a capacitance of not less than3.3 AF. Ceramic capacitors will providethe smallest size for a given capaci-tance.

If the input source impedance isvery low (<0.5 D), CA, may not beneeded.

Ceramic capacitors with values of0.1 AF or 0.22 AF are recommended forflying capacitor C1. Lower values maybe used in low IT applications.

OUTPUT RIPPLENormal operation of the LTC1517-3.3produces voltage ripple on the VTpin. This output voltage ripple isneeded for the parts to regulate. Lowfrequency ripple exists owing to thehysteresis in the sense comparator and

0.1µF

HI 4

C1 C1'

LTC1517-3.3

VIN GND VOUT

1 2 3 V0uT = 3.3V ± 4%

2V TO 4.4V INT = 8mA (VIN 2 2V)

3.3µF 6.8µFlour = 15mA (VIN 2.5V)

980078 -12

propagation delays in the chargepump enable/disable circuits. High fre-quency ripple is also present, mainlyfrom the equivalent series resistance(ESR) of the output capacitor.

Typical output ripple with VON =2.5 V under maximum load conditionsis 75 mV peak -to -peak with a low ESRoutput capacitor of 3.3 AF(minimum recommendedCour) For applications

MAINSUPPE Y

5V

Figure 2. Diagram ofthe standard applica-tion of theLTC1517-3.3. Apartfrom the IC, only threecapacitors areneeded.

temperature exceeds about 160 °C. Thecharge pump is re -enabled when thejunction temperature drops to about145 °C. The LTC1517-3.3 will cycle inand out of thermal shutdown indefi-nitely without latchup or damage untilthe short-circuit is removed from theoutput.

11

figure 3. Diagram of a low -power batterybackup supply with automatic switchoverand no reverse current.

3

BAT54

TRICKLE CHARGEk AND LTC1517-3.3

10d

LT1521 3.3

0.1µF

1-5-1

I1.1M

2 -CELL

NiNd

3.9VTRIP

LTC1517 3.3

EBE

470k5

6

SILICONIXSi2301DS

LTC1540

A2

requiring Vi, to exceed 3.3 V or forapplications requiring less than 75 mVpeak -to -peak ripple, a 6.8-10 AF Cool.capacitor is recommended. Slight fur-ther decreases in output ripple can beachieved by using Cool. capacitorslarger than 10 AF.

PROTECTIONCIRCUITSDuring output short-circuit conditions,the LTC1517-3.3 will draw a current of40-150 mA from the input, causing arise in junction temperature. On -chipthermal shutdown circuitry disablesthe charge pump when the junction

Vow- = 3.3V,0. lour = 300mA

(louT = BmA INBACKUP MODE)

irf

LOGIC LOW = BACKUP MODE

980078 -13

ANOTHERAPPLICATION

The diagram in Figure 3 shows anapplication of the LTC1517-3.3 thatillustrates what an important role theIC can play in a power supply withintegral buffer circuit. When in this cir-cuit the input voltage fails, the logic cir-cuits are automatically switched to thebackup mode. In that mode, the MOS-FET conducts and the LTC1517-3.3ensures a continued VouT derived fromtwo NiCd buffer batteries.

[980078]

Elektor Electronics 10/98 53

propagation delays in the chargepump enable/disable circuits. High fre-quency ripple is also present, mainlyfrom the equivalent series resistance(ESR) of the output capacitor.

Typical output ripple with VIN =2.5 V under maximum load conditionsis 75 mV peak-to-peak with a low ESRoutput capacitor of 3.3 µF(minimum recommendedCOUT). For applications

requiring VIN to exceed 3.3 V or forapplications requiring less than 75 mVpeak-to-peak ripple, a 6.8–10 µF COUTcapacitor is recommended. Slight fur-ther decreases in output ripple can beachieved by using COUT capacitorslarger than 10 µF.

P R O T E C T I O NC I R C U I T SDuring output short-circuit conditions,the LTC1517-3.3 will draw a current of40–150 mA from the input, causing arise in junction temperature. On-chipthermal shutdown circuitry disablesthe charge pump when the junction

temperature exceeds about 160 °C. Thecharge pump is re-enabled when thejunction temperature drops to about145 °C. The LTC1517-3.3 will cycle inand out of thermal shutdown indefi-nitely without latchup or damage untilthe short-circuit is removed from theoutput.

A N O T H E RA P P L I C A T I O N

The diagram in Figure 3 shows anapplication of the LTC1517-3.3 thatillustrates what an important role theIC can play in a power supply withintegral buffer circuit. When in this cir-cuit the input voltage fails, the logic cir-cuits are automatically switched to thebackup mode. In that mode, the MOS-FET conducts and the LTC1517-3.3ensures a continued VOUT derived fromtwo NiCd buffer batteries.

[980078]

T E C H N I C A LD E S C R I P T I O NThe block diagram of the LTC1517-3.3is shown in Figure 1. The IC uses aswitched-capacitor charge pump toboost VIN to a regulated output of3.3 V ±4%. It achieves regulation bysensing the output voltage through aninternal resistor divider and enablingthe charge pump when the dividedoutput drops below the comparator’slower trip point, which is set by VREF.

When the charge pump is enabled,a 2-phase non-overlapping clock con-trols the internal charge pumpswitches. Flying capacitor C1 is chargedto VIN on phase 1 of the clock. Onphase 2 of the clock, C1 is in series withthe input and connected to the outputvia an internal switch. This sequence ofcharging and discharging the flyingcapacitor occurs at a free-running fre-quency of 800 kHz (typical) and con-tinues until the divided output voltagereaches the upper trip point of thecomparator.

Once the output is back in regula-tion, the charge pump is disabled. Thismethod of bursting the charge pumpon and off enables the LTC1517-3.3 toachieve a high efficiency at extremelylow output loads.

A typical application diagram isshown in Figure 2.

C A P A C I T O RS E L E C T I O NFor best performance, it is recom-mended that low ESR (equivalentseries resistance) capacitors be used forboth CIN and COUT to reduce noise andripple. The CIN and COUT capacitorsshould be either ceramic or tantalumand have a capacitance of not less than3.3 µF. Ceramic capacitors will providethe smallest size for a given capaci-tance.

If the input source impedance isvery low (<0.5 Ω), CIN may not beneeded.

Ceramic capacitors with values of0.1 µF or 0.22 µF are recommended forflying capacitor C1. Lower values maybe used in low IOUT applications.

O U T P U T R I P P L ENormal operation of the LTC1517-3.3produces voltage ripple on the VOUTpin. This output voltage ripple isneeded for the parts to regulate. Lowfrequency ripple exists owing to thehysteresis in the sense comparator and

53Elektor Electronics 10/98

2

3

Figure 2. Diagram ofthe standard applica-tion of theLTC1517-3.3. Apartfrom the IC, only threecapacitors areneeded.

Figure 3. Diagram of a low-power batterybackup supply with automatic switchoverand no reverse current.

Page 32: 418/433-MHz field- strength meter

GENERAL INTEREST

If your refrigerator isstill one of the old

types with an 'auto-matic defrost' system,

this economizer canhelp you reduce yourelectricity billls. These

old models are pro-vided with a small

heating element toprevent icing up, but

in general this is atbest inefficient andadds unnecessarykilowatt-hours. Thecircuit described inthis article limits the

number of defrostcycles in such a way

that your electricitybills are reduced with-out an increase in ice

formation.

Design by K A Walraven

refrigeratoreconomizerfor older models

-It is a fact of nature that humiditytends to condense on the coldest partof a space (think of single -glazed win-dows in cold weather). This also hap-pens in a refrigerator. The coldest spotin this is easily recognized by the for-mation of ice. This icing hinders theheat conversion and so lowers the effi-ciency of the system. In modernfridges the on and off switching of thecompressor motor is timed so that iceis never a problem: it can defrost natu-rally, i.e., without a heating element.Many older models, however, are pro-vided with an 'automatic defrost' facil-ity, which consists of a small heatingelement. As soon as the compressormotor of such a refrigerator is switchedoff, the heating element is switched on

to melt the ice.This is, of course, aninefficient system:first the air is cooledand then it is heated.Since the heating element invariably ison for longer than necessary, it is pos-sible in many cases to lower the energyconsumption of the fridge withoutaffecting the efficacy of the defrost facil-ity.

FIRST ...Before you start building the econo-mizer, make sure that it can be usedwith your fridge.

A diagram of the electrical circuit ofa typical fridge is shown in Figure 1. Aheating element, A, with an electrical

A54 Elektor Electronics 10/98Elektor Electronics 10/98

It is a fact of nature that humiditytends to condense on the coldest partof a space (think of single-glazed win-dows in cold weather). This also hap-pens in a refrigerator. The coldest spotin this is easily recognized by the for-mation of ice. This icing hinders theheat conversion and so lowers the effi-ciency of the system. In modernfridges the on and off switching of thecompressor motor is timed so that iceis never a problem: it can defrost natu-rally, i.e., without a heating element.Many older models, however, are pro-vided with an ‘automatic defrost’ facil-ity, which consists of a small heatingelement. As soon as the compressormotor of such a refrigerator is switchedoff, the heating element is switched on

to melt the ice.This is, of course, aninefficient system:first the air is cooledand then it is heated.Since the heating element invariably ison for longer than necessary, it is pos-sible in many cases to lower the energyconsumption of the fridge withoutaffecting the efficacy of the defrost facil-ity.

F I R S T …Before you start building the econo-mizer, make sure that it can be usedwith your fridge.

A diagram of the electrical circuit ofa typical fridge is shown in Figure 1. Aheating element, A, with an electrical

If your refrigerator isstill one of the old

types with an ‘auto-matic defrost’ system,

this economizer canhelp you reduce yourelectricity billls. These

old models are pro-vided with a small

heating element toprevent icing up, but

in general this is atbest inefficient andadds unnecessarykilowatt-hours. Thecircuit described in

this article limits thenumber of defrost

cycles in such a waythat your electricity

bills are reduced with-out an increase in ice

formation.

54

Design by K A Walraven

refrigeratoreconomizerfor older models

GENERAL INTEREST

Page 33: 418/433-MHz field- strength meter

Visit our Web site at http://ourworld.compuserve.com/homepages/elektor uk

resistance of about three kilohms is inseries with the compressor motor, C.Thermostat B short-circuits the heatingelement when the compressor is tooperate. This setup is shunted by doorswitch D in series with the interiorlight.

A multimeter is needed to find outwhether your refrigerator is suitable foruse with the economizer.

Unplug the refrigerator cable fromthe mains socket outlet.

Set the thermostat control to zero.Make sure that the door of the

refrigerator is closed.Measure the resistance between the

L(ive) and N(eutral) pins of the mainssocket terminating the refrigeratorcable. The resistance should be about3 k.Q; if it is much more, exceeding1 M.Q, the refrigerator has no heatingelement and the economizer cannot beused.

POWERREQUIREMENTSA refrigerator with an auto defrostfacility, and connected to the mainssupply, needs power at three differentlevels.

When the compressor motor is work-ing: about 150 watts (W). When the compressor motor is offand the heating element is on: about15 watts (W). When the compressor motor is offand the heating element and the inte-rior light are on: about 30 watts (W).

When the refrigerator is discon-nected from the mains supply bythe economizer, it may happen that:1. The refrigerator needs powerat a level of more than 15 W. Thismay be because the thermostatwants to switch on the compres-sor motor. In this case, the econ-omizer must reconnect therefrigerator to the mains sup-ply.

2. The refrigerator needs powerat a level of less than 30 W. This

indicates that only the heating elementis required to be on. The economizerthen does not reconnect the refrigera-tor to the mains supply.

CIRCUIT DESCRIPTIONThe circuit diagram of the economizeris shown in Figure 2. When the refrig-erator is connected to the mains sup-ply, the current drain is measured bythe potential difference, p.d., acrossresistor R9. If this is in accord with thecurrent drawn by the heating elementand the interior light, the output ofop amp ICib is low during part of thepositive half -cycle of the voltage. If thecurrent is considerably larger since thecompressor motor is on, op amp is

on for part of the positive half -cycle of

the mains voltage.In the quiescent state, when relay

Ref is not energized, the refrigerator islinked to the 12 V supply line on theeconomizer via resistor R7. The fridgeand this resistor then create a potentialdivider, which provides a simplemeans of detecting whether the inte-rior light or the compressor motor isswitched on.

When the resistance of the refriger-ator becomes low, the refrigerator isswitched on by ICia via T1 and relayRef. This results in a p.d. of more than320 mV across R9. The relay remainsenergized until the load diminishes(interior light or compressor motor off).

When the compressor motor works,the p.d. across R9 is large enough to

Figure 2. Circuit dia-111gram of the econo-mizer. It is linkeddirectly to the mainssupply, so that greatcare must be taken intesting it.

D8

1 N4001

H

D7

12V

R12 R11

KM KMC3 R10!fr-111-2S1

1W

1

Figure 1. Basic electri-cal circuit of the autodefrost facility in arefrigerator.

A = heating element (about 15 W)B = thermostatC = compressor motor (about 135 W)D = door switchE = interior light 980052 - 11

R7

R1

a

C11-1

1

24V 63V1Oµ

R2 C4

R3

R

1C2

7812 12V

', ri 0

71,3,

2x D31N4148

10k

D9 RE1C

24V

1 N4001

1073V

2A T

K1

ti

RE1 = V23057 -B6 -A201

K2

D4

BAT85

-110+

1C1c

IC1 = TLC274

12V

IC1 1C3

8

D10

1N4148 R13

R14

1M

R9

C

5W

12

13IC1 d

C6

:20n

D5 1D6

12V

R16

RL1

2x 1N5400 D11

SAVE

12V

R15

4

CTRD1V10/ 0DEC

1

1C3

2S1

-0 o14

30

0 0

4 -0 013

5 0 0

-0O40177

9

-0 0

CT=0 8 -0 0

-0o92

5

980052 - 12

Elektor Electronics 10/98 55

resistance of about three kilohms is inseries with the compressor motor, C.Thermostat B short-circuits the heatingelement when the compressor is tooperate. This setup is shunted by doorswitch D in series with the interiorlight.

A multimeter is needed to find outwhether your refrigerator is suitable foruse with the economizer. • Unplug the refrigerator cable fromthe mains socket outlet.• Set the thermostat control to zero.• Make sure that the door of therefrigerator is closed.• Measure the resistance between theL(ive) and N(eutral) pins of the mainssocket terminating the refrigeratorcable. The resistance should be about3 kΩ; if it is much more, exceeding1 MΩ, the refrigerator has no heatingelement and the economizer cannot beused.

P O W E RR E Q U I R E M E N T SA refrigerator with an auto defrostfacility, and connected to the mainssupply, needs power at three differentlevels.

• When the compressor motor is work-ing: about 150 watts (W).• When the compressor motor is offand the heating element is on: about15 watts (W).• When the compressor motor is offand the heating element and the inte-

rior light are on: about 30 watts (W).

When the refrigerator is discon-nected from the mains supply bythe economizer, it may happen that:1. The refrigerator needs powerat a level of more than 15 W. Thismay be because the thermostatwants to switch on the compres-sor motor. In this case, the econ-omizer must reconnect therefrigerator to the mains sup-ply.

2. The refrigerator needs powerat a level of less than 30 W. This

indicates that only the heating elementis required to be on. The economizerthen does not reconnect the refrigera-tor to the mains supply.

C I R C U I T D E S C R I P T I O NThe circuit diagram of the economizeris shown in Figure 2. When the refrig-erator is connected to the mains sup-ply, the current drain is measured bythe potential difference, p.d., acrossresistor R9. If this is in accord with thecurrent drawn by the heating elementand the interior light, the output ofop amp IC1b is low during part of thepositive half-cycle of the voltage. If thecurrent is considerably larger since thecompressor motor is on, op amp IC1c ison for part of the positive half-cycle of

the mains voltage.In the quiescent state, when relay

Re1 is not energized, the refrigerator islinked to the 12 V supply line on theeconomizer via resistor R7. The fridgeand this resistor then create a potentialdivider, which provides a simplemeans of detecting whether the inte-rior light or the compressor motor isswitched on.

When the resistance of the refriger-ator becomes low, the refrigerator isswitched on by IC1a via T1 and relayRe1. This results in a p.d. of more than320 mV across R9. The relay remainsenergized until the load diminishes(interior light or compressor motor off).

When the compressor motor works,the p.d. across R9 is large enough to

55Elektor Electronics 10/98

A B D

C E

980052 - 11

M

B = thermostat

D = door switchE = interior light

C = compressor motor (about 135 W)

A = heating element (about 15 W)

1Figure 1. Basic electri-cal circuit of the autodefrost facility in arefrigerator.

10

0k

R15

47

k

5k

6

33

k1

0k

1k

2

2

S1

R7

R1

R2

R3

R4

1k

R5R9

5W

R13

100k

R14

1M

R8

10k

R6

4k7

R10

22Ω1W

R11

470k

R12

470k

C1

10µ63V

C4

470µ35V

C5

10µ63V

C2

10µ 63V

K1

K2

T1

BC547B

D6

2x 1N5400

D5D4

BAT85

D9

1N4001

D1

1N4148D3

D81N4001

D101N4148

D21N4148

D7

24V

C6

220n

C3

1µ250V

2

3

1IC1a

13

12

14IC1d

IC1b

65

7

D11

RE1

7812

IC2

2A T

F1

RL1

IC1

4

11

IC3

16

8

IC1c

910

8

CTRDIV10/

IC3

CT=0

CT≥5

4017

DEC

14

13

15

12

11

10

4

9

6

5

1

7

3

2

&+

0

1

2

3

4

5

6

7

8

9

~

2x

L

L

24V

RE1 = V23057-B6-A201

SAVE

12V12V

12V

12V

12V

IC1 = TLC274

980052 - 12

R16

4k

7

3V

20

V5

90

V3

2

X2

2

Figure 2. Circuit dia-gram of the econo-mizer. It is linkeddirectly to the mainssupply, so that greatcare must be taken intesting it.

Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

Page 34: 418/433-MHz field- strength meter

drive IC1c on in the rhythm of themains voltage. The consequent nega-tive pulses at the output of the op ampcause capacitor C6 to be discharged viaD10. The trailing edge is inverted andenhanced by IC1d. In this way, the stateof counter IC3 is then increased by onefor every trailing edge. When the com-pressor motor stops, C6 is rechargedvia R14.

When the state of counter IC3 iszero, that is, when output Q0 is high,the relay remains energized. Everytime the compressor motor is working,the next output of the IC goes high.When the output whose DIP switch isclosed becomes high, the counter isreset. It will be seen that the setting ofthe switch determines after how manytimes the compressor motor has beenon a defrost cycle is initiated. Since atleast one ‘motor on’ cycle must beignored (otherwise there would be no

economizing), output Q1 is not linkedto a DIP switch. Diode D11 indicateswhen the heating element is not on.

Diodes D1 and D3, in conjunctionwith T1 and network R6-C62, form anOR gate, so that T1 may be switched onby IC1a or IC3.

A 24 V supply voltage is derivedfrom the mains voltage by networkR10–12-C3. This supply line is stabilizedby zener diode D7, and subsequentlydropped to 12 V by regulator IC2. Var-ious reference voltages are derivedfrom the 12 V line by potential dividerR2–R5.

Diodes D5 and D6 protect op ampagainst high voltages at the input andalso limit the dissipation in R9.

C O N S T R U C T I O NWARNING. Constructors in the UnitedKingdom must ensure that the circuitearth is NOT linked to the mains earthwhich, by Regulation, must be perma-nently connected to the refrigerator Ifthe two earths were linked, the Neutralline would be short-circuited to themains earth.

CAUTION. It will be noted that the

economizer circuit works directlyfrom the mains supply, which meansthat it must be housed in a double-insulated enclosure.

The economizer is best built on theprinted-circuit board in Figure 3,which is available ready made – seeReaders Services towards the end ofthis issue. Depending on the enclosureused, it may be necessary to round thecorners of the board with a file asshown. Figure 4 shows the prototypeboard in its enclosure.

Solder all components on the boardas indicated, but do not yet fit IC1 andIC3 into their socket. Connect the fin-ished board to the mains supply andmeasure the voltages at the points indi-cated in Figure 2. Take great care sincethe full mains voltage is present on theboard. Use an insulated workbench if atal possible. It is convenient to leave oneprobe of the multimeter permanentlyconnected to the circuit earth (NOT themains earth!).

When all voltages correspond withthose indicated on the circuit diagram,disconnect the circuit from the mains.

56 Elektor Electronics 10/98

980052-1(C) Segment

C1

C2

C3

C4

C5

C6

D1 D2

D3

D4

D5

D6

D7D8

D9

D10

D11

F1

H1

H2

H3

H4

IC1

IC2

IC3

K1

K2

R1

R2

R3

R4

R5

R6

R7

R8R9

R10

R11

R12

R13

R14

R15

R16

RE1

S1

T1

2AT

980052-1

~

~

L

L

980052-1(C) Segment

Parts list

Resistors:R1, R13 = 100 kΩR2 = 33 kΩR3, R8 = 10 kΩR4 = 1 kΩR5 = 1.2 kΩR6, R16 = 4.7 kΩR7 = 5.6 kΩR9 = 2.2 Ω, 5 WR10 = 22 Ω, 1 WR11, R12 = 470 kΩR14 = 1 MΩR15 = 47 kΩ

Capacitors:C1, C2, C5 = 10 µF, 63 V, radialC3 = 1 µF, 250 V a.c., Class X2C4 = 470 µF, 35 V, radialC6 = 0.22 µF

Semiconductors:D1, D2, D3, D10 = 1N4148D4 = BAT85D5, D6 = 1N5400D1 = LED, 5 mm, high efficiencyT1 = BC547B

Integrated circuits:IC1 = TLC274CNIC2 = 7812IC3 = 4017

Miscellaneous:K1, K2 = 2-way terminal block, pitch

7.5 mmS1 = octal DIP switchRe1 = 24 V relay for board mountingF1 = fuse, 2 A, slowEnclosure as appropriate (see text)PCB Order no. 980052 (see Readers

Services towards end of this issue)

3

Figure 3. The printed-circuitboard for the economizer isavailable ready made – seeReaders Services towards theend of this issue.

Page 35: 418/433-MHz field- strength meter

Visit our Web site at http://ourworld.compuserve.com/homepages/elektor uk

4

Open all DIP switches, except S1.1.Insert IC1 and IC3 into their respectivesockets. Connect the refrigerator to therelevant terminals and reconnect the

circuit to the mains supply. Brieflyopen and close S1.1.

When all is well, Dll remains off.Turn on the compressor motor with

gure 4. Photographof the finished board inits enclosure with thelid removed. Great caremust be taken whentesting it.

the thermostat control, when the diodeshould light. When this is so, theremainder of the economizer may bechecked. When the refrigerator door isopened, the interior light must comeon. When the door is being closed, theclick of the relay changing state shouldbe heard clearly.

It is not possible to say which set-ting of 51 is the most propitious foreach and every case. As a guide, openall switches so that the counter is reset,and close S1.8. If this results in icing upafter a while, the economizing action istoo drastic. Open S1.8 and close S1.7. Ifthis still leads to icing up, open S1.7.and close S1.6. and so on until there isno icing up.

ELEKTOR

240V 50Hz

No. 980052

F = 2A T max. 220VA

[980052]

Elektor Electronics 10/98 57

Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

57Elektor Electronics 10/98

Figure 4. Photographof the finished board inits enclosure with thelid removed. Great caremust be taken whentesting it.

4

50Hz

No. 980052

240V

F = 2A T max. 220VA

ELEKTOR

~

the thermostat control, when the diodeshould light. When this is so, theremainder of the economizer may bechecked. When the refrigerator door isopened, the interior light must comeon. When the door is being closed, theclick of the relay changing state shouldbe heard clearly.

It is not possible to say which set-ting of S1 is the most propitious foreach and every case. As a guide, openall switches so that the counter is reset,and close S1.8. If this results in icing upafter a while, the economizing action istoo drastic. Open S1.8 and close S1.7. Ifthis still leads to icing up, open S1.7.and close S1.6. and so on until there isno icing up.

[980052]

Open all DIP switches, except S1.1.Insert IC1 and IC3 into their respectivesockets. Connect the refrigerator to therelevant terminals and reconnect the

circuit to the mains supply. Brieflyopen and close S1.1.

When all is well, D11 remains off.Turn on the compressor motor with

Page 36: 418/433-MHz field- strength meter

surtware whir electronics

Electronics Work-bench Layout

simulation program starts todesign PCB layouts

Electronics Work-bench (EWB), the

user-friendly simula-tion program, has

been extended with anew, powerful, pro-gram for the design

of printed circuitboards. The new pro-

gram, like the basicsimulation software,

is marked by ease ofcontrol. Circuit dia-

grams from EWBmay be exported tothe PCB layout pro-

gram without anytrouble whatsoever.

Next, the compo-nents are simply

dragged to thedesired positions on

the board.

;:7 Electronics Workbench Layout - Tut3.ddf

File View Traces Components Te>Os

DI 641il? I IElI MAIM

Draw

r goF 45 + 90r all angles

Method

trace

r arc

Type

(7 fixedr" variable

Layer_

ITOP

lc. 1,w. id 0 32

Via code

'Calculated

Block Shapes Netlist Took Help

M2I.M==MIL-J/INLILIMM=LHELFMilak..101C.., , ce

MIJELI.1,202ft-iiiii,....r.E1mL fti.11.INL IM," 111:k lliOILLIV 11/

elm ..------Eriar-MIMPAIIINpriEt- la.0.- ;.',tr.',Tl..-i..._ I. Alliifi MISJMlow."111.--"IMMLAWel lit,.miiisonourawm,, EW A FM=

rlialli-Al\WALF rrMika A PAM IPIIWIIMIR

IMMIdr1012 wNe -

it10-' all

Many electronics enthusiasts will agreethat by virtue of its simple user inter-face and clearly structured menus,'Electronics Workbench' paved theway towards simulation of analogueand digital circuits using the computer.Despite their user-friendly setup, thecurrent versions of EWB offer thesame functionality as many simulationprograms aimed at the professionalmarket. These days, a clear trendbecomes visible of suppliers of simula-tion software and PCB layout pro-grams extending the functionality oftheir products. The Canadian com-pany Interactive Image Technologies,too, has been looking for ways to'widen' its product in an attempt toenable designers to cover the largestpossible range from circuit design tothe final PCB layout phase, all usingthe computer, of course. But how does

one extend a program for simulationof electronic circuits? Well, the mostlikely candidate is a circuit board lay-out utility. The new program 'EWBLayout' we received for reviewing isthe result of close co-operationbetween Interactive and UltimateTechnology. Users of 'Ultiboard' soft-ware will not fail to notice lots of sim-ilarities between their program and thefledgling from Interactive.

Interactive has succeeded in inte-grating its new PCB layout programinto the EWB suite. Having drawn thecircuit diagram and put it through thecircuit simulation phase, you are readyto export the lot to the PCB designprogram. You are instantly presentedwith a board. Beside it appear all com-ponents that make up the simulatedcircuit, and their interconnections. Allyou have to do is drag these compo-

60 Elektor Electronics 10/98

Electronics Work-bench (EWB), the

user-friendly simula-tion program, has

been extended with anew, powerful, pro-gram for the design

of printed circuitboards. The new pro-

gram, like the basicsimulation software,

is marked by ease ofcontrol. Circuit dia-

grams from EWBmay be exported tothe PCB layout pro-

gram without anytrouble whatsoever.

Next, the compo-nents are simply

dragged to thedesired positions on

the board.

Many electronics enthusiasts will agreethat by virtue of its simple user inter-face and clearly structured menus,‘Electronics Workbench’ paved theway towards simulation of analogueand digital circuits using the computer.Despite their user-friendly setup, thecurrent versions of EWB offer thesame functionality as many simulationprograms aimed at the professionalmarket. These days, a clear trendbecomes visible of suppliers of simula-tion software and PCB layout pro-grams extending the functionality oftheir products. The Canadian com-pany Interactive Image Technologies,too, has been looking for ways to‘widen’ its product in an attempt toenable designers to cover the largestpossible range from circuit design tothe final PCB layout phase, all usingthe computer, of course. But how does

one extend a program for simulationof electronic circuits? Well, the mostlikely candidate is a circuit board lay-out utility. The new program ‘EWBLayout’ we received for reviewing isthe result of close co-operationbetween Interactive and UltimateTechnology. Users of ‘Ultiboard’ soft-ware will not fail to notice lots of sim-ilarities between their program and thefledgling from Interactive.

Interactive has succeeded in inte-grating its new PCB layout programinto the EWB suite. Having drawn thecircuit diagram and put it through thecircuit simulation phase, you are readyto export the lot to the PCB designprogram. You are instantly presentedwith a board. Beside it appear all com-ponents that make up the simulatedcircuit, and their interconnections. Allyou have to do is drag these compo-

60 Elektor Electronics 10/98

Electronics Work-bench Layout

software for electronics

simulation program starts todesign PCB layouts

software for electronics

Page 37: 418/433-MHz field- strength meter

nents to the desired position on theboard, and then leave the real work tothe autorouter. In this way, even inex-perienced users can make a PCB lay-out in no time at all. We put EWB Lay-out through its paces by presenting itto an unsuspecting person withoutany previous experience in PCBdesigning. In less than half an hour, hecame up with a circuit diagram and amatching PCB design!

Of course, the layout program hasmuch more to offer than the rathersimple operations mentioned above.The program contains a library withover 4,000 footprints, and recognisesthe right footprint for all 10,000 com-ponents stored by EWB. With the aidof the internal editor, the user is capa-ble of creating new component shapes,or modify existing shapes. Multilayersare possible up to 32 layers. Two inter-active autorouters provide formidableassistance when it comes to dividingthe PCB tracks. All sorts of PCB shapesare allowed, up to a size of 50x50".Some other features that may be men-tioned here: interactive editing, realtime design rule check, track densityhistograms, blind and buried via's, re-route while move, and user -definedpads.

The program supports a number ofplotters and printers, and is capable ofsaving files in foreign formats like DXF,Gerber and Excellon.

EWB Layout only runs on Win-dows 95 or NT PCs. Although Interac-tive indicates a 486 PC with 8 Mbytes

theROUTER GXR [DAEWB5PRO \ Layout \ PCBs \ Tut3.rtn

File Parameters View Select Routel Zoom

of RAM as a minimum requirement, itwould seem unwise to use anythingolder or slower than a 200 MHz Pen-tium, if only to be able to work com-fortably.

EWB Layout comes in three ver-sions: EWB Layout Professional with amaximum of 2,000 pins (price £995);EWB Layout Power Professional sup-porting unlimited pins (price £1995) -both intended to complement EWBEDA or PRO - and the low-cost ver-sion for private use called EWB LayoutPersonal Edition (price £299). The latter

version has slightly reduced function-ality (fewer footprints, max. 500 pins,and only one autorouter). These threeversions are shortly to be comple-mented with an Educational version.All prices are exclusive of VAT

(985065-1)

In the UK and Ireland, contact AdeptScientific plc, 6 Business Centre West,Avenue One, Letchworth, Hertford-shire SG6 2HB. Tel: (01462) 480055, fax:(01462) 480213. Email:[email protected]. Internet:http://www. adeptscience.co.uk.

Elektor Electronics 10/98 61

nents to the desired position on theboard, and then leave the real work tothe autorouter. In this way, even inex-perienced users can make a PCB lay-out in no time at all. We put EWB Lay-out through its paces by presenting itto an unsuspecting person withoutany previous experience in PCBdesigning. In less than half an hour, hecame up with a circuit diagram and amatching PCB design!

Of course, the layout program hasmuch more to offer than the rathersimple operations mentioned above.The program contains a library withover 4,000 footprints, and recognisesthe right footprint for all 10,000 com-ponents stored by EWB. With the aidof the internal editor, the user is capa-ble of creating new component shapes,or modify existing shapes. Multilayersare possible up to 32 layers. Two inter-active autorouters provide formidableassistance when it comes to dividingthe PCB tracks. All sorts of PCB shapesare allowed, up to a size of 50x50”.Some other features that may be men-tioned here: interactive editing, realtime design rule check, track densityhistograms, blind and buried via’s, re-route while move, and user-definedpads.

The program supports a number ofplotters and printers, and is capable ofsaving files in foreign formats like DXF,Gerber and Excellon.

EWB Layout only runs on Win-dows 95 or NT PCs. Although Interac-tive indicates a 486 PC with 8 Mbytes

of RAM as a minimum requirement, itwould seem unwise to use anythingolder or slower than a 200 MHz Pen-tium, if only to be able to work com-fortably.

EWB Layout comes in three ver-sions: EWB Layout Professional with amaximum of 2,000 pins (price £995);EWB Layout Power Professional sup-porting unlimited pins (price £1995) —both intended to complement EWBEDA or PRO — and the low-cost ver-sion for private use called EWB LayoutPersonal Edition (price £299). The latter

version has slightly reduced function-ality (fewer footprints, max. 500 pins,and only one autorouter). These threeversions are shortly to be comple-mented with an Educational version.All prices are exclusive of VAT.

(985065-1)

In the UK and Ireland, contact AdeptScientific plc, 6 Business Centre West,Avenue One, Letchworth, Hertford-shire SG6 2HB. Tel: (01462) 480055, fax:(01462) 480213. Email:[email protected]. Internet:http://www. adeptscience.co.uk.

61Elektor Electronics 10/98

Page 38: 418/433-MHz field- strength meter

62 Elektor Electronics 10/98

Page 39: 418/433-MHz field- strength meter

V.

9119008 - 11

TO -92

SOIL

v. E voE A022100

00 E 07.900 90

GNo E NC

NC HO CONNECT IN.13

A1322100

T

SIGNAL OUTPUT DIRECT TO ADC

lkil

? -50°C TO 4.150°C

01pF

REFERENCE

ANALOG TO DIGITAL

CONVERTER

INPUT

15100512 V

#

AD22100

Integrated CircuitsA-D Converters DATASHEET 10/98

65E

lektor Electronics

10/98

DATASHEET 10/98

CS8412

Integrated CircuitsSpecial Applications, Audio

AD22100*Voltage Output Temperature Sensor with SignalConditioning

ManufacturerAnalog Devices, One Technology Way, P.O. Box9106, Norwood, MA 02062-9106, U.S.A. Home-page: www.analog.com

Features200°C Temperature SpanAccuracy better than ±2% of Full ScaleLinearity better than ±1% of Full ScaleTemperature Coefficient of 22.5 mV/°COutput Proportional to Temperature x V+Single Supply OperationReverse Voltage ProtectionMinimal Self HeatingHigh Level, Low Impedance Output

ApplicationsHVAC SystemsSystem Temperature CompensationBoard Level Temperature SensingElectronic Thermostats

MarketsIndustrial Process ControlInstrumentationAutomotive

Application ExamplePLC-87 Board, Elektor Electronics October 1998.

General DescriptionThe AD22100 is a monolithic temperature sensorwith on-chip signal conditioning. It can be operatedover the temperature range –50°C to +150°C, mak-ing it ideal for use in numerous HVAC, instrumenta-tion and automotive applications.The signal conditioning eliminates the need for anytrimming, buffering or linearization circuitry, greatlysimplifying the system design and reducing the over-all system cost.The output voltage is proportional to the temperaturetimes the supply voltage (ratiometric). The output

swings from 0.25 V at –50°C to +4.75 V at +150°Cusing a single +5.0 V supply.Due to its ratiometric nature, the AD22100 offers acost-effective solution when interfacing to an ana-logue-to-digital converter. This is accomplished byusing the ADC’s +5 V power supply as a referenceto both the ADC and the AD22100 (See Figure 2),eliminating the need for and cost of a precision refer-ence.

* Protected by U.S. Patent Nos. 5030849 and5243319.

Figure 1. Simplified block diagram.

Figure 2. Application Circuit.

Pin ConfigurationsTO-92SOIC

CS8412Digital Audio Interface Receiver

ManufacturerCirrus Logic, Inc. Crystal Semiconductor ProductsDivision, P.O. Box 17847, Austin, Texas 78760,U.S.A. Homepage: www.crystal.com.

Features• Monolithic CMOS receiver• Low-jitter, on-chip clock recovery, 256x Fs outputclock provided• Supports: AES/EBU, IEC958, S/PDIF, & EIAJ CP-340 professional and consumer formats• Extensive error reporting

- repeat last sample on error option• On-chip RS422 line receiver

Application ExampleDigital Clipping Indicator, Elektor Electronics October1998.

DescriptionThe CS8412 is a monolithic CMOS device whichreceives and decodes audio data according to theAES/EBU, IEC958, S/PDIF & EIAJ CP-340 interfacestandards. The CS8412 receives data from a trans-mission line, recovers the clock and synchronisationsignals, and de-multiplexes the audio and digitaldata. Differential or single-ended inputs can bedecoded.The CS8412 de-multiplexes the channel, user, andvalidity data directly to serial output pins with dedi-cated output pins for the most important channelstatus bits. Audio data is output through a config-urable serial port that supports 14 formats. Thechannel status and user data have their own serialpins and the validity flag is OR’ed with the ERF flagto provide a single pin, VERF, indicating that theaudio output may not be valid. This pin may be usedby interpolation filters that provide error correction.Pin Descriptions

Power Supply ConnectionsVD+ Positive Digital Power, pin 7.Positive supply for the digital section. Nominally

+5 volts.

VA+ Positive Analog Power Supply, pin 22.Positive supply for the analogue section. Nominally+5 volts.

DGND Digital Ground, pin 8.Ground for the digital section. DGND should be con-nected to the same ground as AGND.

AGND Analog Ground, pin 21.Ground for the analogue section. AGND should beconnected to the same ground as DGND.

Audio Output InterfaceSCK Serial Clock, pin 12.Serial clock for SDATA pin which can be configured(via the M0, M1, M2 and M3 pins) as an input oroutput, and can sample data on the rising or fallingedge. As an output, SCK will generate 32 clocks forevery audio sample. As an input, 32 SCK periods peraudio sample must be provided in all normal modes.

FSYNC Frame Sync, pin 11.Delineates the serial data and may indicate the par-ticular channel, left or right, and may be an input oroutput. The format is based on M0, M1, M2 and M3pins.

SDATA Serial Data, pin 26.Audio data serial output pin.

M0, M1, M2, M3Serial Port Mode Select, pins 23, 24, 18, 17.

Selects the format of FSYNC and the sample edge ofSCK with respect to SDATA. M3 selects betweeneight normal modes (M3=0) and six special modes(M3=1).

Control PinsVERF Validity + Error Flag, pin 28.A logical OR’ing of the validity bit from the receiveddata and the error flag. May be used by interpolationfilters to interpolate through errors.

Page 40: 418/433-MHz field- strength meter

+5V cfiggal

0.1 uF

+59 analog 0.1 uF

22 7 = VA+ VD+ MCK

AGM] VERF

SCK RXP BEATA

19

28 Audio

Data Processor

2

Receiver Circuit

26

(See Appendix A) 10 FSYNC11 RXN - CS84123

CS12/FCK M ro Channel Status C controller

and/or 5

SEL 14 Or

Error/Frequency ERF Logic 15 Reporting

C / E.F bits CBL

20 DGN0

1 k n

0.047 uF _L

OILIWO-115

#

DATASHEET 10/98

66E

lekt

or E

lect

roni

cs10

/98

DATASHEET 10/98

AD22100

Integrated CircuitsA-D Converters

CS8412

Integrated CircuitsSpecial Applications, Audio

U User Bit, pin 14.Received user bit serial output port. FSYNC may beused to latch this bit externally.

C Channel Status Output, pin 1.Received channel status bit serial output port.FSYNC may be used to latch this bit externally.

CBL Channel Status Block Start, pin 15.The channel status block output is high for the firstfour bytes of channel status and low for the last16 bytes.

SEL Select, pin 16.Control pin that selects either channel status infor-mation (SEL=1) or error and frequency information(SEL=0) to be displayed on six of the following pins.

C0, Ca, Cb, Cc, Cd, CeChannel Status Output Bits, pins 2-6, 27.

These pins are dual function with the ‘C’ bits select-ed when SEL is high. Channel status information isdisplayed for the channel selected by CS12. C0,which is channel status bit 0, defines professional(C0=0) or consumer (C0=1) mode and furthercontrols the definition of the Ca-Ce pins. These pinsare updated with the rising edge of CBL.

CS12 Channel Select, pin 13.This pin is also dual function and is selected bybringing SEL high. CS12 selects sub-frame 1 (whenlow) or sub-frame 2 (when high) to be displayed bychannel status pins C0 and Ca through Ce.

FCK Frequency Clock, pin 13.Frequency clock input that is enabled by bringingSEL low. FCK is compared to the received clock fre-quency with the value displayed on F2 through F0.Nominal input value is 6.144 MHz.

E0, E1, E2 Error Condition, pins 4-6.Encoded error information is enabled by bringingSEL low. The error codes are prioritized and latchedso that the error code displayed is the highest levelof error since the last clearing of the error pins.

Clearing is accomplished by bringing SEL high formore than 8 MCK cycles.

F0, F1, F2 Frequency Reporting Bits, pins 2-3, 27.Encoded sample frequency information that isenabled by bringing SEL low. A proper clock on FCKmust be input for at least two thirds of a channel sta-tus block for these pins to be valid. They are updatedthree times per block, starting at the block boundary.

ERF Error Flag, pin 25.Signals that an error has occurred while receiving theaudio sample currently being read from the serialport. Three errors cause ERF to go high: a parity orbiphase coding violation during the current sample,or an out of lock PLL receiver.

Receiver InterfaceRXP, RXN Differential Line Receivers, pins 9, 10.RS422 compatible line drivers.

Phase Locked LoopMCK Master Clock, pin 19.Low jitter clock output of 256 times the receivedsample frequency.

FILT Filter, pin 20.An external 1kΩ resistor and 0.047-µF capacitor arerequired from the FILT pin to analog ground.

Ordering GuideModel/Grade Guaranteed Temperature Range Package Description Package Option

AD221001 KT 0ºC to 100ºC TO-92 TO-92

AD22100 KR 0ºC to 100ºC SOIC SO-8

AD22100 AT –40ºC to +85ºC TO-92 TO-92

AD22100 AR –40ºC to +85ºC SOIC SO-8

AD22100 ST –50ºC to +150ºC TO-92 TO-92

AD22100 SR –50ºC to +150ºC SOIC SO-8AD22100 Chips +25ºC N/A N/A

Specifications (TA = +25ºC and V+ = +4V to +6V unless otherwise noted)

AD22100K AD22100A AD22100S

Parameter Min Typ Max Min Typ Max Min Typ Max Units

TRANSFER FUNCTION VOUT = (V+/5 V) x [1.375V + (22.5mV/ºC) x TA )

TEMPERATURE COEFFICIENT (V+/5 V) x 22.5 mV/ºC

TOTAL ERROR

Initial Error TA = +25ºC ±0.5 ±2.0 ±1.0 ±2.0 ±1.0 ±2.0 ºC

Error over Temperature

TA = TMIN ±0.75 ±2.0 ±2.0 ±3.7 ±3.0 ±4.0 ºC

TA = TMAX ±0.75 ±2.0 ±2.0 ±3.0 ±3.0 ±4.0 ºC

Nonlinearity

TA = TMIN to TMAX 0.5 0.5 0.5 % FS1

OUTPUT CHARACTERISTICS

Nominal Output Voltage

V+ = 5.0 V, TA = 0ºC 1.375 V

V+ = 5.0 V, TA = +100ºC 3.625 V

V+ = 5.0 V, TA = –40ºC 0.475 V

V+ = 5.0 V, TA = +85ºC 3.288 V

V+ = 5.0 V, TA = –50ºC 0.250 V

V+ = 5.0 V, TA = +150ºC 4.750 V

POWER SUPPLY

Operating Voltage +4.0 +5.0 +6.0 +4.0 +5.0 +6.0 +4.0 +5.0 +6.0 V

Quiescent Current 500 650 500 650 500 650 µA

TEMPERATURE RANGE

Guaranteed Temperature Range 0 +100 –40 +85 –50 +150 ºC

Operating Temperature Range –50 +150 –50 +150 –50 +150 ºC

PACKAGE TO-92, SOIC TO-92, SOIC TO-92, SOIC1 FS (Full Scale) is defined as that of the operating temperature range, –50ºC to +150ºC. The listed max. specification limit applies to the guaranteed temperaturevrange. For

example, the AD22100K has a nonlinearity of (0.5%) x (200ºC) = 1ºC over the guaranteed temperature range of 0ºC to 100ºC.CS8412, Typical Connection Diagram

Page 41: 418/433-MHz field- strength meter

Microsoft Windows looks poised to reign supreme asthe operating system for PCs used at home and inthe small office. Competition is weak, other manu-facturers having given up or left the market after ashort death struggle. And yet, there is hope. An ope-rating system called Linux appears to be a goodalternative for Windows. In stark contrast with MicrosoftWindows, Linux is the fruit of own users.

Linux a Windowsalternative?Red Hat Linux 5.1 with simplified installationThe rapid evolution of the personalcomputer (PC) over the past fifteenyears or so was not just due to sensa-tional hardware developments, butalso to the availability of complex soft-ware. In this way, the PC slowly becamethe user-friendly machine for a galaxyof applications.

Today, the Windows operating sys-tem is used on more than 90% of all

Eile Edit View Rockmart. Tool Cache Options Help

S'H t 'UT) rxe TB

Ifile:/hornagatuebben/

PCs in the world. Actually, that is a posi-tive point because a single operatingsystem (or 'platform') promotes thecompatibility of software, and urgeshardware manufacturers to developand supply Windows drivers for theirproducts. On the other hand, competi-tion keeps the market alive. Unfortuna-tely, there are not many suppliers ofgraphics user interfaces (we're not tal-

Desktop/ Export/ Mail/ IJSEMIX/

canonical/ important/

axhorne/

Wel mat 2f Background I Colors Screensaver I Style I

resume/ Muff/ t /

11sffnatif TeX1Re(Cand randsessoc survey tex

dvl

Settings

Wait: F- min

r Requires Password

Priority

High Low

Figure 1. KDE is a typical Linux window manager.

Screen Saver

LaserLines

king about Mac computers here, asthey represent a different category).Gone are the days when advanced PCusers could mention four or five sup-pliers of DOS systems!

Fortunately, there are a few alterna-tives left. Of these, Linux is probably thebest known. But why go for anotheroperating system than Windows? Twoimportant reasons can be mentioned:first, Linux is much cheaper than Win-dows (including the associated appli-cations); second, Linux is much morestable than Windows 95/98 or NT, andthat is why many Internet servers andnetwork computers run under Linux.

What is Linux?For years, Unix has been among themost popular operating systems for lar-ger computer systems. Unix has slowlybecome available for almost any typeof processor, and is marked by itsmodular structure, and the fact that it isalmost entirely written in C. These twoaspects make it easy to extend ormodify Unix as required.

In 1991, Linus Torvalds from Finlandwrote a simple computer operating sys-tem resembling Unix. He based his workon Minix, which was fairly well known atthe time, and called it Linux.

Over the past couple of years, thou-sands of programmers around theglobe worked on improving and exten-ding Linux. As we write this, Linux is an

2 - 10/98 Elektor Electronics EXTRA TOP/CS

The rapid evolution of the personalcomputer (PC) over the past fifteenyears or so was not just due to sensa-tional hardware developments, butalso to the availability of complex soft-ware. In this way, the PC slowly becamethe user-friendly machine for a galaxyof applications.

Today, the Windows operating sys-tem is used on more than 90% of all

PCs in the world. Actually, that is a posi-tive point because a single operatingsystem (or ‘platform’) promotes thecompatibility of software, and urgeshardware manufacturers to developand supply Windows drivers for theirproducts. On the other hand, competi-tion keeps the market alive. Unfortuna-tely, there are not many suppliers ofgraphics user interfaces (we’re not tal-

king about Mac computers here, asthey represent a different category).Gone are the days when advanced PCusers could mention four or five sup-pliers of DOS systems!

Fortunately, there are a few alterna-tives left. Of these, Linux is probably thebest known. But why go for anotheroperating system than Windows? Twoimportant reasons can be mentioned:first, Linux is much cheaper than Win-dows (including the associated appli-cations); second, Linux is much morestable than Windows 95/98 or NT, andthat is why many Internet servers andnetwork computers run under Linux.

What is Linux?For years, Unix has been among themost popular operating systems for lar-ger computer systems. Unix has slowlybecome available for almost any typeof processor, and is marked by itsmodular structure, and the fact that it isalmost entirely written in C. These twoaspects make it easy to extend ormodify Unix as required.

In 1991, Linus Torvalds from Finlandwrote a simple computer operating sys-tem resembling Unix. He based his workon Minix, which was fairly well known atthe time, and called it Linux.

Over the past couple of years, thou-sands of programmers around theglobe worked on improving and exten-ding Linux. As we write this, Linux is an

2 - 10/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

Microsoft Windows looks poised to reign supreme asthe operating system for PCs used at home and inthe small office. Competition is weak, other manu-facturers having given up or left the market after ashort death struggle. And yet, there is hope. An ope-rating system called Linux appears to be a goodalternative for Windows. In stark contrast with MicrosoftWindows, Linux is the fruit of own users.

Linux — a Windowsalternative?Red Hat Linux 5.1 with simplified installation

Figure 1. KDE is a typical Linux window manager.

Page 42: 418/433-MHz field- strength meter

up-to-date computer operating systemwith support for lots of different hard-ware products. Meanwhile, there areLinux versions for many different com-puters, including Intel -compatible PCs,and Alpha and Sun SPARC workstations.

You may wonder what makes Linuxso fascinating that lots of programmersaround the world keep contributing toit. The most likely answer is that Linus Tor-valds insisted on the price tag for Linux:free of charge. In practice, this wasarranged by means of so-called GNUpublic licencing. Although all modulesthat make up Linux, as well as all appli-cations, may be sold at cost by anycompany or programmer, they arealways obliged to supply the sourcecode files with the product. Next, theusers of these products are free tomake modifications to the program, orextend it, and offer the result to others.

It is almost incredible that an extre-mely complex software application likean operating system can be made byso many people working at differentlocations around the globe. Thanks tothe global communication possibilitiesoffered by the Internet, organisedgroups of programmers mainly con-centrate on the larger parts of the ope-rating system. Even if programs are onlyin an early beta stage, they are madeavailable so that other Linux users canhelp to improve and debug the pro-gram.

To keep things in control, Linus stillhas the final say about any importantchange to the kernel (i.e., the softwarecore of Linux).

Several distribution points may befound on the Internet where the Linuxoperating system may be downloadedfree of charge. Although there arecompanies that will make a charge fortheir distributing Linux on CD-ROM, theprice is either modest, or largely deter-mined by the printed manual and theamount of support the user is entitled toreceive.

You may wonder what 'distribution'entails. Because Linux is basically a col-lection of small programs and modules,it is pretty hard for the average user toassemble these into a fully workingLinux system. A Linux distribution is aprogram package with an installationsection that ensures that the rightmodules, settings and programs endup on your PC. In the past, the complexstructure of Linux was a serious stum-bling block for many computer userswishing to experiment with this interes-ting operating system. That situation hasbeen improved considerably, and thecurrent distributions are so good thatthey are capable of automatically

Applcati2n 174p -tang, PPP

Reply to sender...

P..e/us/Aank/polp/0999/s..F.,

'F.!0*rt4s.19P,...:tdf.1,031 t. 205 112 1,2 105,

0.3

OM 100AMP, P IMEP KA

11%

MILE/ ,41.-

Figure 2. The Afterstep desktop not only looks impressive, it is also easy to use.

recognising nearly all computer com-ponents during the installation. In fact,a minimum amount of user action isrequired to arrive at a correctly workingsystem. Some of the best known distri-butions include Red Hat Linux, CalderaOpen Linux, Debian GNU/Linux andS.u.S.E. Linux.

X -windowsInside the Linux fraternity, the need wasfelt to have a graphics user interfacewhich was comparable to MicrosoftWindows. The result was the X -windowssystem developed in co-operation withDEC and the MIT. The aim was to createa graphic system which was equip-ment- as well as system -independent,freeing the programmer from the bur-den of ensuring that his/her program becompatible with any system or hard-ware. In the mean time, X11 has evol-ved into a global standard.

In addition to this basic system, anumber of other window managerswere developed. Running under X11,they take care of all display and dis-play updating functions. Some of thebetter known are Motif, Open Look,Fvwm95 and KDE. The latter in particu-lar has become pretty popular lately,the final version, 1.0, being availableas we write this. KDE offers nearly allfeatures Windows users have grownaccustomed to, and that is, of course,crucial for any PC owner contempla-ting the move from Windows to Linux.

ApplicationsGood as an operating system may be,it is worthless without application pro-grams. During the past couple of years,a large number of fine programs werewritten for Linux. For example, all utilitiesyou need to set up an Internet servercome free of charge with almost anydistribution. However, if we look at 'ordi-nary' programs for use by everyone,the choice is limited because Linux ismainly used by people with a basicinterest in programming and othertechnical matters. These days, officecomputer users have grown accusto-med to the luxury and ease of use ofprogram suites like Microsoft Office. For-tunately, Linux is also developing intothat direction. There are already acouple of good Office -like packageslike Applixware Office Suite and StarOffice. The latter is even free of chargeand very well suited to home andSOHO use.

The Canadian company Corel hasannounced Linux versions of an incre-asing number of its products, whileWordPerfect Corp. products are alre-ady available. Of course, we shouldnot forget to mention that NetscapeCommunicator is available in a Linuxversion. This is crucial for the very back-bone of Linux: communication usingthe Internet.

PC games written to run under Linuxare few and far between. Apparently,there are no PC game makers as yetwilling to develop Linux-compatibleproducts, probably because of the

PC Topics Elektor Electronics EXTRA 3 - 10/98

up-to-date computer operating systemwith support for lots of different hard-ware products. Meanwhile, there areLinux versions for many different com-puters, including Intel-compatible PCs,and Alpha and Sun SPARC workstations.

You may wonder what makes Linuxso fascinating that lots of programmersaround the world keep contributing toit. The most likely answer is that Linus Tor-valds insisted on the price tag for Linux:free of charge. In practice, this wasarranged by means of so-called GNUpublic licencing. Although all modulesthat make up Linux, as well as all appli-cations, may be sold at cost by anycompany or programmer, they arealways obliged to supply the sourcecode files with the product. Next, theusers of these products are free tomake modifications to the program, orextend it, and offer the result to others.

It is almost incredible that an extre-mely complex software application likean operating system can be made byso many people working at differentlocations around the globe. Thanks tothe global communication possibilitiesoffered by the Internet, organisedgroups of programmers mainly con-centrate on the larger parts of the ope-rating system. Even if programs are onlyin an early beta stage, they are madeavailable so that other Linux users canhelp to improve and debug the pro-gram.

To keep things in control, Linus stillhas the final say about any importantchange to the kernel (i.e., the softwarecore of Linux).

Several distribution points may befound on the Internet where the Linuxoperating system may be downloadedfree of charge. Although there arecompanies that will make a charge fortheir distributing Linux on CD-ROM, theprice is either modest, or largely deter-mined by the printed manual and theamount of support the user is entitled toreceive.

You may wonder what ‘distribution’entails. Because Linux is basically a col-lection of small programs and modules,it is pretty hard for the average user toassemble these into a fully workingLinux system. A Linux distribution is aprogram package with an installationsection that ensures that the rightmodules, settings and programs endup on your PC. In the past, the complexstructure of Linux was a serious stum-bling block for many computer userswishing to experiment with this interes-ting operating system. That situation hasbeen improved considerably, and thecurrent distributions are so good thatthey are capable of automatically

recognising nearly all computer com-ponents during the installation. In fact,a minimum amount of user action isrequired to arrive at a correctly workingsystem. Some of the best known distri-butions include Red Hat Linux, CalderaOpen Linux, Debian GNU/Linux andS.u.S.E. Linux.

X-windowsInside the Linux fraternity, the need wasfelt to have a graphics user interfacewhich was comparable to MicrosoftWindows. The result was the X-windowssystem developed in co-operation withDEC and the MIT. The aim was to createa graphic system which was equip-ment- as well as system-independent,freeing the programmer from the bur-den of ensuring that his/her program becompatible with any system or hard-ware. In the mean time, X11 has evol-ved into a global standard.

In addition to this basic system, anumber of other window managerswere developed. Running under X11,they take care of all display and dis-play updating functions. Some of thebetter known are Motif, Open Look,Fvwm95 and KDE. The latter in particu-lar has become pretty popular lately,the final version, 1.0, being availableas we write this. KDE offers nearly allfeatures Windows users have grownaccustomed to, and that is, of course,crucial for any PC owner contempla-ting the move from Windows to Linux.

ApplicationsGood as an operating system may be,it is worthless without application pro-grams. During the past couple of years,a large number of fine programs werewritten for Linux. For example, all utilitiesyou need to set up an Internet servercome free of charge with almost anydistribution. However, if we look at ‘ordi-nary’ programs for use by everyone,the choice is limited because Linux ismainly used by people with a basicinterest in programming and othertechnical matters. These days, officecomputer users have grown accusto-med to the luxury and ease of use ofprogram suites like Microsoft Office. For-tunately, Linux is also developing intothat direction. There are already acouple of good Office-like packageslike Applixware Office Suite and StarOffice. The latter is even free of chargeand very well suited to home andSOHO use.

The Canadian company Corel hasannounced Linux versions of an incre-asing number of its products, whileWordPerfect Corp. products are alre-ady available. Of course, we shouldnot forget to mention that NetscapeCommunicator is available in a Linuxversion. This is crucial for the very back-bone of Linux: communication usingthe Internet.

PC games written to run under Linuxare few and far between. Apparently,there are no PC game makers as yetwilling to develop Linux-compatibleproducts, probably because of the

PC TOPICS —————————————— Elektor Electronics EXTRA 3 - 10/98

Figure 2. The Afterstep desktop not only looks impressive, it is also easy to use.

Page 43: 418/433-MHz field- strength meter

Figure 3. The new Red Hat Linux version 5.1 is easy to install, also for beginners.

enormous cost. None the less, the PCgaming market has a tremendouspotential. Maybe this situation willchange for the better in the near future.

Drivers are essential for the propercontrolling of all kinds of peripheraldevices. Although there are suitableLinux drivers for most standard equip-ment around, you should not expecthave instant access to a driver for thevery latest model of, say, a laser printer.This requires (1) a Linux user willing andable to develop the driver, and (2) amanufacturer willing to part with allinformation necessary for this to bedone. In the mean time, you will haveto make do with a standard driver.

Corel estimates the total number ofLinux users at about 7 million. Most usersappear to be in the USA, although Ger-many and the UK also have a fair num-ber.

Getting started with LinuxAlthough there are many enthusiasticstories about Linux in the computerpress, an unsuspecting Windows 95user moving to Linux is sure to feel leftout in the dark initially, and has to dis-cover that the lights will not come onuntil a vast amount of Linux literaturehas been studied (complete hand-books are available on the Internet).

The migration from Windows to Linuxmay be compared to a Windows userforced to sit in front of a Macintoshcomputer. Despite a certain similarity inthe graphics 'shell' and the mouse con-

trol, the change is radical, requiringquite some getting used to.

After the installation of Linux, which isquite simple thanks to the modern dis-tributions (we will revert to this below),the computer is restarted, and a kind ofDOS prompt appears on the screen asyou may remember it from 10 yearsago. The obvious question is then: whatdo I do now?

Linux has a very extensive commandset, but all commands have differentnames than under DOS. What's more,they have a different effect, and lots ofextra options. So it would seem wise tohave a list of frequently used com-mands available.

The strict network structure of Linuxwill strike single users as very odd. Thereis no way to avoid logging on to thesystem. Depending on your status as auser you are allowed to make use ofcertain features. Obviously, as the soleuser of the PC you can double as thesystem operator (called 'root' in Linux),who has access to all levels.

The DOS/Windows user will also haveto get used to the totally different struc-ture of his/her PC. All drive (station) let-ters have disappeared, and there is justone directory tree which includes ever-ything (hard disks, CD-ROM drives,floppy disk stations, etc.). Moreover,removable media like floppy disks andCD-ROMs have to be dealt with in aquite different way. Because Linuxemploys a cache memory for all avai-lable storage media, you will have toinform the system when, for instance, a

CD-ROM is removed from the CD-ROMdrive. This is done by means of a'mount' and 'u(n)mount' command.

If you would like to work in a moreWindows -like environment, that is fairlysimple to achieve. By means of a Startcommand (usually startx), X -Windows islaunched, and most tasks can be car-ried out using the mouse, as you lear-ned to do under Windows.

Some thought is also required whenswitching off a PC running Linux.Because the cache has to be emptiedfirst, and all running programs properlyterminated, it is necessary to run theshutdown command before you actu-ally switch off the PC. Fortunately, thekeyboard combination CTRL -ALT -DEL nolonger causes the computer to be resetjust like that. After pressing this key com-bination, Linux first closes all applica-tions and then tells you that the PC canbe switched off.

Red Hat Linux 5.1To illustrate the installation of Linux, wedecided to use the latest version 5.1from the American company Red Hat.This particular distribution is known for itssimple installation.

Red Hat Linux is available in differentversions. There is, for example, a set ofsix CD-ROMs (Red Hat Power Tools) forabout £20 containing the latest RedHat Linux version for different proces-sors, all source code files and a largenumber of Linux applications. Docu-mentation is not supplied in book formbut as a file on the CD-ROMs.

If you are new to Linux, it may bebetter to obtain the CD-ROM set withhandbook, a number of bonus pro-grams and extensive support, all at theprice of about £30. The book providesgood coaching with the installation ofLinux, while support (by email) for thesame installation is available for aperiod of 90 days. A separate diskmakes installing Linux very easy.

First you have to ensure that a harddisk partition of 0.5 Mbytes is availablefor Linux. This is required because Linuxemploys its own file system (although aDOS partition may be used, this willcause Linux to be slowed down). Don'tworry about what will happen to Win-dows, because the relevant part on thehard disk remains untouched as longas you do not change the partitioningsystem.

After booting the PC from floppy disk(or direct from the CD-ROM), all maincomponents that make up your PC are,in principle, identified by the installationprogram. Next, you are taken througha number of menus in which to choose

4 - 10/98 Elektor Electronics EXTRA - TOP/CS

enormous cost. None the less, the PCgaming market has a tremendouspotential. Maybe this situation willchange for the better in the near future.

Drivers are essential for the propercontrolling of all kinds of peripheraldevices. Although there are suitableLinux drivers for most standard equip-ment around, you should not expecthave instant access to a driver for thevery latest model of, say, a laser printer.This requires (1) a Linux user willing andable to develop the driver, and (2) amanufacturer willing to part with allinformation necessary for this to bedone. In the mean time, you will haveto make do with a standard driver.

Corel estimates the total number ofLinux users at about 7 million. Most usersappear to be in the USA, although Ger-many and the UK also have a fair num-ber.

Getting started with LinuxAlthough there are many enthusiasticstories about Linux in the computerpress, an unsuspecting Windows 95user moving to Linux is sure to feel leftout in the dark initially, and has to dis-cover that the lights will not come onuntil a vast amount of Linux literaturehas been studied (complete hand-books are available on the Internet).

The migration from Windows to Linuxmay be compared to a Windows userforced to sit in front of a Macintoshcomputer. Despite a certain similarity inthe graphics ‘shell’ and the mouse con-

trol, the change is radical, requiringquite some getting used to.

After the installation of Linux, which isquite simple thanks to the modern dis-tributions (we will revert to this below),the computer is restarted, and a kind ofDOS prompt appears on the screen asyou may remember it from 10 yearsago. The obvious question is then: whatdo I do now?

Linux has a very extensive commandset, but all commands have differentnames than under DOS. What’s more,they have a different effect, and lots ofextra options. So it would seem wise tohave a list of frequently used com-mands available.

The strict network structure of Linuxwill strike single users as very odd. Thereis no way to avoid logging on to thesystem. Depending on your status as auser you are allowed to make use ofcertain features. Obviously, as the soleuser of the PC you can double as thesystem operator (called ‘root’ in Linux),who has access to all levels.

The DOS/Windows user will also haveto get used to the totally different struc-ture of his/her PC. All drive (station) let-ters have disappeared, and there is justone directory tree which includes ever-ything (hard disks, CD-ROM drives,floppy disk stations, etc.). Moreover,removable media like floppy disks andCD-ROMs have to be dealt with in aquite different way. Because Linuxemploys a cache memory for all avai-lable storage media, you will have toinform the system when, for instance, a

CD-ROM is removed from the CD-ROMdrive. This is done by means of a‘mount’ and ‘u(n)mount’ command.

If you would like to work in a moreWindows-like environment, that is fairlysimple to achieve. By means of a Startcommand (usually startx), X-Windows islaunched, and most tasks can be car-ried out using the mouse, as you lear-ned to do under Windows.

Some thought is also required whenswitching off a PC running Linux.Because the cache has to be emptiedfirst, and all running programs properlyterminated, it is necessary to run theshutdown command before you actu-ally switch off the PC. Fortunately, thekeyboard combination CTRL-ALT-DEL nolonger causes the computer to be resetjust like that. After pressing this key com-bination, Linux first closes all applica-tions and then tells you that the PC canbe switched off.

Red Hat Linux 5.1To illustrate the installation of Linux, wedecided to use the latest version 5.1from the American company Red Hat.This particular distribution is known for itssimple installation.

Red Hat Linux is available in differentversions. There is, for example, a set ofsix CD-ROMs (Red Hat Power Tools) forabout £20 containing the latest RedHat Linux version for different proces-sors, all source code files and a largenumber of Linux applications. Docu-mentation is not supplied in book formbut as a file on the CD-ROMs.

If you are new to Linux, it may bebetter to obtain the CD-ROM set withhandbook, a number of bonus pro-grams and extensive support, all at theprice of about £30. The book providesgood coaching with the installation ofLinux, while support (by email) for thesame installation is available for aperiod of 90 days. A separate diskmakes installing Linux very easy.

First you have to ensure that a harddisk partition of 0.5 Mbytes is availablefor Linux. This is required because Linuxemploys its own file system (although aDOS partition may be used, this willcause Linux to be slowed down). Don’tworry about what will happen to Win-dows, because the relevant part on thehard disk remains untouched as longas you do not change the partitioningsystem.

After booting the PC from floppy disk(or direct from the CD-ROM), all maincomponents that make up your PC are,in principle, identified by the installationprogram. Next, you are taken througha number of menus in which to choose

4 - 10/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

Figure 3. The new Red Hat Linux version 5.1 is easy to install, also for beginners.

Page 44: 418/433-MHz field- strength meter

adittne armee

sysconfea uucp

the keyboard, language, etc. After anumber of other prompts you arrive atthe partitioning section. Two options areavailable: the fairly Spartan 'fdisk' (thesame name as used for the DOS pro-gram) and the more extensive DiskDruid written by Red Hat. The latter pro-gram has a very clear structure. Youindicate where Linux is to sit by creatinga couple of Linux partitions in a freesection of the hard disk. The minimumpartitions you have to make are a swappartition (say, 50 MB), a root partition (/)for configuration files etc., and a userpartition (/usr) for all other software. Theuser partition obviously takes up the lar-gest part of the available disk space.

Once the marked partitions havebeen formatted, a list appears showingprograms that have to be installed. Themain programs have been activatedalready, and Windows users will find itworthwhile to select all X -window pro-grams. Initially, you will not need any ofthe 'development' software - this maybe added at a later time. Once theselections have been made, the com-puter is busy for a few minutes installingall programs.

Next, the installation programdetects the mouse type connected tothe PC, whereupon a configurationmodule is started for the Xfree86 server,the Windows -like program. Most grap-hics cards are automatically recogni-sed, but you have to enter the highestrefresh frequencies for the monitor your-self. If autodetection is not successful,then there is always the possibility ofdoing the settings by hand.

Fil

1110 Netscape: Untitled

After the network configuration,which is not normally required for singleusers, the clock is set. Then the servicesare set that Linux has to launch auto-matically. Finally, you are asked to lookat the printer setting and selection.

The next action on your part is ente-ring a password for the root - this isnecessary to be able to enter the Linuxsystem as the main user, after the ope-rating system has started.

The next part of the installation is cru-cial because it involves the bootmanager and the Linux start programcalled LILIO (Linux Loader). This programis normally written to the root sector ofthe hard disk, and enables the user tochoose between different operatingsystems which may be available on thehard disk.

For instance, the LILO may be confi-gured so that Linux is automatically star-ted a few minutes after the PC is powe-red up. If, during that period, you type,say, 'win' (or any other name you mayhave entered in LILO), Windows will belaunched. So, depending on what youwant to do on the computer, you canmake your selection and start the ope-rating system you feel is better suited tothe task on hand.

Finally, then, the moment has comefor the PC to be restarted. After a fewdozen messages on the screen theLinux version appears, and you areprompted to log on. For the impatientamong you, we will tell what to do wit-hout too much reading in the manual:type 'root' to log on, and then enter thepassword you supplied during the

File Edit View Go Co unicato

.

Back Froward Reload Home Search Guide Print Security Stop

Bookmarks Location tetunrii/trizme.08eucsippi.ozss/

Members. WebMail ." Connection rre BizJournal I SmartUpdate "Mkt lace

Folder Vie

etc

EILDEII cron.darr cron.hourn cronmonthly crop .weeklyLEL] ELL

default logrotate d mail 11,11,1 pared pomoia

LDPPP profiled rcc security skel ernrshLEE

vgz

allaves.db

kerliernertreet brit. Neuf Ilnueennf

758551 bytes In 97 Items

DIP COLORS HOSTNAME

AL deny basbrc

of modulo

uttrr

irrphelp

User Mount Tool

Directory Device Type

frrintitdrom Alowicdrom iso9660 Mount I Format

=I, 171 p ideeffdlil vtal Linri61 Formal

Het

-541t-Display 24/8 Bit Algorithms

Root Windows Image Size

Load

Save

Print

0 files

9800270 image. 8-bit mode, Got all 69 colors.

I EiA

O I cAutoCrop

tAbout XV

Grab

Quit

AO Start! SI Netscape Un ...1The GIMP 4 User Mount T Applications IA File Manager 1,408v 31Cia(PN I lAlxv controls Mon Au tint 17 14102

Figure 4. The window -manager FVWM2 is supplied standard with Red Hat Linux.

installation. Once you are 'in' the sys-tem, you can type commands orlaunch programs.

As you will soon find out, a number ofthings have to be configured at thispoint, and you even have to reportyourself the system as an ordinary user.All this, and more, you will easily findout for yourself after using Linux forsome time, and, of course, reading themanual. (Ex -)Windows users will like toknow that the command 'startx' takesthem to the X -Windows level of Linux.

We reckon none of this is too difficultfor the reasonably advanced compu-ter user. Once you know what to enterwith the various menus that pop upduring the installation, the total confi-guration will take less than half an hour.

The new Red Hat Linux distribution ismarked by a superb installation proce-dure during which most hardware isautomatically recognised. Even inex-perienced users will be able to installLinux, provided he/she sticks to logicalthinking. The manual is a fine product,and much more extensive than the onesupplied with version 5.0. It provides astep-by-step description of the installa-tion procedure, comes up with lots ofuseful tips for beginners and advancedusers. There are also notes on importantmatters like Glint, Control Panel andRPM. Furthermore there is an overviewof all programs that come with this dis-tribution of Linux, as well as an 'FAQ'reference section listing frequentlyasked questions and answers. Finally,should you remain stuck with a problemyou are unable to solve, help is availa-ble from a team of specialists at RedHat (but only if you have the versionwith 90 -days support).

In conclusion, Elektor Electronicsreaders who like to experiment with PCsand change lots of system settings arewell advised to have a serious look atthe Linux operating system. Linux repre-sents a totally different world with agalaxy of possibilities!

(982072-1)

PC Topics Elektor Electronics EXTRA 5 - 10/98

the keyboard, language, etc. After anumber of other prompts you arrive atthe partitioning section. Two options areavailable: the fairly Spartan ‘fdisk’ (thesame name as used for the DOS pro-gram) and the more extensive DiskDruid written by Red Hat. The latter pro-gram has a very clear structure. Youindicate where Linux is to sit by creatinga couple of Linux partitions in a freesection of the hard disk. The minimumpartitions you have to make are a swappartition (say, 50 MB), a root partition (/)for configuration files etc., and a userpartition (/usr) for all other software. Theuser partition obviously takes up the lar-gest part of the available disk space.

Once the marked partitions havebeen formatted, a list appears showingprograms that have to be installed. Themain programs have been activatedalready, and Windows users will find itworthwhile to select all X-window pro-grams. Initially, you will not need any ofthe ‘development’ software — this maybe added at a later time. Once theselections have been made, the com-puter is busy for a few minutes installingall programs.

Next, the installation programdetects the mouse type connected tothe PC, whereupon a configurationmodule is started for the Xfree86 server,the Windows-like program. Most grap-hics cards are automatically recogni-sed, but you have to enter the highestrefresh frequencies for the monitor your-self. If autodetection is not successful,then there is always the possibility ofdoing the settings by hand.

After the network configuration,which is not normally required for singleusers, the clock is set. Then the servicesare set that Linux has to launch auto-matically. Finally, you are asked to lookat the printer setting and selection.

The next action on your part is ente-ring a password for the root — this isnecessary to be able to enter the Linuxsystem as the main user, after the ope-rating system has started.

The next part of the installation is cru-cial because it involves the bootmanager and the Linux start programcalled LILIO (Linux Loader). This programis normally written to the root sector ofthe hard disk, and enables the user tochoose between different operatingsystems which may be available on thehard disk.

For instance, the LILO may be confi-gured so that Linux is automatically star-ted a few minutes after the PC is powe-red up. If, during that period, you type,say, ‘win’ (or any other name you mayhave entered in LILO), Windows will belaunched. So, depending on what youwant to do on the computer, you canmake your selection and start the ope-rating system you feel is better suited tothe task on hand.

Finally, then, the moment has comefor the PC to be restarted. After a fewdozen messages on the screen theLinux version appears, and you areprompted to log on. For the impatientamong you, we will tell what to do wit-hout too much reading in the manual:type ‘root’ to log on, and then enter thepassword you supplied during the

installation. Once you are ‘in’ the sys-tem, you can type commands orlaunch programs.

As you will soon find out, a number ofthings have to be configured at thispoint, and you even have to reportyourself the system as an ordinary user.All this, and more, you will easily findout for yourself after using Linux forsome time, and, of course, reading themanual. (Ex-)Windows users will like toknow that the command ‘startx’ takesthem to the X-Windows level of Linux.

We reckon none of this is too difficultfor the reasonably advanced compu-ter user. Once you know what to enterwith the various menus that pop upduring the installation, the total confi-guration will take less than half an hour.

The new Red Hat Linux distribution ismarked by a superb installation proce-dure during which most hardware isautomatically recognised. Even inex-perienced users will be able to installLinux, provided he/she sticks to logicalthinking. The manual is a fine product,and much more extensive than the onesupplied with version 5.0. It provides astep-by-step description of the installa-tion procedure, comes up with lots ofuseful tips for beginners and advancedusers. There are also notes on importantmatters like Glint, Control Panel andRPM. Furthermore there is an overviewof all programs that come with this dis-tribution of Linux, as well as an ‘FAQ’reference section listing frequentlyasked questions and answers. Finally,should you remain stuck with a problemyou are unable to solve, help is availa-ble from a team of specialists at RedHat (but only if you have the versionwith 90-days support).

In conclusion, Elektor Electronicsreaders who like to experiment with PCsand change lots of system settings arewell advised to have a serious look atthe Linux operating system. Linux repre-sents a totally different world with agalaxy of possibilities!

(982072-1)

PC TOPICS —————————————— Elektor Electronics EXTRA 5 - 10/98

Figure 4. The window-manager FVWM2 is supplied standard with Red Hat Linux.

Page 45: 418/433-MHz field- strength meter

Atm el's AT90S1200 AVR-RISC 8 -bit RISC processor has been available for so m etime now, and is generally recognised as a very fast device. The price, too, isgood at less than £3 even in the hobby market. So, substituting a couple of logicICs (and their sockets) by an AVR device may already pay off. The most interestingaspect of this processor is, however, that it features a serial interface with directaccess to the on -chip memory. The general concept of the AVR processor wasalready discussed in our January 1998 magazine. The present article aims atshowing some m ore practical applications of the 90S1200, using easy to obtainhardware and software.

Design by Dr. M. Ohsmannn

AVR-RISC evaluationsystem (1)

experim ent with Atm el's latestRISC processors

To give its new AVR processor family ahead start, Atmel has made quite a fewsoftware utilities available free ofcharge on their web site. There is, for

instance, a complete assembler (forDOS as well as Windows) and a simula-tor. The relevant datasheets and soft-ware documentation are also free for

downloading. So, if you want to famil-iarise yourself with these new processorswithout committing yourself to hard-ware for the time being, our advice is

6 - 10/98 Elektor Electronics EXTRA PC Topics

To give its new AVR processor family ahead start, Atmel has made quite a fewsoftware utilities available free ofcharge on their web site. There is, for

instance, a complete assembler (forDOS as well as Windows) and a simula-tor. The relevant datasheets and soft-ware documentation are also free for

downloading. So, if you want to famil-iarise yourself with these new processorswithout committing yourself to hard-ware for the time being, our advice is

6 - 10/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

Atmel’s AT90S1200 AVR-RISC 8-bit RISC processor has been available for sometime now, and is generally recognised as a very fast device. The price, too, isgood at less than £3 even in the hobby market. So, substituting a couple of logicICs (and their sockets) by an AVR device may already pay off. The most interestingaspect of this processor is, however, that it features a serial interface with directaccess to the on-chip memory. The general concept of the AVR processor wasalready discussed in our January 1998 magazine. The present article aims atshowing some more practical applications of the 90S1200, using easy to obtainhardware and software.

Design by Dr. M. Ohsmannn

AVR-RISC evaluationsystem (1)

experiment with Atmel’s latest RISC processors

Page 46: 418/433-MHz field- strength meter

to go to www.atmel.com, where you willfind lots of interesting stuff, including

- an assembler for the Atmel AVR fam-ily;- a simulator for the AVR family;- example programs illustrating:

simple arithmetic EEPROM use

Evaluation systemAtmel also has available a demonstra-tion board and the associated controlsoftware. Unlike the above mentionedsoftware and documentation, thismaterial is not free of charge. BecauseElektor Electronics magazine constantlyaims at addressing the active (i.e., sol-dering) electronics enthusiast, westarted to develop our own experi-menting system for the AVR-RISCprocessors. The circuit diagram is

shown in F igure 1. Actually, the circuitconsists of no more than a six-fold (hex)Schmitt trigger which translates the sig-nals at the serial PC-RS232 interfaceinto levels that can be processed byprocessor’s serial interface, which is nei-ther RS232 compatible nor asynchro-nous. Then there is a switch thatenables you to change from ‘‘softwaredownload’’ to ‘‘run program’, and aquartz crystal or crystal oscillator mod-ule which generates the processorclock signal. If you foresee applicationsrequiring high accuracy (for example,frequency or time measurements), thebest choice is the oscillator module (fit-ted in a socket). In that case, only theoscillator IC1 is mounted, while X1, C1and C2 are simply omitted. With lesscritical applications, a simple crystal is,of course, the more economicaloption. If you intend to program lots ofprocessors, then it is advisable to use a

ZIF (zero-insertion force) socket. That’s it!Because of the simplicity of the circuit,it may even be built on a piece of ver-oboard or general-purpose stripboard.A more elegant solution is, however, touse the PCB shown in F igure 2.

Serial download utilityTo enable programs generated by theAtmel Assembler to be loaded into theprocessor, you need special downloadsoftware. Because the author wasunable to find a suitable program onthe Atmel web site, he came up with hisown solution. The resulting program andits source code file (written in Pascal) isavailable on a disk with order code986020-1. This disk, and the softwarepicked from the Atmel web site thenforms a complete package, and youare ready to get started.

Example programsA good way to learn about micro-processor programming is to test fullyfunctional programs, and then modifyand extend them. In case of newlyreleased processors, the decisive fac-tor is often whether or not a supply ofready-made ‘modules’ is available.Such modules may relieve you from theburden of writing, say, your own char-acter input/output routines, to mentionbut one example. The project disk con-tains a fair number of such modules(see Tab le 1), which should help tounburden beginners, allowing them toconcentrate on more essential mattersin the learning process. Unfortunately,a full discussion of all modules on thedisk is beyond the scope of this article.Those of you who are interested in theprogramming details are referred to thecommented source code files on thedisk, and to the file XAVR.DOC whichpresents an overview of available pro-grams, complete with concise descrip-tions and application examples. In thisarticle, we present just a few of themany ideas that may be realized usingthe AT90S1200. Our aim is to pick outthose applications in which speed is thedecisive factor. After all, a fast beastlike the AVR-RISC processor is by nomeans required to switch a lamp onand off every few seconds! You will notfind such applications in this article. Bycontrast, you will learn, for instance,how various clock signals may bederived from a 10 MHz source. Such anapplication is surely too much to ask ofan 8051, while the AT90S120 can man-age!

PC TOPICS ——————————————— Elektor Electronics Extra 7 - 10/98

NC

PD0

XTAL2

PD2(INT0)

PD4(TO)

GND

(AIN0)PB0

PB2

PB4

NC

PD1

XTAL1

PD3

PD5

PD6

(AIN1)PB1

PB3

(MOSI)PB5

(SCK)PB7

Vcc

NC

NC

K1

10

11

12 13

14

15

16

17

18

19

20

21

22

23

241

2

3

4

5

6

7

8

9

OE1

OUT5

Vdd.8

GND4

IC1SG531P

12.0000MHz

X1

12MHzC2

22p

C1

22p

/RESET

T

PB7

PB6

PB5

PB4

PB3

PB2

PB1

PB0JP1

JP2

JP3

R24

1k

R1

10k

R3

1k

R4

5k6

R7

1k

R8

1k

9 81

IC2d

13121

IC2f

11101

IC2e

R61

00

kR12

10

0k

R13

10

0k

R10

10k

R9

1k

R11

10k

K2

1

2

3

4

5

6

7

8

9

561

IC2c

341

IC2b

121

IC2aR2

10

0k

R5

10k

S1 PROG/RUN

ISP/RS232

R14

20k

R16

20k

R15

10

k

R18

20k

R17

10

k

R20

20k

R19

10

k

R22

20k

R21

10

k

R23

20

k

PB0

PB4

PB3

PB2

PB1

DAC

1%

1%

1%

1%

1%

1%

1%

1%

1%

1%

PB0 PB1 PB2 PB3 PB4

K3

10

1

2

3

4

5

6

7

8

9

FC10HB

PB7

PB6

PB5

PB4

PB3

PB2

PB1

PB0

C5

100n

C7

100n

IC2

14

7

C6

100n

7805IC3

C3

100µ25V

C4

10µ10V

R25

1k

D2

D1

1N4001

K49...15V

IC2 = 74HC14

980082-11

(MISO)PB6

PB6

PB5

PB7

5V

5V

5V

5V

5V

Figure 1. Circuit diagram of the AVR evaluation system.

Page 47: 418/433-MHz field- strength meter

One instruction every 66ns:applicationsTne AT90S1200 may be operated at aclock frequency of up to 16 MHz.Because most instructions are executedwithin a single clock pulse, it is possibleto execute instructions at a rate of16 million per second. So, if you want acertain routine to be executed one mil-lion times in one second, the relevantprogram section may have a length of10 to 16 instructions. Using this numberof instructions quite a lot can be done.Of course, at the hardware level only,who can imagine a Windows programwith a length of just a few tens of bytes?

A really fast processor may often beused when economising on the num-ber of digital ICs while the speed is notso high as to necessitate the use ofexpensive programmable logic. Thegreat thing about such a microcon-troller is that you have access to anarmy of registers, and to an accumu-lator capable of doing sums! Those ofyou who have ever attempted to makeprogrammable logic do simple calcu-lations will appreciate this facility.

AT90S1200: a quickoverviewMainly because of its RISC architecture,the structure of the AT90S1200 proces-sor remains wonderfully simple. F i g-u re 3 provides and overview. The sec-tion we are particularly interested in isan array of 30 8-bit registers that maybe used to perform calculations andstore results. Then there are two

input/output ports (Port B and Port D) ofwhich each pin is individually address-able as an input or an output. Programexecution runs under the control of thecentral clock frequency which may beany value between 0 and 16 MHz. Inaddition, there is an interrupt controlsystem and a small 8-bit timer/counter.The complete description of theAT90S1200 covers about 50 pages,

8 - 10/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

(C) E

LEK

TOR

980082-1

(C) ELEKTOR

980082-1

C1

C2

C3

C4

C5

C6

C7

D1

D2

H1

H2

H3

H4

IC1

IC2

IC3

JP1

JP2

JP3

K1

K2

K3

K4

R1R2

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

R13

R14R15R16R17R18R19R20R21R22R23

R24

R25

S1

X1

DACB

4B

3B

2B

1B

0T

TT

T

980082-1

PROG

RUN

Table A

; semicolon used as comment delimiter

.def sum=20 ; use .def to assign symbolic names to registersmov r2,r3 ;copy contents of register R3 to R2ldi r17,r123 ;load register r17 with 123add r20,r21 ; register r20 becomes sum r20+r21adc r20,r21 ; register r20 becomes sum r20+r21+carrysbi PORTB,2 ; set port B line 2clr r27 ; clear r20 to 0brne loop ; jump to loop when not zerosbrs r20,2 ; skip if bit in register set

; skip next instruction when bit 2 of r20 is set

Figure 2. Single-sided printed circuit board (available ready-made).

Page 48: 418/433-MHz field- strength meter

and interested readers are stronglyadvised to obtain it from the Internet orthe local Atm el distributor. For now, afew programming examples to getused to the AVR controller:

Simple digital wordgeneratorBecause the AT90S1200 is capable ofworking at any clock frequencybetween 0 Hz (static operation) and16 MHz, it is perfect for use as a gener-ator for complex signal patterns, allbased on just one central clock fre-quency. Normally, such a generator isbuilt using counter modules anddecoders, and the resulting circuit canbecome quite complex because a lotof additional components may beneeded to keep the effect of glitchesunder control. At frequencies below16 MHz is it, however, perfectly possibleto employ a RISC processor. For exa m -p le, the pulse pattern shown in Fig-ure 4 is created with the aid of the pro -

COMPONENTS LIST

Resistors:

R1,R5,R10,R11 = 10k52

R2,R6,R12,R13 = 100k52

R3,R7,R8,R9,R24,R25 = 1k52

R4 = 5kS26

R14,R16,R18,R20,R22,R23 = 20k52 1%

R15,R17,R19,R21 = 10k521%

Capacitors:01,C2 = 22pF ceramic (see text)

C3 = 100,11F 25V radial

C4 = 10µF 10V radialC5,C6,C7 = 100nF ceramic

Semiconductors:D1 = 1N4001D2 = LED red high efficiency101 = SG531P12.0000MHz EPSON(Eurodis), see text102 = 74H014103 = 7805

Miscellaneous:X1 = 12MHz see textK1 = 24 -way Aries 0.3-0.6inch (Farnell)JP1,JP2,JP3 = 2 -way jumper51 = slide switch, lx changeover, PCBmountK2 = 9 -way SUB -D socketK3 = 10 -way boxheader (optional)K4 = mains adapter socket, PCB mountPCB: order code 980082-1, see ReadersServices page.Disk: order code 986020-1, see ReadersServices page.

vcc

-L-GNO

XTALI XTAL2

8-EIT DATA BUS

,41

PROGRAMCOUNTER

PROGRAMFLASH

4-

INSTRUCTION

STACKPOINTER

11

1

1

HARDWARESTACK

INSTRUCTIONDECODER

CONTROLLINES

-1.GENERALPURPOSE

REGISTERS

z

ALU

STATUSREGISTER

INTERNALOSCILLATOR

WATCHDOGTIMER

1

OSCILLATOR

MCU CONTROLREGISTER

TIMIPRAONLDC

TIMER/COUNTER

INTERRUPTUNIT

EEPROM

PROGRAMMINGLOGIC

SPI

DATA REGISTERPORTS

y/ratttDATA DIR.

REG. PORTS

PORTS DRIVERS

DATA REGISTERPORTD

:11112.1

DATA DIR.REG. PORTD

.1.!1111PORTD DRIVERS

Figure 3. Atm el AT90S1200 processor architecture.

BO

B1

B2

17 18

1 2

19

3

20 21

4 5 6

V s'

POD - P06

7 8 9

980082-12

10

980082-13

RESET

Figure 4. Because of its speed, the Atm el controller is capable of generating complexdigital patterns at freq uenc ies well over 10 MHz.

Pa Topic,s Elektor Electronics Extra 9 - 10/98

and interested readers are stronglyadvised to obtain it from the Internet orthe local Atmel distributor. For now, afew programming examples to getused to the AVR controller:

Simple digital wordgenerator

Because the AT90S1200 is capable ofworking at any clock frequencybetween 0 Hz (static operation) and16 MHz, it is perfect for use as a gener-ator for complex signal patterns, allbased on just one central clock fre-quency. Normally, such a generator isbuilt using counter modules anddecoders, and the resulting circuit canbecome quite complex because a lotof additional components may beneeded to keep the effect of glitchesunder control. At frequencies below16 MHz is it, however, perfectly possibleto employ a RISC processor. For exam-ple, the pulse pattern shown in F i g-ure 4 is created with the aid of the pro-

PC TOPICS ——————————————— Elektor Electronics Extra 9 - 10/98

COMPONENTS LIST

Resistors:R1,R5,R10,R11 =10kΩR2,R6,R12,R13 =100kΩR3,R7,R8,R9,R24,R25 =1kΩR4 = 5kΩ6R14,R16,R18,R20,R22,R23 =20kΩ 1%R15,R17,R19,R21 = 10kΩ 1%

Capacitors:C1,C2 = 22pF ceramic (see text)C3 = 100µF 25V radialC4 = 10 µF 10V radialC5,C6,C7 = 100nF ceramic

Semiconductors:D1 = 1N4001D2 = LED red high efficiencyIC1 = SG531P12.0000MHz EPSON(Eurodis), see textIC2 = 74HC14IC3 = 7805

Miscellaneous:X1 = 12MHz see textK1 = 24-way Aries 0.3-0.6inch (Farnell)JP1,JP2,JP3 = 2-way jumperS1 = slide switch, 1x changeover, PCBmountK2 = 9-way SUB-D socketK3 = 10-way boxheader (optional)K4 = mains adapter socket, PCB mountPCB: order code 980082-1, see ReadersServices page.Disk: order code 986020-1, see ReadersServices page.

1 2 3 4 5 6 7 8 9 10

17 18 19 20 21

B0

B1

B2

980082-13

Figure 4. Because of its speed, the Atmel controller is capable of generating complexdigital patterns at frequencies well over 10 MHz.

Figure 3. Atmel AT90S1200 processor architecture.

Page 49: 418/433-MHz field- strength meter

PC TOPICS——————————————— Elektor Electronics Extra 11 - 10/98

6 clock cycles, and then wait exactly428376233 cycles for the game tocommence again. All you need for thisfunction is a counter capable of keep-ing track of the necessary number ofclock cycles. Four registers in theprocessor, spanning a total width of32 bits, and a couple of additioninstructions are sufficient for this pur-pose. No soldering is required when thenumber of cycles has to be changedfor whatever reason. All you have to dois change a few constants in the pro-gram, and that’s it. This kind of flexibil-ity is simply not available in traditionalwired logic, and very expensive in pro-grammable logic (in particular, devel-opment tools).

The collection of example programsfound on the project diskette includesa simple pattern generator that readsits pattern information from the serialinterface (via XPATGEN2.EXE and XPAT-GEN2.PAT).

(980082-1)

Next month’s second and final instal-ment will continue with programmingexamples including frequency dividers,numerically controlled oscillators(NCOs), time measurement and fre-quency measurement.

PC programs

SER90 program download utility for evaluation board. Pascal source code file included on disk.

V24COM V24 serial communication program. Pascal source code file included on disk.

AVRASM.EXE AVR assembler (DOS version). Included by courtesy of Atmel UK.

AT90S1200 example programs

F i le Function

XSEROUT1 output characters via RS232, 9600 bits/s

XHEXOUT1 output registers via RS232, hex format

XHEXOUT2 output all 32 registers (dump) via RS232

XDECOUT1 output 24-bit values (0-16777215), decimal format, via RS232

XSERIN Input characters via RS232, 9600 bits/s

XFMES1 frequency measurement up to 5 MHz, 1s gate, RS232 output, decimal, at 9600 bits/s

XTMES1 time measurement, 1 ms to 8 s, 0.5 ms resolution, RS232 output, 9600 bits/s

XNCO1 numerically controlled oscillator, output 77.5 kHz using 12 MHz crystal

XNCO2 numerically controlled sawtooth generator, programmable via RS232

XFRQDIV1 divide by N scaler, N programmable via RS232

XPATGEN1 simple 8-channel pattern generator

XPATGEN2 simple 8-channel pattern generator, patterns adjustable via RS232

XDIV625 divide by 625 scaler, non-overlapping pulses

Figure 5

; XPATGEN1.ASM; simple pattern generator

.include “1200def.inc”

ldi r16,$0FF ; set output B to totem-poleout DDRB,r16

ldi r17,0b0001 ; set patterns into registersldi r18,0b0010ldi r19,0b0100ldi r20,0b0110ldi r21,0b0010ldi r22,0b0000

LOOP: out PORTB,r17 ; output each register to PORTout PORTB,r18out PORTB,r19out PORTB,r20out PORTB,r21out PORTB,r22nop ; two extra cyclesnoprjmp LOOP ; this also takes 2 cycles

Table 1. Contents of the project disk(order code 986020-1).

Figure 5. This little program generates thepulse sequence shown in Figure 4.

gram listed in F igure 5(XPATGEN1.ASM). The program is shortand its operation boils down to loadingregisters r17 through r22 with thedesired signal combinations. Next, aloop is used to output the values onPort B at maximum speed. This programmay be modified in many ways. Forinstance, by including delay loops youcan create signals with very long peri-ods, which are timed at crystal accu-racy, or synchronous with the clock sig-nal. You should not find it too difficult tomodify the program so that the signalshape does not change during the first

Page 50: 418/433-MHz field- strength meter

Lots of advanced joystick units are available in the com-puter shops for pretty realistic control of various flight sim -ulatorprograms. Builders of model aircraft will fail toappreciate this approach, being used to the controlstic ks o n their R/C tra nsm itters. The circuit shown hereenables m odellers to continue using these transm ittersfor over -the -air control of a flight sim ulator running on aPC.

Design b y U. Ha rto g

R/C interface for PCflight simulatorTHE solution for the true modeller

Microsoft and other suppliers of PCperipherals have been successful atproducing joysticks whose 'feel' com espretty close to that of the control sticksin a real plane. In fact, the realism ofthese joysticks is such that the next thingPC g am ers will want is an imitationcockpit! Regrettably, that seems to be

a long shot aswe write this. For now, wewill have to content ourselveswith veryhigh quality joysticks like theSideWinder.

Over the years, model buildersaround the globe have grown accus-tomed to their own way of controllingaircraft: by control sticks that allow the

model to be flown in all directions.Unfortunately, the R/C modeller frater-nity is simply overlooked by the mar-keting departments of joystick manu-facturers. So, out of doors the R/C mod-eller controls his plane in a differentway than in front of the PC, and that, aswe see it, is not good if he wants toimprove his flying skills.

The circuit presented here canchange this undesirable situation. Thecircuit not only promotesthe use of thefamiliar control sticks, it also allows theflight sim ulator to be controlled over theair, that is, with the R/C transmitter inyour hands.

So put on your cap and your sun-g la sses, switch on your R/C transmitter,and take off...

InterfacingConverting the receiver unit normallyinstalled in the model in such a waythat it can be connected up to a PCrequires quite a few changes to theelectrical signals. After all, such a

receiver normally drives a set of servomotors with pulse -width modulated dig-ital signals. These signals, in turn, con-trol analogue actuators like the rudderand ailerons. The control of the PC isentirely different in this respect. Nor-mally, a pair of potentiometers is usedfor the analogue part of the control,

12 - 10/98 Elektor Electronics EXTRA Pa Topics

Microsoft and other suppliers of PCperipherals have been successful atproducing joysticks whose ‘feel’ comespretty close to that of the control sticksin a real plane. In fact, the realism ofthese joysticks is such that the next thingPC gamers will want is an imitationcockpit! Regrettably, that seems to be

a long shot as we write this. For now, wewill have to content ourselves with veryhigh quality joysticks like theSideWinder.

Over the years, model buildersaround the globe have grown accus-tomed to their own way of controllingaircraft: by control sticks that allow the

model to be flown in all directions.Unfortunately, the R/C modeller frater-nity is simply overlooked by the mar-keting departments of joystick manu-facturers. So, out of doors the R/C mod-eller controls his plane in a differentway than in front of the PC, and that, aswe see it, is not good if he wants toimprove his flying skills.

The circuit presented here canchange this undesirable situation. Thecircuit not only promotes the use of thefamiliar control sticks, it also allows theflight simulator to be controlled over theair, that is, with the R/C transmitter inyour hands.

So put on your cap and your sun-glasses, switch on your R/C transmitter,and take off…

InterfacingConverting the receiver unit normallyinstalled in the model in such a waythat it can be connected up to a PCrequires quite a few changes to theelectrical signals. After all, such areceiver normally drives a set of servomotors with pulse-width modulated dig-ital signals. These signals, in turn, con-trol analogue actuators like the rudderand ailerons. The control of the PC isentirely different in this respect. Nor-mally, a pair of potentiometers is usedfor the analogue part of the control,

12 - 10/98 Elektor Electronics EXTRA —————————————— PC TOPICS

Lots of advanced joystick units are available in the com-puter shops for pretty realistic control of various flight sim-ulator programs. Builders of model aircraft will fail toappreciate this approach, being used to the controlsticks on their R/C transmitters. The circuit shown hereenables modellers to continue using these transmittersfor over-the-air control of a flight simulator running on aPC.

Design by U. Hartog

R/C interface for PCflight simulatorTHE solution for the true modeller

Page 51: 418/433-MHz field- strength meter

and a number of digital signals for thefire buttons.For optimum control of the flight simu-lator, for instance, Microsoft Flight Sim-ulator 98, we need:

* Up* Down* Left* Right* Two ‘Fire’ buttons

Because each of these signals will haveto be applied to the PC gameport inanalogue and/or digital form, such aninterface will be unknown to modelbuilders. So, some electronics has beenthrown in to give the signals the propershape and level. The circuit is designedsuch that four digital signals can begenerated in addition to the usual fouranalogue signals. What more can thebudding pilot aspire to have?

Figure 1 shows how the analogue sig-nals are created. The digital servo sig-nal reaches the circuit and appears atthe inputs of IC1b and IC1a. The outputof IC1d supplies the buffered signal. Viaa monostable multivibrator consisting ofC2, R14, R15 and D1, this signal is usedto reset a counter type 4060. The resetinput of the 4060 is pulled high on therising edge of the input pulse. When themonotime has elapsed, the counter isenabled again. The component valuesin the monostable circuit result in areset pulse with a length of 1 ms.Although R15 allows the pulse length tobe accurately adjusted, it can be leftat mid-travel because this setting is notall that critical. All IC outputs are pulledlow during the reset pulse. However,when the input signal is at logic 1, bothinputs of IC1b are also at 1, so that theoscillator in the 4060 is enabled. Here,the oscillator operates at about200 kHz. No counting takes place, how-ever, as long as the reset input is acti-vated.

After the monotime of about 1 ms,the oscillator pulses are duly counted,and a 7-bit binary code appears at theoutput of IC2. In the quiescent state,when the pot is at mid-travel, the servopulse has a length of about 1.5 ms.Depending on the position of the con-trol stick on the transmitter, the pulselength varies between 1 ms and 2 ms.For the present circuit, the result is thatthe measurement is actually limited tothe parts of the servo pulse that arelonger than 1 ms.

The binary output code is convertedinto a direct voltage by a D/A converterbuilt from discrete components. Thecomponent values used here result in adirect output voltage range of 2 V to4 V. In practice, this can be relied uponto give adequate results. This variabledirect voltage simulates the signal atthe wiper of the pot fitted in a joystick.The oscillator may be halted by feed-ing back the digital output signal fromIC2 to IC1b. Disabling the oscillatormay sometimes be necessary when thediscriminator circuit is (yet) out of align-ment. If the setting is much shorter than1 ms, the counter can shoot past itshighest state causing the output volt-age to return from 4 V to 2 V — anunpredictable result. As soon ascounter state 96 is reached, the outputof IC1c drops low, and the oscillator ishalted. The output voltage remains‘frozen’ and the output remains stuck atthe high level of about 4 V. Once thecircuit is properly adjusted, this circuitwill not be actuated, and the oscillatorstops as soon as the servo pulse is over.The counter state remains frozen until a

PC TOPICS —————————————— Elektor Electronics EXTRA 13 - 10/98

R147k

R239k

R333k

R422k

R515k

R66k8

R72k2

R8

1k

5C3

10µ16V

T2

BC237

R9

33

k

8

910

IC1c

&

1

23

IC1a

&

5

64

IC1b

&

12

13

11

IC1d

&

R13

10

k

R10

10

0k

R11

100k

R12

39k

C1 10p

C2

100n

CTR14

IC2

4060

CT=0

RCX

10

11

12

15

13

14

11

13

12

CT

CX

RX

!G

1

6

4

5

7

9

3

4

5

6

7

8

9

3

2

+

D1

1N4148

R14

4k

7

10k

R15IC1

14

7

IC2

16

8

IC1 = 4093

982071-11

5V

5V

8

910

IC1c

&

1

23

IC1a

&

5

64

IC1b

&

12

13

11

IC1d

&

R13

10

k

R10

10

0k

R11

100k

R12

39k

C1 10p

C2

100n

CTR14

IC2

4060

CT=0

RCX

10

11

12

15

13

14

11

13

12

CT

CX

RX

!G

1

6

4

5

7

9

3

4

5

6

7

8

9

3

2

+

D1

1N4148

R14

4k

7

10k

R15IC1

14

7

IC2

16

8

IC1 = 40935V

5V

982071-12

D2

D3

D4R7

6k8

R6

6k8

T1

T2

R8

22

k

R5

22

k

R9

2k

2

R4

2k

2C7

10µ16V

C8

10µ16V

LED1 LED2

2

1

C4

100n

T1, T2 = BC558B

3 x 1N4148

Figure 1. Circuit diagram of the interface designed to convert servo signals into an ana-logue signal whose level and timing can be recognised by the gameport on the PC.

Figure 2. The Fire buttons are also simulated. This circuit is a bit simpler than that of theanalogue interface, mainly because it has no D-A converter.

Page 52: 418/433-MHz field- strength meter

Figure 3. Copper track layout of the analogue interface board. This board contains all electronics to simulate four potentiom eters (twocontrol sticks). Board not available ready-made.

new servo pulse appears at the input.A kind of feedback is also applied in

the interface that generatesthe digitaloutput pulses (Figure 2). At a servopulse length of 1 ms, output 1 is acti-vated, or output 2 with longer pulses.Here, too, the pulse length needs to beexamined. When the reset time of 1 ms

has elapsed , the counter startsto oper- the author. One board is reserved fortheate again. The first 15 clock pulses analogue section, and one board forthehave no effect on the outputs con- digital section. The coppertrack layoutsnected to diodes D2, D3 and D4. The and component overlays of the ana-output level of IC1c isthen high, and T2 logue board are shown in Figure 3,is switched off. Transistor T1, on the other those of the digital board, in Figure 4.hand, is allowed to conduct, and LED Making your own PCB from this artworkD1 lights up. If a counter state between should not be too difficult if you have the

16 and 31 is right equipment and tools.reached, the base The completed boards may beof T1 is pulled high assembled in a sandwich constructionvia D2. Both T1 to make a compact unit.and T2 are then The construction we think should notoff, and neither of cause too many problems, mainlythe two fire buttons because there are no critical sub-cir-is active. When the cuits. Simply fit all the parts in acco r -counter state dance with the component overlaybecomes 96 or and set the presetsto the centre of theirhigher, both inputs travel. Because the PCB layout is prettyof IC1c are logic dense, you have to work carefully andhigh, allowing T2 use a solder iron with a small tip. Noteto start conduct- that the corn ponents are consecutivelying. The second numbered on the PCB. The first ana-fire button is then logue interface contains componentsactive. In this sim- as used in the circuit diagram. The sec-ple manner, the and one has an extra '2' before eachtolerances in the component reference number. Likewisepulse lengths are for interfaces3 and 4, which have a '3'ironed out. and a '4' affixed, respectively.

It will be clear that the value of R1 is

the same as that of R21, R31 and R41.This method of numbering the parts isalso applied with the digital interface.

Printed cir-cuit boardBuilding this projectismade pretty easyby the PCBdesignssubmitted to us by

Ten wiresThe circuit does not need a separate

14 - 10/98 Elektor Electronics EXTRA PC Topics

new servo pulse appears at the input.A kind of feedback is also applied in

the interface that generates the digitaloutput pulses (Figure 2). At a servopulse length of 1 ms, output 1 is acti-vated, or output 2 with longer pulses.Here, too, the pulse length needs to beexamined. When the reset time of 1 ms

has elapsed, the counter starts to oper-ate again. The first 15 clock pulseshave no effect on the outputs con-nected to diodes D2, D3 and D4. Theoutput level of IC1c is then high, and T2is switched off. Transistor T1, on the otherhand, is allowed to conduct, and LEDD1 lights up. If a counter state between

16 and 31 isreached, the baseof T1 is pulled highvia D2. Both T1and T2 are thenoff, and neither ofthe two fire buttonsis active. When thecounter statebecomes 96 orhigher, both inputsof IC1c are logichigh, allowing T2to start conduct-ing. The secondfire button is thenactive. In this sim-ple manner, thetolerances in thepulse lengths areironed out.

Printed cir-cuit boardBuilding this projectis made pretty easyby the PCB designssubmitted to us by

the author. One board is reserved for theanalogue section, and one board for thedigital section. The copper track layoutsand component overlays of the ana-logue board are shown in F igure 3,those of the digital board, in Figure 4.Making your own PCB from this artworkshould not be too difficult if you have theright equipment and tools.

The completed boards may beassembled in a sandwich constructionto make a compact unit.

The construction we think should notcause too many problems, mainlybecause there are no critical sub-cir-cuits. Simply fit all the parts in accor-dance with the component overlayand set the presets to the centre of theirtravel. Because the PCB layout is prettydense, you have to work carefully anduse a solder iron with a small tip. Notethat the components are consecutivelynumbered on the PCB. The first ana-logue interface contains componentsas used in the circuit diagram. The sec-ond one has an extra ‘2’ before eachcomponent reference number. Likewisefor interfaces 3 and 4, which have a ‘3’and a ‘4’ affixed, respectively.

It will be clear that the value of R1 isthe same as that of R21, R31 and R41.This method of numbering the parts isalso applied with the digital interface.

Ten wiresThe circuit does not need a separate

14 - 10/98 Elektor Electronics EXTRA —————————————— PC TOPICS

Figure 3. Copper track layout of the analogue interface board. This board contains all electronics to simulate four potentiometers (twocontrol sticks). Board not available ready-made.

Page 53: 418/433-MHz field- strength meter

Figure 4. Copper track layout of the digital interface board. Board not available read y -m a d e.

power supply because its supply volt-age may be 'stolen' from the gameport on the PC. So, make sure you havetwo extra wires available in the con-necting cable, and tap the necessarysupply voltage from the port. The pinallocation of the gameport connectorshown in Fig u re 5 will help you find therelevant signals and voltages.

The servo connections on thereceiver module may be wired directlyto the corresponding inputs on theinterface board. No new connectorshave to be bought, or wires cut.

Depending on the number of channelssupported by the transmitter/receivercombination, a total of four fire buttonsand four analogue outputs are avail-able. On the board, the outputs areclearly labelled, so that the necessaryelectrical connections are quickly andeasily made.

Figure 5. Pinout of the 15 -way gam eportconnector on your PC. Use this diagramas a reference to connect up the inter-faces.

Ladies and gentle-men this is your captainspeaking. We areready for take -off. Onbehalf of the crew: wewish you a pleasantflight.

1 +5V

2 D4

3 AO

4 GND

5 GN

AlD5

+5V

9 +5V

10 D6

11 A212 GND

13 A314 D7

15 +5V

(982071-1)

982071 -13

PC Topic,s Ele kto r Electronics EXTRA 15 - 10/98

power supply because its supply volt-age may be ‘stolen’ from the gameport on the PC. So, make sure you havetwo extra wires available in the con-necting cable, and tap the necessarysupply voltage from the port. The pinallocation of the gameport connectorshown in Figure 5 will help you find therelevant signals and voltages.

The servo connections on thereceiver module may be wired directlyto the corresponding inputs on theinterface board. No new connectorshave to be bought, or wires cut.

Depending on the number of channelssupported by the transmitter/receivercombination, a total of four fire buttonsand four analogue outputs are avail-able. On the board, the outputs areclearly labelled, so that the necessaryelectrical connections are quickly andeasily made.

PC TOPICS —————————————— Elektor Electronics EXTRA 15 - 10/98

Figure 4. Copper track layout of the digital interface board. Board not available ready-made.

Figure 5. Pinout of the 15-way gameportconnector on your PC. Use this diagramas a reference to connect up the inter-faces.

Ladies and gentle-men this is your captainspeaking. We areready for take-off. Onbehalf of the crew: wewish you a pleasantflight.

(982071-1)

Page 54: 418/433-MHz field- strength meter

Tape stream ers are used not only to secure data, sys-tem software, but also to transfer large files from onecom puter to another. This article describes a simpleadapter that allows an internal tape streamer unit tobe used as an external back-up device. The adapterem ploys a modified slot bracket and the PC's inter-nal floppy disk controller.

Based on an Idea by H. Flohr

external port for tapestreamerconnects to floppy -disk controller

External backup devices are not onlyharder to obtain than their internalcounterparts, but also more expensive.What's more, they are usually slowerthan internal versions, mainly becausedata to be copied to and from thetape travels by way of the parallel(printer) port. If it is no longer possible tofit an internal tape drive in a PC, youmay want to consider fitting the unit inan empty floppy -disk drive case, anduse the streamer as an external unit.This solution is economical, quick andstraig htforward , althoug h it does require

eft

a direct connection to the floppy diskcontroller unit.

Our reader Mr. Flohr came up withan equally simple and practicablesolution. He suggests using a slotbracket in which a clearance is cut thatallows a 34 -way flatcable to bepassed. The flatcable is fitted with con-nectors at both ends. At the side of thebracket, a connector with a flange isused, and at the controller side, onewithout a flange. The connectors sup-plied by 3M are perfectly suitable forthis application.

The coupling connector on thebracket leaves sufficient room for thepower supply plug. Unfortunately, weare not aware of disk drive power plugswith a flange, so that this assembly willhave to be secured by a small supportbracket, or suitable glue. Alternatively,a completely different plug/socketcombination may be employed.Whichever system you decide to use,make sure it is effectively polarized toprevent wrong connections with disas-trous results!

(982061-1)

16 - 10/98 Elektor Electronics EXTRA PC-Topics

External backup devices are not onlyharder to obtain than their internalcounterparts, but also more expensive.What’s more, they are usually slowerthan internal versions, mainly becausedata to be copied to and from thetape travels by way of the parallel(printer) port. If it is no longer possible tofit an internal tape drive in a PC, youmay want to consider fitting the unit inan empty floppy-disk drive case, anduse the streamer as an external unit.This solution is economical, quick andstraightforward, although it does require

a direct connection to the floppy diskcontroller unit.

Our reader Mr. Flohr came up withan equally simple and practicablesolution. He suggests using a slotbracket in which a clearance is cut thatallows a 34-way flatcable to bepassed. The flatcable is fitted with con-nectors at both ends. At the side of thebracket, a connector with a flange isused, and at the controller side, onewithout a flange. The connectors sup-plied by 3M are perfectly suitable forthis application.

The coupling connector on thebracket leaves sufficient room for thepower supply plug. Unfortunately, weare not aware of disk drive power plugswith a flange, so that this assembly willhave to be secured by a small supportbracket, or suitable glue. Alternatively,a completely different plug/socketcombination may be employed.Whichever system you decide to use,make sure it is effectively polarized toprevent wrong connections with disas-trous results!

(982061-1)

16 - 10/98 Elektor Electronics EXTRA —————————————— PC-TOPICS

Tape streamers are used not only to secure data, sys-tem software, but also to transfer large files from onecomputer to another. This article describes a simpleadapter that allows an internal tape streamer unit tobe used as an external back-up device. The adapteremploys a modified slot bracket and the PC’s inter-nal floppy disk controller.

Based on an Idea by H. Flohr

external port for tapestreamerconnects to floppy-disk controller