elektor 51152 july 1 augus t 1979 UK. UOp. U.S.A. I Can. $3.50 elektor 51/52 contents elektor July /august 1979 UK 3 1 disco lights G. Ghijselbrecht 2 3-state CMOS logic indicator D. Hackspiel 3 miniature traffic lights J. Ladage 4 model railway block controller . A. v. Kollenburg 5 burglar's battery saver C. Hentschel 6 curve tracer B. Darnton 7 pachisi HJ. Walter 8 metronome W. Kluifhout 9 solar tracker W.H.M. Dreumel 10 improved DNL R.E.M. van den Brink 1 1 resistance bridge J. Borgman 12 octave shifter for electric guitars . . . . H. Schmidt 13 liquid level sensor E. Scholz 14 sun lamp timer A.W. Zwamborn 15 frequency ratio meter W. Dick 16 transistor tester R. Storn 17 'de luxe' transistor tester R. Storn 18 FM stereo noise reduction Q.A. Rice 19 LED lamps U. Hartig 20 news detector J. Pelsma 21 transistor tester H.G. Brink 22 floating input for DVM J. Borgman 23 digital wooing aid M. Muhr 24 voltage comparison on a scope J. Meier 25 linear thermometer J. Borgman 26 ten channel TAP C. Horevoorts 27 moisture sensor J.M. van Galen 28 digital heart beat monitor P. Lesh 29 sinewave oscillator G. Schmidt 30 heated rear windscreen . . H.J.A. Roerdinkholder 31 car anti-theft protection B.H.J. Bennink 32 autoranger J. Borgman 33 vicious chess buzzer B. Leeming 34 cartridge life-expectancy counter . . J.G. Hemmer 35 shift-lock for ASCII keyboard . . T. Frankemolen 36 2 switches - 2 lamps • 1 wire W. Richter 37 frequency multiplier H. Rol 38 frequency synthesiser .... R. Diirr/D. Hackspiel 39 dwell meter J. Becela 40 FSK modem H. Stettmaier 41 motorcycle emergency lighting E. Wiinsch 42 voltage prescaler P. Sieben/J.P. Stevens 43 bio-control J. Mulke 44 barometer Y. Nijssen 45 tv programme multiplexer W. Frose 46 electronic weathercock D. Maurer 47 UFO detector M. Muhr 48 current dumping amplifier G. Schmidt 49 slave flash F. Schaffler 50 photo-flash delay F. Schaffler 51 doorbell drone S. Halom 52 opto-transmitter for speech A.J. Mellink 53 opto-receiver for speech A.J. Mellink 54 calculator as chess clock N. Vischer 55 sound processor A. Visser 56 digital contrast meter J. van Dijk 57 emergency flight controller W. van Staeyen 58 FM PLL using CA 3089 J. Deboy 59 logic analyser P.C. Demmer 60 quick starter for fluorescent lamps D. Kraft 61 flashing badge L. Goodfriend 62 battery monitor S. Jacobsson 63 oscilloscope light pen A.N. Dames 64 analogue frequency meter H. Bichler A automatic battery charger Siemens B d.j. killer R. Vanwersch C harmonic distortion meter D ultrasonic transmitter for headphones E servo amplifier F ultrasonic receiver for headphones G frequency counter for synthesisers . . ... J. Naudts H autoranging peak meter P. de Bra I inclusive always/exclusive never gate 65 thermometer S. Jacobsson 66 sawtooths up or down an octave .... N. Nielsen 67 stereo from mono A. Jahn 68 digisplay A. Kraut 69 electronic poker dice A. Vandermaelen 70 digitally-controlled phaser G. Duffau 71 capacitance and inductance meter . T. Alfredsson 72 nerves of steel R.J. Horst 73 bicycle speedometer P. de Jong 74 automatic windscreen clearer . . . . E. Stamberger 75 noise level meter P. Barnes 76 automatic battery charger H. Heere 77 5-minute chess clock S. Woydig 78 emergency break K. Ziemssen 79 voltage trend meter H. Ehrlich 80 programmable function generator C. Rohrbacher 81 pseudo PROM . . . . J.F. Courteheuse/A. Monnier 82 non-stop Newton's cradle K. Bartkowiak 83 metal detector M. Kimberley-Jennings 84 varispeed windscreen wiper delay D. Laues 85 IR lock H.J. Urban 86 sequencer J.C.J. Smeets 87 four quadrant multiplier P. Creighton 88 simple synthesising of PPM's J. Andersen 89 ribbon cable tester J.J. van der Weele 90 speed controller for model railways . . . W. Pussel 91 /-segment displays on a scope F. Kasparec 92 pH meter circuit for DVM Th. Rumbach 93 robot with reflexes M. Blencowe 94 car collision alarm M. Haest 95 aircraft sound effects generator . . . M.J. Walmsley 96 digital milometer R. Kuijer 97 tape-slide synchroniser A. Hamm 98 flexible intercom system P. Deckers 99 fermentation rate indicator J. Ryan 100 256-note sequencer T. Emmens 101 f-to-v converter for multimeter .... F. Kasparec 102 video pattern generator P. Needham 103 audio sectioner R.D. Fournier 104 electronic horse J.M. Carreras 105 programmable melody generator R.Pfister 106 chorosynth J.D. Mitchell data section p. 8-09 - 8-18 Three Trumps from Acorn advertisement elektor july/august 1979 - UK13 | Now, the complete MK 14 micro-computer system from Science of Cambridge VDU MODULE. £31.62 (£25.14 without character generator) inc. p & p. Display up to ViK memory ( 1 6 lines x 32 chars, with character generator; or 4096 spot positions in graphics mode on UHF domestic TV. F.urocard-sized module includes ^g| Till' modulator, runs on single 5 V supply Complete ascii upper-case character set can he mixed with graphics. PROM PROGRAMMER. £10.95 inc. p&p. Use to transfer your own program developed and debugged on the MK 14 RAM to FROM (74S57I to replace SC10S monitor lor special applications, c.g. model railway control. Software allows h editing and verifying. POWER SUPPLY. £5.85 inc. p&p. Delivers 8 V at 600 mA from 220/240 V mains - sufficient to drive all modules shown here simultaneously. Sealed plastic case, BS-approvcd. CASSETTE INTERFACE MODULE. £6.63, inc. p&p. Store and retrieve programs on any cassette recorder. Use for serial transmission down single line at up to 300 baud (teletype speed) e g. over telephone line, and to communicate between two or more MK 14s. MK 14 MICROCOMPUTER KIT.^^^^^g £43.55 inc. p& p. Widely-reviewed microcomputer kit with hexadecimal keyboard, display, 8 x 5 1 2 - byte PROM, and 256 - byte RAM, and optional 16-lincs I/O plus further 128 bytes of RAM. To: Science of Cambridge Lid. 6 Kings Pa Please send me: □ MK 14 standard kit (ft £43.55. □ Extra RAM @ £3.88 per pair. □ RAM I/O device @ £8.£2. □ VDU module including character generator )lj £31.62. □ VDU module without character generator ® £25.14. I enclose cheque/MO/PO for£ To order, complete coupon and post to Science of Cambridge for DELIVERY WITHIN 14 DAYS. Return as received within 14 days for full money refund if not completely satisfied. □ Cassette interface module ( = 180°) and emitter ( = 0°) signals via P2 and C4. The highpass filter is realised by the circuit round op-amp A1. This filter has a third-order Butterworth re- sponse with a turnover frequency of 5.5 kHz. The filter output is amplified/limited by A2. The gain of A2, and with it the sensitivity of the circuit, can be varied by means of potentiometer PI. The peak detector consists of 4 series-connected diodes, which ensures that the control signal, u c . is only present when the input signal rises above a certain level. A FET, T2, is used to form the voltage controlled attenuator in the feedback loop of A2. The two signals u a and Uh are summed via preset potentio- meter P3 and the series connection of R19 and C14. The DNL function of the circuit can be rendered inoperative by means of switch SI, which simply shorts the signal uh to earth. During construction care should be taken to ensure that the output signal of op-amp A2 is kept at least several centimetres from the signal- carrying leads, so as to prevent the possibility of crosstalk. The circuit can be set up by driving it with a pure noise signal, such as that from an off station FM tuner, and varying P2 and P3 for maximum attenuation. The circuit as shown is optimised for standard level audio signal levels, i.e. 0dB = 770mV RMS, but can also be used for other signal levels. R.E.M. van den Brink (The Netherlands) resistance bridge Generally speaking, resistors with a 5% tolerance are more than adequate for most of the circuits published in Elektor. However from time to time there may be occasions when 1% re- sistors are required, or when the value of two resistors must be matched to within 1%. This is the case with for example digital meters, where it is worth the extra expense of using very accurate attenuator resistors in order to fully exploit the accuracy offered by a digital display. The circuit described here allows two resistors, R x and Ry, of the same nominal value to be compared with one another, and the difference to be expressed directly in per cent. The accuracy and stability of the circuit are better than 0.1%, and resistors from 10 ft to lOMft can be measured, providing the maximum permissible dissipation is not exceeded, i.e. /» W types for example should be greater than 27 ft. The operation of the circuit is based upon the resistance bridge formed by Rx. Ry and the voltage divider R1, PI ana R2. If R1 and R2are exactly the same value, the bridge current will be proportional to the extent to which R x and Ry deviate from the mean value of these two resistors. For small differences between R x and Ry the current is, to all intents and purposes, proportional to the difference between the two resistors. The percentage difference between the two 'unknown' resistances is expressed directly on the scale regardless of which resistor is the greater. However with the aid of the simple comparator formed by T1 and T2, which of the two resistors is the greater can be displayed on LEDs D1 and D2. The circuit can be adapted to suit a variety of different meters. If a Table: 0- 3% 0- 60 mA 0-10% 0-200 0-10% 0-500 ji A 0-10% 0-200 mA 0- 1% 0- 50 *iA R1-R2 PI 1k2 ioon 1k2 ioon 475 n 50 n 1k2 ioon 475 n 50 n R3 DVM 5 k -0.3... +0.3 V 5 k -1 ...+1V 2 k -1 . ..+1V 500 -0.1 . . . +0.1 V 2 k -0.1... +0.1 V centre-zero reading meter or a DVM (with a floating input) are available these would be ideal in which case components D1 . . . D7, R4 . . . R6, T1, T2 and the two LEDs can be omitted. A universal meter with a 0-10 or 0-30 scale would also be suitable. The table lists other examples of possible meters and indicates the component changes required as well as the range scale obtained. High stability metal oxide or 1% precision wirewound resistors should be used for R1, R2 and R3. Calibrating the circuit is quite straightforward. PI, which should preferably be a multi-turn type, is provisionally set to the mid-position and two resistors of the same nominal value are connected in circuit. The meter reading is noted, and then the resistors changed over. If the new reading is the same as the first, no further adjustment is required. If that is not the case, PI is adjusted until the average of the two readings is obtained. If desired the procedure can be repeated once more for an extra check. J. Borgman (The Netherlands) 7-10 ekeltor july/august 1979 octave shifter for electric guitars Effects units for electric guitars are extremely popular. One of the popu- lar weapons in the arsenal of the well-equipped rock guitarist is an oc- tave shifter, a unit which doubles the frequency of the guitar signal. One of the ways of achieving fre- quency doubling — and the approach adopted here - is full-wave rectifi- cation, as commonly carried out in power supply circuits. As can be seen from the accompanying circuit diagram, the rectification is per- formed by a diode bridge. By includ- ing the diode bridge in the feedback loop of IC2, the non-linear voltage characteristic of the diodes has no effect upon the signal. Pre-amplification of the guitar pick- up signal is provided by IC1. The gain of this stage is set (by PI) such that the signal is just on the point of clipping. Preset potentiometer P2 can be adjusted so that the output signal level is the same as that of the input signal. A bypass switch, SI, is in- cluded allowing the unit to be switched in and out. As is apparent from the sketches of the input and output signals, the signal is not only doubled in fre- quency, but is also distorted. The sound becomes considerably harsher, as well as being shifted up an octave. This feature would probably be considered an asset to the contem- porary rock musician. H. Schmidt (Germany) liquid level sensor An annoying drawback of many liquid level sensors is the effect of electrolytic reaction between the liquid and the sensors. Metal electro- des are prone to corrosion and consequent loss of effectiveness (reduced conductivity), with the result that they have to be replaced at frequent intervals. One solution to this problem is to ensure that there is an AC, rather than DC potential between the sensor electrodes. The constant reversal of electrode polarity dras- tically inhibits the electrolytic pro- cess, so that corrosion is considerably reduced. The actual circuit of the level sensor is extremely simple. The circuit around N1 forms an oscillator. If the two sensors are immersed in a conducting solution, C4 will be charged up via the AC coupling capacitors (C2 and C3) and the diodes, so that after a short time, the output of N2 is taken low and the relay is pulled in. The relay can be used to start a pump, for example, which in turn controls the level of the liquid. When a conductive path between the two sensors no longer exists, C4 discharges via R2, with the result that the output of N2 goes high and the relay drops out. E. Scholz (Switzerland) Before setting off for (hopefully) sunnier climes, many prospective holidaymakers use a UV lamp to acquire an initial tan. Unfortunately, things can go rather amiss, and instead of a nice golden brown, the careless or forgetful user can end up the colour of one of Her Majesty's pillar boxes! The following circuit was designed to prevent any of our readers from suffering just such a painful experience. The circuit is basically a timer, which after a preset interval will produce an audio tone to warn the sunbather that his time is up. If the audio tone provokes no response from the user, the lamp is automati- cally switched off (via a relay) after another 30 seconds. If the sunbather wishes to turn over and brown another part of his or her anatomy, or someone else is to take his place, then by operating a reset button the lamp is prevented from switching off. The operation of the circuit is quite straightforward. A 50 Hz squarewave is derived from the transformer secondary and fed to a 12-bit binary counter (IC3). The outputs of the counter are gated (N3 . . . N5) such that a pulse is supplied to the clock inputs of IC7 and IC8 every 30 seconds. Furthermore IC3 itself is also reset every 30 seconds. IC7 and IC8 are shift registers, the outputs of which are taken high in turn by successive clock pulses. The position of SI therefore determines how long it takes before the oscillator, which is formed by N9, N10 and associated components, is started. The oscillator, together with an amplifier stage and loudspeaker, provides the audio warning tone. With SI in position '1', this period equals 12 x 30 s = 6 min- utes. Thirty seconds later, the next output of IC8 (Qlb) will go high, causing the relay to drop out and switch off the UV lamp. At any stage pressing S2 will reset ICs 3, 7, and 8, thereby initiating a new count cycle. The volume of the warning tone can be varied by means of P2, whilst LED D3 provides a visual indication of whether the circuit is switched on. A relay which is capable of switching reasonably large currents, but which itself has a fairly small pull-in current (max. 100 mA) should be used. A. W. Z warn born (The Netherlands) 7-12 elektor july/august 1979 1151 frequency ratio meter There are certain situations, e,g, when checking frequency multiplier or divider circuits, PLL circuits, certain music circuits etc., where it is more important to measure the frequency ratio of two signals, rather than simple measurement of fre- quency itself. With the aid of the circuit shown here, the ratio between the frequency of two signals, f ( and f 2 , can be measured and displayed directly on three seven-segment dis- plays. The circuit will measure ratios up to 99.9 with an accuracy of 0.1, providing f! is larger than f 2 . The heart of the circuit is the coun- ter/display driver 1C, MK50398N, from Mostek, which has already been described in Elektor (see below). The higher frequency, f t , is fed via the input stage around T1 to the clock input (pin 25) of the counter. Pulses will be counted at this input provided j!) pin 26 (count inhibit) is held low. Decade divider IC2 and flip-flop FF1 ensure that this pin is in fact held low for exactly ten cycles of the lower frequency signal, f 2 . Thus a number appears on the displays which is ten times the ratio between fi and f 2 . By arranging for the decimal point to light between the second and third digits, the resulting f figure is thus exactly equal to the a, ratio f , /f 2 . Flip-flop FF2 is connec- V'- ted as a monostable, and is used to provide the counter 1C with the correct 'store' and 'clear' pulses on pins 10 and 15 respectively. Literature: % GHz Counter, Elektor 38, June 1978. o o O. U tf 4 7J 4 INN 1 12 V® up/down IC1 MK 50398 N " ;tU | © e a 8 § a I ! a 3 10 sCL. cn C7 J. 12 V ® . 1 T C ± n - ; 1 1 .1 33°" m r~ © 1 Uo T . 1 4*- >C2 C0 k3 clock n 1161 transistor tester Although not a precision instrument, this transistor tester should none- theless prove a useful aid for checking the quality of 'job lots' of transistors. The circuit will determine whether or not a transitor is defective, and whether the current gain of the transistor puts it in the class of 'A'-type transistors (current gain 140... 270), 'B'-type transistors (270 . . . 500), or 'C'-type transistors (greater than 500). To test for example an NPN transis- tor, the device is inserted in the appropriate socket (TUT = transistor under test) and S2 switched to position C. If LED D2 lights up, the transistor is type C, if the LED remains out then S2 should be set to position B, or, if this fails to have any effect, to position A. In each case the position of S2 in which the LED lights up indicates the class of transis- tor. If the LED fails to light even in position A, then it is defective, or has a current gain of less than 140, which for small signal transistors means that they are basically unusable. The base current to the transistor under test can be interrupted by means of elektor july/august 1979 7-13 pushbutton switch SI. If the LED does not go out, it means a short exists between collector and emitter of the transistor. The operation of the circuit is quite simple: The transistor under test receives a base current of 10pA via R1. Assuming the transistor is not defective, this results in a voltage drop across R2 . . . R4, and depending upon the position of S2, a portion of this voltage is compared with a fixed reference voltage by I Cl. The oper- ation of the right hand side of the circuit is virtually identical, except that it is arranged for PNP transistors. The circuit can be powered by battery. R. Storn (Germany) ’de luxe’ liy transistor tester A ■ Like the previous circuit, this transis- tor tester will indicate whether the current gain of the transistor under test is that of a class 'A'-, class 'B'- or class 'C' type. The circuit will also determine whether or not the transis- tor is defective. The advantage of this design, however, is that the class of transistor is automatically deter- mined and shown directly on a seven- segment display. The operation of the circuit is in many respects similar to its prede- cessor. Depending upon the current gain of the device under test, a certain DC voltage is dropped across resistors R2 . . . R4 in the case of NPN transistors, or across R7 . . . R9 in the case of PNP transistors. As this voltage increases (i.e. the greater the current gain of the transistor under test), the outputs of comparators IC1 . . . IC3 (IC4 . . . IC6 for PNP transistors) will go low in turn. The output state of the three comparators is decoded by R15 . . . R19. T1.T2 and T3, such that 'A', 'B', 'C' or 'F' appears on the seven-segment display. 'F' indicates a defective transistor, and is also obtained if no transistor is connected in circuit, or if the push- button switch in the base lead of the transistor is pressed (opened). If that is not the case, the transistor has an emitter-collector short. S3 is used to switch between NPN and PNP types. The display is a common-anode type. R. Storn (Germany) 7-14 elektor july/august 1979 FM stereo noise reduction It is a well-known fact that the signal-to-noise ratio of a VHF FM receiver is better on mono than on stereo. This principle is in fact used in some FM stereo noise reduction systems: crosstalk is introduced between the stereo signals to reduce the noise, while retaining some of the stereo effect. Since noise is more annoying at higher frequencies, some circuits only mix the two signals at higher frequencies. A good noise suppression system would be one where the crosstalk is introduced gradually, as required — not switched on abruptly by an (electronic) switch. It would be better still if the signal level not only determined the amount of crosstalk, but also the turnover frequency above which crosstalk occurs. These considerations are the basis for the design idea presented here. The two channels are mixed via optocouplers (0C1 ... 0C3) that use light-sensitive J-FETs. Admittedly, these are anything but readily available; however, they have better linearity than standard types - and that means less distortion. The capacitors in series with the optocouplers are chosen so that the turnover frequency decreases as more of the photo-J-FETs are turned on. The control voltage for the opto- couplers is derived from the input signals. These are summed in A1 and fed through a high-pass filter (A2). The output from this filter is propor- tional to the high-frequency content of the stereo signal. After rectifica- tion (A3), buffering (A4) and smoothing, this signal is compared to a reference voltage in A5. The out- put from A5 is used to drive the LEDs in the optocouplers. As the high-frequency content of the input signals rises, the drive to the LEDs is decreased so that the crosstalk between the channels is reduced. Noise reduction therefore only occurs when it is necessary: at low levels. Q. A. Rice (United Kingdom) elektor July /august 1979 7-15 LED lamps When it comes to mains indicator lamps, there are basically three main options: neon lamps, incandescent lamps, and LEDs. Neon lamps have the advantage that they can be connected direct to the mains supply, and also that they consume very little power. Incandescent lamps, on the other hand, must be connected to a much lower voltage (e.g. to the secondary side of the transformer), and therefore provide only indirect indication of whether the mains supply is present, whilst as a rule dissipating a relatively large amount of power. LEDs would represent an ideal alternative to both the above ap- proaches, since they have a longer operating life than either neon or incandescent lamps, and dissipate no more than 20 to 30 mW. Unfortuna- tely it is necessary to protect the LED from excessive currents by employing a series resistor, which, with a mains voltage of 240 V, will itself dissipate something over 3.5 W. The circuit shown here offers a better solution. The current through the LED is limited to a safe value not by a dropper resistor, but by the reactance of a capacitor. The advan- tage of this method is that no power is dissipated in the capacitor, since the current though the latter is 90° out of phase with the voltage dropped across it. The formula for calculating power dissipation for DC voltages is only valid for AC voltages provided the current and voltage are in phase i.e. P c = u c • i • cos 0 With a phase shift of 90°, which is the case with capacitors, P c is there- fore 0W (cos 90° =0). What little power is consumed by the circuit is entirely converted into light and heat by the LED. The value of capacitor C, can be calculated for any given voltage, frequency and current with the aid of the following equation: C is the capacitance in Farads u is the RMS value of the mains voltage f is the mains frequency in Hz i is the current through the LED in Amps With a mains voltage of 240 V, a frequency of 50 Hz and a current of 20 mA, the nearest suitable value of capacitor is therefore 330 nF. The working voltage of the capacitor should be at least twice the mains voltage. Diode D2 is included to protect the LED from excessive reverse voltages. U. Hartig (Germany) news detector To many people the radio news bull- etins are of primary interest. This design idea describes a method of switching on a radio by the 'pips' which of course immediately precede the news. The principle involved is quite simple, and utilises the fact that the pips have a frequency of almost exactly 1 kHz. The radio is in fact switched permanently on, but because the (electronic) switch is normally open, the audio signal is not allowed to reach the output stage. Rather it is fed to a selective filter with a turn- over frequency of 1 kHz. The output of the filter is rectified and used to switch a Schmitt trigger. The output pulses from the Schmitt trigger are counted, and only when six pulses occur within a predeter- mined time is the switch closed and the audio signal fed to the output stage. Once the news is over, pressing a reset button will once more cut out the audio signal and return the circuit to its initial state. J. Pelsma (The Netherlands) 7-16 elektor july/august 1979 1211 transistor tester This simple tester circuit will deter- mine whether a transistor is an NPN or PNP type and also measure the current gain of the unknown device. When the pushbutton switch, S, is depressed, one of the LEDs D13 or D14 will light to show the polarity of the transistor, whilst the hfE can be read directly off the meter, M. If neither LED lights, the transistor is either defective or has a current gain of less than 50. If both LEDs light up, there is a short between collector and emitter. The circuit functions as follows: ICIa forms the basis of a squarewave roughly 1 kHz. The squarewave oscil- lates about half supply voltage, and, with the aid of ICIb, is used to generate a base-emitter voltage which is alternately positive and negative. Thus whenever the polarity of the base bias voltage is of correct po- larity for the type of transistor under test, a base current will flow, causing a collector current to flow through R8. Depending upon the direction of the current through R8, either a positive or negative voltage is dropped across this resistor, with the result that, via ICIcor ICId, the appropriate LED will light to signify the polarity The collector current of the transistor also flows through the diode bridge and the meter, M. Since the base current remains more or less constant, the size of the collector current can be taken as a measure of the current gain of the transistor. Full-scale deflection of the meter corresponds to an hFE of 500. The meter can be calibrated with the aid of PI, the simplest method being to use a transistor with a known cur- rent gain. H. G. Brink (The Netherlands) floating input for DVM Digital voltmeters are now in wide- spread use and growing ever more popular. Many of the cheaper types of DVM however suffer from a slight drawback in that they have an earthed input (i.e. one of the input terminals is connected to earth or to a fixed voltage level). In many cases this is not particularly important, however there are situations (if the DVM is used in conjunction with an add-on unit such as an AC millivolt- meter, for example) where it can be something of a nuisance. With the aid of the following circuit, formed around a differential amplifier, any DVM can be provided with a floating input. It is recommended that 1% (metal film) types are used for the 1 M re- sistors ( R 1 . . . R4). The output volt- age of the circuit is adjusted to 0 V by means of PI (with the input short- circuited). The supply voltages +Ub and — Ub can be anywhere between 3 and 20 V (provided they are sym- metrical). J. Borgman (The Netherlands) elektor july/august 1979 7-17 digital wooing aid And now for something completely different .... Whether or not one will find the following circuit useful, the originality of the concept cannot be denied. The basic idea is to assist those unfortunate souls who seem to become tongue-tied when confronted with the object of their desires, and are incapable of expressing the intensity of their emotions in words. In such cases the 'wooing aid' can be presented to the prospective partner, who upon pressing the button, will be greeted with the immortal line 'Hello beautiful'! Of course whether this’, admittedly ingenious, amorous gambit will succeed in achieving the desired result is another question. The actual electronics involved are quite straightforward. The circuit 1231 contains a clock generator (N1, N2), a 4-bit binary counter (IC1), a 4-to-16 decoder (IC2) and a diode matrix. The pulses from the clock generator are converted into binary code by IC1 and then fed to IC2, so that each of the outputs of IC2 are taken high in succession. The outputs are decoded by the diode matrix which ensures that the correct segments are enabled to produce the desired text. The rate at which one letter follows another is determined by the clock frequency, and may be varied by adjusting PI . If, as was the case with the prototype version, a Minitron 301 5F type dis- play is used, R2 . . . R8 may be omitted. If a different display is employed, care should be taken to ensure that the current consumption is not excessively high. Otherwise it will be necessary to provide buffers (e.g. 7407's or 741 7's) between IC2 and the diodes D1 . . . D14. If- i 7493 \jl> | |~ A B C D — | 56on| 1 / BBHSGBaSQC 7-18 elektor july /august 1979 voltage comparison on a scope There are several different ways to measure DC voltages — multimeters, multichannel oscilloscopes etc. However if one possesses only a single-channel scope, comparing several voltages must involve making more than one measure- ment. With the aid of the circuit shown here, it is possible to simul- taneously measure and compare two different voltages on a single- channel scope, provided the latter is equipped with an external trigger input. The circuit is extremely simple, and uses only a single 1C, five resistors and a couple of capaci- tors. The 1C is a CMOS quad switch, 4016. SI and S2 form part of an astable multivibrator, and are opened and closed in turn. The two voltages to be measured are fed to S3 and S4, which are controlled by SI and S2. Thus the two voltages are fed alternately to the Y-input of the scope. The control signal for switch S4 is also used to trigger the scope. The supply voltage (3 ... 15 V) can be provided by, for example, a 9 V battery, which, in view of the circuit's low power consump- tion (under 1 mA), should be assured of a long life. J. Meier (The Netherlands) linear thermometer The circuit described here employs a forward-biased diode as temperature sensor. The forward voltage drop of a diode falls by approximately 2 mV for an increase in temperature of 1° C. Since this negative temperature coefficient remains the same regard- less of actual ambient temperature, the scale of the thermometer will be linear. The temperature coefficient of a diode is not particularly large, and is easily exceeded by that of an NTC (negative temperature coefficient) resistor. However it is not possible to obtain a linear scale over a wide range of temperatures using an NTC resistor. Thus the use of a diode is justified by the wide measurement range obtained and by the ease of calibration. The sensor diode — D1 in the circuit diagram — is a common-or-garden 1 N41 48, which can easily be mounted apart from the rest of the circuit. The diode forms part of a resistance bridge, comprising PI, P2, R5, R6 and R7. A reference voltage is provided by a 723. Thus the voltage on the non-inverting input of IC2 is held to a (variable) reference value via R5 and PI. Assuming the circuit is initially nulled by adjusting PI and P2, variations in the forward voltage drop of the diode as a result of temperature fluctuations will cause the output of IC2 to swing either high or low depending upon whether the temperature rises above or falls below zero. By using a diode bridge, D2 . . . D5, the meter will show a positive deflection regardless of the polarity of the temperature. To provide an elektor july/august 1979 ll i indication of whether the temperature is in fact above or below 0 , the output of IC2 and the reference voltage are effectively connected to the non-inverting and inverting inputs respectively of the 723, which thus functions as a comparator. Assuming the circuit is calibrated for zero deflection at 0° C, as the temperature falls, the voltage drop across the diode increases, therefore the voltage on the inverting input of IC2 falls, the output of IC2 goes high, taking the non-inverting input of IC1 high and with it the output of IC1. Transistor T1 therefore turns on, lighting the LED. When the tempera- ture rises above 0° C, the reverse process occurs, resulting in the LED being extinguished. Resistor R8 is included to allow the use of a DVM (with floating input) as a means of display. The accompanying table lists a number of alternative 30 0 - 300 mA -30 . . . +30° C 1 k 30 0 - 100 nA -30 . . . +30° C 3 k 50 0 - 300 nA -50 . . . +50° C 1 .67 k 50 0 -500 jiA -50 . . . +50° C 1 k 100 0-lmA -100... +100° C Ik values for R8 along with the measure- ment ranges obtained for various (moving coil) meter scales. Of course, if a DVM is used, then the moving coil meter as well as D2 . . . D5, R1 . . . R4, T1 and the LED can be omitted. The circuit can be calibrated by suspending the sensor diode (together with a suitable length of connecting wire!) in crushed ice which is begin- ning to melt. With P2 provisionally set to the mid-position, PI is then ten channel TAP TAP (read: touch) switches come in all shapes and sizes, mainly as mo- mentary action or simple on/off (latched) switches. Using only a handful of components, it is possible to construct a 'ten-channel' TAP, i.e. a ten-pole touch switch. When one of the ten sets of contacts is touched, the corresponding output will be taken high. The heart of the circuit is formed by a CMOS decade counter/decoder, 4017, which is clocked by a simple CMOS oscillator. However when the contacts are open, the counter is inhibited, since the clock enable input is held high. The same is true if adjusted so that zero deflection on the meter (or zero voltage across R8) is obtained. The diode is then dipped into boiling water, whereupon P2 is adjusted until a voltage of 1 V over R8 is obtained. The above procedure can then be repeated. It is best to use distilled or demineralised water for both steps of the calibration pro- cedure. J. Borgman (The Netherlands) 126 ! the contacts are bridged, but the corresponding output is already high, since in that case the additional skin resistance will have no effect. How- ever, if the corresponding output is low when a set of contacts is touched, the skin resistance (which is negli- gibly small compared to the other resistances) forms part of a voltage divider, thereby pulling the clock enable input low. The counter is started and increments until the out- put in question is taken high, where- upon the clock enable input is once more taken high and the count is stopped. Capacitor C2 is included to suppress mains transients etc., whilst R4 . . R14 prevent the possibility of a shock in the event of a short between the contacts. It must be emphasised that when the counter is started, each output in turn will go high (for a very short period) until the selected channel is reached. This should not proveto be a problem with most applications, however provision must be made for this when used with flip-flops and other edge triggered devices. C. Horevoorts(The Netherlands) 7-20 elektor july/august 1979 moisture sensor When the circuit shown here detects the presence of moisture, it causes a reed relay to drop out. The relay can be used to disconnect a piece of equipment from its voltage supply, thereby eliminating the possibility of electrical shock. The original application for the circuit was in an underwater camera which employed an electronic shut- ter. In the event of ingress of water into the camera, the shutter circuit was disconnected, thus protecting the photographer from the risk of a high voltage shock. However the circuit can also be used in a variety of other applications, for example a 'leak detector' for boats, or as a 'dry-washing' indicator, etc. The sensor is formed simply from a pair of copper wires held slightly apart, and the presence of moisture is detected by the resultant drop in the resistance between the wires. When this falls below a certain value, the output of the Schmitt trigger formed by T1 and T2 goes high. The flip-flop formed by N1 and N2 is thus trig- gered via Cl, with the result thatT3 is turned off and the relay drops out. The circuit also allows the option of the relay being pulled in when moisture is detected. R6 is simply connected to point A, rather than point B. The circuit is of a suf- ficiently 'universal' character that in place of the moisture sensor, vir- tually any alternative type of sensor (LDR, NTC etc.) can be used. J. M. van Galen (The Netherlands) N1. N2 = IC1 =4011,7400 The sight of so many interesting and diverse circuits contained in one issue may well lead to a quickening of the pulse rate for some of our readers. However, we have taken this into account by including the following design for a digital heart beat moni- tor. The circuit measures the time interval between successive beats of the heart and then calculates the heart rate in beats per minute before displaying the result on a three digit LED display. The heart beats are detected by using a miniature lamp and a photo-diode, encased in a clip which is attached to the ear lobe. Each time the heart beats, it pumps blood around the body, and the density of the blood in the ear lobe increases or decreases as the blood pressure varies. These differences in density between the times when the blood pressure is at its highest or lowest are detected by the photo-diode, thereby providing a pulse for each time the hearts beats. The time interval between successive digital heart beat heart beats is measured, and on the basis of this value the beat rate is calculated. This is done by simply counting the number of pulses of a known frequency during the above time interval. The author chose a frequency of 166.7 Hz for this application, hence for a heart rate of 60 beats per minute, the time be- tween successive heart beats will be 1 second, and a total of 166 pulses will be counted. Once counted, these pulses are transferred to a 256 bit presettable counter, so that they can be divided into 10,000 by clocking exactly 10,000 pulses into the counter. Consequently, for a heart rate of 60 beats per minute, a total 1 0 000 of ' , — = 60 output pulses will be ibb available to be counted and displayed on the LEDs. The circuit functions as follows: The gates N1 and N2 form an oscillator with an output frequency of 1 MHz. monitor This is divided by a factor of 6,000 by counters IC3 and IC4 to produce the required 166.7 Hz reference frequency. The variations in diode current are amplified by IC1 and IC2 so as to produce a pulsed output which is in sympathy with the heart beat. These pulses are fed to IC6 which gives an output pulse at pin 3 equivalent to the duration between successive beats of the heart. This counter is then inhibited so that no further heart beat pulses will have any effect. Both counters in IC5 are connected in series so that a total division of 256 is available. This counter is clocked by the 166.7 Hz reference frequency for the period between successive heart beats. Hence, a heart rate of 60 beats per minute will produce an output pulse from IC6 of 1 second duration which would permit 166 pulses to be counted in IC7. This number is transferred to the presettable counter IC8 which is clocked with exactly 10,000 pulses | elektor july/august 1979 7-21 so that a total of 60 pulses are available at its output. These heart rate pulses are then fed to the 3 digit counter/display chip IC9, and the result is subsequently displayed on the LEDs. The circuit is designed so that IC8 will only receive an enable pulse after the initial counting sequence of the 166.7 Hz pulses has been completed. At the falling edge of the 10 ms enable pulse from IC5, the delay monostable is triggered, thereby inhibiting the count for roughly 3 seconds and allowing the display to be read off. Once this delay period has elapsed, all counters are reset in preparation for the subsequent count. Care should be taken during con- struction to ensure that the circuit is well insulated from any mains voltages. However the use of batteries as power source is strongly rec- ommended. P. Lesh (United Kingdom) 7-22 elektor july/august 1979 sinewave oscillator Under certain conditions if the out- put of a selective filter is fed back to the input a sinewave oscillator is pro- duced. In itself, the idea is not new (see for example the various spot sinewave generators published in Elektor), but the way in which it is realised in the circuit shown here is original. The output of the state variable filter (again, no stranger to Elektor readers) formed by A1 . . . A3, R7 . . . R1 1, Cl and C2 is fed back (from the output of A2) to the input (left hand side of R7). The amplitude of the output signal is stabilised by the action of FET T1, which in conjunction with R1 forms a voltage-controlled attenu- ator. The control voltage is derived from the output of A1 via a diode- resistor network and the integrator round A4. The sinewave signal is available at the outputs of A1, A2 and A3. Since A2 and A3 are connected as integrators, i.e. as lowpass filters, the distortion at output III will be lower than that at output I. The integrators have unity gain at the resonant frequency of the circuit. The desired value of Cl and C2 can be calculated by: Cl =C2 = y where f is in kilohertz and C is in nanofarad. G. Schmidt (Germany) automatic heated rear windscreen Cold weather is one of the banes of a motorist's life. Not only must he worry about the car starting on cold winter mornings, but there is the added nuisance of frozen windscreens to cope with. To help combat this latter problem, many cars are fitted with heated rear windscreens. Useful though these are, it still means one has to wait until the heating element has warmed up sufficiently to melt the frost before being able to move off. The circuit described here is designed to assist the motorist in a 'fast get-away', by ensuring that the heating element is switched on before he reaches the car. Basically the circuit will switch the heated windscreen on after a variable preset period. The idea is that before leaving the car in the evening, the motorist will calculate what time he expects to be using the car the following morning, and set the circuit accordingly. The circuit also incorporates two important safe- guards — for the windscreen to be switched on the temperature must be below zero, and the car battery must be sufficiently well charged to ensure that the current drain of the heating element will not leave it flat. The basic principle is quite simple: The circuit around IC1 is a square- wave oscillator which provides clock pulses to IC5, a 14-stage binary counter. The outputs of IC5 are ANDed together via diodes D1 . . . D1 1 and R5. The number of outputs gated together, and which outputs those are, can be selected by means of switches S1...S11. Thus by closing various combinations of switches it is possible to vary the interval which elapses before pin 6 of N3 is taken high. The output of N3 will only go low, however, if both inputs are high, i.e. if the output of N2 is also high. For this to be the case both inputs of N2 must be low and hence both inputs of N1 must be high. When the output of N3 is taken low, the output of N4 goes high, setting the flip-flop IC6 and pulling in the relay. However if the battery voltage falls below the reference level set by P3, the output of IC3 will go low, taking the output of N3 high and resetting the flip-flop. A suitable 'threshold value' for the battery voltage would be 1 1 V. Similarly, the ambient temperature elektor july /august 1979 7-23 rature coefficient resistor, R12. P2 is adjusted such that the output of IC2 goes high when the temperature falls to 0 C. Above this temperature the output of IC2 will be low, reset- ting flip-flop IC6. Finally, the remaining preset in the circuit, namely PI, is adjusted to After resetting IC5, the Q8 output should go high after 1 1 minutes and 1 6 seconds. The timing intervals provided by each of the switches SI ... S1 1 are listed in the accompanying table. Assuming, for example, that the heated windscreen is to be turned after leaving the car, this interval can be obtained by closing switches S7, S8 and S10. H.J.A. Roerdinkholder (The Netherlands) car anti-theft protection The circuit described here is based on an unusual method of deterring a possible car thief. Shortly after it is started an engine fault is simulated. Restarting gives the same result suggesting that the car may be more trouble than it is worth. The actual circuit is extremely simple. A 555 timer provides a delay of roughly 5 seconds. The normally closed contact of the relay is con- nected in the lead from the ignition switch to the ignition coil. Switch SI, which is used to arm the circuit, should of course be hidden. When power is supplied to the cir- cuit (via the ignition switch), the relay contact is initially closed and the engine will start. After the delay period provided by the 555 has elapsed, the relay contact is opened and the ignition coil is switched out of circuit. The delay period can be altered as desired by selecting differ- ent values for R 1 or Cl . B. H. J. Bennink (The Netherlands) 7-24 elektor july/august 1979 Although designed in the first in- stance for use with the universal digital meter which was published in Elektor 45, this circuit for an auto- matic range switch (for DC input voltages) can also be used with other meters. Input voltages between 0 and 1 V are fed directly to the output, voltages between 1 V and 10V are attenuated by a factor of 10, whilst voltages between 10 and 100 V are attenuated by a factor of 100. Thus the output voltage fed to the meter will always lie between 0 and 1 V, regardless of the amplitude of the in- put voltage. The basic principle of the circuit is illustrated by the diagram shown in figure 1. When both switches are open, the input signal is fed unatten- uated to the output — always pro- vided the meter input has a suf- ficiently high input impedance, which is the case with the Elektor autoranger universal digital meter. When SI is closed, the input voltage is atten- uated by a certain factor - in the actual circuit this factor is 10. If both SI and S2 are closed, the degree of attenuation is increased still further (a factor of 100). In the auto- ranger circuit SI and S2 are electronic switches which are controlled by comparators. The comparators effec- tively measure the input voltage level, and are biased to switch at roughly 0.96 V and 9.6 V. Figure 2 shows the complete circuit diagram of the autoranger. The volt- age divider formed by R7/R8 divides the input voltage by 3, which is then buffered by IC2. Another voltage divider network, R9 . . . R11 is con- nected to the output of IC2, and provides further attenuation by a factor of 10. A voltage of roughly 320 mV (depending upon the setting of PI) is present on the inverting in- puts of the two comparators, IC3 and IC4. The result is that the out- put of IC3 swings high when the input voltage exceeds 0.96 V, and the output of IC4 does likewise when the input voltage exceeds 9.6 V. The comparator outputs control elec- tronic switches, which are formed by MOSFETs. These are contained in IC1, which is here used in a some- what unusual configuration; note that the positive supply voltage pin of this 1C (pin 14) is left uncon- nected. If the circuit of figure 3 is connected between points A and B (figure 2), the position of the decimal point in the universal digital meter can also be controlled automatically. The three outputs of the circuit in figure 3 should be connected directly to R4, R5 and R6 in the meter circuit. J. Borgman (The Netherlands) 1 IC2 . . . IC4 = CA 3130 D1 . . . D7 = 1N4148 R2 . . . R11= Metal oxide 1% 5V elektor july/august 1979 7-25 vicious chess buzzer Lightning chess is often played in chess clubs, the idea being that a buzzer is sounded, usually every ten seconds or so, and the player whose turn it is to move must do so during the buzz, which lasts approximately one second. Despite the increased likelihood of a blunder by both players, it remains true that the more experienced, stronger player is still likely to defeat a weaker opponent. In fact the constraint of having to move quickly seems to exaggerate any difference in the strength of two players. The circuit described here offers the novice a new hope by providing an entirely random delay between successive buzzes. Thus there is the chance that the delays between his (strong) opponent's moves may be much shorter than those between his own. Of course the reverse is also true, but that is a risk which has to be taken! The circuit of the 'vicious chess buzzer' is shown in the accompany- ing diagram. N3 and N4 form a simple squarewave oscillator with a variable duty cycle. PI, R15 and Dll determine the charge period of timing capacitor C3 (the delay between successive buzzes), whilst P2, R16 and D12 determine the dis- charge period (the length of the buzz). With SI as shown in the diagram, a fixed buzz interval of from 1 to 1 5 seconds can be set by adjusting PI, whilst the length of the buzz can be varied as desired by adjusting P2. The output of N3 drives the buzzer via N2, P3 and T4. By means of P3 the volume of the buzzer can be adjusted to a suitable level. The section of circuit described up to this point forms a 'normal' chess buzzer, however if SI is switched to its alternative position, the delay times are randomised. The time taken to charge C3 then depends upon which Q output of IC1 happens to be high. The random element is provided by a noise generator, built round T1, T2 and T3. T1 forms a reverse-biased base-emitter junction which, in conjunction with Cl and R1, provides a random noise signal. This is amplified by T2 and T3 before being inverted, squared up and fed to the clock input of decade counter IC1. As long as the clock enable input (pin 13) of this 1C is low (i.e. when the output of N3 is also low and the buzzer is sounding), the counter cycles through each of its output states. When the buzzer stops, the counter is inhibited and one of the counter outputs is held high. The resulting delay is given by the formula T = R ’ C3, where R is one of the resistors R5 . . . R14. With the values given in the circuit diagram the maximum delay is 27 seconds, and the minimum delay 1 .8 seconds — plenty of scope for the buzzer to be really 'vicious'! The buzzer can also be used for other games (e.g. backgammon, or scrabble), in which case it may be desirable to alter the values of R5 . . . R14 accordingly. A small 9 V buzzer was chosen to keep current consumption to a minimum and permit the use of batteries. C3 should be a tantalum type. B. Leeming (United Kingdom) 7-26 elektor july/august 1979 341 This circuit is intended to give clear warning when it is time to replace the stylus in a record-player car- tridge. The unit indicates the 'playing time' that has already elapsed, using five LEDs. The first LED lights after the stylus has been in actual use for 100 hours, and each following LED lights after a further 100 hours. After 500 hours all LEDs are lit, indicating that it is time to replace the stylus. Otherwise, after a further 100 hours the five LEDs start flashing on and off — signaling that it is now high timel Once the stylus has been replaced, the counters are reset by briefly re- moving (or replacing) the battery. Power is derived from the mains when the record player is switched on. The battery is only used as a stand-by supply for the counters during 'off hours' — or in the event of a mains failure . . . In the circuit, S is the mains switch for the record player. When this is closed, the multivibrator (N2, N3) starts to provide clock pulses to the cartridge life- expectancy counter counter chain (IC1 . . . IC3). The final 1C in this chain (IC3) is a series- in/parallel-out shift register. The clock frequency and division ratio in IC1 and IC2 are chosen so that IC3 receives one pulse every 100 hours; its (parallel) outputs are used to drive the LEDs. The flashing display at 600 hours is derived from the Q4 output of IC1 (0.2 Hz). C3, R4 and N4 are included to reset the counter chain when power is first applied - i.e. when the battery is connected. To limit the drain on the battery, it is only used to power the ICs; the LEDs are only powered when the mains supply is on. Calibration is fairly easy. The clock frequency is set (by P2) for a period time of 0.17166 s. This can be meas- ured directly if the necessary test equipment is available; alternatively, the Q7 output of IC1 can be moni- tored with a multimeter: the period time at this point should be 22 se- conds. The output voltage of the stabiliser (7805) is set to 10 V by means of PI. Editorial note Provided it is handled with due care, a diamond stylus should last for any- thing up to 2000 hours. A lower clock frequency could therefore be used, giving a switching time for the LEDs of 200, 300 or even 400 hours. Furthermore, it would seem an improvement to use a nicad cell (9 V /1 00 mAh) instead of the battery for a stand-by supply. Trickle-charg- ing can be provided by including a 1 k resistor in parallel with D2. Hal elektor july /august 1979 7-27 SHIFT-LOCK OK for ASCII keyboard The following SHIFT-LOCK circuit should prove a useful addition to the ASCII keyboard published in Elektor 43 (November '78). The circuit is also suitable for use with most other types of keyboard which are not already provided with this facility. There is no need for an extra key to be mounted on the keyboard, since the original SHIFT key performs both the SHIFT and SHIFT-LOCK functions; the length of time for which the key is depressed determines which function is selected. If the SHIFT key is held down for longer than 0.2 seconds, the shift output will go low (inactive) as soon as the key is released. If, however, the key is only depressed briefly (i.e. for less than 0.2 sec), the shift output is held high (active) until pressed a second time, i.e. the key functions as a SHIFT-LOCK. The timing for the circuit is provided by the RC constant of R3 and C2. As soon as the voltage across C2 reaches approximately 45% of the supply voltage, N2 will change the input conditions of the JK flip-flop, IC2. Assuming that the Q output is initially high, the circuit functions as follows: Momentarily depressing the SHIFT key has no effect upon the output of N2. The J input of the flip-flop therefore remains high, and the K input low. Shortly after the key is pressed, the output of N1 goes low, taking the SHIFT output (via T2) high. When the SHI FT key is released, a positive going edge triggers the flip-flop, so that, given the^ state of the J and K inputs, the Q output goes low, taking the K input high, and ensuring that the SHIFT output is held high (via T1, T2). The next time the SHIFT key is held down briefly, the flip-flop is reset, i.e. the Q output is returned high, taking the SHIFT output low. If the SHIFT key is originally de- pressed for longer than 0.2 seconds, the output of N2 goes low and takes the K input high, thereby holding the Q output high. The SHIFT output will go low as soon as the key is released. R1, Cl and R2 eliminate the effects of contact bounce, whilst LED D2 provides a visual indication of when the SHIFT-LOCK function is selected. If the circuit is used in conjunction with the Elektor ASCII keyboard, the track to pin 4 of the AY -5-2376 should be broken and the circuit connected between the SHIFT key and the 1C. T. Frankemolen (The Netherlands) 2 switches- 2 lamps - 1 wire When housewiring, the addition of an extra switch and light to an ex- isting circuit using the same power supply point would not normally cause any problems. However, the situation can arise where it is not possible to 'run' an extra cable between the additional switch and light thereby making it impractical to fit them. The circuit described here is a simple but effective method of solving this problem by replacing the missing wire with a little ingenuity. It will be seen from figure 1 that diodes D1 and D2 ensure that switch SI controls lamp Lai, whilst S2 controls lamp La2. The half-wave rectified mains voltage is partially smoothed by capacitors Cl and C2, so that an RMS voltage of approx- imately 240 V appears across the D1...D4=1N4006 © lamps, which therefore burn at normal intensity. The value of these capacitors is determined by the power rating of the lamps used. The appropriate value can be calculated by using the following equation: Cx - 32 'ra> where C x is the new value of the capacitor (in /nF) and P x the power rating (in W) of the corresponding lamp. W. Richter (Germany) 7-28 elektor july /august 1979 frequency multiplier There may be occasions when it is required to measure low frequencies with a high degree of resolution. The circuit presented here is intended as a frequency multiplier for just this purpose which offers a resolution of 0.1 Hz with a fast measuring time. A block diagram of the frequency multiplier is shown in figure 1. As can be seen, this configuration bears more than a passing resemblance to the (by now) fairly common PLL frequency synthesiser. However, in this instance it is the division ratio which is fixed and not the input (or reference) frequency. The VCO fre- quency is divided by 100 and then compared with the input frequency in a phase comparator. The resulting phase difference creates a DC signal which is used to correct the VCO frequency. This means that the VCO output frequency will be exactly 100 times that of the input. In the circuit diagram of figure 2, the input frequency is first amplified by IC3, IC4 IC1 before being fed to the phase can be split into two separate ranges, locked loop. IC2. The VCO output is namely 30 Hz . . . 300 Hz and divided by 100 by the two decade 200 Hz . . . 10 kHz. The input sensi- counters IC3 and IC4 whereupon its tivity is quoted as being around phase is compared with that of the 25 mV, and the output voltage is input signal in the PLL itself. The approximately 4.5 Vp-p. Power VCO output frequency is fed to the supply requirements are 7 - 18 V at meter via the inverter formed by N2. around 30 mA. Switch SI is included so that the over- all frequency range of 30 Hz... 10 kHz H. Rol (United Kingdom) 38 digital frequency synthesiser A frequency range of 0.1 Hz to 999.9 kHz, a choice of CMOS or TTL output levels, and an accuracy/ stability which is limited only by that of the crystal oscillator — these are the main features of the digital frequency synthesiser shown here. As can be seen from the block diagram in figure 1 , the heart of the circuit is formed by a phase locked loop (PLL). In principle such a PLL circuit can be likened to an op-amp connected with feedback, such that the output voltage of the op-amp varies to keep the voltage at both inputs the same; the PLL circuit varies the frequency of the output signal, so that the frequency of both elektor july/august 1979 input signals remain the same. If the output frequency is divided by a factor N, and then fed back to one of the PLL inputs, the frequency of the PLL output signal will be exactly N times that of the other input signal. Thus all we have to do is ensure that the latter is a stable reference signal, and we have an output whose fre- quency is equally stable but is N times the reference frequency. The next step is to provide for the division factor, N, to be made variable, with the result that the frequency of the output signal can also be varied. By including a divide- by-1000 counter, which can be switched in or out of circuit, the frequency range of the output signal can be extended down to as low as 0.1 kHz. Finally, output buffers which amplify the output to both TTL and CMOS levels give the circuit a more 'universal' character. The complete circuit diagram of the digital frequency synthesiser is shown in figure 2. The reference signal is provided by a 3.2768 MHz crystal which is divided by a factor of 2 ,s (= 32768) by IC5 and IC6, so that a signal whose frequency is exactly 100 Hz is fed to one input of the PLL 1C (IC7). The frequency divider for the PLL output is formed by IC8 . . . IC11. The desired division ratio (N), and hence the output frequency, is set up on the decade switches, S3 . . . S6. The output of AND gate N10 provides the other input signal to the PLL, and due to the action of the PLL, the frequency of this signal remains constant at 100 Hz. The operation of the phase locked loop is dependent upon the value of the capacitor connected between pins 6 and 7 of the 1C. Since the output frequency of the PLL can be varied over a fairly wide range, it is necessary to ensure that the capaci- tor value can also be varied with frequency. This is done via electronic switches ES2 and ES3, which connect either one or two extra capacitors in parallel with C4. Control signals for these switches are derived, via suitable logic gating, from the decade switches, S3 . . . S6. The divide-by-1000 counter is formed by decade counters IC12 . . . I Cl 4. Depending upon the position of the range switch SI. the figure set up on S3 . . . S6 will be in either Hz or kHz. The output buffers are formed by means of inverters and a pair of balanced emitter followers. The outputs are short-circuit-proof. An additional electronic switch, ESI, is included to ensure that there is no output signal when the decade switches are set to 000.0. LED D1 lights up when the PLL is locked on, and thus provides a visual indication that the output frequency is correct. The circuit requires two supply voltages: 15 V unstabilised, and 5 V stabilised. The unstabilised supply can safely be increased slightly. For example, two nine volt batteries connected in series will prove quite suitable. R. Durr and D. Hackspiel (Switzerland) elektor july /august 1979 dwell meter Checking and adjusting the dwell angle of a contact breaker is really no problem — provided you have a good dwell meter. By 'good' we mean that it must be accurate and linear, and work over a large range of ambient temperatures. The cir- cuit described here meets these specifications. It is intended for use in combination with a multimeter (500 mA f.s.d.), although any other 500 pA instrument can also be used, of course. The dwell angle is measured in % (0 . . . 1 00%) . If a reading in degrees is required, the actual reading must be multiplied by 3.6 and divided by the number of cylinders in the engine. The circuit could hardly be simpler. The most important section is a constant-current source, consisting of T3 and a voltage-regulator 1C (IC1). The extremely stable (and tempera- ture-independent) reference voltage provided by the 1C at pin 6 is connec- ted to the non-inverting input of a differential amplifier inside the chip; the inverting input is connected to the emitter of T3. The 1C will now adjust its output voltage (V 0 ) so that the emitter of T3 is maintained equal to the reference voltage. The result will be obvious: a constant voltage, independent of temperature, across a fixed resistance (R5 + P1) must produce an equally constant current. Since the base current of T3 is negligible, the collector current is equal to the (highly constant) emitter current. So far, so good. The rest of the circuit either allows this constant current to pass through the meter, or else it doesn't . . . When the contact breaker is open T1 and T2 will conduct, shorting out the meter circuit. As soon as the points close, T1 and T2 will turn off. The constant current determined by T3 now flows through the meter, charging Cl at the same time. As the points open and close at rapid intervals, an average voltage is developed across Cl and the meter. This voltage is proportional to the 'duty-cycle' of the breaker points: the longer the points remain closed (the larger the dwell angle, in other words), the larger the voltage across Cl will be - giving a correspondingly higher reading on the meter. The calibration procedure is like the circuit: simplicity itself. After connecting the supply and shorting the input (R 1 to supply common), PI is adjusted for full scale deflec- tion of the meter (100%). After all, a shorted input corresponds to a dwell angle of 100%. J. Becela (Germany) FSK modem The most notable feature of this circuit for an FSK modulator/de- modulator is its extreme simpli- city: — it requires only one supply voltage — uses only 4 common ICs — is simple to set up The circuit conforms to Kansas City Standard (CUTS) format, i.e. logic 0 = 1200 Hz, logic 1 = 2400 Hz, and the transmission rate is 300 Baud. The modulator circuit is quite staightforward. The clock signal is derived from the frequency of the UART, which is 16 times the baud rate (i.e. 4800 Hz). After the clock signal has been divided down by FF1 and FF2, 2400 Hz and 1200 Hz signals are available at the inputs of SI and S2. Depending upon the logic level of the data input signal, one of these two switches is closed and a signal of the appropriate frequency is present at the modulator output. At the input of the demodulator circuit, N2, N3 and N4 form an amplifier/limiter. The actual demo- dulation is performed by the two re--triggerable monostable multivi- brators, MMV 1 and MMV 2. The pulse duration of MMV 1 is roughly 420 ns, whilst that of MMV 2 is approximately 850 /xs (depending upon the position of PI). With an input frequency of 2400 Hz, MMV 1 7-31 elektor july/august 1979 is continuously retriggered, so that its Q output is held high. No trigger pulses are fed to MMV 2, with the result that the 0 (data) output re- mains high. However, with an input frequency of 1200 Hz, MMV 1 will not be retriggered before the Q output goes low, so that MMV 2 is triggered and the data output also goes low. By adjusting PI to keep the pulse duration of MMV 2 as short as possible, the delay between rising and falling edges of the data signal can also be kept short. Users of the Elekterminal can take the clock signal for the modulator from either pin 17 or pin 40 of the UART. The Baud rate switch on the Elekterminal should be set t o the 300 Baud position. The RTS input should only be used in conjunction with UARTs provided with such an output. H. Stettmaier (Germany) motorcycle ^ emergency lighting The following simple circuit should prove a useful safety aid to motor- cyclists. In contrast to car drivers, motorcyclists generally only have a single headlight on their vehicle. Thus if it should fail whilst driving at night the motorcyclist is suddenly plunged into darkness and is effecti- vely 'blind', a dangerous state of affairs, to say the least. Normally the motorcyclist would have to fumble for the dipswitch and change over from dipped to full-beam or vice-versa, depending upon which bulb or filament had failed. The circuit described here ensures the safety of the motorcyclist by perfor- ming the task automatically in the event of either bulb (filament) failing. The headlight switch of the motor- cycle is represented by SI in the circuit diagram. Between this switch 6... 12 V 7-32 elektor july/august 1979 and the dipswitch, S2, is a coil (L), consisting of 10 to 15 turns of connecting wire wound round a reed switch (S3). As soon as the headlight is switched on (whether dipped or full-beam), a current will flow through the coil, generating a mag- netic field which closes the reed switch. Diode D1 is then connected via S3 to ground, with the result that the thyristor is turned off. Should the lamp or filament which has been selected by S2 now fail, the current through the coil, L, will fall, thereby opening the reed switch. Capacitor Cl will discharge via R1, and the anode of D1 will be at a positive potential, thus turning on the thyristor. The change in potential is deliberately slow, so as to ensure that should switch S3 open acciden- tally (as a result, e.g. of vibration, or when switching between the two positions of S2), it will have no effect upon the circuit. The thyristor pulls in the relay, Re, thereby connecting La2 and La3 in parallel. Since it is unlikely that both the dipped and full-beam bulbs should fail simultaneously, at least one lamp will be on, regardless of the position of S2. In addition, the warning lamp, La4, lights to indicate that a fault has occurred. The circuit is suitable for both 6 V and 12 V supply voltages, and almost any type of thyristor can be used, since it is only required to switch the relay and warning lamp. E. Wiinsch (Germany) automatic voltage prescaler If one wants to measure a voltage which is greater than the range (full- scale deflection) of a meter, there are two things which can be done. On the one hand, the input voltage can be reduced to an acceptable value by employing a voltage divider. This is tantamount to 'compressing' the entire range of voltages to be measured. Alternatively we can arrange for the meter scale to cover only a certain portion of the total range of input voltages, depending upon the amplitude of the input signal. For example, with a voltage of 26 V, a 10 V meter will 'look at' the 20 V - 30 V range, and a reading of 6 V will be obtained. The circuit described here performs the function of 'prescaling' a 10 V meter auto- matically, and can be used to measure input voltages between 0 and 30 V. With the aid of IC2 and IC3, the input voltage is compared with a reference voltage of 10 and 20 V respectively. Depending upon which comparator outputs go high, further reference voltages are fed via buffers IC4 and IC5 to diodes D1 and D2. The result is that a voltage which is equal to the greater of the two reference voltages minus the forward voltage drop of the diode, appears on the non-inverting input of IC6. The other diode remains reverse-biased. Since IC6 is connected as a voltage follower, the meter will thus show the difference between the original input voltage and the offset (refer- ence) voltage of either 0, 10 or 20 V. LEDs D3 and D4 provide a visual indication of which scale (0 ... 10 V, 10... 20 V or 20... 30 V) the meter is switched to. The brightness of the LEDs can be varied as desired by altering the values of R12 and R13. Any type of meter with a 10 V full- scale deflection (e.g. a moving coil type provided with a suitable series resistor) can be used. However one should bear in mind that the current flowing through the meter forms a load to the remainder of the circuit. Thus the higher the impedance of the meter the better. PI is included to compensate for the fact that the op-amps cannot swing fully negative. This potentiometer is best adjusted by shorting the input of the circuit and adjusting the meter for zero deflection. To adjust the remaining potentiometers a 10 and 20 V reference voltage is required. The procedure is as follows: with an input voltage of 10 V, P2 is adjusted such that D4 is just on the point of lighting up. P5 is adjusted such that a zero deflection reading is obtained on the meter when D4 lights up. With a 20 V input, P3 and P4 are then adjusted in a similar fashion. P. Sieben and J. P. Stevens (Belgium) -O o O* 0 30V I elektor july/august 1979 7-33 The growing awareness of the con- tributory role which stress plays in causing illness has led to increased interest in various forms of 'autogenic' training as a means of promoting relaxation. In particular, different types of 'bio-feedback' circuits have become popular, the idea being that certain physiological functions (heart- beat, body temperature, brain ac- tivity) can be monitored and brought under the conscious control of the subject. The circuit descibed here operates on the principle of monitoring skin resistance as a measure of how tense the subject is. The same approach is used in so-called lie detectors, however in that case it is the skilled interpretation of the subject's re- sponses to a variety of both innocu- ous and pointed questions which is important. The description of the circuit is as follows: variations in skin resistance (between electrodes El and E2) vary the frequency of the oscillator built round a 555 timer (IC10). The output of the oscillator is fed to a 7490 divider (IC8), which in turn controls the reset inputs of the counter formed by IC6 and IC7. The result is that the period between successive pulses from I CIO determines the number of clock pulses fed to this counter from a second oscillator (IC9). The outputs of the counter are decoded and displayed on a pair of 7-segment displays, thereby providing a numerical indication of the subject's relative tenseness. The frequency of the second oscil- lator, which is also formed by a 555 timer, is determined by C3 and R15. By incorporating the circuit shown in figure 2, several different clock rates can be chosen, thereby allowing the sensitivity of the circuit to be varied to suit different circum- stances. Initially PI should be adjusted to a suitably 'neutral' position. A pair of metal rings, which are slipped onto different fingers of the subject, will prove suitable sensors. The rings can be connected to points El and E2 by suitable lengths of wire. The current consumption of the circuit is roughly 400 mA max. To eliminate any danger of electric shock, care should be taken to ensure that the supply voltage is quite safe, ideally a battery should be used. J. Mulke (Germany) 7-34 elektor july /august 1979 Barometic pressure is one of those things that is difficult to measure electronically. A sufficiently sensitive pressure sensor is not easy to obtain — unless, as in this design, you add some kind of electronic pickup to a conventional mechanical barometer. The ferrite core of a coil is attached to the 'drum' in the barometer. As the barometric pressure changes, the core moves to and fro in the coil. Since the latter is part of an LC oscillator circuit, the ouput frequency will now depend on barometric pressure. The output from the oscillator is buffered by T2 and fed to a divide-by-ten counter (IC1), followed by a further divide-by-eight counter (IC2). The frequency has now been reduced to the point where it can be handled by a frequency-to- barometer voltage converter, type LM2907 (IC3). The output voltage from this 1C will therefore vary with barometric pressure. For obvious reasons, this system will only work with reasonable linearity over a limited range. Fortunately, barometric pressure doesn't vary much either (± 5%), so that a suitable choice of pressure sensor, core and coil will provide a sufficiently accurate 'barometer'. The only real adjustment point in the circuit is PI . Initially, this is adjusted until the oscillator starts — a voltage will then appear at the output. If the oscillator frequency range is outside that of the frequency-to-voltage converter, this can sometimes be corrected by readjusting PI. If the frequency is too far off, however, the value of C2 will have to be changed. The preset at the output (P2) is used to adjust the output level as required. A digital or analogue millivoltmeter can be connected at this point. Editorial note: At first sight, there doesn't seem to be much point in stripping an existing barometer in order to connect an electrical pointer instrument instead of the mechanical pointer. However, having an electrical voltage available that is proportional to barometric pressure opens a whole range of possibilities. Just to name one: What about designing a home weather- forecasting computer? Y. Nijssen (France) tv programme multiplexer Mr Frose has submitted an idea which could well revolutionise the viewing habits of the nation. Like many of us, he apparently has regular battles with the rest of his family over the choice of TV pro- grammes - and has decided to do something to restore harmony in the living room. After many long winter evenings spent in his attic study, pondering on the peculiar taste in programmes of others, he has come up with the following radical solu- tion. Although he is not yet ready to divulge all the details of his invention, the general principle is now free for publication. The main point is that the TV set is not switched to just one of the channels available: all channels are selected simultaneously! To be more precise, the channels are scanned and each is displayed very briefly on the screen. In the interests of preserving the viewers' sanity, each is provided with a pair of special spectacles. These contain shutters, which are operated by electro- magnets. In each pair of spectacles the shutters are only opened at the moment that the corresponding TV programme is being displayed on the screen. The basic multiplex circuit is shown in figuur 2. Thus the viewer with spectacles 'V sees the first programme only; viewer '2' watches the second programme, and so on. Each pair of spectacles is accompanied by a set of headphones, which provide the sound output for the corresponding channel. In this way, several people can watch the same TV set — each following their own programme. All in all, a stroke of genius! The author is presently working on the possibility of adapting the circuit for FM radio transmissions in both mono and s? ^ electronic weathercock 46 The disadvantage of most wind direction meters is the need for complicated mechanical drive systems which are necessarily prone to wear. The unit described here is intended to offer a solution to this problem. A disc which contains a number of slots is attached to the spindle of the weather vane. A light source is mounted above the disc, and a row of 3 light dependent resistors (LDRs) is situated below the disc - as shown in figure 1. Which LDRs are illumina- ted will depend upon the position of the disc, and therefore upon the direction of the wind. If the slots in the disc are correctly positioned (see figure 2), the information from the LDRs can be coded into BCD format, such that each of the eight main compass points will correspond to a particular BCD code. By means of a BCD-decimal converter, the resultant information, and hence 0 0 north 0 0 north-east 0 0 east 0 0 south-east 1 0 south elektor july/august 1979 the direction of the wind, can then be displayed on a circle of LEDs. The 'electronics' of the unit are shown in the circuit diagram of figure 3. If no light falls upon an LDR, the associated transistor is turned off and the input of IC1 is pulled down to 0 V via the 470 £2 resistor. As soon as sufficient light falls on an LDR to turn the transis- tor on, however, the corresponding input of IC1 is taken high. Thus the state of the three LDRs is translated into a BCD code applied to the inputs of the 7442. Depending upon the combination of logic '0' s and '1' s at the four inputs, the 7442 takes one of its outputs low, with the result that the corresponding LED lights. The BCD code for each of the eight compass points is listed in table 1. Editorial note: If the disc should come to rest exactly between two compass points. 3 e.g. between south and south-east, then the effect of stray light may cause the wrong code to be presented to IC1. and the NZZLED will light up. Therefore, it would be better to use the 'Gray code', i.e. 000 = N; 100 = NE; 110 = E; 010 = SE; Oil = S; 111 = SW; 101=//; 001 =NW. D. Maurer (The Netherlands) UFO detector This somewhat 'different' circuit was sent in by one of our subscribers in the more distant sector of Vega. It was described as being an Earth type UFO detector and may find favour with those of our readers who are constantly plagued by UFO's. The operation of the detector is based on the fact that all UFO's, regardless of type, cause sudden changes in the earth's magnetic field (or so our correspondent tells us, and he should know). These variations in magnetic intensity induce a small voltage in the search coil, L. This voltage is amplified by IC1 and used to trigger the flip-flop formed by N2 and N3, which then turns on the display formed by the array of LEDs. The brightness of the display can be varied by altering the value of R5. This may prove necessary in the event of transistor T2 having too great a gain. The original circuit used a radium elektor july /august 1979 7-37 krokopaard as a search element but as these are not yet readily available on Earth (even in Tottenham Court Road) the circuit was modified for use with a coil. The diameter of the coil, which consists of roughly 5000 turns of 0.2 or 0.25 mm enamelled copper wire, is approxi- mately 23 cm. This means that something over 3.6 km of wire is required in all. We are unable to provide the final test instructions since not too many of our readers have bicycles capable of 14,000 miles per hour. However, there is a simpler method. A magnet is used to set up the circuit. Potentiometer PI is first set to the mid-position and P2 adjusted to roughly two thirds of its maximum value. The magnet is then moved around near the search coil, where- upon the display should light up. The sensitivity of the circuit is adjusted by means of PI. So as to be able to detect even the smallest of UFO's, the circuit will normally be adjusted for maximum sensitivity. The opti- mal setting for P2 will depend upon the speed at which the UFO's are moving and should therefore be determined experimentally. According to Mr. (?) Xantor, if one builds and uses the circuit described here it should be possible to chart the flight paths of all the UFO's which fly over one's house, and the fact that Mr Xantor's compatriots will know they are being observed could well encourage them to instigate a 'close encounter of the third kind'! Xantor (Vega IX*) •Earthly representative: M. Muhr (Germany) current dumping Jk amplifier TO The basic principle of a current dumping amplifier has been de- scribed previously in Elektor (see Elektors 8 and 21). To recap briefly, the circuit exploits the fact that, due to the effect of the four passive com- ponents, R2, R3, L and C shown in figure 1, the non-linear characteristic of the output stage becomes unim- portant. Thus it is possible to use a Class-B output stage (i.e. the output transistors are biased to their cut-off points so that there is no quiescent output current) with all the advan- tages and none of the disadvantages (crossover distortion) of that con- figuration. The circuit shown in figure 2 func- tions on the above described current dumping principle. According to the designer it is capable of delivering 100 W into 4 with a claimed har- monic distortion of 0.006% at 1 kHz and 60 W. If one possesses the equip- ment to make accurate distortion measurements, C3 can be replaced by a 22 pF variable capacitor, and the latter adjusted for minimum distor- tion. The circuit also has a useful extra facility in the form of a dummy load (R9). The output stage is driven (via driver transistors T2 and T5) by transistors T1 and T4, which are connected in series with the positive and negative supply lines respectively of IC1. In this way the slew rate of the 741 is improved. If, however, a faster op-amp is desired (e.g. the LF 357), then the value of R4 and R7 should be altered to provide the correct quiescent current for the 1C, so that the output stage draws no current. G. Schmidt (Germany) elektor July /august 1979 slave flash With the aid of this simple circuit a normal flash unit can be converted into a 'slave' flash. In this way it is possible to take photographs using a number of separate flash units, without getting tangled up in a con- fusion of cables. The slave flash does not require a separate supply voltage, but rather draws its current from the contact used to trigger the master flash. There is normally some 1 50 to 200 V on this contact, and this is divided down by R4 and R5 to provide a suitable low supply voltage. C2 is an AC-decoupling/reservoir capacitor. Since the current consumption of the circuit is not much more than several HA, the extra drain on the power supply battery will be negligible. When the light generated by another flash unit falls upon the photo- transistor, a voltage pulse is gener- ated across R1. This is fed via Cl to T2, where it is amplified to a level suitable to trigger the thyristor, and photo-flash One of the more specialised areas of before the subject is illuminated. The photography is the use of ultra-short lighting is provided by a high-speed exposure times to capture events (electronic) flash unit capable of occuring at high speed. Everyone will providing extremely short exposure have seen the resu Its of this technique times. at one time or another: a light bulb One problem with this method is in the process of disintegrating under determining the exact moment at the impact of a hammer, or, as in the which the flash gun should be trig- picture shown here, a splash of gered. Because of the extremely water. Photographs of this type can short time intervals involved, this can be taken fairly simply by employing really only be done electronically. In an 'open-lens' approach, i.e. the the case of the picture shown here, photo is taken in a darkened room the drop of water was sensed by a aid of the following circuit, provided and the lens of the camera is opened photoelectric cell, which, with the a predetermined delay before delay with it, the flash. of intense light. The component values have been Any 8 A/400 V thyristor should calculated to ensure that the flash prove suitable, although it may prove will not be spuriously triggered by, necessary to increase the value of C2 e.g. incandescent lamps, but will slightly (since this capacitor supplies react only to other flash units. The the greatest portion of the gate cur- circuit is sufficiently sensitive that rent). The socket for the flash unit the master flash need not be focused cable can best be made using a flash on the phototransistor; it will react extension cable, to the reflected light. It may be necessary, however, to shield the phototransistor from other sources F. Schaffler (Germany) elektor july/august 1979 7-39 triggering the flash. An LED (D1) and phototransistor T1 are used to form the light gate. When the light from the LED is interrupted, there is a sharp rise in voltage across R2. This is fed via T2 to the trigger input of the 555 timer (IC1). When the delay period provided by the timer has elapsed, a negative-going pulse appears at the output of this 1C (i.e. pin 3), with the result that T3 and the thyristor are turned on, and the flash is triggered. Any 0.8 A/400 V thyristor will prove suitable, however it may be necess- ary to increase the value of C5 slightly. The DC bias voltage on tne collector of T2 should be adjusted to 2 V by means of PI. With the aid of P2, the delay provided by the circuit can be varied between approximately 0.25 and 1.3 s. By altering several component values the range of possible delays can also be varied. The delay time is given by 1.1 x R x C2, where R is the series connection of P2 and R4. The mini- mum permissible value for R2 is 1 k. As one might expect, the light gate is the section of the circuit which will present the most difficulty when it comes to construction. Whatever arrangement is chosen will depend largely on individual circumstances, however the sensitivity of the circuit is greatest when the LED and photo- transistor are mounted as close together as possible. Care should be taken to ensure that light from the LED cannot reach the lens of the camera. F. Schaffler (Germany) doorbell drone There seems to be no end to the variety of different sounding door- bells which people are prepared to de- sign. Everything from the Hallelujah Chorus to the chimes of Big Ben have been simulated for the entertainment of visiting door-to-door salesmen. However, the imaginative resources of our readers would appear to be inexhaustible. The circuit presented here produces a sound which is somewhat akin so that of bagpipes, and while not exactly signalling the death knell of original bagpipes, should prove popular north of the border. The circuit is also intended to foil ill-mannered visitors who insist on pressing the doorbell for an annoying long time, since the bell automatically cuts out after approximately two seconds. As can be seen from the circuit diagram in figure 1, very little in the way of components is required to build this 'exclusive' doorbell. A 4046 phase locked loop 1C (IC1) is used as a voltage controlled oscillator with a nominal frequency of around 800 Hz determined by the values of R3 and Cl. The actual frequency of the oscillator is controlled by feeding the output signal to one half of a dual flip-flop (IC2) which is connec- ted as a divide-by-two counter, and then to a binary ripple counter. The ladder network of resistors R4 . . . R 1 1 provides a staircase voltage, which is fed back to the control voltage input (pin 9) of IC1 , thereby producing the 'bagpipe' effect. At the end of the count cycle IC4 takes the inhibit input of IC1 high, thus ensuring that the 'bagpipes' do not continue to sound if the bellpush is held down. R12 and C2 automatically reset IC4 the next time the bellpush is de- pressed. Editorial Note: Although the original circuit as shown in figure 1 will prove an effective remedy against over en- thusiastic bell-pushers, unfortunately it does not take into account what will happen if the pushbutton switch (S) is only depressed for a brief moment. Since releasing the switch interrupts the supply voltage to the circuit, the bagpipes will be cut off in their prime! To forestall a flood of letters from incensed Scotsmen we include the following possible modi- 2 IC1 IC4 IC4 fications. As CMOS ICs draw very little current they can be provided with a continuous supply voltage. By using the other flip-flop in IC2, the circuit can be modified to ensure that the entire ' melody ' will be heard even if the bellpush is only depressed momentarily. The circuit of figure 1 should be altered as follows: — switch S is replaced by a link — C2 and R1 2 are omitted — the connection between pin 11 of IC4 and pin 5 of IC1 is broken The circuit should then be connected as shown in figure 2. S. Halom (Israel) 7-40 elektor july /august 1979 opto-transmitter for speech Transmitting speech by modulating a beam of light isn't new. Usually, infra-red is used — as in some 'wire- less' headphone systems. However, it is also possible to use a normal torch bulb. The only point to note is that the filament must be run at a fairly high temperature, as otherwise the response will be too slow. For this reason, the bulb must be run at almost full brightness, with a very low modulation depth — about 1%. On the other hand, this has the advantage that the high light output carries over greater distances — cer- tainly if a so-called halogen lamp is used, as in this design. Using amplitude modulation would have the advantage that it makes for a simple receiver design. It would also have a few major disadvantages, particularly the fact that a suitable output stage for the transmitter (capable of driving a 60 watt lamp) would be rather expensive. For this modulation was chosen. The input signal from the microphone is amplified by T1 and passed via the 'modulation depth control' (PI) to a further amplifier stage, IC3. At this point, a DC offset is added to the signal. This offset is set by P2 to obtain the correct duty-cycle of the final output signal - more on this later. The pulse-width modulated signal is obtained by feeding the (audio + DC) output of IC3 and a 35 kHz triangular wave-form to the two inputs of a comparator (IC4). The 35 kHz signal is produced by IC2. This opamp is used in what would normally be a multivibrator circuit (producing a square-wave), but owing to its limited slew rate the output is actually a triangular wave. The out- put of the comparator, IC4, is a square-wave with a duty-cycle that varies with the speech signal. The average duty-cycle is set by P2 at on for 25% of the time. The lamp can be switched off by closing S2. A 12 V car battery can be used to power the circuit. It should be noted, however, that a 6 V lamp must be used in that case (with any power rating up to 60 W). Why a 6 V lamp on a 12 V supply? Surely that'll give four times the nominal power dissipation in the lamp? Sure enough, it will — for a quarter of the time, since a duty-cycle of 25% is used: the lamp is only on for a quarter of the time. And four times one quarter is one. One part of the circuit remains to be discussed. IC1 is used as a 1 kHz multivibrator. As long as SI is open, this signal is used to modulate the output. A useful feature when 'lining up' the transmitter and receiver. opto-receiver for speech This circuit is intended for use in conjunction with the 'opto-transmit- ter'. The modulated light beam is detected by a photo-transistor, T1; the output from this transistor is amplified by IC1. The overall gain of this stage can be adjusted by PI and P2 (fine and coarse adjustment, respectively). The optimum adjust- ment depends on the ambient lighting; it can be found (once the transmitter and receiver are correctly aligned) by 'tuning in' the 1 kHz test tone from the transmitter. After the volume control, P3, the signal is amplified by IC2 and IC3. The out- put stage is derived from an earlier Elektor circuit. If the transmitter and receiver are to be used in a reliable communica- tion system, some attention must be elektor july/august 1979 7-41 paid to the mechanical and optical adjustable base. The author claims side of the units. Some kind of that he has succeeded in obtaining reflector-and-lens system will be reliable communication at distances required both at the transmitter and of well over a mile — after dark, at the receiver. In practice, old car that is. headlamps have proved quite satis- If two-way communication is re- factory. Both units must be mounted quired, the temptation to run a on a sturdy tripod or some similar transmitter and a receiver off the calculator I as chess clock With only one or two minor modifi- cations, it is possible to adapt a calculator to increment or decrement two separate numbers and display the results simultaneously. If we assume a calculator has an 8-digit display, two 4-digit numbers can be displayed thus: 4321 4321 number number A B It is a simple matter to subtract (or add) '1' to either of these numbers. In the case of number B, a straight- forward subtraction is all that is required, whilst in the case of number A, the correct result can be obtained by subtracting 10000 from the 'total' number on the display. Thus: 43214321-10000=43204321 Number B remains unaltered during this operation. With the aid of the circuit described here, this method can be used to allow the calculator to function as a chess clock, i.e. to display the amount of time each player currently has to complete the remainder of his moves. The circuit itself is same supply should be resisted. It won't work, unless the transmitter is switched off before the receiver is switched on. A. J. Mellink (The Netherlands) 7-42 elektor july /august 1979 straightforward. As long as a player Is to move, the number of seconds he has left is continuously decremented by a clock generator. The only constraints on the type of calculator used is that it must have an 8-digit display and memory recall (MR) key (i.e. the contents of the memory can be recalled using only one key- stroke) . The first step is to store the number 10000 in the calculator's memory, and then to enter the number of seconds each player is to be allowed as a time limit. For example, if both players are to have 2 hours, the number 72007200 should be entered. The clock oscillator is naturally adjusted (by means of PI) to pro- duce a clock pulse every 1 second. Next the 'subtract' key is depressed and the clock oscillator is started by pressing SI. If, for example player A is to move, each negative-going edge of a clock pulse will transfer the contents of the memory to the dis- play, whereupon, approximately 0.1 seconds later, the positive-going edge causes the actual subtraction to be performed. When player A has moved, he presses his 'clock' button, thereby triggering the flip-flop formed by N1, N2. Each clock pulse will then cause a '1' to be subtracted from the display. The pulse duration (T1) of the oscillator must be short, since the display is interrupted during this period, how- ever it must also be long enough to cover the time between two calcula- tor instructions plus the time taken for C2 (C3) to discharge to a suf- ficiently low voltage. The time constants R1 • Cl, R2 • C2 and R3 • C3 should be sufficiently long to ensure that a calculator instruction can be recognised as such. Two LEDs provide a visual indication of whose move it is. With a suitable clock frequency the duration of the game can be dis- played directly in minutes. N. Vischer (Germany) sound processor Starting with, for example, a music signal, or indeed any other type of sound, the following circuit can be used to generate a variety of interes- ting tonal effects. The input wave- form is sampled, and a small portion of the signal is stored in a memory. The signal is cycled repetitively through the memory before being read out again. In this way a new periodic signal which is obviously derived from, but completely different to, the original input signal is obtained. A digital register is used to store the sampled portion of input signal. This means that analogue to digital conversion is necessary. The conver- sion process adopted here is a simple version of the delta modulator used in the digital reverberation unit published in Elektor 37. The input signal is first differentiated by A2, and then clipped by the two reverse- parallel connected diodes, D1 and D2. The signal is amplified to a suitable input level for the shift register by means of A4 and N3. The shift register (IC4) has two inputs: pin 5 and pin 7. Which of the two inputs is used at any given moment is determined by the logic level at pin 3 of the 1C, and thus by the position of switch SI . With the switch in position a) (read-in) pin 5 of the 1C is the input, whilst with the switch in position b) (read-out) pin 7 is the input. In the latter case the input signal consists of an in- verted version of the output signal of the shift register, so that the contents of the shift register are cycled round and round, generating a new, periodic signal at the output. This digital signal is reconverted into its analogue counterpart by an RC integrator network. The clock signal for the shift register is derived from the oscillator built round N4. The clock frequency and hence both the length of the input signal sample and the repetition rate can be varied manually by means of P3. Different types of effect can be obtained by varying the clock frequency during the read- in and read-out cycles. A. Visser (United Kingdom) 1N914 elektor july /august 1979 7-43 digital contrast meter When enlarging photographs, two factors are of prime importance, the required exposure time, which is determined by the density of the negative, and the contrast of the negative. The latter determines which grade of paper should be used in order to obtain a print with good overall tonal contrast. The contrast of the negative is basically the difference between the lightest and darkest portions of the exposed film. If we take the second log of this difference, we obtain the contrast ratio of the negative. Thus, for example, if the lightest part of the negative lets through 8 times as much light as the darkest part, the contrast ratio of the negative will be 3 (2 3 =8). The circuit employs two light depen- dent resistors as sensors, and displays the contrast of the negative directly on a seven-segment display. The operation of the circuit is illustrated in the block diagram of figure 1. The amount of light falling upon the LDRs determines the frequency of the squarewave generators to which they are connected. The output of 1 both oscillators are fed toadivide-by- sixteen counter. The pulses for the topmost counter (for the lightest portion of the negative) are counted for a period which is determined by the frequency of the signal from the lower counter. The result is that the value stored in the subsequent binary counter represents the ratio of the two clock generator frequencies, and hence the ratio of the lightest and darkest portions of the negative. The contents of the 'ratio' counter, are then fed to the log 2 converter, the output of which is decoded and displayed. A measurement cycle is initiated by closing the start switch, which sets the flip-flop and resets the 7-44 elektor july /august 1979 counter. The complete circuit diagram of the contrast meter is shown in figure 2. With the exception of the two clock oscillators, in which 555 timers are used, the circuit is low power Schottky TTL. IC2 and IC9 are the divide-by-16 counters, whilst the binary 'ratio' counter consists of IC3, IC4 and IC5. This counter uses negative logic, i.e. it begins with all outputs high, and then counts down. Thus at the start of each measurement cycle, a 'load' pulse, and not as one might expect, a 'reset' pulse, is applied to the counter. The paralleled data inputs of the counter are all held high, and the pulses to be counted are fed to the 'down' input. The reason for adopting this ar- rangement is the log 2 converter, which also uses negative logic. This converter is formed by IC6, a deci- mal-BCD priority encoder. This 1C recognises the highest order bit in the input signal which is active, i.e. logic 0, and outputs the BCD equivalent of that bit's 'weight'. For example, assume the counter holds the binary code for the number 8 (base 10). All bits will be logic 1, with the except- ion of 13 (remember, we are working with negative logic). IC6 recognises that the highest order bit which is logic 0, is the third bit, therefore it outputs the BCD code for 3. As we have already established, 3 is log 2 of 8, thus the conversion is complete. The divide-by-sixteen counter, IC9, is followed by a monostable, which provides a reset pulse to the flip-flop formed by N6 and N7 at the end of each measurement cycle. The set pulse is provided by a second monostable, which is triggered by the start switch, SI. The decimal point on the seven- segment display is lit during each measurement cycle. Since IC6 uses negative logic, its output signals must be inverted (by N2 . . . N5) before they can be fed to the BCD-seven-segment decoder, IC7. The display is a common-anode type, e.g. HP 5082-7750, FND 557. Any type of LDR which is intended for measurement purposes, as opposed to switching applications, can be used. The type named in the circuit diagram is particularly suitable. The circuit should be adjusted such that, as far as possible, the frequency of the two 555 oscillators is the same when identical amounts of light are falling on both LDRs. The LDRs should therefore be laid upon a surface which is evenly illuminated. Coarse adjustment is performed by varying the values of Cl and C2, whilst fine adjustment — which in many cases will be all that is required - is carried out with the aid of PI. J. van Dijk (The Netherlands) emergency flight controller When flying radio controlled model aeroplanes there is always the chance that a fault will occur in either the transmitter or the receiver, and that the plane will no longer obey the control signals. If one is fortunate, the model will fall near the operator, however it may equally well happen that the plane will remain in flight for a considerable distance, and that the last the unfortunate owner will see of his model is it disappearing over the horizon! The circuit des- cribed here is designed to prevent the latter possibility, and also attempts to lessen the severity of the crash, by ensuring that the model will assume a glide trajectory. The circuit reacts to a loss of output from the receiver. When both trans- mitter and receiver are functioning normally, the position of the servos is determined by the transmitted control pulses. Depending upon the make of servo, a pulse width of 1.5 ms corresponds to the neutral position, whilst pulse widths of 1 and 2 ms correspond to the extreme positions of the servo. When the stream of control pulses is interrup- ted, the three multivibrators in the circuit set the servos to a predeter- mined position. Input K4 is connected to the output of the receiver. Inputs K1, K2 and K3 are connected to the receiver servo control outputs for the elevator, rudder and engine throttle respect- ively, whilst outputs K1, K2 and K3 are connected to the correspon- ding servos. As long as control pulses are received via K4, the multi- plexer, IC3, ensures that inputs K1, K2 and K3 are connected to the corresponding outputs (and servos). However when the control pulses are interrupted, the multiplexer switches to the outputs of the three oscillators. The position of PI, P2 and P3 then determine the position of the servo control horns. A mercury switch is connected across P3 (elevator con- trol). The switch should be mounted such that it will close when the angle of descent is greater than 10°, where- upon the position of the elevator servo will be determined by the value of R x (10 . . . 200 k). W. van Staeyen (Belgium) FM PLL using CA 3089 The following circuit should prove particularly interesting to those readers considering building their own FM tuner. The novel feature of the circuit is that the well-known CA3089 1C is not used as a conven- tional IF amplifier/demodulator, but as part of a phase locked loop. The resulting circuit is slightly more expensive and complicated than the 'standard' amplifier/de- modulator circuits, however the results obtained are a significant improvement on those of a 'classi- cal' CA 3089 IF strip. The circuit is intended as an IF amplifier /demodulator for a double conversion tuner operating at an intermediate frequency of 455 kHz. When using a PLL circuit for FM demodulation the S/N ratio of the demodulated signal is proportional to the ratio of frequency deviation/I F frequency, hence the PLL demodula- tor should operate at the lower IF of 455 kHz. Briefly, the circuit functions as follows: The IF input signal is first fed to Cl, which removes any high frequency signal components which might affect the operation of the PLL. The exact value of Cl will depend upon the mixer circuit which converts the 10.7 MHz output of the front end to the desired IF fre- quency of 455 kHz. If the input signal is sufficiently 'clean' then lowpass filtering can be omitted. The CA3089 amplifies and limits the IF signal to approximately 300 mV, whereupon it is fed to the on-chip quadrature detector. Output voltage U, can be used to drive a signal strength meter. The control voltage for the PLL VCO is taken from the AFC output (pin 7) of the 1C. The voltage divider formed by R8/R9 is required to set the correct DC bias on pin 5 of IC2. Lowpass filtering of the control signal is provided by R10 and C8. Largely for reasons of good linearity and high stability, a modern inte- grated circuit VCO, the NE566, was chosen. However the stability of the VCO is also significantly influenced 58 by the associated frequency-determi- ning components. PI should prefer- ably be a cermet trimmer, whilst a metal oxide resistor should be used for R1 1 and a ceramic disc capacotor with extremely low temperature coef- ficient should be used for C9. With the aid of a variable voltage divider (P2), the squarewave output voltage at pin 3 of IC2 (approximately 5.4 V) is reduced to roughly 0.3 V and then fed back via C11, to the input of the quadrature detector of IC1. The demodulated output signal is available at pin 6 of the CA3089. If a squelch (muting) facility is required, this can be realised by feeding a positive control voltage to pin 5 of IC1, thereby suppressing the audio output. Finally, the audio signal is lowpass filtered and this output can be used with virtually any stereo decoder. 7-46 elektor july/august 1979 Although the name 'logic analyser' is generally understood to denote a quite different type of circuit, there are good reasons for borrowing the title to describe the electronic switch presented here. The switch is intended to simultaneously display the logic state of a number of test points in a digital circuit on an oscilloscope screen. The circuit functions as follows: The oscillator formed by N9/N10 generates a clock signal with a frequency of either 1 kHz or 100 kHz, depending upon the position of switch S2. This signal is fed to a counter, IC4, which, depending upon the position of switch SI, can be preset to either '1000' (8), '1010' (10) or '1100' (12). The counter will therefore cycle through either the 8, 6 or 4 remaining output states before resetting to one of the above (preset) values. The result is that the A, B and C outputs of IC4 will count from either '000' to '111', from '010' to '111', or from '100' to '111'. The binary code present on these outputs determines which inputs are selected by the multiplexer, IC3. The multi- plexer scans the inputs in turn, and transfers the input signal to the out- put. Depending upon the position of SI, therefore, 4, 6 or all 8 inputs will be scanned. To ensure that each input signal is displayed 'separately' on the screen, the corresponding binary code is also fed to inverters N2, N3 and N4, which, with the aid of the summing network R1 . . . R4, ensure that a different DC offset is added to each signal. Thus each signal will appear at a different 'height' on the screen. The trigger signal (TR) for the oscilloscope timebase is derived from the circuit under test. For slower scopes in particular, variable capaci- tor Cl can be adjusted to obtain optimal picture quality. P. C. Demmer(The Netherlands) 60 quick starter for fluorescent lamps An annoying disadvantage of fluor- escent lamps compared to the incandescent variety is the flickering delay before they actually burst into life. This is because initially the gas in the tube is not at a sufficiently high temperature to ionise easily. Another reason is the fact that there is no control over the point on the mains waveform at which the current through the starter coil is interrupted. The following circuit is designed to elektor july /august 1979 7-47 resolve these problems and ensure a flicker-free start. When the mains voltage is applied, the filaments of the lamp, Lai, are pre-warmed for a period of approx- imately 1 second (depending upon the position of P2). At that stage the current flows through the rectifier, B1, and transistor T5. Once the lamp has reached a sufficiently high temperature, it can be started. To ensure that the voltage induced in the choke (LI) is as large as possible, the current through the coil should be interrupted when it is at a maximum. The correct time is determined by the circuit round T1/T2. The pulse produced by T1/T2 triggers flip-flop N2/N3, with the result that transistor T5 is turned abruptly off. The resultant voltage induced across LI ignites the pre-warmed lamp. The RC network R5/C3 ensures that the flip-flop is automatically reset at switch-on. Due to its inductive nature, the voltage across the coil is shifted in phase with respect to the current through the coil (the voltage leads the current). T1/T2 must therefore pro- vide a pulse just after the voltage has reached its maximum value. Poten- tiometer PI should be adjusted until the lamp starts properly each time. The best setting for this potentio- meter will depend upon the type of lamp used. Transistor T5 dissipates little power and for so short a time that it does not need to be cooled. D. Kraft (Germany) flashing badge Although primarily intended as a conversation piece at parties etc. the circuit described here can be used in numerous applications ranging from flashing house numbers to seat belt reminders. The circuit itself could hardly be simpler as it uses just one LM 3909 1C and a capacitor. When used as a flashing badge, the circuit is designed for use with a single HP7 (or similar) battery which can be mounted inside one half of a battery holder while the capacitor and 1C are mounted in the other half. There are a number of possibilities for the badge display itself. The author suggests the use of a line-o-light LED display or a seven-segment display (encapsulated in a suitable resin) to show the initial of the flasher! Prospective constructors should bear in mind that the maximum output capability of the LM 3909 is around 50 mA. L. Goodfriend (United Kingdom) 7-48 elektor july /august 1979 battery monitor Only three LEDs are used to give an indication of the car (or boat) battery condition. The LEDs light as follows: D3 < 12 V D3+D4 12... 13 V D4 13... 14 V D4 + D5 > 14 V Preset P2 sets the voltage above which D3 goes out (13 V); PI sets the point at which D4 lights (12 V), finally, PI sets the voltage above which D5 lights (14 V). The calibra- tion procedure is rather critical, and will have to be repeated several times since the various adjustments affect each other. The photo shows the author's proto- type. All components are mounted in a small plastic tube, with the LEDs at one end and a 'cigarette lighter' plug at the other. The unit can then easily be plugged into the correspon- ding socket on the dashboard for a quick check of battery condition. If the suggested colours are used for the various LEDs, red will correspond to 'battery low'; yellow (with or without red) indicates 'battery normal'; and green will normally light when the battery is 'on charge'. S. Jacobsson (Sweden) oscilloscope light pen This circuit is intended to display any desired character on an oscillo- scope screen. The character is pro- duced by erasing certain dots in an eight by eight matrix with the light pen. An oscillator, formed by N1 . . . N3, provides a clock signal of approximately 2 kHz to a seven stage ripple counter, IC2. The out- puts of this counter are used to address part of the memory circuit IC3. It is apparent from the circuit diagram, that three of these outputs, together with the output of the RAM itself, are used to provide an analogue signal (Y) for the Y input of the oscilloscope. To enable the scope trace to be triggered at the correct time a short synchronisation pulse (T) is available from N4. The phototransistor T1 (OCP 70 or equiv- alent) should be mounted inside a light tube for better directional response. Once the oscilloscope is set up and the matrix display is visible, switch SI should be set to the position shown in the diagram. Individual dots can now be erased by holding the light pen up to the re- quired dot. The phototransistor elektor july /august 1979 7-49 detects the arrival of the electron beam by the increase in light intensity and, once detected, provides a write pulse for the memory via N5, N6 and associated components. With SI in the position shown, this pulse will write a '0' into the corresponding memory location. To replace dots back into the display the original matrix can be moved up the screen whereupon a second matrix containing the missing dots will become visible. Switch SI is then placed in the other position and the light pen again held up to the dot to be moved back into the upper matrix. It can be seen from the circuit dia- gram that only 64 of the possible 1024 memory locations are used and that A6 . . . A9 of IC3 can be switched to provide a total of sixteen different characters by extending the ladder network (4k7 and 10 k re- sistors). These address lines can also be encoded by suitable circuitry to convert the unit into a hexadecimal decoder and display, or even to provide an animated display. A. N. Dames (United Kingdom) analogue frequency meter This circuit for a frequency meter offers six ranges: 100 Hz, 1kHz, 10kHz, 100kHz, 1 MHz and 10MHz. Switching between ranges is per- formed automatically , and the display is analogue. The input signal is first amplified to TTL level by means of IC1, T2 and N1, whereupon it is fed to a series of decade dividers (IC3...IC7). Thus a signal with a frequency between 10 Hz and 100 Hz can be obtained either at the output of N1, or at the output of one of the decade counters. The analogue section of the circuit (MMV1 , the moving coil meter and associated components) is designed to produce a full-scale meter deflection for an input signal of 100 Hz. A multiplexer, IC8, is used to ensure that the correct divider output is selected. The multiplexer is clocked by counter IC10. Each of the input signals are fed to the output in turn, as long as the frequency of the out- put signal is lower than 10 Hz or higher than 100 Hz. If the frequency is lower than 10 Hz, then it is too low to keep the retriggerable mono- stable MMV2 continuously in the triggered state, with the result that the oscillator formed by N2 is started and clock pulses are fed via IC10 to the multiplexer. If, on the other hand, the frequency of the output signal is greater than 100 Hz, MM VI remains permanently triggered, so that MMV2 no longer receives trigger pulses. This mono- stable thus resets, thereby ensuring that the oscillator is enabled and the multiplexer continues to cycle through its inputs. Only when the output frequency of the multiplexer is between 10 Hz and 100 Hz is the oscillator stopped, since MMV1 isnot triggered sufficiently often to keep MMV2 in the triggered state. The result of stopping the oscillator is that the multiplexer in turn stops at the input which provided the signal of the appropriate frequency. LEDs D5 ... D10 provide an indication of the range selected. To calibrate the meter, P3 and P4 should initially be set to the mid- position, whilst PI and P2 are ad- justed for maximum and minimum resistance respectively. A 100 Hz signal (with an amplitude of greater than 1 V) is fed to the input of the circuit and P3 adjusted such that the multiplexer begins to cycle through its inputs. This can be verified by checking that the LEDs light up in turn. P2 is now adjusted until the 100 Hz range LED (D5) lights up. PI is then adjusted for full-scale deflection on the meter. Finally, the circuit can be adjusted for maximum input sensitivity (approx- imately 10 mV) by means of P4. H. Bichler (Germany) 7-50 elektor july/august 1979 A automatic battery charger Recharging lead-acid batteries is often assumed to be an extremely straightforward matter. And that is indeed the case, assuming that no special demands are being made on the life of the battery. On the other hand, if one wishes to ensure that the battery lasts as long as possible, then certain constraints are placed upon the charge cycle. Figure 1 illustrates the ideal charge current characteristic for a normal 12 V lead-acid battery which is com- pletely discharged. During the first phase (A-B), a limited charging current is used, until the battery volt- age reaches approximately 10 V. This restriction on the charging current is necessary to ensure that the charger is not overloaded (excessive dissi- pation). For the next phase (C-D), the battery is charged with the '5-hour charging current'. The size of this current is determined by dividing the nominal capacity of the battery in ampere-hours (Ah) by 5. At the end of this period the battery should be charged to 14.4 V, whereupon the final phase (E-F) starts. The battery is charged with a much smaller 'top- up' current, which gradually would decrease to zero if the battery volt- age were to reach 16.5 V. The circuit described here (see figure 2) is intended to provide a charge cycle which follows that described above. If the battery is completely discharged (volt- age < 10 V), so little current flows through D3 that T1 is turned off. The output of IC1 will be low, so that the base currents of T2 and T3, and hence the charging current, are determined solely by the position of PI. If the battery voltage is between 10 and 14 V, D3 is forward biased and T1 is turned on. The output of IC1 still remains low, so that the charging current is now determined by both PI and P2. If the wiper voltage of P3 exceeds the zener voltage of D1, then due to the positive feedback via R4, the output voltage of IC1 will swing up to a value determined by the zener voltage of D1 and the forward voltage drop of D2. As a result T1 is turned off and the charge current is 1 t once again determined by the pos- ition of PI . In contrast to phase A— B, however, the higher output voltage of I Cl means that current through PI, and hence the charging current, is reduced accordingly. Since D2 is forward biased, the effect of resistors R2 and R3 will be to gradually reduce the charging current still further, as the battery voltage continues to rise. To calibrate the circuit, P3 is adjusted so that the output of IC1 swings high when the output (i.e. battery) volt- age is 14.4 V. By means of PI the 'top-up' charge current is set to the 20-hour value (capacity of the battery in Ah divided elektor july /august 1979 7-51 Parts list. Resistors: R1 = 12 k R2= 10 k R3 = 82 k R4 = 1 M R5,R6 = 8k2 R7 = 100 SI R8 = 3k9 R9 = 4k7 PI = 100 k preset P2 = 220 k . . . 250 k preset P3 = 10 k preset Capacitors: Cl a = Cl b = 4700/i/40 V T1 = TUN T2 = BD138, BD140 T3 = TIP2955 D1 = 6V8, 400 mW zener diode D2 = DUS D3 = 5V6. 400 mW zener diode IC1 = 741 by 20) for voltages between 14.5 and 15 V. Finally, with a battery voltage of between 11 and 14 V, P2 is ad- justed for the nominal (5-hour) charging current. The initial charging current (phase A— B) is set by the value of the 'top-up' current, and depending upon the characteristics of the transistors, will be approximately 30 to 100% greater. Miscellaneous: Tr = 16 V. 8 A mains transformer B = B80C 10000 bridge rectifier fuse = 0.5 A slo-blo Siemens Components Report Volume XIII, No. 1 March 1978. V When we first published a circuit in last year's Summer Circuits issue which was designed to 'kill' the sound of a DJ's voice between records, little did we suspect that it would provoke such a widespread response. The circuit in question was even men- tioned in a well-known daily news- paper, with several prominent DJs asked for their comments! Such is the evident popularity of the 'DJ killer' (at least among radio listeners, if not actually among the DJs themselves), that we have decided d.j. killer to produce a printed circuit board for it. To recap briefly on how the circuit works: It is possible to distinguish speech from music by virtue of the fact that distinct pauses occur in speech, whereas music is more or less con- tinuous. The DJ killer detects these pauses and mutes the signal whilst the DJ is speaking. The left and right-channel signals are fed into the two inputs of the unit and are summed at the junction of R14, R15 and R16. For use with a mono radio only one input is required. The summed signal is amplified and limited by two high gain amplifiers IC1 and IC2, and is then fed to two cascaded Schmitt triggers, N1 and N2. The output of N2 is used to drive a retriggerable monostable IC4a, the Q output of which is fed to the input of a second retriggerable monostable IC4b. So long as a continuous signal is present at the input IC4a will be continuously retriggered by the out- 7-52 elektor july /august 1979 put signal from N2 and its Q output transmitting speech and PI is used to It should of course be noted that the will remain high. The period of IC4a adjust the sensitivity until D1 goes circuit will suppress only a pure is adjusted, using P2, to be somewhat out during pauses. If the sensitivity is speech signal. It will not, for example, less than the average duration of a set too high then D1 will stay on suppress the voice of a DJ talking speech pause, so that during such continuously due to the circuit being over the music. pauses IC4a will reset. This will cause triggered by noise, whereas if it is too IC4b to be triggered, switching off low then D1 will extinguish during R- Vanwersch the signal for a period which is quiet passages of speech. The radio is adjustable by P3. LEDs D1 and D2 then tuned to a station which is indicate the output states of IC4a broadcasting music and P2 is adjusted and IC4b and are used to set up the until D1 stays on continuously. circuit. Finally, the radio is tuned to a To adjust the circuit P2 is first set to speech programme and P3 is adjusted minimum resistance. The radio is until D2 remains permanently lit then tuned to a station which is during speech. elektor july/august 1979 7-53 r- harmonic distortion meter The following circuit is an improved version of the harmonic distortion meter published in the 1977 Summer Circuits issue. In place of transistors J-FET op-amps are used, whilst the circuit offers the choice of four switched spot frequencies as opposed to the single frequency available with the earlier version. The basic principle and operation of the circuit is the same, i.e. by applying bootstrapping to a twin-T network the Q of the filter is increased to the point where attenuation of the harmonics is eliminated. The filter thus rejects only the fundamental of the input (sinewave) signal, allowing the harmonic distortion products to be measured or examined on an oscilloscope. In the circuit shown here, the input signal is fed via Cl directly to the twin-T network. An input buffer stage is not required. Capacitors C6 ... Cl 3 have a value C, where 4.82 C = — - — (C is in nanofarads and f capacitors in parallel. For example, for a 1 kHz 'notch', 4n82 can be formed by 4n7 + 120 p. The filter is coarse tuned by P1/P3, and fine tuned by P2/P4. Inexpensive multi-turn trimmer potentiometers of the type used for station preset controls in radios and TV's can be employed. When tuning for zero fundamental, the two branches of the network (P1/P2 and P3/P4) should be adjusted alternately. The distortion signal is available at two outputs, D1 and D2. The signal at D2 is amplified by IC3 so that it is ten times greater than that at D1. Once the filter has been optimally tuned and no further reduction in the fundamental can be obtained, the peak-peak value of the distortion signal (D pp ) and the peak-peak value of the input signal Uj pp should be measured. The percentage distor- tion can then be calculated as follows: in kilohertz), whilst C2 . . . C5 have a value 2C. Odd values can be ob- %d pp = ^ for D2. tained by choosing two suitable u ipp parts list resistors: R1 - 100 k R2 = 33 k R3 = 27 k R4.R5 = 1 k R6 - 10 k R7 = 2k2 R8 = 18 k R9 * 1k8 RIO = 12 k R 1 1 =1 k P1,P3 = 10 k preset P2.P4 ■= 4k 7 preset Capacitors: Cl - 1 p IMKM) C2a . . . C13b: see text C14.C15 = 2p2/16 V Semiconductors: IC1.IC2 = LF356 IC3 = LF356, LF357 Miscellaneous: SI = three-pole, multi-way switch. elektor july/august 1979 7-55 Resistors: Resistors: R1.R6.R12 *= 22 k R2,R3 = 100 k R4 = 330 SI R5 - 2k2 R7.R9- 1 k R8 * 4k7 RIO - 3k9 R1 1 * - 120 n PI * 4k7 preset P2 = 10 k preset Capacitors: Cl = 560 n C2 = 47 p C3 - 22 n C4 = 470 p/63 V C5 - 47 p/6 V C6 = 2n2 C7 = 100 n C8,C9 = 100 p/35 V Semiconductors: D1.D2 = 1N4001 D3 = 5V6/400 mW zener diode D4.D5.D7 = 1N4148 D6 = LED T1.T2 = BC107B, BC546B or T3 Q = BC 1 77B or equ. IC1 = 555 Miscellaneous: LI = 100 mH US transducer: see text expensive, we are left with ultra- sonics, if we are looking for a reason- ably simple and cheap transmitter/re- ceiver. Because of its inherent simplicity, amplitude modulation (AM) was chosen in preference to the qualita- tively superior transmission system of frequency modulation. However providing one is reasonably ingenious in the design of the receiver, it is still possible to obtain highly acceptable quality from an AM system. The cir- cuit of the receiver is described in a companion article; the remainder of this article deals with the transmitter. Apart from the supply stage, the circuit consists of only two sections: an audio amplifier stage (T1, T2) connected with negative feedback, and an astable multivibrator (IC1). Transistor T2 is switched on and off by the astable at an ultrasonic fre- quency. Thus at the collector of this transistor is a signal whose amplitude is varied in accordance with the input audio signal, and whose frequency is determined by the astable multivi- brator. This signal is transmitted via an ultrasonic transducer. The design of the audio amplifier stage is such (virtual earth configur- ation) that the astable multivibrator has very little effect upon the quality of the input signal and distortion is minimal. The input sensitivity of the audio amplifier is about 60 mV. The modu- lation depth of the input signal can be varied by means of PI , whilst the fre- quency of the astable multivibrator, and hence of the transmitted ultra- sonic signal, can be varied between 15 and 35 kHz with the aid of P2. The optimal transmission frequency is determined in conjunction with the receiver and the type of trans- ducers used. The supply stage is extremely simple. Space is provided on the printed circuit board for a current source (T3), which can be used to charge ni- cad cells in the receiver, should these be used. The charging current is 6 to 7 mA, although this figure can be increased by altering R 1 1 accord- ingly. Various types of ultrasonic transducer are suitable. A more detailed discussion of this point is contained in the accompanying article on the receiver circuit. 7-56 elektor july /august 1979 E A high quality servo amplifier can be built using only one 1C and a handful of passive components. The SN28654 (Texas Instruments) contains a pulse- width modulator and an output stage that is capable of driving servo- motors (see figure 1). An input pulse at pin 3 is compared to a pulse that is generated by an internal monostable multivibrator (the 'monoflop'). The resultant pulse is stretched (using RC networks and Schmitt triggers) and passed to the output stage and from there to the motor. The complete circuit is shown in figure 2. Apart from the RC networks (R5/C4 and R8/C5) and some de- coupling capacitors, the only external components are the servo-motor and the associated servo-potentiometer. This potentiometer controls the timing of the internal monoflop, so that the motor will run until the internal pulse length corresponds to the input pulse — provided the motor is connected the right way round, of course! The printed circuit board (figure 3) offers the option of including the inverter (between pins 1 and 2) in the circuit if required. This means that either negative or positive input control pulses can be used. The advantages of this servo ampli- fier are: • high output current: 400 mA without external transistors; • motor control in both directions with a single supply voltage; • adjustable 'dead zone' (determined by C3); • power consumption less than 800 mW. Parts list. Resistors: R1.R5.R8- 1000 R2 « 8k 2 R3 - 1 k R4 = 1k2 R6.R7 = 33 k R9 = 22 k Capacitors: Cl = 33 p/6 V C2.C4.C5 = 0.47 p/6 V C3 = 2n2 servo amplifier Inverter input input Vcc Timing C 4,8 V Semiconductors: IC1 = SN 28654 elektor july/august 1979 7-57 ultrasonic receiver for headphones Before going on to describe the circuit of the receiver, there is one point worth noting. Although primarily intended for use in an ultrasonic transmission system, it is in fact much more flexible than one might think. If the ultrasonic transducer is replaced by a suitable (i.e. tunable) LC circuit, a highly sensitive 'conventional' AM receiver is ob- tained. The circuit can also be usefully employed as a direction finder in the 10 kHz to 30 MHz region. The receiver operates on the 'exalted- carrier' principle. The block diagram shown in figure 1 illustrates how this approach works. The received ultra- sonic signal is first amplified (block A) before being fed to a limiter stage, which removes all traces of amplitude modulation and leaves only the carrier wave. The carrier signal is then multiplied with the non-limited AM signal in block X. Two product signals are obtained: the first is the modulation signal, and the second is a signal which has twice the frequency of the input signal. The output of the multiplier is fed to a lowpass filter which removes the high frequency modulation signal components, thus leaving the original audio signal, which can be fed via a simple amplifier stage (block Alf) to the headphones. To ensure that differences in input signal level have as little effect as possible upon the level of the audio output signal, the circuit is provided with a simple automatic gain facility ( AGC) . To this end the output of the multiplier is amplified, rectified and fed back via a lowpass filter as a DC control signal to the input amplifier. Thus the greater the amplitude of the input signal, the lower the gain of the input stage. The circuit diagram of the receiver is shown in figure 2. Theinputamplifier is formed by an FET, type BF 256B (T 1 ) , connected in cascade with a conventional r.f. transistor (T2). The amplified input signal is fed via emitter follower T3 to an S041P (1C 1 ) , which is a combined limiter/ multiplier 1C. The output of the multiplier (pin 8) is in turn fed via the active lowpass filter round T5 to the audio output stage formed by a 741 (IC2). Potentiometer PI provides a volume control. The AGC feedback loop consists of T4 (amplifier) and D1, D2 (rectifier), which provides a negative voltage which is directly proportional to input signal level; this voltage is applied to the gate of FET T1. The high input impedance (500 kJ2) and low input capacitance (5 pF) of the circuit render it suitable for use with modern electret microphone capsules as transducers. The AKG types CK40/33, /35, and /36 will give the best results. Slightly less sensitive, but also quite acceptable are the CK40/37 and CK40/38. For the transmitter transducer, AKG types CK5011, CK5015 and, to a lesser extent, the CK5013, are best. In addition to the above mentioned types, there are a number of Valvo and Murata transducers which will also prove suitable for both the receiver and transmitter. If the system is used exclusively for speech transmission, the MA40L1R from Parts list Resistors: R1.R2.R18.R19.R20 = 560 k R3 = 4k7 R4.R17 = 27 k R5.R6 = 1k8 R7 = 18 k R8 = 8k2 R9 = 1k5 RIO = 560 n R 1 1 = 220 n R12.R13 = 3k9 R14.R16 = 15 k R15 = 1 k R21 = 390 n PI = 10 k preset Capacitors: C1,C2,C3.C4.C5.C6. Cl 1 ■ 0.22 p/16 V Tantalum C7,C8,C9,C1 5,C16 ■ 0.47 p/16 V Tantalum C10.C18.C19 - 22 p/16 V Tanta- C1 2 = 22 p/3 V Tantalum C13 = 1 n C14.C20 = 4n7 C17 = 15 p Semiconductors: D1.D2 = 1N4148 T1 = BF 2566 T2.T3 = BF 494 T4 = BC 1 79C. BC 559C or equ. T5 = BC109C, BC 549C or equ. IC1 = S041P IC2 = 741 (MiniDip) Miscellaneous: us transducer (see text) 0 7-58 elektor july /august 1979 n 1 "’[s] i -4 _ ' l — 1 .. Hh ns t Trr s r5 *| | | ft p ¥ & |S 1 V Murata is a good choice. By mounting the components verti- cally, the printed circuit board is extremely compact. Since the circuit can be powered by a 9 V battery, one can justifiably speak of a minia- ture receiver. The current consump- tion of the circuit is only 7 mA, so that the batteries should be ensured of a relatively long life. If ni-cad cells are used, these can be recharged with the aid of the special charging circuit the two! on the transmitter board. In view of the wide bandwidth of the receiver, the transducer should be connected directly to the input of the circuit, i.e. no long leads between G frequency counter for synthesisers A frequency counter is an extremely useful tool for tuning the voltage controlled oscillators (VCOs) of a synthesiser both quickly and accu- rately. To this end the author has designed a frequency multiplier which can be used in conjunction with the minicounter published in Elektor 38 (June 1978) to measure frequencies between 30 Hz and 10 kHz with much shorter gate/ count times than would otherwise be the case. With a gate time of 1 s the maximum readout is 999.9 Hz, whilst with a gate time of 0.1 s the maxi- mum frequency is 9999 Hz. The circuit has two inputs: input 1 has a sensitivity of 1.3 Vpp (maxi- mum input voltage 50 Vpp); input 2 has a sensitivity of 130 mVpp (maxi- mum input voltage 5 Vpp). The first is intended to be connected direct to the output of the VCOs, whilst the second can be used with the monitor output of an amplifier. The input stage of the circuit is formed by two current controlled op-amps. A1 attenuates the signal at input 1 by a factor of 2, and ampli- fies the signal from input 2 by a factor of 5. A peak detector (D1, C2) and a comparator (A2) convert the input signal into a squarewave, which is then fed to a Schmitt trigger (A3). Flip-flop FF1 ensures that the squarewave is symmetrical. The actual frequency multiplication is performed by means of a phase- locked loop (IC3), a dual-decade counter connected to divide by a hundred (IC4), and a flip-flop, FF2. A squarewave signal with half the fre- elektor july /august 1979 7-59 2 Resistors: R1,R6,R7,R8- 220 k R2,R3,R9 = 1 M R4.R10 = 470 k R5,R13 = 100 k R1 1 = 33 k R12 = 560 Si R14 = 1 k R1 5 = 10k Capacitors: C1.C6- 100 n C2 = 1 p/16 V tantalum C3 = 47 p C4 = 22 p/16 V Semiconductors: IC1 = LM 3900 IC2 = 4013 IC3 = 4046 IC4 = 4518 T1 = TUN D1 = DUS D2= LED quency of the input signal is fed to one of the phase comparator inputs of the PLL, whilst the output signal of the VCO, divided 200 (by IC4 and FF2) is fed to the other input. The VCO provides an output signal with a frequency which ensures that the two comparator input signals main- tain a constant phase relationship, i.e. they have the same frequency. Thus the output frequency of the PLL VCO will always be one hun- dred times that of the input fre- quency (i.e. the clock frequency of FF1). The time constant R14/C4 determines the speed at which the VCO responds to changes in the input frequency. When the circuit is not 'locked-on', the display obtained will not be accu- rate. For this reason LED D2 is included; when the VCO has locked- on this LED will extinguish, thereby indicating that the meter reading is correct. The output of the circuit is connec- ted directly to the clock input of IC1 in the minicounter, which means that the input stage around T1 is omitted. The supply voltage can be derived from the minicounter itself. To ensure that the position of the decimal point on displays 1 and 2 (see figure 2) corresponds to the input range, several minor modifi- cations to the minicounter board are necessary. These are shown in figure 3. J. Naudts autoranging peak meter U If not always for exclusively technical reasons, output level meters are a particularly popular type of circuit, especially in audio applications (power amps etc.) The circuit de- scribed here is for a moving coil meter with an autoranging facility. The meter will read from —40 to — 20 dB, and from — 20 dB to OdB; two LEDs indicate which range is selected (see figure 1 ). By adopting this approach the resolution of the meter is considerably improved. The circuit diagram of the meter is shown in figure 2. The input signal is fed to an attenuator (PI ) before being full-wave rectified by the circuit round A1 and A2. The output of the rectifier circuit is then fed through either SI or S2, depending upon which switch is closed. The two switches are controlled by the com- parator, A6. The state of the com- parator in turn depends upon the elektor July /august 1979 | level of the input signal. If the volt- age at the non-inverting input of the comparator is lower than the wiper voltage of P3 (i.e. if the input signal level on PI is lower than —20 dB for sufficiently long), the output of the comparator will be low, D7 will light up, S2 will open and SI close. A volt- age 3.3 times the input voltage of A3 is then fed to the peak rectifier circuit round A4. The gain of A3 is determined by R8 . . . R11. If, how- ever the input signal level is greater than -20 dB, the output of A6 goes high, D6 lights up, SI opens and S2 is closed. Due to the effect of RIO . . . R12, the rectifier input volt- age is attenuated by a factor of 0.33. Thus between the two switch states there is a difference in signal level of a factor of ten, i.e. 20 dB. The printed circuit board is designed to accomodate a stereo version of the circuit. The components shown in inverted commas and the pin num- bers in brackets belong to the right hand channel. A signal generator is required to calibrate the circuit. The wiper volt- age of PI at which the maximum reading (OdB) is obtained can, within reason, be selected as desired; however it is recommended that a 0 dB level corresponding to roughly 4 volts be chosen. The maximum output voltage of A5 is then approxi- mately 1.33 V; with a 100 //A moving coil meter for Ml and Ml', P2 should . _ n tfJpOOODOB £1 = A1, A2, A1>2‘ = TL084 £3 = A3,A4,AV« = TL084 £3'= A3>4',A5;a6' = TL084 then be adjusted for a resistance value of roughly 13 k. Potentiometer P3 should be adjusted by starting with 06 lit and a full- scale deflection on Ml, and gradually reducing the input signal until at 10% of its original level, the needle suddenly jumps back up to full-scale deflection once more, D6 goes out and D7 turns on. The amplitude of the input signal should be varied very slowly, since switching between ranges takes a finite time (R20, R21, C2). If required, the value of C2 and C3 can be altered to suit the particu- lar meter ballistics. Based on an idea by P. de Bra inclusive always/ exclusive never gate A With the printed circuit board design given here, it is possible to obtain an 'inclusive always' gate by mounting wire link 'a', or an 'exclusive never' gate if wire link 'b' is mounted. The circuit will operate satisfactorily with several different 1C types (see parts list). For reasons of cost, it is advis- able to mount defective ICs, although if good ICs are used the circuit itself will usually remedy this. IC1 - 7400,7401,7402,7403,7404.7405, 7406,7407,7408,7409,7410,7412,7413, 7414,741 5,741 6,741 7.7420,7422,7425, 7426,7427,7428,7430.7432.7433.7437. 7438,7440,7450,7451,7453,7454,7460, 7470,7472,7474,7480.7481,7486,7487, 7495,74 1 04 ,74 1 05,74 1 07.741 1 0,74 1 1 5. 741 21 .741 22,741 25,741 26,741 28, 741 32,741 64.741 76,741 77,741 78, 741 80,741 83.741 96,741 97,74278 (orequ.). 7-62 elektor july/august 1979 thermometer The circuit shown here utilises the 2 mV per °C. This voltage is ampli- influenced by the temperature of the negative temperature coefficient of a fied by IC3 and fed to the meter. sensor diode, the measurement thus diode to sense variations in tempera- The meter is calibrated for zero obtained should only be taken as a ture. If a constant current is flowing reading at the lower end of the rough indication of the battery state, through a forward-biased diode, the desired temperature scale (e.g. 0°C) With the component values shown in voltage dropped across the diode is by means of PI, and for full-scale the diagram, the circuit has a inversely proportional to tempera- deflection at the top end of the scale measurement range of roughly 50°C ture. by means of P2. (depending upon the setting of P2). In order to obtain a stable reference The circuit consumes relatively little The range can be varied by altering voltage, a 'super zener' configuration current (roughly 3.5 mA), which the value of R7 (e.g. R7 = 33 k gives is used. IC1 ensures that a constant means that it can be powered by a a range of 100°C). A further possibi- current flows through the zener 9 V battery. The thermometer only lity is to reverse the meter connec- diode, so that the zener voltage is draws current when a temperature tions, i.e. if the scale was previously unaffected by variations in the reading is required (pushbutton 0 to 50°C, reversing the connections supply voltage. A 5.6 V zener was switch SI is depressed). Switch S2 to the meter would give a scale of chosen for its low temperature allows the state of the battery to be — 50 to 0°C. coefficient. When the temperature monitored, and P3 should be adjusted of the sensor diode changes, the out- to give a suitable deflection. However S. Jacobsson (Sweden) put voltage of IC2 varies by roughly since the meter reading will also be sawtooths up or down an octave The sawtooth is a favourite wave- shape in electronic organs. Twelve different frequencies are required within one octave; for other octaves, frequencies are needed that are a multiple of two higher or lower. Given a sawtooth with a frequency f 0 , two new sawtooth waveforms can be obtained that are one octave higher and lower respectively (2 f D and 1/2f 0 ). The principle is described here. x ' : yW\AAA +1/2U • nr.nnru u ■■ a.b : elektor July /august 1979 7-63 The new sawtooth is obtained by adding a symmetrical square-wave to the original wave-form. As shown in figure la, adding signal A (with frequency f and amplitude U) to square-wave B (with frequency f and amplitude 1/2 U) results in a sawtooth with twice the frequency and half the amplitude of the original. Con- versely, if the squarewave is at half the original frequency and has the same amplitude as the input signal, the output will be a sawtooth at half the original frequency and twice the original amplitude — as shown in figure 1b. Obviously, the above only applies if the 'edges' of the square- wave and sawtooth coincide — in other words, if the signals are 'in phase'. The block diagram of a suitable circuit is given in figure 2. The input signal is passed to a peak detector. This stores the peak level (+U) of the input signal; this level is passed via switch S a to a summing circuit. Since the switch is operated (via a com- parator) by the input signal, it 'chops' the peak level U at the same frequency as the input signal. After restoring the symmetry of the squarewave with respect to supply common (by adding a series capacitor), the result is a squarewave with the same frequency but half the amplitude of the input sawtooth. Add it to the original sawtooth, and what do you get? Twice the original frequency and half the amplitude. To get the other output (at half the frequency), the peak level of the input signal must be doubled (x2) and the 'chopper' frequency for the switch must be halved (+2). Finally, if the upper summer has a gain of x2 and the lower has a 'gain' of xl/2, the sawtooths at the output will have exactly the same level as the original input signal. A 'rough draft' of a suitable circuit is shown in figure 3. The peak detector (A1) is followed by a buffer (A2). The (electronic) switches both con- sist of two sections: when SI opens, S2 closes - shorting any remaining feedthrough to ground and pulling C3 down. Flip-flop FF1 takes care of the frequency division required for the control signal to S3 + S4 (= Sb> ■ Virtual-earth type summing amplifiers are used (A3 and A4), with a gain of x2 and xl/2, respectively. N. Nielsen (Denmark) 1b / / / / 2,5 ... 7,5 ' 7-64 elektor july /august 1979 Sometimes ideas occur, which, although good in themselves, cannot be implemented because the necessary technology is not yet there. Consider, for example the possibilities if one could obtain stereo reproduction from a mono amplifier. Although the idea seems far-fetched, in principle this can be achieved by multiplexing the left and right channels, i.e. feeding the left and right channel information alternately through the mono amplifier. Figure 1 shows a design where only the preamplifier is common to both stereo from channels, whilst in figure 2 the power amp is also included. Switching between channels is per- formed by means of groups of electronic switches: SI . . . S4 at the input, and SI' . . . S4' at the output. Before the left and right channel signals are multiplexed they must first be bandwidth limited by low- pass filters with as steep as possible a roll-off. After being split back into two signals again, both channels must once more be lowpass filtered to remove the clock frequency components. In figure 1 the output mono filters can be active, however in figure 2 loss-free passive (LC-)filters must be used. A suitable clock fre- quency (switching rate) would be around 100 kHz. There are no direct obstacles in the way of a design such as that shown in figure 1. The same is not true of the circuit in figure 2 however, since sufficiently fast low-loss power switches do not as yet exist. How- ever that is not to say that they will not do so in the future. A. Jahn (Germany) elektor july/august 1979 7-65 The idea itself isn't new — a similar circuit was published in Elektor, May 1976 but the simplicity of the circuit described here lends it a special charm . . . Only three ICs and a handful of other components are required to recognise the logic levels of sixteen different signals and dis- play them on an oscilloscope screen. The display consists of two rows of noughts and ones. This is achieved as follows. If a sine-wave is applied to the V-input of an oscilloscope, the display depends on the signal applied to the X-input. If a sawtooth is applied, the sinewave is traced on the screen; if there is no signal on the X-input, a vertical line will be displayed; and, finally, if a sine-wave of the same frequency as the first but with different phase is applied, a circle or ellipse can be obtained. The vertical line or circle can be positioned at any point on the screen by adding a suitable DC offset to the X- and/or V-input signals. In the circuit de- scribed here, two rows of eight lines or circles are displayed. The circuit is shown in figure 1 . Up to sixteen input signals are fed to the inputs of IC1. IC2 is a four-bit binary counter, and it applies binary numbers from 0 to 15 to the A, B, C and D inputs of IC1. When the number '0000' is applied, the signal at input 1 (E 0 ,pin8) of IC1 is passed (in inverted form) to its output, W. As the count at the A . . . D inputs proceeds, the rest of the inputs 2 ... 16 are also scanned in sequence and passed to the output. When a '1' is present at the selected input, the output signal from IC1 is at logic zero. The voltage at the R5/R6 junction is clamped to supply common via D1 and the output of N6 is 'high', so the X-output signal is determined by the output of IC2 and the resistor network R 1 1 ... R 1 7. This signal is the 'DC component' that is required to step the display along the eight positions in one horizontal row. The Y-output signal consists of two components. A 'DC shift' signal is taken from the D-output of IC2, to switch the display from the upper to the lower row and back, as required. Superimposed on this signal is the output from a simple RC oscillator (T1). If all 16 inputs to IC1 are at logic one (so that the W output is always '0'), the display will there- fore consist of two rows of eight short vertical lines. When the W output goes to '1', digisplay however, the voltage at the R5/R6 junction is no longer clamped to supply common by D1. R5, R6, C4 and C5 are a phase-shifting network, so the sine-wave output from the oscillator is applied to the X-output (via R9) with a phase-shift with respect to the Y-output. The result: a circle on the screen. If the 16 inputs of IC1 are connected to the pins of a TTL 1C (using a DIL test clip, for instance), the logic levels at the pins of the 1C will be displayed on the screen. The upper row corresponds to inputs 0 ... 7, the lower row to inputs 8 ... 15. Unconnected pins are shown as 'ones'. A. Kraut (Germany) 7-66 elsktor july/august 1979 electronic poker dice Most people will have played with poker dice at one time or another, but not everyone will have realised that there are considerable possibili- ties for the skilled player to cheat. The following circuit for an electronic set of dice should contri- bute to ensuring a more honest game. The five dice are replaced by five rows of six LEDs ID1 . . . D30, see figure 2) each LED corresponding to a different face of the die. For each row there is a 'throw' button (S2, S4, S6, S8, S10) and a 'set aside’ button. When a 'throw' button is pressed, the result is not displayed immediately. To find out which faces of the dice have been thrown, it is necessary to press the 'shaker' button S1 1 , which, as it were, 'uncovers' the dice, enabling the players to see them. If one has thrown, say, a pair on the first turn, by pressing the corresponding ‘set aside' buttons, the two LEDs re- presenting the pair will remain permanently lit. This is the equiva- lent of setting the pair of dice to one side (for all to see), before putting the remaining three dice back into the shaker and trying to im- prove one's score. The actual circuit (see figure 1) is quite straightforward. A divide-by-six counter (IC2) is clocked by the oscillator round N1, N2. The outputs of N3 . . . N8, which are connected to 5 x 6 = 30 latches (IC4 . . . IC11), each go low in turn for the duration of one clock period. The outputs of the latches are connected to the dis- play LEDs, D1 . . . D30. When one of the 'throw' buttons (S2, S4, S6, S8, S10) is pressed, the three enable inputs for the corresponding set of LEDs are taken high, with the result that the data present at that moment on the inputs of the latches are transferred to the outputs. The cathode of one LED in each set of six is pulled down virtually to ground, elektor july/august 1979 7-67 and these LEDs will light should S1 1 now be pressed (current being supplied via S1 1, D36 . . . 40, R2, R5, R8, R11, R14). If the corresponding 'set aside' button is pressed, the LEDs whose cathodes have been pulled down to earth will turn on permanently. Suppose, for example that SI is pressed, C2, which, when the 'throw' button was pressed, charged up via D31, is now discharged. The output of N9 is thus taken high, so that T1 supplies current to the LED, whose cathode is at earth There is one further point worth noting. Although it was stated that the circuit should help to ensure a 2 more honest game, it is important that each of the 'throw' buttons are pressed in turn, and not simul- taneously. The reason for this precaution is that if two or more buttons are pressed at the same time, there is an increased chance of pairs or trebles etc. A. Vandermaelen (Belgium) digitally-controlled Phaser m Phasing is a well-known musical effect which is obtained by varying the phase relationship of a signal with respect to an original version of the same signal, whilst ensuring that its amplitude remains constant; the phase-shifted and original signals are then summed in proportions which are determined by the intensity of phasing required. In the circuit shown here, the phase shift is provided by op-amps A2 . . . A7. The constant changes in phase are obtained by arranging for the resistance between the '+’ inputs of the op-amps and earth to be varied with the aid of a low frequency modulation signal. Normally FETs are used as voltage-controlled attenu- ators, however they have the draw- back of introducing a noise com- ponent and are not perfectly linear. The approach adopted here, although more complex, is superior. Eight resistors are switched in and out of circuit via multiplexers IC3...IC8 (which thus function as single-pole, 8-way electronic switches). The multi- plexers are controlled by the infor- mation present on address lines A, B and C. Thanks to the configuration of gates, N1 . . . N14, the address data continuously cycles from 000 to 111 and back down to 000 again. The clock pulses are provided by the 555 timer, IC9. The clock frequency, and hence the speed of the phasing, can be varied by means of P3, whilst PI allows the depth of phasing to be adjusted. The overall gain of the circuit is controlled by P2. A symmetrical supply voltage (max. ± 7.5 V) is used. In the prototype version the author used 2x4 1 .5 V batteries to make up the 6 V supply lines shown in the diagram. G. Duffau (France) 7-68 elektorjuly /august 1979 I 171 capacitance and ■ A inductance meter It is often very useful to ascertain the value of an unmarked or suspect capacitor or indeed to determine the value of a home-wound (or otherwise) inductor. The design idea described here is intended to fulfill both of these requirements by utilising an existing multimeter. In figure 1 , a squarewave is produced by N1 and associated components, buffered by N2 and IC1 and fed to one of the high pass filters Rr/Lx or Cx/Rr (see figure 2a). After being differentiated by the filter network (figure 2b) the signal is again buffered (by IC3) and then integrated by the circuit around IC4. The resul- tant waveform is then amplified and rectified by IC2 whereupon it can be displayed on the multimeter. The formulae for calculating the voltage at the output of IC4 (so we are told!) are: , . . c RrCx for capacitance: U 0 ut = E • R r for inductance: U 0 ut = Behind the above title lies a well- known type of dexterity game, in which two players each attempt to pass a ring along a length of wire without touching it. The first player to reach the end of the wire is the winner. If however a player's ring should happen to brush the wire, an LED lights, indicating that he must where E is the supply voltage. There- fore by selecting suitable range resistors Rr, and frequencies, different values of capacitors and inductors can be measured. The only proviso is that the square-wave period time (=2.5 R, C, ) must bp at least sixteen times larger than - obtain a sufficiently accurate measurement. T. Alfredsson 1721 nerves of steel go back to the start and begin again. The circuit incorporates an additional refinement in that, whilst one player's 'go-back-to-start' LED is lit, the other player can touch his own wire without incurring a penalty (i.e. without his own LED lighting up), thereby enabling him to speed up. However the second player must be careful, since the moment the first player reaches the start again, his LED will go out, simultaneously enabling the LED of the second player. The actual circuit is straightforward, being based on the operation of two flip-flops formed by N1 . . . N4. At the start of the game, once both elektor july/august 1979 player's rings have touched the start electrodes (C and D), the out- puts of N2 and N3 are high (and LEDs D1 and D2 are extinguished), whilst the outputs of N1 and N4are low. The free inputs of N2 and N3 are also low, i.e. at a potential just above the forward voltage drop of a germanium diode (roughly 0.2 V). Assume now that player 1 touches his wire (B). The input of N1 is momentarily taken low, which takes the output of N1 high and the output of N2 low. The 'go-back-to- start' LED of player 1 thus lights up, whilst the outputs of N3 and N4 remain unchanged. What happens now if player 2 touches the wire (with D1 still lit)? The input of N4 (E) is momentarily taken low, thus taking the free input of N3 high. Since the other input of N3 is low, the output of N3 will remain high, so that LED D2 cannot light up. This situation will only change when the first player once more touches the start electrode, taking the output of N2 high again. Figure 2 shows a sketch of a possible layout for the game. Ordinary fairly stiff copper wire can be used, and obviously the 'difficulty factor' can be varied depending upon the shape into which the wire is bent and upon the diameter of the rings. R.J. Horst (The Netherlands) bicycle speedometer Circuits for bicycle speedometers have been fairly common (Elektor published one in last year's Summer Circuits issue No. 39/40), the differ- ence in this particular design being the digital readout. The speed sensing is carried out by a number of magnets attached to the spokes or rim of the wheel which operate a pair of reed switches. The principle is illustrated in the drawing in figure 1. where the reed switches are shown fitted on the bicycle front forks. The main advantage that a digital display has over a moving coil meter is that of robustness in a situation where the younger generation can create a very harsh environment. Current consumption is kept to a 7-70 elektor july/august 1979 minimum by arranging for the power supply to be switched on only when a readout is required. This switch (S2) should ideally be mounted on the handlebars (i.e. using an electric bicycle horn button or similar). The circuit diagram for the digital speedometer is shown in figure 2. The principle behind the circuit is uncomplicated: The pulses from the reed switches are fed to a counter (IC1, IC2) for a predetermined length of time. The counter is then inhibited and the count decoded and displayed. Decoding and display drive is performed by the counter itself. N3 and N4 serve to eliminate contact bounce from the reed switches, Sla and Sib, whilst the count pulses are fed to IC1 via N7. The measurement period is deter- mined by the circuit round N5, N6, and can be varied by adjusting PI. The meter can therefore be calibrated with the aid of this preset. The charge time of capacitor Cl will ensure that the counters are reset by N1 before a new count cycle starts. Gate N2 prevents a count cycle starting before the reset is cleared. In view of the high current consump- tion of LED displays, a continuous readout is not feasible. A 'push- button'-type display was therefore chosen, i.e. each time S2 is depressed the speed of the bicycle at that particular moment is displayed. This approach also means that the com- ponents which would have been required to ensure that the counter is automatically reset after each count can be dispensed with. In principle any number of magnets can be employed, however in order N1 ... N4 = IC3 = CD401 1 N5 ... N8= IC4 = CD4011 to avoid excessively long count periods, a minimum of three is re- commended. The circuit should be calibrated (i.e. PI adjusted for the desired count period) with the aid of an existing speedometer. P. de Jong (The Netherlands) The designer of this circuit must have had frequent occasion to become annoyed at the various pamphlets, posters and advertising 'bumph' which is left under the windscreen wipers of parked cars, for he has come up with a radical antidote — an automatic windscreen clearer. Unfortunately this ingenious device has one slight drawback, any meter- maid or passing policeman who tries to leave a parking ticket under the wipers might well be less than pleased to see the ticket being repeatedly pushed off the windscreen (although perhaps some of our readers will find this prospect an added attraction). The circuit reacts to the windscreen wipers being lifted off the wind- automatic windscreen screen by switching on the wiper motor, with the result that the of- fending piece of paper is swept away. To detect when the wipers are lifted up, two reed switches are mounted on the inside of the windscreen at the point where the wipers come to rest. A small magnet attached to each wiper holds the switches closed under normal conditions. However, when one of the wipers is lifted off the windscreen, the corresponding switch opens, and the flip-flop formed by N2 and N3 removes the inhibition on the decade counter, IC1. The latter starts to count clock pulses from the clock oscillator (N5, N6), and after the third pulse the Q3 output goes high, with the result that the second flip-flop. clearer formed by Nil and N12, turns on T1 and T2. The relay Re, is then pulled in, thereby switching on the wipers. After a further five clock pulses, the Q8 output of IC1 going high inhibits the clock signal via N4 and N7. Gates N8, N9 and N13 now ensure that the second flip-flop causes the relay to drop out (T 1 and T2 are turned off) the moment both reed switches are closed. IC1 restarts to count, and upon the next clock pulse, the Q9 output goes high, causing the first flip-flop (N3, N4) to reset the counter. When power is applied, C3 and R5 ensure that the two flip-flops are automatically reset. The length of time the wipers are switched on is elektor july/august 1979 1-12 elektor July /august 1979 phone Ml and filtered by the net- work Cl, C2, R1 and R2. These components, together with the capacitance of the microphone and the input impedance of the amplifier, ensure that the frequency response of the system is corrected to suit the internationally standardised 'A' weighting curve shown in figure 2. This 'weighted' signal is then fed to the operational amplifier A1, the gain of which can be altered by S2 to provide five noise ranges. The AC output of the op-amp is then rectified by diodes D1 . . . D4 and fed to the meter via resistor R9. As this rectifier is included in the feedback loop the meter reading remains linear over the entire scale. Diode D5 is included to limit the current through the meter to a safe value, thereby reducing the risk of damage if a 'loud' noise is measured on a 'quiet' range. Components C5, C6 and R7 are included to provide frequency compensation and to prevent instability. Under normal operation the circuit will only draw about 2 mA, so it can be powered by two PP3 (or similar) batteries. The push-button switch SI ensures that the circuit is not inadvertently left on. The meter should be calibrated in dBs and should have a full scale deflec- tion of +10 (normal log scale). P. Barnes (United Kingdom) automatic battery charger Automatic battery chargers are not particularly cheap, however the pro- tection they afford against over- charging and possible battery damage is highly desirable. The circuit shown here is intended to provide an inex- pensive alternative to the commer- cially available fully automatic chargers. The idea is to take a simple battery charger and incorporate an add-on unit which will automatically monitor the state of the battery and cut off the charge current at the desired point, i.e. when the battery is fully charged. The circuit basically consists of a comparator, which monitors the battery voltage with respect to a fixed reference value. If the battery voltage exceeds a presettable maxi- mum level, a relay is actuated which interrupts the charge current. If the battery voltage falls below a lower threshold value, the relay is released switching the charge current back in. The comparator is formed by a 741 op-amp. The supply voltage of the op-amp is stabilised by R3 and D1, and is thus unaffected by vari- ations in the battery voltage. The reference voltage, which is fed to the inverting input of the op-amp, is derived from this stabilised supply via R4 and D2. The reference voltage is compared with a portion of the battery voltage, which is taken from the voltage divider, R1/P1/R2. As the battery voltage rises, at a certain point (determined by the setting of PI) the voltage on the non-inverting input of the op-amp will eventually exceed that on the inverting input, with the result that the output of the op-amp will swing high, turning on T1 and T2, pulling in the (normally- closed) contact of the relay and interrupting the charge current to the battery. LED D3 will then light up to indicate that the battery is fully charged. To prevent the battery being recon- nected to the charger at the slightest drop in battery voltage, a portion of the op-amp output voltage is fed back via P2 and R5 to the non- inverting input. The op-amp thus functions in a fashion similar to a Schmitt trigger, the degree of hyster- esis, i.e. the battery voltage at which the op-amp output will go low again, being determined by P2. The circuit is best calibrated by using a variable stabilised voltage as an 'artificial battery'. A voltage of 14.5 V is selected and PI adjusted such that the relay just pulls in (opens). The 'battery' voltage is then reduced to 12.4 V and P2 adjusted until the relay drops out. Since PI and P2 will influence one another, the procedure is best repeated several times. A final tip: if the charge current is too large to be switched by the relay, the circuit can still be used by con- necting the relay in the primary of the battery charger transformer, H. Heere (The Netherlands) elektor july/august 1 979 7-73 5-minute chess clock In games of speed chess, where each player has only 5 or 10 minutes to complete all his moves, mechanical chess clocks leave something to be desired in terms of accuracy, es- pecially when both players have only 30 or 40 seconds left. The author of the circuit decribed here offers a solution to this problem by employing LEDs to provide an unequivocal display which counts off the time remaining in multiples of 10 seconds. The clock uses two counters, one for player A and one for player B. By bridging a set of touch contacts each player can stop his own counter and start his opponent's. The state of each counter is displayed on a circle of 30 LEDs (see figure 2). In a 5-minute game SI is set to position 1. whereupon each LED lights up in turn for (300 seconds/30 =) 10 seconds. With SI in position 2, the time limit is increased to 10 minutes per player, i.e. each LED lights up for 20 seconds. If a player exceeds his time limit, then LED D40 (A) or D40' (B) lights up. The counters can be reset for the start of a new game by pressing S2. LEDs D35 and D36 provide a visual indication of who is to move. Assuming player B has just made a move on the board, he presses TAP switch B, which takes the output of N1 (which together with N2 forms a set/reset flip-flop) high. The output of N2 goes low, causing counter A (IC2, IC3, IC4) to start counting the clock pulses provided by N3 and N4; counter B is inhibited until TAP switch A is touched. Since D31 is now reverse biased, D35 will be turned on and off via D32 at a rate 2 Sensor A Sensor B equal to the clock frequency. D33 is forward biased, pulling the input of N6 low, so that D36 will be ex- tinguished. The circuit can be powered by four 1.5 V batteries or by ni-cads. The current consumption is approxi- mately 45 mA. PI and P2 can be calibrated using a known accurate timebase; each LED should light up for 10 seconds with SI in position 1 and twenty seconds with SI in position 2. S. Woydig (Germany) 7-74 elektor july/august 1979 emergency break If one's stereo system is pumping out too many watts, then there is always the danger that either one's loudspeakers or relations with the neighbours will suffer as a result. One obvious solution is to turn back the volume control. However, Mr. Ziemssen has come up with a more drastic suggestion: disconnect the speakers automatically whenever the output signal exceeds a preset maximum level. The basic principle of the circuit is illustrated by the block diagram of figure 1. The sound level is monitored by a microphone, the output of which is amplified and rectified, before being fed to a flip-flop which disconnects the speakers (or interrupts the audio signal path at some other point). A second flip-flop input is desirable to reset the circuit when the audio signal falls back to an acceptable level (and also to ensure it assumes the proper state on power-up) .The author originally submitted a detailed circuit design (see figure 2), however it suffered from the disadvantage of failing to provide an automatic reset facility, and — rather unecon- omically — used TTL. However the basic idea behind the circuit remains valid. K. Ziemssen (Germany) voltage trend meter The advantages of a digital multi- meter are sufficiently well known that they do not need to be repeated here. However there are situations where it is useful to determine whether the quantity being measured is increasing or decreasing, particu- larly if it is subject to sudden flucta- tions. An op-amp connected as an AC amplifier is particularly suited to this task. Most simple DVMs contain an LSI chip with an input sensitivity of 200 mV and an extremely high input impedance. A suitable op-amp is the LF 355 used as a voltage-current converter, which has an input impe- dance of 10 12 SI. 0 elektor july /august 1979 7-75 The circuit shown here is designed for an input voltage of 200 mV and a current through the moving coil meter of 100/iA. For other input voltage and/or output currents the trimmer potentiometer PI and resistor R1 should be altered accord- ingly. The op-amp requires two supply voltages (positive and negative) between 5 and 18 V. In view of the nominal current consumption of the circuit (several milliamps), these can easily be provided by two 9 V batteries. The calibration procedure is quite straightforward. With the input short circuited, P2 is adjusted for a meter reading of zero volts. A 200 mV signal is then fed to the input, and PI adjusted for the corresponding reading on the meter. If the meter has a scale of e.g. 0 . . . 3/30, then by calibrating the moving coil meter to read '2' for a maximum reading (with e.g. 200 mV in) on the DVM, an 'overload' range up to 300 mV can be obtained. In the above case, with a constant current of 100 //A through the ana- logue meter, the value of R1 should be increased to 2k7. The circuit functions in a similar fashion for both current and resistance measurements. The DVM is connected in parallel with the analogue meter. H. Ehrlich (Germany) programmable digital function generator The circuit shown here will generate pre-programmable periodic wave- forms. The waveform is stored digitally in two 256 x 4 bit RAMs which are connected in parallel to form a single 256 x 8 bit memory. The output waveform is obtained by repeatedly cycling through the contents of each of the 256 memory locations. The resulting digital signal is fed to a D/A converter and finally to a lowpass filter (not present in the circuit described here) to remove the clock frequency components. The address bus is clocked via an 8-bit binary counter by the clock oscillator IC8. The frequency of the output signal is one twelfth that of the clock frequency. The circuit is programmed as follows: A single period of the desired wave- form is divided into 256 discrete parts, each part having an address, starting with 00000000 and finishing with 11111111. The peak to peak amplitude of the waveform is also divided into 256 discrete levels, which are quantified digitally (00000000 for the lowest level and 11111111 for the highest level). Thus a list of addresses with corre- sponding data to be read into the RAMs is obtained. These addresses and data are set up on DIL switches S6 . . . SI 3 (addresses) and S2 . . . S5 and S14...S17 (data). Once this has been done (open switch = 0), switch SI is momentarily depressed, thereby enabling the digital compara- tors IC3 and IC4. As soon as the address generated by IC8 and IC5 corresponds to the address set up on S6 ... SI 3, the output (pin 6) of IC4 goes high. The monostable formed by Cl, R18 and N1 then produces a short write pulse on the R/W input of IC1 and IC2, causing the data set up on the data switches to be written into memory. The above procedure is then repeated for the remaining 255 memory locations. C. Rohrbacher (France) 7-76 elektor July /august 1979 pseudo PROM When developing programs for micro- blocks, are protected by the Read completely extinguished. In actual computers a single mistake can have Only switch. Naturally the circuit fact CMOS ICs will work with supply disastrous consequences. A particu- can be extended to cover larger voltages as low as 3 V, so the gradual larly aggravating occurrence is when blocks of memory. loss of battery voltage should present a section of program, which was con- IF CMOS RAMs are used, then a no problems. sidered to be safely tucked out of further interesting possibility is to As well as eliminating the possibility harm's way in a different part of provide a battery back-up power of accidentally altering the contents RAM, has been inadvertently written supply. Since the power consumption of a section of RAM, the above over. The simple circuit shown here of CMOS memories is so low, a circuit allows one to preserve a pro- offers a handy solution to this pro- normal 4.5 V battery would be suf- gram or section of program for blem, namely a Read Only switch for ficient to power the circuit for several several hours or more without having RAM. With the aid of this switch the days. A suitable battery buffer to use a cassette dump routine. Write signal is inhibited, so that data circuit is shown in figure 2. The state can only be read out of RAM, of the battery can be checked by J.F. Courteheuse and With the circuit shown in figure 1 means of switch S2; below a battery A. Monnier (France) four 128 x 8 bit RAMS, i.e. two Vt k voltage of 3.9 V the LED will be non-stop Newton’s cradle Most people will have seen the desk- top ornament/toy known as a 'Newtons cradle' (see figure 1), which consists of usually five steel balls suspended in a row from a pair of threads. When one of the end balls is lifted and then released so that it falls back and strikes the next ball, the energy of the impact is trans- mitted through the other balls, with the result that the ball on the op- posite end of the row swings up. It then in turn falls back, energy is again transmitted through the row, and the first ball swings up, and so on. The energy losses of the system are fairly high, and after a number of oscillations the balls are returned to rest. The idea behind the circuit described here, is to compensate for the natural energy losses of the system, so that it continues to oscillate indefinitely (i.e. until the circuit is disconnected or the bat- teries run out!). If, for the moment we ignore the energy losses, the frequency at which the system oscillates will be: elektor july /august 1979 7-77 where I is the length of the thread and g is the force of gravity (9.81 m/s 2 ). Thus with a length of 0.15 m, the fundamental frequency of the system will be approximately 1.3 Hz. In order to compensate for natural energy losses, the magnetic field system shown in figure 2 has been designed. Together with the accompanying circuit, the idea is that a magnetic force is applied to one of the end balls in the cradle. If the cir- cuit is powered by 6 1.5 V cells (manganese-alkali), the cradle should continue to oscillate for roughly 5 days without interruption. To set the circuit in operation, switch SI should be pressed immedi- ately before or after the end ball is set in motion, thereby triggering thyristor Thl via resistor R1. Capaci- tor Cl then charges up, as does C4. As soon as a ball enters the field of the permanent magnet, a voltage is induced in coil LI, turning on thyristor Th2; the trigger point of the thyristor is determined by PI. The relay connected in the cathode of Th2 pulls in, so that current flows through coil L2, and an additional magnetic field is created which repels the ball. As soon as the ball leaves the magnetic field, the voltage induced in LI collapses and Th2 is turned off. The process then repeats itself at the natural frequency of the system. If the ball is stopped, no charge current will flow to Cl, with the result that C2 will discharge. If the discharge current is smaller than the holding current of Thl, the latter turns off and circuit switches off. Figure 3 shows a cross-section of the coil and magnet system. LI (10,000 turns of enamelled copper wire, 0.01 mm diameter, 1 k) and L2 (2300 turns enamelled copper wire, 0.4 mm diameter, 25 £2) are wound on a permanent magnet core, and enclosed in transformer laminations. Any readily available alternative type of thyristor can be used. K. Bartkowiak (Germany) metal detector Most metal detectors suffer from one sort of drawback or another, perhaps the most serious being the tendency of the oscillator frequency to drift. For this reason the author has sought an entirely new approach, the basic principle of which is described here. A capacitor, C, is charged by a current source, so that the frequency of a VCO is varied by a linearly decreasing voltage. The search coil of the detector (LC tuned circuit) is connected to the output of the VCO. As the frequency of the VCO signal approaches the resonant frequency of the coil, the output voltage of the buffer/detector increases, until, at the resonant frequency itself, it 7-78 elektor july /august 1979 »VCO 'reset a - non-ferrous metals c = ferrous metals exceeds the threshold level of the Schmitt trigger. This causes the switch (e.g. a thyristor) to close, thereby discharging C, and a new cycle begins. Figure 2 shows the relationship between the reset time and the resonant frequency. When the search coil is held near metal objects the inductance of the coil, and with it the resonant frequency of the tuned circuit, is varied. The output signal of the Schmitt trigger is amplified and fed to a loudspeaker to provide an audible indication of the circuit having 'detected' something. M. Kimberley-Jennings (United Kingdom) varispeed windscreen wiper delay circuit In most windscreen wiper delay circuits the wiper speed is indepen- dent of the speed of the car. However the faster the car travels, the more rain falls on the windscreen, therefore, ideally, the shorter the delay should be. A variable delay circuit could be controlled by a sensor mounted in the speedometer cable. However this approach would be fairly compli- cated. The simpler solution adopted here, is to derive the control signals from the contact breaker, so that the wiper speed is varied in accordance with the engine speed. The input of the circuit is connected to the contact breaker; when the contacts open, the full battery volt- age appears across the input, with the result that T1 provides a short out- put pulse. The resultant pulse stream is used to trigger the monostable multivibrator formed by N1 and N2. The frequency of the multivibrator is thendivided by ten by the counter, IC2. The output of the counter is fed to a second monostable, N3/N4, which provides an output pulse duration of approximately 0.5 s. De- pending upon the speed of the engine, the time between successive pulses will be between roughly 10 and 40 seconds. Thus transistor T2 is regularly turned on for a short period, causing the wiper relay to pull in and the wipers to perform a single sweep. By arranging for a capacitor of roughly 2.2 to be switched in parallel with C4, the wipers can be made to perform a double sweep every cycle. The zener diode D1 is included to protect the circuit from excessively large surge voltages appearing across the contact breakers, whilst diode D2 protects T2 against the back EMF induced by the relay. Preferably, the holding current of the relay should not exceed 100 mA; if that is the case, however, a transistor with a higher output current capability should be used. D. Laues (Germany) elektor july/august 1979 7-79 IR lock The following circuit is intended as an infra-red lock for house doors, garage doors, etc. Since the 'key' is almost impossible to copy, it should provide an effective obstacle to unwanted visitors. Figure 1 shows the infra red trans- mitter. An astable multivibrator, formed by NAND gates N1 . . . N3, drives an output transistor, T1, which turns the infra-red emitter diode on and off at a frequency which can be varied by means of PI. The receiver circuit is shown in figure 2. Light pulses received by the phototransistor T1 are amplified by IC1 and fed to an LC circuit tuned to roughly 23 kHz. The filtered output signal is rectified by D1 and fed to op-amp IC2, which is connected as a Schmitt trigger. The trigger thres- hold is set by zener diode D4 to 2.4 V. The unfiltered output of IC1 is also fed to a second Schmitt trigger, (IC3). The output of this op-amp (point 1) will remain high as long as the voltage level at its input is 2.4 volts or greater regardless of the frequency of the received signal. Assuming point 1 is high, a positive going edge at the output of IC2 (point 2) will 'turn the lock' as follows: when point 2 goes high, the output of N1 also goes high, and with it the input of monostable kHz, only point 1 will be high; point multivibrator MMV1 . However, since 2 will go low, with the result that, via this monostable is triggered by a N1, the negative going edge will negative going edge, the output state trigger MMV1. Thus for the pulse of the monostable remains un- duration of MMV1 — which is several changed, i.e. the Q output remains minutes - MM V2 cannot be triggered, low. The positive going edge at point Even if the modulation frequency 2 is also transferred to the trigger is subsequently corrected, since one input of MMV2, which since it is input of N5 is held low, the lock triggered by positive going pulses, cannot be opened during this period, turns on the Darlington pair T3/T4 If a flip-flop is used in place of a and pulls in the relay. Thus for the relay, the circuit could, for example, pulse duration of MMV2 the lock is be used to switch a car alarm system 'opened'. on and off. If the modulation frequency of the transmitter signal deviates from 23 H.J. Urban (Germany) 7-80 elektor July /august 1979 sequencer The following design for a sequencer, which will generate a 10 note ana- logue waveform, is distinguished by its relative simplicity. To control a synthesiser two types of signal are required: a gate pulse to trigger the envelope shaper (ADSR), and a con- trol voltage for the voltage con- trolled oscillators (VCOs). The VCO voltages are generated as follows. An oscillator, formed by N1, N2 and IM3, clocks a decade counter (IC1). Each output of the counter is connected to an analogue switch (as shown in figure 2), the input voltage of which can be varied by means of a potentiometer. The outputs of all the switches are joined together, so that an analogue waveform, composed of 10 discrete voltage levels, is gener- ated at this point. The frequency of the resultant signal can be varied by means of PI. The gate signal for the ADSR is derived from the clock signal, how- ever since each synthesiser places different demands on the type of gate pulse required, no circuit is given. Readers may wish to experiment with extending the circuit. One possi- bility is to include a monostable multivibrator (at the clock input of I Cl), which allows one to cycle through the analogue waveform step by step. Each of the preset voltage levels on the inputs of SI . S10 are then compared with a reference volt- age. If a shorter cycle (i.e. less than to the reset input (pin 15). 10 steps) is required, the appropriate output of IC1 should be connected J.C.J. Smeets (The Netherlands) four quadrant multiplier Multiply X and Y and you get XY - all very simple and straightfor- ward — at least on paper. But what if X and Y are analogue voltages, which may be of either polarity? How does one go about multiplying two such quantities? The following circuit for a 'four quadrant multiplier' — a circuit which will multiply two input voltages and ensure the product is of the correct polarity — shows one way of approaching this problem. Basically the circuit generates a squarewave signal, whose duty-cycle is proportional to one of the input signals and whose amplitude is pro- portional to the other. The average value of the squarewave, and hence the value of the product voltage, is obtained by lowpass filtering. The squarewave generator is formed by IC1 , R 1 , R2, R4 and Cl . The out- put of IC1 is lowpass filtered by R7 and C2, then compared with the input voltage, X. The duty cycle of the squarewave is modulated via the output of IC2, R3 and Cl , whilst the amplitude of the output signal of I Cl is held constant. The output of I Cl is also used to control the FET switch, T1. When this switch is 'closed' i.e. T1 is turned on, a voltage equal to — Y is present at the output of IC3; assuming PI is correctly adjusted. this op-amp then functions as an inverting amplifier. If T1 is turned off, i.e. the switch is 'open', IC3 is connected as a non-inverting ampli- fier. Thus at the output of IC3 will be a squarewave voltage with an amplitude which is proportional to Y, a duty-cycle proportional to X, and whose average value is proportional to XY. The latter is obtained by the lowpass filter formed by IC4, RIO, R13 and C3. The turnover frequency of this filter is approximately 330 Hz. The circuit will quite happily mul- tiply analogue signals with fre- quencies which are an order of mag- nitude lower than the turnover point elektor juiy/august 1979 7-81 of the two lowpass filters. The author has used the circuit for corre- lation measurements on very low fre- quency EEG signals. The adjustment of PI is necessary since, when conducting, T1 has a significant resistance. With an input voltage X = 0 (input grounded) and Y = + 6 or — 6 V, PI should be ad- justed for minimum output voltage of IC4 (roughly ± 40 mV). P. Creighton (United Kingdom) simple synthesising of £243 PPM’s by using LED’s Circuits for synthesising peak pro- gramme meters by using light emitting diodes are certainly not new, but the design shown here offers simplicity and flexibility and is especially suited for multi-channel equipment. As can be seen from the block dia- gram in figure 1 the circuit consists of a master section and one or more channels. The master section provides a logarithmic voltage reference for the analogue bus @ together with the timing circuitry for multiplexing the display. The circuit for each channel consists of a full-wave rectifier and a comparator which enables the display. The circuit for the master section is shown in figure 2. A clock oscillator is formed by N1/N2 which should be adjusted to approximately 50 kHz by PI. The oscillator is buffered by N3 which drives a binary (up/)down-counter IC1. The output of the binary counter is decoded by IC2 to form the digital system bus (§) . Pin 1 of IC2 is used to drive an analogue switch to charge up capacitor C2. During the count from 15 to 1 the switch is off and C2 is discharged slektor july/august 1979 through the preset potentiometer P2. This decaying voltage is then ampli- fied and buffered by IC5 and fed to the analogue bus. The rectifier section of this PPM synthesiser is not shown here, but readers are referred to Elektor 24 (April 1977) for a suitable circuit. Once rectified the input signal is compared with the voltage on the analogue bus by IC6 as shown in figure 3. When these two voltages are the same the output of IC6 will go high turning on transistor T1 thereby enabling the data on the digital bus to be displayed on the LED's via buffers IC7 . . . IC9. The unit is calibrated by applying 12V DC to the rectifier input and adjusting P3 until all the LED's are just turned on. The input voltage is then altered to 0.48 V and P2 is adjusted until only one LED is on. The unit is then ready for use. The master section as shown is capable of driving up to five channels, but if more are required then the buses will have to be buffered accordingly. J. Andersen (Denmark) IC9 = 7417 elektor july/august 1979 7-83 ribbon cable tester For microcomputer enthusiasts and anyone working with large scale digital circuits, a ribbon cable tester can prove a useful aid. The circuit described here will simultaneously test 8 cores, with the facility for extending this to 16. A clock oscillator (N 1 ... N3) drives a 4-bit counter (IC2). Three of the counter's outputs are used to clock a BCD-decimal decoder (IC1). The outputs of the decoder each go low in turn for the duration of a certain clock period. The outputs are con- nected via inverters N5 . . . N12 to a set of terminals, to which one end of the ribbon cable is attached. The other end of the cable is connected to the inputs of gates N13 . . . N20. Between the outputs of these gates and the outputs of IC1 8 pairs of reverse-parallel connected LEDs (D 1 . . . D16) are inserted. The odd-numbered LEDs will light up only if the corresponding NAND output is low and the corresponding output of IC1 is high (87%% of the time). The even-numbered LEDs on the other hand, will light up only if the NAND outputs are high and the outputs of IC1 are low (12’/a% of the time). If there is a break in one of the cores, the corresponding NAND output will be low and the associated LED will light up. If the core is intact, then the LED will be ex- tinguished, since the logic levels on either side of the LED change state simultaneously. The circuit will also check for shorts between cores, since in that case the anode of an even-numbered LED will be high, whilst the cathode will be low, causing the LED to light up. Note that series resistors for the LEDs are not necessary (see 'driving LEDs from TTL, circuit 72, Summer Circuits issue 1976). If no cable is connected, the odd-numbered LEDs will light up. Switch S2 functions as a lamp test for the even- numbered LEDs. For a 16-core version of the circuit a 74154 should be used in place of IC1 (the D-input is of course used), whilst the number of inverters, NAND gates and LEDs is doubled. J.J. van der Weele (United Kingdom) 7-84 elektor july /august 1979 ^jP-programmable speed controller for model railways In the world of model railways, electronics is playing an increasingly important role, and it is only a matter of time before the micro; processor becomes a standard com- ponent in any large layout. The design described here brings this prospect nearer to becoming a reality. With the aid of the following circuit a //P can be used to auto- matically control the speed of a train. The speed of the train is controlled by varying the pulse width of the squarewave supply voltage of the motor. The squarewave signal is generated by the oscillator N1/N2, and fed to a 4-bit binary counter. The counter outputs are in turn fed to a 1-of-8 decoder. The decoder outputs are connected together such that at points a . . . d there are four squarewave signals, whose pulse widths are in the ratio 1 : 2 : 4 : 8 respectively (see figure 2). By com- bining one or more of these wave- forms a choice of 16 different duty cycles (0, 1,2, 1+2, 4, 1+4, etc.) can be obtained. Which duty cycle is selected is deter- mined by NAND gates N7 . . . N10; the output state of these gates is in turn determined by the infor- mation present on the data bus (DBO . . . DB3) of the microprocessor system. Between the /xP data bus and elektor july/august 1979 7-85 the NAND gates is a 4-bit latch indicate the speed of the train in SI or S2 the speed of the train can (IC3). Information is only transferred binary code. be increased or reduced in single from the data bus to the gates when If a /iP system is not available, the steps. If the circuit of figure 3 is a select pulse is received. 'manually-operated' processor circuit used, then IC3 in figure 1 can of The waveform selected by the y . P shown in figure 3 can be used instead. course be omitted, is amplified by T1/T2/T3. Lamp L5 The circuit performs the same basic protects the circuit from excessive function as a /jP, with the exception W. Pussel (Germany) current in the event of a short on that the 'brainwork' is done by the the track, whilst lamps Lai . . . La4 hobbyist himself. By pressing either 7-segment displays Ckl on a scope I A With the aid of the following circuit a seven-segment display can be gener- ated on an oscilloscope screen. The height and width of the digits can be independently varied, and a decimal point can be provided on either side of the display. As is apparent from the block dia- gram of figure 1, the circuit com- prises the following sections: — an oscillator which clocks an 8-output ring counter. — a multiplexer which switches the 7-segment signal to the Z or Z input of the scope — X and Y signal generators which are controlled by the output of the ring counter. — two D/A converters which trans- late the digital codes representing the X and Y deflection of the scope beam into analogue values. The X and Y deflection signals shown in figure 2 are derived via capacitors Cl and C2 in the circuit diagram of figure 3. The voltage across these capacitors is controlled via MOS switches S1/S3 and S2/S4 by the outputs of N1 . . . N4. The 7-86 elsktor July /august 1979 amplitude of the deflection signal is largely determined by the clock fre- quency. T3 and T4 are connected as source followers and function as buffers. I Cl decodes the pattern of enabled segments. The deflection signal shown as a dotted line in figure 2 (period 7) returns the spot to its original position. This pulse is used to generate the decimal point by connecting output 7 of IC1 to, on the one hand S5 and S8, and on the other hand, via an inverter formed by T2, to S6 and S7. The position of the spot is determined by the offset voltage which is adjusted by means of trimmer potentiometers R7 and R15. The D/A converted code for the pos- ition of the display is fed to the X and V position inputs. The setting of trimmer potentiometers R6 and R14 determines the gap between digits. As far as the D/A converter is con- cerned its construction will depend upon, for example, whether the digitised display signals are coded in binary or in decimal, are inverted or normal. If the Y-POS input is not required, R14 can be omitted and S7/S8 connection can be used as an output. The clock frequency and multiplex frequency should not have a common division ratio. The multiplexer section of the circuit is formed by switches S9 ... SI 6. In contrast to AND/OR gates, these permit a decoder with either 'active- low' or 'active-high' outputs to be used. In the case of IC1, the outputs are active-high; if the reverse is the case, R1 should be connected to ground; the output signals will then be inverted. The reset signal for IC1 can be used as a clock signal for an internal multi- plexer (if the MPX input is not desired), or to scan the addresses of a memory. A 1-bit shift register is required for leading zero blanking via the RBO pins of the BCD-7- segment decoder. Among other things, the circuit can be employed to display the position of the calibration mark of wobbu- lators and frequency analysers. The supply voltage can be anywhere between 5 and 15 V. The amplitude of the output signals at S5/S6 and S7/S8 is approximately 1 V. The load impedance for R6 and R14* should be 1 Mf2. In order that the edges of the switching signal cannot be detected, any amplifier connected to the out- put must have a high slew rate. *3 f b 3 d.p. elektor july/august 1979 7-87 pH meter circuit for DVM Crw To accurately measure the con- centration of hydrogen ions (pH value) in a solution, a 'glass electrode' is often used in chemistry laboratories. The electrode is con- structed on the principle of a galvanic cell, and the output voltage of the electrode is proportional to the pH value of the solution to be measured. The temperature of the solution considerably affects the pH value, thus a pH meter is effec- tively a temperature compensated millivoltmeter. The circuit shown employs an op-amp (A1) to amplify the output voltage of the electrode. The input impedance of the circuit is thus equal to that of the op-amp, which is 10 12 S2, so that there is negligible loading of the electrode. The positive temperature coefficient (PTC) resistor TSP 102 (Texas) compensates for the effect of variations in the temperature of the solution. Together with the shunt resistor of exactly 237012, which should be made up of several metal film resistors (e.g. 2k2 + 150 S2 + 10 J2 + 10 £2), the resistance of the PTC varies linearly with temperature. The voltage at point A is amplified by op-amp A2, the output of which is divided by R5/R6 such that it varies the total output voltage by just the right amount. Op-amp A3 is connected as a combined summing and differential amplifier and provides the output voltage for the DVM, which displays the pH value of the solution directly. Trimmer poten- tiometers PI and P3 set the gain of the input stage while P2 ensures that A1 is correctly biased. The calibration procedure for the circuit is as follows: 1. With the inputs short-circuited P2 is adjusted for zero volts at point C. 2. Again with the inputs shorted, potentiometer P5 (wirewound type) is adjusted such that 7 volts are present at point D. 3. Trimmer potentiometer P4 (spindle type) is adjusted such that, with the PTC at a tempera- ture of 25° C, zero volts are present at point A. 4. A glass electrode, which is suspended in a solution with a pH of 7, is connected to the input of the circuit. P5 is then adjusted until a reading of 7 volts is obtained at point D (note that the temperature of the solution should be 25° C) 5. The glass electrode is suspended in a solution with a pH value of 4 and trimmer P4 (spindle type) is adjusted for a reading of 4 volts at point D. Once again the tempera- ture of the solution must be 25° C. 6. Heat the solution to approximately 70° C, and with the PTC suspended in the solution check to see that a reading of 4 volts is still obtained. If necessary, readjust P3. 7. Repeat the above procedure from point 3 onwards. The high input impedance of the circuit renders it sensitive to r.f. pick-up, hum etc. and it should there- fore be well-screened, preferably by mounting it in a metal case. The connections to the PTC must be water, acid and alkali proof. The accuracy of the circuit depends upon a stable supply voltage (± 15V), and upon the accuracy of the refer- ence solution used during calibration (not to mention the accuracy of the DVM). Glass electrodes are available com- mercially, and are supplied with instructions on how they should be used. Th. Rumbach (Germany) elektot july/august 1979 This robot is an example of a simple cybernetic model, i.e. it will take whatever manoeuvres necessary to navigate its way around any obstacles placed in its path. The robot will continue to travel in a straight line until it bumps into an obstruction of some sort, it then changes direc- tion to avoid the object in its way; if it becomes completely stuck, all the drive motors are switched off. The sensors used to detect obstacles robot with reflexes take the form of switches. During construction care should be taken to ensure that these react to contact over the entire length of each side, hence some sort of bumper arrange- ment such as that shown in figure 1 should be adopted. When an impact occurs, the switches detect on which side it is, and the information is fed as a four-bit code to a latch (IC3). The outputs of the latch trigger a 555 timer (IC2). For elektor july/august 1979 7-89 the period of the delay provided by the timer, this code is stored on the latch outputs, thus giving the robot time to take evasive action. The 4-bit code serves as an address for the four data-selectors (IC4 . . . IC7), which function as a look-up memory. The address information determines which of the data-selector outputs are enabled, and hence which of the four relays are pulled in. If a second collision occurs during the timer period, the latter is reset and a new code is fed to the latch. Once the timer delay has elapsed, the latch outputs go to 0000 and the robot continues on its way. The ac- companying table lists the various evasive manoeuvres the robot takes for each of the latch codes. Potentiometer PI should be adjusted such that the robot has sufficient time to just clear the obstruction. With 0000 on the outputs of the car collision alarm With the overcrowding that is a ductive material (e.g. silver paper). high it will enable the oscillator built common feature of most carparks Normally the weight and the tin will around N1, T1 and associated nowadays, the chances of coming be isolated from one another, but if components. The oscillator f re- back to one's car and finding a dent the car is subjected to a reasonably quency can be adjusted by means of in the bumper or one of the wings violent impact, the two will touch. preset potentiometer P2. The output are quite considerable. It is particu- The sensitivity of the sensor can be of the oscillator is fed via N2 to the larly galling if the culprit has made adjusted by shortening or lengthening amplifier section built around off without acknowledging his guilt the spring. One word of warning: if it T2 . . .T4 and hence to the outside and leaving behind his name and is made too sensitive, it may react to world via the car horn: T4 is connec- address. The following circuit is severe gusts of wind! ted in parallel with the existing horn designed to attract the attention of The circuit of the alarm is shown in button (S3). Note that in some cars passers-by in the event of someone figure 1. The sensor is mounted in the horn is only operative when the bumping into your car. Hopefully place of S2. As soon as the two ignition is turned on. In that case, the guilty party will then be unable contacts are shorted, and assuming the supply connection to the horn to escape in anonymity, and will be SI is closed, the monostable multi- will have to be modified — it must be compelled to own up to his mistake. vibrator, IC1, is triggered, with the transferred to a (fused) connection First of all a suitable sensor, which result that its output goes high. The that is always 'on', will detect an impact to the car, must period of the monostable can be be constructed. One idea is to varied between 0.5 and 10 seconds M. Haest (Belgium) suspend a small weight from a spring by means of PI. As long as the inside a tin or jar lined with a con- output of the monostable remains 7-90 elektor july/august 1979 m aircraft sound and ’hijack’ effects generator The circuit described here was designed to fulfill the need for a jet airliner sound effects generator in a school play which involved an attempted hijack. The unit had to be capable of producing a number of typical jet noises as heard from the inside of the aircraft - start-up, idle, take-off, in-flight, approach, landing and reverse thrust conditions — together with tyre squeal on landing and machine-gun fire. To simulate the sound of a jet engine both the roar from the 'hot end' of the engine and the whistle from the compressor (whose pitch varies with engine speed) are re- quired. The engine roar is obtained by feeding white noise through a band pass filter which emphasises frequencies around 800 Hz. Transis- tor T1 and the zener diode D1 form the white noise generator whose output is fed to IC1, the band pass filter. The volume of the roar can be altered by potentiometer PI. The whistle is derived from the sine- wave output of the 8038 waveform generator IC3 whose frequency range is set by C8 and is typically between 10 Hz and 10 kHz. The actual frequency is determined by the throttle control P6 which is connec- ted to the FM input of IC3 via switches Sic and S2b, while the whistle volume is controlled by potentiometer P5. Engine inertia (lag in response to throttle demands) is realistically imitated by the inte- grating network R21/C10. CIO should be a low-leakage type - if available, a 10 n paper capacitor would be a good choice. Both these signals, the engine roar and compressor whistle, are then summed by IC2 and passed to the external amplifier through the overall volume control P2. By varying the settings of these controls all of the above mentioned jet engine sounds can be realised. The purity of the sinewave signal can be adjusted by potentiometers P3 and P4. The gunfire effect is obtained from the squarewave output of IC3 when switch SI is closed. By closing this switch the squarewave is allowed to pass through to the summing ampli- fier and the FM input of IC3 is taken high to give minimum frequency whilst the frequency range itself is also decreased by the addition of C9 in parallel with C8. Resistor R19 is included so that C9 is always kept charged to the average voltage across C8 to prevent a 'chirp' when SI is first closed. The tyre sqeal effect is also obtained from the squarewave output of IC3. When switch S2 is closed the squarewave is enabled, and the FM input of IC3 is initially taken to a potential which gives a high fre- quency output via the potential divider R22/R23, but as R23 is now disconnected capacitor C11 will discharge to the positive supply rail and the frequency of the squarewave output will fall rapidly. M. J. Walmsley(United Kingdom) elektor july /august 1979 digital milometer Mechanical mileage recorders for bicycles have been commonly available for a large number of years, however there are several advantages to be gained from adopting an elec- tronic approach: robustness, im- proved readability thanks to a digital readout, and 'friction-free' operation. The distance travelled is measured by counting the number of wheel revolutions. Each complete revolution is sensed by means of a small magnet attached to one of the spokes. The magnet actuates a reed switch mounted at the appropriate height on the front forks of the bicycle. In the circuit diagram the reed switch is represented by SI. Each time the magnet passes the switch, the latter closes momentarily, triggering the two 555 timers (IC4a, IC4b) and providing a pulse to the divider formed by FF1 . . . FF7 and N1. The output of N1 in turn produces a pulse every tenth of a mile. These pulses are fed to the three decade counters/decoders IC1 . . . IC3 which are connected in cascade. The maximum count is therefore 99.9 miles. With a 27" wheel, a pulse every tenth of a mile corresponds to 74 revolutions (connections to N1 shown as unbroken lines), whilst in the case of a 28" wheel 72 revolutions (dotted connections to N1) are required. The current consumption of the circuit is 130 mA with the displays enabled (S3 in position 1) and 30 mA with the displays switched off (S2 in position 1). A 9 V battery (6 x 1.5 V) will provide a suitable power supply. Alternatively one could consider using ni-cad cells which are recharged via the dynamo. Of course the circuit no longer functions 'friction-free' in that case. R. Kuijer (The Netherlands) 7-92 elektor july/august 1979 tape-slide synchroniser Slide shows can be improved greatly by providing them with accom- panying music and spoken comment from a tape. One way of changing the slides automatically at the correct moments is to record trigger pulses on an additional track on the tape. However, that requires an additional tape head (unless you make do with mono sound), which can prove rather complicated. The circuit des- cribed here uses 30 Hz pulses, re- corded on the normal sound track — simplifying matters considerably. The circuit works as follows. During ,0 J B = 40 V/800 mA b tt and table) ridge rectifier Table 1 UK28 • elektor july/august 1979 THREE FOR FREE FROM CSC ELECTRONICS BY NUMBERS EXPERIMENTOR BREADBOARDS. PROTO BOAR DSA \ LED BAR GRAPH UNIVERSAL No modu,.r ftf^*** >»* for cost "^ 060 ^ 08 INDICATOR n?c kel-iilve* contact holes Start small and simply TWO EASILY ASSEMBLED KITS. Now using EXPERIMENTOR BREAD. snap lock boards toqether to build breadboard of any I PROTO-BOARD 100 KIT £11.E FILL IN COUPON & RECEIVE FREE COPY OF ELECTRONICS BY NUMBERS PROJECTS Nos 1, 2 AND 3