selektor contents pest pester ■ Is your body itching for summer sun, while twitching at the thought of those dreaded holiday fiends: mosquitos? Do you find a couple of nights 'in the bush' are enough to turn your skin into a lunar landscape? Not to mention the sleepless hours spent wrestling with the sheets in a vain and exhausting effort to shut out that sky-diving drone? This article describes a circuit to solve your insomnia! disco lights controller if. o p -t Eyndel Disco colour light systems have been on the market for some time now. The modules have certain advantages: they’re not expensive, they're easy to handle, and above all, they're safe. There is however one disadvantage: since the module is a single unit it cannot be expanded. This may be remedied by adding an extra module, as described in this article. £2 aerial Readers with an interest in short wave reception, such as DXers, often have difficulty in finding a suitable aerial. The Elektor design staff have been working on this problem for some time. The result is an aerial which can be placed practically anywhere, an active aerial, which can compete with much bigger and more expensive types in the 1 .8 MHz to 30 MHz range. luxury transistor tester ir. stomi timbug II The initial design requirements for this 'bug' were that it be able to 'see' objects in its path and take avoiding action. It should also be as inexpen- sive and as simple as possible. As the circuit was designed around the ever popular 555 timer 1C, and the circuit shown here is the Mk II version, it is not difficult to realise how it came to be christened Timbug 1 1 . j coming soon . i musical cube EDITOR: EDITORIAL STAFF TECHNICAL EDITORIAL STAFF J. Barendrecht G.H.K. Dam P. Holmes E. Krempelsauer G. Nachbar A. Nachtmann K. S.M. Walraven narrow band I F strip i more on TV games | In earlier articles (T played TV games', Elektor October and November 1979) we asked for our readers experiences with the joysticks - and [ promised to come back on the subject when we had enough data. We received several interesting reactions to this request, often including other suggestions and comments. By now, we feel that it is high time to bring all other interested readers up to date! variable logic gate im. v. Kerkwijk) I applikator: smoke detector noise at high frequencies Noise in UHF/VHF receivers can be determined by using extensive and expensive test equipment. However, tests with a noise generator can give usable results at a much lower cost. morse trainer the SC/MP as a mini organ ih.w. wyes) . the Elekterminal width extender iw. Me more on junior computer and fuel consumption meter missing link toppreamp, elekterminal, active car aerial market advertising index elektc 1980 - 6-01 A look on the bright side How would you like to knock 10% off your electricity bill? It can be done, by using new lamps recently introduced by Philips! The basic idea is quite simple. It is well- known that fluorescent lamps (TL', in Philips parlance) are more efficient than normal filament bulbs. So what do you do? You take a miniature fluorescent lamp, fold it up, mount it in a bottle (with choke, starter and all), and add a standard bayonet (or screw) cap that fits into a normal light socket. The result (figure 1 ) is a direct replacement 1 4 1 power rating ('wattage') light output efficiency incandescent 75 W 900 lumen 1 2 lumen/watt 1000 hours Philips ■SL' 18 W 900 lumen 50 lumen/watt 5000 hours reflector 40 W 900 lumen < 25 lumen/watt* 2000 hours- £ 2.50 . . £ 5.00 cost of lamps for 5000 hours £ 3.25 1= 5 x) electricity cost (at 3.43 p per kWh) £ 1 2.86 total cost. 5000 hours £ 16.1 1 £ 6.25 ... £ 1 2.50 (= 2)4) for conventional lamps, that uses only a quarter of the electricity to give the same amount of light. There is rather more to it, of course, but before going into technical details it is interesting to see what the new lamps can do. An 18 watt ‘SL’ (for 'Super Lamp'?) gives the same amount of light as a conventional 75 watt bulb, and it has a useful life of more than 5000 hours - five times that of the filament type. It gives the same type of light as a normal lamp - not that nasty 'cold' white often associated with fluorescent lamps - and it starts after only the briefest of pauses, without all that irritating on/off flickering. All in all, a good and efficient replacement for conventional bulbs. But what about the price? Hold on to your seat: about C 7.50 each! Which brings us to the economics. You can look at this in all kinds of way (energy saving, pounds-out-of-pocket, practical examples), but in each case the new lamp turns out a winner! The energy aspect is illustrated in figure 2. The total energy used in an average household is shown at the left (assuming that heating, hot water supply and cooking run on gas or oil), and the electricity consumption is given in greater detail at the right. The shaded portion at the top of the 'electricity' column is what can be saved by using the new SL lamps instead of the conven- tional kind: more than 15%, in this case! All right, so you can save energy. What about saving pounds — with a lamp that costs ten times as much as the normal type? This requires a little calculation, as shown in Table 1, to compare the total costs when using a normal filament Total energy Electricity only (electricity, gas.etc.) 64)2-1 1980 lamp, the new SL, or another new alternative proposed by Durotest and General Electric in America (amongst others) : a fairly conventional filament lamp with a heat-reflective coating inside the glass. In each case, the total cost over 5000 hours is calculated — based on an electricity price of 3.43 p per unit (kWh). "A Even though the calculations are weighted against the SL (we have yet to find the filament lamp that lasts 1000 hours in a normal domestic light fitting, and the life expectancy and light output of the lamp-with-heat-reflector represent the theoretical maximum that might be achieved!), the new lamp still wins hands down. Furthermore, as the price for electricity goes up and the cost of the new lamp comes down, the differ- ence will become even more striking. Philips give two practical examples that also shed an interesting light on the new lamp. First, as far as saving energy is concerned: Around 1500 million incandescent lamps are sold in Europe annually. Approximately half of these are for domestic use, the rest going to 'professional' sectors (industrial, hotels and restaurants, schools, etc.). Let us now assume that, after a certain period, 10% of the consumer market and 25% of the professional is occupied by the new SL lamp. This means that, in all, 250 million incandescent lamps have been replaced by SLs - saving approxi- mately 14.5 thousand million kilowatt hours each year, worth roughly £ 500 million! To put it another way, every family in London could light their home free of charge for 7 or 8 years, with this 3 2. Discharge tube 3. Fluorescent powder 4. Choke/Ballast 5. Electrode 6. Bi Metallic strips 7. Starter 8. Mounting plate 9. Housing 10. Thermal cut-out 11. Capacitor 12. Lamp cap A further example illustrates the pounds- in-pocket principle. In an average hotel, with 4000 incandescent lamps installed, about 75% of these could be replaced by 18 W SL lamps. This would give a total saving of some £ 30,000 each year! A look inside A cutaway view of one of the new lamps is shown in figure 3. As can be seen, the fluorescent lamp itself is folded into a double U-shape, and the choke is mounted between its legs. Obviously, folding up a fluorescent lamp is no easy feat — especially since the fluorescent powder must be applied to the inside of the glass tube before it is heated and bent. Admittedly, Philips have a lot of experience in circular and W-shaped lamps, but even so a com- pletely new coating had to be developed for this particular application. The fluorescent layer had to be 'strong' enough to withstand the severe bending required; it had to produce the same 'colour' as a normal incandescent lamp; and it should have the highest possible efficiency. Apparently, the designers have succeeded: the lamps are now in production! A further problem is associated with the design target: a direct replacement for normal lamps. This limits the permissible size and weight rather drastically! As far as size is concerned, they are already quite close - as shown in figure 4. The diameter of the SL (18 W version) is 72 mm, as opposed to 60 mm for the equivalent 75 W filament lamp; the SL is 160 mm long, compared to 108 mm for its conventional counterpart. Not bad, certainly when you consider that the SL can often be used without a 'decorative' lamp shade. The weight is another matter: 520 grams for the SL, and only 35 grams for a normal filament lamp. Over a pound! However, Philips assure us that this is still within the weight limit set by inter- national standards for lighting fittings. One other difference, when compared to normal lamps, should be noted: SL lamps can not be operated off lamp dimmers! As with any other fluorescent lamp, they don't take kindly to a mains supply that has been chopped up by a thyristor or triac. elektof june 1980 Some other lamps At the same time. Philips have intro- duced some other new types of fluor- escent lamp. A thing that looks for all the world like two lamps glued together at top and bottom (figure 5) goes by the name of 'PL' ('Paired Lamp'?). It is even more efficient than the SL — a 13 watt version gives the same amount of light as a conventional 75 watt bulb — and it gives the same 'warm' light. Then there is the 'TLD' (the D stands for 'Dun', the Dutch word for thin!), once again available with the same 'incandescent lamp coulour' — referred to as colour 82 (figure 6). However, enough is enough: there is little to be gained by discussing these other types in depth. 557S Design and the silicon chip The world's first major exhibition recalling the origins of the silicon chip and tracing its development and influ- ence in design is now open at The Science Museum, London. Intended to entertain and inform all age groups, the exhibition will continue until the end of 1980. Co-sponsored by the Science Museum, the Design Council and the Department of Industry, this is probably the first exhibition of its type to show the significance of the silicon chip in improving the quality of life for every- Visitors to the exhibition will enter the first of the two halls devoted to The Challenge of the Chip' through a display featuring a microprocessor which is 60 times life size. Exhibits in this hall have been assembled by The Science Museum and deal with the history of the silicon chip and show its devel- opment to meet increasingly sophisti- cated electronic requirements. The Design Council has selected products and systems which are impress- ive examples of silicon chip applications to show in the second of two halls. Products from about 60 companies are displayed in ten sections covering shopping, offices, transport, communi- cations, production and control, edu- cation, music, medicine, home and toys. In the future one microprocessor may control the heating and ventilation systems in the average home as well as lighting, cooking, washing, radio and television equipment. In addition, it could answer the telephone, maintain a record of telephone charges, control an alarm system, operate the curtains and do all the household accounts. For the present time designers have concentrated on utilising the inherent reliability and low cost of the microprocessor to improve existing designs of domestic appliances. The world's first computer- ised washing machine is on display and it uses a microprocessor to provide a more comprehensive range of washing and rinsing programmes to suit the variety of natural and man-made fibres in current use. There is a section of the exhibition devoted to microchip controlled games and toys which will appeal to children of all ages. A popular exhibit will be the multi-loop railway with multi-control system. Computer games including chess and bridge are also on show. Small computers, using microelectronic circuits, are now being used to help doctors diagnose complaints and store the medical records of their patients. Some examples of this equipment are shown together with new instruments, using microchip devices, which can help identify handicaps such as deafness in new born babies. Another special exhibit shows the enthusiasm with which designers at British Rail are pursuing potential applications for the microprocessor to bring about improvements in passenger travel through the more efficient issue of tickets and the provision of better passenger information facilities. The proposition that robots can be used to do all heavy work on the railways, keep trains and stations clean and move mail and parcels automatically from road to rail is being investigated. The movement of coal from the mines to the point of bulk use is already well established as an industrial conveyor belt but British Rail explains that the microprocessor could make the 'merry-go-round' completely automatic by driving the train on its closed loop journey to load and unload the coal, weigh it and produce all the necessary documents. Fuel injection systems were one of the first of an increasing number of silicon chip applications for the motor car. A special Lucas Electrical display shows how the microprocessor can be used to conserve fuel, control exhaust emissions, monitor driving instruments and control the power delivered to the road wheels. Teaching machines The ubiquitous pocket calculator is probably the best known and the most widely used microprocessor inthe world. No attempt is made in the exhibition to show the tremendous variety of designs and functions of these machines. Instead there is a derivation shown which helps children learn simple arith- metic and another, based on a simple calculator, designed to encourage an interest in spelling. An ingenious information centre into which different memory capsules can be plugged to retrieve several subjects as well as different languages is shown to demon- strate the versatility, compactness and general utility of the microprocessor as a teaching aid. The musical chip Microelectronics is helping to produce and reproduce music in better ways. A typical electronic organ which can simulate the sounds of many instruments and do so with a variety of accompani- ments and in different rhythms illus- trates the tremendous advances made in organ design since the development of the microchip. The music synthesiser is another device shown to demonstrate the remarkable possibilities which the silicon chip has brought to music. 6-04 - el 6 pest pester Is your body itching for summer sun, while twitching at the thought of those dreaded holiday fiends: mosquitos? Do you find a couple of nights 'in the bush' are enough to turn your skin into a lunar landscape? Not to mention the sleepless hours spent wrestling with the sheets in a vain and exhausting effort to shut out that sky-diving drone? Read on for the circuit to solve your insomnia! In many respects, summer can be a mixed blessing. It's wonderful to step out of the dark, dreary days of winter into the bright sunshine with holidays, parties and picnics to look forward to. At the end of the day, after a soothing shower, you slip between the cool sheets and then . . . you are rudely interrupted by that most infiltrating insect: the mosquito. Your worries are now over! Elektor's designers have suitably sized up the situation and have come up with a sizeable solution: the Pest Pester. It couldn't be simpler or smaller. Any mosquito on the rampage will buzz off immediately upon hearing the circuit's squeak. It is a welcome change to have such a simple, yet effective circuit fill the pages of the leading article, instead of the highly complex computer systems which usually get the honour. The Pest Pester consists of exactly nine com- ponents all told. Before dealing with the circuit's construction however, it might be a good idea to see what we're up against. How do mosquitoes 'tick'? Mosquitoes: Their Habits and Idiosyncrasies It is common science that certain high frequency noises keep annoying insects at bay. So there's nothing new on that score. Every now and then the would-be 'inventor' of an electronic mosquito chaser allows his name to be splashed across the headlines. Invariably, though, it all boils down to the same principle. Unlike in the past, when mosquitoes were swatted or sprayed regardless of their gender, occupation or creed, these undersized public enemies are now going to be dealt with in a biological manner. That is to say their private lives have assumed a new significance, for apparently, although they all buzz, only the females sting. Thus, these are the ones against which to take strategic action. Nature gives us another helping hand by narrowing the foe down to several million mothers-to-be. These have been discovered to avoid their men like the plague (you might have thought that the damage had already been done, but then who are we to judge the wiles of nature?). The obvious solution is therefore to reproduce the male's buzz, thereby making the bedroom a safe place to sleep in. The next thing to consider is the fre- quency. All frequencies between 1 and 30 kHz were tried and the best results were obtained around 5 kHz. Does it work? Can mosquitoes really be 'buzzed off' so easily? The next best thing to asking a mosquito about it, was to talk to a parasitologist. Our man was highly sceptical about it and even went so far as to say that certain tones would attract mosquitoes, rather than keep them away. We put it down to parasitical pessimi sm. elektor june 1980 — 6-05 P”« P e5ter Another highly effecitive method is to use a blue light to attract mosquitoes towards a chicken wire screen where they meet an excruciating, high voltage death. Electrocution is a cruel solution. Previous high frequency devices in- cluded a 'bat simulator' (bats are renowned mosquito eaters) which, unfortunately, fooled no-one. Why use your hard earned money to buy a 'Pest Pester' when you could make it so easily yourself? Admittedly, its effectiveness remains to be proved. On the other hand, its ineffectiveness remains equally unproved. In other words, you have nothing to lose and will probably have a lot of fun in the process. It is hoped that upon reading this article, hobbyists will eagerly produce their soldering irons and send in their empirical experiences to our editorial staff. Who knows? You might be the one to come up with the ultimate frequency! The circuit Being so small and simple the 'Pest Pester' needs very little explanation. The circuit must be able to run for extended periods of time on one penlight cell (AA), it was decided. Considerable time was spent in dis- cussing various IC's and supply voltages, when, convinced that actions speak louder than words, one designer built an astable multivibrator (AMV) with two transistors. It used a speaker out of a telephone headset and a penlight cell for power. It worked so well that even at 0.7 volts it continued to oscillate (a remarkable feat in itself). Figure 1 shows the schematic. Using the given values, the oscillating frequency is approximately 5 kHz. As mentioned before, this frequency seemed to be the best, but it may be changed of course by replacing R2, R3, Cl, and C2 with appropriate values. Figure 1. Schematic diagram of the Pest Pester. The telephone earpiece produces a 5 kHz tone. A few more particulars — you may have noticed that C2 is four times larger (in value) than Cl. This causes the output to have a duty cycle of around 25%. This is all quite deliberate because there will be many more harmonics in the output than there would have been at a duty cycle of 50%. The speaker (it must be a crystal type) is connected between the two collectors of the transistors. This may seem a little strange at first, but it allows the output swing to be double the supply voltage. Some may recognise this as a sort of bridge amplifier — it is. The 'Pest Pester's' current consumption is extremely low, using only 300 p A. This means that with a penlight battery (which is usually good for 500 mA/hr) the 'Pest Pester' will torment mosquitoes for 1500-2500 hours! Specifications like this should make them cringe. The printed circuit This time we’re offering two printed circuit boards for the price of one. This gives hobbyists as much freedom as possible when thinking about a case. It R1.R4- 10 k R2.R3- 560 k Capacitors: Cl ■ 82 pf C2 = 330 pf Semiconductors: T1.T2-BC 547 Miscellaneous: Crystal earpiece/speaker from a telephone headset. comes in a round as well as a rectangular version. They are simply cut apart (they are sent as one board). Figure 2 shows both printed circuit layouts along with component positions. All kinds of cases are suitable. The prototype was mounted in an old 'glue-stick'. The case should be large enough for the battery. For the glue- stick case, a 2 mm bolt was soldered to the copper base at the heart of the circuit board. This served as the negative battery contact. The positive battery contact was inserted in the lid of the stick. The speaker and circuit board were placed in the bottom of the glue-stick with the battery above. The positive lead was attached to the inside and was fixed to the top edge so that by turning the cap the 'Pest Pester' could be turned on and off. In our particular case, the glue-stick was a little too small for the speaker and the crystal had to be removed. Fortu- nately, this caused no problems. Figure 3 gives an illustration of this. M Figure 3. The entire unit may be mounted into an empty glue-stick. 6-06 -i june 1980 disco lights controller A disco light system consists of groups How it works of coloured lamps turned on and off to the rhythm of the music: red lights for Disco lights operate from an audio the low notes, yellow for the middle signal. This means that, in order to notes and blue for the high notes (of control a set of disco light, some sort of course any colour may be used for any audio signal will have to be generated, tone). In this way, the music becomes a Every time the red (low) lights are to go visual as well as an aural experience. on, a low frequency tone will have to be Even though this effect is fine, it comes generated, for the yellow lights (middle) nowhere close to that produced in a a medium frequency tone and the blue Discotheque. The lights must be able to lights (high) will need a high frequency do more than just flash with the music, tone. For this reason, the disco light This disco light module gives that little controller generates three tones: 50 Hz bit extra. (low), 500 Hz (medium) and 2 kHz It is a simple circuit with which an (high). disco lights controller 'lights' to face the music Disco colour light systems have been on the market for some time now. All you have to do is connect an audio signal to three coloured lamps and you're ready to throw a party. The modules have certain advantages: they're not expensive, they're easy to handle, and above all, they're safe. There is however one disadvantage: since the module is a single unit it cannot be expanded. This may be remedied by adding an extra module, which this article will now describe. F. Op 't Eynde existing disco light system may also The block diagram of figure V shows the flash in succession (running lights) or three tone generators. All three generate leave a 'space' in succession (inverse continuous squarewaves at the three running lights) or on and off (beacon), frequencies desired. The electronic The running speed or the flashing switches determine which of these frequency may be varied. This unit is (if any) reaches the output. Each of the designed for three channel colour generators has its own switch. The tone systems and will work on home-made or mixer also has one with which the commercial models. controller can turn all the lights on and 1 Figure 1. Block diagram of the disco light controller. The device generates special tones, so that it may be used with a conventional disco light system. off for the beacon function. The electronic switches are controlled (opened and closed) by the low fre- quency squarewave oscillator (LF) and the run counter connected to it. The circuit Figure 2 shows how figure 1 is put into effect. It is a very simple circuit with four CMOS IC's along with a few other 'bits and pieces'. The three tone generators constitute a NAND gate (from low to high: N1, N2 and N3 respectively) each. To get such a gate to oscillate, a resistor and a capacitor are added. The four electronic switches are all in one 1C, so that is easy enough — ESI , ES2 and ES3 are the electronic switches for the running light and ES4 is for the flashing light. The two mixers in the block diagram are also very simple, each consisting of only three diodes. D1 , D2 and D3 mix the tones together to produce the light signal, and D4, D5 and D6 sum the output of the electronic switches to provide the running light output. The low frequency squarewave generator is made using NAND gate N4. Its construction is similar to that of the three tone generators. The only differ- ence here is that the resistor has been replaced by a fixed resistor and a potentiometer for varying the oscil- lation frequency. The signal produced by this generator not only controls the flashing light switch ES4, but also feeds the clock input on the run counter IC3. The run counter has four outputs 0, 1 , 2 and 3. The '3' output is connected to the reset input on the 1C. This tells the counter to start counting over again when it reaches three. To provide the 'moving hole' effect the three outputs of IC3 are inverted. This is achieved by the EXOR gates N5, N6 and N7 controlled by switch S2. Inversion takes place when the control inputs of the gates are taken high, to +5 V, by switch S2. Switch S3 selects the operating mode; normal (using the audio input), flashing light (the well known beacon effect) and 'running' lights. Potentiometer P2 has been included to allow adjustment of the output amplitude for matching the sensitivity of the disco light system in Readers with an interest in short wave reception, such as DXers, often have difficulty in finding a suitable aerial. The aerial they are really looking for is either too expensive or their town council refuses permission to place it. And a small aerial often suits the bill but not the reception. Moreover, there are few types of aerials which enable the entire short wave range to be received. The Elektor design staff have been working on this problem for some time. The result is an aerial which can be placed practically anywhere, an active aerial, which can compete with much bigger and more expensive types in the 1 .8 MHz to 30 MHz range. The genuine DXer has a hard time these days, what with community aerial systems and local laws and restrictions. Shortwave aerials are often regarded as eye-sores — and unfortunately, they often are! However, there are many kinds of aerials and usually one can be found which can be used indoors or outside without getting in everybody's way. Reception quality of course greatly depends on local reception conditions. People who live in flats, for that matter, are always at a disadvantage, with so little breathing and thus 'receiving' space. Since electromagnetic waves do not penetrate steel reinforced concrete well, a rod aerial will always have to be placed outside the building. Such an aerial will produce only a marginal the best of their ability. Of course, there are many other kinds of SW aerials, but they all manage to have one or more of the disadvantages already mentioned. An aerial which reacts to the magnetic component of the field, therefore, always has at least one advantage when compared to the others. One of these is the magnetic loop aerial, but this is hardly ever used due to its lack of efficiency. A type universally adopted in transistor radio's for medium wave reception is the ferrite rod aerial. It is also used as a directional aerial for navigation or military pur- poses. Small loop aerials The magnetic loop aerial is small with atrial active window aerial (patent has been applied for) signal. Of course this might be remedied by adding an aerial amplifier to the paraphernalia of wire and metal, which in turn will add to the noise. Further- more, the aerial is highly sensitive to, and will pick up all sorts of, man-made noise (QRM). It cannot be made to pick up only a weak station. The aerial may be of varying lengths. As a 1/4 lambda aerial, the smallest (tuned to resonance) aerial, it tends to be fairly long, especially for lower frequencies and in addition is tuned so that the bandwidth will be limited. The more conductive the earth under it is, the better it works as the earth serves as the dipole's counterpart. DXers with gardens can improve the electrical quality of the earth under the aerial by digging trenches, fanning out away from the aerial and embedding copper wire in charcoal in them. When this is done the ground under the aerial will have to be kept continually moist. All in all, a job not to be taken lightly. To the flat dweller such an installation may seem nothing more than a far fetched fantasy and he will have to make do with a tiny rod aerial. The length of the rod aerial will be many times smaller than the smallest wave length to be received and is therefore reactive (needs to be tuned to the required frequency). Now an amplifier will definitely have to be brought into the picture and fitting it between the aerial and the receiver is bound to cause quite a few problems. To make matters worse, numerous electrical appliances are used in a block of flats, all of which conspire in interfering with reception to regard to wave length, so that its energy pick-up is quite low. Yet, these aerials are an attractive proposition. To start with, they have a polar diagram in the shape of a figure of eight as shown in figure 1. It can be seen that very sharp zero points appear, for from certain directions reception is virtually nil. As its name suggests, it works on the magnetic rather than the electrical component of the electromagnetic field. This penetrates concrete more success- fully before reaching the aerial free of interference. In blocks of flats especially, it will prove to be an asset. One disadvantage is that the loops in use up to now have not been very successful above 7 MHz. Elektor, how- ever, has chosen this type to work on. Considering its advantages, it is strange that so little interest has been shown in it. After all, its drawbacks (low ef- ficiency and narrow bandwidth when tuned) should not be too difficult to It is placed in a magnetic field. With regard to the electrical field this is turned 90° as shown in figure 2. The aerial is therefore positioned vertically, standing perpendicular to the magnetic field as a loop. A voltage is induced in the loop which causes current to flow through the aerial and to the receiver. This naturally produces another magnetic field around the loop, so that it can operate as a receiver as well as a transmitter aerial. Part of the energy received is therefore beamed out again. You could say that part of the energy received seems to be dissipated in a resistance. This is called radiation 1980-6-09 Uind. Figure 2. An electromagnetic wave consists of two main components, an electrical field end a magnetic field. This figure shows that they are 90° out of phase to each other. resistance and varies according to the aerial used. If the average value of the radiation resistance is calculated for a loop aerial of, say, 40 cm in diameter, this turns out to be less than one tenth of an ohm at 30 MHz, in other words a negligible amount. The aerial has two kinds of resistance: load and material resistance. The latter may be considered in series with the radiation resistance. Since the resistance of a rounded conductor of 2 it x 40 cm is hardly worth mentioning, the result obtained is the substitute shown in figure 3. The voltage source represents the induced voltage in the aerial, L stands for the inductance of the aerial and Rb for the load resistance. By means of a fairly complicated math- ematical calculculation, it may now be established that the smaller the induct- ance the greater the current passing through the aerial. At the same time, the greater the flux contained the greater the current. Thus, it is safe to say that the aerial with the highest possible 4>/ L ratio is the best one to use. Once we had got that far, finding the right shape for the aerial was chicken feed. Since this had to be a question of trial and error, however, a few consider- ations had to be dealt with first. The fre- quencies which we are concerned with are fairly high, so the 'skin' effect will arise to a certain extent. (This means that the current will mostly flow to the outside of the conductor) . This being the case, a solid rod of copper will have no more effect than a hollow drainpipe. In addition, the fact that the current will pass through the outside of the conductor will really make it immaterial whether the conductor has a tubular form or not. In fact, it could be flattened out, thereby creating a thin, flat conductor. A few measurements proved this point. Hardly any difference in self-induction between the thin sheet copper and a hollow tube or massive rod was noted. Thus, the obvious conclusion was to stick to the thin sheet copper for further measurements, since this can be bent into all shorts of shapes. The results of tests carried out on various shapes are given in table 1 . Note how a broad loop aerial (14) produces better results than a large, narrow specimen (10). The ratio of the aerial loop's surface area to self- induction was used as a criterion. Another point of interest in this table is the fact that six loops wired in parallel (25) also produce very low self-induc- tion. This may be explained as follows. If two coils are wired in parallel, the value of self-induction will be halved. But this will only occur when the coils do not affect each other and do not generate mutual induction voltages. When broad foil is used, there will also be a number of coils switched in parallel, but these do affect each other. This is only partly prevented by foil, with the result that the selfinductions present are more significant than is the case in 25. The ideal distance between loops has been found to be about a tenth of the diameter of the loops. Nevertheless, copper foil is the best choice, because the aerial then takes up less space and is easier to construct. There are two types of magnetic loop aerial: a resonant and a non-resonant type. This is determined by whether the aerial has been tuned or not. The resonant type uses the layout in figure 4. As a capacitor has now been placed in parallel to the load, the reactance of the aerial is 'tuned out'. It should be noted that whether or not one half of the power is re-radiated depends on the type of matching, i.e. power matching noise matching. The advantage of this type of aerial is that more power is available as compared with the untuned version. A drawback is that the aerial is narrow banded and must therefore be tuned. If it is to be placed in the attic or on the roof this will have to be done by remote control, which is easier said than done. Secondly, the current through the aerial will be 90° out of phase with the flux, thus with the in figure 2. An advantage, on the other hand, is that its transmitter and receiver character- istics are equal, so that a fairly mobile transmitter/receiver aerial is obtained with the directional characteristics of a The small loop aerial is non-resonant. This means that the transmit and receive capabilities are not the same. As the aerial we are looking for has to suit the average short-wave listener, this is of minor importance. The £2 aerial For every unit of length any conductor will have a certain amount of inductance and capacitance. Usually, the capaci- tance is disregarded, but since a loop aerial's width is equal to its length, it will have to be taken into account here. Let's take a look at the replacement layout. Since inductance can be established per unit of length, it can be assumed that the layout will look like figure 5. It now follows that load resistance Rq should be as small as possible, because every bit of the aerial will preferably be circuited with its own impedance. Ideally speaking, the loop should be a short circuit. If R(3 is as small as possible, the figure will be fairly symmetrical. Kirchhoff's law may be applied (the sum of all currents to and from a point is nil). Then, the sum of the currents in point A will be nil, in other words: the capacitance will have no influence whatsoever. The capacitance concerned will undoubtedly come up at the Rb connection points. If sheet copper is used, the ends which are connected up should be cut to a point, so that two points come to face each other rather than two broad areas (see figure 6). Optimally, the loop will have to be very small with regard to the smallest wave length to be received in order to obtain a highly homogenous field within the aerial. A loop having a diameter of 1/10 lambda has a nice, homogenous field, but a rather weak signal. It is therefore advisable to use an amplifier as well. This must be virtually free of noise with a very low input impedance and be as well matched as possible to the first receiver stage. If necessary, a less homogenous field will suffice and the diameter may be increased to 1/4 of the smallest wave length to 2.5 m covering the range to 30 MHz. Such an aerial will also partly react to the electrical field, but in any case generates a large enough signal for it to be connected to the receiver directly by means of a 50 - 70 £2 cable. The active £2 aerial Gradually we are getting to the crux of this printed matter! After all, what it is all about is how to construct an aerial which is suitable for short-wave listeners (SWL's) and easy to set up. We have opted for the non-resonant magnetic loop aerial with amplifier. It will be small in size, easy to build and as good as any of its larger counterparts. As table 1 has shown, it should be round in shape. As far as its material is concerned, a corrugated aluminium strip three cm wide is suggested. An advantage of corrugated aluminium is that its surface area is greater than you would imagine from its width. This of course has nothing to do with the fact that a broader loop gives better results. The aluminium strip is bent into a loop. The diameter must be less than 1/10 of the smallest wave length to be received. Figure 7 shows a broadband noiseless aerial amplifier. Use has been made of a very quiet transistor: a BFT 66. To keep the noise factor down to a minimum a grounded emitter configuration has been selected. There are a number of conditions which the amplifier needs to comply with. A well known problem with broadband amplifiers is that they are prone to overloading, for instance by local transmitters. If such a transmitter is in the neighbourhood, distortion in the amplifier stage may cause the signal to mix with the other two signals and to produce a mixture product within the tuning range of the receiver. As a result, 'stations' are heard where they do not exist, and existing weak stations are inaudible. This can be avoided by using an amplifier with a wide dynamic range. Furthermore, the amplifier's bandwidth will have to cover the entire short wave range and, of course, the noise it produces itself will have to be negligible. At a collector current of 9 mA the BFT 66 has its maximum dynamic range (approximately 60 dB). Resistors R1, R2, R3 and diode D1 take care of the bias, resulting in 9 mA of collector current. The (unby-passed) emitter resistor R1 creates a small amount of feedback, improving the amplifier's IMD properties at the expense of the noise n aerial elektor june 1980 —6-1' Figure 7. The broedband amplifier for the n -antenna. figure. If a larger aerial loop than 50 cm is chosen, the effect obtained will be partly nullified. Since the collector and base impedances are highly reactive oscillations are likely. Thus is it import- ant to work out the component layout in such a way, that the connections between the various components are as short as possible. In addition, the input and output will have to be as far away from each other as possible. In the design of the amplifier a compro- mise was reached, this being that the aerial is not low-impedance terminated. The result is that the signal production at lower frequencies drops by 6 dB per octave. This is no disaster, because as the noise at lower frequencies increases up to 20 dB per octave, the net result or signal to noise ratio will at any rate not deteriorate. This means that the receiver's dynamic range meets more 8a Figure 8a. The power supply for the antenna. When SI is switched in the lower position, the input is attenuated by 20 dB. The open arrow shows the input from the amplifier and the shaded arrow represents the output to the receiver. 8b ^ Figure 8b. To avoid any possibility of oscillations, the power supply is placed between the amplifier and the receiver. The two coils in the above drawing consist of 10 to 20 windings of 0.2 mm enameled copper wire. flexible demands than when an active rod aerial is applied, which was seen to amplify the total signal + noise factor at lower frequencies as well. The amplifier printed circuit board has been designed to form a unit with the aerial. The supply for the amplifier, which has been included on a second printed circuit board, can be connected to the amplifier by means of a coax cable (see figure 8a). It is advisable to place the aerial several metres away from the receiver to reduce any risk of oscillation to a minimum and care must be taken that the receiver and aerial are not placed on the same metal base. (Oscillations may be recognized as an inordinate amount of noise emitted by the receiver). In figure 8b a method is shown to eliminate oscillations by a sort of balun between the output of figure 8a and the receiver. Last but not least . . . After reading the information provided in this article, it should be possible to build a good aerial which can be put up in any house or flat. In cases of great difficulty, copper or aluminium foil may be chosen and the aerial may be fixed flat against the inside of a cupboard door. The aerial is then direc- tionally mobile and will not be in anyone's way. One thing which must be taken into account is that any metal surfaces must be removed from around the aerial. Thus, if your windows have metal frames, it is not a good idea to fix the aerial to the pane. Then it is indeed better to use a cupboard door. Of course, by applying several loops, the aerial's directional effect may be in- creased. One way is to place two loops next to each other (keep in mind that the individual distance must be at least 1/10 of the diameter of the aerials to keep coupling between them low). If the SW receiver has a battery supply, so that DXing may be continued out and about, it is possible to derive the supply from the receiver or use a battery exclusively for the £2 aerial. The supply voltage of the amplifier may be between 4 V and 12 V. H 6-14 -elektor june 1980 luxury transistortester This particular design first appeared on Elektor's pages in last year's Summer Circuits issue. Readers voted it as one of the most interesting circuits and this article is the elected Elektorised result. The circuit has been slightly modified and a printed circuit board now accompanies it. In technical literature, the current amplification is usually indicated as hpE- For everyday purposes it is not absol- utely necessary to know the precise hpE value, but rather to have a rough idea of its upper and lower limits. The manufac- l c (collector current) and lt> (base current). The Luxury Transistor Tester indicates the letter corresponding to the transis- tor's hpE category. Thus an A, B, or C will appear on the seven-segment d isplay. An 'F' will appear, if the transistor is faulty. The circuit has separate connec- tions for NPN and PNP transistors. A switch selects the transistor type. The block diagram Figure 1 shows the block diagram of the luxury tester transistor A highly important aspect of transistors is their current amplification ratio. This is often indicated by an A, B, or C behind the type number in the case of transistors. Inevitably however (by decree of Murphy himself), this is no longer legible. Using the transistor tester described here, the correct letter can be read from a display. At the same time, it can also be determined whether the transistor is up to scratch or not. R. Storn turer used to have no way of precisely determining the current amplification ratio in advance. The best he could do was make a rough estimate, then after the transistors are manufactured, they were selected to meet the required hpE limits. The type number was then printed on the case. Although nowadays this can be determined in advance, the same type numbering is still used. Two transistors with the same type number do not necessarily have the same hFE- That is why industry uses a letter as a suffix to indicate the general hFE value. The letters define the hpE according to the following values: 'A' for an hFE between 1 40 and 270 ’B' for an hpE between 270 and 500 'C' for an hpE of more than 500 The terms hpE and current amplifi- cation ratio describe the ratio between transistor tester. Its operation is quite simple. The voltage across a number of resistors is compared to a reference voltage. Here it is important to know beforehand whether the transistor is NPN or PNP. The switch that selects the transistor group also operates an LED to indicate the position of the switch. This voltage comparison determines the hFE group of the transistor and displays an 'A', 'B', or 'C' whichever is appropriate. If the 'F' on the display does not disappear when the pushbutton is depressed, then the transistor is defec- The layout The complete layout is given in figure 2. Also shown is the parts list. The schmitt triggers in the block diagram consist of three op-amps wired as comparators. Figure 1. The block diagram of the Lux Tester. The upper half of the schematic, IC1 - IC3, serves to measure NPN transistors. The inverting inputs of the op-amps are connected to a reference voltage. The non-inverting inputs are connected to the collector of the transistor under test (TUT). Resistors are used as voltage dividers here. The base drive current is determined by R1 and RIO. At a certain amplification factor the collector current will also be fixed. Then the three collector resistors will be under a voltage determined by the current amplification ratio and the value of the collector resistor. If the amplification factor is 400 and the base drive is IOjiA, then the collector current will be 4 mA. With this amount of current flow, the voltage dropped across the collector resistor R4 (390 J2) will be 1.56 V. Three collector resistors have been included and they all have a certain voltage dropped across them. In the given example, R2 (220 fi) has | 0.88 V and R3 (180 ft) has 0.72 V. As said earlier, R4 has 1.56 V dropped across it. This makes calculating the voltages at the 1C inputs easy. The inverting inputs are all at the same potential (or voltage). The voltage at the TUT's collector will be 9 V - 3.16 V = 5.84 V (the 3.16 V is the sum of the voltages across the resistors that feed the non-inverting inputs and the 9 V is the supply voltage). The reference voltage at the inverting input is 8.02 V which is determined by R5, R6 and R11, R12. In the earlier stated example, therefore, IC3's output will be low along with IC2's. Only ICI's output will be high. This is shown by this simple calculation: 9 V (supply) - 0.88 V (voltage at pin 3) = 8.12 V. 8.12 V is higher than the 8.02 V reference. If S3 is in the NPN position a B will appear on the display. If the output of IC1 were also to go low, the display would then be C. This would be correct as the voltage drop across the resistors would have risen as well as the current through them. The base current in this circuit being always the same, the higher collector current could only be due to a higher current gain. If, on the other hand, the outputs of IC1 and IC2 were high, only segment d would not light and so an 'A' would appear on the display. Segments a, e and f are always on because they're used in all of the various letters that are displayed. All of the above is on the presumption that the transistor is not faulty, for if it is, then an 'F' will appear. This occurs only when all the 1C outputs are high - when the reference voltage is higher than the collector voltage of the TUT. The display control (the circuit consisting of T1, T2 and T3 along with resistors R15 . . . R19, R24 . . . R26 and diodes D3 . . . D5) works quite simply. If the outputs of IC2 and IC3 are low, segments d, b, and c of the display are lit. The common anode of the display is, of course, always connected to the +9 V 124.R25. supply. IC1 controls the three transistors. If ICI's output is high, only T2 will conduct so that segment g is connected to ground. Conversely, if ICI's output is low then only T1 and T3 will conduct with the result that segments b, c, and g are connected to +9 V and these segments go out. A similar situation occurs when S3 is changed to the PNP position. The outputs of IC4, IC5 and IC6 are then connected to the display instead of IC1, IC2 and IC3. Construction In figure 3, both sides of the printed circuit are shown. To make construction as easy as possible, the display and switches have been included on the board. Even the transformer can fit on it if a board mounting type can be found, otherwise a little tinkering may be necessary. The connections between the supply and the circuit itself have been deliberately omitted. This makes it possible to cut off the supply portion of the printed circuit board and mount it above (or anywhere else for that matter) the main board. The entire unit can be mounted in a Verocase type 502 (75 - 3960 E) or similar. Figure 4 shows how this is done. Switch S3 is a 4 pole 2 way and, if desired, can be attached to the printed circuit board. For this, a hole may be drilled into the board and the tumbler can be inserted without any difficulty. If this is done it should be possible to make a slot in the case's lid so that S3 may be operated. The switch's connec- tions must be wired to the circuit board. On the printed circuit the various connections have been marked in the same way as the switch in the parts list. Pushbuttons used to interrupt the base drive of the TUT should be of the digitast type. Below S2 are the connec- tions for the PNP and below SI those for the NPN. The pin assignment code is C = collector, B = base and E = emitter. The 1C op-amps are the popular (and inexpensive) 741 type. There is however one minor disadvantage to this, six IC's are necessary. By avoiding the use of 1C sockets (not needed in this case) costs can be kept to a minimum. It is however advisable to use a socket for the display. The transistors to be tested should, ideally, be connected to the board by means of clip leads. If this proves impossible, a transistor socket may be used, but this has shown disadvantages in practice. K timbugll The initial design requirements for this 'bug' were that it be able to 'see' objects in its path and take avoiding action. It should also be as inexpensive and as simple as possible. As the circuit was designed around the ever popular 555 timer 1C, and the circuit shown here is the Mk II version, it is not difficult to realise how it came to be christened Timbug II. By using just four timer ICs and a handful of other components a quite 'intelligent' and lifelike animal can be made. Rather like a bat, the bug transmits a 'radar beam' of ultrasonic sound which will be reflected by any obstacle in its path. Once this reflected signal has been detected the bug will alter its course. It does this simply by reversing a short distance while turning to the left or right at the same time. If the path in front of the bug is now clear it will move straight ahead thereby avoiding any obstacle. If, however, another object is detected the bug will continue to 'wriggle its way out' by turning to the left and right alternately. Circuit diagram The complete circuit diagram of the bug is shown in figure 1 . An oscillator with a frequency of approximately 40 kHz is formed by the circuit around I Cl . The output of this oscillator is fed directly to an ultrasonic transducer to provide the 'radar beam' mentioned earlier. Preset potentiometer PI is used to adjust the oscillator frequency to suit the particular transducers used. Any reflected ultrasonic signal is picked up by the circuit around IC2. The internal comparators of this 1C are biased so that any significant change at elektor june 1980 — 6-19 the input (pin 2) is detected and, as the 1C functions as a window discriminator, a large voltage swing is produced at both outputs. One of the outputs is con- nected to an LED (D1) which will appear to be 'on' when a signal is being received — it will of course be turned on and off at the same rate as the input frequency. The 'sensibility' of the detector circuit is determined by the setting of P2. Resistor R7 and capacitor C4 provide a simple filter for the second output of the detector circuit. As soon as a reflected signal is detected this output will go low thereby discharging C4 and turning off transistor T1 which, in turn, will turn on transistor T2 to activate relay Rel . This relay has two sets of changeover contacts which are wired so that when operated they will reverse the voltage polarity to the drive motors. Rel will remain activated until the voltage on C4 reaches a level high enough to turn on T1 and so turn off T2. Due to the time constant of R7/C4, the relay will remain activated for about two seconds after the detected signal has gone, that is when there is no longer an obstacle in the path of the bug. The circuit configuration of IC3 is similar to that of the transmitter (IC1) but, as the values of the components are much larger, the frequency of oscillation is much lower. With the values shown, the period of the oscil- lator is approximately 9.8 seconds. The output of this oscillator is fed to yet another timer 1C (IC4) which is connected simply as an inverter. This means that the outputs of IC3 and IC4 provide two low frequency signals which are 180° out of phase with each other. These two outputs control the 'left' and 'right' relays (Re2 and Re3 respectively) each of whose normally closed set of contacts are wired in series with one of the drive motors. Diodes D5 2 and D6 are included so that there can be no feedback between the two outputs which could cause both relays to be activated at the same time. As it is, the relays can only be activated when transistor T4 is conducting which in turn is controlled by T3 and T2. The end result of all this is that, when a reflected ultrasonic signal is re- ceived by IC2, relay Rel is activated and at the same time either Re2 or Re3 is also activated. Therefore, the bug will reverse and turn in the direction dic- tated by the state of the low frequency oscillator IC3. If, of course, IC3 changes state while T2 is still conducting, the direction of turn will also change — making for more interesting and life- like results. Construction and setting up The circuit for Timbug II can be in- corporated into virtually any model which has two drive motors - one for each wheel - and a single castor type front (or rear) wheel. As direction is controlled by the two drive motors, the circuit may even be built into a tank. As can be seen from figure 2, the contacts of relay Rel are wired so that when the relay is activated the voltage polarity to the drive motors is reversed. The normally closed contacts of relays Re2 and Re3 are wired in series with the motors. Thus, when none of the relays are activated both motors will run in the forward direction. When Rel is activated the motors will reverse but as only one motor will run — Re2 or Re3 will also be activated — the bug will turn away from the obstacle. The setting up procedure for the unit could hardly be simpler and requires no special test equipment whatsoever - not even to adjust the transmitter frequency! Initially P2 is adjusted so that LED D1 turns ON and then care- fully readjusted so that the LED turns OFF but is close to the point of coming ON. With an object placed a few centi- meters in front of the bug's 'eyes', PI is adjusted until LED D1 lights. P2 may require some readjustment but normally the object can be moved further away and PI adjusted until the required 'seeing distance' is obtained. M coming soon summer circuits The next Elektor is the July/August 'Summer Circuits 80' issue. It contains over 100 projects and design ideas. This means that our design staff has to dream up as many new circuits for one issue as would otherwise suffice for the whole year. Some are based on application notes, others on ideas sent in from readers, but all are interesting or excep- tional in one way or another. The editor demands that the circuits should be 'new', 'original', and/or 'different'. The head of design demands that they work, and the deputy editors for the various editions demand that the components should be available. From missile attack games to melody makers. From video pattern generators to wind detectors. Some are basic design ideas, others are completed circuits. Some come with printed circuit layouts too. All promise to be interesting! more Ilian MK) circuits in one issue ! 6-20 - elektor ju mnM cube... Having a somewhat weird sense of humour, a certain member of the Elektor design team (who shall be nameless) has come up with this rather novel circuit. When friends come round for drinks and a chat it is no longer necessary to stare at each other in total silence while one of you thinks of something to say. With the musical cube sitting on the coffee table you have a ready-made conversation piece. 'What's that?' they say. 'What's what? you say. That thing there!' they say. That's my pet musical cube' you say, 'he sings!'. Say no more, the evening is off to a flying start. You then go on to explain that you are the only person able to control its rather nasty temper. To prove it you talk quietly to the cube and it will 'sing' its reply. You then pick the cube up and move it to a different place in total silence. The guest is then invited to move the cube back in a similar manner. The cube, of course, not being used to the new scent, will complain bitterly. How is it done? Easy, four of the five sides (not the base - even a cube has to have something to sit on!.) are touched in a certain sequence. As the owner/trainer of the cube knows the sequence there is no problem. As each side is touched the cube will produce a tone and when all four sides have been touched in the correct order the cube will remain silent. If, however, one of the sides is touched out of sequence the cube will produce a horrible noise to show its disapproval. The odds against a newcomer hitting upon the correct sequence at the first attempt are, of course, very high. Circuit The circuit diagram of the musical cube is shown in figure 1. It may seem a bit complex at first sight but its operation is fairly straightforward. It works on the 'vicious circle' principle. Initially everything is reset. The outputs of N1, N3, N5 and N7 are all low, while the outputs of their counterparts (N2, N4, N6 and N8) are all high. As IC1 is reset each of its outputs is low — note output '0' is not used. Because all inputs to the EX-NOR gates (N10 . . . N13) are the same (low initially) all of their outputs will be high. This in turn means that the output on N14 will be low. The Q output of IC3a is low so that the oscillator formed by N19 will be inhibited. The output of N19 will of course be high so that N20 is enabled. Now for the juicy bits . . . Each of the points marked A . . . D are connected to four of the sides of the cube (we count the top of the cube as being one side). The cube can be made from single or double sided copper clad board suitably etched to provide a touch sensor. Each of the connected sides has to be touched in the sequence A, B, C, D. It is left to the constructor to decide which of the sides will corre- spond to A etc. When the first side is touched the flipflop formed by N1/N2 will change state. The output of N2 will go low providing one of the inputs of N9 with a negative going pulse via C4. The output of N16 will therefore go low for the same duration. This output has a dual function. Firstly, it triggers IC4a which, via N17, removes the reset from the oscillator formed by IC2. Secondly, via N20, it provides a clock pulse for IC1. This means that the first output of IC1 will go high turning on transistor T1 so that IC2 oscillates at the frequency determined by the values of R13 and C7. Both in- puts of N10 will now be high so its output is still high and the output of N14 will still be low. The network R10/C5 takes care of propagation delay problems and ensures that IC3a is not triggered at this time. The 555 oscillator (IC2) will produce a tone via the loudspeaker for as long as the 0 output of IC4a remains low - just less than half a second with the values shown. The same will happen when side B is now touched with the addition that the first flipflop is reset by the output of N4. And so on along the line until side 0 is touched. This being the last side in the sequence it is assumed that having got this far everything is OK. The output of N15 will now go low and C6 will start to discharge. When C6 is sufficiently discharged the output of N18 will go high and trigger IC4b. This slight delay is incorporated so that the system will not reset before the last tone is heard. Both outputs of IC4b are used to reset the entire works. The 0 output resets all the flip-flops, while the Q output is used to reset the counter (IC1). This reset condition lasts for around 10 seconds — more than sufficient time for the owner/trainer to move the cube. So far so good. We have dealt with 1 correct operation, but what happens when one of the sides is touched out of 1 sequence? The counter will still be clocked and a tone will be produced from the 555 oscillator — albeit very briefly. However, the inputs to two of the EX-NOR gates (it doesn't matter which two) will now be different. This means that their outputs will go low taking, in turn, the output of N14 high. As soon as C5 is sufficiently charged (a few /is) IC3a will be triggered. The 0 output of this monostable performs the same function as the 0 output of IC4a and that is to remove the reset from the 555 oscillator via N17. The Q output however removes the inhibit from the oscillator formed by N19 which means that IC1 is now clocked rapidly. Transistors T1 . . . T4 are switched on in turn so that IC2 produces rather a horrendous noise. The clock rate, and therefore the noise, can be adjusted by means of the preset, PI. When the delay time of IC3a runs out, IC3b is triggered which in turn triggers off IC4b via N18 to reset the whole system once again. The circuit can of course be extended so that all sides have to be touched or indeed some of the sides touched more than once. However, we leave that to the discretion of the constructor — enough is enough!! The inside story for Owner/Trainers. It will already be apparent that the secret of successful fireside training of the musical cube is knowing which sides are to be touched and in which order. Bearing in mind that, besides the four sides, the top is also a 'side', this making five sides in all (the side the cube resides on is, of course, the er . . bottom). It is up to the constructor/owner/trainer to decide the sequence of side touching but some discrete visual aids might prevent the O/T from getting side- tracked. Patterns etched in the copper sides will be the answer (and be an added aside to the conversation). As long as the side connections coincide with the circuit inside, the cube should stay on your side. Owners must be warned — we know of one cube that commited suicide by going up in a cube of flame, possibly due to ill treatment. M 6-22 - elektor june 1980 Several things have to be taken care of first. The IF signal, which is produced by the front-end of the receiver, must be 'purified' or 'cleansed' of as much unwanted noise as possible so that only the pure IF signal is left. This is done with the aid of a filter circuit. The cir- cuit here uses crystals; which is known to be one of the best methods to achieve high selectivity. The filter circuit is designed for an IF of 9 MHz. An advantage is that use may be made of popular 27 MHz '3rd octave' crystals. These are easily obtainable and what's more, at a reasonable price. The pure 9 MHz signal could be ampli- fied and then demodulated, but it is better to have an intermediary stage and derive a second IF with a much lower frequency (130 kHz) from the 9 MHz IF. In this way a 'double' super heterodyne circuit is achieved with two narrow band IF strip an IF amplifier/demodulator for amateur receivers An amateur receiver for the two metre (144 MHz) band or for the citizens-band (CB; 27 MHz) is quite different in construction to that used by the broadcasting industry. It is not the quality of the reproduction that determines whether a particular receiver is good or bad, but its selectivity, sensitivity, etc. In other words, how universally applicable is it? This article describes part of a receiver and how a low frequency signal may be obtained from a narrow-band AM or FM IF signal. 1 important advantages. First, better suppression of the various spurious signals is obtained. A second mixer — provided they occur at a frequency at which the filter operates — will partially remove them. A relatively narrow bandwidth is obtained at low frequencies using LC filters. Another advantage of the 'double-super' is that the 'lion's share’ of the signal can be amplified at a relatively low frequency. This makes amplifier design and construction much simpler and less critical, because it is less susceptible to oscillation and inter- ference. Would it be possible to derive an IF of 130 kHz right away? No, because the image frequency would be very close to that of the input signal required and would therefore be difficult to filter away. Block diagram The operation of the circuit is put into a nutshell by the block diagram in fig. 1. The 9 MHz signal is filtered in a network employing crystals and is then amplified slightly in a mixing circuit (MIX). The 9 MHz signal is combined with an oscillator signal of 8.87 MHz. This produces a difference signal of 130 kHz. The signal is then amplified and fed to both an AM and an FM detector from which the actual low frequency signals are derived. When the 130 kHz signal is amplified, a voltage is derived that is proportional to the input signal and used to drive an 'S' or signal strength meter. Although the 'double super' is usually considered to be a luxury, costs have been kept to a minimum by using inexpensive 27 MHz crystals and by reducing the number of active com- ponents to a couple of uncomplicated IC's and two transistors. «R° 0*OH if I l +\ FM K) 8.87 MHz © S L_J Figure 1. Block diagram of the Narrow Band IF receiver. It is a 'double-super heterodyne' design. The IF signal of 9 MHz is mixed with an oscillator signal of 8.87 MHz to create a difference signal of 130 kHz. It can accept AM and FM modulated inputs. t The 9 MHz Filter Figure 2 shows the crystal filter for the IF signal from the front-end. It is a totally passive circuit, which only means that it has no amplification of its own. As has been shown before, it is better to filter an IF signal thoroughly first and then amplify it before using the 'old- fashioned' method of an amplification stage followed by a filtering stage followed by an amplification stage and so on. The main reason for this is that if an RF signal is amplified too early all the unwanted signals may overload the amplifier stage. It is advisable to filter them first, even though this may weaken the desirable part of the signal. After all, it can always be amplified later on. The input and output of the crystal filter are both adapted to the standard high-frequency impedance of 50 ohms. This is achieved with the aid of two very simple home-made HF transformers. Detailsare given alongside the schematic. The input transformer is not critical. Its purpose is to change the impedance to that required by the following trans- former which is selective. This trans- former is really a 10.7 MHzFM IF filter, but it has been converted for the frequency desired here. This is done by means of capacitor Cl. It is in parallel with the capacitor built into the trans- former. This increases the total capacitance which in turn reduces the resonant frequency. Because of the need to adapt the transformer, no other type of Trl, other than that indicated, may be used. The lion's share of the filtering is done by crystals XI . . . X4, all of which are '3rd harmonic' types, meaning that they are supposed to resonate at the third harmonic of their rated frequency. This is 9 MHz. Between XI and X2 and between X3 and X4 a network has been inserted to prevent undesirable im- pedance jumps. L3 and L4 are ordinary Figure 3. These curves show the effect of the crystal filter and the difference C2 and C8 make. figure 3b shows filter operation with C2 = 10 and C8 = 5p6; finally, for figure 3c miniature coils with a value of lO/tH. Tr2 has been converted from a 10.7 MHz transformer like Trl. Here C9 is in parallel with the built-in capacitor. Do capacitors C2 and C8, which are in parallel with XI and X4 respectively, affect the incidence of the slope? They can be left out if necessary. Ideally speaking, they should be replaced by trimmer capacitors with a value between 2 and 22 p. Then the filtering may be trimmed until the slope is as steep as possible. Unfortunately, quite a lot of complicated and expensive equipment is required to optimally set such a trimmer. So the trimmer will not be optimally set, but it comes quite close. Figure 3 shows that this doesn't present any problems because the filter continues to work well, regardless of the slope. Even if the worst comes to the worst (figure 3a) C2 and C8 are left out altogether, attenu- ation will still be at least 50 dB. An improvement for a start would be to give capacitors C2 and C8 set values (see figure 3b). The slope (a function of fre- quency vs. U 0 ) will then be about 3. Figure 3c shows how the crystal filter works at its best, when C2 and C8 are replaced by optimally set trimmers. From 9 MHz to 130 kHz As can be seen, the circuit in figure 4 bears a close resemblance to the block diagram. It amplifies the 9 MHz signal, is amplified and mixed with the 8.87 MHz oscillator signal to produce a difference signal of 130 kHz. This is filtered and then amplified. In the mixing process a signal is derived to drive the S meter (to indicate relative strength of the aerial signal). Further- more, the actual AM detection also occurs in this part of the circuit. The circuit has been constructed around a single 1C; the TCA 440. This chip made it possible to design an inexpens- 1C. These are the inputs of an amplifier ive, and simple, single 1C mediumwave stage. The amount of amplification is receiver. determined by the voltage at pin 3. By means of a home-made transformer. Later it will become apparent where (coil data given with the schematic) the that comes from. The amplified 9 MHz 9 MHz signal reaches pins 1 and 2 of the signal arrives at a multiplier used as a Figure 5. The one transistor amplifier/filter for the AM output. mixer. The other input signal of the mixer originates from an oscillator which generates a signal of 8.87 MHz. This is done with the aid of crystal X5. This may be an 8.87 MHz crystal but a 3rd harmonic crystal of 26.600 MHz may also be used, as was done for the crystals in figure 2. The signal of one of the mixer's outputs is used to derive the second IF signal of 130 kHz. This is done with the aid of transformer Tr3. Like the other two transformers in figure 2, it will be a 'converted' transformer. This time it's a 455 kHz IF transformer of which the resonant frequency has been reduced to 130 kHz by adding C15. The signal across the resonant circuit (the secondary coil is not used) is fed to a second amplifier section in the TCA 440. This really consists of three amplifiers in parallel, thereby consider- ably increasing the signal strength. The signal must not be limited, especially where AM detection is concerned, because the low frequency information is in the amplitude. For this reason an automatic amplifier gain control has been incorporated. This works as follows: the output signal of the second amplifier section is rectified by D1 and C18; this produces a direct voltage which has three purposes. They are: - To control amplification in the first 9 MHz amplifier stage. — To control amplification in the second amplifier stage. - To provide a signal for the S meter. The 130 kHz signal must now be fed to the FM detector. Before this however, it will have to be filtered once more using the earlier mentioned 455 kHz trans- ' former Tr4. Potentiometer PI is re- quired to adjust the amplitude of the signal to a level which the FM detector can handle. Since the 130 kHz signal is being rectified, (for the automatic gain control) we already have a detected AM signal at our disposal. This can be derived from Dl's cathode; as given in the schematic. Attention should be paid to the fact that D1 is a germanium diode, (for instance an AA 119 type) not a silicon diode. The detected AM signal is amplified in the single transistor amplifier stage shown in figure 5. Any remaining 130 kHz signal is filtered out using the simple RC network R7/C21. Poten- tiometer P2 controls the level of the low frequency output signal. FM demodulator One of the best ways to demodulate an FM signal is to use a phase lock loop (PLL). What it really comes to is having a voltage controlled oscillator (VCO) make an accurate copy of the IF signal. A phase detector then checks whether the VCO is doing it properly and sends a control voltage to the VCO as soon as any change is detected in its frequency. This is the demodulated FM signal. The adapted 1C in figure 6's FM detector also contains a PLL. By means of the IC's pin 2, the phase detector is fed with the 130 kHz signal. By way of the other input (Pin 5) another signal reaches a phase detector after originating from the VCO. The phase detector makes sure (by means of an amplifier) that both its input signals have the same phase and frequency, and its output is at the same time, the low frequency signal desired. C28, R17 and C30 form the loop filter. Its dimensions are deter- mined by the characteristics of the PLL. Although the 9 MHz crystal filter has a bandwidth of approximately 1 0 kHz, a frequency deviation of 4.5 kHz can be processed. The PLL operates well at a deviation of up to 6 kHz, in other words, for all the signals which pass through the crystal filter. The low frequency signal is amplified, like the detected AM signal, in a single transistor stage. With the aid of R18 and C31 any spurious, left over 130 kHz signal is suppressed. The output level may be preset with P4. The FM demodulator operates optimally at an input voltage of approximately 200 mV. That is why potentiometer PI has been introduced into the circuit. It presets the optimal level of the signal for the demodulator. When building the FM demodulator, a high quality capacitor must be chosen for C26. This is one of the components of the VCO which determines its fre- quency. The only trimming point of the FM demodulator is the preset potentiometer P3. Trimming is best accomplished by setting PI (figure 4) at a maximum, so that the input signal of the PLL is as large as possible. Now it should be poss- ible to adjust P3 so that an FM signal is demodulated (which should, of course be available!). Usually, demodulation will be possible over a fairly large part of the range of P3. Set P3 somewhere in the middle of its range, and increase PI slightly so that the signal level at the detector's output is reduced. P3's range (in which FM demodulation occurs) will now be smaller; then set P3 again some- where in the middle of that range. This may be repeated until no noticeable change occurs when P3 is varied. At this point P3 is optimally tuned. M 6-26 - elektor june 1 980 First, the joysticks. Readers' reactions and data were highly varied, to say the least. Unfortunately, there was one misprint in the 'test program' given (Table 17 in the November issue): at address 097A, the instruction should read 0E427B instead of 0E4278. Until this is corrected, the text on the screen will be nonsense. However, a sufficient number of readers discovered this (or worked out their own alternative program), so that we received a large amount of 'joystick data'. And widely varied it is, too . . . on TV games In earlier articles ('I played TV games', Elektor October and November 1979) we asked for our readers experiences with the joysticks - and promised to come back on the subject when we had enough data. We received several interesting reactions to this request, often including other suggestions and comments. By now, we feel that it is high time to bring all other interested readers up to date! promises, promises . more The minimum values found vary between 05 and 28; the maxima were anywhere between 25 and FA. The mid- range could be anything between 15 and 7E. Help! What do you do when one person's minimum is more than someone elses maximum? The only result that was consistent (not surpris- ingly) was the value obtained without any joystick connected: 0D in all cases. Against all odds, we think we have a solution that should satisfy everyone. It is based on two conclusions from the results given above: • If joysticks are to be used, (auto- matic) calibration is essential. • Wherever possible, the joysticks are best used as four-way switches (signalling 'up', 'down', 'left' or 'right'). Trying to obtain data that corresponds to all possible positions is virtually doomed to failure, insofar as it is to be compatible with other computers. For strictly 'personal' programs it is no problem, of course. Before describing our solution, there is one other point that must be made clear. As several readers have pointed out, our 'definition' of the joystick connections is not ideal. Furthermore, it does not correspond to that used in the program given as File 1 on the ESS003 record, nor to that used in a commercial TV games computer' based on the same CPU and PVI. For these reasons, we have decided to specify the following 'standards' (see figure 1 ) : • Left joystick = address 1 FCC; right = 1FCD. more on TV games • Horizontal movement = flag off; vertical = flag on. • Low data value = left or up; high value = right or down. Obviously, modifying an existing TV games computer to conform with these 'standards' will require some re- soldering. Not much, however, and Table 17 in the November issue (with the correction given above) provides an adequate test procedure. Now, we come to our 'solution'. An automatic calibration routine and 'joystick scan' that can be incorporated in any program that uses joysticks. The complete routine is given in Table 1. As given here, the actual initial calibration routine starts at address 0F94. A program can therefore be started in two ways: 1F0F94 (BCTA.UN) or 3F0F94 (BSTA.UN). In the latter case, the calibration routine is concluded at address 0FAF with 16, C0, C0, as shown; in the former, a branch to any desired address can be inserted as 1 Exxxx, at the same address. In either case, the calibration routine is run once, at the start of the program. The joysticks are assumed to be in their mid positions, and switching points relative to these positions are calculated and stored from address 0FC0 on. In passing, it may be noted that the ‘wait for VRLE' subroutine (starting at address 0F80) may well prove useful at various points in the main program. Having calibrated the joysticks, control returns to the main program. At any point in this program, a joystick scan can be requested by branching to the subroutine that starts at address 0FC8. For correct operation, this 'branch to subroutine' must occur at frame end - after a 'wait for VRLE' loop, for instance. Depending on the program, several variations on the routine given may prove useful: • at address 0FC8, the upper register bank can be selected (to protect existing data in R1 . . . R3) by modifying the instruction to 7712. • from address 0FF8 on, additions can be incorporated: either resetting the register bank (7510 = CPSL, RS) or storing the data found: R2 contains the left-hand joystick data, R3 that of the right-hand joystick. • the instruction at address 0FD5 depends on the point at which the flag is set or reset. Obviously, to scan both horizontal and vertical joystick positions the flag must be set and reset on alternate frames. The routine given assumes that the flag is modified after the joystick scan routine has been run. In some cases, however, it may be preferable to modify the flag first; the instruction at address 0FD5 must then become 1802. • The complete routine can be situated at any other point in memory, if required. Since most of the instructions use relative addressing, they can remain unchanged. The only exceptions are the absolute-indexed instructions at ad- more on TV gar elektc 1980 -6-27 0F80 0881 LODR.R0,lnd 0F82 r»0C1FCB LODA.R0 0F85 F440 TMI.R0 0F87 1—9379 BCFR 0F89 17 RETC.UN SUBROUTINE: WAIT FOR VRLE 0F8A Cl STRZ.R1 0F8B 51 RRR.R1 0F8C 51 RRR, R1 0F8D 453F ANDI.R1 0F8F A1 SUBZ.R1 0F90 C2 STRZ.R2 0F91 81 AODZ.R1 0F92 81 ADDZ.R1 0F93 1 7 RETC.UN SUBROUTINE: CALCULATE LIMITS CALIBRATION ROUTINE 0F94 0F96 0F98 0F9A 0F9C 0F9E 0FA0 0FA2 0FA4 0FA6 0FA7 0FA9 0FAB 0FAO 0FAF 0FB0 0FB2 0FB4 0FB6 0FB9 0FBC 0FBE 7660 7518 ♦3B66 3B66 08B0 0BB1 3B68 C81D 3B61 C818 CA1 5 B440 16 C0.C0 7440 0504 r*0D4FC0 CD6FC4 1—5978 — 1 B58 PPSU.II/Flag CPSL.RS/WC BSTR.UN BSTR.UN LODR.R0.lnd L0DR.R3.lnd BSTR.UN STRR.R0 STRR.R2 LODZ.R3 BSTR.UN STRR.R0 STRR.R2 TPSU.flag RETC 2xN0P CPSU.flag L0DI.R1 L0DA.I-R1 STRA.I/R1 BRNR.R1 BCTR.UN (flag on = vertical) clear VRLE. 1 FCC = left 1FCD = right calculate and store lower and upper limits left calculate and store limits right set. Note: absolute (flag off ■ horizontal) 0FC0 0FC4 low high 00 00 Taft"" 0FC8 7702 0FCA 20 0FCB Cl 0FCC C2 0FCD 0C1FCC 0FD0 0F1FCD 0FD3 B440 0FD5 p9802 0FD7 0504 0FD9 l*ED2FBF 0FDC p9A02 0FDE A601 0FE0 1*ED2FBF 0FE3 p 9902 0FE5 8601 0FE7 1*03 0FE8 0700 0FE A E02FBF 0FED r 9A02 0FEF A701 0FF1 l*ED2FBF 0FF4 p 9902 0FF6 8701 0FF8 1*17 0FF9 C0 SCAN PPSL.COM EORZ.R0 STRZ.R1 STRZ.R2 LODA.R0 L0DA.R3 TPSU.flag BCFR L0DI.R1 C0MA.I+R1 8CFR SUBI.R2 C0MA.I+R1 BCFR ADDI.R2 L0DZ.R3 L0DI.R3 COMA.I+R1 BCFR SUBI.R3 C0MA.I+R1 BCFR A0DI.R3 RETC.UN 0FFF C0 (or 7712= PPSL.RS/COM) clear R1, R2 and load joystick data 1 preset for R1 . if > vertical. Note: sometimes ' 1802= BCTR is required room for 7510 = CPSL.RS. and/or CExxxx. CFxxxx for data transfer Table 1. Jo dresses 0FB6, 0FB9, 0FD9, 0FEO, 0FEA and 0FF1. These all depend on the position of the data, stored here from address 0FC0 on. To illustrate how this routine works, a very simple demonstration program is given in Table 2. Once both programs (Tables 1 and 2) have been loaded, the main program is started at 0900. The first two 'objects', corresponding to the displays 'PC' and '=' respectively, will jump to the centre of the screen ('0900' remains at the top right of the screen). The positions of these two objects can now be modified by means of the left- hand and right-hand joysticks, respect- ively. Hopefully, the suggestions given here should be sufficient for those readers who are developing their own programs. As far as all others are concerned, the only thing that is important is that all programs that will be supplied as 'Elektor Software' in future should run on their computer — provided the joysticks are wired as outlined above. Interrupt! It is now time to acknowledge an interrupt request ... A very welcome one, at that. As mentioned earlier, we received several reactions from readers. One of the subjects that was often mentioned was the 'interrupt' facility. One reader in particular, Mr. Norman, sent us a long letter in which he offers the following tips: 'When using interrupts, you demonstrate the method of looping the main program and leaving everything to the interrupt routine(s). This is a little 'wasteful' in processing time and I find it preferable to 'share the workload' — object movement and collision detec- tion, say, to the interrupt routines and score updates, off-screen travel, key scan etc. to the main program. To run both main and interrupts, it is essential that registers and condition codes do not ’clash’ and you do not describe techniques in any great detail. 'If the interrupt routine uses, say, the upper register bank whilst the main program uses the lower register bank, then a typical interrupt routine may commence as follows: 7710 PPSL.RS CC08FE STRA.R0 it cpci CC08FF STRA.R0 and end : 0C08FF LODA.R0 0C08FE LODA.R0 7510 CPSL.RS 37 RETE.UN 'It is vital that PSL is preserved, other- wise the main program may make decisions on a condition code set by the interrupt program!' Very true. However, as another reader has pointed out, the above routine is not quite correct: after restoring the PSL data, R0 is re-loaded - altering the Condition Code! 6-28 - ale 0900 0903 0905 0908 090B 090D 090E 0910 0913 0915 0916 0918 091 B 091 D 0920 0923 0925 0926 0928 092B 0920 092E 0930 0933 0935 3F0F94 -* 7440 3F0F82 3F0FC8 0828 82 C825 CC1 F0A 0821 83 C81E CC1F1A 7640 3F0F82 3F0FCA 0812 82 C80F CC1F0C 080 B 83 C808 CC1F1C 1B4E 44 55 77 BSTA.UN CPSU.flag BSTA.UN BSTA.UN LODR.R0 ADDZ.R2 STRR.R0 STRA.R0 LODR.R0 ADDZ.R3 STRR.R0 STRA.R0 PPSU.flag BSTA.UN BSTA.UN LODR.R0 AD0Z.R2 STRR.R0 STRA.R0 LODR.R0 ADDZ.R3 STRR.R0 STRA.R0 BCTR.UN 71 wait for VRLE vert. pos. obj. 2 a the new 'joystick st A routine that seems to meet all require- ments is the following: Start the interrupt routine with: 7710 PPSL, RS CC09F1 STRA.R0 13 SPSL CC09F3 STRA.R0 24 EF EORI.R0 CC09F5 STRA.R0 and end, at 09F0 say, with: 09F0 04XX LODI.R0 09F2 77XX PPSL 09F4 75XX CPSL (including RS!) 09F6 37 RETE.UN Obviously, the three absolute addresses in the 'save' routine will depend on the position of the 'restore' scratch bytes. More on the PVI. Another topic that has elicited several comments is the PVI. Two points, in particular, have been raised quite frequently. • As can be derived from the documen- tation supplied with the p.c. board, several addresses in the PVI are available as 'scratch'. So far, we have never actually used them ourselves, but several readers have pointed out that they can indeed be used in the same way as the 'normal' RAM. • Also shown in the documentation is the fact that the 'I/O and control' field is actually repeated four times: 1 FC0 ... 1 FCD, 1 FD0 ... 1 FDD, 1 FE0 ... 1 FED and 1FF0...1FFD. This proves of particular interest for the data stored at addresses 1FCA and 1FCB (collisions, VRLE, etc.). Both of these bytes are cleared when read, which can be a nuisance. However, one reader has pointed out that reading 1FCA. say, only clears this one byte — it does not clear 1FDA, 1FEA or 1FFA! This means that a different address can be used for retrieving data for each object, as required, without affecting the information required later on for one of the other objects. Useful! Questions and errors. We are often asked why some programs store 04 at address 1 E80. This was news to us, but since then we have found the reason. Apparently, a commercial version of the TV games computer exists, with the same CPU and PVI. However, there is a difference: when 04 is stored in 1E80, the sound effects are reproduced through the TV receiver! We don't know how this works — it certainly doesn't apply to our version - but maybe someone can enlighten us? Another regular query concerns R58. In the circuit, this resistor is shown con- nected to the video output - and rightly so. However, observant readers have found that it is connected to positive supply on the p.c. board. When this mistake was discovered, we im- mediately tested several of our prototypes to see what the effect was. To our surprise and relief, it doesn't make a scrap of difference! Which is why we didn't mention it earlier. A few readers have run into a minor 'problem' concerning the 'vertical offset' for the duplicates. It was perhaps not made sufficiently clear that a vertical offset 'FF' is used as 'minus one': the gap between duplicates becomes zero. To delete the duplicates entirely, an offset 'FE' must be stored. Finally, it was stated in the original article that only file numbers up to 9 are permissible. This is an unneccessary limitation: any single-digit number (1 ... F) can be used. Interrupt! Mr. Norman again: 'In Elektor 48, page 28, figure 2a you show IC6 connections incorrectly. The A7 lead should be connected to pin 13 and A6 should connect to pin 14. Furthermore, the labels for pins 13 and 15 are trans- posed: pin 15 is the '2c' input and vice A useful tip Have you ever tried to develop a program? And discovered, after the first trial run, that you had omitted a few essential steps somewhere? Welcome to the club! Inserting the necessary steps can be accomplished by replacing three of the original instruction bytes by an uncon- ditional branch to an empty memory space, restoring the delected instruc- tion(s) there and adding the missing steps at that point before branching back. This system works, but it is anything but elegant. Those readers who have 'decoded' the space shoot-out program on the second ESS record for TV gar elektorjune 1980 -6-29 the TV games computer will know what the end result looks like: a mess. The only alternative is to move up the remainder of the program to make room. Unfortunately, this may well involve moving up several handwritten pages of perfectly good program, by laboriously keying them in again at the new ad- dresses. This is a nuisance, to say the least. A so-called 'block transfer' routine is much easier — in effect, you make the computer do the bulk of the work. The basic principle is quite simple. Let's assume that one additional 'store absolute' instruction (3 bytes) is to be inserted at address 0A00. The remainder of the program, say from 0A00 to 0AFE, will have to be moved up three places in memory. This can be ac- complished as follows: 08C0 05FF LODI.R1 08C2 | — *■ 0D4A00 LODA.I-R1 08C5 CD6A03 STRA, I/R1 08C8 1 5978 BRNR.R1 08CA 1F0000 BCTA, UN When this program is started, at address 08C0, all instruction bytes are moved up three address positions - one at a time, starting at the 'top'. In practice the computer does the job so fast that the display on the screen hardly flickers. The only modifications that must then be entered by hand are all positions containing absolute address instructions that refer to the program section that has been moved, and any relative addresses that operate 'across the gap'. What of the future? More programs, in particular. We already have an updated version of the 'space shoot-out' that includes joystick cali- bration and a few more 'gimmicks', a 'Mastermind' program and an 'Amazone' game (man v, machine!). We're working on a random number generator for Bingo and a helicopter maze. In the near future, we hope to introduce a new ESS record — or maybe tape? — with these programs. We've also got stacks of other basic ideas, but developing programs takes time. Come on, readers, surely you've got some more ideas?! We're quite prepared to help you out if you've run into problems. The more programs, the merrier! On the hardware side, we have some ideas. Memory extension? So far, we haven't needed it — but we have an extension circuit ready and tested. If enough readers want it, we can design a p.c. board. A random numbers generator? No problem - a few ICswill do the job. Basically, as far as we're concerned, you name it and we can provide it. However, we don't intend to 'waste' valuable magazine pages on circuits that only appeal to one or two readers. For this reason, we would very much appreciate reactions from interested readers: if several readers ask for an extension, that gives us a good reason to take it into consideration. Over to you! M A little program Mr. M. Saliger sent us a small program for automatically scanning existing software. After some drastic shortening, the result is as shown here. The first address of the program (section) to be displayed is stored at address 08C0, after which this routine is started at address 08C2. The addresses and in- structions will now roll up the screen automatically; the display can be 'frozen' and re-started by holding the 'start' button down for a moment. If this key is held down continuously, the 'scroll up' occurs at half speed. The speed is further determined by the data at address 1F9C. When plotting long tables, it can be useful to modify the instruction at 08 F0 to 0604, 0608 or 060C. Note that the first few instructions after a series of data values may be misinter- preted. Return to monitor via the 'reset' key; don't operate the 'start' key in this mode, or the program from 1F80 on will be erased! 08C0 0000 08C2 7620 08C4 0502 08C6 r*0D48C0 08C9 CD68A4 08CC 1-5978 08CE 3F02CF 08D1 3F042B 08D4 0706 08D6 r*CF488A 08D9 I-5B78 08DB 3BF2 08DO 0E88A4 08E0 F608 08E2 | 180C 08E4 F6A0 2 scratch bytes for address PPSU.II LODI.R1 , LODA.I-R1 ( STRA.I/R1 l ,rans BRNR.R1 ) BSTA.UN scroll BSTA.UN I LODI.R3 I addre STRA.I-R3 MLIf BRNR.R3 lands BSTR,UN,lnd.(02CF)l LODA.Ind.l TMI.R2 BCTR TMI.R2 BCTR EORI.R2 TMI.R2 BCTR ADDI.R2 ANDI.R2 RRR.R2 RRR.R2 BSTA.UN -, 2- or 3-byte l instruction? /Result in R2as | 01 . 02 or 03 1 F80 1 F82 1F85 1F88 1 F8B 1 F8D 1 F90 1F93 1 F94 1F96 1F98 1F9B 1F9D 1 F9F 1FA0 1FA3 1FA5 1 FA6 1FA7 1FA9 1 FAB [ 8704 0D88A4 3F0354 3F039F FA73 3F020E rrrr cB 9A7A 7702 3F0O55 8704 l— 5B71 12 0D1E8B ADDI.R3 LODA.R1.lnd BSTA.UN BSTA.UN BDRR.R2 BSTA.UN LODA.R0 RRL.R0 BCFR PPSL.COM BSTA.UN ADDI.R3 BRNR.R3 SPSU LODA.R1 ANDI.R1 EORZ.R1 LPSU TPSU.flag BCTR BSTA.UN 1 . 2 or 3 databytes to display; wait for VRLE; display 6 lines •SPEED the monitor software should note that the latter contains data at the following addresses: 0006 . . . 0009 00 AD . . . 00BC 0122 . . .013D 0177 ...0180 027B ...02CE 02F5 . . .031C 0537 . . . 053 F The RAM scratch starts at 0800. The start • Initiate : 0023 • ’Reg’ : 03B0 • 'Mem' : 040C • 'BK' : 04A9 and 0594/0582 • -PC' : 050 E • Wcas' : 05E8 • ’Reas' : 0758 6-30 - elektor ji variable logic gale M. van Kerkwijk The variable logic gate, which was published inthejune 1979 issue, generated more interest with readers than expected. Unfortunately, the 1C required appeared to be difficult to obtain. This gave many of our imaginative readers food for thought. One of the designs consists of two inexpensive and readily available IC's and is presented here. For those readers who are not familiar with digital technology and thinking, a variable logic gate provides an excellent opportunity to 'get into' it. To make things easier, a truth table of all the logic functions is given in table 1. All the sym- bols representing the various logic func- tions are also included. The noughts and ones indicate the logic level. A '0' means 0 volts and a '1' means there is a voltage (for TTL it is +5 V). The truth tables indicate how the output (Q) behaves when various logic states are fed to the input (A) or inputs (A and B). The simplest logic gate is the buffer. The logic state applied to the gate's input also appears at its output. This can also be shown in (Boolean) algebraic form (see the second column in table 2); Q=A. The buffer's purpose is, as its name suggests, to increase the current driving ability of a given logic line. The inverter does more than the buffer. As well as buffering the input to the out- put, it also inverts the logic state of the input. A 'V at the input will produce a '0' at the output and vice-versa. The algebraic formula for this function is: Q = A, where the line over the 'A' indi- cates its inversion. The AND gate is a gate with at least two inputs. Output (Q) is a logic 'V only if both the inputs are also at a logic 'V. The algebraic equation for this function is: Q = A • B where the point must be read as 'and'. The NAND works almost exactly the same except that there is an inverter on the output. The truth tables show this clearly . The equation for this function is: Q = A • B. The OR gate does something quite dif- ferent. It produces a logic '1' on the out- put if input A or input B has a '1' fed to it. It also has a '1' on the output if both the inputs are '1'. Expressed in algebraic terms, this is: Q= A + B where '+' is to be read as 'or'. The OR gate also has an inverted type, the NOR gate. The truth tables clearly show the inverting o f the O R states. The formula here is: Q = A + B. Two gates are left: the EXOR and the EXNOR gates. The EXOR (exclusive OR) behaves in the same way as the OR gate with the exep- tion that if both inputs are logic '1', the output is not logic 'V but 'O'. To express this difference in algebraic terms the sign © is used. It then reads: Q = A ® B. The EXNOR gate is, as you might ex- pect, the inverse of the EXOR. This can be seen from the tru th tab les. The for- mula then reads: Q = A © B. It all sounds very impressive, but what is the point of these logic gates? you may well ask. Let us take a practical example in which a logic function is used. To cut a piece of metal an automatic cutting machine is used. It can of course be a rather sticky business if, while opera- ting the machine with one hand, you happen to forget to remove the other from under the blade. To prevent this sort of thing from happening, opera- tion may be made to be two-handed, in other words, two pushbuttons need to be depressed before cutting begins. Here an AND circuit with two inputs may be used. The inputs receive their informa- tion from the pushbuttons and the out- put operates the machine by means of a relay. Only when both buttons are de- pressed is there a 'V at each input, thus a '1' at the output. A relay clicks and the machine cuts the metal plate. A safety measure may be included for the sake of those dare devils who try to push the metal plate forward with their feet, thereby accidentally starting the machine. Then an AND gate with four inputs and four operation buttons needs to be used, so that the person in ques- tion has his hands and feet tied during el elite 1980 -6-31 AND i[3 i ” 0 ^ operation. Admittedly, in practice no use will be made of a real AND gate in such a case, but the four pushbuttons would be placed in series to the engine. Even then it is still an AND function. This is a simple yet useful way in which digital technology may be applied. And there are many other examples like it. The variable logic gate In figure 1 the layout of the gate is given. This circuit is capable of fulfil- that they form a single input. Input C serves as a second input. If one wishes to consult the truth table for the EXOR gate (table 1) while experimenting, then inputs A and B will need to be read as A/B and C respectively. Construction The logic variable gate is best built with TTL or with low power schottky TTL IC's. The circuit needs to be fed with a voltage of 5 V. A 4.5 V battery is there- fore not suitable here. The power sup- Figure 2. Power supply for the veriat Figure 3. With the aid of this logic probe the logic state at the output of the variable logic gate may be read directly. "O EX NOR A\t Input | output A I B O ling all the digital tasks hitherto men- tioned. As illustrated, the variable gate consists of three EXOR gates and a NAND gate. How the circuit may be programmed to carry out a particular function, is shown in table 2. Supposing we wish to turn the variable gate into an OR function. Input C will then be connected to the + of the supply (logic 'V) and input D to ground (logic '0'). This creates an OR gate with inputs A and B and an output Q. An EXOR function is obtained accor- ding to table 2 by connecting input D to the supply voltage (logic '1'). Inputs A and B are connected to each other, so ply drawn in figure 2 is however suita- ble. The logic levels which appear at the output Q can be 'seen' by means of a voltmeter. A more elegant solution is to read them with the use of an LED. Figure 3 shows how this may be done. Logic input probe Q needs to be con- nected to the Q output of the variable logic gate. If the LED lights, this means there is a logic 'V level at the output. Those of you who are interested in fin- ding out more about digital technology are advised to read digibook 1. This home study course includes an experi- mental circuit board, so that the theory may be put into practice immediately. M programmini Inverter AND NAND OR NOR EXOR EXNOR C 1 smoke detector 1 . When smoke is present, infrared light is id detected by the photo- The MEM 4963, recently introduced by General Instrument Microelectronics, is an 1C specifically designed for use in smoke detector circuits. It is an improved version of the older MEM 4962. Many professional smoke detection installations use an ionisation chamber and, since this device is radio active, an exclusive permit must first be obtained. In this article we will discuss, what is for us, a more familiar method - infrared light. The drawing in figure 1 illustrates how the presence of smoke can be detected by means of infrared light. An infrared LED and photo diode have been placed at an angle of 45 to each other. Smoke has to be present before the photo diode will detect infrared light. It is really that simple. However, an LED and a photo diode alone do not make for a reliable fire alarm. In figure 2 the complete circuit for a suitable alarm using the MEM 4963 is shown. The circuit can be used as it stands, or, together with any number of identical circuits, can create a larger fire alarm system. The circuits are then connected by only two wires (pin 8 of IC2 and supply common) as indicated in the diagram and will detect smoke both individually and collec- tively. Furthermore, each smoke detec- tor will test its own battery state at regular intervals. Four states The circuit in figure 2 makes a distinc- tion between four states and will react differently in every case. 1. The circuit detects smoke itself and sounds an alarm continuously. It also sends a signal to the other circuits connected to it. 2. If one of the other circuits detects smoke, the alarm will not sound continuously but in pulses during 30 ms for every 100 ms. 3. The circuit 'notices' that its battery is running out. The alarm then sounds 3 ms for every 40 seconds. 4. Standby state. Conditions 1 ... 4 have a decreasing priority. That is to say that when, for instance, the circuit detects smoke around it and at the same time its battery appears to be running out, it is considered more important to report the smoke than the low battery state. There is something to be said for this, of course. The infrared LED is not continuously supplied with current, but is pulsed. The repetition time of the 150ps long current pulses is about 10 seconds for conditions 3 and 4, when there is no sign of smoke. If smoke has been detected, however, either by the cir- cuit itself or by one of its kind, pulse repetition rate goes up to 0.4 seconds. It is better not to regulate the LED continuously to save battery power. At rest, the current consumed by the circuit will be no more than approxi- mately 10 pA. The LED is not only controlled to test for smoke, but also to check the battery's state. After all, the voltage during a loaded condition is important. As soon as this drops below the value of the zener diode plus approximately 0.2 V the battery alarm (state 3) is sounded. The battery voltage is measured by means of pin 13 of the 1C; pin 14 is the connection for the supply voltage. The infrared LED D1 draws a lot of current. This is necessary in order to give the detector diode D2 a clear signal which deviates from the infrared environmental light which is almost always present everywhere. The appli- cations schematic uses fairly unknown types for D1 as well as D2, but no doubt the circuit works just as well with the more common numbers given in brackets. PI can be preset to reference the input of the opamp within its modulation range. Potentiometer P2 serves to regulate the circuit in such a way that the alarm will only sound when smoke is present. First place P2 in the centre of its travel and then preset PI. The MEM 4963 has another CMOS compatible output at pin 4. Normally this will be a logic 0 but whenthealarm goes off, it changes to a logic 1 . The current capability of the pin 5 output is approximately 240 mA. H 6-34 - 1 ligh fre noise at high fireqiioides (an important factor) Noise in UHF/VHF receivers can be determined by using extensive and expensive test equipment. However, tests with a noise generator can give usable results at a much lower cost. Such a noise generator can, of course, be constructed by the amateur. 1 What is noise? Noise is caused by highly complicated physical and thermodynamic processes. Briefly, it is the random movement of electrical charge carriers. Noise increases with rise in temperature: at absolute zero (-273°C = 0 K) noise is zero, for at this temperature all movement is frozen. This is why during certain critical processes, cryogenic techniques are used to attenuate the noise factor to obtain a certain signal-to-noise ratio at the output. How to determine the noise factor The noise factor in receivers can be calculated in two different ways, either from a sensitivity or from a noise measurement. In order to test sensitivity a signal generator is required: however, good quality HF signal generators tend to be very expensive . . . Instead of measuring the sensitivity with only one frequency, we can apply many frequencies at once: use a noise signal, in other words. This is how it works. First the basic noise N of the receiver is measured when the noise generator is switched off. Then the noise generator is switched on and the noise level is set (by means of an attenuator) in such a way that twice the input level can be measured at the output. This corre- sponds to a S/N ratio of 3 dB. The nice thing about using noise methods is that the S/N ratio is not dependent on temperature or bandwidth. Circuit A small generator can be built with inexpensive and readily available com- ponents as shown in figure 1. A high frequency transistor (T2) is connected 111 **/ xae..w imafik Figure 2. Part of the frequency spectrum of the circuit of figure 1. On the upper trace the frequency is shown horizontally (100 MHz per cm) and the amplitude vertically (2 dB per cm). The lower trace represents the noise produced by the spectrum analyser (—97 dBm: 0 dBm is 1 mW with an impedance of 50 ft). with very low temperatures. However, as a zener diode. It is fed by a DC it is not always practical to go to these voltage source (T1). The noise voltage extremes. and therefore output level is determined The signal-to-noise ratio is the best by the setting of potentiometer PI known method for determining to what which controls the amount of current extent noise (N) affects the signal (S). that flows through the zener diode. The This can be done by expressing the output impedance of the circuit is signal-to-noise ratio in dB: S/N = 10 log S/N dB Taking a certain point in the receiver (temperature coefficient of the voltage (after the demodulator for instance), source T1) achieved in the long run it can be determined how many micro- is not ideal, but for comparative (short volts are required at the input in order term) noise tests it is quite adequate. K approximately 50 Si. The photograph in figure 2 shows part of the generator's noise spectrum. Obviously, the circuit cannot be ex- pected to perform miracles. The stability For those who don't know, Morse is a little like binary without the logic. Understandably, learning the Morse code is a long process. In practical use one has to know all the signals by heart, there is no time to even think about it when listening to an actual transmission. Learning them is therefore very much like reciting multiplication tables in school. This is the idea behind the morse trainer. morse trainer The morse trainer constantly repeats a certain signal which has been chosen by a few switches. A letter is represented in morse code by a series of dots and dashes, a dash lasting three times as long as a dot. The interval between two dots (and the dashes too) is determined by the clock generator (N 1 ) in figure 1. The clock frequency can be varied for differ- ent difficulty factors (DF's?l. When S5 is depressed, the outputs 'O', T, '2', '3', etc. of IC1 (a decade coun- ter) are high in series according to the clock frequency. (The counter switches on the positive slope of the clock squarewave.) By using the outputs at '1' (pin 2), '3' (pin 7), '5' (pin 1 ) and '7' (pin 6) only, an equally long logic 0 follows every logic 1 of IC1. If all the switches SI . . . S4 are on 'c', four short signals are given which enable the low frequency oscillator/amplifier to produce four 'dots' through the loudspeaker. This is the morse code for the letter 'H\ As long as switch S5 is depressed, the decade counter (through the low frequency oscillator) will repeat this signal over and over with short pauses in between. If a switch is in the 'a' position however, the output of the corresponding pin of IC1 will be connected to an extra diode and an electrolytic capacitor C2. This prevents the clock signal from reaching the counter clock input (pin 14). The capacitor is discharged by R2 and Plb. The setting of Plb determines the time it takes to dis- charge C2. A dash is the result. elaktorjune 1980 - 6-37 Cl - 1 (i/10V C2 = 2 m2/10V Semiconductors: IC1 =4017 IC2 = 4093 T1 = BC 516 01 D13-DUS SI... . S4 = Switch SPDT with :h N/0 sr off 55 = Pushbutton s» single pole 56 = Switch SPST 57 = Morse key LS = speaker, miniature 8 SI There are four SPDT switches (S1...S4). Table 1 shows the various positions of the switches in order to generate morse coded letters. All the morse signals may be created with various combinations of these switches. This excludes figures and other signs. The printed circuit board is shown in figure 2, along with the parts layout. The four switches can be mounted on the board or at a remote location. If the audio output is too loud for your liking, a 50 pot may be wired in series with the speaker. The output may also be wired to a set of headphones. This will allow for increased concentration, while reducing public irritation! By connecting a sign key for S7, it is possible to use the trainer for trans- mission practice. If this feature is used, S5 is not depressed and IC1 is not used at all. By depressing the sign key, the supply voltage will be fed to the low frequency generator. This is ac- complished via R8 and D13, causing it to generate a tone through the loud- speaker. M die SC/MP as a mini organ H.W. Wyes Elektor's SC/MP system may be used to produce musical notes in the form of a two octave software organ. The hex keyboard functions as the manual. As there are not more than sixteen keys available, only whole tones may be produced, usually enough to play simple melodies. The software ensures that a squarewave is produced at the flag 1 output as soon as a key is depressed. This signal can then be amplified and reproduced through a loudspeaker inter- face (figure 1). This is the same system used for the 'Kojak Siren' and the 'Singing SC/MP'. As opposed to the 'Singing SC/MP', which sounded mono- tonous, the squarewave is modulated here. This produces a much more pleasant and interesting sound. The duty cycle (the ratio between positive and negative swings in a waveform) is varied. The table (from 0F53 on) determines the pitch of the sound. At S3 the hex- keyboard is continuously scanned to ascertain whether any keys are depressed. Using the extension register, the hexadecimal number concerned is added to the address indicated by pointer 3. At SO, pointer 3 is loaded with the address of the table (0F53). Then at SI and $2 the program for the tone generation actually begins. For the section of the waveform marked DOWN in figure 2, the program beginning at SI ensures that the required phase- shifting and frequency generation for the desired tones, is created. The program in section $1 runs until the counter has reached zero. Then section S2 is run. This controls the phase as shown in figure 2 (UP section). As you might have guessed, $2 will run until the phaseshift returns to its original value. 0F22 C40F IDI 0F 37 XPAH 3 C453 IDI 53 33 XPAL 3 C108 LD 08 (1) 943A JP S 3 C402 IDI 02 07 CAS C100 ID 00 (1) 08 tCP C201 ID 01 (2) 8F00 DLV 00 C400 IDI 00 07 CAS C202 ID 02 (2) 03 SCL FA01 CAD 01 (2) 8F00 DLV 00 C100 ID 00 (1) BA01 DID 01 (2) 9CE2 JNZ S 1 0F24 C108 ID 08 (1) 0F26 941C JP $ 3 0F28 C402 IDI 02 0F2A 07 CAS 0F28 C100 ID 00 (1| 0F2D 08 N3P 0F2E C201 ID 01 (2) 0F30 8F00 DLY 00 0F32 C400 IDI 00 0F34 07 CAS 0F35 C202 ID 02 (2) 0F37 03 SCL 0F38 FA01 CAD 01 (2) 0F3A 8F00 DLY 00 0F3C AA01 I ID 01 (2) 0F3E E202 XOR 02 (2) 0F40 9CE2 JNZ S 2 0F42 90C2 JMP S 1 S 3 0F44 C108 ID 08 (1) 0F46 94FC JP S 3 0F48 D40F ANI 0F 0F4A 01 XAE 0F4B C380 ID 80 (3) 0F4D CA01 ST 01 (2) 0F4F CA02 ST 02 (2) 0F51 90B3 JMP $ 1 T^lJTJTJTJTJXnjTJTJ^^ se Width Modulated Squarewave 6-38 -elektor june 1980 le elek terminal width extender die < k k k kl 85 dB SPL with as little as 1 mA drive current, at the resonant peak of 4.5 kHz. on all the standard Hamlin ranges of liquid- crystal display devices in both reflective and transf lective configurations. Hamlin Electronics Europe Ltd.. Self-adjusting wire stripper Developed as a result of 12 years expertise and three years of field tests, AB Engineering's new MK 2 FC wire stripper marks a new step in tool design and operation. Ergonomically designed to multiply the force exterted by the hand and light in weight - structed in glass fibre reinforced polyamide with high tensile steel moving components. The MK 2 FC features a novel 'floating cam' which automatically adjusts the jaws to the correct stripping depth and simultaneously adjusts the gripping pressure on the insulation. However, these units are fully specified with regard to broadband response characteristics - e.g. the SPL at 1.5 kHz is typically 77 dB with a 10 V p-p squarewave drive. A wide New hobbyist catalogue Designed to a new formant, a 52 paged Hobbyist Catalogue has recently been released by Vero Electronics. The brochure contains a selection of products that are particulary useful to the home con- structor. Several new products are illustrated including Verobloc; a new prototyping method of building and testing circuits; SI 00 bussing system; a rack mountable development kit for evaluation of micro-processor based systems to the S100 format and Low Profile DIP Sockets. Send 40p to cover post and packing and this new catalogue is yours. Vero Electronics Limited. Industrial Estate. Chandler's Ford. Eastleigh. Hampshire. S05 3ZR Telephone: 1042 151 69911. You've heard about it Read about it — HERE IT IS AVAILABLE EX-STOCK % COMPLETE KIT AS PER ^CK 0 * INCLUDES FREE 16K EXPANSION NASCOM-2 ON DEMONSTRATION NOW \ NEW