CCwosp a low-cost synthesiser selektor clavitar - Once again, the remaining presets are tuned to half-note intervals. The open note of the G string is then used as reference for tuning the first preset in the D chain. Along the way, some further checks are possible. This is illustrated in figure 10. Two keys with the same symbols should produce the same note; the open note for each string is shown to the right of the keys. Some octave relationships are also shown: two symbols in one key indicates that the note is one octave higher than that produced by the key with only one symbol. For example, the extreme left-hand note key on the upper string (Sgi) should be one octave lower than the centre key on the lower string (Sg'). Those who have access to a frequency counter may benefit from Table 2. This lists the correct frequencies for all keys, with the instrument set to the highest octave (S2 and S3 closed, S4 open). As before, the presets in each chain must be adjusted from 'high' to 'low': from top to bottom in the Table, in other Play Those who can play the guitar should have no difficulty 'picking up' this instrument: it is meant for them! As an that sounds like . rch 1980-3-13 There's no accounting for taste, so they say. The Elektor piano seems to be an exception: several readers have called us to account for the fact that it didn't sound the way it should. Perhaps this was only to be expected: we were quite satisfied when it sounded like other electronic pianos - but most people want it to sound like the real thing. We have listened to our readers' com- ments; we have listened to the piano — modified it — and listened to it again. To be honest, we tried several modifi- cations and rejected most of them because they were either too extensive R4, R5, RIO, R11, R16, R17, R22, R23, R28 and R29 are deleted. Modifying the boards is a fairly simple matter, especially since all changes are clearly shown in figures 3 and 4. First, the octave board (figure 3). PI and R37 can be removed (or left in, if you like — it doesn't make any differ- ence) and a wire link is added between the wiper connection of PI and the right-hand end of R37. This connects the original output rail (and the original output connection) to supply common. The output is now taken from the -J1 connection at the upper right-hand edge in the component layout in figure 3. a piano that sounds like a piano a minor change for a major improvement Good news for those who have built the Elektor piano! A few simple changes and one or two additional components make it sound much more 'realistic'. Less like an electronic piano and more like the real thing. or just not worth the effort. Now, finally, we've found what we were looking for: a few simple changes that make all the difference. Operation: piano The proposed modifications affect both the octave boards (figure 7 in the original article, modified as shown in figure 1 here) and the filter circuit (figure 13 in the original, figure 2 here). On comparing the new version of the keyboard circuit with the original, the differences will be obvious. The original output (the common rail linking R25 to R36) is now connected to supply common; this makes PI and R37 redundant, so they can be omitted. Obviously, it is a good idea to have an output somewhere. This is achieved by adding a preset potentiometer between the commoned collectors of T1 . . .T12 and the -13 V rail (Ui). Effectively, in other words, the output is moved from one end of the re- sistor/electronic switch/transistor groups to the other. That's all for the octave circuits. In each of the five input lines to the filter circuit (figure 2), electrolytic capacitors are added (C47...C51). Furthermore, four capacitor values are changed: Cl now becomes 6n8, C2 becomes 27 n, C3 is now 47 n and C4 is also changed to 47 n. At the outputs of opamps A1 . . . A5, several com- ponents are removed: diodes D1 . . . D5 are replaced by wire links, and resistors The left-hand '— UI' connection retains its original function. For this modifi- cation, the copper track beside pin 7 of IC3 must be cut. The easiest way is to make two parallel cuts in the track, using a sharp knife, the track between these cuts is then heated with a soldering iron, after which it can be lifted off the board with the tip of the knife. Further- more, the wire link immediately to the right of IC1 and that to the left of IC2 are removed. The IC1 wire link is replaced by preset potentiometer P9; note that the wiper is connected to one end. Finally, the — UI connection to IC2 and IC3 must be restored. Using insulated wire, the -UI connection is linked to pin 7 of IC2 and pin 7 of IC3, as shown. Note that the connection to the next board may also have to be rewired - if it was taken from the upper right-hand edge of this board. The filter board is even easier. Diodes D1 . . . D5 are replaced (or bridged) by wire links. Resistors R4, R5, RIO, R11, R16, R17, R22, R23, R28 and R29 are removed. Capacitors Cl . . . C4 are replaced, using the new values given above. Finally, electrolytics are included in series with the inputs — the neatest way to do this is by breaking the copper tracks near the inputs, as shown, and mounting the capacitors across the gap. That just about wraps it up. The only remaining point is the adjustment procedure for the five new potentio- meters (P9). Initially, they are set to minimum resistance; then they are turned up to the point where even hitting eight or ten keys within the same octave, hard, still doesn't cause audible distortion. Not that it will sound 'nice', obviously, but the difference between a dischord and distortion should be obvious. Having adjusted each octave board in this way, the 'softest' of them is taken as a reference, and all others are turned back to the same level. If one has access to an oscilloscope, a simpler adjustment procedure can be used: each preset is set so that the cor- responding output of opamps A1 . . . A5 is 500 mV peak to peak when one key in each octave is hit. Finally, if necessary, the filter circuits can be readjusted by means of PI . . . P4. In conclusion Is everybody happy? We hope so. Should you feel that there aren't enough even harmonics, let us know. We've got a solution for that one, too — even though no-one has complained yet. Maybe we'll include it in the Summer Circuits issue. Be warned: it involves a 'Master tone generator' and ' Electronic piano', Elektor, September 1978. 'Extending the Elektor piano', Elektor, December 1978. 'Missing Link', Elektor, October and December 1978. elektc 1-3-17 or march 1 980 inrofipdi the Chorosynth is . . . an inexpensive keyboard instrument that anyone can play, a mini synthesiser for use as a second keyboard by the working musician, or anything in between. The Chorosynth is a real instrument with an amazing variety of sound possibilities at its disposal. The winning design of our competition, it is, as the name suggests, a synthesiser with chorus effect. Although the prototype was designed with a keyboard, we have made it possible to 'play now and buy your keyboard later'. The dynamic range of the instrument needs to be between 1 50 and 3000 Hz at least, before it can be played. This corresponds to the length of organ pipes ranging from 16' to 2' (feet). Further- more, the bass notes must be rich in harmonic tones which can be filtered as required. Now a tune played on only a few notes, however rich in harmony, sounds as though something is missing. However, when the same melody is played with fifths a much richer and therefore more musical sound is produced. If the tune is played using several sound sources in unison (tuned to virtually the same frequency), it sounds quite different and this in fact produces the chorus effect. A low frequency modulation (vibrato) is also particularly useful when simulating the sound of stringed instruments. What does the Chorosynth sound like? As always the description of any specific sound is extremely difficult, however we are sure that the reader will be more than satisfied with the overall sound quality of the Chorosynth. It is signifi- cant that the prototype has been used at live performances with great success. march 1980 the chorosyr The Chorosynth uses a 2 Vi octave keyboard and has a dynamic range of 6 octaves. Because of this broad fre- quency range, instruments ranging from violin to cello and flute to clarinet can be imitated. It is also possible to adapt the dynamics of the output signal with an envelope generator that can be switched to AR (attack -release) or ASR (attack-sustain-release) envelopes. Block diagram The block diagram of the Chorosynth is shown in figure 1 . The 2 Vi octave keyboard produces a KOV (keyboard output voltage) which controls four VCOs (voltage controlled oscillators). VCOs 1 . . . 3 have the same voltage to frequency characteristics and are tuned to the same pitch. The fourth oscillator (VC0 4) is tuned to a frequency 1% times higher, in other words it produces a note which is a fifth higher than that of the other VCOs. A fifth oscillator (marked vibrato in the block diagram) produces a relatively low frequency signal which is fed to the modulation inputs of the VCOs. The VCO output signals will then be slightly frequency modulated to produce a vibrato effect. The frequency as well as the modulation depth can be varied. The output of the VCOs are divided by 2, 4, 8 and 16. The dividers' outputs are exactly one octave apart and can be selected with the aid of 'stops' (or switches if you are not into organs!). The output signals of the dividers and pulse shapers of VCOs 1 and 2 are added together and mixed with those of VCO 3 via the chorus switch. In this way the chorus effect can be switched on or off as required. The pulse shapers are simply a set of NAND gates which produce a square-wave with a duty-cycle of 25% from the divider outputs. It is this type of waveform that is particu- larly suitable for simulating the sound of stringed instruments. Of course, some filtering of the signal is required before it is acceptable to the human ear. The Chorosynth has two filters, one for strings and one for woodwinds. A gate-pulse is derived from the KOV which is used to trigger the envelope generator. This can provide one of two envelope patterns - attack -release or attack-sustain-release. This envelope controls the VCA (voltage controlled amplifier) before being fed to an exter- nal amplifier. Circuit diagram The current source and voltage divider chain for the keyboard (shown in figure 2) provide each key with a specific voltage level. This keyboard output voltage (KOV) is then passed to the non inverting input of op-amp A5 in the main circuit diagram (figures 3a and 3b). This can be done by means of the 'printed circuit keyboard' (figure 4) and a stylus; alternatively, a conventional keyboard can be used. The FET Til functions as a switch to 'sample-and-hold’ the keyboard voltage (in Cl). The rate of change of the voltage level at the non-inverting input of IC1 is controlled by P2 and Cl allowing a glissando effect between The four VCOs in the block diagram are the circuits around IC4 to IC7. They are 555 timers which have been wired as astable multivibrators. ICs 4, 5 and 6 (VCOs 1, 2 and 3 in figure 1) are tuned to the same frequency and therefore have similar component values. IC7 (VC0 4) is tuned to a frequency V/i of the 4520 have been used. Thus it is The woodwind filters are active lowpass times greater (that is a fifth higher) only divided by 2 or 4; in other words, elements with a turnover frequency of which accounts for C5 having a lower only a T or 2' organpipe can be ob- 2 kHz (for 16', 8' and 4') and 4.5 kHz value. Each VCO has a modulation tained. The outputs of the two dividers (for the top three registers, 2', 2 2/3', input (pin 5) controlled by the vibrato in IC9 are coupled and then mixed with and 1 1/3'). The lower registers thus oscillator circuit - ICs 2 and 3. The the outputs of the divider for VCO 3 have a greater proportion of higher frequency of the vibrato is varied by P3 (IC6) via the 'chorus' switches SI to S4. harmonics, which improves the musical and the modulation depth is controlled This provides a seperate chorus effect tone. by P4. The potentiometer P5 introduces for each register. an offset to all the VCOs which in Switches S5 to SI 4 serve as stops. practice allows the pitch of the Depending on which of the stops is Gate pulse Chorosynth to be fine tuned. closed, the signal reaches either a The gate pulse is derived from the KOV The output of VCOs 1 , 2 and 3 are each woodwind or a strings filter. The filter via A5, A7 and A8 and its purpose is to divided by a 4520 producing frequencies circuits are comparatively simple. Passive trigger the envelope (AR/ASR) circuit, which are 2, 4, 8 and 16 times lower highpass filters whose top-end response The type of envelope contour is selected than the VCO frequencies. As far as is slightly rolled off by capacitors C28 by switch SI 5. With this switch in the VCO 4 is concerned, only two outputs and C30 provide the voicing for strings. AR position, the positive going edge of the gate signal triggers the flip-flop formed by NAND gates N10/N11, turning on T7 and charging capacitor C36 via the attack control, P10. As soon as the voltage on C36 reaches approxi- mately 13.5 V, T10 turns off and the flip-flop is reset. The capacitor then starts to discharge via the release control, P1 1, and transistor T8. With the ASR envelope selected, the flip-flop remains set as long as the gate signal is present, that is as long as a note is held (sustained) on the keyboard. Only when the key is released can T10 reset the flip-flop and C36 discharge (release). The output of the envelope shaper circuit controls a simple VCA (voltage controlled amplifier), which in turn determines the dynamic amplitude characteristics of the output signal. The VCA consists of an op-amp (A4), with a FET (voltage controlled resistor) con- nected in the feedback loop. Construction and setting up The printed circuit board for the Chorosynth (figure 4) includes all the components and a keyboard layout. The keyboard has been included for those readers who wish to keep the cost down to a minimum. It is a simple matter to connect a conventional keyboard, one set of make contacts per key is all that is required. It should be noted that since the oscillators have a linear voltage- frequency characteristic, the keyboard tuning resistors must form a logarithmic potential divider. The appropriate values (for example R86a and R86b) are all made up using resistors from the E24 series. With 1% tolerance resistors, a tuning accuracy of 1% of a semitone is obtained, however (with the exception of R115a and R1 15b where 1% must be used) 5% resistors will also prove suitable, since the chorus effect by and large obscures any slight mistuning. Inductors LI to L4 are ferrite beads 5 1980-3-23 Resistors: R1 = 10 M R2,R3,R6.R10.R21 . . . R43, R64.R68.R74.R75.R82, R84 - 10k R4.R73 = 100 k R5.R72 ■ 5k6 R7.R77.R78 * 1 M R8,R9,R19,R20.R66,R70. R80 - 47 k R11.R53... R62 = 22 k R12 . . . R15 = 18k R16 = 15k R17-4k7 R18 = 82 k R44 . . . R52 - 1k8 R63.R67 - 39 k R65.R69 = 6k8 R71 ,R97B,R1 128 * 330 ft R76 ■ 100 !1 R85.R105B '220S7 R86A.R90A = 6fl2 R86B.R101B > 560 U R87A = 6S28 R87B = 150 n R88A.R89A = 10 n R88B.R108 = 22 SI R89B.R1 10A.R1 1 1 A, R1 13A = 27 SI R90B.R94B.R106B = 1S25 R91.R94A.R109B = 802 R92A = 901 R92B.R103B = 180 O R93A.R96A.R97A.R99A. R100A= 12 0 R93B = 39 O R95A.R98A.R101A, R109A = 15 0 R95B.R1 14A = 33 O R96B = 1200 R98B = 68 O R99B = 1 O R100B = 108 R102A = 16 0 R102B.R104B.R114B = 470 0 R103A.R104A.R106A, R107A = 180 R105A.R1 12A = 20 0 R107B = 207 R110B » 270 0 R 1 1 1 8 = 680 O R113B ■ 202 R1158 - 120k R1 15A = 1k2 1% Potentiometers: PI = 500 k (470 k) preset P2 = 1 M lin P3 = 22 k (in P4.P5- 10 k lin P6 . . . P9 = 25 k presets P10.P11 = 500 k (470 k) log Capacitors: Cl = 470 n C2.D3.C4 = 3n3 C5 ■= 2n2 C6 . . . C9. C18 . . . C26 “ 10 p/35 V tantalum CIO . . . C13.C17.C38 . . . C45, C50.C51 .C53 = 100 n C14 = 33 n C15.C36 = 4p7/35 V tantalum Cl 6= 2p2/35V tantalum C27.C28.C31 ,C52 ■ 10 n C29.C30.C35.C37 = 47 n C32 ■ 12 n C33 - 22 n C34 = 27 n C46 ■ 1000 p/35 V C47 = 330 m/35 V C48.C49 - 330 n Semiconductors: D1.02.D3.D4 = DUS D5.D6 = 1N4001 T1 . . . T5.T8.T10. T13 = BC177B. BC557 T6.T7.T12 = BC 107B, BC 547 T9.T1 1 = 2N3819, BF 2568 IC1 = CA 3140, LF 356 IC2.IC4 . . . IC7 = NE 555 IC3 - 741 IC8.IC9 = CD 4520. MC 14520 IC10 . . . IC12.IC18 = CD 401 1 IC13.IC14 = TL084 IC15 = 78L15 IC16= 78L12 IC17 = 79L15 Miscellaneous: Trl = 16 V/150 mA transformer S1.S5 . . S15= SPDT S2 . . . S4 * DPDT LI . . . L4 = 5 turns of 0.2 mm Technical details: Range: C to c 1 Keyboard: 214 octaves Registers: Cello (16') Bassoon (16') Viola ( 8’) Clarinet ( 8') Violin ( 4') Clarinet ( 4’) Violina ( 2') Flute ( 2') Twelfth (2 2/3') Larigot (1 1/3') Effects: Chorus (16') Chorus ( 8') Chorus ( 4') Chorus ( 2') 65.41 Hz to 4184 Hz 510 S14 S9 S13 S8 S12 S7 511 S4 S3 S2 SI Additional controls: Glissando: (Portamento) P2 Vibrato: Depth and rate P8 and P9 shaper: Attack-release or attack-sustain release selectable by SI 5; attack and release times independently variable between 1 mSand 10 S (P10 and P1 1) with five turns of 0.2 mm enamelled copper wire. All other components are readily obtainable. Since the Chorosynth has a large number of potentiometers, controlling it may at first be a little difficult. It is advisable to set all the controls to the following positions at the beginning of the setting up procedure: Pi P2 P3 P6 P7 . . P10 P11 P12...P13 SI . . . S4 S5.S6 57 58 . . . S14 51 5 The VCA has two adjustment points, PI 2 and PI 3. PI 3 determines the minimum gain and is adjusted such that no output signal is audible. A note is then 'struck' and held, whilst PI 2 is adjusted until a slowly rising signal appears at the output of A4. PI is then adjusted so that no change in frequency occurs when a key is struck. In order to trim the keyboard, PI 4 is adjusted to give 8.43 V across R 1 1 5. This should be measured with a universal meter of at least 10 kii/V. With the aid of P8, the third VCO (IC6) is adjusted, so that when the key to the far left of the keyboard is operated, a C2 note can be heard at the output. The pitch can be compared with that of another instru- ment, or the frequency can be measured (523.2 Hz). 52 is then closed and, by using P7, the frequency of IC5 is trimmed to a value which should correspond as much as possible with that of IC6 — minimum beat note in the output signal. At the same time P6 must be trimmed so that there is very little vibrato at the output. It should now sound like a chorus. Finally, P9 is adjusted so that the output frequency of IC7 (VCO 4) is 1 Vi times that of the other VCOs. The Chorosynth should now be ready to play. Under 'technical details' the stops and their values are indicated. Although this may be the end of the Chorosynth article it certainly is not the end of the possibilities for this instru- ment. It will be apparent to many readers that the Chorosynth offers considerable scope for many modifi- cations. If you find one that you would like to share, we would like to know about it. M esistance, fully esistance, fully antl-clockwisa. mid -position minimum resistance, fully wiper to earth, fully clockwise. switched to ground switched to ground for smooth, continuous projection Enthusiastic amateur photographers and professionals are not only interested in making good pictures: they also want to present them properly. For a slide show, the professional 'trick' of using two projectors alternately is becoming increasingly popular — the 'black' gap between successive slides can be eliminated in this way. For the finishing touch, each following slide should be gradually blended into the existing picture. This is where the dual slide fader comes in: as the brightness of one projector is smoothly increased, the other is gradually faded out. A complete dual projection installation consists of two slide projectors and a control unit. Complete, integrated units also exist — everything built into one case — but it is more common to use a separate control unit with two standard projectors. Most commercially available units have one disadvantage in common: they are expensive. The reason for this is that they are usually designed for maximum flexibility, with all kinds of additional 'features': automatic fading, tape-slide synchronisation, so-called 'sparkling' effects and so on. However, if one reduces the number of applications and features, aiming at a manually operated dual fader, it is possible to come up with a simple and cheap design. The 'fade' from one projector to the other is done manually, by means of a stereo potentiometer ; slide changing is also done by operating the two projectors in the normal manner, it is not done automatically by the fader Figure 1 gives a drastically simplified block diagram. It should be noted that there are two types of projection lamp: one operates at the full mains voltage, whereas the other (more modern) type uses a much lower voltage (24 V). In this article, two circuits will be described for this reason: however, the block diagram is equally valid for both. Mains voltage control The circuit given in figure 2 works in the same way as a normal triac mains dimmer. For older projectors, using a mains-voltage lamp, this circuit is ideal. It can also be used for more modern projectors that use a 24 V lamp, varying the primary voltage to the lamp transformer in the projector. This is not an ideal solution, however, since a mains transformer is not designed to run on the type of distorted waveform that a triac control unit produces. The ratio between primary and secondary voltage is not constant over the full control range, making the control characteristic rather less smooth than one would like. To sum it up: if you have older projectors, using mains-voltage lamps, read on; if you have modern projectors with 24 V lamps, skip this section . . . The circuit itself is quite straightforward. Two standard triac control circuits are used, with the control potentiometers combined into one stereo potentiometer (P2). Note that a tandem 470 k linear potentiometer should be used. Both control circuits can handle any load up to 400 W. 1 One control circuit can be mounted on the printed circuit board given in figure 3. For a complete unit, two of these boards are therefore required. The interference suppression coils (LI and L2) must be able to handle a current of up to 2 A; this type of coil is available ready-wound. The two boards, two coils and the stereo potentiometer can all be mounted in a suitable plastic case. Note that the whole circuit is connected to the mains! This means that all due care must be taken when constructing the unit. In particular, an insulating case must be used and the potentiometer should have a plastic spindle. The capacitors must also be suitable for the relatively high voltages present in the Figure circuit. are cor If you have reached this point, you are apparently interested in the mains voltage version. You may therefore pass over the following section (which deals with the other circuit) and proceed to 'construction and use'! Low voltage control The circuit given in figure 4 is intended for controlling the low-voltage supply to a 24 V lamp. In this case, the two triacs are mounted inside the slide projectors and the two coupled control circuits are mounted on a single printed circuit board in the control box. As before, the circuit consists of two complete triac control circuits, linked by means of a stereo potentiometer. The circuits are rather more sophisticated than those used in figure 2, since a much lower voltage must be regulated smoothly. Since both control circuits in figure 4 are identical, we will confine the explanation to the upper half. Trigger pulses for the triac Tri 1 are produced by the well-known timer 1C, type 555. In this circuit, it is used as a monostable multivibrator; it is triggered each time the voltage at pin 2 decreases to below approximately one-third of the supply voltage. Since this voltage is actually the full-wave rectified output from a bridge rectifier (B1), the 1C will be triggered once during each half-cycle of the mains waveform. When IC1 is triggered, its output (pin 3) goes 'high' - to the full supply voltage - and pin 7 (the 'discharge output') goes basically open-circuit. Capacitor C2 now starts to charge through P2a and R2. When the voltage across C2 reaches approximately two-thirds of the supply voltage, the 1C switches back to the other state: pin 3 goes 'low' and pin 7 is also connected to supply common — discharging C2 rapidly. The circuit will remain in this state until the next trigger pulse occurs at pin 2. When the output of IC1 goes low, transistor T1 cuts off. The voltage at the collector of T1 swings positive, triggering the triac (provided SI is in the position shown). The triac will now start to conduct, until the following zero- crossing of the mains waveform. Since the moment that the output of IC1 goes 'low' depends on the setting of P2a, this potentiometer effectively controls the point on the mains waveform where the triac starts to conduct. This, in turn, determines the brightness of the projection lamp, Lai . The other half of the same poten- tiometer (P2b) controls the brightness of the second projector. Provided a linear potentiometer is used, wired exactly as shown, the result is a smooth fade from one projector to the other. Construction and use As far as the construction of the unit is concerned, the main points for the mains voltage version have already been mentioned: adequate electrical insu- lation and sufficiently high voltage rating for the capacitors. For the low voltage control unit, there are a few more points to note. The bulk of the circuit is mounted on the board given in figure 5; this, and the mains transformer (Tri) can be mounted in a small case. A miniature 12 V transformer can be used, as the circuit only draws a few milliamps. The triacs, switches SI and S2 and resistors R*i and R x 2 are a " mounted in the projectors; transformers Tr2 en Tr3 are the existing transformers in the projectors. The switches are included so that the projectors can also be used on their own in the normal way. With SI , for instance, in position 'a' the corresponding triac will conduct during the full mains cycle — the projector will continue to work as if nothing had been modified. When the switch is in position 'b' the projector can be controlled by the slide fader unit. Quite a high current is required for the lamps (a 250 W lamp draws more than 10 A), and since some 1.2 V remains across the triac even when it is fully 'on' the power dissipation can be over 1 2 W. For this reason, each triac must be mounted on a fair-sized heatsink; if it is possible to locate this at some point where it is cooled by the fan in the projector, so much the better. When mounting the triacs, it should be noted that 'main terminal 2' (mt2, the cathode) is connected to the metal part of its When it comes to actually wiring up either of the control units to a given pair of projectors, some electrical .R3.R6 = 12 k ,R5 ■ 560 12 ,R7,R x1 ,R x2 = 330n niconductors: ,IC2 - 555 T2 = TUN, BC 107 = 1 N4002 = 4 x 1N4002 1,Tri2 “ TIC 226 - 1 2 V/100 mA mains ansformer S2 - single-pole switch peculiarities are likely to be found. Since virtually every projector is different, it is impossible to discuss all possibilities in detail. However, the following points may be a help: • Nearly all projectors contain a fan. In most cases, this is connected to the mains; sometimes it runs off the 110 V tap on the lamp transformer. It may also be found that the fan motor actually doubles as mains transformer! • A remote-control slide-change mech- anism is usually driven (via belt or gear wheels) by the fan motor, although more expensive projectors may have a separate motor for the job. When a slide is to be changed, a mechanical coupling is operated by an electromagnet; the latter is often powered from the 24 V winding on the lamp transformer. In some cases, a simple DC supply may be used for the magnet. • Many projectors also incorporate some kind of 'back-one-step' slide change. This will also usually involve some electromagnetic mechanism that is powered from the low-voltage supply. • Remote-control or automatic focussing Cautofocus’) and/or timer mechanisms usually operate off a full- wave rectified 24 V supply. In some cases, an additional 12 V supply may be found for these features. • In some slide projectors, it is possible to switch the lamp to a lower voltage - giving less light, but extending the lamp life considerably. Usually, a lower- voltage tap on the transformer is used It will be apparent from the points listed above that installing the mains voltage control unit, in particular, may call for quite extensive rewiring of the projector. If the lamp runs off the raw mains voltage, well and good — that's what this unit is designed for. If the projector uses a low-voltage lamp, however, things get complicated. Every- thing except the lamp must be discon- nected from the transformer and powered from a separate low-voltage supply. After all, the idea is that slides are to be changed when the lamp is off — and at that time, the transformer is virtually disconnected from the mains! Installing the low-voltage control unit will rarely be a problem. In nearly all cases, at least one wire will be found that runs direct from the transformer to one side of the lamp (and to nothing else) - the other lamp lead may run through some switches, making it more difficult to trace. The triac can be connected in series with the direct connection to the lamp. H microprocessors The matrix printer shown in the photo the Matsushita EUY-IOE-IOT. This is so-called electro-sensitive printer, that prints the characters (letters, numerals symbols) on a special type of paper. This paper is coated with a very thin (0.1 micron) layer of aluminium; im- mediately below this is an almost black surface. If the aluminium is scratched off, this dark layer becomes visible; it is possible to 'write' on it in this way, using a sharp point. The matrix printer does its job in a more elegant way. A miniature motor moves a 'print head' across the paper, as each line is printed. The same motor also takes care of the paper transport for 'line feed'. The print head contains a vertical row of seven little 'pins'; these can be connected (via electronic switches) to supply common. The pins are in contact with the aluminium coating on the paper. This electrically conducting layer is connected to a positive voltage (27 V). When one of the pins is connected to supply common, a current of a few hundred milliamps flows through the aluminium coating and the printer pin. At the point where the latter touches the paper, a high current density results. The heat pro- duced is sufficient to burn away the aluminium layer at that point, leaving a small black dot. Since more than one of the pins can be connected to supply common simultaneously, it is possible to write up to seven dots in a vertical row at any time. If voltage is now applied to the motor, the print head will move across the paper - writing up to seven horizontal lines, depending on the number of pins that are activated. At the end of the line, the printer head is automati- cally moved back to the beginning of the next line: 'line feed' and 'carriage return'. a black-and-white display It can be useful to print the information output from a microprocessor system on paper. For small pP systems that give a hexadecimal output, a so-called matrix printer is a good choice. This is connected to the microcomputer system via a suitable interface. In this article, a printer and interface for the SC/MP system are discussed, as well as the necessary software. A 'disassembler' program is also included - an invaluable aid when analysing existing programs. The printer and interface are suitable for other microprocessor systems as well; however, the software must then be modified, of course. As the head moves across the paper, it is obviously possible to switch the pins on and off, producing dotted lines. In this way, all sorts of characters can be printed as groups of dots: the trick is to switch the pins on and off at exactly the right moments to produce the the desired character. As shown in figure 1, each character is built up in a 35-dot matrix: five successive vertical columns (T1...T5), each consisting of seven dot positions (N1...N7, corresponding to the seven pins). A character generator switches the printer pins on and off at the correct moments. This unit is part of the electronics that link the SC/MP system to the printer: the printer interface. This interface circuit will be discussed later. The printer contains a reed switch to 1980-3-29 Figure 1. Using a 5 x 7 dot m indicate the end of a line, and the moment that the print head has returned to the beginning of the next line. Furthermore, a 'sync generator' is included, intended for synchronising the character generator to the position of the printer head on the line. This 'generator' consists of a gear-wheel, driven by the motor in the printer and moving past the core of a coil. The core is magnetised, by means of a permanent magnet; as the teeth of the gear-wheel pass through the magnetic field, a sinusoidal voltage is included in the coil. The interface described here doesn't do the actual synchronisation itself; instead, the software is designed to ensure that the column spacing is maintained proportional to the speed of the printer head. So much for the printer itself. On its own, however, without the interface circuit and corresponding software, it is as useless as a typewriter without a typist. Which brings us to the next section: The interface A block diagram of the interface circuit is given in figure 2. The buffer memory (8-bit latch) is basically equivalent to a single RAM location. When the address decoder provides a 'store' pulse, the information present on the data bus is stored in this latch and passed (via suitable power drivers) to the printer pins. Each 'store' pulse therefore enters the data for a single column of dots. As mentioned earlier, the characters are printed one column at a time - five for each character. For each column, seven data bits are required ('stored' at an address in the field F200 . . . F3FF);the eighth bit is used for motor control, via a separate buffer stage: it ensures that the motor starts at the correct moment at the beginning of a line, and stops immediately after returning to the beginning of the next line. The address decoder is designed for use with 'A K address fields. The EPROM with the firmware for SC/MP system control and character generation is located between addresses F000 and F1FF. The following 14 K is used for addressing the 8-bit latch; then another 'A K (from F400 to F5FF) correspond to a tri-state buffer that outputs the data from the reed switch and sync generator in the printer to the data bus. The fourth address field (F600 . . . F7FF) can be used for an additional EPROM. This could be used, for instance, to store firmware that makes the printer routine independent of Elbug in the original SC/MP system — the push and pull routines, in particular. Alternatively, a special printer program could be located here. All in all, the complete interface uses a 2 K address field - half a page, in other words. As mentioned earlier, the firmware takes care of character generation, including correct column spacing as detertnined by the speed of the printer head. Furthermore, it ensures that the text is printed in lines, each containing 8, 16 or 32 characters, as required. The SC/MP system must supply the data to be printed, one complete line at a time. To this end, the text must be loaded in ASCII code in a specified RAM area. Any available area can be used: as long as the interface is told where to look for it! The character generator, stored as firmware, can generate 64 different characters. Only the lower 6 bits of the ASCII code in each RAM location are needed to select the correct character. The two remaining (upper) bits are used to define the desired character size, corresponding to 8, 16 or 24 characters per line. As an example, the letter A in 6-bit ASCII code corresponds to 01. When the two upper bits are both 0 (complete code: 01) the smallest character size will be printed, corre- sponding to 32 characters per line. However, if one of the two upper bits is '1', larger characters are obtained: '41' for an A corresponds to 16 characters per line, and '81' makes the A even bigger, for 8 characters per line. When the firmware routine is started, it will want to know where to look in RAM for the text buffer that contains the data for one line of text. It will then scan the (hexadecimal) codes for the characters, as found in the text buffer, and convert them (by means of a 2 Figure 2. Block diagram of the printer interface. 3-30 — elektor march 1980 'look-up table') from ASCII code to printer pin control data. The routine transfers the data for the five columns, in turn, to the latch; the character is printed. Each character is automatically followed by a two-column space, after which the next character is retrieved from RAM and printed. This process is repeated until the end of the line (up to 32 characters). As each line is printed, the reed switch is 'open'; via N6, data bus line 00 is therefore 'high'. At the end of the line, the reed switch closes and the corresponding data line goes 'low'. This causes the program to load the text buffer, with the data for the next line; however, the printer head will not have got back to the beginning of the new line yet. The program continues to scan the data line, until the head is correctly positioned and the pins are again in contact with the paper. At that point, the reed switch opens and the next line can be printed. Further details on the use of the text buffer and printer routine will be given when we come to the software. The circuit The complete circuit is given in figure 3. IC1 is the address decoder. It is connec- ted to the upper seven address lines (making FFFF the highest address) and to the NWDS + NRDS line. Basically, this 1C is a 3-to-8 decoder, but only half of it is used - as a 3-to-4 decoder. Output YO selects an EPROM, IC2, from address F000. This EPROM is also connected to the lower nine address lines, so that 'A K addresses are available. The output from the EPROM goes straight onto the data bus. Outputs Y1 . . . Y3 of IC1 correspond to three further 'A K address fields: F200 to F400, F400 to F 600 and F600 to F800. When output Y1 is active (and NWDS), the character information on the data bus is passed via IC6 to IC7. printer for microprocessors The latter contains seven power drivers that can easily supply the current required for the printer pins. R8 and C6 are included to ensure that IC6 is cleared when power is first applied ('power-on reset'). The eighth output from IC6 is used to start and stop the motor, via T1...T4. This circuit is designed to introduce a slight voltage drop, since the motor is intended to run on 24 V. When the motor is to be stopped, it is actually shorted by T4, making for a more rapid stop. Output Y2 of IC1 enables the tri-state buffers, N5 and N6, when the third address field is selected (from F400). These buffers pass the information from the reed switch and sync coil in the printer to the data bus. The power supply for the printer is a standard circuit, as shown in figure 4. The output voltage can be adjusted (by means of PI) in the range from 20 ... 30 V. This gives some measure of 'copy darkness' control. A slightly 3-32 - elektc Eurocard size, and fitted with a 64-pin connector so that it can be plugged straight into the main bus in the existing SC/MP system. A 14-pin DIL connector at the other short edge of the board is used for the connections to the printer. The printer itself uses a 15-pin connector. The connections between the latter and the 14-pin connector on the p.c. board are listed in Table 1; for a neat appearance, it is a good idea to use so-called flat cable. Since the power supply circuit is on the p.c. board, two connections for the mains transformer (24 V secondary) are also provided. The complete unit can be plugged into the SC/MP system, without affecting its operation in any way. There is, however, one important point to note: the metal case of the printer and the paper are both connected to the +27 V supply, so they must be kept well away from supply common. That includes, for instance, the metal case of the existing SC/MP system . . . The software Without software, the printer is useless. The basic principle of the printer routine was mentioned earlier; a complete listing is given in Table 2. An extremely useful extension is given in Table 4: a disassembler program. An interesting point: both of these Tables were actu- ally printed with the aid of these two routinesl The 'instructions for use' of this software are best broken down into a few groups. Motor control The latch in the interface can be ad- dressed as F200. Storing data there (by means of the instruction MOD F200) with a value between 80 and FF starts the motor and causes up to seven horizontal lines to be printed. The motor can be stopped by means of the NRST key, or by storing data between 00 and 7F in the latch. Printer routine As mentioned earlier, the text is printed one complete line at a time; all data for the line must be available in a text buffer (somewhere in RAM) before starting the printer. The location of this text buffer can be specified as required, provided the printer routine is started at address F000 (see Table 2). Alterna- tively, the routine can be started at address F00F; in this case, address 0F00 is automatically selected as the first address of the text buffer — in other words the ASCII character codes must be stored from 0F00 on, so that the interface can retrieve them from there as the line is being printed. If the text buffer is to be located elsewhere in RAM, the first address must be specified in the TEXTAD locations: 0FF4 + 0FF5. The printer Table 1. Interconnections between the DIL connector (on the p.c. board) and the printer. Table 2. Listing of the printer routine, as stored in EPROM. ch 1980-3-33 routine is then started at address F000. It should be noted that the printer routine uses a further five RAM bytes as scratch pad for counting; these bytes correspond to the five locations im- mediately preceeding the first address of the text buffer. Short texts, less than one line in length, should be concluded by storing FF in the text buffer. This corresponds to a space, so that no further (unwanted) characters are printec. For that matter, it is good practice to conclude even complete lines with FF. as otherwise the printer may add part of a 33rd character at the end of the line After loading the text buffer, and the corresponding first address if necessary, the next step is to jump to the printer routine. This can only be done via the LIFO stack in the Elbug routine. This has the advantage that Elbug stores the CPU status in the stack before executing the printer routine. At the end of this routine, Elbug returns to the main program after restoring the original CPU status'. The printer routine is started as follows. The start address of the printer routine minus one (i.e. FOO0 - 1 = FFFF — same page! — or F0OF 1 = F00E) is stored in ROUTAD (Routine address: 0FFC + 0FFD). Then a JS3 (PUSH) = 0056 - 1 instruction is given. An example is listed in Table 3; the * Further details of the Elbug monitor routines are contained in Elektor, February 1979, and in the SC /MP book that will be appearing shortly. comments given there should give sufficient explanation. In this example, 0E30 . . . 0E40 is the text buffer; it contains the text '.SC/MP . . PRINTER.', where each '.' corresponds to a space. If the same text buffer locations are used for the next line, the address specified in TEXT AD can be left. Obviously this data must be modified, however, if a different RAM area is to be used for the following line. Further- more, it is possible to initiate further jumps to the printer routine by means of the instruction XPPC3, provided the contents of pointer register P3 are not modified by the main program. SC/MP disassembler A disassembler routine can be used to analyse an existing program, and print a 'listing' by means of the printer routine. As mentioned, the 'raw' machine-code programs for the printer routine and disassembler routine were converted into Tables 2 and 4 in this way. The disassembler first locates PC-relative jump instructions in the program to be analysed, calculates the initial addresses of the corresponding routines and marks these with a S symbol and a number. This, in itself, breaks the program up into small sections — a great help when studying and trying to analyse an 'unknown' program. The complete program is printed as a series of addresses and mnemonics, as shown in the Tables. The disassembler routine starts at address 2600; the display then reads da-d-t-s. There are now three ways of executing the program: operating the D key (on the hex keyboard) initiates a print-out via the printer described above. elektor marc TheT key (block transfer) is used for an output to the Elekterminal (1200 BD at flag 0). In this case, the halt LED will light every 16 lines; operating the halt/ reset key initiates the print-out of the next 16 lines, and so on. Finally, operating the S (subtract) key gives a serial output at 110 baud via flag 0; in this case, the print-out is continuous: it doesn't stop after each group of 1 6 lines. In some cases, determined by the characteristics of the peripheral equip- ment, the print-out may appear on alternate lines - in other words, every other line is left unused. In this case, the data in address 2516 can be modified from 3F to 08. After the desired key (D, T or S) has been operated, the display will indicate the type of output that has been selected. The next step is to enter the first and last address of the program that is to be 'disassembled'. If the first address is x000, the last address should not be xFFF (due to a peculiarity in the program . . .); it must be xFFE or less. If there are tables in the program, key T (block transfer) is operated, 'ta' now appears in the display, and the first and last address of the table can be entered. More than one table (up to 15) can be specified in this way, provided they are entered in the order in which they occur in the program, A single-byte table can be specified; furthermore, two or more tables that occur in a consecutive series of addresses may be specified separately. All tables are printed in hex matrix format. It is even possible to print out a complete program in this way. If a program is to be examined in which the addresses of the tables are unknown, the disassembler can still be used for an initial listing. Where tables occur, two question marks will be printed at the majority of the addresses, since the data will rarely correspond to a valid instruc- Once the tables — if any - have been specified, the disassembler can be started by operating any key except T. It then scans the specified program (section) twice, locating the various subroutines on the first pass and printing during the second. The disassembler can only handle programs that are contained on a single page. Larger programs must be dealt with one page at a time. If certain locations are used as 'scratch- pad' memory, they will be indicated as 'byte' provided the data '55' is stored there before running the disassembler. PC-relative jump instructions that specify an address outside the program range (lower than the start address, say) are not permitted. The disassembler uses memory locations from 2840 up to 2A40 as scratch pad for 'lable' addresses: room enough for 255 PC-relative jump instructions. A useful tip The EPROM that contains the printer routine is not strictly necessary. The printer for licro processors elektor march 1980- 3-; program given in Table 2 can be stored in RAM in the SC/MP system, say from address 0C00 to address 0DFF. In this case, the instruction at address F05A must be modified accordingly: to C40C in this example, instead of C4F0. In the demonstration program given in Table 3, the routine address will also have to be modified in this case: at address 0E07, the data becomes C40B instead of C4FF. This is because the address of the printer routine minus 1 is stored at addresses 24EB and 24EF. With these modifications, the three routines can be entered into the SC/MP and transferred from there to tape. If the printer routine is to be located elsewhere, the modifications must obviously be modified accordingly . . . Admittedly, this suggestion involves a lot of laborious load ing-by -hand; but it saves an EPROM. It is the intention to include these routines on an ESS software record — at some future date. M 3-36 - elektor ■ remote contra Remote control units are becoming an almost standard accessory on colour TV sets. Hifi equipment that can be controlled 'remotely' is perhaps not commonplace - but it is no longer science fiction. Even modern slide projectors are going 'wireless'. Obviously, tripping over wires is to become a thing of the past. Remote control systems - of the type described in this article - will become increasingly popular. elektor march 1980 - 3-37 There may be all kinds of reasons for wanting to control some item of equip- ment from a distance. In domestic surroundings the most important reason, nine times out of ten, is a desire for increased 'ease'. There are also cases where remote control can be quite useful: adjusting the balance control on an audio system, for instance — the optimum setting can only be judged when you're in the listening position. From there, you can rarely reach the amplifier . . . There are even cases where some kind of remote control is essential. Model railway locomotives, for instance, will have to be controlled from a dis- tance until somebody succeeds in manufacturing sufficiently miniaturised engine drivers. Among remote control systems, the 'wireless' variety are the most useful. After all, there's not much fun involved in tripping over cables all the time — particularly when the other end of the cable is connected to some expensive item of equipment. Whatever the reasons may be for want- ing a wireless remote control system, this article gives some suggestions. The circuits are all intended for indoor use: they use an ultrasonic link, so that the range is too limited for model boats and aeroplanes. Remote control of television sets, hifi equipment, doors, lights, slide projectors - that is the kind of appli- cation where these systems can prove useful. A further application is in com- bination with the single-button control unit described in Elektor, June 1979: the Monoselektor. Two systems We will describe two different systems, both using an ultrasonic link. The first system was designed primarily for trans- mitting sixteen independent 'on/off type' commands. These command sig- ^ nals may be used to control all kinds of things: channel selection in a TV set, switching a lamp on or off, operating an electric door-opener, and so on. The sixteen command signals may all be received and decoded by a single re- ceiver, but several receivers may also be ^ used. For instance, it might prove useful to have one receiver for command signals 1 ... 3, another for signal 4, a third receiver for signals 5 and 6, and so on. It is also possible to 'tune' several receivers to the same command signal. In the example given above, a fourth might be added that will respond to commands 1, 4 and 6. It is not a good idea, however, to use more than one transmitter in this system — it would almost certainly cause confusion at the receiver end. The electronics required for this sixteen- channel system is all of the 'available- off-the-shelf' variety: CMOS ICs, 555 Not so for the other system: it uses two special Plessey ICs, one for the trans- mitter and one for the receiver. This simplifies the circuits, quite drastically. The ICs are intended for remote control of colour TV receivers, but they can prove equally useful in other appli- cations. In principle, this system can transmit 32 'on/off' signals; however, some of these may also be combined to 1 The first system First, let's discuss the system that uses standard components. After all, it was designed with the home constructor in mind! Digital signals are easier to transmit reliably. 'Digital' means that they can represent only two conditions: on or off, yes or no, 'nought' or 'one'. These digital commands must be transmitted to the (remote) receiver; as with radio, this is done by modulating a high- frequency carrier signal. Two likely possibilities are illustrated in figure 1 : Phase Shift Keying (PSK) and Frequency Shift Keying (FSK). Both have their Figure 1 . Two possible weys of modulating a digital signal on an ultrasonic carrier, 'e is th< original digital signal; V illustrates the principle o* Phase Shift Keying (PSK); 'c' is an exar o* Frequency Shift Keying (FSK). For PSK, the cerrier frequency is unaltered - but its ph shifted 180 at every zero-crossing in the digitel signal; FSK, on the other hand, changes th carrier frequency. j* j imiu @H Figure 2. Block diegram of the transmitter. transmit 'analogue' control signals. The latter can be useful for volume or balance control, brightness or contrast on a TV set, and so on. Perhaps it should be noted that 'on/off' type con- trol signals can also be used for analogue functions, by converting them — at the receiver end - into 'more/less' type control. Opening or closing curtains, for example: by switching a motor on and off at the correct moments, the curtains can be opened as far as you like. own advantages and disadvantages, but tests have shown that PSK has more disadvantages than FSK. In particular, PSK is more 'vulnerable' to the Doppler effect; an FSK system, on the other hand, can be made virtually immune to this kind of problem. Having chosen FSK, we can proceed to the block diagram of a suitable trans- mitter: see figure 2. This contains two square wave generators, the firet running at a much lower frequency than the second. The frequency of the first squarewave generator depends on which of the sixteen control signals is to be transmitted. This implies that only one command can be given at a time: it would be asking rather a lot for the generator to run at two different fre- quencies simultaneously! The sixteen different command frequencies are in the 6 Hz to 90 Hz range. The second square wave generator is controlled by the first: its output fre- quency is 38.5 kHz when a 'high' volt- age is applied to its input, and 40.9 kHz for a 'low' input. The output from this second generator is transmitted as an ultrasonic wave, by the US transducer. To achieve a reasonable control range, a sufficiently high signal level must be applied to this transducer. This is achieved by amplifying the output from the second squarewave generator, and usina an LC resonant circuit. In this way, voltages of up to 1 50 V can be produced across the transducer, without the need for high supply voltages. The LC resonant circuit has a further advan- tage: it converts the square wave into something that resembles a sinewave — and most US transducers prefer it that In practice The transmitter circuit is given in fig- ure 3. As mentioned earlier, sixteen con- trol inputs are provided. When a control signal is to be transmitted, the corre- sponding control input to the trans- mitter must be connected to supply common — by means of a pushbutton, , say. Only one control input should be selected in this way at any given moment. It may be noted, in passing, that the outputs of the Monoselektor mentioned earlier are also 'active low'. This means that they can be connected direct to the inputs of this transmitter circuit. When one of the control inputs is con- nected to supply common, the corre- sponding transistor (T 1 ... T 16) starts to conduct. One of the sixteen. resistors R17 . . . R32 then goes into action as a frequency-determining element for the first squarewave generator, IC1. This 1C elektor march i - 3-39 starts to produce an output signal with a frequency that is determined by the v selected control input (the squarewave 5 I frequency varies between 1 2 Hz and 180 Hz for the resistor values given in ' the Table). The following flipflop, FF, halves this frequency; of more import- 1 ance is the fact that it produces a nice, ie ' symmetrical squarewave output. This n signal goes to the modulation input of a 3 second 555 (IC2), that produces the )r ' modulated carrier signal (at approxi- mately 40 kHz). A transistor, T19, is used as output amplifier. The various !r inductors are included to boost the out- put signal even further and to clean it i- up — providing a sinewave at some b- 150 V peak-to-peak across the trans- ts ducer. rs The three ICs and the output stage are a not connected directly to the positive ie supply rail; an electronic switch, con- C sisting of T17 and T18. is used. Sixteen diodes (D1 . . . D16) are used in an OR gate configuration, switching on the electronic switch as soon as one of the control inputs is activated. When no control signal is to be transmitted, the electronic switch opens; the circuit then draws virtually no current. A useful feature for a circuit that will almost certainly be battery-powered! The receiver The transmitter circuit described above is built into the remote control unit. It transmits one of sixteen commands as a modulated ultrasonic signal. This signal must be received and 'decoded' at the other end, to control the equipment as required. The block diagram of the receiver is given in figure 4. The first sections - trigger, monoflop, low-pass filter and another trigger - amplify the signal pciked up by the ultrasonic transducer (US) and recover the low-frequency squarewave from it (the 6 Hz ... 90 Hz control signal). This signal is then applied to one or more (up to sixteen) digital band-pass filters that serve to distinguish between the sixteen chan- nels. When a command is transmitted, only the digital filter that is 'tuned' to the corresponding low-frequency square- wave will produce an output. This signal toggles a flip-flop, FF. Giving a com- mand therefore results in this flip-flop changing state; if it, in turn, is used to control a lamp, the lamp can be switched on and off by means of the remote control unit. The whole object of the exercise! The circuit of the receiver is divided into two sections. The first part (fig- ure 5) receives the ultrasonic signal and retrieves the low-frequency squarewave. This signal is then passed to one or more digital filters; the circuit of one of these Table 2. filters is given in figure 6. Depending on the type of transducer used, either of two possible input cir- cuits may be required. The input stage shown at the upper left in figure 5, using FET T1, is intended for use with high-impedance transducers. Low- impedance transducers, on the other hand, can be connected direct to C2. The ultrasonic signal is amplified by T2. The resonant circuit (L1/C3) is tuned to 40 kHz. The signal is then 'squared up', by A1 and A2, producing a squarewave that switches between supply common and the full supply voltage. This signal goes to a complicated network around A3. In brief, R12-C7-R14-D1 and R16- C8-R15-D2 each operate as simple differentiating networks; they each provide constant-width output pulses at the zero-crossings of the input signal. These two networks are followed by simple RC low-pass filters (R 13/CIO and R 15/Cl 1) that serve to retrieve the original low-frequency component from the ultrasonic signal. A3 and A4 amplify this low-frequency signal, producing a square-wave that swings between 0 V and full positive supply. This signal is ideally suited for further processing in the digital filters. Digital filter A digital filter circuit is given in figure 6. The values for C2 and C3 depend on the control signal that is to be detected by the filter; see Table 2. Cl and R1 are another differentiating network; together with N1, they produce pulses with constant width. ICIa and ICIb are monostable multi- vibrators. To understand the circuit, it is Values for C2 and C3 in figure 6. control C2 C3 signal 1 10 n 470 p 2 15 n 470 p 3 15 n 820 p 4 18 n 820 p 5 22 n 1 n 6 33 n 1 n 7 39 n 1n5 8 47 n 1n5 9 56 n 2n2 10 68 n 3n3 11 82 n 3n3 12 100 n 4n7 13 120 n 4n7 14 150 n 6n8 15 180 n 8n2 16 220 n 10 n easiest to refer to figure 7: this shows the various signals that are present at the indicated points in figure 6, when a signal is being received at the 'resonant frequency' of this filter. Each negative-going edge in the input signal. A, produces a brief pulse at B. The negative edge of this signal triggers ICIa, so that its Q output goes high (D); the negative-going edge of this latter signal triggers ICIb, producing signal E. NAND gate N2 now combines signals B, C and E; if all three signals are 'high' at the same time, a short output pulse is obtained at F. Since the three signals B, C and E are derived from three consecu- tive input pulses, with delays deter- mined by the monostable time constants, an output signal at F can only be produced if the frequency of the input signal is almost exactly right. ci The brief negative output pulses from t( N2 are used to clock flip-flop FF1 . This u flip-flop is actually used as a monostable a: multivibrator, with a period time that is Cl longer than the delay between consecu- r < tive pulses. The result is that the output of this flip-flop remains 'low' as 31 long as N2 is passing pulses. This signal ai is used to clock the second flip-flop, h FF2 - the one shown as 'FF' in the ° block diagram given in figure 4. The ri complete circuit therefore works as a c kind of 'selective flip-flop': it is not T toggled by a single pulse; instead, it ti responds to a square-wave input at n exactly the correct frequency. Preset PI is used for setting the 'resonant " frequency' of the digital filter, as will be fi explained later. * Complete system Constructing the remote control system should not present any real difficulties. • As explained, the transmitter (figure 3) v\ has sixteen control inputs. To give a c< control signal, the corresponding input n must be connected to supply common o — using a pushbutton, for instance. No r< power on/off switch is required, since s' this function is performed by the elec- q tronic switch T 1 7/T 1 8. Each receiver consists of one circuit as n shown in figure 5 and one or more of tl the circuits given in figure 6. If a high- C impedance transducer is used, the input o wiring around FET Tl (figure 5) should be kept as short as possible. When setting up the transmitter circuit, i u the signal at the output of A2 in the receiver ('A' in figure 5) must be moni- e tored. This signal can be measured, of c course, but it is just as easy to 'listen' i to it. A high-impedance headphone is ; used, with a series resistor and capacitor, . as shown in figure 8. This little circuit is ; connected between point A in the receiver and supply common. One of . the control inputs to the transmitter is s activated, and PI in the transmitter is | adjusted until a tone is heard in the , headphone. This tone should be present > over a small part of the adjustment 3 range of PI ; the preset is now set to the 3 centre of this range, t The same headphone circuit can be used t to adjust the digital filters. It is con- t nected to the output of N2 I'F') in figure 6. The control input to the trans- t mitter that is to correspond to this 3 filter is activated, and PI in the filter is adjusted so that pulses are clearly audible — corresponding to the low- frequency squarewave. The easy way out: two ICs ) With all its advantages, the remote a control system described above would t never win an award for low component i count. Obviously, manufacturers of TV o receivers would prefer a more compact e system, and 1C manufacturers have been quick to meet the demand. One special 1C in the transmitter and one in the s receiver takes a lot of hard work out of f the manufacturing process, i- One manufacturer who supplies a pair t of ICs for this job is Plessey. The SL490 d (transmitter) and ML920 (receiver) form the main components in the :, second remote control system that we e will describe. These ICs can be used in i- either infrared or ultrasonic remote if control systems. For several reasons, an ultrasonic system is preferable - and so that is what we will use. There is little point in going to such extensive detail on the operation of this twin-IC system. Discussing the 'innards' of the Plessey ICs would be of little practical use - there's no way to modify them. Instead, we will restrict ourselves to giving suitable circuits. As we shall see, one of the advantages of these ICs is that they can be used for transmitting 'analogue' signals as well as the digital kind. A transmitter circuit using the SL490 is given in figure 9. As in the previous system, the control signals can be given by means of pushbuttons. However, in this case they are not connected between a control input and supply common; instead, they are connected in a 'matrix' - like in pocket calculators. Since a 4 x 8 matrix is used, up to 32 pushbuttons can be used. Of the 32 pushbuttons (assuming that all positions are used . . .) only one should be operated at a time. The position of this button is converted into a five-bit binary code, in the 1C. The code numbers run from 00000 (upper left) to 11111 (lower right); they increase progressively from left to right and then down to the next row - like reading lines on a page. In effect, this means that the two right-hand bits in the code are determined by the position in the row (horizontally), whereas the other three bits indicate which row is This five-bit code is transmitted, using a special type of modulation: pulse position modulation, or PPM. A series of six pulses of equal length are tran- mitted; the five periods pulses can be either long or short, depending on the five-bit code. A long 'pause' corresponds to a logic 0, and a short interval is for a logic 1 . This is illustrated in figure 10. Preset PI is used to adjust the correct pulse/pause lengths. The interval between pulses should be approximately 20 ms for a logic 1 and 30 ms for a logic 0; the pulse length is approximately 10 ms. The ultrasonic carrier is transmitted during the pulse. The carrier frequency is set by P2; a good choice is 40 kHz. A few transistors are added to boost the current through the transducer - the 1C itself can supply only 5 mA. The maximum range of the system is increased in this way. As in the system described earlier, this one also contains an electronic supply switch - included in the 1C — so that the current con- sumption from the 9 V battery is only 6 *iA if no command is being trans- mitted. The receiver The ultrasonic commands given by the SL 490 transmitter can be decoded by a receiver using the ML 920. This 1C is intended for use in colour TV receivers, but there is nothing against using it for other applications. The 32 com- mands given by the SL 490 are not all decoded as such; instead, there are three analogue outputs as well as several digital ones. Before taking a closer look at what the ML 920 can do — in conjunction with the SL490 — we should first point out what is cannot do: amplify and de- Table 3. modulate the ultrasonic signal. This 1C expects to receive a clean series of pulses, like those shown in figure 10, without any ultrasonic components. A separate preamplifier and demodulator must therefore be included between the transducer and the 1C. No problem, as we will see. The circuit that distills the commands from the 'clean' pulse signal is given in figure 11. Not counting a 'monitor' output for adjustment purposes, there are thirteen 'true' outputs. These are divided into three groups: three analogue outputs < A 1 . . . A3), five digital out- puts (D1...D5) and five 'channel' outputs (Cl . . . C5). The 'channel' outputs are intended for switching channels on the TV- receiver. Up to twenty channels can be selected by these five outputs: the desired channel number (0 . . . 19) is available as a binary five-bit code (00000 ... 10011) at outputs Cl . . .C5. When one of the commands 00000 ...10011 is given from the control unit, the binary output at the channel outputs assumes the same value. When- ever the value at the C outputs changes (when a channel change is required) a short pulse also appears at digital output D4; this can be used for various appli- cations. If a command with a higher number than 10011 is given by the control unit, the channel outputs remain unchanged and no pulse appears at the D4 output. | It is also possible to step through the 10 juinuu luuuuui Figure 10. The 1C transmits the five-bit code in a chain of six pulses (two of the pulse tained in the interval between pulses: a logic 1 gives a short pulse, logic 0 is coded as a longer same code: 10109. channels automatically. Control signal 10101 causes the receiver to step through the channels in ascending order; code 11101 makes it step through the channels in the opposite direction. If, in some application, the twenty channels are required individually — instead of as a five-bit code — they can be 'de- multiplexed' by means of a suitable 1C (the CMOS type 4514, for instance). The only point to note, in that case, is that the ML 920 uses 'negative logic': logic 0 is positive supply voltage, logic 1 is equivalent to 0 V. The analogue outputs of the ML 920 are intended for controlling volume, brightness and colour saturation. The voltages at these outputs vary in sixteen steps. Their functions, and the corre- Functions and control signals for the analogue outputs in figure 11. output A2 A3 11100 colour saturation 11110 volume 11111 brightness sponding control signals, are listed in Table 3. The digital output D2 is intended for controlling the 'colour killer': it pro- vides a logic 0 (almost positive supply level) when the analogue colour output f A1 is at zero level — this corresponds to 'no colour'. A 'mute' command is also provided, for temporarily switching off F the sound: the control signal 11001 switches output D1 alternatively low c and high. Output D3 provides the i 'on/off' signal for the TV receiver; the r corresponding control signal is 11000. More accurately, this should be referred i to as a 'stand-by' switch — obviously, the ; TV receiver cannot be switched off ; altogether: at the very least, the ultra- ; sonic receiver must be left on. ' ff Finally, a ‘basic setting' command PPM signal. of the TV line frequency (31.3 kHz 91 (11011) causes all three analogue As stated earlier, the transducer cannot and 46.9 kHz). outputs to assume an intermediate be connected direct to the 1C. A pre- Demodulating the ultrasonic signal is no he level — approximately one-third of their amplifier is required, that also removes problem — it calls for nothing more he range. the 40 kHz components from the signal, than filtering out the 40 kHz com- ! 0- There is only one preset adjustment A suitable circuit is given in figure 12. ponent from the signal. This is done by ed in the ML 920 circuit: PI . This must be The ultrasonic signal is amplified by T1. means of a low-pass filter (IC2). he adjusted so that a squarewave appears IC1, with the associated components. The output of the circuit given in figure >ff at the monitor output (pin 9) with a is used as a 40 kHz band-pass filter. The 12 can be connected direct to the input a " period time that is one-twentieth of main reason for including this is to of that in figure 1 1. the interval time for a logic 0 in the reject the second and third harmonics 3-44 - eloktor Wireless: three varieties For 'wireless' transmission of control signals or other data, a few different options are available. The most common system is radio — in fact, 'wireless' has become almost synonymous with this. The control unit contains all controls, a (miniature) radio transmitter, and a circuit that codes the various control signals for transmission. The equipment that is to be controlled contains a receiver and a decoding circuit that retrieves the original control signals. A radio link of this kind has several advantages - considerable range for low power, for instance — but it also has its disadvantages. The most import- ant 'disadvantage' is that the Post Office authorities take a very dim view of people operating this kind of link without a licence. This limits its uses to exactly those fields were it is virtually the only possibility - controlling model aeroplanes, for instance. For use indoors, remote control by radio is 'not on'. As an alternative, we could consider using light. A light source in the control unit, a light detector in the receiver, and suitable coding and decoding circuits are again required. To avoid undesirable 'disco lights' effects, it is now common prac- tice to use light that is invisible to the human eye: 'redder than red'- infrared, in other words. This has a further advantage in that it penetrates smoke and dust haze better than visible light. However, an infrared remote control system is not an ideal solution. It is no easy matter to make the detector in the receiver sufficiently sensitive. Nor can the infrared light source in the trans- mitter be particularly powerful — not, that is, unless you don't mind changing the batteries every time you give a new control signal. Furthermore, infrared is light; and like any other kind of light it tends to travel in very straight lines. Admittedly, it is reflected off all kinds of objects so that it usually ends up at the receiver some time - even if the transmitter isn't aimed like a search- light -but a lot of its power is absorbed by all that bouncing around. There are also a large number of 'spurious infrared transmitters' in any living room. Heat is also infrared, and incandescent lamps emit quite a lot of energy in the infrared region that we are interested in. What all this means is that only a little of the desired infrared signal will reach the receiver, and that there is a lot of interference. For this reason, both the transmitter and the receiver circuits must incorporate all kinds of sophisticated tricks, if the receiver is to be able to distinguish the control signals from the 'noise'. A sound system We have seen that neither radio nor infrared links are ideal for domestic use. The former is forbidden, and the latter doesn't work very well — at least, it takes some doing to make an infrared system work reliably. Fortunately, a third option is available: sound waves. For use indoors, these are much more suitable. In particular, it is much easier to fill' a room with sound: the waves bounce and bend all over the place. This is still true at the relatively high frequencies that are of interest for remote control systems. When discussing light as a transmission medium, it was pointed out that 'invisible' light is preferable to the visible variety, to avoid being dazzled by the light show put out by the control unit. For the same reason, ’inaudible' sound is preferable to the normal variety in this application. By inaudible, we mean above the range of human hearing (maybe a few dogs or bats may hear these control signals): 'ultrasonic', as it is called. Using high frequency sound has a further advantage: the 'loudspeakers' and ‘microphones' (both are usually referred to as 'transducers', actually) are both small and cheap. They are also surprisingly efficient- putting out quite a lot of 'sound' for a fairly modest electrical power consumption. So why doesn't everybody use ultra- sonic transducers for remote control systems? They must have some dis- advantages? Rest assured, they have. They are more bulky than infrared LEDs; they are more 'breakable'; and 'spurious ultrasonic transmitters' also exist. Rattling keys, for instance. For this reason, a sufficiently 'interference- proof' coding and decoding system is still required. There is one further problem: The Doppler effect One of the major problems associated with ultrasonic systems is the Doppler effect. As most people will know, if an object or person that is transmitting a sound wave, for instance, is moving towards the receiver, the latter will 'hear' a sound wave at a higher fre- quency than that transmitted. Similarly, if transmitter and receiver are moving away from each other the apparent frequency will be lower. A well-known example is the sound of a passing express train: at the moment that it passes us, the sound seems to suddenly drop to a much lower frequency. Obviously, the train doesn't really ’change its tune’ when it sees us. The frequency that we are hearing is not the same as that which the train is 'trans- mitting'. Indoors, it is unlikely that we will travel at the speed of an express train. Even so, the Doppler effect can be quite a nuisance when using an ultra- sonic remote control link. (The same applies to infrared links, by the way, but to a lesser extent.) When designing a system, all due care must be taken to ensure that it is relatively insensitive to the kind of fre- quency shifts that can be caused by this effect. Fortunately, this is not too difficult. The two designs given in this article are 'Doppler-proofed'. The Monoselektor goes remote The Monoselektor described in Elektor, June 1979, can be used to control a large number of different things at the touch of a single button: radio and/or television set, lights, doors, curtains, and so on. There is no problem in constructing the unit, as experience has shown, but when it comes to putting it into operation ' things are apt to get 'ropey'. Or 'wirey', rather. The curtains and door may be operated by motors, the radio and television set may be designed for remote control; we have already published designs fora 'solid state relay' that will switch this type of equipment. But one problem remains: connecting the Monoselektor to all these items, distributed all over the room. This normally involves yards and yards of cable. Not very neat, we must admit. There is a lot to be said for using a remote control link. For this application, the first of the two systems described in this article is ideally suited. All wiring from the Monoselektor to the other equipment can be replaced by a 'wireless' link. The ultrasonic transmitter (figure 3) is built into the Monoselektor case; the control inputs can be connected direct to the Monoselektor outputs. Receivers (figures 5 and 6) can be mounted wherever required in the room, to control the motors, relays or whatever. The fact that several receivers can be used in the same system is an advantage. In fact, if cost is no problem, sixteen receivers can be built, each tuned to its own channel. In practice, of course, it will normally be more econ- omical to use one receiver for several items of equipment that are close to each other in the room. H .... gjraaa sH; ol".*!' O . ft =,*» fSMpum ELECTRONIC SUPPLIES LTD All mail to:- RO. Box 3, Rayleigh, Essex SS6 8LR. Telephone: Southend (0702) 554155. Shop: 284 London Road, Westdiff-on-Sea, Essex (Closed on Monday). Telephone: Southend (0702) 554000.