— UK 4 - elektor february 1979 elektor Volume 5 46 decoder Elektor Publishers Ltd., Elektor House, 10 Longport, Canterbury CT1 1PE, Kent, U.K. Tel.: Canterbury (0227) 5443a Telex: 965504. Office hours: 8.30 - 12.45 and 13.30 - 16.45. Bank: 1. Midland Bank Ltd., Canterbury, A/C no. 11014587 Sorting code 40-16-11, Giro no. 3154524. 2. U.S.A. only: Bank of America, c/o World Way Postal Center, P.O. Box 80689, Los Angeles, CA 90080, A/C no. 1235604207. 3. Canada only: The Royal Bank of Canada, c/o Lockbox 1969, Postal Station A, Toronto, Ontario, M5W 1W9. A/C no. 166269 7. Please make all cheques payable to Elektor Publishers Ltd. at the above address. Elektor is published monthly. Number 51/52 (July/August) is a double issue. SUBSCRIPTIONS: Mrs. S. Barber Subscription 1979, January to December incl.: U.K. U.S.A./Can. other countries surface mail airmail surface mail airmail £8.50 $21.00 $31.00 £8.50 £14.00 Subscriptions normally run to December incl. Subscriptions from March issue: U.K. U.S.A./Can. other countries surface mail airmail surface mail airmail £7.00 $17.00 $ 26.00 £7.00 £11.50 Back issues are available at original cover price. Change of address: Please allow at least six weeks for change of address. Include your old address, enclosing, if possible, an address label from a ADVERTISING MANAGER: N.M. Willis National advertising rates for the English-language edition of Elektor and international rates for advertising in the Dutch, French and German issues are available on request. EDITOR U.K. EDITORIAL STAFF W. van der Horst I. Meiklejohn TECHNICAL EDITORIAL STAFF J. Barendrecht G.H.K. Dam P. Holmes E. Krempelsauer G. Nachbar A. Nachtmann J. Oudelaar A.C. Pauptit K. S.M. Wal raven P. de Winter Technical telephone query service, Mondays only, 13.30 - 16.45. For written queries, letters should be addressed to dept. TO. Please enclose a stamped, addressed anvelope or a self-addressed envelope plus an IRC. ART EDITOR: F. v. Rooij Letters should be addressed to the department concerned: TQ = Technical Queries ADV = Advertisements ED = Editorial (articles sub- ADM = Administration mitted for publications etc.) EPS = Elektor printed circuit SUB = Subscriptions board service The circuits published are for domestic use only. The submission of designs or articles to Elektor implies permission to the publishers to alter and translate the text and design, and to use the contents in other Elektor publications and activities. The publishers cannot guarantee to return any material submitted to them. All drawings, photographs, printed circuit boards and articles published in Elektor are copyright and may not be reproduced or imitated in whole or part without prior written permission of the publishers. Patent protection may exist in respect of circuits, devices, components etc. described in this magazine. The publishers do not accept responsibility for failing to identify such patent or other protection. Dutch edition: Elektuur B.V., Postbus 75, 6190 AB Beek (L), the Netherlands. German edition: Elektor Verlag GmbH, 5133 Gangelt, W-Germany French edition: Elektor Sari, Le Doulieu. 59940 Estaires, France. Distribution in U.K.: Seymour Press Ltd., 334 Brixton Road, London SW9 7AG. Distribution in CANADA: Fordon and Gotch (Can.) Ltd., 55 York Street, Toronto, Ontario M5J 1S4. Copyright ©1979 Elektor publishers Ltd. — Canterbury. Printed in the UK. What is a TUN? What is 10 n? What is the EPS service? What is the TQ service? What is a missing link? Semiconductor types Very often, a large number of equivalent semiconductors exist with different type numbers. For this reason, "abbreviated - type numbers are used in Elektor wherever possible: • '741 ' stand for pA741 , LM741 , MC641 , MIC741, RM741.SN72741.etc. e "TUP" or "TUN" (Transistor, Universal. PNPor NPN respect- ively) stand for any low fre- quency silicon transistor that meets the following specif i- ' UCEO. max 20V 1C, max 100 mA hfe. min 100 100 mW fT, min 100 MHz Some "TUN's are: BC107, BC108 and BC109 families; 2N3856A, 2N3859, 2N3860. 2N3904, 2N3947, 2N4124. Some "TUP’s are: BC177 and BC1 78 families; BC179 family with the possible exeption of BC159 and BC179; 2N241 2. 2N3251 , 2N3906. 2N4126, 2N4291 . e "DUS" or "DUG" iDiode Univer- sal, Silicon or Germanium respectively) stands for any diode that meets the following specifications: DUS DUG UR, max IF. max IR, max Ptot, max Cp, max 25V 100mA IpA 250mW 5pF 20V 35mA 100 pA 250mW lOpF Some "DUS's are: BA127, BA217, BA218. BA221. BA222. BA317, BA318. BAX13. BAY61, 1N914. 1N4148. Some 'DUG's are: OA85, OA91 . OA95, AA116. • BC107B'. 'BC237B'. 'BC547B' ell refer to the same 'family' of almost identical better-quality silicon transistors. In general, any other member of the same family can be used instead. BC107 (-8, -9) families: BC107 (-8. -9). BC147 (-8.-9). BC207 (-8. -9). BC237 (-8. -9). 8C317 (-8, -9), BC347 (-8. -9) BC547 (-8, -9), BC171 (-2. -3), BC182 (-3. -4). BC382 (-3. -4), BC437 (-8. -9), BC414 BC177 (-8, -9) families: BC177 (-8. -9). BC157 (-8,-9), BC204 (-5. -61. BC307 (-8, -9), BC320 (-1. -2). BC350 (-1. -2). BC557 (-8. -9), BC251 (-2. -3). BC212 (-3. -4). BC512 (-3. -4). BC261 (-2. -3), BC416. Resistor and capacitor values When giving component values, decimal points and large numbers of zeros ara avoided wherever possible. The decimal point is usually replaced by one of the following abbreviations: p (pico) = 10*’ n (nano ) - 10'* p (micro-)" 10'* m (milli-) = 10'* k (kilo) - 10* M (mega ) = 10* G (giga ) - 10* A few examples: Resistance value 2k7: 2700 O. Resistance value 470: 470 n. Capacitance value 4p7: 4.7 pF, or 0.000000000004 7 F . . . Capacitance value lOn: this Is the international way of writing 10.000 pF or .01 pF, since 1 n is 10' 9 farads or 1000 pF, Resistors are Vi Watt 5% carbon types, unless otherwise specified. The DC working voltage of capacitors (other than electro- lytics) is normally assumed to be at least 60 V. As a rule of thumb, a safe value is usually approxi- mately twice the DC supply voltage. Test voltages The DC test voltages shown are measured with a 20 kO/V instru- ment, unless otherwise specified. U, not V The international letter symbol 'U' for voltage is often used instead of the ambiguous 'V'. 'V'is normally reserved for Volts'. For instance: U b = 10 V, not V b = 10 V. Mains voltages No mains (power line) voltages are listed in Elektor circuits. It is assumed that our readers know what voltage is standard in their part of the world! Readers in countries that use 60 Hz should note that Elektor circuits are designed for 50 Hz operation. This will not normally be a problem; however, in cases where the mains frequency is used for synchronisation some modifi- cation may be required. Technical services to readers a EPS service. Many Elektor articles include a lay-out for a printed circuit board. Some - but not all - of these boards are avail- able ready-etched and predrilled. The 'EPS print service list’ in the current issue always gives a com- plete list of available boards. • Technical queries. Members of the technical staff are available to answer technical queries (relating to articles published in Elektor) by telephone on Mondays from 14.00 to 16.30. Letters with technical queries should be addressed to: Dept. TQ Please enclose a stamped, self addressed envelope; readers outside U.K. plaan enclose an IRC instead of stamps. • Missing link. Any important modifications to, additions to. improvements on or corrections in Elektor circuits are generally listed under the heeding Missing Link' at the earliest opportunity. elektor february 1979 — UK 5 Eurotronics — a world- wide circuit and design idea competition, with over £ 1 0,000 worth of electronic equipment to be won! Note that the closing date for the competition is 31 st March, 1979. p. 2-02 contents selektor eurotronics international circuit and design idea competition UK 14 2-02 optical memory disc 2-03 Ten billion bits, five thousand printed pages, forty five thousand tracks are certainly large numbers, but all of these, and more, are contained on a twelve inch disc in the new computer storage system recently developed by Philips. Every week, predicting the results of the football pools is a time of agonizing indecision. The pools predictor is in- tended to change all this. For each game, infor- mation on the league position of the two teams is fed in;theunit carefully weighs the odds and comes up with its final verdict: 1 , 2 or X. p. 2-06 pools predictor il. Giise) 1 , 2 or X based on statistics D/A for AtPs (T. Basien and P. Haberoetzer) Using a couple of inexpensive CMOS ICs it is not difficult to build a simple D/A converter which affords the possibility of generating analogue signals from software. delay lines One of the most important sound-processing techniques employed by amateur and professional musicians as well as sound recording studios is the electronic delay line. The article takes a close look at the 'ins and outs' of this device, and examines some of the less well-known uses to which it is spot sinewave generator A sinewave with less than 0.0025% harmonic distortion! 2-06 2-10 2-11 2-20 There are a number of measurement jobs which require an AC test signal, which, as nearly as possible, is a perfect sinewave. Not only must the amplitude of the signal be absolutely stable, but the hum, noise and harmonic dis- tortion components must be negligable. The spot sinewave generator will provide a sinewave out- put with harmonic distortion of less than 0.0025%. p. 2-20 clap-switch You clap your hands, and — hey presto — the light comes on I The article describes how to achieve this impressive effect by building a simple 'clap-activated switch'. ejektor squelch for FM radio receivers missing link temperature controlled soldering iron, cackling egg timer, consonant. using Elbug Touch dimmer r flaher Videoscope (9969-2) Videoscope (9969-3) Videoscope (9969-1) 13,75 6,05 15,85 6,25 20.50 42.50 7,45 69.00 5.85 5,40 37.00 oeoeg/wtf. PSTfilLS : You can reach us by phone from monday t friday 13.00 pm to 18.00 pm Saturday 10.00 am to 13.00 pm at Hillington (04856) 553- or by letter to Mike Hutchinson, 2 Lynn road, Grimston, Kings Lynn, Norfolk PE 321 AD. Payment : cheque and postalorder only 4 All prices a add 50p for Overseas ord vat-included , 9t and package 9 please to Holland house calls plei reLEK /— s 593 o? / . de boer ‘ m / elektroniham In. Bw« 39-41 Eindhoven. -M*»w1»nd. 1.1, 040-441229. UK 14 — elektor f ebruar y 1979 .tdiUitfjLJx. G.P.O. uses fibre optics in telephone systems Standard Telephones and Cables' (STC) optical fibre link between Hitchin and Stevenage is now carrying telephone traffic in the public network after having undergone extensive testing since its installation in 1977. Using laser beams guided through two hair-thin glass fibres to carry the signals, the system is able to handle the equivalent of nearly 2000 simultaneous telephone conversations. The 140 Mbit/s digital optical transmission system is the world’s first high-capacity fibre optic telephone link to be installed in the field. The light-carrying fibres are contained in a cable 7 millimeters (about a quarter inch) in diameter and run through six miles of normal telephone cable ducting between the two towns where Post Office exchange buildings house the multiplexing and optical terminal equipment. Two repeaters are spaced at two mile inter- vals in standard repeater cases in manholes along the route. Each repeater point is equipped with two regenerators, one for each direction of transmission. A total of six gallium aluminium arsenide lasers are used in the system. The optical cable comprises two working fibres, a spare fibre, four metal conductors (two of which carry the power to the repeaters and two of which are ‘order wires’ used by tech- nicians) and a filler fibre that rounds out the cable. These eight cores are grouped round a central steel strength member and completely sheathed in polyethylene. Not withstanding its novel method of transmission, the new system works with standard multi- channel digital multiplex equipment. During the past 18 months of continu- ous operation the system has provided valuable data relating to the long term stability and performance which this new technology offers and has been demonstrated to many visiting scientists and potential customers from more than thirty countries covering all five conti- nents. In addition, the BBC has used the link for a successful series of colour television test transmissions. Widespread use of the new optical fibre links can be forecast because of these cables’ outstanding advantages: greatly reduced bulk and weight compared with copper, far greater capacity, freedom from electrical interference, and enhanced security. STC supplied the special optical cable, electronics and the terminal PCM multiplex equipment for the system. Two other associated European companies, Bell Telephone Manufac- turing Company (BTM) of Antwerp, and Fabbrica Apparecchiature per Communicazioni Elettriche Standard (FACE) of Milan supplied the higher- speed multiplexing equipment for either end of the system. (421 S) New developments in 1C technology Considerable progress is being made at the present time in the investigation of new microminiaturisation techniques for manufacturing integrated circuits. With the aid of current photolitho- graphic methods it is possible to make structures of approximately 4 microns on a silicon wafer with an alignment accuracy of approximately 1 micron. By using the ‘Silicon Repeater’, an automatic machine designed at the Philips Research Laboratories in Eindhoven, it has now become possible to impart details of 1 .5 to 2 pm to such a wafer with an alignment accuracy that is approximately 1 0 times greater. As with conventional photolithographic methods the wavelength of light forms the natural limit to miniaturisation here. Simultaneous investigations are also being made at the Philips Research Laboratories in Redhill, England into the possibility of using electron beams in place of light. There are indications that electron-beam lithography may open the door to even greater minia- turisation. It looks as if it will be possible in the future to produce details | of 0.5 to 1 pm with an accuracy of alignment of approximately 0.1 pm using this method. Miniaturisation It is now possible to produce entire circuits, which earlier had had to be made by soldering one component to another, on a single small silicon wafer (this is now known as an integrated circuit). Large circuits which formerly consisted of valves, coils, resistors etc. can now be made on a silicon wafer of a few square millimeters. Transistors and integrated circuits are produced by bringing about local changes in monocrystalline silicon with the aid of foreign atoms in such a way that the electrical properties of these regions become different from those of the area surrounding them. Connecting these regions to one another and to the ‘outside world’ creates an integrated circuit. Because a slice of silicon has a surface area of two to four inches in diameter and a few square millimeters is all that is required for an IC, a silicon slice is good for the manufacture of more than a 1 000 identical ICs. It has been shown that circuits with a large ‘electronics content’ can only be produced with a reasonable yield and at an acceptable price if the total surface area of each separate IC is as small as is practically possible. There is also the fact that the speed at which the circuits can function increases as the dimensions of the circuits decrease. The importance of fast speeds will be obvious when we think, for example, of ICs for computer applications. Research is still continuing into new techniques of microminia- turisation. Conventional photolithography A brief description of a standard manufacturing method will give some idea of the problems that can occur in the manufacture of transistors and integrated circuits. An entire wafer of silicon is coated with a layer of silicon oxide which, on the one hand, protects the wafer from undesired influences and, on the other hand, makes it possible for the wafer to be uncovered again locally. The latter is done by applying a light-sensitive lacquer to the oxide and by selective exposure of this lacquer layer using a mask. The pattern on the mask is thus transferred to the lacquer layer. The exposed places on this layer undergo a chemical change which makes them insoluble. If the exposed layer is treated with a suitable solvent then the lacquer is dissolved locally and a copy of the mask pattern is obtained on the wafer: the oxide layer underneath is uncovered at the exposed points. The wafer is then treated in an etching bath. The etching fluid dissolves the oxide that is no longer protected by the lacquer. After the remaining lacquer layer has been removed using another solvent a silicon wafer has been obtained on which there is an oxide layer in which pits have been etched in accordance with the pattern of the mask. The edges of the pits are of silicon oxide, and the ‘bottom’ consists of silicon. Foreign atoms can be introduced into the ‘silicon bottoms’. The process can be repeated, using a different mask each time, until the complete IC has been produced on the wafer. The masks used for the photolitho- graphic method are made as follows. The desired pattern is drawn by numerically controlled machines and is then transferred to a photographic plate. Transparent regions appear on this plate which are approximately 1 0 times as large as the pattern for the ultimate circuit. The intermediate product is then photolithographically copied in reduced size on a metallised glass plate, the parent mask. By moving it in steps the parent mask becomes covered with identical patterns of the true size. A number of copies are made from this parent mask and these are the working masks used in the manufacture of the circuits. Problems A number of problems occur with the photolithographic method just described. For the successive litho- graphic operations the prints of the different working masks have to be aligned very accurately with one another on the silicon wafer. This is a necessary prerequisite for obtaining a properly working circuit. As the ‘electronics content’ of the individual IC increases and the detailed structures are subject to even greater minia- turisation, alignment, which in conventional methods is done by hand, can become something of a problem. The working mask itself may also cause problems. In a mass production process of making ICs, that is automated to the maximum possible extent, the working mask, after being aligned, is usually brought into direct contact with a wafer of silicon that is covered with a light- sensitive lacquer layer. As a result of this contact both the mask and the lacquer layer could easily be damaged by, for example, irregularities on the wafer. Another drawback is the fact that it is not always possible in practice to press masks completely flat against the wafer. This may cause light diffraction problems resulting in a less than sharp image of the mask pattern. The Silicon Repeater In order to get over the above difficulties, scientists at the Philips Research Laboratories in Eindhoven have designed an instrument, the Silicon Repeater, which enables details of 1 .5 to 2 /rm to be transferred to the wafer without contact and with an accuracy of alignment of 0.1 ftm. A photographic mask, that has one pattern, magnified 5 times, and not a large number of identical patterns as in the usual contact method is projected in reduced size on to a wafer. Because the machine then moves the wafer, the entire surface of the wafer becomes covered with identical patterns. The entire projection process, the aligning of the wafer and the step-by-step movement of it are all done automati- cally, using two laser interferometer systems under computer control. To obtain accurate positioning of the individual projections use is made of tantalum markers previously applied to the silicon wafer. The X-ray radiation which these markers emit when bombarded with electrons is used to achieve alignment. Unevennesses in the surface of the wafer are traced by the equipment: refocusing is done auto- matically before each exposure. This and the fact that the mask has only a single pattern mean that accuracy of alignment and line definition (smallest dimension of a detail that has to be imaged) are better than in the conven- tional method. Damage to the mask is prevented because the mask no longer comes into contact with the wafer. Electron beams in place of light New prospects for miniaturisation are being seen in the use of electron beams instead of light in the manufacture of ICs: there are scarcely any diffraction phenomena, the depth of focus is greater and the beam diameter is smaller so that even smaller details can be inscribed on the wafer. Scientists at the Philips Research Laboratories in Redhill, England are at this moment exploring three areas where electron beams might fruitfully be used. The first area is in the fabrication of masks using electron beams. Because there are no intermediate stages the fabrication time for the masks is very short, a high yield of good masks is achieved and the line definition is high. The second area is the development of equipment whereby patterns can be copied on the wafer by means of electrons (Electron image projector). This procedure starts with a mask made using the electron beam technique already mentioned, to which a layer is applied which on being illuminated emits electrons. The electrons released are projected via an electron optical system on to the silicon wafer. The silicon wafer has been provided with a lacquer layer which is sensitive to electrons. As with the Silicon Repeater, there is no wear of the mask. A third area being studied by the English laboratory is a method whereby a controlled electron beam inscribes a pattern directly on to a silicon wafer without the use of a mask. It is expected that line definitions of 0.5 to 1 nm with an alignment accuracy of 0.1 txm will be able to be obtained using the above electron beam techniques although much research has still to be done before this accuracy and line definition are obtainable in the mass production of ICs. (413 S) 2-02 — elektor february 1979 eurotronic Eurotronics ☆ ☆ *1 in* ☆ 1 M * ☆ international circuit and design idea competition Elektor is promoting the first world- wide circuit and design idea competition for electronics enthusiasts, with over £ 10,000 worth of electronic equipment to be won. It is the intention that this competition should stimulate elec- tronics as a hobby on a world-wide scale, by the resulting exchange of cir- cuit ideas. Entries are not limited to fully-developed and tested circuits: original design ideas, that could be im- plemented in circuits (given time and sufficient experience), can also be entered. Obviously, both circuits and design ideas must be original. Complete circuits Entries should be interesting, original circuits that can be built for less than £ 20.00 - not counting the case and printed circuit board. Circuits used in commercially available equipment, de- scribed in manufacturer's application notes, or already published are not considered ‘original’. The complete circuit should be sent in, together with a parts list, a brief expla- nation of how it works and what it is supposed to do, a list of the most im- portant specifications and a rough estimate of component cost. The latter can be based on retailer’s advertisements. A jury, consisting of members of the editorial staffs for the English, German and French issues of Elektor and the Dutch edition, Elektuur, will judge the entries according to the criteria listed above. The best designs will be published in the four Summer Circuits issues, with a combined circulation of over 250,000 copies. All entries included in this final round will be rewarded with an initial ‘fee’ of £ 60.00. Design ideas Readers who cannot submit a complete circuit (for lack of time, know-how or hardware) may enter an interesting and original design idea. However, the same basic rule holds: the idea should be for a feasible circuit that can be built for an estimated component cost of less than £ 20.00. The idea should be described as fully as possible. Perferably, a block diagram and - if at all possible - a basic (untested) circuit should be in- cluded. The jury will select the best ideas for inclusion in the final round. These ideas will be rewarded with a ‘fee’ of £ 20.00. The final round The readers of Elektor and its sister publications will select the winners! This is where the half-a-million-or-more readers of the Summer Circuits issues come in (yes, we know that each copy is read, on average, by 2.6 people . . . ). The readers are requested to select the 10 best circuits from those published. Everybody who co-operates in this final vote may also win a prize. The prizes Over £ 10,000 worth! The ten entries selected by our readers will receive a total of £ 10,000 worth of prizes. Dream prizes for any enthusiastic electronics hobbyist! The closing date for the competition is 31st March, 1979. Entries should be sent to: Elektor Publishers Ltd., Elektor house, 10 Longport, Canterbury, CT1 1PE, Kent, U.K. Both the envelope and the entry should be clearly marked ‘Eurotronics circuit’ or ‘Eurotronics design idea’. \ General conditions • Members of the Elektor/Elektuur staff cannot enter the competition. • Any number of circuits and/or design ideas may be submitted by any person. • Entries that are not included in the final round will be returned, pro- vided a stamped, addressed envelope is included. • The decision of the jury is final. ^ - -tt A -A ☆ ^ * ☆ * * * * optical memory disc elektor february 1979 - 2-03 optical memory disc diode laser writes and reads ten billion bits on one 12" disc. Ten billion bits, five thousand printed pages, forty five thousand tracks are certainly large numbers, but all of these, and more, are contained on a twelve inch disc in the new computer storage system recently developed by Philips. Using video disc techniques with a diode laser providing the optical medium gives a ten times greater storage capacity than the most advanced magnetic disc systems. The technology required for the memory disc is similar to that originally devel- oped for the video long-playing disc. The most sensational aspect of the new memory disc is its enormous storage capacity: ten billion bits, or the equiva- lent of half-a-million printed pages'. This is ten times the memory capacity of the most advanced magnetic disc pack systems. The information can be read out im- mediately after it has been written on the disc. The system features fast random access: any address can be located within, on average, 250 ms. This means that virtually instant access is possible to 5 billion bits (i.e. the ca- pacity of one side of the disc). Breakthrough The possibility of using lasers for optical data recording has been known for several years, but several problems pre- vented the development of a practical read/ write system. A miniature diode laser and a compact optical system were required, as well as a sensitive recording medium that is sufficiently durable for long-term storage. Furthermore, a highly accurate servo system is needed that will provide fast, random access to the data stored on the disc. Philips was in a unique position to make the necessary breakthroughs, because of their experience and parallel develop- ments in several allied fields. The diode laser used in the new re- cording system is approximately the same size as a small-signal transistor. The chip itself is 0.1 mm square, and consists of an aluminium-gallium-arsen- ide diode. Despite its small size, the pulsed light output power is equiv- alent to that of a big gas laser with its associated modulator. The diode laser is mounted in an extremely compact optical system weighing only 40 grams; the latter also contains the positioning and focussing optical systems and elec- tronics. This type of diode-laser system can read optical data in the same way as a VLP (Video Long Play) system. By increasing the power of the laser it is also possible to write data on the disc by ’burning’ into a suitable recording medium. In the Philips system this is done by melting micron sized holes in the (tellurium- based) recording material. The data written in this way can be read immedi- ately; the system detects the difference between a high light level reflected from the Virgin’ surface of the disc and a low light level reflected from the holes - where most of the light is scattered. These high and low light levels are con- verted into electronic binary signals: the data ‘bits’. Fast random access The system must provide the possibility to write data anywhere on the disc, if the desirable random access facility is to be provided. This would appear to demand absolute positioning accuracy to a fraction of a micron - sufficient to locate and read the micron-sized holes. Philips found a different solution based on a modification of existing VLP technology. In the VLP system, data is normally read sequentially from pressed, plastic discs. This data is recorded on the disc as a series of holes in the substrate, having a depth equivalent to one-quarter wavelength of the laser light. During playback, this information is retrieved by detecting high and low levels of re- flected light. For the new diode-laser recording sys- tem, the disc is initially provided with a one-eighth wavelength deep groove in which the data addresses are pre- recorded. Figure 5 shows a micro-photo- graph of this groove, with data also recorded in it. Both during recording and playback (in this application it is perhaps better to use the phrases ‘write’ and ‘read’ cycles) the optical system can track along this groove, finding and reading all the addresses. This means that data can be stored on and retrieved from virtually any spot on the useful recording area of the disc. In this way, random access is provided both for reading and writing data. Note, however, that this system is not a true Random Access Memory (RAM), since there is no provision for erasing or modifying data once stored. The Philips system is 2-04 - alektor february 1979 optical memory disc equivalent to a PROM (Programmable Read-Only Memory). The disc The initial groove and the address data are recorded on the disc using VLP mastering and duplicating techniques. 45,000 concentric tracks or grooves (spaced 1 .6 microns apart), each divided into 128 ‘sectors’ as shown in figure 3, are recorded on a plastic substrate. The addresses are also recorded at regular intervals along the groove. A layer of recording material (in which data can be stored) is then evaporated onto the substrate, protecting the groove and address data; finally, two of these discs are mounted ‘front-to-front’ in a sealed ‘sandwich’ construction (figure 4). The laser light is focussed through the 1 mm thick plastic substrate to reach the actual recording medium. This provides good protection against dust, finger-prints, scratches and the like, without any adverse effect on the re- cording sensitivity. The optical system reads the addresses, tracks the ‘groove’, writes and reads data in the sensitive layer as described above. The objective lens is positioned at a relatively large distance (2 mm) from the surface of the disc, thereby eliminating vertical pos- itioning problems between optical sys- tem and disc. The system can be used to store 1024 bits of information in each of the 45,000 x 1 28 sectors, each of which has its own unique address. The disc is uncon- ventional in its playing speed: 150 RPM or 2.5 revolutions per second. This, combined with a fast ‘groove-finding’ servo mechanism, gives an average access time of 250 ms for the full storage capacity of five billion data bits. The writing speed in normal operation is 300 Kbits per second. However, the system is capable of much higher speeds: Philips have successfully experimented with a read/write speed of 6 Mbits/s! The servo Although the use of a pre-recorded groove eliminates the need for absolutely accurate positioning of the optical system, the recording system still re- quires fast and accurate positioning over the groove. This is achieved by mount- ing the optical system on an arm that is driven by a linear motor. An optical grating on the arm is used to rapidly bring the optics to within ten grooves (16 microns) of the desired position. Groove reading and sector reading then take over. With this technique, the maximum time required to go from the outer to the inner track is only 1 00 ms; the maximum access time (at 2.5 rev- olutions per second for the disc) is therefore only 500 ms — for a storage capacity equal to five magnetic disc packs! Once the required address has been located, the optical system is main- tained in focus on the groove. For focussing, the position of the objective lens relative to the sensitive layer is maintained within one micron by means of a most unlikely electro-mechanical system: a loudspeaker voice coil! The groove is followed by means of a servo system using the linear motor that drives the arm, and groove eccentricities of up to 1 00 microns are reduced to a tracking error of less than 0. 1 micron. Several error-correction systems are used for retrieval of data. A special data modulation system is used; code words are interleaved throughout a sector; and a high (20%) redundancy is used in other words, 20% more bits are actually recorded than the corresponding data. These error-correction systems detect and correct 99.9% of all Errors. The remaining 0.1% are detected, but cannot be corrected; all data in that sector must Fiflure 1. Th« naw optical memory diic intro- duced by Philips is the same size as a standard LP disc (12" diameter), but it can be used to store the same amount of information as half a million printed pages . . . Figure Z The complete optical data recorder looks very much like a normal record player. The playing arm, however, is mounted under- Figure 3. Over five million sectors on the disc are each addressed individually; since 1024 data bits can be stored in each sector, rapid random access is possible to a total data storage capacity of over five billion bits. Figure 4. The optical disc uses a sandwich construction: the sensitive layer (B), in which the data are stored, is protected by the plastic substrate (A). then be rewritten in a new sector. In practice, this means that the recording system is error-free. decrease significantly, as experience is gained and technology improves. The system is compatible with present- day and future data transmission systems, such as fibre optics. For example, in the office of the future the system may be expected to tie up with exotic electronic typewriters called ‘word processors’, providing an elec- tronic ‘filing cabinet’. Documents and images received through facsimile ma- chines can also be stored. In hospitals, patient records can be stored - includ- ing complete case histories, X-ray photos, graphs and other visual material as well as written and even spoken texts. As with most important technological innovations, it is to be expected that this system will not be commercially available for several years to come. Even so, it can safely be assumed that it will become highly important in the near future. If technology can progress to the point where the data-storage layer becomes erasable, this system could lead to the creation of gigantic RAMs. Optical storage would then become the mainstay of future computing systems. Future applications Philips foresee two different appli- cations areas: the storage of alpha- numeric information and the storage of images. The latter application demands storage capability of an extremely large number of bits. Well, ten billion is indeed a very large number, and image storing is well within the capabilities of the system. Since both words and images can be stored and retrieved with fast, random access, this optical mem- ory system may well become the elec- tronic equivalent of paper and micro- film. The high information density, in con- junction with long-term storage capa- bility, makes the optical storage system a viable replacement for magnetic tape and disc in a wide range of applications; especially where large quantities of data are stored and only infrequently up- dated - for example in Viewdata systems. The information density is already higher than that of magnetic material, and this is likely to become even more apparent in the future. The storage cost per bit is also expected to Philips press office ■ P.O. Box 523 Eindhoven The Netherlands 2-06 — elektor february 1979 pools predictor pools predictor 1, 2 or X based on statistics Every week, predicting the results of the football pools is a time of agonizing indecision. The pools predictor described here is intended to change all this. For each game, information on the league position of the two teams is fed in; the unit carefully weighs the odds and comes up with its final verdict: 1, 2 or X. (L. Giise) Hundreds of thousands of people are disappointed every week when they hear the football results. It is extremely difficult to predict a sufficient number of results correctly luck seems to be at least as important as skill. However, it is advisable to make some use of statistics. This is not always easy, and considering the relatively small chance of success it seems rather a waste of time to spend hours working out the odds. One can therefore either resort to blind guesswork, or else call in the aid of a statistically weighted predic- tor. Statistics? Statistical analysis of league football may prove profitable. One way to do this is as follows. The results of a large number of games played in the past are analysed: for each game the relative strengths of the two teams involved are derived from their positions in the league at that time. If there are, say, 20 teams in that particular league, the relative strengths can vary between 20 : 1 and 1 : 20 — where the first figure is the position of the ‘home’ team and the second refers to the position of the ‘away’ team. If team A is in fourth position and team B in seventh, the relative strength is 4 : 7 if team A is playing at home (otherwise it would be 7 : 4). It is furthermore assumed that the relative strengths are determined solely by the relative positions of the two teams, not by their strength with respect to other teams. This means that 4 : 7 (a difference of three places) gives the same relative strength as 1 : 4, 2 : S and so on. The next step is to compare the results of the games with the relative strengths of the two teams to determine the statistical chance of a particular result (1, 2 or X) occurring for a particular relative strength. For instance, for all games played between two teams that follow each other on the position list (first against second, fifth against sixth, etc. ) whereby the stronger of the two is playing at home, it may be found that in 45% of the games the home team won; in 20% the home team lost; the remaining 35% of the games ended in a draw. Similar calculations can be made for all possible relative strengths, and the results can be plotted as shown in figure 1. How can this knowledge be used? One possibility would be to make a sufficient number of ‘predictor discs’ as shown in figure 2. Each disc corresponds to a the results for all possible combinations of teams in a 20-team league will be approxi- mately as shown here. Figure 2. One way to make use of this stat- istical knowledge would be to throw darts at spinning discs of the type shown here. The areas of the three sectors correspond to the percentage chances for one particular relative strength, as derived from figure 1. The disc shown here would be valid for a relative strength of 1 : 12 - for instance, if the third team is playing at home against the fifteenth Figure 3. Complete circuit of the pools pools predictor elektor february 1979 2-07 relative strength, and it is divided into sectors corresponding to the percentages. To ‘determine’ the result of- the game between teams 5 (home team) and 14 (away team) the disc 1 : 10 is spun rapidly and a dart is aimed off-centre. The point where it hits the disc (‘a’ in figure 2) is taken as the ‘probable’ result. This system is complicated, time-con- suming and difficult to implement in practice. An electronic simulation is preferrable. Electronic statistics! Detailed analysis of the ‘cardboard disc and darts’ system gives the basis for an electronic ‘predictor’. There are three possible results, therefore, an electronic circuit is required with three possible outputs, only one of which can occur at any given time (mutually exclusive). Each of these three outputs is possible during a percentage (corresponding to figure 1) of a total period time. Each ‘relative strength’ is derived from settings of potentiometers and used to determine the percentages. The output conditions can be displayed using LEDs and operating a push- button ‘freezes’ the display at one particular result. Since only one of the three possible outputs can occur at any time, a single LED will light — indi- cating the result: 1, 2 or X. This, basically, is the operating principle of the pools predictor. The circuit The complete ‘pools predictor’ is shown in figure 3. The three mutually exclusive outputs are derived from N1 . . . N3 and these outputs are inverted by N8, N10 and N12. For one particular output to be at logic 0, the three inputs to the corresponding gate must all be at logic 1 . Since the output of each gate is connec- ted to the inputs of the two other gates (either direct or via two inverters in cascade, which amounts to the same thing), a gate can only be at logic zero if both other gates are at logic 1: at any given time, only one output can be at logic zero. However, gates N1 and N2 cannot remain at logic zero for long. Nl, for instance, together with N8, R2, Pla, P2a, R17 and Cl forms an astable multivibrator. If the output of Nl initially goes to zero, it will return to logic 1 after a time determined by the setting of PI and P2. This causes the output of N2 to go to logic zero; since N2 is part of a similar circuit, its output will also return to logic 1 after a certain time has elapsed, causing N3 to go to logic 0. The output of N3 will now remain at logic 0 until it receives a pulse, via C6, from the clock generator (N6/N7). The clock frequency is preset, by means of P3, so that the corresponding period is always longer than the total period of Nl and N2. The result, so far, is that the 2-08 — elaktor february 1979 pool! predictor 4 Parti lilt: Resistors: R1 ,R3,R4,R6,R7,R8,R9,R1 1 , R14.R15 = 39 k R2,R5 = 33 k RIO - 220 R12-6M8 R1 3 = 4M7 R16= 270 k R17.R18 = 100k Plab = 470 k lin stereo-potmeter P2ab = 470 k lin stereo-potmeter P3 = 1 M preset potmeter Capacitors: C1.C2.C6- 10 n C3 = 1 5 n C4 - 330 n C5 = 8n2 Semiconductors: 01 . . . D5 = DUS D6 ... D8 - LED T1 . . . T4 = TUN IC1 = 4023 IC2 - 401 1 IC3 = 4069 Miscellaneous: 51 - single-pole switch 52 = pushbutton outputs of Nl, N2 and N3 are at logic zero alternately, for periods determined by the settings of PI and P2 and the preset clock frequency. The disc is spinning’. Operating S2 triggers a monostable multivibrator (or ‘one shot’) consisting of N4 and N5. For a short time, the output of N4 goes to logic 1 . Via diodes Dl, D2 and D3 the three ‘sensitive’ inputs of Nl ... N3 are held at logic 1, the multivibrator circuits around Nl and N2 are blocked, and clock pulses to the input of N3 have no effect. The result is that the output states of the three gates will remain unchanged for the duration of the one-shot period. Simultaneously, the output of N4 turns on T4 (via R15). One, and only one, of the transistors T1 . . . T3 will now conduct: the emitters are all connected to supply common through T4, and one of the bases will be driven from the inverter connected to the output of the gate (Nl, N2 or N3) that is at logic 0. This, in turn, causes one of the LEDs (D6 . . . D8) to light. When the one-shot period has elapsed, the LED will extinguish. If necessary, PI and P2 can be readjusted; pressing S2 then produces the next result. Using the relative league positions of the home and away teams for the settings of PI and P2, progressing down the coupon and noting the displayed results, will produce the positions of the possible draws for that week. Warming up. A suitable printed circuit board and component layout are shown in figure 4; wiring to the other components (PI, P2 and the battery) are shown in figure 5. The circuit can be powered from a 4.5 V ‘flat’ battery, since the current consumption is only 600 jiA for most of the time (increasing to 15 mA for the brief period during which one of the LEDs is lit). The dual-gang potentiometer PI is the ‘home’ team relative-position setting; P2 is used to indicate the relative pos- ition of the ‘away’ team. Both are scaled from 1 to the number of teams playing in the league division. An example of a scale catering for both the English and Scottish divisions is shown in figure 6. The only preset adjustment is P3. PI is first set to position 1 and P2 is set to its highest value, this corresponding to the situation where the chance of the home team winning is 80%, whereas the chances of the home team losing and of a draw are both equal to 10%. The duty- cycles at the outputs of N2 and N3 should therefore be the same. A multi- meter is used to measure the (average) DC voltage at the base of T2, after which P3 is adjusted until the same (average) value is found at the base of T3. H pools predictc elektof february 1979 — 2-09 Figure 5. Particular care should be taken when wiring up the potentiometer to the p.c. board, as otherwise the predictions will not be relative to the calculations for figure 1 and this may not be apparent initially. Figure 6. Suitable scales must be made for PI and P2, running from 1 up to the number of teams playing in that particular league, with the lowest team position being fully clockwise. Figure 7. Layout design will follow many variations, depending on personal preferences, an example of which is shown here. 7 1 Liverpool 20 31 2 Everton 19 30 3 West Bromw. 18 27 4 Arsenal 19 25 5 Nottingham 18 25 6 Manch. Un. 19 24 7 Coventry 19 22 8 Tottenham 19 22 9 Leeds 20 21 10 Aston Villa 20 21 11 Bristol 20 21 12 Southampton 20 19 13 Norwich 18 17 14 Derby 20 17 15 Manch. C. 18 16 16 Ipswich 20 16 17 Middlesbr. 19 15 18 Queens Park 19 14 19 Bolton 20 14 20 Wolverhampt. 19 9 21 Birmingham 20 8 22 Chelsea 19 8 2-10 — elektor february 1979 D/A for ^Ps D/A for jiVs Using a couple of inexpensive CMOS ICs it is not difficult to build a simple D/A converter which affords the possibility of generating analogue signals from software. From an idea by T. Basien and P. Haberoetzer One of the ‘problems’ facing the micro- processor user is how to interface his system with the ‘real world’. The fol- lowing simple circuit for a D/A con- verter should prove useful in extending the number of possible applications for which, among others, the Elektor SC/MP system can be used. The circuit diagram of the converter is shown in figure 1. The actual conversion is performed with the aid of a voltage divider network comprised of resistors connected to the outputs of a quad Table 1 0C00 C4FF LDI FF TAB: 0F00 OF 0C02 31 XPAL1 2E 0C03 C4FF LDIFF 4D 0C05 35 XPAH1 6C 0C06 C40F LDI0F 8B 0C08 36 XPAH2 AA 0C09 $1 C400 LDI00 C9 0COB 32 XPAL2 E8 0C0C C4I0 LD1 10 D7 0C0E C80B ST COUNT B6 0C10 S2 C601 LD@ 1 (1 ) 95 0C12 C900 ST 0012) 74 0C14 8805 DLD COUNT 53 0C16 98F1 JZS1 32 0C18 90F6 JMP $ 2 11 0C1A 00 COUNT 00 latch (IC1). The inputs of the latch are connected to the data bus of the SC/MP. Thus to write data into the latch it is simply put on the data bus whilst the appropriate address is sent out on the address bus. The address decoder (IC3, IC4 and N1...N3) decodes all 16 address bits, and since the data bus is 8 bits wide two quad latches can be used simultaneously. The address of the latches in the above circuit is FFFF. Depending upon the data byte present on the latch inputs, a logic ‘1’ or logic ‘0’ will appear on the corresponding resistors at the outputs of the latches. In the case of CMOS ICs a logic ‘1’ is +5 V, whilst logic ‘0’ is 0 V. Thus at the junction of R1 . . . R4 and R5 . . . R8 will appear a voltage which may lie between 0 and 4.6 V - depending upon the number of logic ‘l’s’ on the latch outputs. The resistor values are chosen such that the output voltage range (0 - approx. 5 V) is divided into virtu- ally equal steps, the lowest voltage corresponding to the number X’O and the highest to X’F. A1 and A2 are simply output buffers (voltage fol- lowers), whilst PI and P2 allow the voltage levels to be adjusted as desired. Since one gate of IC5 is spare, it can be used to invert one of the address bits, so that a different address can be chosen for the converter. Program Table 1 provides just one example of the many possible programs which could be used to generate an analogue output signal from software. The program shifts data byte for byte out of a 16 byte table (starting at 0F00) into the latches. When all 16 bytes have been transferred the program jumps back to the start (0F00) and repeats the process, so that a simple periodic signal is pro- duced. The type of waveform generated by the above program is illustrated in figure 2. M elektor february 1979 delay lines One of the most important sound- processing techniques employed by amateur and professional musicians as well as sound recording studios is the electronic delay line. Reverberation, echo, vibrato, phasing, flanging and chorus are just a few of the special effects which can be obtained by delaying an audio signal. However the applications of delay units are not restricted to audio effects; sound reinforcement systems, level control equipment, speech processors all employ delay lines in one form or another. The following article takes a close look at the 'ins and outs' of this device, and examines some of the less well-known uses to which it is put. As is well-known, sound travels through free air at a speed of some 1150 feet per second, which means that, even over comparatively short distances, it takes a perceptible length of time to reach a listener (roughly 25 ... 30 ms per 10 yards). When listening to music - re- gardless of whether it is being reproduced via a domestic stereo system or by a full-scale orchestra in a concert hall - the signal reaching one’s ears will be a mixture of direct and delayed sound. The former travels straight to the listener from the sound source, whilst the latter is first reflected off the walls, ceiling, furniture etc. and hence must cover a greater distance. The fact is that the human ear is extremely sensitive to differences in the time taken for a signal to arrive and to the level of reflected sound which it contains. A signal which is deprived of natural reverberation, e.g. the output of an oscillator listened to via headphones, sounds distinctly ‘artificial’ and is often experienced as being somewhat unpleasant, inducing listener fatigue. Close-miking techniques during record- ing often have the effect of depriving a piece of music of natural reverberation, with the result that the sounds seems ‘dead’, ‘flat’, devoid of any ambience. For this reason studios must introduce artificial reverberation to restore the natural fullness and ‘body’ of the music. Many concert halls which have in- herently poor acoustics can be improved by employing delay lines to control the reverberation characteristics elec- tronically. By varying the length and level of reverberation the acoustics of the hall can be tailored to suit the type of music being performed — long rever- beration times for orchestral works, shorter times for chamber music. In addition to simulating the sound reflection characteristics of particular acoustic environments, delay lines can also be used to process the music signal in a variety of ways and obtain a range of often spectacular effects. Certain psychoacoustic responses of the brain can be exploited to convince the listener he is hearing not one but several voices - i.e. ‘chorus’. Phasing/flanging and ‘space’-effects can be obtained — the latter being an extremely ‘un-natural’ and sciencefiction like sound which has no exact correlation in real life. Further applications for delay lines are in signal processing equipment where they are used to give the control circuits suf- ficient time to iron out signal overloads, glitches etc. before being fed on to the next stage; and in P.A. systems, where they can considerably improve the intelligibility of speech signals. For a number of years there have been delay lines of an electro-mechanical type — the most well-known being the ‘echo chamber’. This is simply a specially designed enclosure whose acoustic re- sponse can be varied by the use of curtains, tiles etc. to alter the sound- absorbing properties of the reflective surfaces. The signal to be echoed is reproduced via loudspeakers and then picked up by carefully situated micro- phones. An expensive process, and one which is limited by the size of chamber being used. For reverberation and echo effects electro-mechanical units based on spring lines or metal foils are also popular. In this type of delay line an acoustic signal is fed into e.g. a helical spring via a transducer. The signal travels round the coils of the spring until it is picked up at the other end via a second transducer which reconverts it into an electrical signal. Unfortunately, however, this type of unit has a number of limitations. Firstly, they are fairly limited in the range of possible appli- cations, being restricted to echo/reverb effects. Secondly, they are extremely susceptible to external vibration (micro- phonic) and furthermore they tend to exhibit resonance modes of their own, so that their frequency response is not perfectly flat. Similar problems of inherent sensitivity to mechanical dis- turbance apply with tape echo/reverb machines employing several replay heads which are mutually offset to provide variable delay to the audio signal. Tremendous demands are placed upon the mechanical engineering of such units, which of course means that they are generally fairly expensive. Fortunately, however, recent advances in hardware have made possible the development of all-electronic delay lines, which not only are more reliable, provide uncoloured, faithful sound 2-12 — elektor february 1979 delay lines 1 Input Low Pan Amplifier Filter quality, and are often considerably cheaper, but also can be used to produce a wide variety of time-related special effects. Electronic delay lines Unlike electromechanical delay units, the audio signal is not transmitted continuously through the delay line but rather is sampled at a frequency which must be at least twice the highest signal frequency. The samples are then clocked through some form of shift register and the original signal is reconstituted at the output by lowpass filtering to remove the clock frequency components. A basic distinction can be made between two types of electronic delay line. There is the digital delay line, which employs either random access memory (RAM) with special control logic, or digital shift registers; in both cases the digital memory must be preceded and followed by A-D and D-A converters. On the other hand there is the analogue delay line, which employs analogue ‘bucket- brigade’ - or CCD (Charge Coupled Device) memories. Figure 1 shows the block diagram of a digital delay line. A clock generator controls the A-D and D-A converters as well as the rate at which the sampled signal is read into and out of the digital shift register. Two basic methods of A-D conversion are used: delta modulation and pulse code modulation. The delta modulator has a single output in the form of a train of pulses which provide a continuous indication of whether the analogue input signal is increasing or decreasing. If the former is the case, the output of the modulator will be high, if however the analogue signal is falling, the modulator will output a logic ‘O’. If the input signal were constant, the modulator would output 01010101 . . . The digital reverberation unit described in the May 1978 issue of Elektor (no. 37) employed just such a modu- lator. With pulse code modulation, on the other hand, the analogue signal is converted into rows of pulses which, in binary code, represent the instantaneous value of the samples. The process can be likened to comparing the analogue signal with a reference voltage which takes the shape of a rising staircase waveform. As soon as the reference voltage exceeds the analogue signal the output of the comparator changes state. The height of the staircase, i.e. the number of steps it contains, is an index of the size of the analogue signal. The number of bits in each binary word (i.e. the number of outputs of the A-D converter) determines the resolution or accuracy of the conversion. The greater the number of bits, the greater the number of steps in the staircase, and hence the smaller is the error introduced by the fact that the minimum variation in signal level that the converter will detect is equal to the height of one step. To obtain a satisfactory resolution it is usual to employ at least a 12-bit code, which means that there are 2 12 = 4096 steps in the staircase. If the height of each step is the same, the code is said to be linear, i.e. there is a linear relation- ship between the analogue input and the binary-coded output of the converter. If, on the other hand, the step height is not constant, the code is said to be ‘companded’, whilst it is also possible for the staircase to have several ‘flights’ of steps, whereby the height of the steps vary from flight to flight. In this case the conversion characteristic will have a number of ‘kinks’ in it. In addition there is a sophisticated technique known as ‘floating decimal point encoding’ which can be employed to improve the range of the converter. Thus it is possible, for example, to vary the gain (or attenuation) of the A-D converter in accordance with the amplitude of the input signal. The information relating to the degree of gain introduced by the converter is also binary coded and transmitted along with the digitised version of the analogue input, so that the inverse amount of gain/attenuation can be applied in the process of D-A reconversion at the output, thereby restoring the original signal level. The binary data is either clocked through a digital shift register or, with elektor february 1979 — 2-13 2 Clock Generator 1 i m i ■ 1 KH ex H Input Low Pass Amplifier Filter Low Pass Output the aid of special control logic, through a random access memory (RAM). The rate at which the data is transferred, and hence the amount of delay introduced, is of course determined by the clock frequency. According to Nyquist’s sampling the- orem, the sampling frequency must be at least twice the maximum signal frequency. For this reason the analogue input signal is bandwidth limited by a lowpass input filter which has an extremely sharp roll-off. A similar arrangement is required at the output of the delay line in order to remove the high frequency clock components and any spurious products caused by the signal and clock frequencies interacting. Digital delay lines have the advantage that they can be extended to virtually any desired length without adversely affecting the signal quality. This is in contrast to analogue delay lines, in which the degree of attenuation intro- duced into the signal is proportional to delay time. Digital shift registers are thus ideally suited for applications requiring longer delay times. Furthermore, the ability to use long delay lines means that it is possible to increase the clock frequency and hence the maximum permissible bandwidth of the system whilst retaining reasonable delay times. The disadvantage of digital shift registers is the relatively high cost of A-D and D-A converters. Although the digital shift registers themselves are actually cheaper than their analogue counterparts, the additional expense of A-D-A conversion pushes the price up considerably. This is particularly true if one requires a digital delay line with a number of different outputs, each with a separate delay time. In this case a D-A converter is needed for each output, whereas with an analogue delay line the signal can be fed straight out at virtually any point. Analogue delay lines can be divided into those using so-called bucket-brigade memories, and those which employ charge-coupled devices. The basic prin- ciple involved is the same in both cases, the difference being in the chip structure of the two types of device. The term Figure 1. Block diagram of a digital dalay lina for audio signals. The analogue input signal is first bandwidth-limited by feeding it through a lowpass filter, converted into a digital signal by means of the D-A converter, then clocked through a digital shift register or random access memory at a rate determined by a clock generator. At the output of the digital memory the delayed, sampled signal is recon- verted into an analogue waveform before being passed through a second lowpass filter which rolls off the clock frequency com- Figure 2. An analogue delay line for audio signals employing a bucket-brigade shift register. Charge levels representing the instan- taneous value of the sampled analogue wave- form are passed from capacitor to capacitor like buckets of water being passed down a chain of fire-fighters. Photo 1. A professional electronic reverber- ation unit, the EMT250. This unit, which employs digital delay lines and microcomputer- controlled random access memory (128 K), provides 19 different delay elements, which under programme control, can simulate e wide variety of effects such as phasing, chorus, echo and of course reverberation. ‘bucket-brigade’ comes from the fact that the operation of the shift register can be likened to a chain of men passing buckets of water down a line. In the case of the chip, the buckets are in fact capacitors, and the ‘water’ is packets of charge which correspond to the instan- taneous value of the sampled analogue waveform. The charge packets are transferred from capacitor to capacitor via FET switches which are controlled by a two-phase clock. Since the integrated capacitances on the chip are far from representing ideal capacitors, and have a significant leakage current, the samples are inevi- tably attenuated as they pass through the shift register. However, as each sample is attenuated by the same amount, the envelope of the original waveform is preserved. Unfortunately, when longer delay times are required, which means that the signal must be shifted through large numbers of stages, the cumulative effect of all these small losses adds up to a perceptible deterio- ration in the signal-to-noise ratio. This is a particular problem when feedback loops are used and the signal passes through the same shift register several times. Bucket-brigade memories are superior to charge-coupled devices in this respect and are to be preferred for audio work. However CCD’s offer higher chip densities (a typical CCD delay line will contain upward of 64 separate shift registers, each containing 256 stages) and are better suited for high frequency applications such as delaying video signals. The basic elements of a delay line featuring bucket-brigade memories are illustrated in figure 2. Once again steep lowpass filters at the input and output are necessary to band-limit the input signal and eliminate clock frequency components. Applications of delay lines By far the commonest, but also the most complex application of delay lines is in producing reverberation. Reverber- ation is an acoustic phenomenon which is an integral feature of all normal 2-14 — elektor february 1979 delay lines 3 Direct Reflection Multiple Reflection I Figure 3. Illustration of the various paths of sound waves as they travel from the signal source around a rectangular room to the Figure 4. Amplitude v. time graph which illustrates the density and decay characteristics of echoes during the reverberation period of a single sharp sound signal. The amplitude of and interval between successive reflections is determined by the path lengths of the sound waves and also by the sound-absorption properties of the reflective surfaces they encountered. As can be seen, after only a relatively short time the reverberation signal possesses an extremely high echo density. This rapid increase in the number of reflec- tion signals is a characteristic property of the acoustic phenomenon, 'reverberation'. Figure 5a. Block diagram of a simple rever- beration module, comprising a delay line with delay time r, and a feedback loop which attenuates the delayed signal by a factor g. Figure 5b. Circuit diagram for the simple reverberation module of figure 5a. The attenu- ation, g, of the feedback signal can be con- tinuously varied from 0 dB with the aid of the potentiometer. Figure 5c. Amplitude v. time graph of the output signal of the simple reverberation circuit, where r = 20 ms and g - — 3 dB (0.7). Figure 5d. The frequency response of the simple reverberation circuit resembles that of a comb filter. The delay time, r, determines the interval between successive peaks in the response (=-), whilst the attenuation, g, of the feedback loop determines the amplitude of the peaks. delay lir elektor february 1979 - 2-15 listening environments, be they domestic living rooms or concert halls. Only in specially constructed so-called anechoic chambers will reverberation — the re- flection of at least part of the sound wave off the walls, ceiling and floor, be absent. In a large volume enclosure, such as e.g. a cathedral, which has hard reflective interior surfaces, a sound may take as long as four or five seconds to die away. This provides a wonderful acoustic environment for a church organ, yet tends to render human speech all but unintelligible unless spoken extremely slowly (the acoustics of churches are probably the prime reason for the somewhat rather meandering, sing-song inflection often adopted by ministers or priests!) In addition to the walls, ceiling etc. of a concert hall, the number of people present also influences the acoustics. A hall which is completely filled will have a shorter reverberation period than the same hall when it is half empty — unless, of course, as is the case with the Albert Hall, the seats are designed to have similar reverberation characteristics to those of people. The dispersion pattern of a short, sharp sound signal in a conventionally-shaped domestic room is illustrated by the diagram in figure 3. First of all the listener will hear the original signal travelling straight from the source of the sound. This is followed after a short interval, by the first direct reflection- from the nearest wall, and is succeeded by further direct reflections from more distant surfaces such as ceiling, floor and rear walls etc. These quickly merge into the increasing number of indirect or multiple reflections off more than one surface. Since the energy of the sound waves is absorbed as they strike each reflective surface, the amplitude of the ‘echo’ signals fall more or less exponentially. An important and characteristic feature of natural reverberation is the high density of reflected signals. When simulating reverberation electronically it is necessary to provide around 1000 echoes per second for the effect to avoid sounding artificial. Furthermore, it is also important that the spacing of the echoes be non-periodic. These points are illustrated in the amplitude v. time graph shown in figure 4. The basic circuit configuration for a reverberation unit is shown in figures 5a and 5b. As can be seen, this consists simply of a delay line with a feedback loop. The corresponding graph of amplitude v. time is given in figure 5c. By attenuating the portion of the delayed signal sent back round the feedback loop the reverberation signal can be made to decay exponentially as desired. The reverberation time is defined as the time taken for the amplitude of the signal to drop to 1 millionth of its original level, i.e. 60 dB down. In the case of the simple circuit in figure 5 a 2-16 — elektor february 1979 delay lines Figure 6a. An extension of the basic reverb circuit is the ‘all-pass' reverberation module, which has a linear frequency response. Figure 6b. A practical circuit of an all-pass reverberation unit, with a damping factor of -3.5 dB (0.66). Figure 7. By mixing the outputs of several delay lines in different proportions, it is possible to simulate more accurately the natural acoustics of different types of room. Figure 8. Professional electronic reverberation units typically employ a large number of delay lines in order to obtain truly authentic reverberation characteristics. The compara- tively simple circuit shown here nonetheless contains four parallel-connected reverberation modules of the type shown in figure 5, followed by two all-pass modules as in figure 6. Potentiometer g7 determines the relative proportions of direct and delayed signal mixed in the output stage. the number of times the delayed signal returns around the feedback path before it reaches this level can be calculated by dividing 60 dB by the attenuation, g. of the feedback loop. The reverberation time, T, is then equal to the number of times the signal loops round the feedback path multiplied by the delay time r: T _ 60 - t g A delay time of 50 ms and an attenu- ation of 3 dB will give a reverberation time of 1 second. Here, however, we come up against the first problem caused by employing this simple ar- rangement. To achieve sufficient rever- beration times (1 ... 2 seconds) one must either use long delay times, which means a low echo density, or else short 6a 6b 8 * R5 = ran? = 0,66 1-3,6 dB ’ A1 . . A4- TL084, RC4136, (LM324) delay times with a high echo density. In the former case the reverberation sounds unnatural, whilst a high echo density involves reducing the attenu- ation of the feedback loop to the point where the circuit will tend towards instability. Furthermore, because the delay time of the shift register is con- stant, the diffusion rate or spacing of the reflection signals will be regular. A further limitation of the circuit lies in the fact that it has a comb-filter-like response, with periodic dips and peaks (see figure 5d). The distance between the peaks is equal to j, thus, with the delay time shown in figure 5 c of T = 20 ms, the frequency response of the delay line will exhibit a peak every 100 Hz. The difference in amplitude between the peaks and dips is inversely proportional to the amount of attenu- ation, g. introduced in the feedback loop. Thus, for g = 0.7 (— 3 dB), the rttioi*iil«iijy-5. 7 orl5dB! The above-described drawback can be avoided by employing the configuration shown in figure 6a, which is an ex- tended version of the simple circuit of figure 5a, and which has a flat fre- quency response. The input signal is attenuated by a factor equal to the attenuation of the feedback loop, inverted and then summed with the output of the delay line, which itself has been attenuated by a factor of 1 - g J . In practice the process is simpler than it may at first appear. elektor february 1979 - 2-17 Generally speaking the attenuation of the feedback loop is -3 dB (a factor of 0.7), so that 1 - g J = 1 - 0.7 J = 1-0.5 = 0.5 (-6 dB). In practice this factor of 0.5 is nothing more than a symmetrical voltage divider. Figure 6b shows the equivalent circuit diagram for the block diagram of 6a. Through a suitable choice of values for R2, R4 and R6 an attenuation, g. of 0.66 (3.5 dB) is obtained. Although the delay circuit shown in figure 6b will have a flat frequency response, it does not solve the problem of insufficient echo density and the regular spacing of the echoes. The echo density can be increased to an acceptable level by connecting several ‘all-pass’ reverberation circuits as shown in figure 6b in cascade and arranging for the first delay element to have the | longest delay time, and each successive delay time to be a third of the previous. To prevent the echoes occurring at regular intervals, the delay times are chosen such that they have no common denominator. Thus the natural reverber- ation characteristics of a conventional room (amplitude, diffusion pattern and density of echoes) can be fairly accu- rately approximated by employing five delay modules of the type shown in fig. 6b with delay times of 100, 68, 60, 19, 7 and 5.85 ms respectively. Another possible approach for achieving natural electronic reverberation is shown in figure 7. The different reflection paths of a signal reproduced in a room are simulated by connecting a number of delay modules in cascade. Reverber- ation times of differing length can be realised by means of the level poten- tiometers at the output of each shift register. The individual delayed signals, each representing a different reflection path, are summed, and the overall reverberation time is determined by a common feedback level control. Once again delay times should be chosen which do not have a common denomi- nator. When selecting the various delay times it is worthwhile bearing in mind the corresponding path lengths which the signal would cover in that period. Thus, for example, a 10 ms delay would correspond to a path length of 3.3 m (there and back!) so that one is simulat- ing the effect of a reflective surface 1.65 m from the sound source. A delay 2-18 - elektor february 1979 delay lines 9a ® " o, 7 h 9b g = 0,7 of 100 ms on the other hand, would correspond to a path length of 33 m, i.e. would simulate the effect of a small hall. Generally speaking delay times of less than 10 ms are avoided, and long delay times (greater than 100 ms) are only used if a particularly ‘spacious’ or ‘echoey’ effect is desired. The number of delay lines depends upon the application, however in general one can say that the greater the number of echoes, the more natural- sounding is the system. At any rate, a minimum of four delay lines is a must. Reverberation Figure 8 shows the basic design for a reverberation unit, which, assuming the delay modules are of suitably high quality, will satisfy even professional requirements. The circuit consists of a parallel connec- tion of four simple reverberation modules, SRI . . , SR4, of the type shown in figure 5 b. These are followed by two all-pass delay modules of the type shown in figure 6b. The values of delay times rl ... r4 are chosen within the range from 30 to 45 ms such that they share no common denominator. The damping factors gl . . . g4 should all lie below 0.85, otherwise the comb response of the delay lines will prove over-prominent. The shortest delay time of the first four modules determines the delay between the direct signal and the first reflection. The two all-pass reverber- ators, AR1 and AR2, provide suitable echo density; acceptable values for t 5 and r6 are roughly 5 ms and 1 .7 ms respectively, whilst a suitable value for g is something in the region of 0.7. If it is desired to make the reverberation time frequency-dependent, this can be achieved quite simply by inserting an RC network with the appropriate turnover frequency in the feedback loop. Professional electronic reverberation units used in studio work etc. often incorporate an even greater number of delay lines. Thus, for example, the EMT250, a programmable digital reverb unit (see photo 1) has four outputs, each of which can be set to provide specific delay characteristics. 1 9 separate delay lines provide reverberation times between 0.4 and 4.5 seconds in 16 switched steps. Some of the delay lines incorporate feedback, and in each case the degree of feedback can be indepen- dently varied by the operator. In addition to these professional reverb units, a number of instruments have recently appeared on the market which are intended to improve or compensate for the reverberation characteristics of domestic listening environments. One such unit is the Audio Pulse Model One from Digital Delay Systems which employs digital shift registers and delta modulator A-D and D-A converters. This unit provides a stereo reverberation signal which is reproduced via two delay lin« elektor february 1979 — 2-19 additional loudspeakers situated on I either side of the listener. As can be seen from the block diagram of figure 9a, the delay lines are arranged in a cross-coupled configuration. This ap- proach provides a high echo density, whilst choosing delay times which have no common denominator once again eliminates periodic echoes. The short delay times which are necessary for a high echo density would normally limit the available reverb times to an unac- ceptably short value. However this problem is solved by employing four delay lines (see figure 9b) one of which provides a delay of roughly 100 ms. This long delay ensures an ample reverberation time, whilst the remaining three delay lines, which are considerably shorter, are responsible for the rapid transition to high echo density. The ‘Acoustic Dimension Compiler’, ADC-2 from WEGA (see photo 2) is designed for a similar purpose, namely to reproduce a reverberation signal via two ancillary loudspeakers situated in the living room. The ‘space’ control varies the delay time, whilst the ‘reflec- tion’ control determines degree of feedback round the delay lines. The ‘characteristic’ switch varies the high frequency response of the unit. time (interval between echoes) is set to coincide with the rhythm of a piece of music, extremely interesting effects can be obtained. Space effects - 'super echo' ‘Space’ effects are characterised by extremely long reverberation times (approx. 10 seconds), giving a sort of ‘super’-echo which has no equivalent in real life, (because of the sound- absorption properties of air, reverber- ation of this duration cannot occur naturally). For this reason the effect has been christened ‘space’ and is extremely popular in sci-fi applications. The effect is obtained simply by using very long delay times and recirculating a large proportion of the delayed signal round the feedback loop. First reflection delay In the case of electro-acoustic reverber- ation units such as spring lines and reverberation plates as well as echo chambers, which often have extremely small dimensions, the initial delay between the original signal and the first reflection or echo is frequently too short for the reverberation to sound natural. This problem can be overcome by employing an electronic delay line to provide a sufficient interval between the direct signal and the reverb signal from the electro-acoustic reverberator. Delays of between 20 and 1 00 ms are normal in this type of application, however in recordings of pop records the initial delay period is often extended to greater than 100 ms in order to obtain special effects. Many electronic reverb units incorporate a special variable delay module in order to provide independent control of the ‘first reflection’ delay. Of particular interest for the electronics Figure 9a. Simple reverberation circuit em- ploying two crou-coupled delay modules to obtain stereo reverberation. Figure 9b. An extended version of the stereo reverb unit which provides increased echo density. Suitable reverberation times can be obtained by selecting a delay time of around 100 ms for rl. Figure 10. A circuit to produce single-echo effect. Photo 2. The Acoustic Dimension Compiler (ADC-21 from WEGA which employs a bucket-brigade delay line is an example of a reverberation unit designed for use with domestic hi-fi installations. Echo In contrast to reverberation, echo is characterised by relatively long delay • times, and more importantly, the regular repetition of individual reflection signals. In the simplest example of echo, say the reflection of a shouted sound from a cliff or mountain face, the signal is thrown back to the listener just once, and reaches him after a time, t, which is determined by the distance between himself and the reflective surface. The electronic equivalent would be a simple delay line whose output signal was attenuated and then mixed with the original direct signal (see figure 1 0). If one extends the model slightly to include a second cliff face at a certain distance from the first, the sound signal is slowly reflected to and fro between the two surfaces, with the result that one can clearly distinguish between successive echo signals. This effect is quite simple to simulate electronically: A simple reverberator circuit such as that already shown in figure 5 can be employed ; one merely has to use longer delay times and reduce the attenuation introduced by the feedback loop. Depending upon the length of the delay and the degree of feedback, extremely varied echo effects can be obtained. With delay times under roughly 20 ms, the comb response of the module lends a metallic-sounding tone to the resultant signal, whilst delays of between 50 and 70 ms still produce a ‘harsh’ or rough effect. It is only with longer delays that the overall frequency response becomes less irregular and the separate echo signals become discernible. If the delay enthusiast cum music fan, is the use of delay lines to achieve special effects such as phasing, flanging, vibrato, chorus, ensemble and string ensemble. These and allied effects are obtained by varying the frequency at which the delayed signal is clocked through the shift register, in contrast to reverb and echo, where the clock frequency of the delay line is constant. Several psycho-acoustic phenomena con- nected with the delaying of audio signals and how these effects can be exploited to ‘improve’ room acoustics and studio recordings together with the highly specialised areas of speech manipulation and pitch correction are beyond the scope of this article but could merit a further article in the not too distant future. Photographs: Photo 1: EMT-FRANZ Gmbh. 7630 Lahr. Photo 2: WEGA Bibliography: Schroeder, M.R. and Logan, B.F. ‘Colorless Artificial Reverberation ’, J. Audio Eng. Soc., vol. 9 nr. 3 pp. 192-197, July 1961. Schroeder, M.R. ‘Natural sounding Artificial Reverberation ', J. Audio Eng. Soc., vol. 10, nr. 3 pp. 219-223, July 1962 EMT ‘Elektronisches Nachhallgerdt EMT250’, EMT-Kurier Nr. 26, pp. 3-8, Februari 1976 EMT 'Digitales Tonsignal- Verzogerungsgerdt EMT 444', 1 st paragraph, ‘Warum verzogern?’, EMT-Kurier, Nr. 30, pp 3-6, July 1978 Reticon Corp. ‘Acoustic Applications of Serial Analog Delay-Devices - Reticon SAD 1 024 Serial Analog Delay ’, Application Note no. 104 Mitchell, P. W. and DeFreitas, R.E. ‘A New Digital Time-Delay and Reverberation System Part II: Psycho-acoustics vs. Practical Electronics’, presented at the 55th AES convention October 1976, AES Preprint No. 1191 (L-6). Elektor ‘Digital Reverberation Unit’, Elektor 37, pp 5-08 - 5-16. May 1978 Elektor ‘Analogue Reverberation Unit’, Elektor 42, pp 1 0-44 - 10-50, October 1978. M tumuu V.uaia^icn»iii.b ui auuio equip- ment. In particular, harmonic distortion , is still considered to be one of the im- portant parameters in performance of audio amplifiers, and in order to measure this accurately, it is obviously imperative that the input test signal itself have as little distortion as possible. In fact the distortion of the input sinewave must be at least an order lower than that intro- duced by the amplifier. Furthermore, it is important that the frequency of the sinewave be extremely stable, if one is to avoid having to constantly retune the notch filter in the distortion meter (see the circuit for a distortion meter pub- lished in Elektor 27/28, July/August 1977). The amplitude stability of the sinewave is of secondary importance in distortion measurements, however it is often a critical factor in a number of other test applications. Continuous or 'spot' If all three of the above-mentioned demands on a sinewave generator, viz. amplitude stability, constant frequency, and extremely low distortion, are to be satisfied, then unfortunately it more or less precludes the use of a sinewave generator with continuously adjustable frequency. It is true that such devices do exist, however they are exceedingly complex and expensive, and the number There are a number of measurement jobs which require an AC test signal, which, as nearly as possible, is a perfect sinewave. Not only must the amplitude of the signal be absolutely stable, but the hum, noise and harmonic distortion components must be reduced to a minimum. The spot frequency sinewave generator described here will provide a sinewave output with harmonic distortion of less than 0.0025% and whose amplitude is constant to within 0.1%. of commercially available, continuously tunable sinewave generators of high quality can be counted on the fingers of one hand. The basic problem with continuously adjustable sinewave generators is ampli- tude instability. In almost every case, the sinewave output is produced by an oscillator circuit. (*) An oscillator is essentially an amplifier with positive feedback, whereby the feedback loop contains suitable frequency-selective net- works of capacitors and resistors. In the example of the Wien bridge oscillator shown in figure 1 , positive feedback is applied via the RC network to the non- inverting input of the op-amp, whilst negative feedback is applied to the inverting input via the voltage divider network formed by R 0 and the negative temperature coefficient resistor (ther- mistor). If the negative feedback exceeds the positive feedback the oscillations will not be sustained and the output of the amplifier will fall ; if the positive feedback predominates, however, the output of the amplifier will rise until the latter footnote 1 In order to clear up any misunderstandings: a sinewave generator need not contain an oscillator. A sinewave signal can be obtained by. e.g. suitable filtering of a squarewave provided by an external oscillator circuit. As we shall see. however, if the squarewave is derived from the sinusoidal output of the generator, then the latter must of course contain an oscillator. spot sinewave generator clektor february 1979 - 2-21 i 1 I I Specifications Harmonic distortion: for: f = 40 Hz . . . 10 kHz u out < 6 V p p R l > 600 n (output 1 ) RL> 47 0 (output II) < 0.005% typically: 0.0025% falling amplitude linearly with Af osc Frequency stability: f osc < 0.01% Amplitude stability: — A <0.1% Figure 1. The besic principle of a Wien bridge oscillator. Figure 2. Basic block diagram of the oscillator employed in the spot sinewave generator. Figure 3. The amplitude- (a) and phase response (b) of the type of selective bandpass filter used in the spot sinewave generator. Curves 'V show the response obtained for a low Q, curves '2' for a high Q. The combined response of two such filters connected in cascade can be obtained by adding the indi- vidual amplitude/phase curves of each filter. saturates. The circuit is prevented from lapsing into either of these two con- ditions by the thermistor, which stabil- ises the output amplitude as follows: should the output voltage rise, the current through the thermistor will increase, causing its temperature to rise and hence its resistance to fall. This causes an increase in the proportion of negative feedback, thereby automati- cally reducing the gain of the op-amp. The opposite occurs when the output voltage tends to fall; the resistance of the thermistor is reduced since it dissi- pates less heat, thus also reducing the amount of negative feedback. Assuming that the resistor and capacitor values in the two arms of the bridge are identical, the proportion of output voltage which is fed back round the positive feedback loop at the resonant frequency, f 0 , of the oscillator is 1/3. The output voltage of the oscillator settles at the value which ensures that the resistance of the NTC resistor is equal to 2R 0 . It is obvious that the frequency of the oscillator could be continuously adjusted by using a stereo potentiometer or twin-ganged trimmer capacitor to vary the RC time constants in the arms of the bridge. However, in practice it is impossible to obtain stereo pots or trimmers in which both gangs are perfectly matched. Variations in the resistance or capacitance values between the two arms of the bridge have the effect of altering the positive feedback factor, k, the result of which is a change in the resistance value of the thermistor 2-22 - elektor february 1979 spot sinewave generator 4 rl> 600 n .“1 A R L > 47 tl - 0*1 Figure 4. Complete block diagram of the spot sinewave generator. Figure 5. The effect of changes in frequency and of the slope of the lowpass output filter upon the amplitude stability of the generator. Figure 6. Complete circuit diagram of the spot sinewave generator. (see figure 1). Thus varying the fre- quency of the oscillator has the effect of also varying the amplitude of the output signal. What is more, the ampli- tude of the output signal at the new frequency (after the balance between positive- and negative feedback has been re-established) differs from that obtained before the change in frequency. The op-amp is not the only source of distortion in the sinewave output (this can be counteracted by a high open- loop gain); a further contributory factor is the fact that the voltage-current transfer characteristic of the thermistor is not completely linear. Other ampli- tude-stabilising components such as filament lamps, diode-resistor networks or voltage-controlled FETs can be used, but these are also by no means perfect. For a large number of applications the above-mentioned failings are not par- ticularly critical; however, for measure- ment purposes where accuracy is important, they represent an unaccept- able source of error. For this reason, the most common solution is to do without the admittedly attractive facility of continuously adjustable frequency and to settle instead for an oscillator with a number of switched output frequencies. Basically this amounts to a series of individual oscillators each designed to produce a single optimal frequency. This elegantly solves the problem of amplitude stability which bedevils con- tinuously variable oscillators. If one considers that a high-quality continu- ously variable sinewave generator will cost in the region of £ 500 - £ 600, whilst a (simple) spot frequency sinewave oscillator on the other hand can be constructed for under £ 10, and further- more, that only four or five test fre- quencies are normally required in harmonic distortion measurements, then it is clear that a spot frequency generator represents a highly cost-effective ap- proach. The distortion meter published in the Summer Circuits 1977 is also designed for spot frequency measure- ments. Spot sinewave generator The basic principle of the spot sinewave generator described here should be familiar to a number of readers, since it was used in the design for a simple spot sinewave generator published in last year’s Summer Circuits issue (circuit 25). The operation of the circuit is illus- trated by the block diagram shown in figure 2. A symmetrical squarewave signal is fed to a number of cascaded selective filters (in figure 2 two such filters are used). These remove the harmonic content of the squarewave, leaving the more or less pure sinusoidal fundamental. The resulting sinewave is in turn used to trigger the squarewave from which it is derived. The amplitude of the sinewave is clipped to ± u, before being fed back to the input of the squarewave oscillator, so that the oscillations are maintained. For this in fact to happen, two conditions must be fulfilled: the input- and output signals must be in phase; this means that the phase shift of the selective filters must be either 0°, 360° or a multiple of 360° (the phase shift introduced by the clipping circuit can be neglected). Secondly, the loop gain of the system at the oscillator frequency, f 0 sc. must be greater than 1 . The former is the product of the gain of the clipping circuit plus that of the selective filters, and any damping introduced by an attenuator which may be included in the system. In figure 2 the centre frequencies of the two selective filters are identical, hence fosc = fo • The output signal of the clipping circuit is not a perfect squarewave, since it does not have an infinite gain. Strictly speaking the output is a clipped sinewave, which has more in common with a symmetrical trapezoidal waveform. This is all to the good, however, since this type of waveform has fewer harmonics to filter out than a perfect squarewave. Figure 3a shows the amplitude response curve of the type of selective filter employed in the circuit, whilst in figure 3b we see the phase response of the filter. The overall response of a number of filters connected in cascade can be obtained by adding each point of the ' separate response curves for each filter, j The resonant frequency of the system is > that at which the combined phase response curve intersects the x-axis. With two selective filters whose centre frequencies, foi and f^ , are offset slightly, the resonant frequency f osc will equal \Aoi ‘ foa - The amplitude spot sinewave generator elektor february 1979 - 2-23 6 values shown in figure 2 assume that the output signal of the limiter is a perfect squarewave and that the resonant gain of each filter is 2. The harmonic sup- pression of the filters is discussed in Appendix 2 at the end of the article. Practical design The block diagram of the full spot sinewave generator is shown in figure 4, whilst figure 6 contains the complete circuit diagram. In contrast to figure 2, the block diagram of figure 4 contains a variable attenuator (in the shape of a potentiometer), a lowpass filter and an output buffer stage. In addition to varying the amplitude of the output signal, the potentiometer fulfils a second function. Without some kind of signal level control at this stage there is the danger that an excessively large input signal would overload the filters, causing their output to clip. The output buffer stage ensures that, even under heavy load conditions, the generator can provide a low distortion output signal. It is an obvious step to combine the output buffer with an 18 dB per octave lowpass filter — all that is needed is three extra resistors and capacitors. If the turnover fre- quency of the filter is calculated to roughly coincide with the oscillator frequency, the result is further sup- pression of harmonics without incurring too great a voltage loss or significantly affecting the amplitude stability of the output signal. This latter point may require further explanation: see figure 5. If one assumes that the oscillator frequency can vary by a factor of * A fosc (the frequency stability is then — x 100%), then the amplitude of ‘osc the output signal of the lowpass filter can vary by ± A A; the result is that in addition to variations in amplitude caused by the oscillator itself, the amplitude of the sinewave generator output can be affected by variations in the output of the lowpass filter caused by frequency drift. Fortunately, in view of the extreme stability of the oscillator and the relatively gradual roll-off in the lowpass filter's response at the 3 dB point, this effect is of little practical importance. The detailed circuit dia- gram of the spot sinewave generator is shown in figure 6 . The clipping circuit is built round IC 1 , (which has a gain of 11) R3, and T1 and T2, which are connected as sym- metrical zener diodes. The trapezoidal voltage at the junction of R3 and R4 is attenuated by R4 and PI , and fed to the first selective filter consisting of IC2, IC3, R5 . . . R9, Cl and C2. The second bandpass filter (IC4, IC5, RIO . . . R14, C3, C4) is identical to the first; a more detailed discussion of these filters is contained in Appendix 1 at the end of the article. The frequency-determining components of the lowpass filter are R15, R16, R17, C5, C6 and C7, whilst IC6 is the associ- ated emitter follower, which also functions as output buffer. If desired, a symmetrical emitter follower (T3 . . . T6 etc.) can be connected to the output of L IC6, allowing the generator to be used with load impedances as low as 47 £2. If load impedances as low as this are not foreseen, the emitter follower com- ponents can be omitted, points A and B are linked together and outputs I and II can be used with impedances of 600 £2 or greater. The frequency of the oscillator is j determined by the choice of component values for C 1 . . . C7 : Cl =C2 = C3 = C4= j Capacitances are in nanofarads, the oscillator frequency is in kHz. Construction Figures 7 and 8 show the copper track pattern and component overlay respect- ively of the p.c.b. for the 47 £2 version of the spot sinewave generator. Figure 9 shows the component layout for the version without the emitter follower output buffer (into 600 £2 or above). As far as the choice of component values are concerned, the values given for R8, R9, R13 and R14 are nominally 33 k; possible alterations to these values are discussed in the following section describing the calibration procedure. The values of R6, R7, Rll and R12 2-24 - elektor fabruarv 1979 spot sinewave generator should be as closely matched as possible. The best procedure is to measure their resistance, but in practice it is sufficient to take four successive resistors from the ‘belt’ in which they are packaged. Although desirable, 1 or 2% metal-oxide types are not absolutely necessary. The values of C 1 . . . C7 are calculated from the equations listed above. Room has been provided on the p.c.b. to make up the correct values by connecting two capacitors in parallel. Cl . . . C4 should also be as closely matched as is possible. If there are discrepancies in the values of Cl . . ,C4 or R6, R7, Rll and R12, it may slightly affect the quality of the output signal. However this can be rectified during the calibration pro- cedure, which is described next. Calibration An oscilloscope is a prerequisite for correct calibration of the sinewave generator. After the usual checks the generator is connected to the oscillo- scope and the power switched on. The wiper of PI should be turned fully towards R4, whereupon, hopefully, a sinewave signal should appear on the screen. If, however, nothing happens, then the circuit is failing to oscillate, a state of affairs which is almost certainly due to the fact that the centre fre- quencies of the two selective filters are too far apart, with the result that the loop gain at the resonant frequency is less than 1. The first thing to do, therefore is tune in the frequencies of these filters. Figure 10a shows the response curves of a number of selective filters of differing centre frequency whilst figure 10b shows three different response curves obtained: (1) when two filters with the response of curve 1 in figure 1 0a are connected in cascade (i.e. both filters have the same centre fre- quency); (2) when the centre frequencies of the two filters are slightly offset, as is the case with curves 2 in figure 1 0a; (3) and when the centre frequencies of the two filters are fairly far apart (curves 3 in figure 1 0a). The Q and res- onant gain, A, of all the filters in figure 10a are identical. It is apparent that the greater the difference in the centre frequencies of the two filters, the smaller the gain at the resonant fre- quency (it may even fall to the point where the loop gain of the system is less than 1; see also Appendix 3), and also the less filtering of higher frequencies there is - i.e. less suppression of the higher harmonics. One should thus attempt to ensure that the centre frequencies of the two bandpass filters are as close as possible, at least enough to ensure that the oscillator starts. If, during the calibration procedure, the oscillator should initially refuse to start, the loop gain of the system should be temporarily increased by bridging R1 with a resister of a couple of hundred Ohms. As soon as the oscillator starts, the output signals of both bandpass filters should be displayed on the scope. The signals at pin 6 of IC2 and IC4 will almost certainly exhibit a considerable phase shift (if there was only a small shift the oscillator would have started first time). The extent of the phase shift is a measure of the difference between the centre frequencies of the selective filters. Thus the centre frequency of one or both filters should be adjusted until the two signals are as nearly as possible in phase; at the same time the amplitude of the sinewave at the output of IC4 should rise. The adjustments are realised by altering the value of one or more of re- sistors R8, R9, R13andR14(see Appen- dix 1). Each resistor can be varied be- tween 22 k and 68 k. Of course it is also possible to vary the value of other fre- quency-determining components (again see Appendix 1). Once the frequencies of the selective filters have been aligned as accurately as is possible, the resist- ance bridge across R1 can be removed. As described above, the more accurate tuning of the two filters will have the effect of increasing the resonant gain of the system; if as a result of this the output of one or both filters should start clipping, PI should be adjusted until the loop gain is at a satisfactory level. The calibration procedure is then complete. In conclusion The spot sinewave generator requires a symmetrical stabilised supply of ± 15 V. The current consumption per oscillator is a maximum of 50 mA for the 600 fi version and 150mA for the 47 J2 version. The quiescent current of the output stage of the latter should be set to 100mA using P2. The lower the amplitude of the output signal, the less harmonic distortion. Thus the size of spot sinewave generator elektor february 1979 — 2-25 6gi T T l ouW r o| ] J> o^hoo o»- o mosU-oora •o=)H5> (tltloNKoorfi the output signal can be adjusted as desired by means of P 1 . There are two conditions attached to using PI as an amplitude control however: it should be set neither too high as to allow clipping to occur, nor too low as to cause the oscillator to stop. It is also possible to omit PI altogether. R4 and R5 are then joined and between this junction and earth a resistance of suitable value is inserted. In nine out of ten cases the value of a simple carbon resistor will prove stabler than that obtained using a potentiometer; the above step can there- fore only improve the overall amplitude stability of the generator. If several oscillator frequencies are required, then, in order to keep the com- ponent count down it would be logical to use a 9-pole switch (for Cl . . ,C7 and P 1 ) with however many ways as one requires different frequencies. Although this represents the most elegant solution, whether it is the cheapest is another question. Spot sinewave generators are of course most commonly used in AF applications, however the model described here can also be used for high frequency work. It was with an eye to this type of appli- cation that the 50 f2 output was pro- vided. Unless one possesses a tunable two-tone generator, measuring the inter- modulation distortion of r.f. amplifiers can be a difficult business. The two-tone generator produces a pair of signals of identical amplitude but differing fre- quency. If one feeds the output of the spot sinewave generator to a double- balanced mixer (DBM) (see figure 11) one obtains two output signals whose frequencies differ by twice the fre- quency of the original input signal. Of particular interest are the uneven harmonic distortion components, since their frequencies lie in the region of the desired signals. The IM distortion of the two-tone generator itself must be less than -60 dB for reliable measurement purposes — a specification which the spot sinewave generator easily improves upon. Bibliography: 1. Spot frequency sinewave gener- ator; Elektor 27/28, July /August 1977. 2. Klein and Zaalberg van Zelst, A non-linear low output im- pedance AF oscillator with ex- tremely low distortion. Philips Technical Journal, 25.20.1963. Appendix 1 . It can be shown that the centre frequency f 0 , the resonant gain. A, and the Q of the selective filter formed by IC2 and IC3 in figure 2 can be determined as follows: f o = z 1 */w- R6- R7- Cl- C2 Figures 7 and 8. Track pattern and component layout of the p.c.b. for the circuit of figure 6. (EPS 9948). Resistors: R1 = 1 k R2,R15,R16,R17«10k R3 - 2k2 R4 = 22 k R5.R10 = 1 M R6.R7.R1 1 ,R12 ■= 18 k R8 1 ,R9‘ ,R13‘ ,R14‘ = 33 k R18 3 ,R22 3 = 8k2 R19 3 ,R21 3 = 6k8 R20 3 = 1k5 R23 3 ,R25 3 = 3k9 R24 3 ,R26 3 = 22 MVi W PI = 10 k preset P2 3 = 1 k preset Capacitors: Cl ,C2,C3,C4,C5,C6, C7 = see text 3 C8 = 22 p C9 3 ,C1 0 3 ,C1 3,C14,C1 5,C16,C1 7, C18,C19,C20 = lOOn C11 3 ,C12 3 = 22 m/16 V Semiconductors: T1.T2.T4 3 = BC 1078. BC547B or equivalent T3 3 = BC177B, BC 557B or equivalent T5 3 = BD139 T6 3 = BD140 IC1 = LF 357 (National Semi- conductors or second sourced) IC2,IC3,IC4,IC5,IC6 = LF356 (National Semiconductors or second sourced) IC7 = TDA 1034 (Philips). NE 5534 (Signetics). 1. nominal value, see text. 2. these components are only used for the 50 n version (output II, wire link AB is omitted) 3. Capacitors Cl . . . C7 are formed by connecting two separate capacitors, a and b, in parallel to obtain the desired values. N.B. The component overlay shown in figure 9 is only valid for the standard (600 n) version of the circuit; the over- lay shown in figure 8 is correct for both the standard and extended (60 fl) ver- sions. If only the standard version is required, several components can be omitted (in particular, T3 . . . T6 and P2). 2-26 — elektor february 1979 spot sinewave gener q=rs\[W^±7H v R9 C2 R6- R7 If Cl =€2 = C, R8 = R9,R5 = Rq and R6 = R7 = R, then: fo 2nRC A = 2 Q = Rq R These equations are also true for the second filter (round IC4 and ICS). It is apparent from the expression for fo that (small) variations in centre frequencies of the two filters can be obtained by varying the value of one or more of resistors R8, R9, R13 and R14. 2. As far as the amplitude response of the selective filters used in this circuit is concerned, it can be shown that: input voltage and u 0 the output voltage of the filter, and n = . If the Q of the filter is sufficiently high, the above expression can be simplified to: ^L_ = u i J n (n 2 - 1 ) Q for n > 1 A symmetrical squarewave contains exclusively odd harmonics (this is in addition to the fundamental, 4 which is - x the amplitude of the jf squarewave), i.e. n = 3, 5, 7 etc. The amplitude of the n-th harmonic is — x the fundamental. The ampli- n tude of the third harmonic of a symmetrical squarewave is therefore 33 1/3% that of the fundamental, the fifth harmonic is 20% of the fundamental, the seventh harmonic is approx. 14%. . . and so on. The Q of the filters shown in figure 2 is approx. 55. If the centre frequencies f 0 i and fo of the two filters are identical (and equal to the resona nt frequency, f osc = V foi ‘ fo), then a single filter will suppress the third harmonic by a factor of 146, the fifth harmonic by a factor of 264, and so on. With two filters connected in cascade, these factors should be squared. In actual fact the filters are fed not with a perfect squarewave, but with 'll Figures 10a and 10b. The effect of discrep- ancies between the centre frequencies of the two filters upon the combined amplitude response. Figure 11. How the spot sinewave generator can be used to measure the intermodulation distortion of r.f. amplifiers. a trapezoidal waveform, whose har- monics are less pronounced than those of a squarewave. 3. It can be shown that, with two bandpass filters connected in cas- cade, which have resonant fre- quencies of fo and fo, respect : ively, but which have the same resonant gain and quality factor, Q, that, at the frequency V fo * fo. where fo > fo , the gain will fall by a factor of 1 + (Q 1 ~ x « ) , where .^(51 If, as a result of component toler- ances, fo and fo vary from one another by more than 10% (x * 1.05, x 2 = 1.1), and if Q= 55, then the gain of the two filters at the oscillator frequency will be reduced by a factor of 28.4. For this reason it is important that, as far as possible, one should attempt to match the components u§ed in the two filters. M clap-switch elektor february 1979 — 2-27 clap -switch Imagine you are sitting in your living room, enjoying the compa- ny of a few friends, when you notice that evening is approaching and the daylight is beginning to fade. Suddenly you clap your hands, and — hey presto— the light comes on! Not only have you spared yourself the trouble of leaving the comfort of your chair, but you have 'dazzled' the as- sembled guests with the magical powers of your electronic wiz- ardry. The following article describes how to achieve this impressive effect by building a simple 'clap-activated switch', which should cost not much more than £ 10. There are numerous interesting appli- cations for a switch which can be con- trolled simply by clapping one’s hands, however the problem with all such de- vices is that they are susceptible to spu- rious triggering. Most clap-switches are designed simply to detect a short, sharp sound signal. This signal is picked up by a microphone and fed to a trigger circuit which in turn provides a control pulse. This design suffers from the ob- vious drawback that any other sudden sharp noise will also activate the switch. The circuit described here, however, employs a different approach. In ad- dition to having a fairly large amplitude, the waveform produced by clapping one’s hands is characterised by a very short rise time, that is to say that the signal contains ultrasonic frequency components. By employing a switch which is sensitive to ultrasonic signals, the circuit is capable of a much higher degree of discrimination between auth- entic and spurious commands. With the circuit described here, only sounds which have a considerable proportion of ultrasonic frequencies, such as, e.g., those produced by jangling a bunch of keys, will also trigger the switch. Circuit diagram The complete circuit diagram of the ultrasonic switch is shown in figure 2. Virtually any commonly available ultra- sonic transducer, including ultrasonic- ally-sensitive electret microphones, will prove suitable. The input amplifier is formed by a BC109C (Tl), whilst C3, C4, R4 and R5 function as an active highpass filter. The 709 op-amp func- tions both as an amplifier and as a monostable. In principle a 741 could also be used, however this would signifi- cantly reduce the sensitivity of the circuit. The time constant of the monostable is approx. 70 ms. This allows MKM- or MKH capacitors to be used (1 fiF is the largest value available in this series) and, more importantly, is sufficiently long to ensure that the monostable cannot be triggered by reverberation signals. This point illustrates another advantage of the ultrasonic approach, since the rever- beration times of ultrasonic signals are much shorter than those in the audio spectrum, and hence will always lie inside the period of the monostable. Construction and setting-up Design The basic design of the circuit is illus- trated by the block diagram of figure 1 . The ultrasonic frequency components produced by clapping one’s hands are picked up by a suitable transducer. After being amplified and filtered they are fed to a monostable with a low trigger threshold. This provides a signal with a sufficiently fast rise time to in turn trigger a flip-flop. Since two flip-flops are contained in one 4013, a second flip-flop in the circuit affords the possibility of acti- vating the switch by two handclaps. This means that either one can ‘program’ the switch (two claps means, e.g. turn the light on) or else simply reduce even further the chance of spurious triggering, since any extraneous sound signal with a high ultrasonic content would have to be repeated for the switch to be activ- ated. As far as construction is concerned, a glance at the printed circuit board shown in figure 3 will show that the circuit can easily be mounted into most types of equipment that one might wish to switch on and off in this fashion. The current consumption is sufficiently low- approx. 20 mA - that the circuit can be powered by battery. If however a mains- derived supply is desired, then this need not be stabilised, and the simple circuit of figure 4 will do the trick. The supply should, however, be well-screened from the circuit, in order to prevent mains interference. Figure 5 illustrates how, with the aid of a relay, the A- or B-output of the circuit can be used to switch such elec- trical apparatus as room lighting, etc. Before the switch can be used, the input sensitivity of the circuit must first be set to a suitable level. This is carried out as follows: dap-switch elektor february 1979 - 2-29 1. After the supply voltage is applied, the output of IC1 (pin 6) is set to logic ‘0’ with the aid of P2. 2. The wiper of PI is turned fully towards R5, thereby adjusting the circuit for maximum sensitivity. 3. The sensitivity is gradually reduced until the point is reached where the circuit still responds to a handclap, but not to quieter noises. To do this the trigger threshold is increased by setting P2 to the position just be- yond that needed to take the output of IC1 high, and then adjusting PI until the desired sensitivity is ob- tained. 'Clapper' For those readers who find their hands otherwise occupied too often for clap- ping, the circuit in figure 6 provides the answer. Comprising a single 401 1 and an ultrasonic transducer, the circuit is basically a miniature ultrasonic trans- mitter, which, when started produces a 5 ms signal burst to which the ‘clap- switch’ will respond. The ultrasonic Figure 1. Block diagram of the 'clap-activated switch'. Figure 2. Complete circuit diagram of the ultrasonic clap-switch. The cheap and readily available 709 op-amp is used to form the mono stable. Figure 3. Track pattern and component layout of the p.c.b. for the clap-switch (EPS 79026). Figure 4. A simple power supply circuit for the clap-switch. In order to counteract mains interference, the supply should be well-screen- ed using e.g. lengths of copper laminate board. The screening material should of course be securely connected to an earth point. Figure 5. This circuit shows how with the aid of a relay the dap-switch can be used to control e.g. a room light. Figure 6. Circuit diagram of an ultrasonic 'dapper' which can be used to control the clap-switch at distances of up to 15 metres. ‘clapper’ also has the advantage that it considerably increases the distance at which the switch can be actuated. In j response to a simple handclap the range j of the switch is approx. 5 to 6 metres; j with the circuit of figure 6 however, (and assuming the device is pointed at j the switch) this is extended to roughly 1 5 metres. The circuit (N3/N4) is a gated astable multivibrator which oscillates at a fre- quency of approx. 30 kHz when trig- gered by a monostable formed by N1/N2. As stated, each time the start button (SI) is depressed, a signal burst roughly S ms long is transmitted. In view of the very modest current consumption (approx. 100 jiA) which means that it could be powered by several button cells connected in series, and the fact that it uses only a handful of components, the above circuit is . ideally suited for miniaturisation. The frequency of the astable multi- 1 vibrator can be adjusted by means of P 1 , and is best set by testing to see at which frequency the ultrasonic switch is most sensitive. K invitation to investigate, improve on and implement imperfect but interesting ideas elektor february 1979 Squelch for FM stereo receiver The majority of FM receivers are pro- vided with some form of squelch circuit which suppresses the noise arising from mis-tuning. Such a circuit prevents the extremely intrusive ‘inter-station’ noise from breaking through into the audio signal. Most squelch circuits function on the principle of blocking the audio signal when a control signal derived from the IF amplifier falls below a certain level. However the strength of the received signal is not in itself an index of the quality of reception. It is perfectly possible that the reception can be quite poor in spite of a large signal being available, as is the case for example VW *MA ejector missing link elektor february 1979 — 2-31 when multipath distortion occurs (the transmitted signal not only travels direct to the receiver, but also via multiple reflection paths). It is also possible that, e.g. two transmitters are broadcasting at the same frequency and the received signals are roughly equal in strength. Taken together these present a relatively large signal, however the actual quality of reception would of course be quite unsatisfactory. For this reason it is better if the control signal for the squelch is taken not from the IF ampli- fier, but rather is derived from the FM multiplex signal - which, in the final instance, is the signal which is really important. The spectrum of a typical FM multiplex signal (i.e. the output of the demodu- lator before it has been fed to the stereo decoder) is shown in figure 2. The band of frequencies between 30 Hz and 15 kHz contains the mono audio signal (i.e. L + R), whilst the stereo in- formation (L — R), which is modulated onto a 38 kHz subcarrier, straddles the two sidebands stretching from 23 kHz to 53 kHz. Detecting the presence of a transmitter signal in these frequency bands is not as straightforward as one might assume; there is no simple way of distinguishing between a coherent modulated trans- mission signal and plain noise. Another possibility which presents itself is to use the frequency band above 53 kHz to determine whether the receiver is correctly tuned, since that portion of the spectrum is in theory ‘empty’. In practice however, it is less than suitable, since there are in fact all sorts of inter- ference signals present from transmitters operating on adjacent wavelengths. A more promising idea is to use the area around the 19 kHz pilot tone. In most squelch circuits which detect and amplify a noise signal the attempt is made to ensure that the noise amplifier is sufficiently selective that it does not detect the 19 kHz pilot tone. However there is no reason why the noise ampli- fier should not be tuned to exactly 19 kHz - especially since the band of frequencies around this point is delib- erately protected from interference lest the operation of the stereo decoder be adversely affected. The presence of the pilot tone itself could interfere with the detection of the noise signal, however in contrast to the latter it is constant, and its influence can be counteracted by rectifying the narrow band of frequencies around 19 kHz and slightly smoothing the latter so that any pilot tone present would be converted to a DC voltage. Assuming that the smoothing of the rectified signal is not particularly drastic, any noise component in the signal will still be detectable: even if rectified, noise is still noise. Figure 3 shows a block diagram of a squelch circuit based on the approach outlined above. The filtered 19 kHz signal is rectified in a peak detector. The 19 kHz pilot tone, should it be present, appears as a DC component at the de- tector output and has no further influ- ence on the operation of the circuit. The noise signal components below say, 1 kHz, are rectified in detector 2 and fed to a comparator, so that when they exceed a certain level, the squelch circuit cuts in. What to do with the squelch signal? The amount of noise in the multiplex signal can not only be used to determine when the audio signal is suppressed, but also when it is desirable to switch from stereo to mono. It is often the case that quite acceptable mono reception can still be achieved when the stereo recep- tion is extremely poor. The difference in signal-to-noise ratio between mono and stereo is approx. 22 dB, and so switching from stereo to mono will often be a more drastic step than is actually required. A small number of receivers are provided with a ‘half-way house’, i.e. the receiver is switched to stereo reception, but above approx. 3 kHz a certain amount of crosstalk is introduced between the two channels. Thus a stereo image is ob- tained, without the worst of the stereo noise. By using a control voltage to regulate the amount of crosstalk between channels it is possible to ensure that the signal-to-noise ratio never falls below a certain value as a result of this techni- que. One possible solution is shown in figure 4. The amount of L-channel signal introduced via capacitor C into the R-channel is determined by the duty cycle of the signal controlling the analogue switch S. To prevent interference products the switching signal should be synchronised to either the 76 kHz subcarrier or a harmonic of the latter. In PLL decoders there is generally a suitable waveform directly available. An indication of the mode in which the receiver is function- ing (from pure mono to full stereo) can be obtained by using a two-colour LED with anti-parallel diodes, as is shown in the figure. To ensure that it does not produce any unwanted ‘plops’ or ‘clicks’, a good squelch circuit should switch at the zero-crossing point of the input signal. One method of realising this is shown in the circuit of figure 5. The compara- tors change state at the zero-crossing points of each channel. Only when a positive-going signal crosses zero simul- taneously in both channels will the flip-flop be triggered and the squelch turned on. missing link 6 Modifications to Additions to Improvements on Corrections in Circuits published in Elektor Temperature controlled soldering Elektor 41 September 1978, page 9-42. The value for P2 is incorrect in the parts list, it should be a 100 fi linear poten- tiometer. Cackling egg timer. Elektor 43, November 1978, page 11-02. The value of R1 and Cl are incorrect in the parts list, the correct values are; R1 = 2M2, Cl = 100 nF. Consonant Elektor 39/40, July/ August 1978, p. 7-38. A few readers have ex- perienced problems with exess- ively high hiss levels. In some cases, the S/N ratio can be im- proved by shorting out R27 and R27’ (replacing these resistors by wire links). However, in most cases it has been found that the Consonant meets its specifications, but that correct level-matching with the power amplifier is the real problem. This is dealt with elsewhere in this issue. Excessive hum is normally due to earth loops, and this, too, merits a separate article. One particular point should, however be noted: the controls on the Consonant board are connected to supply common. If metal parts of these controls make contact with the metal front panel, earth loops may occur. Some readers would prefer more ‘effective’ bass control. This is, of course, a question of personal taste ... If this is required, Cl 2, Cl 2’, C13 and C13’ can be reduced to 15 n; the higher turn- over frequency will then be shifted from 300 Hz to approxi- mately 750 Hz. Similarly, reduc- ing the values of C14 and C14’ to 18 n will then shift the lower tum-over frequency up to ap- proximately 300 Hz. 2 32 - elektor february 1979 using elbug using elbug It is almost a year since the article on Elbug, the monitor software program for the Elektor SC/MP nP system was published. The original article concentrated on a description of the various control functions which Elbug provided, and did not examine how the program actually worked. Prompted partly by the many requests from readers, the following article takes a more detailed look at Elbug, describing how some of the more important subroutines function, and how these routines can profitably be incorporated into one's own programs. (H. Huschitt) Figure 1. This figure illustrates the functions assigned to the various locations in Elbug's software stack. Programming techniques Writing programs for microcomputers is not difficult, providing one adopts the approach of breaking the program down into a number of smaller units which can be tackled individually. Just as a complex electronic circuit is built up from a number of separate components, so any large program is composed of a number of smaller routines and subrou- tines. This is also true of Elbug, which contains e.g. a display routine, which ensures that the hexadecimal represen- tation of a data byte appears on the displays, a keyboard routine, which ensures that the correct code is generated when a particular key is depressed, and so on. Subroutines are implemented by jumping from the main program to the start address of the routine in question. At the end of the routine the micro- processor resumes main program ex- ecution by jumping back to the address of the main program instruction which follows the subroutine call. In higher programming languages, such as, e.g. BASIC, there are special instruc- tions, GOSUB (go to subroutine) and RETURN (return from subroutine), for these tasks. Certain microprocessors are also provided with similar instructions, however this is not the case with the SC/MP. The instruction which the SC/MP employs to initiate a subroutine is XPPC (Exchange Pointer with Program Counter). By loading the address of the subroutine in whichever pointer is specified, the above instruc- tion will effect a jump to that routine, since the address in question is loaded into the program counter. The SC/MP has of course three 16-bit pointer registers in addition to the program counter. Each of these pointers may be used as page pointers, stack pointers or subroutine pointers, how- ever PTR 3 is unique in that, when the SC/MP senses an interrupt request (the enable interrupt line - Sense bit A in the Status Register - goes high) the SC/MP automatically executes an XPPC-3 in- struction. Thus, after a valid interrupt, the next instruction executed will be that contained in the address held in PTR 3 (incremented by one). At the end of the interrupt routine the jump back to the main program is similarly effected by means of an XPPC-3 in- struction. As a result of this interrupt facility, PTR 3 is conventionally as- signed as the subroutine pointer. How- ever, it is of course perfectly feasible to use the other two pointer registers to call subroutines from within the main program. To implement a subroutine call, the subroutine pointer is actually loaded with the start address of the routine minus one. The reason for this is that the SC/MP increments the contents of the program counter before it fetches the next instruction. Thus: LDI L(SUBR)-1 XPALn LDI H(SUBR) XPAH n Since the address contained in the subroutine pointer must be incremented in order to obtain the true start address of the subroutine, it is important that this operation does not require a carry from bit 11 to bit 12 of the address since the SC/MP will not perform such a carry. Thus, for example, if the start address of the subroutine is F000, normally the address loaded into the Table 1. DELAY: LDI 08 ST COUNT LOOP: DLY X FF DLD COUNT JNZ LOOP XPPC 3 JMP DELAY COUNT: •BYTE ; load counter • 8 ; execute delay instruction 8 times ; jump back to main program ; RAM byte as counter using elbug elektor february 1979 — 2-33 ADR 0FFF 0FFE 0FFD 0FFC 0FFB 0FFA 0FF9 0FF8 0FF7 0FF6 0FF6 0FF4 0FF3 0FF2 0FF1 0FF0 0FEF 0FEE 0FED 0FEC 0FEB 0FEA 0FE9 0FE8 0FE7 0FE6 0FE5 0FE4 0FE3 0FE2 0FE1 0FE0 0FDF 0FDE 0FDD 0FDC 0FDB 0FDA 0FD9 0FD8 0FD7 0FD6 0FD5 0FD4 0FD3 0FD2 0FD1 0FDO 0FCF 0FCE 0FCD 0FCC 0FCB 0FCA 0FC9 STACK STAKPT, lower STAKPT, higher ROUTAD. lower ROUTAD, higher STFULL STDEEP STKEFF AC PTR, lower PTR, higher SPEED SR PTR 1 L PTR 1 H PTR 2 L PTR 2H PTR 3 L PTR 3 H ROUTAD L ROUTAD H AC E SR PTR 1 L PTR 1 H PTR 2 L PTR 2 H PTR 3 L PTR 3 H ROUTAD L ROUTAD H AC Key, binary Key -Code 7-Segm-Code Keys Byte, higher ADR, higher Byte, lower ADR, lower pointer would be F (900 - 1 = EFFF. However in this instance the address thereby obtained would be incorrect, since, as stated, there can be no carry from bit 11 to bit 12 and the four highest address bits would remain unaltered (i.e. ‘E’). The correct address to enter into the pointer is therefore FFFF. Whilst the subroutine is being executed, PTR 3 will contain the address of the last instruction executed in the main program, i.e. the return address — 1, assuming of course that the contents of the PTR are not altered by the subrou- tine. Thus an XPPC-3 instruction at the end of the subroutine will effect a return to main program execution. However, the address now held by PTR 3 will be that of the last instruc- tion in the subroutine, which means that a subsequent XPPC-3 instruction would effect a jump to the end of the subroutine and not the start. For this reason the final instruction of almost every subroutine will be a jump back to the start of the routine. A practical example of the above- described techniques is the delay routine listed in table 1. This routine can be used in the course of main program execution in order to avoid filling a large portion of program memory with delay instructions. If the delay routine is used repetitively, the subroutine call will be structured as follows: JS 3* (DELAY) ; load PTR 3 and make • first jump to delay • routine XPPC 3 ; second jump to delay routine XPPC 3 ; third jump to delay routine Unfortunately, the process is not quite as simple as might first appear. The contents of the accumulator are altered by the subroutine. Thus if the contents of the AC prior to the jump to delay routine are required later in the main program, they must first be stored somewhere. As long as it is simply the contents of the AC which must be preserved, this does not present any special problems, since they can easily be stored in the extension register. Unfortunately, however, the situation becomes slightly more complicated if the contents of the pointers themselves are altered in the course of a subroutine, since the return addresses to the main program will then be lost. Thus it is necessary to store the return addresses at the beginning of the sub- routine, and then re-enter these into the pointers at the end of the routine, so that an XPPC instruction will effect a return to the main program. From a programming point of view it is extremely useful to be able to jump from the middle of one subroutine to a second subroutine, i.e. to ‘nest’ routines inside one another like Chinese boxes. However for each jump that is made a return address must be stored, so that it must be possible to ‘stack up’ the return addresses somewhere in memory in order that they can be retrieved as required. Some microprocessors are provided with an integral on-chip stack, capable of storing up to 12 or 16 return addresses. This is not the case with the SC/MP, however, so that it is necessary to employ a ‘software stack’. Software lifo stack A software stack is basically a routine which simulates the function of a stack *JS 3 is a symbol for a 'pseudo instruction', i.e. a statement which results in the gener- ation of several machine-language instructions - in this case the loading of PTR 3 and exchanging the contents of PC and PTR 3. 2-34 — elektor february 1979 using elbug register, by employing a section of read / write memory as a scratch-pad store for the data to be saved. The advantage of a software stack is that there need be virtually no limit to its depth, i.e. the number of return addresses it is capable of storing. In addition there is the possibility of storing the contents of other important registers, such as the AC or extension register, in the stack. The software stack of Elbug utilises the section of RAM between 0FC9 and 0FFF. This section was chosen since it can easily be ad- dressed via the program counter from the beginning of that page of memory (i.e. from 0000). In addition to return addresses the contents of all the CPU registers, with the exception of the PC, are stored on Elbug stack. In order to store the status of all of the CPU registers 1 1 bytes of RAM are required. Figure 1 indicates which locations are reserved for this purpose. As can be seen, the stack contains sufficient space to store the status of each CPU register twice. Since Elbug only nests to a level of one subroutine (i.e. one subroutine called by another) this is sufficient. However a particular user’s program may require several subroutines to be nested, in which case the stack can be extended downwards from 0FC9 as far as is desired. The stack is organised on a ‘last-in-first- out’ (lifo) basis, and employs a ‘stack pointer’ — usually PTR 2 — to point to the last value pushed onto the stack. A ‘stack routine’ is required to write the contents of the CPU registers into the stack, and in order to ensure that the stack pointer can be used during a subroutine and the stack address still be preserved, the status of the stack pointer (STAKPT) is itself stored in locations 0FFF and 0FFE at the top of the stack (see figure 1). When Elbug is started, the address 0FE0 is written into these locations; this location represents the ‘base’ of the stack. The section of stack from 0FFF to 0FE0 is fixed, however below this point the stack can be expanded or contracted as required. In a user’s program which contains a large number of nested interrupts, there exists the danger of the dynamic portion of the stack being extended downwards to the point where it overlaps a user’s program stored from 0C00 onwards. In order to prevent such an eventuality, a stack counter (STKEFF) is maintained, which is incremented or decremented each time a byte is pushed onto or pulled off the stack. In addition, a byte of RAM is reserved which, via the MODIFY routine or the user’s program, can be used to specify the number of bytes of status information which may be stored on the stack. This byte, which effectively determines the depth of the stack, is stored in location 0FFA (STDEEP) - see figure 1. This byte is compared with the contents of the stack counter each time a stack operation is performed, and when the effective stack depth (STEFF) equals Table 2. Elbug STACK r utines 0700 DISPL = 0700 0FFF STAKPT = 0FFF ROUTAD= 0FFD 0FFB STFULL = 0FFB 0FFA STDEEP = 0FFA 0FF9 STKEFF = 0FF9 AC = 0FF8 PTR = 0FF7 SPEED « 0FF5 ; speed of cassette routine STKBSE = 0FE0 0000 . = 0000 STACK: 0000 08 NOP 0001 C415 LDI X'15 0003 C8F1 ST SPEED ; to 600 bits/sec 0005 C4E0 LDI L (STKBSE) ; set stack ptr to 0007 C8F7 ST STAKPT 0009 C40F LDI H (STKBSE) 0O0B C8F2 ST STAKPT-1 0O0D C40O LDI 00 000 F C8E9 ST STKEFF ; set stack counter to 0 0011 C8E9 ST STFULL ; stack-full byte = 0 0013 903D JMP $1 ; jump to 'elbug' PULL: ; pull status off stack 0015 C0E9 LD STAKPT 0017 31 XPAL 1 ; contents of stack ptr 0018 C0E5 LD STAKPT-1 001 A 35 XPAH 1 001 B C501 LD @1 (1) ; load routine-address from 001 D C8DE ST ROUTAD-1 ; stack into 'routad' 001 F C501 LD @1 (1) 0021 C8DB ST ROUTAD 0023 C501 LD @1 (1) ; load ptr 3 from stack 0025 37 XPAH 3 0026 C501 LD @1 (1) 0028 33 XPAL 3 0029 C501 LD @1 (1) 002B 36 XPAH 2 002C C501 LD @1 (1) 002E 32 XPAL 2 002F C501 LD @1 (1) 0031 C8C4 ST PTR-1 ; into scratch-pad 0033 C501 LD @1 (1) 0035 C8C1 ST PTR 0037 C501 LD @1 (1) ; load s-register from stack 0039 07 CAS 003 A C501 LD @1 (1) ; load e-register from stack 003C 01 XAE 0030 C501 LD @1 (1) 003F C8B8 STAC 0041 C0B4 LD PTR-1 ; store current contents of stack 0043 35 XPAH 1 0044 C8B9 ST STAKPT-1 0046 C0B0 LD PTR 0048 31 XPAL 1 0049 C8B5 ST STAKPT 004 B B8AD DLD STKEFF ; update stack counter 004 D C0AA LD AC ; load ac from scratch-pad 004 F 3F XPPC3 ; return 0050 9004 JMP PUSH $1: 0052 904 D JMP START $2: 0054 90BF JMP PULL ; ditto PUSH: ; push status onto stack 0056 C8A1 STAC ; store (ac) in scratch-pad 0058 C0A6 LD STAKPT 005A 33 XPAL 3 ; store (ptr 3) in scratch-pad and 0058 C89B ST PTR ; load ptr 3 as stack pointer 005D C0A0 LD STAKPT-1 005F 37 XPAH 3 0060 C895 ST PTR-1 0062 C4FF LDI L (STAKPT) ; push (ptr 1 ) onto stack and 0064 31 XPAL 1 ; load ptr 1 as ram pointer 0065 CFFC ST @-4 (3) using elbug elektor february 1979 — 2-35 Table 2, continued. 0067 C40F LDI h (STAKPT) 0069 35 XPAH 1 006A CFFF ST@-1 (3) 006C 01 XAE ; push (e) onto stack 006 D CB03 ST 3 (3) 006 F 06 CSA ; push (sr) onto stack 0070 CB02 ST 2 (3) 0072 C1F9 LD-7 (1) ; (ac) from scratch-pad onto stack 0074 CB04 ST 4 (3) 0076 32 XPAL2 ; push (ptr 2) onto stack 0077 CFFF ST @-1 (3) 0079 36 XPAH 2 007 A CFFF ST @>-1 (3) 007C C1F8 LD-8 (1) ; (ptr 3) from scratch-pad onto 007E CFFF ST @-1 (31 ; stack 0080 C1F7 LD-9 (1) 0082 CFFF ST @-1 (3) 0084 Cl FE LD-2 (1) ; routine-address from 'routad’ 0086 CFFF ST @-1 (3) ; onto stack 0088 Cl FD LD-3 (1 ) 008 A CFFF ST @-1 (3) ; load ptr 3 with routine address and 008C 37 XPAH 3 ; store current contents of stack ptr 008 D C9FF ST-1 (1) ; (from ptr 3) in 'stakpt' 008 F Cl FE LD-2 (1) 0091 33 XPAL3 0092 C900 ST0 (1) 0094 A9FA ILD-6 (1) ; update stack counter and 0096 El FB XOR-5 (1) ; compare with preset stack depth 0098 9C04 JNZ $3 009A C4FF LDI X'FF ; set 'stack-full' flag 009C C9FC ST-4 (1) $3: 009E 3F XPPC 3 ; jump to subroutine 009 F 90B3 JMP $2 1 , , LDBYTE routine 01D9 19 01 DA 40 01 DB 9402 01 DD 90F7 0203 BA09 0205 9CFC 8207 40 0208 3F 0209 90C6 .LOCAL .PAGE LDBYTE: LD X'15 (2) LDE JP $ 2 JMP $ 1 $2: LDI X'FF XAE LD X'14 (2) ST 10 (2) $3: DLD 10 12) JNZ $ 3 LDI 08 ST 8 (2) $4: LD X'15 (2) ST 9 (2) LDI 22 DLY00 DLD 8 12) JNZ $4 LD X'15 (2) ST 9 (2) $ 6 : DLD 9 (2) JNZ $6 LDE XPPC3 JMP LDBYTE ; 1/2 bit delay ; load bit-counter ; copy speed ; delay 1 14 m« (sc/mp 1) ; decrement speed ; 8 bits accepted decrement speed (1 x 66 ms) (sc/mp 1 ) load byte in ac return jump for next pass ; routine: fetch one byte from cassette preset maximum stack depth (STDEEP), this condition is flagged by loading X’FF into 0FFB (-STFULL). The STFULL flag can be tested by the user’s program, and if desired set, so that subsequent jumps to subroutine are prevented. The stack routines in Elbug which are responsible for storing the contents of the CPU registers before a subroutine is executed and retrieving same after the subroutine is finished are designated the PUSH and PULL routines respectively. A complete listing for both routines is provided in table 2, whilst figure 2 illustrates the timing sequence of the routines. The end of the PUSH routine contains the instructions required to effect the jump to subroutine, thus it is important that the start address of the subroutine question is first stored on the stack for reference. The 16-bit start address (-1) is loaded into locations 0FFD and 0FFC (ROUTAD). With the aid of Elbug’s stack and the PUSH and PULL routines a jump to subroutine can be implemented as follows: - the start address (-1) of the subrou- tine is loaded into the appropriate locations (ROUTAD). (if the user’s program has not yet caused the contents of PTR 2 to be altered, the ROUTAD bytes can be , loaded via it. Upon pressing the RUN key and leaving Elbug, PTR 2 is automatically loaded with the address of the stack base (QFEC). The displacement values X’lC and X’lD wifi reference the higher and lower ROUTAD locations respectively. If PTR 2 has already been used, then effective addresses can be obtained via PTR 3, since the latter will contain the start address (-1) of PUSH. The relative addresses (dis- placements) are then X’A8 and X’A7 respectively. - PTR 3 should be loaded with the start address (—1) of the PUSH routine (0055) - If the above steps have been taken, the actual subroutine jump can be effected by an XPPC-3 instruction. The program will now jump to PUSH, causing the current contents of the SC/MP’s registers to be stored on the stack, whereupon the subroutine will be executed. This subroutine may use any register, the user need have no fears for their original contents. However it is worth noting that it is impossible to transfer data from the main program to a subroutine via one of the CPU registers (and vice versa). The above procedure will enable a subroutine to be called and implemented under any circumstances. However there are situations where the process is even simpler. - If the same subroutine is called by the main programme more than once without a second subroutine being called in between, then one need not load the ROUTAD addresses anew 2-36 — elektor february 1979 using elbug 1 Table 4. BYTOUT .LOCAL BYTOUT: ST 7 (2) 05DA C40B LDI 11 05DC CA08 ST 8 (2) C400 LOI 00 05E0 01 XAE 05E1 19 SIO XAE 05E3 BA20 DLD X'20 (2) 05E5 C207 LD 7 (2) 05E7 01 XAE ; byte to e $ 1: 05E8 C40B LDI 11 05EA 8F00 delay 70 ms (sc/mp 1) 05EC C215 LD X'15 (2) copy 'speed' 05EE CA09 ST 9 (2) $2: 05F0 BA09 DLD 9 (2) 05 F 2 9CFC JNZ $ 2 05F4 19 SIO shift bit out 05F5 40 LDE 05F6 DC80 ORI X'80 add stop bit to byte 05F8 01 XAE 05F9 BA08 DLD 8 (2) 05 FB 9CEB JNZ $ 1 05 FD 3F XPPC 3 05FE 9008 JMP BYTOUT jump for next pass Table 5. LDKB outine •PAGE 'load keyboard' routine • LOCAL LDKB: 020B C414 LDI LIPULU-1 ; prepare ptr 3 020D 33 XPAL3 020E C400 LDI H(PULL) 0210 37 XPAH 3 LDKB1: ; label for start address without stack 0211 C401 LDI L1DISPLI+1 0213 31 XPAL 1 0214 C407 LDI H(DISPL) ; prepare ptr 1 and ptr 2 0216 35 XPAH 1 0217 C4E0 LDI L(STKBSE) 0219 32 XPAL 2 021 A C40F LDI H(STKBSE) 021C 36 XPAH 2 $1: 021D Cl 08 LD 811) 021 F 94FC JP$1 ; wait for key closure 0221 8F1E DLY 30 ; debounce time - approx. 30 ms 0223 Cl 08 LD 8 (1) 0225 CA08 ST 8 (2) ; store keyboard code in ram 0227 040 F ANI 0F 0229 CA09 ST 9 (2) ; store binary value of key in ram and 022B 01 XAE $2: 022C Cl 08 LD 8 (1 1 022E 9402 JP $3 ; wait for key release 0230 90FA JMP $2 $3: 0232 8F1E DLY 30 0234 C41F LDI L (TAB) 0236 31 XPAL 1 0237 C401 LDI H (TAB) 0239 35 XPAH 1 023A Cl 80 LD - 128(1) ; fetch 7-segment code 023C CA07 ST 7 (2) 023E 3F XPPC 3 each time, since once loaded they remain unaltered. If a second subrou- tine is called whose address is within y* K of the first, then only the lower order address byte need be loaded (ROUTAD low) - If the contents of PTR 3 are not altered by the main program between jumps to one or more subroutine, then the jump to the PUSH routine can be realised via an XPPC 3 instruc- tion. — If both of the above conditions apply - which is not infrequently the case - a single XPPC instruction will save the status of the CPU registers and effect a jump to the subroutine! To return from a subroutine to main program (or the previous subroutine), the address of the PULL routine (start address 0013) is loaded into PTR 3 at the end of the routine in question. If the subroutine does not alter the contents of PTR 3 (again, this will often be the case), the latter will contain the last instruction of the PUSH routine. Since this is in fact a jump to the start address of the PULL routine (see table 2), a single XPPC 3 instruction at the end of the subroutine will cause a return to the main program. A similar instruction is present at the end of the PULL routine, namely JMP PUSH. This means once PTR 3 has been loaded with the start address (-1) of PUSH, and assuming its contents are not affected by the subroutine, then jumps to and from the subroutine can always be implemented using just an XPPC 3 instruction. The subroutine procedure described above remains valid for external subroutine calls, i.e. interrupt requests. It goes without saying, how- ever, that the interrupt line is not enabled until the ROUTAD bytes and PTR 3 have been loaded. Only then will the XPPC 3 instruction generated by the interrupt cause a jump to subroutine to be implemented. If several interrupt inputs are used, the software required to recognise the priority of simultaneous interrupt re- quests must be included in the sub- routine. This software was discussed in an earlier article in the SC/MP series (see Elektor 33, January 1977). Series/parallel and parallel/ series conversion routines Via the extension register and the SIO (Serial Input/Output) instruction the SC/MP offers the user the possibility of serial/parallel and parallel/serial conver- sion without the need for additional hardware. The appropriate routines are already contained in Elbug, since they are required when transferring data to and from the cassette interface. The ‘load byte’ routine (LDBYTE, see table 3) will load a serial data byte, including start and stop bits, via the serial input (SIN) into the extension register. As was explained in part 5 of the series on the SC/MP system (see Elektor 35, March 1978), the rate at using elbug elektor february 1979 - 2-37 Table 6. GETHEX routine 023F C406 •PAGE •LOCAL GETHEX: LDI L (DISPL1+6 ; load ptr 1 with address 0241 31 XPAL 1 ; of display 6 0242 C407 LDI H (DISPL) 0244 35 XPAH 1 0245 C4E7 LDI L ISTKBSE1+7 : load ptr 2 with 0247 32 XPAL 2 ; stack base + 7 0248 C40F LDI H (STKBSE) 024A 36 XPAH 2 024 B C404 LDI 04 ; load key-counter 024 D CAF9 ST -7 (2) 024 F C455 $1: LDI L (PUSH)— 1 0251 33 XPAL 3 0252 C400 LDI H (PUSH) 0254 37 XPAH 3 0255 C40A LDI L (LDKB)— 1 0257 CBA8 ST - 88 (3) 0259 C402 LDI H (LDKB) 025 D 3F XPPC 3 ; call 'Idkb' (via stack) LDI L (STKBSE) ; ptr 3 becomes ram pointer 0260 33 XPAL 3 0261 C40F LDI H (STKBSE) XPAH 3 LD 7 (3) ; fetch 7-segment code 0266 CDFF ST @-1 (1) ; write to display 5 (4, 3, 2) LDI 00 026A C9FF ST - 1 (1) ; blank all other displays 026C C9FE ST-2 (1) 026E C9FD ST- 3(1) 0270 C9FC ST -4(1) 0272 C9FB ST-5 (1) 0274 C309 LD 9 (3) ; binary value of key to ram table 0276 CEFF ST@-1 (2) 0278 BB00 OLD 0 (3) 027 A 9CD3 JNZ $ 1 ; 4 keys? 027C C480 LDI X'80 027 E C9FF ST - 1 (1) ; ' • ' to displays 0,1 0280 C9FE ST-2 (1) 0282 C306 LD 6 (3) ; form higher byte 0284 IE RR 0285 IE RR 0286 IE RR 0287 IE RR 0288 01 XAE 0289 C305 LD 5 (3) 028 B 58 ORE 028C CB02 ST 2 (3) 028E C304 LD 4 (3) ; form lower byte 0290 IE RR 0291 IE RR 0292 IE RR 0293 IE RR 0294 01 XAE 0295 C303 LD 3 (3) 0297 58 ORE 029A C400 JSPULL: JS 3 (PULL) ; assist-label for return via 'pull' ; to main program 029C 0290 029F 02A0 37 C414 33 3F which the data is transferred can be | varied. This is done by altering the ! contents of the SPEED-address (OFF 5). Once LDBYTE has been executed the serial data word is available in parallel form in both the AC and extension register. During this routine a stop bit is present - continuously at the serial output (SOUT). The ‘byte out’ routine (BYTOUT, see table 4) enables a byte to be transmitted in serial form - along with start and stop bits - from the serial output. Once again the transmission rate can be varied with the aid of the SPEED byte. In the case of both the LDBYTE and BYTOUT routines the data is coded in ASCII format, i.e. one start bit, eight data bits and one stop bit. Data presented at the serial input during execution of the BYTOUT routine is ignored, which means that using these routines the SC/MP may only be operated in the half -duplex mode. The routines can be employed in a variety of applications such as, e.g. to interface to a TTY or telex. The rou- tines are initiated not by the Elbug stack routines, but in the manner illustrated in the case of the delay routine described earlier. The user thus has the possibility of inputting and outputting information via the CPU registers. In the case of the BYTOUT routine it is in fact necessary that the byte to be transmitted be loaded into the AC under main program control. In addition to PTR 3, which is used in jumping to both routines, PTR 2 is also required. Before the jump to either routine this pointer is loaded with 0FE0, since it is via this pointer that the SPEED byte is referenced. Both rou- tines leave PTR 1 unaltered. The keyboard routine This routine, the listing for which is given in table 5, is designed to scan the keyboard. An interesting feature of the routine is that it has two start addresses: LDKB = 020B the start address when called by the stack routines LDKB1 = 0211 the start address when called by other than the stack routines. In the latter case PTR 3 is loaded with the address (-1) LDKB1, and the routine started by an XPPC 3 instruc- tion. PTR 3 must be loaded with the appropriate address prior to each jump, since there is no JMP LDKB1 instruc- tion. In both cases the jump back to the main routine is only implemented after the key has been released. When called by other than via the stack, at the end of the keyboard routine the binary equivalent of the hex data key which has been pressed is available in the extension register, whilst the corre- sponding 7-segment code is present in the AC. The code generated by the keyboard hardware is written into address 0FE8. If the routine is called via the stack, then it is not possible to transfer infor- mation out of the keyboard routine, via the SC/MP registers, into the main program. The above information is only available at the RAM locations reserved for this purpose, namely 0FE7 to 0FE9 (see figure 1). If desired, the table of 7-segment code can be used separately. For organisational reasons it is not included in LDKB, but is stored in memory from location 01 IF. The GETHEX routine This routine itself calls the above- described LDKB routine four times in order to store the four hexadecimal numbers successively generated by the keyboard. These four hex digits are joined together to form two bytes, which are stored at addresses 0FE1 (lower byte) and 0FE2 (higher byte). \ The start address of the GETHEX routine is 023F (see table 6) and the routine is initiated via the stack routines. In order to jump to the routine from \ the main program the start address (-1) | is loaded into location ROUTAD, and 2-38 — elektor february 1979 Figure 2. This diagram shows the sequence in which the PUSH and PULL routines of Elbug store and retrieve status information when subroutines are called. Table 7. PUTHEX routine 02A1 C4E0 •PAGE • LOCAL PUTHEX: LDI L (STKBSE) pch.*™™ 02A3 33 XPAL3 load ptr 3 as ram pointer 02A4 C40F LDI H (STKBSE) 02A6 37 XPAH 3 02A7 C4E0 LDI L (STKBSE) 02A9 32 XPAL2 prepare ptr 2 and ptr 1 for 02AA C40F LDI H (STKBSE) auto-indexed addressing 02AC 36 XPAH 2 02AD C4E3 LDI L (STKBSE1+3 02AF 31 XPAL 1 02B0 C40F LDI H (STKBSE) 02B2 35 XPAH 1 02B3 C403 LDI 03 load byte-counter 02B5 CB0F ST 0F (3) 02B7 C200 LD 0 (2) fetch first (next) byte 02B9 D40F ANI OF bits 0 - 3 to 02BB CD01 ST @>-1 (1) ram 02BD C601 LD @-1 (2) fetch same byte again. 02BF 1C SR and bits 4-7 02C0 1C SR 02C1 1C SR 02C2 1C SR 02C3 CD01 ST @-1 (1) to next ram address 02C5 BB0F DLD0F (3) 02C7 9CEE JNZ $ 1 3rd byte stored? 02C9 C41F LDI L (TAB)— 1 02CB 31 XPAL 1 prepare ptr 1 for indirect addressing 02CC C401 LDI H (TAB) 02CE 35 XPAH 1 02CF C406 LDI 06 load hex-character-counter 02D1 CB0F ST 0F (3) 02D3 C601 $2: LD @-1 (2) fetch first (next) half-byte 0205 01 XAE 02D6 C180 LD - 128(1) fetch 7-segment code 02D8 CA05 ST 5 (2) load in ram 02DA BB0F DLD0F (3) 02DC 9CF5 JNZ $2 6 digits ready? 02DE C400 LDI L (DISPL) 02E0 31 XPAL 1 load ptr 1 with address of displays 02E1 C407 LDI H (DISPL) 02E3 35 XPAH 1 02E4 C406 LDI 06 load counter 02E6 CB0F ST 0F (3) 02E8 C601 $3: LD @-1 (2) 7-segment code to 02EA CD01 ST @-1 (1) display 5 02EC BB0F DLD OF (3) 02EE 9CF8 JNZ $3 ready? 02F0 90A8 JMP JSPULL via assist-label to 'pull' PTR 3 is loaded with the start address (-1) of the PUSH routine, whereupon an XPPC 3 can be executed. When the routine is finished, the two above-mentioned bytes can be read out of their locations in memory (0FE1 and 0FE2) to be used later in the program. Care should be taken to ensure that the data is retrieved before the GETHEX routine is called again, otherwise two new bytes will be written into these locations and the previous data will be lost. PUTHEX routine The last routine to be examined is also the simplest. The PUTHEX routine does nothing more than convert the contents of memory locations 0FEO to 0FE2 into the equivalent 7-segment code, and then display the results as a six-digit hexadecimal number. The code for the four lowest-order bits of address 0FE0 appears on display 2 (third from the right), the code for the next four bits on display 3, and so on. The start address of PUTHEX is 02A1 (see table 7), and the routine may only be called via the PUSH routine in the fashion described above. That concludes the discussion of Elbug routines which can be called by a user’s program. As one might have imagined, the entire monitor program has not been analysed, since the remaining routines cannot be used outside of Elbug. It is hoped that the above article will not only reveal how the routines which have been discussed can be profitably incorporated into one’s own programs, but also that studying these routines will lead the aspiring program- mer to an understanding of the various techniques involved, and enable him to tackle longer and more sophisticated programming tasks. M link/formant elektor february 1979 - 2-39 missing link in audio systems correct level-matching between preamps and power amps A well-known hobby-horse among theor- eticans is optimum impedance matching between the various units in a hi-fi installation. In practice, however, this is rarely a problem. Optimum level matching is often more important, but apparently it is less interesting in theory . . . A case in point is the Consonant pre- amplifier, described in last year’s Summer Circuits issue. Several readers have commented on the relatively high noise level. However, lab tests have shown that even particularly ‘noisy’ Consonants almost invariably met their specifications: ‘output noise level, ap- proximately 0.1 mV RMS’ and ‘dynamic range > 90 dB’. So what’s wrong? Several readers are using the Consonant in combination with the Elektomado, and the latter is fully driven with ap- proximately 900 mV RMS. The Conson- ant can deliver up to 3.5 V RMS — four times the required level, or 12 dB ‘overdrive’. Effectively, since the output noise level of the Consonant is almost constant (independent of output level or setting of the volume control), the S/N ratio is then 1 2 dB worse than it could be! This type of level mismatching is usually apparent from the ‘normal’ setting of the volume control. If, in normal use, the volume control is never set above the half-way mark, some 20 dB in S/N ratio are being wasted! In the Consonant circuit, this test is complicated slightly by the input level presets (PI and P2). These should be set to the highest level consistent with good level matching between the three inputs. In other words, the lowest input signal level is taken as a reference (usually the disc input) and the other two inputs are turned down, by means of the corre- sponding presets, to attain the same level. Turning the presets down any further leads to poorer S/N perform- In this type of situation, one obvious solution is to include an attenuator between the output of the preamp and the power amplifier. A 10 dB attenuator is shown in the accompanying circuit; reducing R2 to 820 12 gives 20 dB attenuation. A similar solution is often useful when matching sensitive head- phones to a headphone output, although in that case lower resistance values should be used (e.g. 680 £2 and 330 £2). An alternative solution is to reduce the gain of the power amplifier. For the Elektomado, this can be achieved by increasing the value of R1 (and Rl’) to 18 k; in that case, however, C4, C4’, C7 and Cl' should also be increased to 18 p. formant an invitation to our readers A demonstration model of the Formant housed in a transparent modular frame (Zeissler system). Almost a year ago in the April 78 issue of Elektor, the tenth and final instalment in the series on the Formant music synthesiser was published. Since then there have been two additional articles - one for a 24 dB VCF, the other describing a resonance filter module (see Elektor no.s 41 and 42) - which rounded off the design of the basic system. In the interim period many readers have gone ahead and completed construction of the Formant; thus it now seems a good time to take stock of the project and to examine the possibilities of future contributions on this theme. As far as the reaction of readers to the Formant series is concerned, there is no doubt that this has been extremely favourable, and that the basic design concept of a modular system has proven amply justified. Despite their complexity and scale, a virtually 100% reproduc- ibility in the performance of the cir- cuits has been achieved in practice — which says a lot for the quality of the original designs. The question is, where do we go from here? Judging from the large number of letters we receive on the subject, there is considerable interest in further extensions to the Formant and in syn- thesiser circuits in general. Indeed many readers have taken the initiative in this respect and developed their own circuits for use with the Formant. In view of this fact, we would like to take this opportunity of inviting Formant-fans to share their experience/expertise with other enthusiasts. Any reader who has designed an interesting add-on circuit or module, who has made a useful modification to the system or thought of a novel application for the Formant, is invited to submit his idea(s) for possible publication. If a sufficient number of suitable contributions were received, they could be collected together and published as a special issue or in book-form. Such a collection of new circuits, tips etc. would not only prove of great interest to all Formant users, but might also help to further the progress of non-commercial syn- thesiser technology. It goes without saying that a suitable fee will be paid for all contributions which are pub- lished. N 2-40 - elektor february 1979 market HriMH* ' ~ High intensity indicator tubes Impectron Limited have intro- duced a broad range of miniature incandescent indicator tubes for use in high ambient light con- ditions. The APOLLO range consists of 41 mm (1.6 in) dia- meter glass tubes containing a seven segment filament assembly on a matt black ceramic back- ground. The devices can indicate numerals 1 to 10, plus and minus signs, some fractions as well as letters A, C, E, F, H, J, L, P and U. The filament construction creates an extremely wide viewing angle of about 140° and excellent readability. Brightness is fully adjustable from zero to a maximum of 6,000 FL - easily read in direct sunlight. The devices have many applications in electronic instruments, displays, clocks, petrol pumps, etc - equipment normally used out of Each tube has nine base-entry connector pins and an un- usually rugged internal construc- tion. Tested life expectancy is over 100,000 hours, and because they have low voltage (3 to 5 'h V) and current (23 mA/segment) requirements they can be driven directly from standard IC decoder/driver chips. Either AC or DC operation is possible. The Apollo range consists of the DA-0135, DA- 1300, DA-2000 and DA-2300 Series, which are all pin compatible replacements for existing RCA types. The Apollo range offers a wide choice of display, connection and mounting styles. The DA-2300 for example, is suitable for plug-in connection to a standard TO-5 style 10-pin commercial socket. Colour variations can also be met, since filament colour is white and any desired colour can be obtained by the use of filters. Impectron claim that these indicators have higher brightness, longer life expectancy and lower cost than almost any other display component of this size. They can be used in low ambient temperatures down to -50°C and so lend themselves to equipment used in harsh meteorological conditions. Impectron Limited, Impectron House, 23-31 King Street, London W3 9LH. England (1036 M) Telephone uses GIM pP A new microcomputer controlled telephone exhibited at a recent Consumer Show, offers a wide range of functions to the user. The instrument, which uses a single chip microcomputer produced by General Instrument Microelectronics, features a 12-digit display with alphanu- meric capability, and a clock with elapsed time indicator. It has an impressive multiple-function capability, including 16-number repertory dialling, single button recall, single button redial of last number and pushbutton pulse dialling. The telephone uses the newly announced TZ 2000 micro- computer family from General Instrument Microelectronics, which GIM is now marketing to the international telephone industry. Each member of the TZ 2000 family is tailored to a particular set of 'phone applications, because each is based on an 8-bit machine programmed for whichever set of capabilities the telephone manufacturer has decided is important to his market; Consumer or Business. The range of functions which the TZ 2000 can handle is large and many GIM customers have been very imaginative in developing novel telephone-related concepts. The company is programming the devices for some customers, while others prefer to do it themselves, using GIM’s inexpensive Development System. Jim Smilie, GIM's European Product Manager Telecommuni- cations, comments: An •intelligent' telephone is a highly marketable instrument in view of the increasing complexity of modern PABX exchanges. The interactive capability of such phones can guide the user through a complex sequence of operations quite easily. We see increasing market interest in view of these prospects.’ The TZ 2000 family is now ready for volume production; GIM is sampling products and is involved in preliminary application programs with several major telephone manufacturers. As one of the world’s major LSI suppliers to telephone manufacturers, it has shipped to date more than two million pushbutton pulse converters as well as diallers, Codecs, and coinbox circuits. General Instrument Microelectronics Ltd., Regency House, 1-4 Warwick Street, London WIR SWB, England (1027 M) High-speed s-o-s memory The MWSS101 Series 256-word x 4 bit static random-access memories are now available from RCA Solid State with a choice of four different options on speed and leakage current. Using RCA's silicon-on-sapphire C-MOS integrated-circuit technology, which combines high-speed operation with the low-power, high-noise-immunity advantages of C-MOS circuitry, the memories offer access times of 250 - 450 ns and quiescent currents from only 10 mA to 500 mA. All the devices are fully characterised for an input voltage of 5 V over the temperature range 0°C to +70° C. Designed for use in memory and microprocessor systems where high speed, very low operating current (4 mA at 5 V) and simplicity of use are desirable, the MWS5101 has separate data inputs and outputs and operates from a single power supply of 4.75 - 5.25 V. Two chip-select inputs are provided to simplify system expansion, while an output-disable control provides wired-OR capability for common input/output systems. An important feature of the MWS5101 is the low-voltage data- retention capability of 2 V. The memory is compatible with TTL circuitry, and for TTL interfacing at 5 V operation excellent system noise margin is preserved by using an external pull-up resistor at each input. ' For applications requiring wider temperature and operating-voltage ranges, an equivalent 10 V component, the CDP1822, is available, which is characterised over the range -40° C to +85° C. The MWS5 101 types are supplied in 22-lead hermetic dual-inline side-brazed ceramic packages or 22-lead dual-inline plastic packages. RCA Solid State-Europe, Sunbury-on- Thames, Middlesex, TWI6 7 HW England (1031 Ml New security aid A pocket sized radio transmitter with an effective operating range of up to a quarter of a mile is the heart of a new security aid system that has been launched by Emergency Warning Systems Ltd. It measures just 4" by 2 Vi“ by 1 " - the size of a cigarette packet - and weighs less than 4 l A oz. When activated by the touch of a button the unit transmits a coded VHF radio signal to a receiver and relay mechanism, which then operates any equipment connec- ted to it on a fail safe basis. There are many possible appli- cations of this system, ranging from industrial and commercial to domestic uses. For instance in any factory where men are working singly in hazardous environments with a chance of being overcome by fumes, the system can be used to raise an alarm to call help immediately should the worker feel in any sort of danger. Wider applications are constantly becoming apparent. A particular need for communication is seen in the case of old people living alone who are likely to be incapacitated. Linking the equipment with a relay that operates a telephone auto-dialling unit means that help can be summoned without having to move. In private homes at risk there are a number of very effec- tive precautions that can be taken by using any combination of devices with the emergency alerting system. Use is not limited purely to the field of security and safety. Using the pocket transmitter any number of operations can be automatically carried out at a distance, ranging from the remote control of production machinery to opening garage doors from a These systems are available from Emergency Warning Systems Ltd., on a rental basis and included in their agreement is a comprehen- sive guarantee of free mainten- ance and service available from a network of centres throughout the country. Emergency Warning Systems Ltd. 44-50 Osnaburgh Street, London, NW1 , England elektor february 1979 — 2-41 LilMiA'. Wire-wrapping kit Wire wrapping for the amateur has been expensive, but OK Machine and Tool Ltd. are a company who produce equipment specifically for this market and their latest kit HW-K1 brings power wire-wrapping within economical reach of the home electronics enthusiast. The main item in the kit is a newly designed battery-operated wire-wrapping gun, based on the design of the company’s industrial units. It is for use with 0.6 mm x 0.6 mm mini-wrap terminals and has a bit and sleeve to give modi- fied wrap. The tool is also self indexing and has a back force device to prevent overwrapping. It is powered by two NiCad batteries, and a mains-operated charger is included. Also in the kit is a hand tool which can strip, wrap and unwrap wire, together with a handy ■pocket-sized’ wire dispenser, containing 50 ft of 0.25 mm wire, which has a cut and strip attach- ment to give the correct length of stripped wire for successful wire wrapping. All parts are available separately but buying the complete kit gives the customer a price advantage. OK Machine & Tool (UK) Ltd., 48a The Avenue, Southampton, Hants SOI 2SY, England (1044 M) New microprocessor A to D interface National Semiconductor have introduced two microprocessor- oriented analogue-to-digital convertor devices. Type desig- nations are, for a 3 Vi digit version ADC 3511, and a 3% digit version ADC 3711. The new devices are complementary MOS (CMOS) circuits that provide addressed binary coded decimal output allowing easy interface to micro- processor systems. The 3% digit capacity of the ADC 3711 makes it suitable for applications requiring its extended 3999 count full scale range, such as weight scales, angle indicators, line voltage monitors, azimuth encoders and temperature sensors. The more traditional 3V4 digit, 1999 count full-scale ADC 3511 is useful for applications requiring resolution up to 1 part in 2000. The converted value of the input sign is available one BCD digit at a time. The value of the digit selected by the 2 latchable digit select inputs is presented on demand at the device outputs. This ‘addressed’ BCD method of data transfer not only simplifies system interface, but allows these convertors to be housed in 24-pin DIP packages. Both convertors use pulse modu- lation conversion, an integrating conversion technique requiring no external precision components that allows a reference voltage of the same polarity as the input voltage to be employed. Operating from a single isolated 5-volt supply, they are designed to convert input voltages from -2.00 to +2.00 volts. The sign of the input voltage is automatically determined and indicated on the sign output pin, and overflow is indicated by a hex EEEE output reading as well as by an overflow output pin. Unipolar input volt- ages do not require the use of isolated supplies. The ADC 3511 and 3711 have their conversion rates set by an internal oscillator whose frequency may be determined by an external RC network, or can be driven from an external frequency source. The timing of conversions may be controlled and monitored via the ‘Start Conversion’ input and ‘Conversion Complete’ output which have been included on both devices. National Semiconductor Ltd, 301 Harpur Centre. Horne Lane, Bedford MK40 1TR, England (1046 M) Calculator with 'elephant' memory A new powerful slimline scien- tific calculator with a constant memory feature has been intro- duced by Texas Instruments. Designated the TI-50 it can retain data in its two full arithmetic memories even when it is switched off. This constant memory feature is intended for retention of continuously used constants, values or statistics for repetitive calculations. The Tl-50 also offers 60 algebraic functions, including logarithms and trigon- ometry, plus statistical operations. The calculator has a large 8-digit liquid-crystal display, and incor- porates full scientific notation (with a 5-digit mantissa and 2-digit exponent display format) and mantissa expansion capa- bility. The algebraic entering system includes 15 levels of parentheses and up to four pending oper- ations, allowing the user to enter problems from left to right as they are usually written. The automatic power down feature shuts the calculator off after about 15 minutes of non-use. The low power consumption liquid- crystal display and internal circuitry help to provide up to two years of normal operation on a single set of batteries. A battery low indicator is also provided. Texas Instruments Ltd, Manton lane, Bedford, England (1050 M) 'Floating' programmable opamp A programmable power oper- ational amplifier with an elec- tronic shut down capability that allows it to ‘float’ in the ‘off’ mode, passing only microamperes of current, has been developed by National Semiconductor. Designated the LM 13080, the device is internally compensated and can be programmed to allow the user to optimise the amplifier performance for his individual application. The LM 1 3080 has been designed primarily for those applications that require load currents from the output of 50 to 250 mA, either sink or source. Intended applications include HiZ in audio amplifiers, power comparators, DC -DC convertors and servo drivers for motor speed control. The user establishes the bias for the amplifier’s input stage by means of an external resistor and as a result can control a number of the device’s performance characteristics, including: input bias current, input offset voltage, and frequency response. Unlike other devices on the market, the LM 13080 has an electronic shutdown capability without the need to carry load currents in the control device. This facility results in a quiescent current of a few microamps making the device very useful in battery powered systems. The LM 1 3080 is designed to operate from both dual and single power supplies, and will operate from as little as 3 volts. National Semiconductor Ltd, 301 Harpur Centre, Horne Lane, Bedford MK40 1TR, England (1045 Ml New range of instrument cases The new Pactec ‘C’ series instru- ment cases from OK Machine and Tool Ltd. are high quality units available in over 25 sizes. There are numerous variations to accomodate many forms of con- struction projects. The range is versatile and has been designed to provide a purpose- built package for electronic instru- ments. The cases are built up from simple components - top, bottom, sides and ends - rather than being a one piece moulding. Moulded from tough, durable ABS, 3 mm thick, they are avail- able in tan or black requiring no additional external furnishing. Standard width is 212 mm and depth is 232 mm with height ranging from 62 mm to 88 mm in 6 mm increments. Additionally, a miniature series is offered starting at 37 mm high x 1 30 mm wide x 1 44 mm deep. Internally, the cases have vertical circuit board guides in 1 1 places and horizontal bosses on the top and bottom covers. Options include rail and card slide adaptors, standard and special front and rear panels and RFI/EMI shielding. Handles and tilt stands also are available. OK Machine <& Tool (UK) Ltd., 48a The Avenue, Southampton, Hants SOI 2SY, England (1048 M) liLLiJiLA'. Elastomeric circuit boards Charcroft Electronics Ltd., exclusive agent for Orcus Inter- national in Europe, announce the availability of a new series of Solderless Circuit Boards using conductive elastomeric contacts. The new ‘wonderboard’ circuit boards allow the user to insert one component lead and up to 6 interconnection wires into each conductive contact. The boards are essentially the same dimen- sions as a printed circuit board. These boards can be used for prototypes or for production and can replace plated hole printed circuit boards, multilayers, wirewrap as well as breadboards. Reliability is assured by the seal formed between component leads and the conductive material when components are inserted. Any desired board format can be made up by using cyanoacrylate adhesive to join smaller boards together. Two standard models arc presently available. ‘Small Wonder’ has a capacity of 12 ICs (D1L-14) and ‘Big Wonder’ has a capacity of 48 ICs. Wonderboards accept all sizes of 1C packages up to 60 pins as well as discrete components and are reusable. Charcroft Electronics Limited Charcroft House, Sturmer, Haverhill. Suffolk. CB 9 7XR. England (1051 M) Adjustable 3 amp regulators National Semiconductor has announced a series of adjustable monolithic IC regulators, capable of providing over 3 amps output current anywhere from 1.2 volts output to 32 volts. Designated LM 150, LM 250, and LM 350 only two external resistors are needed with these regulators to set the output voltage. Housed in a steel 3 lead TO-3 transistor package they are easy to use with standard transistor heat sinks. It is claimed that the line regu- lation of this series is typically 0.005% (volts) while load regu- lation is 0.1% for a 3 amp output change. For the LM 150, thermal regulation is guaranteed to 0.01% (Watt), and typically it is only 0.002% (Watt). This com- pares favourably to some older type regulators which have thermal regulation of 0. 1% (Watt). The combination of improved protection circuitry plus thermal limit test should make the series reliable. They will find wide application where the 1 amp output of older regulators is insufficient or where discrete designs are now used. Since the output voltage is adjust- able, only one regulator need be stocked for many applications. The LM 150 is rated for use over a -55°C to 125°C temperature range, the LM 250 from -25°C to 1 50° C and the LM 350 from 0°C to 125°C. National Semiconductor Ltd. 301 Harpur Centre, Horne Lane, Bedford MK40 1 TR, England (1052 M) Multipurpose process timer New from Swift Hardman is an all-British multipurpose process timer, the EP Model 338, designed for universal mounting to international standards. Housed in a 72 x 72mm DIN standard configuration, the Model 338 is equally suited to panel mounting, surface mounting or DIN-rail mounting with either screw terminals or push-on tags. To facilitate the use of the timer in equipment destined for over- seas markets, the timer can be used on 240V or 11 0V, 50 or 60Hz, supplies without modifi- cation. Two multirange models cover the entire timing of the range from 1 sec to lOOh. The Model 338 timer uses the latest solid-state electronic circuitry, combining a variable- frequency oscillator (varied by the time-setting dial control) with an integrated-circuit program- mable pulse counter controlled by the range-changing switch. Setting accuracy is 2% of range, and repeat accuracy is ± 20 ms on the 1-10 sec range and ± 0.2% of range on other ranges. Reset time is 100 ms maximum. In this standard delay-time mode, the Model 338 has a double-pole changeover relay which is ener- gised all the time that the mains supply is present. The relay ener- gises only at time-out and remains in this state until the timer is reset by removing the mains supply. The timer may also be modified to operate in an ‘interval’ mode, in which the relay energises when the mains supply is switched on and de-energises at time-out. Two indicator lamps in the dial of the Model 338 indicate ‘mains-on’ and on/off operation of the load circuit. The Model 338 is of rugged construction, with environmental protection against extremes of temperature, vibration, humidity and ingress of dust. The only moving parts are the output relay contacts, ensuring long life and reliability, and the timer meets the appro- priate VDE standards on electrical Swift Hardman, P O Box 23, BaUlie Street, Rochdale, OL16 1JE. England (1032 M) Printed circuit board connectors A new and novel method for connecting power and external circuitry to matrix or printed circuit boards said to be a low- cost alternative to conventional edge connectors and two-part connectors, is announced by Klippon Electricals Ltd. Called the BL range of connectors, the system comprises 2, 3, 4, 5, 6, 7,8, 10, 12 and 15 pole screw clamp terminal sockets which plug onto pins mounted separ- ately on the PCB at 5 mm inter- vals. Spring loaded contacts ensure good connections, and a coding pin module is available to ensure that terminals are correctly inserted. Manufactured from tough poly- amide, the terminals are rated at 250 V, 10 A, and will accept single flexible conductors of cross sectional area in the range 0.5 - 1 .5 mm, making them ideal for use where circuit boards need to be interchanged or removed for servicing. Klippon Electricals Ltd., Terminal Works, Power Station Road, Sheemess, Kent, ME 12 3AB (1049 M) Miniature two wire electronic timer Foxtam Controls Limited are now offering a new miniature Syrelec BAS Electronic Timer half the size of conventional timers (overall dimensions 24 mm wide x 48 mm high x 54 mm deep), which is simple to use needing only to be connected in series with the load. This offers flexibility for designers and practical scope within industry. This reliable compact timer incorporates a series static switch which is capable of switching an inrush of 15 A, and therefore ensures a long trouble free life even in arduous applications. These versatile units are ‘multi-voltage’ having available ranges of 10-50 V, 40 -260 V, 190 - 440 V a.c. or d.c. and variable time ranges from 0.05 to 180 secs in three scales with individual maximum times of 5 secs. 30 sec, and 180 sec. The units can be panel or DIN - rail mounted. Foxtam Control Limited, 18 Herbert Street, Oldham, Lancs. 01.4 2QU England (1033 M) elektor february 1979 - UK 15 ;hs. GaAs FET0.5-2.0GHz amplifier Avantck, Inc., Santa Clara, CA is now offering a 0.5 to 2.0 GHz GaAs FET amplifier that combines a 4.0 dB guaranteed maximum noise figure with 25 dB minimum gain, ± 1.0 dB gain flatness and a +12 dBm (16 mW) linear output power capability (1 dB gain compression point). Packaged in a lightweight (5 oz.), compact (2.85 x 1.95 x 0.84 in.) aluminium case, the Avantek AMG-2045 is an ideal replacement for the low noise traveling wave tube amplifiers commonly used in ELINT, ECM and other wideband receiving and signal processing systems. It is also suitable for application as a laboratory post- amplifier to increase the output power capability of swept signal sources. As a TWT replacement, the AMG-2045 offers a substantial reduction in size, weight and power consumption combined with a lower noise figure and higher MTBF. Unlike TWTA, the noise figure performance of this GaAs FET amplifier will not degrade after long use. Other performance characteristics of this Avantek GaAs FET ampli- fier include +23 dBm intercept point for third-order intermodu- lation products, indicative of a very wide dynamic range; 2.0:1 maximum input and output VSWR and excellent group delay characteristics. The AMF-2045 is powered from a single +15 VDC power source and requires only 110 mA for operation. All GaAs FET's in the AMG-2045 arc designed and fabricated by Avantek. Each amplification stage incorporates a unique feedback arrangement which assures excellent gain flatness and low VSWR over the 2 octave operating frequency range. Active biasing, which maintains the GaAs FET amplification stages at the optimum operating point over a wide range of input signal levels, is used throughout. The AMG-2045 case is 0-ring sealed and the interior of the case is filled with a foam encapsulant to provide additional moisture, shock and vibration protection. The amplifier can be qualified to MIL-E-16400 and MIL-E-4158 environmental specifications, is capable of meeting the EMI requirements of MIL-STD-461 and produced under a quality assurance/quality control program that meets the requirements of MIL-Q-9858A. Options for the AMG-2045 include higher and lower gain levels and a wide variety of first article qualification tests to meet user requirements. Delivery of the AMG-2045 is sixty days ARO. A data sheet detailing both the guaranteed and typical performance character- istics of this product is available from Avantek. Avantek, Inc., 31 75 Bowers Avenue, Santa Clara, CA 95051 USA (1030 M) Solid-state Mercury-vapour tube replacement A pair of solid-state rectifiers replace 249C, 4B32 and 872A mercury-vapour tubes in indus- trial, military and aerospace appli- cations where cost effectiveness and long life are mandatory. Developed by Solid State Devices, Inc., the TA10KV substitutes for the 249C provides a working volt- age of 10KV at 0.75A, while the STR4B32 replaces the 4B32 and 872A, giving 10KV at 1.25A. The SSDI rectifiers have an operating lifetime of over 10,000 hours - ten to twenty times longer than the equivalent gas-filled units. The SSDI units are assembled using controlled avalanche diodes with sharp-knee breakdown volt- age. Each diode is mctallurgically bonded and is enclosed in a her- metically sealed glass package. The assemblies are further encap- sulated in a high-dilectric strength epoxy which polymerizes to a void-free, rigid condition through chemical cross-linking. Both the TA10KV and STR4B32 have maximum rated reverse volt- ages of 14KV with a forward voltage of 10 V. Reverse leakage current at rated PIV is lpA. They withstand a peak transient reverse power test of three 20KV dis- charges within a 90 second period, and a reverse power surge of 2.4 Joules minimum. Neither device exhibits any corona when tested at 10.4KV. The TA 10KV has a peak repetitive forward current of 4A and a peak surge current of 50 A. The STR4B32 has a peak repetitive forward current of 25A with a peak surge current of 1 50 A. Electrically and physically com- patible with the gas-dischargc units, the TA10KV is 5.2 inches high and 1.38 inches in diameter; the STR4B32 is 7.25 inches high and 2.0 inches in diameter. Oper- ting temperature is -50° to +150°C. The TA10KV is priced at $20 each and the STR4B32 is priced at $40 each in 100 piece quantities. Although this is about twice the price of equivalent tubes, the ten times longer life, reduced maintenance costs, more rugged assembly effectively reduce overall cost. Delivery is stock to 60 days. Solid State Devices, Inc., 14830 Valley Vieuw Avenue, La Mirada, CA 90638; U.S.A. (1028 M) YIG-tuned oscillator covers 8 to 18 GHz Avantek, Inc,, Santa Clara, CA has introduced the industry’s first YIG-tuned fundamental transistor oscillator with 8 to 1 8 GHz frequency coverage. Designated the AV-781 18, the oscillator features an all-GaAs FET design (with GaAs FET os- cillator followed by a GaAs FET buffer amplifier), highly reliable and repeatable thin-film construction, hermetically sealed package and full guaranteed per- formance over the -54° to + 71°C military temperature range. Packaged in a compact 1.05 x 1.50 inch (height and diameter) case that weighs only 17 oz., the AV-781 1 8 can be qualified to M1L-E-5400 (airborne) and Ml L-E- 16400 operating environ- ments. The buffered design gives the AV-781 18 a minimum +7 dBm (5 mW) output power, frequency pulling of 1 .0 MHz maximum over all phases of a 1 2 dB return loss and assures a second harmonic content at least -12 dBc. Spurious outputs are 60dBc minimum and the pushing figure is 0.1 MHz/V, typical. Tuning linearity of the AV-781 18 is typically within 0.2% and the main tuning port offers a 20 MHz/mA sensitivity within 5 kHz bandwidth. As a standard feature, the unit is equipped with a highrate FM tuning port with 450 kHz/mA sensitivity and 400 kHz bandwidth. Power requirements are minimal: + 15 VDC at 125 mA maximum for the RF circuitry and + 20 to +28 VDC at 5 W maximum (-54° C) to power the selfregulat- ing Y1G sphere heater. Both the oscillator and amplifier GaAs FET devices are designed and fabricated specifically for this application in the Avantek microwave transistor facility. These Avantek GaAs FET chips use an all gold metal system, including gold gate structures for excellent performance, corrosion resistance and freedom from metal migration under high current density. As an added assurance of long-term reliability, the AV-78118, like all Avantek YIG-tuned oscillators, uses thin- film hybrid construction. All circuit conductors are gold and all resistors are thin-film tantalum nitride, both deposited directly on a precision ceramic substrate. Hybrid construction, combining chip transistors and capacitors with thin-film circuitry is noted for withstanding extreme shock, vibration and thermal cycling conditions in military and aerospace equipment. To protect the circuitry and un- packaged components from moist- ure and corrosive gases, the AV-781 18 package is filled with dry nitrogen, hermetically closed and leak tested before shipment. The AV-78118 delivery is 30 to 60 days ARO. A data sheet detailing this state-of-the-art GaAs FET YIG-tuned oscillator is avail- able from Avantek. Avantek, Inc. 31 75 Bowers Ave. Santa Clara, CA 95051, U.S.A. (1029 M) advertisment Elektor February 1979 - UK 19 PHIURGN Electronic Components Specialists 325, DUTOIT STREET, P.O. BOX 2749, PRETORIA, 0001 TRANSVAAL. REPUBLIC OF SOUTH AFRICA Telegraph address "TRINITRON" Stockists of Heathkit — Siemens — Monsanto — Texas, — Interface — Linear — MOS - Signetics - Fairchild PRODUCTS Capacitors Tantalum Polyester Electrolytic Co-axial & P.C. Mount - ELEKTOR MAGAZINES BINDERS PRINTED CIRCUIT BOARDS Electronic books. Projects, data etc. LEDS Toggle switches Connectors . . . Potentiometers . . . Trim pots . . . SCRS . . . T Quaracs . . . Variacs . T ransformers Sole South African distributors for ELEKTOR Trade Enquiries Welcome