ELEKTOR ELECTRONICS PVT LTD. 52. C Proctor Road Bombay - 400 007 INDIA Telex: (Oil) 76661 ELEK IN Electronics Technology Electronics Technology Its master's voice 3.19 The razor edge of the excimer laser 3.25 Field-effect optocoupler 3.37 Projects Digital sine-wave generator 3.21 VLF add-on unit for oscilloscopes 3.27 ROM/RAM card for Electron plus One 3.32 Software for the BBC computer-3 3 35 Micro-squeaker 3 36 Battery saver 3.39 MSX extensions 4 3.40 The Junior Computer as a frequency counter 3.45 In car ioniser 3.47 Information News • News • News • 3.16 Junior Computer facts 3.46 New products 3.58 Infosheet 3.67 Licences & letters of intent 3.70 Guide lines Switch board 3.63 Classified ads 3.74 Index of advertisers 3.74 Corrections 3.74 Selex-21 Charging /Discharging 3.60 Phase-shift 3.52 Simple dimmer 3.54 Half wattage dimmer 3 56 Introducing THE MEMBRANE KEYBOARD CONSTRUCTION OF OUR MEMBRANE KEYBOARDS Membrane Keyboards offer higher reliability, more durability, greater customer appeal, and lower cost Xow available indigenously in Rigid and Flexible types with or without tactile feedback to custom designs Contact us for further information at CONTROL DEVICES 243 Madhani Estate, Senapati Dapat Marg, Dadar (West), Bombay - 400 028 Tel: (022) 422 2636 422 1682 AVAILABLE EX STOCK COMPUTER PERIPHERALS S. MEDIA PRODUCTS RANGE OF GODREJ PRINTERS S. EPSON DOT MATRIX PRINTERS PHILIPS FLOPPY DRIVES RANGE OF SMPS CONNECTORS KEY BOARDS FOR PC-XT & AT SET OF CARDS FOR PC/XT S. AT MONITORS-MONOCHROME S. COLOUR RANGE OF PRINTER RIBBONS RANGE OF FLOPPY DISKETTES (IMPORTED) CABINETS FOR PC/XT & AT GENERAL ELECTRONIC ITEMS ARE ALSO AVAILABLE WITH US MAINTENANCE /REPAIRS OF SMPS/OPM/DMM UNDERTAKEN ABC ELECTRONICS 339/65 RAJESH BUILDING. 1 ST FLOOR. OPP. POLICE STATION LAMINGTON ROAD, BOMBAY - 400 007 Ph. 38 61 78 Telex - 01 1 -76393 GENE IN 87 3-07 r (? test / iiM/ij P^Mj/yn/: _ LUXCO r— Range of ‘TV’ speakers Teweeters And Flat Cone Woofers □ Manufactured by ' Distributors for Maharashtra. LUXCO Electronics Suiarat and South India Allahabad -211 003 □ Sole Selling Agents LUXMI & CO 56. Johnstonganj Allahabad - 21 1 003 • Chotani Building. 52. Proctor Road. Phone 54041 telex 540-286 Grant Road (East). Bombay-400 001 □ Distributors for Delhi & Haryana Phones 367459 369478 Rallton Electronics • • ■•mpattan Street. Mount Road. Radio Place ChandniChov* Modros-600 002. Phone: 842718 Delhi-110 006 Phone 239944, 233187 sound technology from a sound source precious COLOR T V PEAKERS TYPE/piMENSION MM INCHES WAR COMPATIBLE . 8x13 LCT 3/5 78x118 |3Yx4 :i 3W/5W CONTEC/TOSHIBA 10x15LCT6-0 104x150 |4"x61 6W GRUNOIG/PHILLIPS 10 LCT 3 101x104 (4 "x4 | 3 W SONY/SHARP/I.VC. 10 LCT 5 104x104 |4"x4“l 5W -Do- 9 LCT 3 90 (311 3W CONTEC/J.VC. 9x5.5 LWCT2 90x55 |3' "x2.61 JU TOSHIBA/CORE B/WT.V. SPEAKERS 8 LG 1/2 77 (3 ") 1W/2W 0AEW00D (141 9 LG 2/3 90 mi 2/3W D0/C0NTEC (141 10 LG 3/5 104 (41 3/5W SONY/GOLDSTAR (20") 7x10 LG 2 65x103 (27x41 2W (14") 8x13.LG 3/5 78x118 i3 i"x4u"| 3/5W CONTEC/SOMPU (20") 10x15 LG 6 104x150 |4"x6") 6 W PHILLIPS/NEL (20") TEWEETER 5 LT 5 * 50(21 5W FOR COLOR. T V 5 LT 10" 50(21 10 w FOR B/W TV 3 LT 10” 25(11 10 w FOR COLOR T V. 2 LTD 15 20 (VI 15 W ILDT 10 10 j'/il 10 w LOST on the Data Highway? Are you getting perplexed by the advances in microprocessor and computer technology? Confused by the jargon of process control experts? There is no reason to get disappointed. You can still catch up with them, and fast! With Dynalog on your side, nothing is impossible. Dynalog offers the widest range of Microprocessor Training and Development Systems, based on all popular Microprocessors like 8085, Z80, 6802, 6502, 8086, 8088 and 68000. The range also includes one 8085 based system specially designed for learning Process Control Applications. Various building block type STD Bus compatible cards for OEM applications are also available from Dynalog. Dynalog Micro-Systems 14, Hanuman Terrace, Tara Temple Lane, Lamington Road, Bombay 400 007 Tel: 362421, 353029 Telex: 011-71801 DYNA IN Gram: ELMADEVICE ADDMark Dragon dictates It is quicker to read a book than have it read to you. But it is quicker to make a speech than to write it. In an ideal world, therefore, busy businessmen would receive information on paper and impart it in speech. But they do not, because the spoken and written word re- main separate. The door be- tween them is guarded by the formidable power of the typing Not many years from now, those typists will have been replaced by machines. There are already devices on the market that fac- tory managers can use to re- cord stocks or orders, or that car-telephonists can use to dial numbers by voice. Kurzweil Applied Intelligence, a small company based in Waltham. Massachusetts, and founded by Dr Ray Kurzweil, has taken this idea a stage further and has sold 400 of what it calls "voice systems". A voice system can learn how an in- dividual speaks 1,000 words and then turn any word it hears into the same set of signals as a keyboard would deliver to a personal computer. So, (or example, Dr Alan Rob- bins. a radiologist at the New England Baptist Hospital, has given a voice system the basic vocabulary of X-rays, so that he can dictate to it while describ- ing the results of an X-ray. Doc- tors would benefit greatly from dictation machines: most of their communication is in the form of hand-written notes to each other: one study found that 16% of the words in such notes were illegible. To build a dictation machine that can distinguish between the thousands of words that people use in writing to each other, and yet not confuse any two of them, is much harder. Dr John Makhoul of Bolt Beranek Its master’s voice and Newman (BBN). which has a contract from the American Defence Department to develop speech-recognition technology, compares it with trying to read handwriting in which not only are all words connected, but the shape of each letter depends on the let- ters that precede and follow it. People do not leave gaps be- tween words in speech as they do on paper, in the chart below, note that the gaps correspond to consonants, not word endings. None the less, thanks to the ar- rival of customized chips and dirtcheap computing power, it is now possible to build a de- vice that can hear each of thousands of words correctly and within half a second in more than 95% of cases. Ven- ture capitalists have got wind of this. Companies are springing up throughout the high-tech belts of America to build "com- puter ears". For now. do not be- lieve their claims: a good audio typist can beat the pants off any machine yet devised. But bad ones will soon feel the cold breath of mechanical com- petition. At least three companies are close to market. Kurzweil will probably be the first. Its 10,000-word voice writer will sell for under $10,000 when it is eventually launched (sometime in the first half of this year is the latest of several guesses). It will come with a basic vocabulary of 6,500 words that will need a few hours' training to each user's voice and will be able to add new words that you teach it up to a total of 10,000 or so. Kurz- weil has invented its own chip, the KCS2408, for the voice writer, which will be a box that goes between the microphone and an IBM-PC-AT personal computer. Dragon Systems, a small company based in Newton. Massachusetts, is taking a dif- ferent approach. Its main con- cern is to get the cost right down so that $50 voice engines with 50 cent microphones can be fitted to any desktop microcomputer. In 1983. its founders, Dr Jim and Dr Janet Baker, licensed their tech- nology for $10 a unit to Apricot, a British computer maker. which produced the first com- puter with an elementary buiit- Cherry Electrical, a Chicago keyboard maker, has bought licences for $200 a unit for Dragon’s 1,000-word recog- nisers, which it sells for $1,200. Dragon's advantage is that it does not rely on any special chips: all its speech-recog- nising programs can run on general-purpose micropro- cessors. Once microcomputers | based on the new generation of Intel 80386 chips become avail- able. Dragon hopes to have 10.000-word recognising tech- nology available. For once, IBM is among the leaders of the race, thanks to a talented team under Dr Fred Jelinek at the company's Thomas Watson Research Centre at Yorktown Heights in New York State. In 1984. it demonstrated a 5.000-word de- vice that required a mainframe computer and three array pro- cessors. In April last year, it did the same on a personal com- puter. by using two chips called digital signal processors developed at IBM's laboratories in Switzerland and France. Dr. Jelinek now says he has gone even further and given a PC a vocabulary of 20.000 words. IBM calls the speech recogniser Tangora, after Albert Tangora. the world’s fastest typist. It has not yet said when it will be selling Tangoras. Dr Jelinek plans to distribute a few dozen to offices in IBM research laboratories next year for evaluation. Setting limits Kurzweil, Dragon and IBM all realise that the only way to tackle speech recognition is to limit the problem in four ways: • Vocabulary. A large vocabu- lary can be made manageable by teaching a machine elemen- tary grammar. For example, I sentences are more likely to be- gin with "man" than "than". Dr. Susumu Kuno, a Harvard pro- fessor, whose skills of syntax are incorporated into Kurzweil’s voice writer, divides speech into about 400 kinds of words and defines which kinds of words follow which in an English sentence. IBM uses what it calls a "trigram" ap- proach: given the two pre- ceding words, it predicts the third. Most researchers reckon a good dictation machine would have to know 20.000 words. Kurzweil disagrees. The vocabulary of even an educated English speaker is surprisingly small. Shakespeare used about 30,000 words in all his writing, but most people are much less prolific. Mr Robin Kinkead, director of design at Kurzweil. found that he had used 8,000 different words in all his writing during two years (113,000 words in total) and only 4,000 of those were used more than once, IBM has searched 27m words of of- fice correspondence to glean the 20.000 words most common- ly employed for its Tangora. Those 20,000 account for 98% of the total. • Connected speech All three machines require each word to be spoken in isolation from its neighbours. This greatly facilitates recognition, but it is inconvenient, slow and is plain- ly not how the human mind works. However, even with gaps between words, it should be possible to dictate to Kurz- weil's voice writer at a rate of about 60 words a minute— con- siderably faster than most pro- fessionals type, though well short of Mr Tangora's 147 words a minute. Isolated speech may turn out to be a technological dead-end. Dr Kurzweil does not think so. He says his voice writer will be able to handle connected speech by 1988. IBM's Dr Jelinek reckons it wil require a tenfold increase in computing power. But BBN's Dr Makhoul says that you cannot tackle con- nected speech without sacrific- ing performance on other • Speaker dependence. To be good, speech recognisers will have to be trained to an in- dividual’s voice. Where the ability to recognise any voice is required (eg. dialling tele- phone numbers), either vo- cabulary will have to be limited or errors tolerated. Training the machine to your voice will be tedious: once the vocabulary gets much above 1,000 words, it is impractical to sit down and repeat each word three times. Kurzweil's solution is to get a sample of up to 2.000 words from the speaker and use those to infer how he will speak other words. Then, when it hears him say the real word, it substitutes the real thing for its guess. IBM's Tangora is trained by the user reading a set text of 1,100 words, from which it "ac- cents" its representations of the other words in its vocabulary. • Background noice. Given a high-fidelity microphone and no noice in the background, a computer will make a better job of recognising each word than over a noisy, long-distance telephone line with its nar- row range of frequencies and crackles. Again, each designer has to choose whether to sacri- fice performance for robust- Look, no hands Nobody knows quite what the implications of computers taking dictation will be. One of Kurzweil’s best ideas has been to send Mr Kinkead to find out what people want from such a machine and design it accord- ingly Mr Kinkead's main dis- covery was that people do not They want not only to dictate then computer, but to correct words, move around the screen and sign off with spoken com- mands. If they have not learnt to type before, they do not want to So, although the Kurzweil voice writer will work with any word- processing program, it can be entirely controlled by speech. “Listen-to-me” wakes the com- puter up; “move-right” moves the cursor right; "next-choice’’ corrects a wrongly heard word by telling the computer to substitute its second-best guess. Connected words are used in such commands and isolated ones in dictation. Kurzweil reckons that the market for the voice writer will be lawyers, doctors and middle managers, who generate a lot of text. And many disabled people should benefit. Stanford University and America's Vet- erans Administration are devel- oping a robot with wheels and a mechanical arm that is con- trolled by a voice system. Speakers of Japanese and Chinese have even more reason to welcome speech recog- nisers than English speakers, as they struggle to design keyboards that can manage many thousands of characters. NEC already makes a 500-word recogniser and Fujitsu a 256-word one. Such machines need not con- fine their recognition to words. Kurzweil discovered that one of the customers who bought its voice system was using it to identify the sound of faulty bearings in machinery. In a playful mood, some of Kurz- weil’s scientist taught the machine to distinguish three different kinds of bark by one of their dogs, as "animal in the I yard", "somebody at the door" | and "let me out". It worked j The machines described in this article mark only the begin- ning. By the end of the century, they will be as obsolete as typewriters. Some of the speech-recognition projects— especially those paid for by defence departments to help fighter pilots do a dozen things at once in dogfights— give a glimpse of what will one day be achieved. Bolt Beranek and Newman, using enormous computing power (a Symbolics' Lisp machine or one of BBN's own parallel computers, called But- terflies), is in no hurry to get a product to market. It eschews isolated words and works in- | stead with connected speech, t It is still restricted to a small vocabulary and it takes minutes for a long sentence, but it works. To watch it gradually ' making up its mind about what you said (and puzzling over your English accent) is eerie. | An even more futuristic idea is exciting Mr John Bridle and Dr Roger Moore at one of Britain’s defence-research laboratories, the Royal Signals and Radar Establishment in Malvern, Worcestershire. They want to try speech recognition on a | new generation of computers ! called either "Boltzmann machines" or perceptrons. These are networks of micro- j processors built to imitate primitive brains. Anatomy of a computer's ear In the 1960s, most researchers assumed that speech recognition was simply a matter of distinguishing the "shape" of each "phoneme” (syllable or consonant group) and translating that into words. But that approach has proved unrewarding, because it underestimates ! the variability and ambiguity of speech. Compare "this new display can recognise speech” with “this nudist play can wreck a nice 1 Today a different mood prevails. IBM’s Dr Jelinek jokes that his system improves every time he gets rid of an “expert". What he means is that, given lots of data, computers are better at deducing what to measure so as to distinguish words than humans are. At its simplest, this means measuring the statistical similarity between a stored template (of a word usually) and the sound that has been heard. But it is never as easy as that. For a start, words vary in length according to the speed at which they are spoken and according to their context. They have to be "time-warped'' to a standard length. But it does not help to time-warp them by a set amount. Say the word "three" slowly and it is the ee that gets lengthened, not the thr. The answer is dynamic time-warping, a mathematical trick that matches two spectrograms of uneven length. But if you try hard enough, you can dynamically time-warp one word into almost any other. The time-warping has to be constrained. The cleverest way of doing this leads to a whole new approach to speech recognition. Called “hidden Markov modelling" after a Rus- sian mathematician who analysed "Eugene Onegin ", it was first applied to speech recognition by Dr Jim Baker, now the chief executive officer of Dragon. It gets away from the idea of comparing word templates comparing instead tiny fragments of speech with stored patterns, and, in particular, the probability that one fragment will be preceded and followed by another. It is "hidden", because the answer it gives for each sound is itself statistical and based on the computer's own ability to learn from examples. The statistical approach stumbles over short words, not long ones, which include more distinctive features. “Disestablishmen- tarianism" is easier than "it", “if', "is" and "in". This is where the linguistic rules come in. "In America" is a more likely phrase than "it America". But “if America" and "is America" are both plausible. No single approach, acoustic or linguistic, is as good as their com- bined efforts. What Kurzweil's scientists have done is to use seven pieces of software (which they call "experts") to attack each word and then vote on the answer. 3-20 Reproduced with permission from The Economist DIGITAL SINE-WAVE GENERATOR This simple to build AF generator can output a digitally obtained sinusoidal output signal in the 2 Hz to 20 kHz range. The oscillator circuit with the two MMVs ensures a stable out- put clock signal over the entire 128 kHz to 1.28 MHz range. The oscillator and the divider chain can supply the following fre- quency ranges: 128 Hz... 1280 Hz (ICa.; Si.-l), 1280 Hz... 12.8 kHz (IC2b;Sia-2). 12.8 kHz... 128 kHz (ICza; Su-3) and 128 kHz... 1.28 MHzfMMV,/ MMV?; Si«-4). As each period of the output sine-wave is gener- ated in 64 steps, the generator has an output frequency range of 2 Hz to 20 kHz. The clock pulses at the pole of S:.> are inverted with the aid of MOSFET Ti to ensure the cor- rect phase relation between FF i and ICj, a Type 4040 binary counter, which drives the ad- dress input lines Ac. . . As of the EPROM containing the digital pattern for one period of the sine-wave. It is seen that only 64 from the 8192 bytes available in the Type 2764 EPROM are used (6 address lines, A0...A5; 2 6 = 64). This is, admittedly, Fig. 1 Block diagram of the digital sine-wave generator. The cun-off frequency of the low-pass rather a waste of memory ca- output filter is switched along with the frequency range setting. pacity, but it must not be forgot- There are various ways of gen- article outputs a sinusoidal amplifier has been included to erating a sine-wave signal in the waveform obtained from an ensure a sufficiently low gener- AF range, and numerous de- EPROM, ie. a digital storage ator output impedance, signs to this effect have already medium. The data stored in the been published in this maga- EPROM (Erasable Program- zine. However where the main mable Read Only Memory) is j Circuit description concerns of the user include a the template, so to speak, for With reference to the circuit high degree of output level the output waveform. As shown | diagram, Fig. 2, the tunable stability, low distortion and in Fig. 1, a clock generator, j clock oscillator is composed of reliable coverage of the full AF three dividers, and a cyclic ad- monostable multivibrators spectrum, quite a number of dress counter cause the data | MMV- and MMV. . Frequency basic designs fall short of the bytes in the EPROM to be fed to | range switch Su selects the ap- necessary performance in a digital-to-analogue converter [ propnate output from divider tfiese and other important re- (DAC), whose output signal is j chain IC?-IC). while Pi. is used spects. cleaned with the aid of a track- | as the fine adjustment for the The generator described in this ing low pass filter. An output I generator output frequency. 3-21 EPROM. diagram of the digital sine-wave generator. The outpi ten that, in general, EPROMs in j ively output bytes represents an the 27XXX series offer shorter i instantaneous voltage of the access times as their holding ; output sine-wave. Table 1 shows capacity increases. The Type | the contents of the EPROM 2764 is now widely available, Assuming that ICs has not yet and its price has come down to I reached output state 32, its Qs the level of a 450 ns type 2732. : output is low. and the 0 output The majority of manufacturers of FF> drives DAC databit D« of the 2764 specify a device ac- high. Therefore, the first 32 cess time of the order of 250 ns, ! hexadecimal values to be con- being the maximum permiss- verted by the DAC are 100 119, ible value for the EPROM used 132... 119. Then. FF- toggles, in this circuit. and Di of the DAC is driven low. Output Or of cyclic counter IC-. i causing the next 32 steps to be goes high alter every 32nd 0FF, 0E7 ... 0CE, 0E7 Thus, the pulse transition at the CLK in- positive half period of the sine- . put. This event causes bistable wave is written with counter I FFi to toggle and drive data in- } states 0. .32 (D» = 1), the nega- put D» of DAC IC» low. Latch IC? I five half period with counter is inserted between the data states 33... 64 (D«^0) With 64 outputs of the EPROM and the , memory locations, 9-bit conver- | [ data inputs of the DAC to ensure j sion values are available for the I that glitch-free logic levels are i DAC in phase increments of j transferred during the rising ; 5.625° (360°/64). The attainable j edge of a clock pulse. | resolution for the steps is j As counter ICs addresses all I Ub/2 8 . j 64 memory locations in the j The staircase-like output signal | EPROM, each of the success- 1 oftheDACisfedtoavariable-R. 3-22 3 rs s Jr- T-T J I a n,T- 0 .„ : ig. 3 Suggestion for a simple ower supp or board. y. Note that a 5 V l l ?! ii 3E A2 Table 1. Hexadecimal representation of the contents of EPROM ICe. n Makm Mil Jof 2Br^5 ; 3j r 3nin skheii! HIKpi! I fixed-C low-pass filter, whose cut-off frequency is arranged to j track along with the generator | output frequency. The filter is required to smooth the stair- case into a sine-wave, and at the same time to suppress harmon- | ics and spurious DAC output signals. The simple R-C filter of- fers a skirt steepness of about 6 dB/octave, which is adequate, as the first strong spurious signal has a frequency 64 times that of the fundamental note. The output amplifier of the sine- wave generator is based around IC.o , ICn, T; and Ti.The latter two are medium-power tran- | sistors in a balanced power out- | put stage capable of driving i relatively low-impedance loads I (Zout ~ 50 0), The output ampli- tude of the generator can be ad- justed with P i . The generator board comprises I its own 5 V regulator. Therefore, a simple, symmetrical 8 V supply suffices to feed the instrument— Fig. 3 shows a stan- dard design to accomplish this. LED Di on the generator board is used as the power on/off indi- Construction The sine-wave generator is con- structed on ready-made PCB Type 87001. With Fig. 4 and the parts list to hand, no construc- tional problems are envisaged. The frequency and amplitude I controls are fitted straight onto the board to enable this to be mounted vertically, behind the enclosure front panel. Make sure that you use good quality presets in the Pi and P2 pos- itions, else the stability of the l generator output signal will be affected. Power semiconduc- tors T? , Ti and IC9 can do with- out heatsinks, but due account | should be taken of the potential at their metal mounting tabs. I The spindles of Si, Pi and P2 are left long enough to protrude through the instrument's front panel. The output of the gener- ator is made with a single-hole type BNC socket. As to the power supply, this is constructed on PCB Type 9968 —see Fig. 5. The regulators are best fitted onto a metal surface, e.g. on an aluminium plate cut to slide into the slots at the rear of the Verobox enclosure. Do not I forpet to fit both the 7810 and the 7910 with insulating washers to preclude short circuits via the cooling surface. 3-24 elektor hum march 1 987 The fitting of the mains input socket, the fuseholder. and the mains transformer, Tri. is fairly straightforward, requiring no further detailing. Observe the rating of Si to make sure that it can be used as a mains switch, and be careful to keep the two mains wires running to the front panel well away from the gener- ator board. Play it safe! Setting up and filter considerations To begin with, the +8 V supply is separately tested by measur- ing its open-circuit output volt- ‘ age. Connect the completed ! generator board, switch on, and see if the LED lights. The pre- cise adjustment of the D-A con- verter can be carried out by temporarily replacing Rio with a 5K0 multitum preset, and con- | necting a digital ammeter be- j tween pin 16 of IC> and the preset. Make sure that the preset has previously been set Fig. 5 Track layout and component mounting plan for the 8 V symmetrical power supply. to about the centre of its travel, plex, and also more difficult to and adjust it for a current of track with the generator output 2.000 mA. Remove it, measure frequency, than the proposed its resistance, and fit an ap- single R-C combinations, and propriate high-stability resistor that is why it was left out of the in the Rio position. While you present design, have the board lying in front of , It is possible to store waveforms you to perform this test, it is a other than a pure sine-wave in good idea to check the measur- the EPROM. Do not forget, how- ing points indicated in the cir- ever, that the simple R-C low cuit diagram. pass will cause distortion of Should you want to use the gen- sharp points of inflection pres- erator to provide only one, ent in, for instance, ramps and fixed, output frequency— eg. triangular waveforms. For these for distortion measurements—, applications, a very complex it is certainly worth while to re- DAC output filter is required, place the Pi-C?. . ,Cn filter with making the digital approach to a higher order type to attain an signal generation cumbersome output distortion of about 0.01%. as compared with conventional It is readily seen that such a , analogue techniques, filter is considerably more com- ® Fig. 6 The front panel foil for the digital sine-wave generator. THE RAZOR EDGE OF THE EXCIMER LASER by Dr Malcolm C. Gower, Laser Division, Rutherford Appleton Laboratory, Chilton near Oxford Excimer lasers produce extremely intense bursts of ultraviolet light. Their ability to do so is generating a great deal of interest in areas as diverse as chemical synthesis, defence, surgery, and semiconductor processing and chip manufacturing. The short- wavelength photons they produce have enough energy to break most of the chemical bonds that bind molecules together, thereby fragmenting or stimulating them to change their form. This ability to control the chemical state of matter and change it in a desirable and very selective way is at the heart of many of the most exciting applications 'of excimer lasers. The most common type of excimer laser uses molecularly diatomic rare-gas halides such as ArF, KrF, XeF or XeCl as the active species from which the laser light is produced (see Spectrum 161). In their com- mon, unexcited form, atoms of the rare gases Ne, Ar, Kr and Xe are unreactive or inert and do not readily form molecules. But if an electron is knocked off an atom to ionise it, the atom can become extremely reactive and form molecules, particularly with negative halogen ions of the F , CL, Br and I types which have an additional elec- tron attached to them. Rare-gas halide molecules are held together by electrostatic forces, similar to the way alkali halide (salt) molecules are formed, as in the first illustration (a). Because of their transient nature, with a lifetime of a few billionths of a second before falling apart by spontaneously Wavelength Energy/ Fr 167 40 ArF 193 500 KrF 249 1000 XeF 351 353 500 KrCI 222 100 XeCl 308 500 The wavelength of light produced by an excimer lasei depends upon the type of molecule created. It can be selected simply by changing the gas mixture originally added to the laser tube, as in emitting ultraviolet photons, rare-gas halide molecules can- not be bought in a bottle but must be created in the laser vessel in situ. It is usually done by high-voltage electrical discharges in gas mixtures of halogen-bearing molecules and rare-gas atoms, as in part (b) of the illustration. The unex- cited rare-gas halide molecules which form the lower iaser level are unstable, so at any instant there are very few of them in the laser vessel. Nearly ail the rare-gas halide molecules in the vessel are excited and have energy avail- able for extraction as ultraviolet laser photons. The wavelength of the laser light is determined by the type of molecule created and can be selected simply by changing the gas mixture orig- inally added to the laser tube, as shown in the table; the pulsed energies of the light ob- tainable from typical commer- cial excimer lasers are also listed. Such devices can pro- duce pulsed bursts of light lasting approximately 2 x 10 * second at up to 500 times a sec- Nuclear fusion Much larger excimer lasers can i be built in the laboratory. A KrF i laser at the Los Alamos National J Laboratory. USA will soon be i producing four terawatts (4 x 10' 2 watts) of ultraviolet light. This power is several times more than the combined ca- pacity of all the electricity generating stations in the world today, but the laser can produce it for only about 5 x 10 9 of a second. With the aim of eventu- ally building a laser-driven nuclear fusion power plant for the relatively cheap pollution- free production of electricity, this extremely large laser is be- ing used to study the nuclear fu- sion reactions produced when the focused laser light il- luminates, heats and com- presses to high density tiny glass microspheres containing deuterium and tritium gas. To obtain more fusion energy from the pellets than is put into it by the iaser light the plasma created should last for at least 2 x 10 8 second and have a tem- perature close to that on the Sun (10* degrees) while maintaining a density more than 50 times that of solids. Experiments have shown that such high tempera- tures and densities are more readily achieved by using short- wavelength ultraviolet laser light to irradiate and compress the target. Because excimer lasers can efficiently convert electricity to pulsed bursts of ultraviolet photons (conversion efficiencies of over 10 per cent have been demonstrated) and can in principle do so many times a second, they are con- sidered to be the most likely driver source for any laser- induced fusion power plant which may eventually be con- structed. Semiconductors The ability of ultraviolet excimer laser light to break molecules apart so easily is now being exploited in the semiconductor industry. For example, highly uniform con- ductive metal coatings can be deposited on the component surfaces of a silicon chip by using the laser to release metal atoms from gaseous molecules above the surface. This step in silicon chip fabrication is called chemical vapour deposition and is conventionally done by means of plasma techniques, which in general are far more destructive to the silicon wafer and less controllable than the laser technique. Thin crystalline layers of silicon can also be grown by depositing atoms of | silicon. Furthermore, by simul- taneously locally melting the silicon wafer with an excimer laser, the technique can be adapted to implant dopants into the bulk silicon. Such implan- tation is used to create the p or n junctions which combine to form the miniscule circuit el- ements in the chip. Present non-laser methods of implanting dopants into sili- con by ion bombardment in plasmas tend to leave the sili- con crystal lattice damaged, so it is essential to recrystallise (an- neal) the silicon wafer in a high- temperature area. Apart from adding another slow step to the production process, high-tem- perature annealing of the whole wafer can also lead to distor- tions of the circuit elements on the chips. On the other hand, the excimer laser method of im- planting can simultaneously locally anneal the silicon wafer as well as achieve very high, supersaturated concentrations of dopant atoms. There is another process, too, in producing silicon chips, that can be improved upon by the excimer laser. Extremely small, complicated circuit patterns to be fabricated on the silicon wafer are initially laid out by reproducing master mask pat- terns of the circuit on a thin, I light-sensitive plastic polymer ' duced by excimer lasers are in | film called the photoresist, I general shorter than those pro- coated on to the silicon. In a I duced by high-powered lamps. I way similar to that in which a 1 smaller feature sizes on the camera works, lenses or mirrors mask can be replicated on to project an image of the il- , the chip. This allows many | luminated mask on to the more, smaller circuits to be photoresist, In the exposed, packed on to the chip, so that j bright regions of the mask pat- each chip can perform a i tern the photoresist is then re- greater number of operations at moved by chemical develop- a greater speed, ment. Ions are subsequently im- Another advantage of the ex- planted into the silicon through cimer laser is that the extremely ' the gaps in the photoresist. This short burst of ultraviolet process of optical replication of photons can also directly mask patterns on to the silicon remove (etch or ablate) the wafers is known as photolith- , photoresist from the exposed ography; incoherent lamp regions without the need for sources illuminate the mask, wet chemical development. So j Recently, however, ultraviolet the excimer laser source may excimer laser light sources mean cutting out another pro- have demonstrated several cessing step in chip pro- unique advantages over lamps duction. in such work. The most striking advantage is that the laser can produce images which are Clean etching nearly 10’ times brighter than Ultraviolet excimer laser light those produced by a lamp. This : directly etches plastics ma- means that the exposure time of j terials by producing a micro- the photoresist can be made ! explosion through efficient, negligibly small, allowing a rapid breaking of the chemical i substantial increase in the chip j bonds that hold the polymer throughput of a photolith- together. Unlike lasers working ography machine. Furthermore, at longer wavelengths, the because the wavelengths pro- excimer laser produces no ceeding that achieved with a tissue. An alternative method knife. Moreover, the laser can might be to use light from an reshape the cornea by ma- excimer laser, passed down chining rings and crescent through an optical fibre in the shapes. It can also make the artery, to burn through the precise incisions necessary for blockage cleanly. Initial studies subsequent corneal transplants j have shown that for soft, non- or removal of cataracts. calcified plaque the excimer laser can remove the constric- tion efficiently and cleanly. Balloon angioplasty Calcified blockages are much Work is also going on to in- more difficult to remove, vestigate the use of the excimer j Among other medical appli- laser to unblock arteries, a pro- ! cations bejng studied are very cedure known as angioplasty. 1 precise neurosurgical cutting Blockage near the heart by ac- in the brain and spinal column, cumulation of plaque, the con- i While most applications of dition known as atheroscler- high-power visible and infrared osis, eventually leads to a heart lasers use the laser merely as a attack. Most widespread of , sophisticated cutting and surgical methods now used to welding torch, the most ex- aileviate this condition is ex- citing potential applications of tremely invasive open-heart ; excimer lasers make use of the surgery, in which surgeons I h*9h powers which they are bypass the blockage by graf- capable of producing and the tfng a new artery around it. Less ability of the ultraviolet photons j invasive is a recently developed 10 induce changes in the , technique called balloon i chemical state of matter in a j angioplasty, in which a fibre is most efficient way. Many new threaded through the arteries to I applications of excimer lasers the blockage and a balloon on ! may be expected to develop as the end is then inflated to open i scientists and engineers be- I it out; the patient remains con- | come increasingly aware of 1 scious throughout. But the tech- their tremendous potential, nique can also damage arterial ' 0240/6 VLF ADD-ON UNIT FOR OSCILLOSCOPES This is a low-cost storage unit enabling oscilloscope users to view signals with very long periods. Where the typical oscilloscope merely shows a slowly travelling spot in response to a VLF input signal, this add-on unit is intended to convert that instrument into a versatile chart recorder. The bandwidth of an oscillo- scope is generally considered one of its main technical characteristics. For obvious reasons, the relevant specifi- cation is generally featured close to the oscilloscope type indication on the front panel. Interesting as its bandwidth specification may be, the com- mon oscilloscope can not offer what appears to the user to be a continuously written trace, at in- put frequencies below some 10 Hz. The vast majority of oscillo- scopes is totally unsuited to study a process with a period time of, say, one minute. Even in the unlikely event of the instru- ment offering a timebase set- ting of 0.01 Hz/div., nothing would be visible on the screen, other than an apparently station- ary, bright spot. In this example, a usable curve can only be ob- tained from a special chart recorder, or a storage oscillo- scope, both of which are rela- tively costly instruments. The VLF add-on unit described in this article considerably ex- tends the lower end of the bandwidth of any oscilloscope having a timebase setting of 500ps/div., an external trigger input, and a positive edge trig- ger selection. Its input im- pedance must not be less than 1M0. Actually, there should not be too many oscilloscopes around which do not meet these requirements! In essence, this oscilloscope extension is an 8-bit wide memory block inserted be- tween an analogue-to-digital converter (ADC) at the input, and a digital-to-analogue con- verter (DAC) at the output. Its wide range of available time- base settings— see the Techni- cal Specifications Table- enables the storage unit to be used for applications like study- ing the thermal behaviour of systems, analysing subsonic movement, or establishing charge and discharge curves of batteries. In the former two examples, a suitable sensor (temperature-to-voltage con- verter; strain gauge) plus as- sociated amplifier could be used to drive the storage unit. After the measuring process is completed, the user can view a neat curve on the oscilloscope | screen for closer analysis. Dur- ing the measurement, the writing of the curve can be ob- served without a trace of dis- play flicker, as the oscilloscope is set to a sufficiently high dis- play rate. If you are now under the im- pression that the present storage unit incorporates a fair number of costly components in a highly complex circuit, it is time to proceed reading the next section. Block diagram Fig. 1 shows the basic operation of the circuit during its two alternating states of digitizing Um (CONVERT) and outputting the sampled data to the oscillo- scope (DISPLAY). Digitizing of Um is essentially done on the basis of ramp and compare. The output of an 8-bit counter, ICa-ICs, is translated into an analogue voltage by a DAC (digital-to-analogue con- verter), which produces a ramp output signal for comparison with Um in ICi. As soon as Uout from the DAC rises above Uin, 1C- toggles, and the lastly pres- ent data from ICx-ICs is written into the RAM location ad- VLF storage unit Technical Characteristics ■ Timebase settings; 5 s SO s/sereen; 250 s/ screen; easily extendable as required ■ Trigger output swing; 5 Vk ■ Input voltage range: 0. 2 V, DC coupled. ■ External supply: 5 V at 100 mA. ■ BESET to clear screen ■ FREEZE button to retain image. ■ Operates with virtually any type of oscilloscope HI dressed by ICj. In this manner, | the stored databyte is the digital equivalent of the instantaneous : level of Um. Note that IC3 ad- dresses one RAM location only du ring the CONVERT mode, as its CLK input does not receive address count pulses. During the DISPLAY mode. ICi is arranged to successively ad- dress all the 256 bytes in the RAM, whose contents are fed to the DAC providing the scope with the restored analogue level of Um. The cost-effective use of ICt as a DAC and— along with the 8-bit counter and the comparator— as an ADC requires a rather par- ticular circuit timing, which will be examined below. Circuit description The circuit diagram of the VLF storage unit, and its basic inter- nal timing arrangement, are shown in Figs. 2 and 3, respect- Assuming the circuit to operate 1 in the CONVERT mode, gate network Nj-N* disables address counter IC3 from receiving 50 kHz clock pulses from Ni. j The address inputs of RAM (random access memory) IC2 I are, therefore, held at a fixed logic configuration, causing the rising, 256-increment, binary j value from counter and latch j IC4-IC5 to be written to one memory location only. Note that IC2 is a 2048-byte RAM, whose memory capacity has been re- stricted to 256 bytes by ground- ing its As... Aw inputs. The Type 6116 was chosen because it is much cheaper and easier to obtain than, for instance, a 5101 256x8 RAM. The Type ZN426 8-bit DAC thus outputs the analogue equivalent of the out- put states of ICs. i.e.. a ramp is obtained to drive the + input of comparator IC. (see Fig. 3, curve IV), while Um is applied to the protected — input. As already explained, the opamp output remains low as long as Uom from the DAC is lower than Um, Output Q of bistable FFi drives the WE (Write enable) input of IC2 low, so that each binary value from counter IC* is stored and over- written again at the current ad- dress obtained from ICa. Only that counter state from IC« that causes Uout from the DAC to be higher than Um, is left at the rel- Fig. 2 Circuit diagram of the storage add-on unit. Fig. 3 Essentials of the pulse timing in the circuit. evant address, as WE goes high needed to enable ICi to ad- immediately afterwards, dis- dress the next higher RAM lo- abling the writing of further cation where data will be stored data in the RAM— see Fig. 3, during the CONVERT cycle, curves IV and V. Obviously, the This pulse is obtained from two lower the instantaneous level of cascaded counters in ICio. Um, the sooner ICi toggles, and After the RAM contents are the lower the value written into written to the oscilloscope— i.e., the RAM. This completes one after 2S6 clock pulses from Ni. conversion cycle. FF2 toggles again to start a After every 256 clock pulses CONVERT cycle. The falling from Nt, N; supplies a positive edge of 0 advances counter pulse transition to the clock in- IC.o one state. Depending on put of bistable FF2, which in the setting of the time/screen response toggles to produce switch, S3, a predetermined the trigger pulse for the oscillo- number of 0 transitions must scope, thus marking the start of occur before Ns can produce the display cycje. The toggling the previously mentioned ad- of FF2 (Q = l; 0=0) causes a ditional clock pulse to have ICj number of things to happen point to the next higher location simultaneously. Output 0 is in the RAM— see Fig. 3, curve I. used to enable the output After a short delay caused by drivers in IC2 to pass the binary Cs-Rs and C2-R«, FFi is reset. RAM contents to the DAC input The above timing arrangement lines. As OE of ICs is driven effectively results in the oscillo- high by 0. no contention prob- scope screen being written lems can arise. Also, the low from the right to the left, level of 0 is used to disable ICi creating the impression of a by means of controlling its fixed display window through STROBE input, pin 8. Bistable which the signal can be ob- FFi is set to prepare for the next served to pass smoothly. The toggle action during a conver- positive edge triggering of the sion cycle. Output 0 of FF2 scope ensures that only the Dis- enables Ns-N* to pass the PLAY phase of the DAC output 50 kHz clock signal to the CLK waveform is shown on the os- input of address counter ICs. cilloscope screen— see curve causing IC2 to output all data IV. contained in its 256 memory lo- Fig. 4 further illustrates the cations. It is important to realize basic principle of the scrolling that the first location addressed oscilloscope image. Although is determined by the start state the writing of the data into the of IC3; as this counter is RAM is a relatively slow pro- not reset, the state of its cess— the write rate being the 1QA . . . 2QD outputs is simply time/screen setting divided by frozen after 0 of FF2 goes low 256— the RAM contents are again. In order to be able to displayed at such a speed as to write to all 256 locations in IC2. ensure a stable image on the an additional clock pulse is scope. The display window can 3-29 move thanks to the start state of the RAM address counter be- ing increased by one, after counter ICio has received a pre- determined number of pulse transitions from the 0 output of FF;. Although the display win- dow is seen to move to the right in Fig, 4, the actual situation is, of course, that the sampled curve moves to the left. The writing of sampled data can be observed as an additional bright dot appearing to the right of the screen, shifting the previously written image to the left. The instantaneous input voltage for the storage unit is visible as a spot to the left of the screen; at the moment it is writ- ten into RAM, the curve shifts one dot to the left, as shown in Fig. 4. Pressing the FREEZE button in- hibits the additional clock pulse from advancing ICj. so that the displayed image comes to a standstill, while the instan- taneous value of the input volt- age remains visible as a bright dot at the utmost left of the screen. Pressing RESET causes the RAM to be filled with zeroes, and hence clears the display for a new measuring | Returning to the circuit diagram. Fig. 2. delaying R-C I networks have been fitted at several gate inputs. It would have been possible to arrange for a correct circuit timing with the use of. say. a multi-phase clock section, but the low fre- quencies involved fully justify the use of simple R-C combi- nations in the relevant positions. It should be noted, however, that the indicated R and C values are specifically dimen- ( sioned for HCMOS gates, mak- j ing it impossible to use LSTTL r*r Fig. 6 Suggested construction in a Verobox enclosure. types without upsetting the cir- cuit timing. The add-on unit does not comprise an internal supply, but this should not be too difficult to make, consider- ing the modest current drain of 100 mA or so from a regulated S V supply. Construction, alignment and extensions The VLF add-on unit is con- structed on a ready-made PC board Type 86135— see Fig. 5. While completing the board, do not forget to fit any of the wire links, and mount pull- down resistors R>. ..Hit inch vertically, joining their common ground connection with a hori- zontaily running length of bare The introductory photograph of this article, and the one shown in Fig. 6. should offer sufficient details to be able to complete the unit successfully. The input and output connections of the storage unit are preferably made with BNC sockets, while the 5 V supply can enter the enclosure through a small DC supply socket as used in pocket calculators and portable cas- sette recorders. Plenty of space remains in the stated Verobox to incorporate a simple mains supply— Fig. 7a shows the cir- cuit diagram of a suggested version. Aligning the circuit is as easy as constructing it. Set the scope timebase to 500 ps/div., and sel- ect negative-going, external triggering. Set the vertical sen- sitivity to 200 mV/div, or 20 mV/ div. when using a 10:1 probe. Select DC input coupling. These settings enable the scope to show the conversion cycle, rather than the display cycle as used normally. Do not apply an input voltage to the add-on unit. The scope should show one period of the ramp output from DAC ICt Use the X and Y position controls of the scope to move the start of the slanting line to the lower left hand comer of the display graticule, then adjust Pi and P? to make the upper end of the curve coincide with the top right hand corner of the grati- cule. This sets the DAC output for a peak-to-peak excursion of 2 V, at a ramp duration of 5 ms. For normal operation of the storage unit, the scope must be set as during the alignment, but with positive external trigger- ing selected. Finally, the sample time of the proposed storage unit may be extended as required by ad- ding a divider in series with the connection between the pole of S3b and Ci. Fig. 7b shows a suggested extension circuit to lengthen each of the time/ screen settings by a factor 10 or 100. With this one-chip exten- sion, the maximum attainable sampling period is no less than 250x100 = 25,000 seconds, or about 7 hours. Th 3-31 ROM/RAM CARD FOR ELECTRON PLUS ONE Here is a 32 Kbyte ROM and/or RAM extension module which plugs straight into the Plus One cartridge slot. In other words: extra memory for the baby brother of the BBC-B micro! Many programs available for the Acorn Electron microcom- puter come in the form of ROMs (read only memory chips) to go round the problem of having to load the program in the limited RAM space available. These ROMs either start up immedi- ately after power-on, or they can be accessed by means of a par- ticular user command. ROMs are generally classified as Ser- vice (S) ROMs, Language (L) ROMs, or a combination of these. S/L-ROMs. Although it would be beyond the scope of this article to ex- pound the intricacies of ROM filing, priority assignment, and identification strings, it is none the less useful to consider the memory organization of the Electron micro fitted with a Plus One extension. Fig. 1 shows that ■ the address range from 8000h to BFFFh can be used by four banks of 16 Kbytes, which are switched on and off as required by a suitable command from the ROM-resident Machine Oper- ating System (MOS, top 16 K), which effectively controls the bankswitching procedures dur- ing a programming session. Ex- cept when L-ROMs are Fitted in either one 16 K block in the car- tridge, the Electron will run its BASIC interpreter after power- on, or, more precisely, after MOS has examined all add-on ROMs or RAMs for the pres- ence of a language identifi- cation string. If this is encoun- tered and found valid, the com- puter starts executing object code from the highest priority L-ROM, disabling the BASIC interpreter, but leaving the Plus One Utilities accessible through special commands. As to the amount of RAM (ran- dom access memory) in the Electron, there is no denying that the number of bytes available to hold a user program depends on the selected video mode, and the size of the system workspace. Obviously, when running programs in any of the high-resolution graphics modes of the Electron, the user space gets rather tight, as up to 20 Kbytes of RAM are reserved for the video processor. To , create more memory space for ' the user, the proposed exten- sion card can be hold a maxi- mum of two banks of 16 Kbytes of sideway RAM. It is also poss- ible to install one 16 Kbyte EPROM and two 8 Kbyte RAMs to make for an even more ver- satile set-up. For instance, copy- ing ROMs to RAM. or moving large buffer areas to sideway RAM (video applications!) is no longer problematic. A good deal more information on the internal organization, and insiders' methods of using the full capability of the Elec- tron. can be found in the Ad- vanced User Guide, by Mark Holmes and Adrian Dickens. This book is recommended as to the Acorn Electron User Guide , which typically falls short of information on those technical aspects of the micro that are necessary to get the most out of it. Circuit description The circuit diagram of the ROM /RAM card is shown in Fig. 2. The Plus One bus signals (see Fig. 3) are fed to the exten- sion circuitry via the slot con- nector shown to the left of the diagram. Two wire jumpers are used to select between 16 K ROMs and 8 K RAMs in the IC* and ICe positions. Gates Ni-N? provide for a correctly timed WR (write) pulse for the RAMs, while N3. . .Ne are used to divide the memory space within the car- tridge into four blocks of 8 Kbytes, which can either be assigned to two ROMs (2 x 16 K), or to four RAMs (4x8 K), or to one ROM and two RAMs (16 K + 2 x 8 K). Thanks to the internal AND function of C5T and CS2 inputs of the Type 6264 RAM and the Type 27128 EPROM, the chip select circuitry on the card could be realized with only a few gates. Table 1 shows the ad- dress assignment and the various chip combinations of the memory extension card. When using L-ROMs, observe that ICc has a higher boot-up priority than IC*. Construction The ROM /RAM extension is ex- tremely simple to build on through-plated, double sided board Type 86089. Fig. 4 shows the component overlay. While soldering the IC socket pins, do not apply too much solder on penalty of creating a troublesome hardware bug. Also, make sure that decoup- ling capacitor Ci does not cause a short-circuit on any of the three tracks running underneath it. Pins 1 of the memory chips have been inter- 3-32 connected. With some types of (EP)ROM, it may be necessary to connect the pin 1 line to the positive supply rail, running right next to it (pin 1 of a 27128 is the programming voltage input, while it is not connected with a 6264 RAM). Fit the wire links or the jumpers as required for your specific memory configuration, and finish the construction with plugging in the ICs. observing the correct orientations. Install the board in the car- tridge slot in the Plus one exten- sion, and note that the track side of the PCB faces the keyboard, that is, the ICs on the ROM /RAM card must face the rear side of the computer. It is a good idea to stick small, clearly lettered adhesives on either side of the board to pre- vent plugging it in the wrong way about. Testing and using the extension The Plus One extension assigns ROM block numbers 0 and 1 to the rear slot, and block numbers 2 and 3 to the front slot, as viewed from the key- board. Each block is a 16 Kbyte memory area. The test program listed in Table 2 will check for the presence of correctly operating RAM in the far and/or near extension slot on the Plus One extension. The essential operation of this ”assembler-in-BASIC" routine is as follows. In line 60 the ULA inside the Electron is fed with a dummy byte 14h to pass the bank switching control to the program. Location FE05h is a R/W register internal to the ULA, and great care must be taken in accessing it, as it also •comprises interrupt control bits. The 16 Kbyte blocks are each examined as to their ?? ????!" < ability to be read from and writ- ten to without modifying the original memory contents. This is done in a number of nested loops, wherein sideway RAM bytes are copied into a 6502 zero-page location, inverted, stored and loaded again, and checked against the original byte. In this way, correct R/W [ accessibility of the entire 16 K RAM area is checked on a byte- by-byte basis. After initialization lines 30 to 70 the program fet- ches the first byte, inverts it by means of a EOR FFh instruction, and stores the obtained result back into the RAM, as well as in 3-33 3-34 SOFTWARE FOR THE BBC COMPUTER - 3: PCB DESIGN Third in the series, this article looks at designing printed circuit boards with the aid ot an artwork production package. Pineapple Software of Ilford, Essex, are the suppliers of PCB. a software package intended to make high-quality artwork for the direct production of printed circuit boards (PCBs). The program comes as a sideway ROM, a disk, and a reference manual. In essence, PCB is a high-resolution draughting program, capable of outputting layouts to a draft quality printer. The maximum size of a circuit board that can be designed is 10 cm x 16 cm, being the stan- dard Eurocard format. PCB fully supports the making of double- sided boards, and uses differ- ent colours for the tracks on each side of the board. PCB is not an auto-routing program, which means that it can not automatically decide on the most efficient track route be- tween roundels. The user of PCB draws the track-layout on screen with the aid of the cur- sor positioning keys, placing roundels at the required lo- cations. Before being able to do this, however, the component mounting plan must be de- signed. Making a component mounting plan After specifying the overall size of the board required, the screen displays its outline and a number of standard component shapes, which may be ex- panded as required to provide an easy way of handling, for instance, various sizes of Dll enclosure. Components are "picked up" and located in the desired position on the PCB. They can be interchanged, moved about, and identified with part numbers until the component placement is thought satisfactory. Roundels are automatically placed on a 0.1-inch invisible grid, and the cursor moves with a corre- sponding precision, except during the line drawing mode when it moves in 0025-inch- Unfortunately. PCB does not enable users to create their own library of frequently used com- ponent shapes On coiuplenon of the component mounting plan, this can be stored onto disk Making the track layout After loading the component mountinq plan from disk. PCB removes the component outline shapes from the screen, leaving only the roundels presem. A new selection of options is presented to the user At a first screen looks rather coarse Es- between 1C pins, it often looks track widths are available 0.025 inch. 005 inch and 0075 inch, but wider tracks are easily made with the flood fill facility, | which also allows large copper surfaces to be designed with a single user command As dur- ing the component placing phase, the cursor positioning the screen, while the pan numbers may be "called up" for 1 reference, and the display of | either side of the board may be removed temporarily to make track routing clearer on com- plex boards Further routines 1 available during the track layout design phase include circle drawing, partial and complete deletion of tracks— irrespective of the complexity of the route- component identification in four possible orientations, roundel placing at both PCB sides to prepare for through- plating, and returning to the component mounting plan to move groups of roundels. Artwork printing The previously mentioned fear of PCB being too inaccurate to cope with very close running tracks is quite unfounded con- sidering the astounding pre- cision of the final artwork produced by the printer. To test the performance oiPCB, we set out to design a circuit board for a 6809 CPU card. Fig. 1 shows some intermediate results while working with PCB. The print- outs were obtained with an Epson FX80 printer. The pre- cision of the true-scale track layout on draft-quality paper is sufficient to be able to use it for the production of a transparent The print routine in PCB is run from the supplied ROM. A good quality printer must be used for optimum precision; Pineapple mentions that it must be Epson FX compatible, which means that it should switch to quadruple density graphics printing when receiv- ing a ESCAPE-Z code from the computer. Conclusions PCB is a fine tool to design one's own circuit boards. With some experience in making PCB artwork, the program is well suited to producing high- quality layouts at reasonable speed. The final accuracy of the elMtor India marcti 1987 3-35 Fig. la The first design stage: making the component mounting plan. | printout is probably hard to I beat using a completely manual design method. Therefore, PCB should appeal to both the ad- vanced electronics hobbyist and the manufacturer of small series of PCBs for a specific 1 project. Pineapple Software are in the good habit of supplying free update service for their packages, thus ensuring that the registered user is always in possession of the best working version of the program. Each ROM supplied by Pineapple holds a user-specific, hidden registration code to be able to trace down the original owner of a ROM when discovering "rogue'' copies. A final note concerns the previously mentioned auto- routing facility. It is our understanding that Pineapple will shortly announce an en- hanced version of PCB allowing the computer to do the drawing of the tracks automatically once j the component locations on the circuit board have been estab- lished. Meanwhile, the standard version of PCB is available at £85.00 + VAT, from Pineapple Software 39 Brownlea Gardens Seven Kings Ilford Essex IG3 9NL. Telephone: (01 599) 1476. The next instalment in this series will deal with two pro- grams for analogue circuit analysis. St micro- squeaker This circuit is by way of being an electronic joke. The complete circuit comprises only one transistor, one ca- pacitor, a miniature transformer and a headphone. The transistor can be any germanium type; the transformer can be any miniature type with a turns ratio between 3 : 1 and 1 0 : 1 . At supply voltages as low as 0.2 V the headphone produces a distinct sound. Current consumption is then of the order of 10pA, power consumption is less than 2/iW. The joke of this microsqueaker is that it is not fed from a 'normal' current source, but that the gifts of nature are called upon. The positive connection is a piece of bare copper wire, the negative connection is a bare piece of steel or silver wire. If both ends are stuck into an apple, a lemon or a potato, at some distance from each other, the apparatus produces a tone. A solar cell could also serve as the voltage source. The squeaker may also be used as an indicator for D.C. voltages in the range of 0.2 V ... 10 V. 3-36 FIELD-EFFECT OPTOCOUPLER by W Teder In this article we will examine a number of possible applications of a recently introduced optocoupler incorporating an infra-red light-emitting diode and a phototransistor made in field effect technology. In spite of its many interesting applications in the field of audio engineering, the Type H11F3 FET optocoupler from General Electric (GE) has so far passed unnoticed to many hobbyists and professional de- signers eager to experiment with new semiconductors. Apart from its use as a fast, elec- trically isolated switch (solid- state relay), the H11F3 is emi- nently suitable for quite a num- ber of applications having to do with AF signal processing. Table 1 shows the maximum ratings of the FET optocoupler, while Fig. 1 shows its pin assignment and its equivalent circuit diagram. The field-effect element in the H11F3 is a non- polarized, photo-sensitive semi- conductor layer, comparable to a drain-source junction. This semiconductor essentially be- haves like a light-controlled re- sistor, whose resistance is a function of the current passed through the IR LED in the package. The H11F3 offers a remarkable resistance range of 100 ohms to 300 mega-ohms. Many applications In this section we will offer a necessarily brief discussion of a number of application circuits based on the new optocoupler. These applications come under two headings: the use of the H11F3 as a controllable resistive element, and its use as a fast, isolated switch. Before introducing a number of applications in the first men- tioned category, it must be pointed out that the FE element in the H11F3 behaves largely similar to a normal drain-source junction. Therefore, the voltage across Rf must not exceed some SO mV to avoid distortion. Fig. 2 shows the basic concept of a controlled voltage divider, whose main feature is an un- usually low charge injection cross-talk figure. Fig. 3 is a more practical application of the use of the FET optocoupler in a design for a compressor whose attack, decay, and rate of compression are individually adjustable. The limiter shown in Fig. 4 is based on the use of a comparator circuit which drives the IR LED in the opto- coupler whenever the AF input voltage exceeds a preset value. As with the compressor, the at- tack and decay times can be defined over a wide range. When designing circuits incor- porating a number of optocoup- lers driven from a common control line, due account should be taken of the fact that the values of Rf of the in- i dividual resistive elements need not be identical, even if the same amount of current is passed through the associated infra-red emitting diodes— see Fig. 5. It is, therefore, not rec- ommended to use HllF3s in tracked VCRs, or synchron- ously tuned active, filters. Fig. 6 shows how adjustable current sources can be used to match Rf of two optocouplers. The cir- 3-37 series-connected. AF switch, respectively. The attainable signal attenuation is con- siderably improved with the combined use of a parallel and a series-connected FE element —see Fig. 8. The control cur- rents applied to the LEDs are in anti-phase, and the entire cir- cuit may be doubled to make a balanced attenuator with very good AF characteristics. Fig. 9 shows the basic layout of an AF input channel selector, featur- ing click- and noise- free operation. The distortion caused by the FE junction is ac- ceptable, as there is a voltage drop of only a few millivolts with the FE element turned fully on. A further development of the circuit in Fig. 9 is the pro- grammable amplifier stage shown in Fig. 10. Depending on the levels of VC,. VC 2 and VCs , voltage divider Ra-Ra', Rb-Rb'. or Rc-Rc’ provides the bias voltage for the inverting in- put of the opamp. Feedback re- sistor Rc prevents the opamp from being configured for its maximum open-loop gain in the absence of control voltages for the IR LEDs. VC.. . .VCa should be obtained from a make- before-break rotary switch, or the logic equivalent of it, to pre- vent the output level of the cir- cuit from varying during the switching over to a different am- plification factor. Fig, 11 il- lustrates the use of the H11F3 in a switchable active filter. This circuit can be dimensioned to function as a click-free rumble or high-frequency noise filter. For relatively low values of the frequency determining re- sistors, it may be necessary to study the effects of changing the values of RV. and RV; , In conclusion of this miscellany of basic circuits and practical ap- plications, Fig. 12 shows an electrically isolated input amplifier, which is also usable as a safe signal processor for sensors in biological and medical measurements. EK Distributors of GE products in the UK: Distributed Technology: (08833) 6161 • Farnell Electric Company: (0532) 636311 • STC Electronic Services: (0279) 26777 • Hero Electronic: (0525) 4Q5015. battery saver W. Jitschin With many electronic games, such as heads-or-tails, roulette, or any of the versions of electronic dice, a consider- able saving in battery life can be obtained by ensuring that the circuit, or at least the current-guzzling displays, are switched off after each throw or turn. Naturally enough.it would be somewhat tiresome to have to do this by hand, so the following circuit is intended to take care of this chore automatically. Basically the circuit is a simple timer Pushbutton switch SI is the start button for the die, roulette wheel, etc. When depressed, it causes capacitor Cl to charge up rapidly via D1. Transistor T1 is turned on, so that, via T2, the relay is pulled in, thereby providing the circuit of the game with supply voltage. When the switch is released, initially nothing will happen. Cl discharges via Rl, R2 and the base-emitter of T1, however it takes several secondes until it has discharged sufficiently to turn of T1. When it does so, however, the relay drops out, cutting out the power supply to the die, etc. With the component values shown in the circuit diagram, a delay of roughly 3 seconds is provided in which to read off the display. If that interval is too short (or too long), it can be modified as desired by choosing different values for Cl and/or R1/R2. MSX EXTENSIONS - 4 I/O and timer cartridge Fourth in our series on simple to make extension boards for the MSX series of computers is a versatile, cartridge-size, input/output plus timer module, primarily intended to drive the computerscope featured in our September and October 1986 issues. This article presents those many owners of an MSX com- puter with an interface exten- sion board featuring ■ 32 (4 times 8) I/O lines; ■ 4 programmable timers: ■ user-definable address de- j coding; ■ daisy-chained interrupt con- figuration. j All of these functions have | been realized on a single, car- , tridge-size board which can be I housed in a common music cassette box. Although the first aim of this design is to provide ' an interface between an MSX j computer and the computer- scope, the I/O and timer car- | tridge can fulfil a variety of ! tasks. For instance, there is the field of robotics where stepper | motors are to be driven via a I computer interface (see Univer- j sal control for stepper motors, elsewhere is this issue). The present extension board is Fig. 1. Block diagram of the MSX I/O and timer cartridge. also tailored to drive an MSX EPROM programmer, which will be detailed in a forth- coming issue of Elektor Elec- tronics. However the present article will mainly focus on how to use the I/O and timer car- tridge in conjunction with the computerscope. The previous instalments of this series were published in the January, February and March 1986 issues of Elektor Elec- tronics. Block diagram Figure 1 shows the various func- tional blocks comprised in the I/O and timer cartridge. The cartridge address decoder defines the I/O channels through which the card is ac- cessed by the Z80 microproces- sor. It will be recalled that MSX computers use I/O mapping based on 25S (2 s — 1) channels, rather than reserving a specific address area in the system RAM to transfer I/O data and I/O status/control words. After the processor has selected the cartridge by means of an appropriate I/O in- struction. the expansion ad- dress decoder is enabled to select either one of two parallel I/O blocks, or the timer block. The expansion control bus pro- vides the peripheral blocks with information as to the nature of the word then present on the databus, since this is used to bidirectionally transfer both data and status/control words. Each I/O block comprises two sets of 8 I/O lines plus associ- ated peripheral handshaking lines; the cartridge, therefore, has 32 I/O lines in all. ie. enough and to spare for all sorts of applications. The timer block comprises 4 in- dividually addressable coun- ter/timer units in a single chip. The cartridge hardware With the use of three LSI chips from the Z80 peripheral support family, the circuit diagram of the I/O and timer cartridge, shown in Fig. 2, closely resembles that of the block diagram. Cartridge address decoder ICs compares a preset 4-bit address with CPU address bits A--A?. and activates its A=B output whenever the two configur- ations match. i.e. when the com- puter accesses the cartridge. The previously mentioned 2SS I/O channels can be addressed via the least significant byte on the CPU address bus (Ao-A-), while IOEO indicates a CPU I/O cycle rather than a memory access cycle. In MSX BASIC, in- put and output instructions are simply INP (xxx) and OUT xxx, n, respectively, where xxx is the I/O channel and n is the byte to be output. Since I/O channels 64 through 255 are reserved for standard MSX software and hardware, At and A; in the preset address nibble are hard-wired to ground (logic low) so as to avoid I/O contention problems be- tween the cartridge and resi- dent I/O mapped hardware. Table 1 shows the jumper con- figurations to define the 16-channel I/O block through which the cartridge is to be ac- Address comparator ICs need not be strobed with IUKQ as the peripheral LSI chips ICi, IC2 and IC3 each have their own lOKQ input to this effect. ICi is a dual 2-to-4 line decoder which provides the PIOs (Par- allel Input/Output) and the CTC (Counter/Timer Control- ler) with CE (chip enable) pulses. These three peripheral functions are selected by an ap- propriate bit-configuration of address lines At and A3, pro- vided, of couse, the A=B output of ICs is logic high. Note that output 3 of decoder 1 in ICi (pin denotation: 103) is used to drive the active low E2 (strobe) input of decoder 2; decoder 1, therefore, merely functions to invert the A = B output from ICs. If selected with CE, the PIOs Table 1. The cartridge address block assignment. Fig. 2. Circuit diagram of the multi-l/O and timer extension for MSX computer 3-41 flow— i.e. CPU to peripheral, or I vice versa— is determined by j the logic state of the HD line, j Provision has been made to process PIO or CTC-generated interrupts by connecting the I NT outputs of IC«, IC2 and IC3 . in a wired-OR structure. The daisy chain connection of the IEI and 1EO (interrupt enable input and output, respectively) signals is essentially a method of interrupt priority assignment. In the cartridge, ICi has the highest interrupt priority, ICj the lowest. Once ICi activates its INT output, IC? and ICj are disabled from outputting inter- rupt requests to the processor. In this system, high-priority peripherals automatically over- ride INT requests from devices "further down" the daisy chain. Upon receiving an INT pulse, the CPU polls the peripherals to determine the origin of the INT request. This is done by means of an INTACK (int errupt acknowledge; HI AND tORQ) pulse, which causes the rel- evant peripheral to respond by putting a vector byte onto the databus. This vector is used as the LS address byte for the in- terrupt service routine. In a Z80-based system, pulses HI and 10R Q are used to form the INTACK pulse, while the inter- rupt vector is loaded into the < devices during the initialization | routine. PIO ICj has been assigned the highest priority on the cartridge since PIO ICj and CTC ICj are not used in the driving of the computerscope. ' The chips on the cartridge board are either fed from the computer + 5 V supply, or from an external supply connected to pins 21 (GND) and 22 (+5 V) of 50-way output connector Kj (remove link e). If all chips in the cartridge are of the CMOS [ type, the supply capacity of the computer should be adequate. I and link e can, therefore, be left I in place. In theory, the appli- cation of standard NMOS chips in the ICj, IC2 and ICj positions requires the cartridge to be fed from an external supply, as the | total (worst case) current de- mand of the board is then about I 320 mA, exceeding the avail- able 300 mA supply capacity of the computer slot. In practice, however, we measured a cur- j rent demand of about 100 mA [ with NMOS chips fitted in the | circuit, which could, therefore, be fed from the computer with- out overloading the internal +5 V supply. From these observations it can be seen that it is good practice to measure the actual current consumption of the cartridge before deciding on computer or external supply. Programming the PIOs The Type Z80A PIO from Zilog features two 8-bit ports, which can be set to one of four poss- ible operating modes by writing an appropriate byte to the command register in the chip. The logic state at the B/A SEL input determines which one of the two ports is to be j read from or written to (port A | or B). while the bit at C/D SEL indicates transfer of a con- trol/status word (C) or a data word (D) via the 8-bit databus. Address lines Ao and A- drive B/A SEL and C/D SEL, respect- ively, enabling the user to con- figure each PIO for any one of its four possible modes. MODE 0 selects the port A & B byte output mode. MODE 1 the byte input mode. MODE 2 the byte input/output mode, and MODE 3 the bit-programmable in- put/output mode. Modes 0 1 and 2 operate on the basis of interrupts, and can, therefore, only be used with the Z80 CPU programmed to operate in' its interrupt mode 2. This requires running a machine language program to define the address of the inter- rupt service subroutine. In the case of the MSX computer, however, the VDP-generated in- terrupts must first be disabled with instruction VDP (1)=VDP(1) AND 223. Following the servic- ing of the cartridge-generated interrupt, the display interrupts must be enabled again by re- programming the Z80 for mode 1 interrupt operation and next running command VDP(1)=VDP (1) OR 32. Considering the complexity of the foregoing programming se- quence, it was thought useful to further examine PIO MODE 3, which enables ready program- ming— i.e. in BASIC— of the car- tridge without the need to observe the intricacies of inter- 1 rupt service subroutines. Those MSX users interested in using 1 PIO MODE 0 1, or 2 should con- I suit Zilog’s copiously detailed I Components Data Handbook. ' or their Z80 Applications Hand- The following instruction se- quence initializes MODE 3 in the PIO: Mode Control Byte = &HFF (define MODE 3); I/O Register Control Byte = &Hxx (see example below); Interrupt Control Byte = &H07 (interrupts disabled); Interrupt Disable Byte = &H03 (may not be required); The byte written to the I/O register in the PIO determines whether the individual lines are inputs (logic 0) or outputs (logic 1). Example; sending byte &HF0 to the I/O A register sets port lines Aa, Aj, Aj and Aj to in- puts. while A«. As, A6 and Aj are set to output operation. After the initialization routine, data can be output and input via the port lines. Evidently, each of the ports must be initialized as set out above. This is done by selecting the appropriate chip (I/O address lines A 1 and Aj), the appropriate port (A/B), and control /data access, as re- quired. All of this is ac- complished by a sequence of write instructions to addresses within the cartridge I/O block. Programming the CTC The Type Z80 CTC comprises four individually configurable counter/timer circuits. The function of each bit in the CTC control byte is shown in Table 2. The stated time constant (bit Dj) determines the number of pulses before the ZC/TO output goes high. Each timer/counter will continue to operate until a software (Dj) or a hardware reset (pin 17) is received by the CTC. Construction Since the proposed I/O and timer module is to function as a plug-in cartridge for MSX com- puters, there can be no doubt about the need for a ready- made, double sided, and through-plated PCB— see Fig. 3. As there are relatively few com- ponents on this board, no prob- lems are envisaged if due care is taken to solder accurately; many tracks run quite close to another and are, therefore, in danger of being accidentally shorted by excess solder. There is an important point to note before actually starting to populate the board. Make sure that it fits into the prepared music cassette holder; it may be necessary to do without IC sockets to ensure the absolute minimum height of the board, in order that the cassette box can be closed properly. The reel posts and any other studs in the cassette box must be removed, and a rectangular slot should be cut as shown in Fig. 4. The home-made cartridge must be sufficiently sturdy to be able to withstand being plugged in and removed again quite Ire- 1 quently, without developing contact problems on the con- 1 necting copper tracks at the slot side of the board. MSX software for the computerscope The general programming Fig. 3. Component mounting pla methods for operating the com- puterscope (see Elektor Electronics, September and October 1986) in conjunction with an Electron, C64, or BBC computer, also apply to the MSX software supplied with PC board Type 86125. However the limited screen resolution of MSX computers necessitates a slightly different position for the oscilloscope controls texts-see Fig. 5. The various scope "controls" can be selected as required by means of the function keys on the MSX keyboard, while the cursor positioning keys permit setting the requisite parameter value. In view of the previously men- tioned limitation imposed on the attainable resolution of the MSX screen (192x256 dots), it was found impossible to retain the quantifying figures along- side the vertical and horizontal The function keys FI through F9 on the MSX computer are pro- grammed to do the following: FI sets the required amplitude and merits no further comment. F2 and F3 serve to set the ver- tical offset and the trigger level, respectively. This involves the displaying of an absolute voltage level, and, since the trigger level is comprised in the sample byte, changing the ver- tical offset causes the trigger level to be changed accord- ingly. The computer displays the trigger threshold thus ob- tained by a small, blinking, bar. The screen division (graticule) can be defined either in 1-pixel Fig. 5. Two examples of the use of the screendump option offered by the computerscope software. 3-43 I increments (cursor up/down), j or in 8-pixel increments (cursor I | left/right). This arrangement is I also valid for function 7. F4 selects the trigger mode: | automatical, manual, or exter- ; nal. The automatical trigger mode causes the computer to | establish the trigger level after depression of the space bar. In the manual and external modes, the computer waits for the spacebar to be pressed a sec- ond time, indicating a manual trigger pulse, or a trigger j enable pulse (EXT). F5 selects input mode AC, DC, , or GND (0 V). F6 sets the timebase. F7 sets the horizontal position of ; the trigger instant. F8 selects a positive or a negative trigger slope. F9 selects the display mode: ' single (+ delete), continuous (+ delete), or continuous. Press- ing the DEL key causes the dis- play to be erased before showing a new image. F10 permits outputting the screen page contents to a printer (screendump mode). The initialization routine in the MSX computerscope program is specific to the Smith Corona series of printers; other types may require rewriting the routine to suit the relevant bit image mode and the print head layout. With some skill in j machine language program- i ming, writing one's own screen- | dump subroutine is con- veniently started by carefully studying the Smith Corona ver- I sion supplied. Table 3 shows a straightforward test program to check the per- ! formance of the cartridge and the computerscope board, in a j similar manner as already de- tailed for the BBC and Electron computers. The cartridge is connected to the com- puterscope as shown in Fig. 6. < It is seen that the PIO handshak- I ing lines ARDY (port A ready) I and ASTB (port A strobe) are I not used in the basic set-up. I However to improve upon the [ overall speed of the communi- cation between computer and i computerscope board, one of | the unused inverters Nu-Nn on the latter may be connected as shown in Fig. 6 to effect inver- sion of the READY output of the J computerscope board. It must 1 be noted, however, that the I MSX software supplied is based on PIO MODE 3, as already de- tailed. and therefore does not support the use of the hand- j shaking lines. Experienced ; programmers may have a go at writing an interrupt servicing routine that does permit the use | of ASTB', while ensuring that I the MSX screen timing (VDP) remains correct. In all, the writing of a subroutine satisfy- ] ing the foregoing conditions is rather specialized work, and if you feel not quite sure about it all, simply leave the ASTB line open and the set-up will still be sufficiently fast. Finally. MSX users interested in further details on machine language programming will | find invaluable information in The MSX red book, by Avalon Software, and in Behind the Screens of MSX. by Mike Shaw. ’ Both books are published by Kuma Computers Limited; Pangbourne; Berkshire. Tele- phone: (07357) 4335: Telex 849462 TELFAC. These new publications will be reviewed in the New Literature columns i in a forthcoming issue of Elektor Electronics. The next instalment in this series of articles will deal with a MSX EPROM programmer, which operates in conjunction with the I/O and timer car- ! tridge. AR Table 3. MSX-test computerscope. 10 SCREEN 2 20 A = 3*16 30 DA = A + 4: DB = A + 5: CA = A + 6: CB = A + 7 40 OUT CA. 255: OUT CA. 0: OUT CA, 7: OUT DA, &H10 50 OF = 0: IN = 1: Nl = 0: TH = 0: TB = 8: AM = 8: TR=0 60 OUT CB. 256: OUT CB. 0: OUT CB.7 70 OUT DB, (OF + 64 4 128*IN): OUT DA, &H14 80 OUT DB. (NI + 64. 128*TH): OUT DA, &H12 90 OUT DB, (TB + 16*AM): OUT DA, 6H11 100 OUT CB. 255: OUT CB. 256: OUT CB. 7: OUT DA. 0: OUT DA. &H40: OUT DA. &H10 110 HO = TIME + (TB + 11*50 120 IF HO>TIME THEN120 130 IF TR = 0 THEN OUT DA, &H30 140 IF TR = 1 THEN OUT DA. &H38 150 IF TR<>2 THEN 160 ELSE IF INKEYS - " " THEN OUT DA. &H90 ELSE 140 160 HO - TIME + 3*ITB *11*50 170 OUT DA. 0: OUT DA. &H20: OUT DA. 0 180 CLS 190 PSET (0.85) 200 FOR 1 = 0 TO 256 STEP 2 210 LINE -11/2. 1S0-INPIDBI/2I 220 OUT DA. &H40: OUT DA. 0 230 OUT DA, &H40: OUT DA, 0 240 NEXT 250 OUT DA. &H20 260 FOR I =256 TO 512 STEP 2 270 LINE -11/2. 150-INPIDBI/2) 280 OUT DA, &H60: OUT DA, &H20 290 OUT DA, &H60: OUT DA. &H20 300 NEXT 310 GOTO 50 6 2 A6 PA6 4 PAS 6 A4 PA4 8 A3 PA3 10 PA2 12 A1 PA < A0 PAjf *\ READY - O 1— READY i» B7 9P7 B6 p B6 J B5 PB5 B4 PB4 1 B3 PB3 B2 PB2 B1 p B' B0 PB0 19 IB 1 artridge compute rscop Fig. 6. Overview of connections between the cartridge and the computerscope. die Junior Computer us a frequency counter G. Sullivan 74145, Typical dissipation lor this device is 215 mW and approximately 360mW maximum, this is in the Microprocessor systems are often regarded as mathematical wizards, so the Junior Computer's aptitude as a frequency counter will come as As the name suggests a 'frequency counter ' records a recurrent series of events. This does not necessarily have to be anything to do with electronics. The merry month of May, for instance, (and any other month, for that matter) has a frequency of one sunset every 24 hours (although it isn't often seen in the British Isles). To take an electronic example, if an AC voltage changes its polarity one hundred times per second, this is referred to as a frequency of 50 Hz. The point is, by what criteria is fre- quency measured? In the second example the number of polarity changes (from positive to negative, or vice versa) that occur during one second are simply counted. When a microprocessor is "hired' to do the calculation work, a program consecutively displays the contents of three display buffers, in other words the last frequency to be measured. The program is interrupted either once the one second measuring time has passed, or the AC voltage has gone low. A new program is now run to check the cause of the interrupt. If a zero-crossing was involved, the period counter is incremented by one. But if the measuring time (1 second) has passed, the contents of the counter memory locations are copied into the display buffers. At the same time, a new measuring period begins. At the end of the process, a return is made to the main routine, after which the whole procedure starts all over again. 2 ADDITIONAL ZERO PAGE LOCATIONS ACCUH MH9D2 TIMEL 8W1D5 Figure 2. This circuit is added to the Junior Computer to effect the program in figure 1 . The events are depicted in the flow chart in figure 1 . A certain amount of hardware is also needed and this is shown in figure 2. This circuit is connected to the port connector of the Junior Computer to allow the frequency data to be entered into the computer. A significant nega- tive zero-crossing in the input signal will pull port line PA7 low. The program makes sure this is accompanied by an IRQ. The software is provided in the table. The start address of the program is SIAM When data is written into location EDETC, PA7 is pulled low thereby enabling an IRQ. Preparations include defining the IRQ jump vector at the start address of the IRQSRV inter- rupt routine, starting the interval timer (CNTH, in other words, an IRQ is enabled after every 1024 clock pulses) and storing the contents of location COUNT. Then the program LOOP is run until an IRQ takes place. As soon as any type of IRQ is detected, the IRQSRV program is run. After saving the A, X and Y contents (used during SCANDS) on the stack, the computer examines the N flag. If N, or rather the timer flag, is zero, the IRQ cannot have been enabled by a time out. This means that it must have been caused by a change in logic level on PA7. A new AC voltage period has passed and so the computer pro- ceeds to label ADD. The 24-bit BCD number (ACCUH, ACCUM. ACCUL — the period counter in figure 1 ) is in- cremented by one. After restoring A, X and Y (EXIT) and executing an RTI, the computer returns to LOOP. Supposing the IRQ was caused by a time out in the interval timer. The timer is started afresh and the contents of COUNT are decremented by one. Provided COUNT has not yet reached zero, a jump will be made to EXIT. If, however, COUNT is in fact zero, the STORE section is run. The measuring period has now passed and the display buffers. POINTH, POINTL and INH, are assigned values equal to those of ACCUH, ACCUM and ACCUL, respect- ively. So much for the program, let's put everything into practice. Connect the circuit in figure 2 to the port connector, enter the program on the keyboard (or even better, read it in from cassette) and start it via the main JC keyboard. (The main JC keyboard must be used, so as to provide the I/O definition for SCANDS.) The highest frequency that can be measured is about 10 kHz. At low frequencies greater accuracy may be obtained by extending the measuring time to 10 seconds (load A0 instead of 10 into TIMEH, address $ 1 A 1 6) . The result on display will of course have to be divided by ten to give the correct frequency. Literature: Chapter 6 of the Junior Computer Book II. For Junior Computer Book & Kit see page 3 64 A theory which has been with us for some time and which is rapidly gaining credence relates to the quantity of negative ions in the air. A high concen- tration of such ions is both physically and mentally healthy. One element of scientific thought actually states that the quantity of negative ions contained in the air around areas such as St. Moritz is high, which is one reason for the invigorating effect these resorts have on tourists. There certainly seems some truth in these suggestions as negative ion generators are gaining in popularity. Even institutions traditionally known for their ultra-conservative attitude towards new ideas are now using them. We published a circuit for a domestic ioniser a couple of years ago operated by the mains supply and the idea came to adapt this circuit for use in the car. The circuit design for a suitable power supply is shown in figure 1. It could be loosely termed as a d.c. to a.c. converter. The 555 timer (IC1) produces 7.5 kV. The output is then connected to a sewing needle or something As most readers already know the electric field strength around a charged body is greatest where the curvature is also greatest, hence a sharp point. An intense field is therefore present at the tip of the needle with electrons being 'sprayed' onto the air molecules nega- tively charging them. Each batch of negative ions is repelled by the negative charge of the needle point allowing new air molecules to be processed. The result is a constant flow of ions away from the needle which feels very much like a light draught. This in itself will have a refreshing effect upon the driver and passengers without giving consider- ation to the metabolic benefits of an increased concentration of negative Keep in mind that apart from generating negative ions the needle will also pro- fresh air on wheels The circuit is one way of increasing the concentration of negative ions in the surrounding air, resulting in improved mental concentration, and reaction speed making roads just that little bit safer. At the very least it will refresh the environment. Bombay-400 007 Ph 367459. 369478 Tele x: 101 1 1 76661 ELEK IN a square-wave signal with a frequency around 85 to 100 Hz. The values of R1 and the combination of PI and R2 have been chosen so that the square- wave produced is symmetrical. This is then fed to transistors T1, T2 and transformer TR1. The result is an a.c. voltage across the two secondary wind- ings of the transformer of approxi- mately 400 V (square wave) . Figure 2 shows the circuit diagram of the ioniser which consists of a 27 stage voltage multiplier, in order to step up the voltage from 400 V to around duce ozone (O3). This can on the one hand have certain advantages as it oxidises organic gasses. Carbon monox- ide for instance, can be reconstituted into carbon dioxide which is far less harmful. However, ozone if breathed in large quantities can cause irritation of the respiratory system, because of its corrosive and therefore poisonous nature. We therefore do not recommend using the ioniser near to asthma suf- ferers and please remember that for normal use the ventilation system of the car should be reasonably effective. The printed circuit board and com- ponent layout for the ioniser are given in figure 4. Great care is needed to mount the components. Make sure all soldered joints are smooth and neat as any protruding wires or spikes of solder could result in unwanted discharges. This is especially important towards the 'high-voltage' end. Resistors R1 to RIO limit the current flow in the event of the needle being touched. Lowering the value of these or omitting them is unadvisable as it could result in a fatal shock. Any sharp needle will do as long as its connection to the printed circuit board is short and rigid. Obviously the needle should point outwards and to prevent accidents a short piece of 30 mm plas- tic pipe should be mounted coaxially with it. After some use the point will become dirty and possibly eroded, so making the needle removable for cleaning is also a good idea. Safety first is a good motto to follow when mounting the circuit in the car. Use an insulated box to contain the electronics and position the unit within the car so that it is not a hazard to unsuspecting passengers. H Figure 2. The circuit c >f 27 diodai end 27 c« 3-48 37 3-49 selex - 21 CHARGING/ DISCHARGING The capacitor is a device that can hold electrical I charge; and when fully j charged, the voltage across it is same as the charging battery voltage. Naturally, when the capacitor is fuly discharged, the voltage across it is zero volts, j Figure 1 shows the connection of a capacitor directly across a battery. When the capacitor is first connected across the large current rushes from the battery to the capacitor. As the charge accumulates on the capacitor, the voltage across it rises quickly to the battery voltage and the | current flow stops. All this happens very fast because there is no resistance in the circuit. If we introduce a resistance in the current path, the initial high current will be limited by the value of resistance. This will slow | down the charging process. We can observe this process experimentally using the circuits shown in figures 2 and 3. The following components will be required for the experiment: 1 Battery of 4.5 V 1 Resistance of 330 / '/sW 2 Red LEDs 1. Electrolytic Capacitor of 1000 uF/IOV 1 . Multimeter. A small change over switch can also be used to make | I Connect the circuit as ; shown in figure 2 except for the connection between the LEDs and the plus pole of the battery. Observe the capacitor polarity correctly. The LEDs are connected in parallel with their polarities in reverse directions. Each of the LEDs will thus indicate current in one direction. The voltage across the capacitor is initially at OV as it is discharged. Now make the connection between the LEDs and the plus pole of the battery. ! Observe the multimeter and the LEDs. The voltage on the capacitor starts rising and LED1 glows. At first the voltage rises very fast and ■ LED1 glows brightly, but soon the voltage rise slows down and glow of the LED starts decaying. This indicates the nature of charging process. The multimeter shows the capacitor voltage and the brightness of LED shows the intensity of current flowing to the capacitor. The capacitor voltage finally reaches about 3 V and not 4.5 as expected. This is due to the voltage drop across the LED. After the charging process is complete; the connection removed and connected to connecting the LEDs to the minus pole of the charged capacitor. This time the voltage across the capacitor starts falling and LED2 glows. The voltage drops to about IV. This, once again, is due to the LED. The discharging current can't "" Hm Jl “ LE01 r|o| I Resistance (+) IjJ | Voltage | a 1 Charging Currer • — 1 — Capacitor | C I* -L I 3-50 selex current flows during discharging and becomes zero again after the capacitor is fully discharged. observations again: — When the battery is connected across the RC circuit, the capacitor voltage rises continuously. The voltage across the resistance and current through it are initially high and fall continuously. — If the RC circuit is disconnected from the battery and short circuited, the current through the resistance flows in reverse direction. It is high initially and then falls continuously to zero. The capacitor voltage also drops continuously and reaches zero in the end. Figure 4 shows the schematic circuit diagrams and the curves of capacitor and resistor voltages. These waveforms show an interesting feature of the RC circuit. The capacitor voltage is a pulsating DC voltage where as the resistance voltage is an AC voltage. This type of RC obtain an AC voltage from a pulsating DC voltage as shown in figure 5. 3-51 selex PHASE SHIFT capacitor for charging in the reverse direction. At this stage the capacitor polarity is incorrect, but the capacitor can withstand the voltage reversal as the voltage is small. The RC-Circuit is one of the most used basic circuit in electronics. In the previous I 'Charging/Dischargmg we j have already seen the effect of giving a pulsating DC I voltage at the input of an | RC circuit as shown in figure 5 of that article. A similar circuit is also shown in figure 1 here however, shown connected to an AC | square wave as well as the | DC pulsating voltage. A close look at the output waveforms will show that | the Resistance voltage is whereas the capacitor ■ voltage in the second part of j the figure is an AC | waveform. The AC squarewave voltage can be practically generated by using an astable multivibrator circuit. The I AMV circuit is shown in I figure 2. The two transistors I become alternately j conductive. This can be collector circuits of each transistor. The LED in the I collector circuit of a | conductive transistor glows I brightly. Both the LEDs j (LED1 and LED2) glow alternately, showing that transistors T1 and T2 are conductive alternately. Consequently, terminal A is more positive than terminal B for some time and then terminal B becomes more positive than A for some time. This effectively gives I an AC squarewave between terminals A and B. The component requirement attempt. The frequency of the square wave is about 1 Hz. Thus the LEDs will ; alternately glow once every second. The component j layout is shown in figure 3. The RC circuit can be connected to the AMV by 1 connecting the links A and 3-52 B. The RC circuit is made of a resistance of 1 0011 and a capacitor of 1000 uF 16V LED3 and LED4 are used to indicate the nature of capacitor voltage When terminal A is positive. LED1 and LED3 illuminate LED1 , because T1 is conductive and LED3, because the capacitor voltage is positive. | However, LED3 becomes bright somewhat later than I LED1. because the capacitor i takes some time to charge to the full voltage. When terminal B becomes more I positive than A. LED2 and LED4 illuminate. In this case LED4 becomes bright j later than LED2. because of ■ the time taken by the If we make a chart of AC Voltages from our observation of the LEDs as shown in figure 4. we can see that the AC voltage on the capacitor is delayed in comparison with that at tire input of the circuit. This is call PHASE SHIFT. In actual practice. LED1 and LED2 are never extinguished completely because of the capacitor charging current. Figure 5 shows the phase | shift in case of a sinusoidal AC voltage applied to the RC circuit. The larger waveform is the original j input voltage. The smaller waveform Is the capacitor voltage It is not only delayed but has reduced amplitude, because a portion of the input voltage must appear across the resistance also. Here the phase shift is about 60 The amplitude of output Volage is frequency dependent — The capacitor behaves like a frequency dependent I a high frequency AC jltage. The maximum Summary I? 3-53 selex SIMPLE DIMMER As we have already seen in our Jan.issue. a dimmer is quite a simple device and works on the principle of phase control. One can buy a dimmer from the market switch board. You can also construct a I dimmer at home, but don't expect to get the components at a lower cost compared to a bought out dimmer. The cost of your home made dimmer will be almost same - if not morel The size of our home made dimmer will also be larger compared to the dimmers available in the market Ther is no reason to get depressed. Our dimmer can do more than the standard dimmer. It can also be used as a drill speed controller. The noise filter used in our circuit is also better. You may not always find a ripple filter choke in commercial The Circuit The circuit of the dimmer is j shown in figure 1. It has two most important j components - a Triac and a Diac. The RC combination is a bit complex and the theory will not be discussed in detail at this stage. The RC j combination shown in the ] circuit consists of R1, R3. PI , P2 and Cl . R1 prevents the | rapid charging of the j capacitor. This eliminates the possibility of the Triac j getting triggered too early. A short pause between the blocking and triggering in Triac is essential. Besides this. PI is protected against large currents. Function of PI is to decide how rapidly capacitor Cl is charged. It is possible that due to the large tolerances generally expected on the commercial quality of components, the circuit may not produce proper triggering just by using the combination of R1 and PI . This is the reason for connecting R3 and P2 in parallel with R1 and PI. The adjustment is achieved by this compex combination for proper functioning of the circuit, the procedure is later described in paragraph entitled "Adjustments". The series RC combination of R2 and C2 fulfills many functions. The first of all is the protective function. The Thyristors and Triacs are sensitive to excess voltages and voltage spikes. Such type of situations may arise inside the circuit itself or may come from outside on the mains line. Special care j must be taken in case of inductive loads like motors, being operated through the dimmer circuit. The series | combination of R2 and C2 suppresses these disturbances and protects | the Triac from any damage. Another function of the R2 C2 combination is in connection with the ripple filter choke LI . The phase j control action and the triggering during every half j cycle produces a high frequency disturbance on produce noise in audio 3-54 HALF WATTAGE DIMMER A low cost dimmer can be easily constructed using just a diode if reducing the power to half in one step is acceptable. Compared to the commercially available dimmers with continuously variable output, this dimmer costs almost nothing and can be constructed in a few minutesl Figure 1 shows the effect of our diode dimmer. The mains voltage is rectified by the diode and the output is just a series of half waves in the positive direction, the negative half being blocked by the diode. Effective voltage is thus reduced to I half. Another effect of the diode dimmer is that if a light bulb is connected to it, it shows slight flickering due to the negative half I waves being blocked by the diode. The lamp does not I receive any current during the light output reduces. 1 This effect becomes less visible when the filament becomes sufficiently hot. Figure 2 shows the connection of a lamp through the diode. Such a connection also increases the life of the lamp, and is suitable for lamp used in I staircases and passages. In addition to saving in cost of replacement of such lamps, it saves us the trouble of replacing these lamps which are generally at some inaccessible positions. Using two switches as shown in figure 3, one can have a choice between half and full power. The diode can be easily accomodated in the switch housing. Figure 4 shows a typical connection, which can vary with actual types of switches available. 3-56 »l*kio» tndia march 1987 shock, using a mains voltage tester While selecting the diodes it should be always remembered that the incandescent lamps draw high current at the time of switching on Diode types 1 N4004 to 1 N4007 are suitable for lamps upto 100W. Such type of a diode dimmer is also useful for preventing overheating of soldering irons. Most low priced soldering irons get overheated when they are left unused for some time during soldering work. This completely vaporise and then gives rise to defective solder joints. A simple arrangement using a diode and a microswitch can prevent this. One such possible arrangement is shown in figure 5 Whenever the soldering iron is kept on the hook, the lever is pulled down, releasing the micro switch and brings the diode into circuit. When the soldering iron is lifted off the hook, the micro switch closes and the diode is bypassed, thus providing full power to the Two important things must be kept in mind while trying out the diode dimmer described here. First and most important is that mains voltage must be completely switched off from the Electrical Mains Switch or the Mains Fuse must be taken out before doing any rewiring of switches to include the diode in the K A circuit. Not doing so may result in a fatal accident. You must ensure that all the lines are free from mains voltage, before doing anything with the electrical switches and wiring. Second thing to remember is that the doide dimmer will work only with resistive loads like incandescent lamps, soldering irons, heaters etc. and not with inductive loads like fans. Make your HI FI sing better. Bipolar/nonpolar Capacitors from ELCOT for double edged advantage. When your product, a HIFI audio equipment, seeks out a golden note from the groove, a lot ot things have to work In pertect harmony. The beauti- lul circuitry you conceive, must be made with quality compo- nents. Any compromise tells on the output. The range of Bipolar/Nonpolar Capacitors from ELCOT are unmatched in performance They are being used in quality HIFI circuits and also where the polarity of the signal is not known. You are getting them upto50 V and with a range of 0.47 MFD to 47 MFD Other voltage and MFD, if required, can also be manufactured Select one of them, make the HIFI equipment made by you sing better Go in for ELCOT components. For dependability, reliability and on-the-dot delivery i ELCOT Electronics Corporation of Tamil Nadu Ud., (A Govt, of Tamil Nadu Enterprise) lings, 735, Anna Salai, Madras 600 002 Phone 89642/88005. Tele* 041-6113 LCOT DiPR/ 54 ; Branch Offices . 2/20. A Jangpura A Hospital Roa J.PRoad. Andheri (W) Bombay - 58 Tel 622042 Warrtam Road. Cochin - 1 6 . NEW DELHI 1 10014 Tel 694076 1 49/A Motilal Nehru Road. Calcutta 4o.3. 22 Sunil Shopping Cenlre. Opp Navrang Thea R a byte Micro Devices (lei 734663 6436990). Orvil Electronics (Tel : 5727407 pe* Pvt Lid (-Tel 41 363271 PUNE . Esteem Infrastructure (Tel : 64037. 636811. RANC^ORE 0 HUU, 3 ^ 5 ’ CALCUTTA M A ShahiTn 3699 2661861 BARODA Mamvell Services Corpn (Tel 43643 Maut 5>» Marketing Company (Tel 22741 r. HYDERABAD Marvel Electronics (Tel : 622621 Telirama se V Tel ^ 55l ?*i SECUNDERABAD Cosmos & Electronics (Tel 8224 -y 82577:1 TRIVANDRUM Bhuvanesh Sales corporation (Tel : 61 71 9). 3-58 Multimeter with LEO display. Supplied with excellent probes and main cord SEND OFFERS. Mr Manik H. Nark. 1. Sadhano Plot NO. 21 7. 27th Road. Bandra Bombay - 600 050. FOR SALE - Solid State 5" Oscilloscope rlator Mr RP Kolte. Suprabha'49. Nagar, New Osmanpura. Autanga- - 431 001. SALE • Completely assembled 103 L Mangalore - 676 016 - SOLID STATE Oscilloscope full construction details Mr •akarma. Second Floor. 45. school Road. Calcutta - 700 16/544, Wadia advertising fin* our readers! BLOCK CAPITALS PLEASE - ONE CHARACTER TO EACH BOX Classified Qds adi^ertisers index It glows and glows as the darkness grows. A Solid State switching. Vu meters. Phones. Ferrichrome, Chrome, Meta: S 1 00 db. 20 Hi to 20 Khz. Front mechanism and cabinet availablr — Erictronic. C/o Eric Fernanda Blossom Building. C-26. Sitli Mahim, Bombay-400016. M.O.. Ask (o ELECTRONICS Barsi-413 41 1 CORRECTIONS Universal control for stepper motors February 1987 p. 31 In the first column on page 37 the t Analogue wattmeter The polarity of the 50 pA meter shown i Fig. 3 must be reversed. t Table 4. - 74HCT139. Computerscope - February 1987 p. 61 In Fig. 10. pins 1.3.5 13 of t connector must be grounded. In Fig. 13. signal 4> is omitte present at pin 14. Please add to list: Cst=10 M ; 16 V. CAT-EYE is a Unique Export Quality Night Lamp which glows only in the dark even if you switct it on in the daylight. It saves energy and is ideal for Safety and Security, operating on 230 V A.C. Useful for : • Bed rooms • Dark NOTE : Send M.O. in advance. No D/D or cheque Mfg By TEJUTRON 97. Masjid Bunder Road. Gaya Bldg Bomb STOCKIST WANTED Disposal of Stock! 18/79 M urn SPECIAL RATES FOR VOLUME ORDERS ABC ELECTRONICS 3.07 ACE COMPONENTS 3.62 ADVANCE INDUSTRIES 3.12 ADVANCE VIDEO LAB 3.12 ALAMEEN 3.14 ANANT ENTERPRISES 3.04 APEX ELECTRONICS 3.62 CHAMPION 3.61 COMPONENT TECHNIQUE .... 3.10 CONTROL DEVICE 3.05 CYCLO 3.10 DYNALOG MICRO SYSTEM ...3.15 ECONOMY ENGINEERING ....3.69 ELCOT 3.57 ELECTRONICA 3.04 ELTEK BOOSK IN KITS 2.10 ENGINEERING SYSTEEM 3.08 HIGHTECH ELECTRONICS CORPN 3.06 ION ELECTRICALS 3.06 KLAS 3.66 LEADER ELECTRONICS 3.14 LUXCO ELECTRONICS 3.13 MECO INSTRUMENTS 3.65 MOTWANE 3.11 MURUGAPPA 3.59 NAVIN FLUORINE IND 3.76 NCS ELECTRONICS 3.65 PHILIPS 3.09 PIONEER 3.69 PLA 3.73 PRECIOUS ELECTRONICS 3.71 SAIN I ELECTRONICS 3.14 SCIENTIFIC 3.12 SMJ ELECTRONICS 3.02 TESTICA 3.62 TEXONIC 3.65 THERMAX 3.08 TRIMURTI ELECTRONICS 3.69 UNLIMITED ELECTRONICS .... 3.66 VASAVI ELECTRONICS 3.08 VIKAS HYBRIDS 3.04 VISHA ELECTRONICS 3.75 3-74 ELECTRONICS 349 Ldmmgton Roac i Bombay - 400 007, L Tele 362650. A THE SUPPLIER THAT ALWAYS COMES THROUGH ViSKA contf. Drafi R N No 39881/83 (T richlorotrifluoroethane) and its Methanol Azeotrope the ideal cleaning solvent used worldwide by the Electronic Industry Actual users please contact: nn Navin Fluorine Industries Chemical Division of THE MAFATLAL FINE SPG. & MFG.CO.LTD. Mafatlal Centre, Nariman Point, Bombay 400 021. Tel: 2024547 Grams: MAFINISED Telex: 011-4241 MGMC IN Printer & Publisher - C.R. Chandarana. 2. Koumari. I4lh A Road. Khar. Bombay 400 052. Printed at Trupti Offset. 103 Vasan L'dyog Bhavan. Tulsi Pipe Road. Lower Parcl, Bombay 400 013.