Vous êtes sur la page 1sur 92
ELEKTOR CONTENTS July/August 1991 Volume 17 Number 191 tind 11 Telecommunications and the world weather watch ere 56 Automatic power off for audio equipment Sia MICROPROCESSORS 23° Multi-function 1/0 for PCs 401 Mbit adapter for EPROM programmer 43° Video enhancement for Acorn Archimedes 46 Angled bus extension card for PCs 30 Change-over switch for C64 control port 52 Keyboard change-over switch $3 Communication buses 64 Microprocessor supply regulator 72 PC interrupt handler 7 8088 single-board computer Unt 8 14 Time-code imerface for slide controller 36 Would you be an inventor? 38 Long-period mains timer 4 Solid-state light-sensitive switch 42 Pulse generator with one 4066 44 Voltage-controtled current source 44 Electronic reversing circuit for model trains 47 Fault signaling eireuit 49 Automatic eyele lights 49 Bounce-free switch SI Time delay with one 555 52. Switch for central-heating pump 54 House telephone $5 _Darkness-sensitive switch $5 Switch-off delay for battery supply 87 Windscreen wash/wipe circuit 58 Telephone extension 39 Temperature-compensated current source 61 Sequential control ‘Copyright ©1991 Elektuur BY DO NOT MISS THE SPECTACULAR DEALS IN GREENWELD'S SUPER SUMMER SALE SEE 16-PAGE SALE LIST AT CENTRE FOLD 62 Carbattery monitor 63 Variegated LED 65 Programmable LED indicator 67 Universal test probe 67 Slave flash trigger 68 Universal timer 70 50 Hz band-stop filter 74 Momentary action push button 75 Teeth-cleaning timer 76 — One-shot solid-state relay timer 82 Laser- Part3 87 Stepper motor board - Part 2 96 Review of BoardMaker PN EO Oe 20 Modern LED clock Pee eet emenes 41 Battery charger $3. Presettable shunt regulator 56 Automatic battery charger | 74 Super voltage regulator 75 Automatic battery charger Il Cero ero 29 Video digitizer 59 S-meter for short-wave receivers 69 Synchronization separator 70 Field strength meter 99 Radio data systems Peo eas ey erature module for digital multimeters 2 43 Semiconductor tester 47 Digital LED voltmeter 30 Wien bridge with asymmetrical supply 54 Measuring electrolytic capacitors, 6 © LED VU meter 66 Triggered sawtooth generator 68 Binary logarithmic ladder network 94 Measurement techniques - Part 6 98 Logic analyser - Part 5 RIS AM ees Ne ett Events 13; Readers services 101; Switchboard 102; ‘Terms of business 102; Index of advertisers 114 ELEKTOR ELECTRONICS JULY/AUGUST 1991 TELECOMMUNICATIONS AND THE WORLD WEATHER WATCH Tie eater has profomdinaenon ‘man and affects many of his activities, his safety and, often, his survival. Bach na- tion of the world, therefore, shares a com ‘mon interest ir monitoring weather phenom ena and, moreover. in forecasting weather conditions. The state of the entire aimo- sphere and its evolution determine weather conditions in any one country. and, asacon- Sequence. meteorological activities rely uponan efficient and timely exchange of me- teorological data collected at many observa- tion points throughout the world. its, there- foe, not surprising that the development of operational meteorology has gone hand in hand with the dramatic advances that have taken place in telecommunications over the ‘years, The most significant milestone in its evelopment was the establishment of the ‘World Weather Watch programme.adsopted by the Fourth Congress of the World Mete- ‘orological Organization (WMO) in 1963. ‘The World Weather Watch ‘The World Weather Watch (WWW) is a global system forthe collection, analysis and, distribution of weather and other environ- ‘mental information. Itis an integrated sys- tem composed of national facilities and ser= vices owned and operated by individual ‘countries which are members of WMO. The Cperation of the WWW is based on the fundamental concept thst each of the 160 ‘member countries undertakes, according to its means, to meet certain responsibilities in the agreed global scheme so that all coun- ties may benefit from the consoloidated ef- forts. It isa unique achievement in international co-operation: in few other fields of human endeavour, and particularly in science and technology, is there ~ or has there ever been ~ such a truly world-wide ‘operational system to which virtually every country in the world contributes, every day ‘of every year, for the common good. ELEKTOR ELECTRONICS JULY/AUGUST 1991 ‘The WWW has three hasic components: + the Global Observing System, compris- ing facilities on land at sea, in the air and in outer space, for the observation and measurement “of meteorological ele- ‘ments; + the Global Telecommunication Systema world-wide telecommunications system for the rapid exchange of the observa- tional information as well as of analysed and processed information, including forecasts, which are produced by the third ‘main component + the Global Data-processing System, a network of world and regional comput- rized data-processing centres. ‘The Global Telecommunication System ‘The Global Telecommunication System (GTS) comprises the arteries. heart and ‘veins of the WWW. The life blood of the me- {corological observations and processed in- formation has tobe collected, processed and disseminated tonational meteorological ser- ‘vices. and the operation of the WWW system relies entirely on efficient and reliable {elecommunications. At present, the GTS conveys several tens of millions of octets of alphanumeric and binary data and thousands ‘of weather charts daily, and is operating with degree of speed, automationandefficiency not thought possible inthe early 1960s, Structure of the GTS ‘The GTS isan integrated system of point- {o-point eieuits, meteorological communi- cation centres, radio broadcast and satelite- based communication systems, onzanized in tree levels: + the Main Telecommunication Network linking the World Meteorological Cen- ares (WMCs) and. certsin Regional Telecommunication Hubs (RTH), re- sponsible for selecting and relaying slobal traffic: + the Regional Meteorological Telecom- munication Networks linking Regional ‘Telecommunication Hubs and National Meteorological Centres (NMCs) that carry observational data and processed information in order tomeet WMO mem- bers’ needs tothe degree possible; + the National Meteorological Telecom- munication Networks implemented in each country for the collection of obser- ‘ational data and distribution of meteo- rological information to meet national re- {quirements Plans for the point-to-point network of the GTS provide for 281 circuits that should link three WEMCS, 30. RTHs and. 150 NMC; 244 of these circuits have been im= plemented and an increasing number of ci- cuits are operating at medium/igh speed using advanced communication techniques, ‘The GTS also includes radio teleprinter and facsimile broadcasts to disseminate meteo- rological information. ‘Satellite-based communication systems are also increasingly being used within the GTS, in panicular for data collection and distribution functions atthe global, segiona ‘and national levels. The fundamental mis- sion of polar-orbting and geostationary me- {corological satellites isto measure observs- ‘ional data in the atmosphere and at sea and Jand surface, and to provide forthe distibu- tion of these digital and pictorial data tome teorological user stations through appropri- ate telecommunication means Furthermore, meteorological satellites have the capability of collecting messages from data collection platforms (DCPs), ‘which may be installed on ships. buoys, t= cra, balloons as well as on land in remote locations. Some meteorological satellites also include a service for distribution of me- teorological data to overcome the existing deficiencies as regards the availability of ‘meteorological data and products in some areas of the world, Satellite-based commu- nication services, provided through the spe- cialized telecommunication satellites, arealso contributing extensively to the GTS opera- tion and will play an increasing role in its implementation. In particular, INMARSAT. services, by providing a full coverage of ‘oceans for collecting weather reports from voluntary observing ships to meteorologi- cal services, and for the distribution of fore ccasts and warnings to ships, are an essential clement for the provision of maritime mete ‘orological services. The surge of new telecommunication and processing techniques now makes it possi bie to use internationally standardized pro- ‘cedures and standardized (and thus less ex: pensiveyhardwareand software. These meth ‘ods and techniques used on the GTS and WWW will make it possible to handle an increased volume and diversity of observa- tional data and products. whilst guarantee- ing members access to information aceord- ig to their needs and possibilities. ‘The WWW programme is the basic pro- gramme of WMO and through its real-time provision of data and produets to WMO. ‘members where telecommunications play a vital role, provides an essential support 10 ‘other WMO and international programmes, Security and safety of life ‘The most important requirement of the WWW, and the one from which the greatest bene fits are obtained, is contribution to securit and safety of life. Such benefits derive particular from severe-weather warnings is sued for the general public and from spe- cialized meteorological services to aviation, ‘marine activities and transport on land and inland waters based on meteorological data and products distributed over the GTS, Probably the most significant impact on safety of life is in the area of tropical cy- clone waming. In an average year, about 80 ‘wopical cyclones form over the warm ocean water in certain parts of the tropics, affect- ing some 50 countries. About 20,000 peo- ple lose their lives each year and the dam- ‘age caused may reach £4,000 million ($7,000 million). A significant amount of this dam- age and loss of life is avoidable, given ade- ‘quate forewarning of the characteristics and path of each cyclone. The national meteora- logical services in all cyclone-prone areas ff the world provide such warning services fortheirrespective areas of responsibility.co- ondinated under the WMO Tropical Cyclone Programme and relying upon efficient and teleiable telecommunication services pro- vided by the GTS. (915059) World Weather Watch components NHANCED 8032 TRAINING SYSTEM FROM FLIGHT 1LIGHt Electronics has introduced an en- hanced version of its Flight-32 micro- mntroller training system. The price of the new system is exactly the same as that of the original model. ‘The enhanced version, supplied as stan- dard with the 8032 chip running at 1! MH?, ‘can accommodate the 8031, 8051 and 8052 cchipsas well asthe 8052 BASIC version, This ELECTRONICS SCENE additional facility gives the system extra op- erational and teaching flexibilit For further information, contact Suzanne Kittow, Flight Electronics Lid, Flight House, AscupartSt Southampton SOL iLU: Telephone (0703) 227721; Fax (0703) 330039, SPEEDMASTER 1000 CE Technology's Speedmaster 1000 pro grammer, launched earlier this year, is aimed primarily at the development engi- neer and the amateur designer. Connected straight 10 the parallel port with no internal card needed, and program- ming devicesinsecordtime,the Speedmaster 1000 is one of the most usefool tools around. ‘Thedevice ist included EPROMs, EEPROM, Flash EPROMs, Microcontrollers including ELEKTOR ELECTRONICS JULY/AUGUST 1991 87C751, 77C82, 68HC11D3), CMOS PALS and GALs TTL PALs, EPLDs and PEEL The programmer, including free devei- ‘opment software, is priced at £395 plus VAT. Further information from Sheila Boakes, ICE Technology Lid, Unit 4, Penistone Cour, Station Buildings, Penistone, South Yorks $30 6HG: Telephone (0226) 767404. SURVEY REVEALS INCREASING PROSPERITY AMONG IERIE MEMBERS ESULTsofthe survey conductedin January this year on behalf of the IEETE have recently become available. It is@ unique and valuable guide to salaries, benefits, aca ~s Fit ingthe computer calculate times in between retorded time codes. Note, however, that thisimplies that the computer clock must be ‘amable of working on its own, without co- ying any incorrectly decoded time informa- tion. When the timer is used in manual mode, the higher resolution intervals are not applicable, since we have enough trouble as. 18's detecting codes in 0.1-s steps and re sponding to them with the appropriate ac tion For manual use, the timecode interface ‘an be equipped with a LED read-out that shows the current time. This read-out is rodularand based on LED units used in the Blekior Electronics Digital Train System IEDTS, see Ref. 2), When the tape is played buck the interface can be disconnected from, the computer and used as a digital tape counter The timecode interface is perfect for use with the projector control system described InRef.1. We have no reservations about call- Ing the resulting slide presentations profes- sional and timed! to perfection, ‘Those of you who have already looked at the photograph of the prototype may won- decwhy ithas fourline signal sockets, where only two are expected for a two-way re- ‘corder connection (one input and one out- pat)-Thetwo extra sockets allow a new data ormat to be generated that contains all the ELEKTOR ELECTRONICS JULY/AUGUST 1991 Block diagram of the timecode Interface. information about a certain slide presenta- tion, This enables a presentation with a sound programme to be started at any point in the slide sequence, More importantly, however, the extra format makes the use of floppy discs optional while still ensuring that the information about the sequence re- mains coupled to the sound programme. During the development of the slide prescn- tation, time codes are generated ona PC and sent to a stand-alone controller. Next, the new data format is recorded on another tape track. By virtue of the information on this track, theactual presentation can then be run withouta PC. A look at the hardware ‘The hardware for the timecode interface is designed to allow a minimum amount of sofiware to control both the timecode system and the (optional) read-out. In principle, itis possible to record and retrievethe serial code irect to and from the magnetic medium, This is usually done with the aid of a serial- to-parallel converter. Such a system, how fer, requires continuous read and write ‘operations on the tape, which can be proble- matic if a reliable RS232 connection is not available on the computer. Here, the hardware is capable of gather- ing all bytes that form a code, and storing them until the next code is available. If necessary, the computer can call upa certain code, Note, however, that the code can be read out only once to prevent the system reading incorrect codes. The data can be read by the computer at high speed in parallel form. Likewise, the writing of data to the ti- ‘mecode interface, and from there to the tape, isa simple process that requires little time. ‘The block diagram in Fig. 1 illustrates the operation of the system. The most important part is the bidirectional serial-to-parallel converter. Data is recorded on the tape and played back as a serial signal. Inthe circuit, however all information is processed as par- allel data, The format converter is capable of trans mitting and receiving independently. The clock oscillator determines the speed of the serial signal, which, incidentally, may be set differently for transmission and reception Transmit operation The parallel data appliod to the unit by the computer is converted into a serial data stream that consists of logic ones and zeroes. Next, these digital levels are converted into tone bursts of 2,500 Hz (logic 0) and 5,000 Hz (logic 1). The clock frequencies used for this conversion are derived from the converter GENERAL INTEREST clock. Before the bursts are sent to the tape recorder, their level is adapted, and the bandwidth is limited, Receive operation Thedata retrieved from the tape is amplified and subsequently digitized by a Schmitt- trigger. A frequency detector recognizes the two burst frequencies, and converts them into logic 1s and 0s which are applied to the serial-o-parallel converter. When the data is, valid, the ‘data available” (DAV) signal is ac tuated, and the data appears on the parallel ‘outputs of the converter. Data processing A time code consists of three bytes which are hold together as a unit by a byte shifter and a code detector. When the converter detects, the start of a new dataword, the previously loacied word is shifted one location in the byte shifter. In this way, the system can hold up to four bytesata time. The ‘oldest’ byte is lost when the next word appears. Toenable the system to recognize a com: plete code in the datastream, the codes are separated by short pauses. This resultsin the DAV signal being active longer during a pause than in between bytes that form a code. This is detected by the ‘code detect” block, which also serves to feed the received code to the display. When the codes are not used, thedisplay will simply show themone by one as they are retrieved from the tape. Computeraction ‘The synchronization function of the circuit requires that the time information can be read, recognized and processed. This is achieved via an interface that allows the computer to detect the presence of a tix mecode. The code detector output is latched in the computer interface with the aid of the Uk (clock) line. A butter, which also serves toread other signals, allows the computerto test for the presence of a code. To prevent new databytes being loaded, the shift input is also switched to the computer interface when a code is present. Thecomputer interfaceallows the codeto be read and processed on a byte-by-byte basis. When the read operation is finished the latch requires a reset signal before it can accept the next code, Timing of the datastream Iwill beclearthat the bytes that makeup the time code must be sent in quick succession to tenable the system to detect them as a coher ent block. We must take into account how- ever the code detection time as well as the time required to convert a byte to serial for mat and record it on the tape. Since the par allel-to-serial converter cannot handle further data just after receiving a byte, and has only room for two bytes, there is a re- quirement for the system to signal that the next databyte can be offered. This is achieved by using the THAT (Transmitter Butfer eMpTy) signal supplied by the con- verter. A new databyte can be applied as long as TMT is active, indicating that the (Gh ers ers 5 # ' , PEPE 27 Fig. 2 ‘Circuit diagram of the timecode interface, FLEKTOR El {CTRONICS JULY/AUGUST 1991 ‘TIMECODE INTERFACE FOR SLIDE CONTROL - transmit buffer is empty after sencling a byte to the internal shift register. ‘The write speed of the system is ensured by sending the bytes that form a.code at the time the buffer is empty. Due care should be taken, however, to leave sufficient time be- tween codes to enable them to be detected as coherent blocks during reception. The above system works on the assump- tion that the TAMT output of the converter is continuously monitored. Another possibility 4s to send the nevt byte just before the end of the previous one, under interrupt control ‘This allows the system to handle other tasks in the mean time, without being fully ‘ticd up’ with the interface. The interface is based on two possible speeds, 10 ms/byte and 5 ms/byte. These speeds allow interrupt cycles to be used of 20 ms and 10 ms respectively (Iwo bytes can bbe sent during an interrup)), To make sure that the code can also be read back under in- terrupt control, a minimum pause of one in terrupt period is required Computer interface ‘The interface between the timecode control- ler and the computer is relatively simple, and consists of a few ICs only. The PC and the timecode interface communicate via the universal 1/0 interface for IBM PCs (Ref. 3) As already mentioned, we have in the pi peline a stand-alone 280-based control card designed to assume the function of the PC. This card also has an interface for the slide controller, and offers PC control and manual ‘control as options. Circuit description ‘The practical realization of the above func- tions is shown in the circuit diagram i Fig. 2. The heart of the circuit is formed by the parallel-to-series format converter, a UART (universal asynchronous re ceiver/transmitter) Type AY3-1015D, ICs This IC is capable of converting data from serial to parallel and parallel to serial. These operations are independent and may run at different speeds. First, the parallel-to-series conversion is described, ie., the writing of data to tape “The timing diagrams in Fig. 3 through 6 il lustrate how the conversion works. The numbers that identify the signals inthe tim- ing diagrams correspond to those found at various points in the circuit diagram, Parallel-to-series conversion Figure 3 illustrates how a parallel code is converted intoa serial signal that is recorded ‘on to tape. The signal direction is basically via [Cn and a pulse at the DS (data strobe) input of ICi (signal 1), The tape signal is shown as signal 6. First, the code is con- verted from parallel into serial format, The serial output signal, 4, available at the SO (erial output) pin of ICs, is fed to ICi2 A clock oscillator based on a 4060, ICs, determines the bit rate of the serial signal. The electronic switches in 1C22 select be- tween two clock speeds, which may be set in- = £20. -CTRONICS JULYIAUGUST 1991 Oe coo'e aime mo ofl ofets|ete!—|_» ole eLetalet ou A = oa a n ows 7 ou Le n @ on ir ur ow == sf eof om ® ae. gi ® ae aS << eit Fo I oe i os ELEKTOR ELECTRONICS JULY/AUGUST 1991 dependently for transmission and reception. ‘The clock oscillator also determines whicl frequencies are fed to gates ICixs and ICi2 ICi2formsa frequency selector controlled by the level of the so output of ICs. IC2 divides the output signal of Ci2sby eight. Assuming, that the lower bit rate is used, this results in four periods fora logic I, and two periods for a logic 0, corresponding to frequencies of about 5 kHand 25 kHz respectively. At the higher bit rate, the number of periods is Ihalved (but the frequencies remain the same) ‘You may wonder why we have gone to allthis trouble when the outputs of the 4060 already supply the required burst frequen- cies. The reason is that the signals at the divider outputs are not synchronous with the UART output signal (remember, the UART derives the timing of 50 from its lock ‘gnal) Ifthe bursts are not generated syn- chroously with the 50. signal, frequeney changes could occur in one period, resulting, insignal peaks, tapesaturation and other un Wanted effects that cause trouble when the data is read back from the tape. In the pres- fent circuit, the synchronism is actually Achieved by Crand Ris, which reset IC2 (si nal 5) on every logic 0 (which occurs at the start of a serial word). This ensures that every dataword starts with a well-cefined ‘Tow’ period. ‘Components Ris, Risand C# forma level conversion circuitas well asa low-pass filter. ‘The output signal is limited to about 1 Vp. Electronic switches [Cam and ICats determt- neo to which output the recording signal is fed. Serial-to-parallel conversion ‘At the tape input of the interface, switches ICadand ICavedotermine which signalis fed toamplifier IC). The gain of IC1 is made ad- justable with preset Pi to allow the sensitiv= ity of the circuit to be matched to the playback level ofthe tape recorder used. IC is set to amplify the sinusoidal input signals with respect to halfthe supply voltage. Next, the signal isconverted intoa pulse train from, which the logic 1s and 0s can be extracted. This isachieved ina reliable manner by mak- ing use of aspecific characteristic of HCMOS ‘integrated circuits, in which the digital level (or 1)is related to half the supply voltage. ‘This means that a gate in the 74HC132 pack- age forms an ideal zero-crossing detector ifa litle hysteresis is added. Mind you: ICis must bea HC type, not a HCT type. ‘Assuming that the data recovery circuit works, pin 8 of ICis supplies a copy of the signal sent to the tape recorder (signal 6). To climinate the 180° phase shift introduced be- tween the mput and the output of some tape recorders, witch 5 allows the digital datas- tream to be inverted, As shown in the timing diagrams, signal 7 consists of two frequencies that must be converted into logic 0S and Is (see also Fig. 4). The falling signal edges (signal 7) start a one-shot, IC'3, whose output pulse width is set to about 75% of the period of the highest burst frequency. When the Q output ELEKTOR ELECTRONICS JULY/AUGUST 1991 TIMECODE INTERFACE FOR SLIDE ONTROL =I RESETDAV 0 ° 1 1 = o o 1 1 = 3 a1 etose, eee gs == 3 Table 1. (signal 8) returns to logic high, the level of the input signal is latched in ICs. As ilus- trated in Fig. 5, logic 1 is latched at a high frequency, and a logic low at a low fre quency. The decoded signal (8) is fed to the serial input of the UART via electronic switch IC2t9, Theresult of theserial-torparal- lel conversion is available on pins 5 through 12 of ICs. The DAV output of the converter (signal 10) indicates thata new byte has been read. ‘The byte shifter discussed earlier is formed by ICs, ICs and ICr. A rising edge at the CLX input of IC? (signal 13) causes the byte to be transferred from the input to the output. At the same time, MMV (monostable multivibrator) ICiub is started. A litle later, ICiap starts another MMY, ICs, The setting, of ICrah clocks ICs (signal 14), while the re- setting clocks ICs (signal 15), This results in all bytes available via Ks, Ke and K7 being, shifted one position. Disregarding the computer interface for the moment, signal 13 isthe result ofthe DAY (data available) signal (10). At the end of the DAY signal, a new byte entersthe byte shifter. Dav is reset by the start bit of the next byte received, Besidescontrolling thebyteshifter signal 10 starts the code detector formed by ICL75 and ICiss If signal 10 is sill at logic | when. the Q pulse is finished (this occurs when a ‘code is received), a logic 1 is latched in ICs (signal 17). A start bit of the next byte in a subsequent code (signal 9) resets this infor- mation again via ICi7s, The received code can be visualized by connecting 213 EEDTS’ address display modules to K5, Ke and Kr. ‘The code displayed remains stable until a new valid code is received. When input Bis used, the display is switched off hecause it would show a differ- tent data format that makes no sense to vis~ walize. ‘Communication with the computer Connector Ko may be connected to the universal 1/0 interface (Ref. 3) or to any ‘ther equipment that provides similar con trol bus. The PC 1/0 interface keeps the ad- dress decoding in the timecode circuit simple, The address selection signals are available at the outputs of ICiss (read) and Civ (write). Table ists the functions of the selection lines. The RDAV signal allows us to check the status of the code detector (signal ‘Address assignment in the timecode Intertac 17). When a code is ready for reading, this condition is stored in ICits (signal 20). This bistable blocks signal 10, which prevents the code being changed in the mean time. The ‘EST signal (19) is used to read the informa tion held by buffer ICs. Test indicates that a code has been detected. If itisactive, the da- tabytes can be read or shifted with the aid of RDDATA (21) and shift (12) — see Fig. 6 The code detector is restarted by signal 22, npav. The Q output of ICiss resets the code detector via ICizs, The UART is written to with the aid of the wRDaTa signal ‘The wer aPesignal enables input A or Bto be selected via ICi0, a monitor position to be switched (SO, signal 4, is fed direct to SI, sig: nal9),and the transmitter and the receiver to beswitched to the high bit rate via THicHand RRKGH. ‘The remaining inputs and outputs of IC and [Cio are brought together on connector Kio, which is intended for options related to recorder control. Status signalling and power supply LEDsare used ata number of positions in the circuit to indicate the configuration selected. ‘A voltage regulator, IC2s, is provided on the board to enable the circuit to be powered by a mains adaptor when used in stand alone applications without a computer link (tape playback only). Components Ras to Rw, C2 and C22 ensure that the interface cant read tape signals record atthe low bit rate Switch 9 provides a selection between com puter supply or adaptor supply. a Continued inthe September 1991 isue. References: 1. “Computer-controlled slide fader” Elsktor Electronics, March and April 1988 Ta, “Centronics interface for slide fader” Flek tor Electronics, October 1988, 1c. “Replacement for TCA280A" Elektor Elec tronics March 1990, 2. "The digital model train” Part 12 — ad dressdisplay, ElektorEleetronies, March 1990. 3. “Universal 1/O interface for IBM. PCs Elektor Electronics, May 1991 INTERMEDIATE PROJECT A series of projects for the not-so-experienced constructor. Although each article will describe in detail the operation, use, construction and, where relevant, the underlying theory of the project, constructors will, none the less, require an elementary knowledge of electronic engineering. Each project in the series will be based on inexpensive and commonly available parts. MODERN LED CLOCK Clocks, as most of you will be aware, can take many shapes and sizes. Here is one with a fairly unusual read-out, intended as an eye S shown in Fig. 1, the 29 LEDs on the ont panel ofthe clock are arranged in four groups: 12 for the hours indication, 6 for the I0-minutes indication, 10 for the minutes, and 1 for the seconds indication, The read-out works as follows: suppose itis 3.54 (a.m. or p.m). This time is indicated as follows: in the top bar, the third LED from the left lig bar, the LEDat the extreme right (50 minutes);and in 's(@ hours); in the centre catcher on your desk. J. Ruffell the lower bar, the fifth LED from the left (4 minutes). The time indication is, therefore obtained by adding the values indicated by the three bars. The circuit ‘The clock consists of three main parts: a counter, an adjustment circuit, and a read- ‘out. These Functions are easily located in the eeegeeeeeoe@ 1234567890 12 © 10 20304050 10 minutes 123456789 e second set hours 10min. min. ELEKTOR ELECTRON! cireuit diagram, Fig 2. The mains equency, 5) Hz, is applied to the clock input of counter ICi, which divides the clock input signal by 50. Its Q2B output supplies the sec ond pulses If the mains frequency is 60 Hz pin 11 of IC1 should be ted to ground in stead of tothe positive supply line. The second counter, ICI, is wired to divide by 60, and supplies the minutes pulses, ie, a rectangular output signal with a period of 1 minute. Via an XOR gate, Ni the minutes pulses are fed tothe clock input of a 4017 decade counter, ICS. The ten LEDs atthe outputs of the counter, DI-Div, form the minutes read-out. When ICs reaches out- put state 10, it supplies a high level at sts munication protocol. The I/O lines are brought out to 40-pin PCB header When fitted, the PCFS591 ADC/DAC is recognized by the digitizer software. The analogue output of the ADC/DAC may be connected to the reference input of the main video ADC, IC, to implement an automatic brightness control. this option isused, omit Pi, and connect pin 12 of ICia to pin 15 of Cis, Furthermore, the analogue ground of ICis (pin 13) is connected to the circuit ground (pin 8 or 12). From thereon, the soft- ware does all the work, and automatically presents a ‘sensitivity’ control option in the Construction and test ‘The digitizer is built on a single printed cit- cuit board that is readily fitted into the Archimedes. This PCB is double-sided and through-plated (see Fig. 3). It occupies one podule slot. One side has a 64-way DIN (a-c row) connector, the other an aluminium fix- ing plate which is secured to the computer enclosure with theaid of two screws. The fix- {ng plate offers sufficient space for the BNC connector, which is connected to PCL and PC3, and the sensitivity potentiometer, Pi Since the extra I/O channels are optional, therelevant ICs need not be fitted as yet. The same goes for connector K2, the three resistor arrays Re, Risand Rr, resistors Rue Ris and preset Pa The construction of the PCB is straight: forward if you follow the indications on the overlay, and thecomponents list. Thesupply decoupling capacitors may be fitted at the solder side of the PCB, or, if IC sockets are used, underneath the ICs. The fixing plate is secured to the PCB with the aid of two small aluminium brackets. The terminal marked ‘I' on the digitizer board isconnected toa short wit fitted with a jumper. On the Archimedes motherboard, TOR Ei BCTRONICS JULY/AUGUST 1991 COMPUTERS AND MICROPROCESS ry 1 900000000 olfo; we Fig. 36. Component mounting plan is jumper is fitted on pins 1 and 2 of plug 3 (Model 300), or plug 4 (Model 400), The jum per already fitted is removed. Users of a video enhancer should note that this unit works with a clock of 36 MHz on pin 2 of plug 3 or plug 4, This means that the digitizer clock lead must be connected to pin 1 only, which carries the 24-MHz clock signal After fitting the video digitizer in a free podule stot, and connecting the clock lead to the motherboard, set the jumpers to hexade- cimal value E’. This is done by fitting jum pers in positions “A’ and °B’ only. Jumper Gand “H’ may be used to change the base idress ofthe ICs on the FC bus, These jum are normally not fitted, enabling the FC vices to be accessed at their delault base jumper ‘F is fitted only address. Lastly when the video source requires to be termi nated in 7 video equipment. When the source is not properly terminated, several errors may ‘occur, even including a ‘no video signal prompt on the screen. If all is well so far, close the conspuiter, and con .Q. This will be the case for most entrate on the softwar Switch on the computer, and type ‘po- les’ to get an overview of active podules The video digitizer should report as ‘simple SE system, and likely to be functional poduleSE" I thisisso, itis recognized by the The best setting of the brightness (sensi- a0 4ka7 1k81 potentiometer ka preset H Capacitors: a ‘474 16V radial 21 100nF ‘Semiconductors: 7aHCT248, 7aHCT138. 74HCT163 7aHCTs2 T4HCT?4 74HCTa024 7aHCTI4 apcoa2o Lutest 7aHOT4068 74HCTS7E POFES7a" PCFaSaI* RisRO-RIE AIT" Ran Re AS Fe. 7 FERIO-RIS, Pr lersi614 le1sic16c17 ewe Cee Miscettaneous: 1) 64-way a-crow male Ki bus connector (O1N) 1 40-way PCB header, Ke ‘angled, with oject handles 1 BNC socket 1. jumper block 9 jumper 1. aluminium fing plate 255126 2 1 910053 1 software on isk: ordor code ESS 1501 * required for optional YO ports and automat lebrighiness contro, BLEKTOR ELECTRONICS JULY/AUGUST 1991 tivity) potentiometeron thedigitizer mustbe determined empirically. The grey scale in the standard TV test chart may come in handy here, and will result ina good calibra- tion. When the automatic brightness control is used (with the PCF8591), the adjustment is made with P ther than Pr (which is then not used). After adjusting P2, the software is used as a ‘fine’ control to set the optimum, bright The control softwar powerful and flexible Thecontrol software for the video digitizeris, supplied on an Archimedes-format 3¥%inch diskette, which containsa numberof utilities that support the interface To begin with, we have !VideoDigi, a complex piece of multi-tasking software that arranges the digitizing of the video signals. and their subsequent processing and storing, Table 2. Podule address functions ‘Address 0: read only bits 0-7: podule ident read only bits 0-7: cigitized video ‘formation bits 8-15: status bits of (C3 bit 8: HSYNG bit 9: VSYNG bit 10: Oddieven Dit 11:5.93-ps signal bits 12-15: sample count write only bits 0-7: start value of B.bit counter C13, write only bit 0: bistable IC7a (enableidisable tree counting) Adgress 4: Address 8: Address 12: VO components accessed via the inter- nal °C bus: PCF8574.based 1/0 port: IC15 - 0100- x00" 1018 = 0100 -x01* 117 = 0100 x10" x= 1 when jumper H is not ited x= Owhen jumper His Poras91 ADcIDAC: 1e18 = 100-1200* when jumper G is not fited x= O when jumper G is fitted ‘The level of the LSB, *, depends on whether a read of a write operation fol- lows: * = 1 indicates a read operation, "0a wate operation. Jumpers G and H may be fitted to avoid ‘conflicts with otter hardware extensions, Jumper G must not be fitted when the automatic brightness control is used. ELEKTOR ELECTRONICS JULYIAUG SP 1991 BLACK-AND-WHITE VIDEO DIGITIZER tr ne Size test? Line str feastivite Fig. 4 The powerful RiscOS software allows the digitizer to operate in o mult environment. A number of routines are available to enhance the ‘trozen’ samples. hediie 7 Fig. 5. in memory. It should be noted that the pro- gram !VideoDigi works only with the di- gitizer podule fitted in the computer. The ‘modulecalled 'Vidcodigi. VideoDigi used by this application may also be used in your own programs, whence the extensive do- mentation file inckided on the diskette. In this doc file you not only find details on the operation of the program, but also a dis cussion ofthe built-in SWI modules, ‘The programs !AnimDigi and DigiAnim Linked to !AIM, the digitizer podule and the associated software turn the Archimedes into a near-professional image processing system. tenable the digitized pictures to be used for video animations as used in, for instance, an electronic photoshow File standard conversion, file pression, and file exporting, are achieved with the routines IMakeGif, 'MakeTiff and FulltoAIM. . Reference: 1, Inter-IC communications’, Elkior Elec tronics September 1990 Se ee WOULD YOU BE AN INVENTOR? ‘OST of us have misconceptions about other people's obs, particularly ifthose Jobs, such as those of the scientist, the sur- eon, the detective, he inventor, have a cer- amount of (generally false) "glamour" at- tached to them in the popular eye. Tam an inventor. It is not for me 10 say that my job is more misunderstood than ‘most, but [often get that impression, The gen- eral publichas. lot of erroneous ideasin pop- ular circulation about inventors and inven- tions, How and why did I become an inventor? ‘Theansweris simple: wasjustbuiltthat way, Born with the insatiable curiosity of a mon- key. simply adto know how athing worked. and, having found out, worried and worried as to how it could be made to work better ‘That is the nature and background of practi- cally all inventors, You may be surprised if I say that I do not think that there is anybody in the world today who enjoys fame or fortune solely by reason of being an inventor, or who makes a good living out of it, Lam writing, of course, about real inventors and, in order 10 under= stand what a real inventor is, one must frst understand what is meant by rea tion, A real invention is quite strictly defined by the Law and is the subject of a “Patent Specification’ in one or more of the world’s Patent Offices. Linless this is so, the device, whatever it may be. has no status as un i vention, and consequently the inventor or his representative ean obtain no redress for infringement Patent Law Jays down without ambi ity whal may or may not constitute an vention, defined legally as a ‘patent’ For all practical purposes, the terms “patent” and ‘invention’ are synonymous, You may not patent x device which is ob- viously intended to be used for an improper (illegal) purpose ‘There are peculiar restrictions relating 10 the patenting of devices that may be used for war purposes. ‘You may not patent a “fundamental prin ciple’. This is very important and requires some explanation. The fact is not so stated in patent law, but is inherent in its opera- tion. Thus, if you have invented, say, a new ‘cooking vessel. you may not describe your invention (in the patent specification) as a vessel forcontaining and cooking foodstus since this would make every saucepan and casserole in the worldaninfringement of your patent! You would be patenting a funda- ‘ental principle—that of hollow container ‘You may not, of course, patent a device that has been ‘covered’ by a previous patent specification ar which has been published previously elsewhere. by C.C. Whitehead, ACGI, AMIRE ‘So much for the “musinis’, Now for the “musts Your invention must be novel. That is to say thal your device must contain some n ire which has not been described ‘Thus, your new cooking vessel ‘may be described as “a vessel for containing and cooking foodstuffs withan automate self- raising cover (or lid)’. The novel part of your invention (which also absolves you from the charge of seeking to patent a fun- damental principle) is the “automatic self- raising lid" ‘Yourinvention mustbe practical, You must describe exactly how your deviceistobemade or constructed, and how it is intended to work, Itmust be made clear to the examiner at the patent office that your device caus be ‘made ancl wil work as you have described iMotherwise he may refuse to grant the patent This is obviously necessary for two reasons, Firstly, a patent to a certain extent consi tutes an official guarantee. and itis undesir- able that impractical patents should be foisted tupon the public. Secondly, if these rules were not enforced, the world’s patent off cies would soon be cluttered up with use less patents, Patent laws were originally devised “for the encouragement of invention and the fur- therance of trade’. The idea was that an i ventor would he protected. at least tor a time, agains those who might steal his ideas and rob him of credit and reward for his work. This was the inrention at the incep- tion of Patent Law. ‘The real inventor then isthe originator of 4 patent or patents. This does not necessar- ily mean that he has a knowledge oF patent law. though most experienced inventors do require such knowledge. Moder conditions make it almost essential for him to employ Patent Agent,..sortofcrossbetween lawyer and a scientist (mostly lawyer), who is com- petent to draft patent specifications and con- duet business with the Patent Office. This relieves the inventor of a mass of essential ‘but routine work that need not concern him. in detail. Patent agents! fees may be a seri- ‘ous embarrassment to an_amateur or “free= lance” inventor. No invention is ever entirely novel in its conception (before you invented your new cooking vessel, you were obviously famil: iar with such devices, some of which prob- ably came very close to your own idea). The inventor then endeavours to obtain what in patent law jargon is known as ‘knowledge ‘of prior art®, This means an extensive search tnd reading of the literature and previously Published patent specifications (the services ‘of the Patent Agent are invaluable here) re- lating to the the device in which he is inter ested FLERTOR ELECTRONICS USA JULY/AUGUST 1991 Te may be that (so far as you are aware) the device which you have “invented” is so far unknown and ofa highly specialized na- ture. When you (or your patent agent) start digging nto“priorart,you will beastonished to find how many previous attempts, more orless successful, have been made to produce 4 similar device. That is to say, if you are new to the game. If you succeed where the ‘others failed. it will probably be because ‘you have the advantage of more up-to-date ‘materials and techniques. Thus, the German Nipkow was the real inventor (in the year 1880) of our present system of television, He understooxtclearly the principlesinvolved, and produced the essential deviee (the Nipkow disc’), but we had to wail forthe ‘electronic techniques of the 20th century before the system as a whole could become a practical proposition. That led in its turn to the out- of the ‘Nipkow dise Having made himselt familiar with ‘prior art” and thereby (let us hope) assured him self that his invention has novel features, the inventor must make a ‘model’ or “proto. type” to prove that in practice the thing does really work just as he intended, and so that hhecan describe accurately in his patent spec ification exactly how it is made and how it sd in doing what he claims that it does succs will do. ‘With the size and complication of mou em devices. all of this naturally costs a lot of money. The successful birth of even a simple invention may set the inventor back £100 or so. If he is a “free-lance” inventor, and he wishes to get credit and money for his invention, this is the point where his troubles start, after the successful issue of his patent! Let us assume that he has or has acquired ‘manufacturing facilities for his invention. If itis a commercial success. there Will be im- itators, almostcertainly infringing his patent, some of them unknowingly perhaps. others deliberately. The onus is upon him to fight them in the courts. This can be a frightfully expensive business. Big business organiza tions have been known to in ‘owned by smaller firms or indi Tiberately and without compunetion, secure in the knowledge of their ability to ruin the patent-owner with the costof anaction for in- fringement, and so forcing him to abandon the action, The private or small-time inven- forisalways and completely at the merey of these people. Remember, the onus lies upon him both to discover (not always easy) and to fight the infringement, ‘Consequently, we seldom hear of a suc cessful small-time or free-lance inventor nowadays. The inventor of today is generally the employee of « business organization, For ELEKTOR ELECTRONICS JULY/AUGUST 1991 the free-lance inventor, the risks are too great and the rewards (if collected) are {00 small. Yet, invention still goes on, albeit ‘mainly in the laboratories of the big indus inal organizations. Does the employee inventor fare any bet ter? Let us look into this. Though there are many successful inven tors in industry, there are no “inyemtors’ in dustry. That is to say, nobody (as far as 1 sam aware) is employed in industry as an “in- ventor", ‘The extent and sophistication of modern products and production processes offer an astronomically extensive field for inv tion. Employees who are brought into close contact with these products and processes ‘may frequently see the need for improve- ments, Itmay be the need and possibility of ‘anew product or process. or a small ut im= portant change in an existing product or process. It will depend on the skill, know!- ‘edgeand enterprise ofan individual who may thereby become stn inventor, If he does so. ‘what will behis prospects. and what may hap. pen 10 his invention? Ihe is an employee, and certainly i he is an employee of an organization of any considerable size. there is a certain answer to both these questions. If he is a scientist, technician or any person holding a position that enables him to exercise judgement in his employment, he will have been required ‘as a condition of his employment to sign 3 legally valid document binding him to as- sign any invention that he may make whilst in that employment, o his employer. and 10 waive all rights to benefit from the inven: sion or inventions. He will be required to do all the work that is necessary (apart from the routine work of the patent agent) 10 se ‘cure valid" Letters Patent’ apart from his nor mal routine, Furthermore, whenhe leaves! emplyment, he may be called upon to make tnassignment of his’ palenttoassociate com panies (usually abroad) of his former em: ployers. This may be months, or even years. after leaving that employment, and he can claim no recompense for the trouble and in- convenience, except in some cases for of-pocket expenses. Iiwould seem that thispractice started with government organizations concerned with patentsinrelation toarmaments, where twas deemed necessary inthe interest of national security to have the maximum possible hold. fon the inventor, after which it spread to in- dustry in general me employers do not trouble to make the employee sign the document I have men- tioned. Cam the employee then claim bene- fit from his invention. Not at all, Unless his employer is unusually generous and has. ‘made some legal provision o that end, he the inventor) will be compelled (if he is foolish and ignorant enough to do so) © go to law oclaim what he considers to be his “rights He will be involved in expense which he cean not afford, and will lose his case—and his reputation among employers who might have use of his services, He will lose his case because the Court will be bound to de- ELEKTOR ELECTRONICS JULY/AUGUST 1991, cede that (if t decides to hear the ease at all) isan established principle that employees inventions belong to the employer. Is there any other possible benefit to the inventor? ‘There is, The employer may, out of grat- inude orthe expectationof further inventions, give him an increase in salary, or promo- tion, bur this is unusual, Owing to pressure foyer many years by organizations seeking {o actin the interests ofthe inventor, a slight extra henefit has been gained for him. Ut was until a few years ago the practice of em- ployers (o have the name of the inventor ‘omitted from the Patent Specification, sothat he did not even receive the benefit (for what it might be worth) of oficial acknowleds- ‘ment of his invention. This has been amended, ‘and the inventor's name must now appear in the specification. This may sometimes im: prove his prospects of further employment. ‘There is another somewhat unsavoury practice amongemployersthat may affect the inventor. Patent law requires that “the name of the first and true inventor’ should appear in the prologue of the patent specification. Since the specification is drawn up on be- half the employer, and the inventor is under his control as an employee, what is to pre~ vent him putting a name other than that of the first and true inventor in the specitica- tion? The answer is usually that, owing 10 his intimate and detailed knowledge his in- vention, the inventor's co-operation is nec essary in developing the invention and draw- ing up the specification. However, ifthe in- ‘vention is of any great importance. the em- ployer will often include in the specifica tion the names (as “co-inventors’) of other people who have had litle or nothing to do With theinvention, These are usually the nasnes Of the inventor's superiors in the firm’ hier- archy, which appear on the specification in precedence to his own. When I Jook at patent specification containing a list of co- inventors, I ussume (unless I happen to know the people concerned) that the fast name to appear on the ist is that of the “true and first inventor’, OF course. co-inventors do exist, and some specifications are honest in this respect. ‘So much for the prognosis as far ay the inventor is concerned. What about his in- vention? [ have indicated what may ensue as Far as the private inventor (who is not an employee) is concerned. Let's see how the ‘employed inventor gets on with ‘his’ inven- tion. Unless the firm that employs him has a ‘member of the technical staff specifically assigned (0 this task, he will have to draw jonal specification’ minutely de- seribing his invention. In any ease. he will have to assist in this task. That's where his co-operation is essential ‘The work involved in drawing up the" pro- visional specification’ will be in addition to his other duties for his employer. If his em= ployer is one of the less serupulous kind, he ‘may be put under pressure toallow somebody else's name to appear as a “co-inventor’. even thought the person in question (zener ally the head ofthe department in which the ELEKTOR ELECTRONICS WOULD YOU BE AN INVENTOR? inventor is employed) may have had litle or nothing to do with the invention, To be fair to employers in general. I don't think that outright substitution of the inventor's name oceurs very often, but the adding of ‘co inventors’ is quite a common practice— though as Ihave said earlier. genuine co-in- ‘ventors do sometimes exist Ifthe real inventoris faced with this prob- Jem, there is nothing he can do about it, other ‘than to resign his job, and even that doesn't ger him off the hook if the invention is of any great importance. If his erstwhile en ployer thinks that it is economically wrth- while, he can without much trouble or ex- penise compel his former employee by law to complete the job, There is a somewhat Gilbertian situation here when there is lack of trust between the parties. The real inven: lor may so arrange things that essential in formation is withheld, or even false infor- mation substituted, and then having resigned his post go abroad, so that the employer has. to “start from scratch’. perhaps hampered by false information, if he wants to pursue the invention, Since it is not a criminal offence fon the patt of the inventor, and false infor ‘mation can be passed offas “mistakes”, there is no extradition, But it must be rare for an inventor to be prepared or able 10 20 to such lengths, though such cases are known Having drawn up his ‘provisional spec~ ification” (according to sirictrules aid down, by the Patent Office), the inventor sends it to his employer's patent agent (who might be another employee or private agent under contract) who then searches Patent Office files for any information that may be relevant to the proposed patent, The result may often bbe that there is a crop of ‘citations’, that is, former patentsand extracts from such patents ‘that may seem to east doubt on the validity ff the proposed patent. It may so happen that somebody else has already filed a spec ification or published an article or “paper” ‘4 technical journal, covering the idea. (uhough this is unlikely ¥f re inventor knows huis job).inwhich case the invention willhave to be abandoned. ‘The patent agent will have been compe tent to deal with many of the “citations”, but some may be referred back fo the inventor, ‘who will then have to show that they are not really relevant, or, if they are relevant. he to “dodge’ their implications. Meanwhile, time will be passing. and somebody else {perhaps in some other part ofthe world) may also be working on the idea, Everything then ‘depends on the date when the inventor fi- nally satisfies the patent office that his in- vention is valid and the final specification is accepted. It may still happen that somebody else (generally abroad) has filed a similar specification in which case there will be an expensive brawl between lawyers to decide which specification was filed first, and thus ‘ousts the other. The inventor asan employee ‘will not be involved in this, nor in any sub- sequent actions for “infringemient’. But the ‘only reward that he can expect for his work is to see his name on the final specification. USA JULY/AUGUST 1991 Having filed the final specification, thein- Ventor will often be required to make *as- signments’ on behalf of his employer, ifthe invention is at all important. There is a big “tsade’ in these inventions, firms selling or “swapping” specifications with other firms, usually associates or subsidiaries abroad. Patent Law has laid down that in such cases ‘the ‘assent” ofthe inventor must be obtained. by signature on an ‘assignment’ form 10 carry out the transaction. Only in the case of assignments (0 the USA does the inventor receive a ‘fee for his signature: one dollar! ‘There has been some grumbling amongst employers about this. It not infrequently happens that the inventor has left his em- ployment, and has fo be found to make the assignment, which has to be made before a Notary Public under oath, In some other ‘countfies—notably the USA—the employer ‘can dodge this difliculty. I sometimes won- ‘derhow many assignments have been forged. ‘One firm I worked for chased me for as- signments up to 1wo years after I had left theiremployment! My relations with that firm, Were such that I would have dearly loved 10 hhave refused—but that is impossible under ‘current law. Such is the life of an inventor. As a pri- vate inventor he is at the mercy of anybody with more money. As an employee-inven- ‘or, he exists only in name, whatever the im- portance of his inventions. The employer is under no legal obligation to make other than exgratia payments,andonly if theseare writ- ten into the inventor's contract of employ- ‘ment, Organizations claimed to be acting on behalf of inventors have struggled for years to obtain a better deal, but so far without success. Almost invariably, the inventor'sonly rewardis the strictly private sense of achieve meat, which is unsubstantial, ‘To Karl Marx is attributed the aphorism (profoundly true) that ‘nothing is under- standable apart from its history”. Long ago in pre-patent days, the ease with which an inventor could be robbed of all benefit and credit for his invention(s) gave rise o the {illusory} fearthatinventors, realizing thesit- uation, would become anextinct breed, Some sort of protection seemed to be called for. Hence the Patent Lav (in the UK), Peshaps im early days these laws did give some mea- sure of protection othe inventor. but that soon ame to be illusory. Patent avs ive protee- tothe owner of the patent, whonowa- {ays is seldom the inventor. ‘Taking the ethical point of view. it would seem that the private inventor is entitled to the Full ruts of hisinvention(s). There seems to be no valid argument to the contrary Ibis ‘when the inventor is an employee that the issues become controversial. The employer points out (quite rightly) that he has facili tated his employee's invention, and is there- fore entitled to at least a share of the bene: Fit—but 99.9%? Those whoare advorates for the inventor point out that the invention ‘could not have come about but for the em- ployee's insight. Iti this insight that is the teal stock-in-trade of the inventor. and is an essentially personal attribute. To which the employer replies that itis merely an exer- of initative—for which the employee ispa ‘The issue is further complicated by the Fact that the employee may also be (and not in- ‘requently is) a private inventor. The spe- cific issue that arises here is whether in view of his contract of employment (actual or im~ plied) he can funetion as a private inventor. It would seem that he can do so only in a specilic case, where his employer has no in- terest in the invention, and has given well cautested permission for him to proceed. If the invention is ofany commercial value, such permission is not likely to be given. The employee might argue that the invention \was not developed in his employers’ time or with the use of any of his employers’ facili- ties and was not in any way technically re- lated to his employers’ business ‘There are two possible attitudes which the law might take in this case. It might take the view that all inventions of the employee, iespective of circumstances, are the prop- erty of theemployer. Or itmighittake the view thatif the circumstances were suchas theem- ployee claims, that he wasentitled o proceed, uc he would have to prove such vircum= stanices 10 the satisfaction of the court. This could be a lengthy, harrowing and expen- sive business. In'the mean time, the em- ployee, in view of his dispute in the matter ‘with his employer, would have lost his em- ployment! Supposenow that, being unemployed. you ecide to become “sell-employed” as a free- ince inventor. Your best chances of suc cess will be tomake use ofthe experience you have obtained during the course of your em- ployment. That would seem to be obvious. So you present your patent agent with a pro- visional specification (a preliminary drat) which you have drawn up, He will naturally want 10 know what qualifications you have in that particular line, and you tell him that in the course of your previous employment youbecame familiar with the subject, He will then war you that if any of the subject mat- ter or ‘claims’ in the specification bear any relation to the business of your former em- ployer, he may involve you in (probably successful) litigation to obtain ownership of the patent Heads T lose, tails you win! But inven- tion, like some other forms of occupation can be intellectually attractive and some find that reward sufficient (910085) a LONG-PERIOD MAINS TIMERS Girmens Type San0529 IC may be pro- grammed for periods from 1 second to 31 hours 30 minutes. It may be used for ‘witching staircase lights battery chargers, and many others, The chip is programmed via pins EI with the aid of switches $;-5,. When Sy is closed, the IC is enabled for a period of Th;Sy:4 hy Ss: 10h; and Se: 16h. All sorts of combination are also possible: for in- stance, if both S2 and S3 are closed, and the other two switches are open, the chip is enabled for a period of 14h ‘The IC controls a 4-A triac, which can switch fairly largeloads, Thetimerisstarted with Ssinanemergency,itmay bestopped prematurely with 5 Great care should be given to the con- struction, sinee dangerous mains voltage 1s present at several points in the circuit (R.Kambach 914962) KTOR ELECTRONICS USA JULY/AUGUST 1991 ELEKTOR E ETRONICS JULY/AUGUST 1991 REMOTE TEMPERATURE MODULE FOR DIGITAL MULTIMETERS ‘ATIONAL Semiconductor's LM334Z.isa temperature- dependent adjustable current source supplied ina plastic TO- 92 package. In Fig. 1, a 226 2 resistor, Ry is used to set a cur- rent gradient of 1 wA Kl Theremote temperaturesen: sor is formed by IC, Ry and C, Since its output is a tempera~ ture-dependent current, a sim- ple two-wireconnectionmay be used between thesensorand the DVM interface. Constant cur- rentdriveasapplied here elim- inates problems with voltage drop and expensive low-los ‘wiring associated with voltage drive. Also, remember that the sedrop across a relatively Jong cable is temperature de pendent, which calls for a fairly complex compensation circuit. By contrast, when the sensor is a constant current source, the length and the total resistance of the wire between it and the interface at the DVM side has virtually noeffectontheoutput signal. This obviates a com- pensation circuit, and allows you to fit the sensor at quite some distance (up to 25 m = 80 ft) from the DVM using inexpen- sive wiring Resistors: (1% types; E96 series) Ri = 2262 Rt R2=4,75 k R3 = 10.5k2 R4 = 1272 RS = 22kQ Capacitors: C1'= 100 nF SMA" C2 = 47 uF, 16 V, radial 63 =10nF (C4 = 22 pF, 16 V, radial 65 = 100 nF "SMA = surface mount assembly ‘Semiconductors: ICt = LM334z, 102 = REF-02 Miscellaneous: S1, S2-= on/off switch $3 = DPDT switch SV battery with clip ELEKTOR ELECTRONICS JULY/AUGUST 1991 Components P; and Rz con vertthe currentsupplied by the sensorintoa voltage witha gra- dientof 10mV K+. CapacitorC, suppresses high-frequency in- terference which may bepicked up on the cable. To prevent problems with groundlevels thecurrent source must be powered by a separate 9-V battery as shown in the di agram. To allow temperature indegreesCelsius CO), anadjustable high-stability volt regulator Type REF-02from, Precision Monolithies nc istused to subtract a fixed amount of 2731.5 mV from the converter voltage. Thisisachieved ing’ theconverter ground, by 2731.5 mV (the REF-02 out- put voltage) when switch Sp is ‘opened, When Sis closed, the converter produces a tempera: ure reading in kelvin, The circuit is switched on and off by $). A quick battery condition check is available by switching 53, to position ‘a’, ‘and Sx to position ‘a’. Replace the battery if the DVM indi- cates less than 7.1 V Calibration of the converter isfairly simple First, adjustmmul- titurn preset P2 until a voltage of 2731.3 mV is obtained across Ry (open $:). Next, adjust the semperature gradient (preset P,) by comparing theDVMread- ing to that produced by a cali brated thermometer.Setthe DVM oth sius readings. An indication of, say, 0.217 V (on a 31/2 digit ine 2V range for degreescel- strument) then corresponds to a measured temperature of 217 °C. Properly adjusted, the temperature sensor achieves a resolution of 0.1 kelvin. Finally, hecurrent drain isabout2mA (J, Ruffell 914011] SOLID-STATE LIGHT-SENSITIVE SWITCH HIS electronic switch is de signed to be connected di- rect to the mains, which obvi- ates a low-voltage supply and so keeps the cost and space re- quirement to a minimum, The ‘cireuitswitchesalampoawhen itgets dark, and off again when it gets light. The switching is done without a relay, avoiding problemswithsparksand mains pollution caused by the con facts and the coil inductance. The switch is powered by the mains via Rig, Cy, D3, Dz and C3. A voltagereference, Dy supplies 82 V toa light mea- suring network, R>-Py. As the light intensity drops, the resis tance of the LDR (light-depen- dentresiston) increases. Conse- quently, the voltage across P) drops, so that the gate-source voltage of FET T; drops also When switch §; is closed, time constant R-Co causes the gate voltage of T; to change more slowly than the resistance of Ro. Thisis necessary to prevent the circuit responding to quick changesin theambient lightin tensity Components Ty, Ta, Ry, Re, Ry, and Rg form a Schmitt trigger. Normally, T; conducts so that Tp is off. When the gate volt- age of the FET drops below a certain level, Tos switched on. Consequently, T; starts to con- nic226m duct, and supplies the gate cur- rent necessary to trigger triac Trip. The load, lamp Lay, is then switched on, When thelightin- tensity increasesabove the level set with P}, T} is switched on, so that the load is switched off Switch S} is included to dis- able the time constant during adjustment. Resistor Ro serves to discharge C, after the circuit hasbeendisconnected from the WARNING Sincethecircuitcar- riesdangerousvoltagesatanum- ber of points, itis essential that proper electrical insulation is applied, Neverworkonthecir- ‘uit when themainsisconnectest tot, Make sure that no part of thecircuitcanbetouched when itisbeing set, adjusted or used. (L. Rikard 914010) 1-MBIT ADAPTER FOR EPROM PROGRAMMER HE ADAPTER allows you to program the 27C1001 EPROM which hasa capacity of Lbitorganised as 128 Kbyte». To be able to use the present adapter, your EPROM pro- grammer must be capable of programming512Kbit PROMS such as the 27512 or 27C3 (64 Kbytex8), The adapter pro- gramsthe27C1001 in two steps of 64 Kbyte each, and is simply plugged into the 28-way (or 40 way) ZIFsocketon your EPROM. programmer. The64Kbyte block selection is effected manually with the aid of a switch The circuit of the adapter has few surprises. Socket I connects theadapter to the EPROM pro- ‘grammer, whilesocket2accepts the 27C1001. Thi input TEN i sif(s 31) 3 Bigs os S113 3 {|e 3 Iss 3 ||33 $ ||3-3 3 ||3 3133 ite! sites $4'33 $1 33 si es 3.83 ELEKTOR El -LECTRONICS JULY/AUGUST 1991 PARTS LIST DS = LED, 3mm ICI = 74HCT00 swith integral LED, TW Type 661-2030401 2off 14-way sripsof PCB pins (ong pins at one side) 32-way or 40-way ZIF socket of the 27C1001 is actuated (ie, made logic low) when the pro- gramming voltage, Vp, on Socket I exceeds the zener volt age of Dy, and CS on socket 1 isheld low by the programmer. ‘The zener diodealsoenable the programming. voltage, 125_V, to pull the OF terminal of the 27C1001 high, whichallows the device to be programmed. The Vppinputofthe27C 1001 isheld either at +5 V (during read op- erations) oratabout +12 (dur- ing programming). To ensure that the 27C1001 is supplied witha sufficiently high operat- ing voltage (nominally 5 V), a Schottky diode type BATSS is used in position Ds. This diode is marked by a forward drop of 0.2 V only. Switch S; takes the highest ad- dressinput, A16,0f the27C1001 low or high to effect the selec- tionbetweenthelowerand higher 64 Kbyte block in the device (Al6= low, and A16= high, re- spectively). Diode Dslights when the lower block is addressed, Theconstruction of theadapter is apparent from the PCB lay out: Start by fitting the single wire link on the board. Socket 1 is fitted at the track side of the board, and consists of two 14 pin PCB pin headers. Switch 3, is a self-locking push-button from ITW with a built-in LED indicator. The PCB accommo- dates both 28-way and 40-way ZIF sockets. (G. Rubel 914035) BATTERY CHARGER IHEBATTERY changershown inthe diagram may be used to charge a battery or batteries with a total nominal voltage of 12 V (that is, ten NiCd batter- ies or six 2-V lead-acid batter- ies. Itissmall enough tobebuilt infoamainsadapter case. Misuse is virtually impossible: batter- ies connected with wrong po- larity, a short-circuit of the out- putterminals,oramainsfailure havenoeffecton citherthecharger or the batteries, Power is derived from the mains viaa transformer with an 18-V secondary. The output of the transformer is rectified by diodes Dy-D, and smoothed by C;,whereupona direct voltage 0f 22 V is available across C. ‘ompletely discharged bat- teriesare first changed by acur- ent of some 6 mA via Ry and R-Rs-Dg, Once the battery to be charged has an emf. of 0.3-0.5V, the base-emitter volt- ageofT; becomes high enough to switch the transistor on. ChargingindicatorD, thenlights and T2 is also switched on. A charging currentofsome60 mA then flows via R-Ry. Thismeans that 500 mAh NiCd batteries will be charged in about twelve hours. If the battery is connected ‘with wrong polarity or thecharg- srminalsareshort-circuited, power transistor Ts remains off and the charging currentcannot become higher than 6-12 mA. The current drawn by the (HL Dopiner 914004) circuit in full operation isabout 80 mA. PRECISION RECTIFIER FOR DIGITAL VOLTMETERS THIS SIMPLE circuit, based ‘ona single opamp in non- inverting mode, is a precision rectifier extension for digital voltmeters. The circuit can be connected toa high-impedance voltage divider without theneed of an additional butfer stage thatincreases thecostand, more importantly, the power con- sumption. Another advantage of this circuit is that the accu- racy is not affected by the off set voltage of the opamp. The output of the rectifier is differ ential toallow ready connection tothe IN-LO and IN-Hl inputs of DVM ICs like the familiar 7106 and similar types. Circuit IC, isa LinCMOS op- erationalamplifieroperatingin thehigh-bias mode. TheTLC271 used here achieves a good high frequency response ata low cur- rent consumptionofabout] mA. For all practical purposes, the gain of the opamp is 2R)/Re, where R)=R3 and R2=R,. Wit the values shown, the gain is nearly equal to 1.1107, which istherms, (root-mean-square) shape factorforsinusoidal wave- forms. Capacitors Cy and Cz are optional. They improve the response and stability of the rectifier at high frequencies. ‘Any dic. component at the input,aswellas theoff-set volt age of IC), appears as a com mon-mode voltage across C3 andC,,andisthereforerejected ‘The low-frequency response of therectfieriscletermined by the time constant R3C3 (or RiC4) With the component values shown, the 1%-accuracy band: width extends from 25 Hz. to about 20 kHz. The circuit is powered by is at a potential of about 2.8 V the9-V battery used forthe DVM _ below the positive supply. The module. The ground of therec- DVM should be set to a full- tifier is connected to the COM scale input voltage of 200 mv. terminal of the module, which (R Shankar 914060) PULSE GENERATOR WITH ONE 4066 HE DIAGRAM shows how the nexpensiveand widely available 4066 quad bilateral analogue switch can be used to build'a pulse generator with adjustable high’ and low’ times ofthe output waveform. Assumingthat switch Cy is ‘open, the control input of IC), is logic high, and this switch is therefore closed. This results in low levels atthe control in- putsoflC;,and ICy4,Capacitor G Isallowed to charge via pre- setP;,and C3 via preset P,, When the voltage across Co reaches a certain level, ICi, is closed so that the control input oF IC is Pulled low. The outputs of the Sircuit, OUTI and OUT2, are then logichigh OUTIhasaswing of 5 V, and OUT2 a swing vir- tually equal to the supply volt age (max. 15 V). Meanwhile, itch IC) is closed, so that Cy is discharged. Switch IC), is ‘opened, and C3 is charged via When the voliage across Cy hasteached a certain level, Cj, .15vam8 o) isclosed,and the outputsof the circuit change to logic low. ‘The'low’ and ‘high’ times of the output waveform are ad- nent values, the ‘low’ time can justed with P; and P respec- besetbetween 136ysand375ms, tively. With the given compo- andthe ‘igh’ timebetween 154s ELEKTOR ELECTRONICS ULY/AUGUST 1991 and 330 1s. Other on and off times can be created by chang ing Coand Cs The circuit draws a current ‘of about mA ata supply volt- age of 10 V. Note that OUT! proclucesaless than perfectwave- form, and has a low fan-out. The other output, OUT2, is SEMICONDUCTOR TESTER "HE TESTER in the diagram can be used to test virtually any kind of semiconductor de- vice, ranging from switching diodes to power transistors. In addition, it provides a rough gain indication of bipolar tran- sistors,and, more generally,can bea useful aid in finding func: tional, short-circuited and in- ternally open devices conductor batches. The tester is based on a gle CMOS IC and a bi-colour LEDasavisualindication.Gate [Cha forms an R-C oscillator. ‘The oscillator signal is buffered and made available in true and inverted form by the three re- ‘maining gates in the IC. ‘Thebi-colourred/green) LED indicates the direction of the current that is allowed to pass through the test probes or the device under test. Resistor Ry functions as a current limiter. The signals at the input and the output of gate ICj_ are ap- plied to a pair of test probes, a two-terminal test socket for buffered and should be used for most applications. (P-Sicherman 914029) diodes anda thrve-terminal tran- sistor socket. The base current forthe transistorundertest TUT) can be set with preset P). The preset may be calibrated with the aid of known, functional transistors to give an approx mate gain scale, Only one LED lights when a semiconductor is functional ‘The LED colour then indicates the polarity (n-p-n or p-n-p, or cathode /anode). When thecom- ponent is internally open, no LED lights. A semiconductor with an internal short-circuit is easily recognized by the green and red LEDs lighting simulta- neously atabout equal intensity Transistors must be connected with thebase,collectorand emit- ter pins to the indicated socket terminals, so check the pinout before running the test! ‘Thecircuit may also be used as a simple continuity tester. It drawsacurrentofabaut300}1 withoutaDUTorTUTconnected, andabout7.5mA withthe probes short-circuited. (Amrit Bir Tirwana_ 914081) VIDEO ENHANCEMENT FOR ACORN ARCHIMEDES "THE ACORN Achim ‘well-known for itsspeed and good graphics facilities, has a video interface thatallows pro- grammers to design a variety ‘of screen modes with the aid +O vais » ® ofaprogrammablecontroller. As 30 often, this versatility has a Araw-back: since the controller usesafixed lockof24 MHz,the frame frequency decreases the morepixelsareuised inthescreen image. Asa result, high-resolu- tion screen modes havea ten- dency tocauseflicker Fortunately ELEKTOR ELECTRONICS JULY/AUGUST 1991 thiscrawbackmay beeliminated or nearly so by increasing the clockto36MHz:thishasalready been incorporated in the new ASAD computers All that is necessary to in- crease the cloc crystaloscillatorand a Fype7400 IC, To ensure that the circuit in the diagram is atall times com- patible with the existing soft ‘ware, it may be arranged to be switched on (by software) only when the screen mode requires a higher clock The design allows the cir cuit to be fitted simply to the existing connectors in thecom= puter, The TTL oscillator and two small connectors are fitted at one side of the board (not available ready-made), while theother side housesa surface mount version of the 74HCTUO, ‘The board itselfisfitted tothe four pins of PL3 in A300 com- puters or PL, in A400 comput- Theconnection with the1/O to pin 3 of PLyg on the mother supply lines on the back plane line that arranges the switch- board, (thecard with theextensionco ing between the two clock fre-___ ‘The supply for the board is nectors) quencies is made with a short _oblained by soldering two short length of circuit wire soldered lengths of circuit wire to the (H.Stenhouse 914051) VOLTAGE-CONTROLLED CURRENT SOURCE 1HESOURCE, based ona Type TLO8$ quadruple opamp, isintended to convert an input signal of 0-5 V into a current ‘of D-20 mA This type of circuit is used, for instance, to trans: fermeasurands (quantitiesbeing measured) overlongleads.Since the resistance of the leads is part of the current loop, itis of ‘ng consequence and can not af- fect the measurement. Opamp IC), isa straightfor- 15 V. Thismakesit possiblefor _ a fixed resistance and one with ward input amplifier Opamp —IC\gandT;tofunctionasavolt- a negative temperature coelfi- ICyp adjusts the direct voltage age-to-current converter. The cient, componentoftheamplifiedinput outputcurrentflowstoearth via When the requirements are signal: theoperating point may load resistance Ry exacting, the two zener diodes be shifted with P2.Itis, for ex- Varying the values ofR,and should be temperature com= ample, possible to arrange an P, allows the amplification to pensated. output current of 4 mA for an _ be altered as required. input voltage of 0 V. The out- _Thecircuit may also be used (Dr Elrich Kunz. 914013) putcurrentrangeisthen4-20mA — asatemperature-to-currentcon- Opamp IC; and T; convert verter by making the potential the output of IC}, toa signal of divider at the input consist of 1 ANY model train enthu- siasts find the mechani- cal reversing system for trains in the HO series from Marklin and other manufacturers prim- itiveand unreliable. Thesystem isbased ona.c.motorsandame- chanical reversing assembly op- erated by a small electromag- net. The motor speed is deter mined by thetrack voltage, which canllie between 4 V and about 16 V. When the knob on the ELECTRONIC REVERSING CIRCUIT FOR MODEL TRAINS speed controller is turned fully anti-clockwise, the a.. voltage on the track is briefly increased to24 V. Ideally, this causes the electromagnet in the loco to be actuated and overcomethecoun- terforce of a small spring. In practice, this way of changing. the direction of a model train is fraughtwith dfficultiesasthe tension of the spring is a very critical factor. Innota few cases, the voltage pulse fails to actu- ELEKTOR ELECTRONICS JULY/AUGUST 1991 ELEKTOR ELECTRONICS JULY/AUGUST 1991 Resistors (all SMA0): RI, R9,RIO= 2.2 kQ R2,R3=4700 R4=4.7kO. RS=1kQ R6=10kQ R7,R8=1MQ ‘Capacitors: LT UF, 16 V (0 nF, tantalum (00 nF, ceramic C4 = 100 pF, 6.3 V, tantalum Semiconductors: ICI = 4013 (SMA) 1C2 = 4049 (SMA) BC840B (SMA) Miscellaneous: PCB 904098 (for S'reversing circuits) ate the reversing mechanism, andinstead cause theloco to hurl itself at a turnout where it is derailed. When the spring is too loose, it may happen that a loco, running at full speed, re- verses suddenly with ‘disas: trous’ results. ‘Some ten years ago Marklin recognized the disadvantages of the voltage-operated revers ing system, and came up with an electronic alternative in the form of a zener diode and two transistors, Unfortunately, this upgrade proved expensiveand difficult to fit in existing locos, which many modellers would be loathe to give up. Inall-electronic reversing sys- temsdevelopedaa few yearsago, thedirection of thelocois ‘stored ina small buttoncell. Thisisnec- essary to prevent the informa- tion being lost as there is no supply voltage when the loco- stands still. The present circuit uses a 100 UF tantalum capaci- tor to keep the control circuit powered forupto8 hours. The capacitor, in the author's opin: ion, is more elegant and envi- ronmentally safer than the bat- tery. Thecircuitdescribed below is based partly onSMA (surface- mount assembly) components, and is designed to be as eco- nomical as possible as regards power consumption. When the circuit is not actu: ated, transistors Ty and Ta are off andtheinputsofIC, abistable Type 4013, are effectively not connected. The last direction ofthelocoisstored in the bistable. When the loco runs, Ds blocks and keepsT, off, The 4049 (ICs) is supplied with about 35 V via Rs, so that the motor driver transistors, Tyand Ty,canbecon- trolled. Transistor Tz conducts and supplies ICy, with a clock pulse. When the track voltage rises to 24 V, Ty is turned on andremovesthesupply voltage fromIC2, Tris switched offand supplies the bistable with an other clock pulse via Dy and Re. The active transistor, T3 oF Ty, is changed, and the motor changes direction in a reliable manner. Since the loco motor is powered with dc. after in- stalling thecircuit, you may vail yourself of the opportunity to isolate the loco lights from the chassis and fit diodes to cou- ple the lighting to the dizection control. The construction of the circuit isillustrated in the photographs. The dimensions of the circuit board are such that it can take the place of the relay, which is carefully removed from theloco, No partof the circuit may touch the metal chassis. ‘The points marked ‘Band ‘C onthe PCBare connected to the field terminalsofthemotor,and point ‘A’ to the terminal previ- ously connected to the slidecon- tact. The slide contact and the loco chassis are connected to thebridgerectfier inputs, Finally, note that the printed - being switched off. Relay Re is then deenergized and opens the con- tact via which the alarm instal- lation is controlled. Since that contactisclosed in quiescentop: eration, a supply failure is also signalled. ‘When the cause ofthe alarm has been removed and thi stallation has been reset, alli puts return to zero volts, Ty is switched off, Tis switched on, and the relay is re-energized ‘This condition is indicated by the lighting of Ds, Since Dsans Ry are in series with the relay coil, theloadon therelay isthen slightly less, so that the relay ciraivsa smaller current. Capocitor ‘Cy ensures that at switch-on Ry and Dsareshort- circuited, guar- anteeing that the relay is ener- sized. Where the current must be kept low, the standard LEDs may be replaced by low-cur- rent types. The value of the rel evantbias resistors Ry, Ryo Ryo) VOLTMETER The fd. is extended to 10 V withtheaid of potential divider R-Ro-Ry Other ranges are pos- sible by altering the values of the resistors ‘The measured value is read from three bars of LEDs: the firstone ofthese, Dy-Dyq shows units; the second, Djy-Dag tens; andthethird, D-Day hundreds. The circuit is nulled with Py mustthenbeincreased to820. Networks Cy-Rs, Cy-Reand Cia-Rag, form low-pass filters that prevent noise voltages ac- tuating the alarm. That is im- portant, because the cables be- tween sensors and inputs may be very long. ‘Thecircuitisprotected against voltage peaks by zener diodes Dg, Dg and Dag. This makes it possible for the control voltage tobehigherthan 12 V,although regulations prohibit the use of voltages above 42 V. Diode Dy protects the circuit against polarity reversal Capacitor C) decouples the supply voltage The current drawn, depen- lent onthe relay isabout 200 mA. ‘Type 4050 ICs may be used intheIC, and IC positions, but it should be noted that these are non-inverting devices, 50 that part of the circuit action is then reversed. (M. Haas 914017) when the input is open circuit Zero here means that diodes Dy, Diy, and Dar, light. Diodes Do, Dan, and Dag, represent the figure 9. Next,a known voltage isap- plied to the input and P ad- justed till the LEDs read the correct value. Somepeoplemay findit help- ful to use a different colour for eachofthethreegroupsofLEDs. ‘unit LEDs' do not light ny one time, the cur: letousearegulated Tigh When the input voltage is Note that variations in the rent not ex: too high, the display goes out. supply voltage affect the mea- When the inputis negative, the surementadversely; itis, there- | yeu vvee TAMAYO inline Resistors: RIR2= 180kQ R3=10kQ P2= 10 kA preset Capacitors Cle 1nF Semiconductors: ICI = CA3162E, IC2=74Ls135 Di-DI0=L DII-D20=LED, yellow D21-D30=LED, green Miscellaneous: Enclosure 70x125%48 mm ELEKTOR ELECTRONICS JULY/AUGUST 1991 (Gia hci set contacts with traditional de- bouncing circuitsarenotalways usableoreconomical. Keyboard switches, for instance, seldom. have change-over contacts. Furthermore, change-over switches have one extra con nection, which can not always AUTOMATIC CYCLE LIGHTS 10 PREVENT the dynamo- driven lights of your bicyle going out when you stop in the dark for, say, traffic lights, the simplecircuit heremay offerhelp. Thecircuituses four NiCd bat teries with a capacity of between 0.25 Ah and 1.25 Ah, which are constantly changed when the dy: namo is driven via Ry and Dy Since the battery voltages rather less than the dynamo output, the lights are dimmed to a small ex- tent when the cyeleisstopped, but sn practice that is hardly notice able, Monostable IC), which has a mono time of 1 (R5-Ca), is used to detect whether the dynamo zenerates a voltage with the aid ff Ds, Raand Rg. As long is there isavoltage,themonostableholds ICyp. also a monostable, in the reset state. The relay is not ener- sized and the lights are powered BOUNCE-FREE SWITCH be accommodated in the con- struction, ‘The small circuit here oper- ates with one make contact or ‘one break contact. Which one does not matter in practic, be- cause the Q or Q output may be chosen fo invert the switch action ‘The logic level at the input of the circuit is determined by pull-up resistor Ry and the po- sition of $). The input signal goes straight to the data input Of bistable (US: flip-flop) IC},, whereitisclockedassoonasthe contact bounce has disappeared (after 05-10 ms). ss or =7ausze e2=74Lsee ELEKTOR ELECTRONICS JULY/AU wor by thedynamo, When the dynamo voltage drops, IC, isno longer triggered so that its outputs change level. This causes the reset state of ICiy, to be removed, whereupon its T input is actuated and remains 50 for two minutes, during which timethe relay isenergized andthe cycle lights are powered by the batteries. Strictly speaking, ICjpisnotes- sential, but it does ensure that the lights are switched and that the battery can not be discharged completely ‘The relayshould beatype! ‘operates faultlessly when its ply voltage reaches 4.8 V Ikis advisable to build the cr cuit in a watertight, or at least waterproof, enclosure. (U. Kunz. 914020) ‘Theclockis generatedby IC anXOR gate. Every imeitsinput level alters, this gate generates a pulse, whose width is deter- mined by Roand C). That pulse is, however, not devoid of con- tact bounce, whichis, therefore, filtered out by C2 and the out” ppt resistance of ICay. The po- tentialacrossC>issmoothed and invertedby IC before the pulse is applied to the clock input of the bistable, The result of all this is that the output signal is clean, albeit delayed by a few milliseconds. Since the bounce filter uses theoutputresistance fC, this circuit ean not be replaced by just any other type. When re- placingis unavoidable, thevalue ‘of Cz must be adapted to the new circumstances, ora resistor connectedin series with theout pat of ICa, ‘The current drain of the eir- cuitis3 mA. , Jeukendrup 914022) CHANGE-OVER SWITCH FOR C64 CONTROL PORT May reortestitusethe cold Co4 computer to play games on, but get frequently annoyed by the constant need of changing over the joystick connectors Thsisbecausenor- mally only one joystick is avail- able, whilesomegamesarecon- tolled via port land others via port 2 The cause of the annoyance may be removed by the circuit shown here, which uses eight analogue switches packaged in two Type 4066 ICs. Switch $, enables pins JOYO-JOY3 to be connected to either port 1 or port 2 The +5 V supply is derived from the C64. (A. Rigby 914012) WIEN BRIDGE WITH ASYMMETRICAL POWER SUPPLY NSRMattaWienbridge value of Rr or Cais ineressed ‘oscillatorcontainstwoiden- The requencyisaltered when tical capacitors and two identi-_the value of both capacitors or callvariable) resistors. Thatheing ofboth resistorsis changed. That the case, the transfer factor of makes it possible to vary the thebridge inFig.Lis1:3.Forex- frequency by using a dual-gang ample, when a potential of 1 V__potentiometerin place ofthetwo is applied to the non-inverting resistors. Since the two resis- input of the opamp, the output tances are then always identi- voltage of the amplifier willbe cal, the ratio Up/Us will be 1:12 BV. when C)=10C}. To ensure suf- Inmany cases,asmallertrans- ficient positive feedback forthe oscillator to start, the amplifi- cation of the opamp must be >12. With values as shown in Up/Uy= 1/14R1/Ro+C2/Cy) Fig. 1, the amplification is, from which it follows that the A=1+(Rs+P,)/Ry=13.8, factor becomes smaller if the 1, 02= watae Stability of the output volt- ageisenstired inthe traditional mannerby twoanti-parallelcon- nected diodes in the feedback loop. PresetP; isadjusted sothat the sinusoidal output voltage is just not clipped by the sup- ply voltage The frequency of the output signalmay beset between 150 Hz and 1500 Hz with Pp; higher frequencies may be obtained byaltering the values of Cy and Cy The supply voltage, which must be regulated, may lie be- tween9 Vand 12 V, When the oscillatorisnotloaded, itdraws acurrent of about 6 mA (1. Ruffell 914007) Resistors: RIR2=1kQ R3=4,7kQ R4= 109 RS = 10k R6=470 PL=47kQ preset P2= 10kO, dual-gang linear preset Capacitors: C1 =33 nF (2 =330nF C3, C5 = 47 pF, 16 Y, radial 10 BE. 16 V, radial C7 = 100 uF, 16 V, radial Semiconductors: DI, D2=IN4148 IC] =LM386N-4 TIME DELAY WITH ONE 555 ELEKTOR ELECTRONICS JULY/AUGUST 1991 Mie electors re: quently require the brief delay ofa pulse. Such a dela herebetween100 sand 100 s, is easily provided by a simple circuit based on the popular 555. Thatismorethan adequate for most applications. The output of the 555 can go high only if the potential at pin drops below a third of the jevelofthesupply voltage, pro- vided that the level at pin 4 is high. In quiescent operation, the level at pin 4 is low and Cy is charged via T;, so that the output is low When the input goeshi is switched off and Cy is charged via Ry. In that condi: tion, the reset state is cancelled, and after a time delay that de- pends on the state of discharge fC; the output of the 535 goes high. Thetimedelay inseconds iscalculated from =0.69R:Ci, where R, must be greater than or equal to 10 k2. dis- S.Bolt 914024) SWITCH FOR CENTRAL-HEATING PUMP 3 irs a snaoot HE PUMP in some central- heating systems has two or even three speeds. At the low est speed, not much hot water is pumped around the circuit and this may resultin theboiler overheating. The switch circuit proposed here preventsthat hap- pening, The electrics of the pumpare as shown in the diagram. The main winding is normally 1750 and the auxiliary windings 1350: these values may, however, be different in certain pumps and this should, ofcourse; be checked ‘The capacitorin series with the windings provides the nect sary phase shift that enables the motor of the pump to ro: tate. In positions @ and b, the impedanceisincreasedand this results in a weaker field so that themotorrunsmoreslowly and the pump displaces less water. A simple circuit enables the automatic switching between and b or between Band c. Its 24-V input is parallel with the rive of the gas valve of the ‘main burner. When that valve closes, the speed ofthe pumpin- creases and the boiler can not overheat Ifthe installation usesa240V drive for the gas valve, a small transformer may be used to ob- tain the 24. Onasajety note, bearinmind thatthe24Vsuppiy which reaches thethermostatsinvariousrooms, isinsulated fromthemainsonly by therclay. Therefore, thatrelay should be a heavy-duty type that provides adequate insula- tion IK. Walters 914023] KEYBOARD CHANGE-OVER SWITCH FYOUhaveanon-qwerty key- gare and would like to use this with your computer with- out having to relearn where the deviating keys are, this simple circuit will help. Itreceives two keyboards on Kz and K; re- spectively and connects these via switch S; and connector Ky tothecomputer. Check thekey- board connectionsat your com: puter, because some PC com- patibles have a slightly differ- ent pin layout. The connection between thecircuitand thecom- puter is via a standard 5-way DIN cable; you can, of course, make your own cableas shown at the bottom of the diagram (Ky and Ks). SwitchS} isa fourpolechange- over type, either rotary or tog. gle. Since the supply line is switched also, the additional keyboard does not increase the load. The additional LEDs that indicate which keyboard is in circuitincrease thecurrentdrain by about 10 mA. So much for the hardware; now forthe software. Whatever keyboard you connect, the codes it generates do not change. Advising the computer that a different keyboard layoutisused isthe task of the keyboard driver In MSDOS versions up to 3 this Griveriscalled KEYB?2.COM, where in place of the question marks an abbreviation for the ELEKTOR ELECTRONICS JULY/AUGUST 1991 relevant country is given Normally, thecorrect version of this programis executed in AU, TOEXEC.BAT,afterthechange- cover you have to start the pro- gram manually. From version 3.3 onwards, there is the file KEYBOARDSYS (and in some old versions), KEYB??SYS),and then you have no choice but to restart (alt-ctrl-del) the com- puter every time the keyboard hasbeenchanged withasystem disk in drive A on which you have stored the relevant data in CONFIG SYS and pass these to KEYBOARD SYS. Alterna- tively, youcaninstall thecorrect KEYB?2SYS. (. Ruffell -914016) PRESETTABLE SHUNT REGULATOR EPENDING onits location, linear voltage regulators are arranged traditionally into twosub-groups seriesand shunt (or parallel) regulators, In practical circuits, series regulators, particularly the pop- ular integrated typesinthe78xx family arenormally used, since these give good regulation and allow a reasonable output cur rent Nevertheless, good shuntreg- ulatorsarealso becomingavail- SVv/15mA able, for example, Texas Instruments’ Type TL431. The commercial version of this, the TLABIC, offers excellent tem- perature stability and very low dynamicimpedance(see table). Although shuntregulators usu- ally function in the same way as a zener diode, the TL431C offers a facility that no zener diode does: the zener voltage may be set anywhere between 25 Vand 36 V with the aid of two fixed resistors. To function properly, thedeviceneedsacath- odlecurrentof notlessthan mA, The voltage across the IC is thenUae = 2-5(1+R2/Ry)- If the values of Rp and Ry are not too high, the current through this reference network is negligible (<4 pA). ‘A possibleapplicationof the deviceisthecompact5. V power supply shown in the diagram, UJ. Ruffell 914018) SOME TECHNICAL DATA Cathode voltage, Us, 25 V-36V Cathode current, Jet 150 mA (I-A min) ajuensieak Power dissipation (at25°C) 775 mW. Dynamicimpedance 05 @ typical 0.2 a) swore ‘Temperature coefficient 30 ppm K+ COMMUNICATION BUSES HERE ARE nowadays so connecting audio and video _ ily for use in control system information, many different standards for buses and networks that it ‘was thought useful to present an overview ofthemosteurrent types. Note thateach bus needs suitable software to transmit dala Forinstance, the well-known Ethernet network operateswith Novell and Lantastic Ethernet and Thin-Ethernet buses are intended for use as a LAN (Local Area Network) be- tween computersand comput- ers or between computers and ‘peripheral equipment like print- ers and plotters. The Integrated Service ‘Terminal (IST) bus is used in LANs for offices. It complies with the ISDN norm. It is in- tended forcommunication with telephones, view phones, com- puters, and alarm systems, The Domestic Digital Bus (028) bus is intended for inter- EKTOR ELECTRONICS JULY/AUGUS equipment. Itis found on most up-to-dateradio tunersand tele- vision receivers. ‘TheController AreaNetwork (CAN) bus is intended primar- a noisy environment (itis, for instance, standard in the new Mercedes-Benz S-class of ears). Itneeds only two wires for the distribution of power and in- name of | max length] kind of [data | typeot network | inmetres | informatior| format connection Ethernet Thin, ‘coax cable 1 coax cable wires Swires 2 wires 2wires wor The Futurebusisa new stan- dard for parallel processing of data within a computer. Path widths vary from 32 bits to 256 bits. A number of processors can exchange data at very high clock speeds along these paths. The Inter ICSouind (1°S) bus is designed for the exchange overshorl distancesonly of dig- italaudio(1o-bitstereo) between ICs in a digital audio system, ‘The data are transmitted seri ally. The Inter IC (FC) bus is also designed for communication between ICs.Ithandlesnotonly data, but also commands. In contrast to the [2S bus, the I2C bbusis fairly slow and not suit- able forthe rapid transmission of large quantities of data (AN.Other 914025) MEASURING ELECTROLYTIC CAPACITORS ‘OST capacitance meters, have no facility for mea- suring large electrolytic capac itors. The circuit described here makes it possible for such ca- pacitors to be measured with somedegree ofaccuracy,inspite ofthelargetolerancesthesecom- ponents normally have, Opamp ICj, is arranged as anastable.CapacitorCyischarged vvia Ry; as soon as the potential across it reaches the level af that at the non-inverting input of IC), which is determined by voltage divider Ry-Ry-Ry, the ‘opamp toggles and C2 is dis- charged till the voltage across it reaches the new level at the + input of IC. The measuring circuit con- sistsof switched resistors Re-Ro, and Sy, Rig, Py and P>. The ca- pacitor on test is charged via ‘Tp and discharged rapidly via nh Comparator ICjy compares LEPHONESarenow read and cheaply available: two identical ones and a hand. fulofcomponentsenableasim- plehouse telephone tobesetup. Since the two telephonesare connected in series as shown in the diagram, half the supply voltage exists across either of them. Neither buzzer willsound, since the potential across zener diodes Dj and Dgishelow their breakdown voltage. If, say, the handset of tele- phone2islifted, a virtual short Circuit ensues across this tele phone. The potential across tele phone I then rises to almost the supply voltage. Breakdownthen occurs in Dj, which causes a sharp increase in the reverse current through the diode. The buzzer will then sound and the LED light. If then the handset of telephone 1 is lifted, the sup. ply voltageisagaindivided sym- metrically across the two tele phones, whieh is sufficient for carrying out a conversation The buzzers may be contin- tuous-tone or intermittent-tone types to personal preference. Similarly, the LEDsmay bestan: the level (0.65 V) atts non-in- verting input with that at its inverting input. When the ca- pacitoron testisconnected across the input terminals, Py is ad justed tll the LED just lights. ‘Thepotentiometer mustbegiven a scale to enable the value of the electrolytic capacitor to be read directly. The scale can be calibrated with the aid of a ca- ppacitor of known valuefor each Tange (I-47 wR; 47-47 UF; 47-470 wR; and 470-4700 UF). Basically, itis linear, but it may be necessary to make a scale for range 1 empirically. ‘To ensure the best possible accuracy, itis advisable to use a regulated power supply. The circuit drawsa current of about 20 mA (almost all of it through the LED). @ ck 914015) HOUSE TELEPHONE dard or flashing types. ‘The power supply may bea standard 12-V mains adapter. When the supply voltage is too high, the buzzers will sound even when both handsets are lifted. If dissimilar telephones areusex,onearboth zener diodes need to be replaced by differ- cent types to ensure that during quiescent operation the volt” age dropsactoss thetelephones re identical (A.Jodicke 914028) ELEKTOR ELECTRONICS JULY/AUGUST 1991 DARKNESS-SENSITIVE SWITCH HECIRCUIpresentedhere and Ts are on, the LED in the be on only when itis dark. Ry and the transistor switches enablestheaulomaticswitch- relaylightsandlamplyispow- _ Thebase-emitterjunction of on, The counter can then count ingonofoutsidelighting when ered. Assoonasoneofthetran- transistor Ty is also connected _ the pulses of its intemal oscil itsgets dark and, what's more, _sistors switches off, the lamp in parallel with Ts and it, too, lator, while the lamp remains itdoes so for a predetermined will go out. will therefore be off when itis on. When, after a short time, period. A new period can be Whether Ts is on depends light Thiscausesaconstantreset output QI3 goes high, transis: begun only when it has been on phototransistor Ty. If light on IC;,allofwhose counterout- tor Ty switches off. This causes light again falls on to this, itis switched puts are then low the LED in the solid-state relay The switch is a solid-state onandremovesthebasecurrent Assoon asit gets dark, base toquenchand thelampgoesout relay. From the instant that T,fromTs,Inother words, Tscan current for Tis provided by Since at the same time the os- cillator is stopped via Ty, Q13 remainshigh. Thisstateismain- 220 tained until it gets light again and IC; js reset, whereupon a new cycle can be started. Seiies The period the lamp is on may be set to between I and 5 hhours with Py Dia No special transformer is needed for the power supply, which may be derived direct we from the mains. Diodes Dy-Ds rectify the mains voltageand the result is smoothed by Cy. Capacitor Cs operates as a re- cuit: great careshould be taken to insulate the switch unit ade- vest quately (A. Rigby 914031) SWITCH-OFF DELAY FOR BATTERY SUPPLY FREQUENT annoyance mentisthatjustafteryouswitch is flat. Quite probably, the last thecycle. Attheendofthecycle, swithbattery operatedequip-iton you notice that thebattery user(you?)hasforgotten tosuwitch T, is switched off and provides itoff. Thecircuitdescribed here no more eneng makes sure that this will never _Theon-time,t,isdetermined happen again. A touch on the by button, 8}, is sufficient to let the equipment work fora pre- f= (Py4Ry)C3 seconds. determined period only. An interesting featureofthe The maximum current circuit is that its quiescent cur- switched by T2 must not ex- rent is 0.00 mA, because Ty ceed 350 mA. switchesthetimeroffcompletely The supply voltage may lie attheendofthecycle.Switching between 5 Vand 15 V. oniseffectedbytheenergycon- The minimum trigger am- tained in the power-on pulse. plitude is 5 V. When; is pressed, the supply _Theswitch-offtimewith com. voltageisavailableimmediately ponent values shown in the di across Ca. Because of the dif- gram is 1-100 seconds. ferentiatingactionof Ro-C2,the The current drawn by the supply voltage is briefly con- circuit during the switching in- nected tothe V+ inputofIC; via terval isabout 4 mA when the Dj. This energy is sufficient to supply voltage is 6 V. enabletheICandstartthetimer, whereupon T; is switched on (J. Rusfell 914036) This transistor provides energy to the IC for the remainder of ‘ELERTOR ELECTRONICS JULY/AUGUST 1991 AUTOMATIC BATTERY CHARGER HE CHARGER described switches off the charging, voltage whenthebattery reaches its full nominal voltage and switches it on again when the battery voltage drops below a predetermined level Part of the battery voltage is taken from across potential divider R\-Ro-Ry-R, and com- pared with a reference voltage in ICzp. As long as the battery voltageisO V,onlyasmall volt- age drop is caused across Rs by theinput current of the opamp, so that IC. toggles at 0 V. The relay therefore remains de-en- cergized. At the same time, the output of [Cap is high, but this has noelfect whatsoever owing to AND gate Dy-Ds Whenabattery isconnected, its small remaining voltage en. sures that IC. toggles, diodes Dj and Ds are reverse-biased, a reference voltage is applied to the non-inverting input of ICa,and therelay isenergized. The battery isthen charged until itsvoltagehas reached the nom- inal level. Because of potential divider Ry-Ry-Ry-Ry, there is a voltage of more than 3.45 V at the inverting input of Ca, which causes this opamp to toggle so thatits output becomes low (0), the relay is de-energized, and thecharging voltageisremoved from the battery. ‘Thereference) voltageat the ‘output of IC), is set t0 3.45 V. Potential divider D3-R¢-Ry-P provides a certain hysteresis to ‘comparatorIC2y. When thebat tery voltage drops below the level set with Py, ICx, toggles again and the charging voltage will be reapplied to the battery. Calibration iscarried outwith a voltmeter connected to the ‘output of [Cr,, after which P2 should be adjusted for a read= ing of 3.45 V. Next, turn P; to full resistance. Replace the bat- tery by a regulated, variable powersupplyandsetitsoutput to6.2-64 VG; inposition 6 V) or 12.4-12.8 V (5; in position 12V), thatis, the vollageat which charging should commence. Adjust P; ill the relay is ener- ized, (K. Walters. 914019) Ao | AUTOPOWER OFF FOR AUDIO EQUIPMENT HIS LITTLE circuitswitches off the equipment in your audio rack when this has not produced sound for some time, Thecircuitisactuated by press- ing $1, which causes capacitor C; tobe charged. Next, the out Put of opamp ICjp goes high and theaudioequipmentis pow: ered from the mains via solid- state relay ISO), ‘The LINE OUT signal from the audio power amplifier is fed to the input of the circuit via connector Ky. Opamp ICi, is set up to function as a signal detector with a trigger thresh- old of about 50 mV. Note that theground potential oftheaudio ampliferistaisedtoabout +45V in the auto-power off citcuit by means of Ri-Ro-Rs. When theaudiosignalisgreater than50 mV (ie,4.05 Vwithre spect to the circuit ground), the output of IC goes high, and transistor T; Starts to conduct. Consequently, C; fs charged rapidly, so that ISO; continues toconductand power theequip- ment. In the absence of an audio input signal, Cy is discharged slowly via Rs and Ry, Opamp ICyptoggles and theequipment is switched off via ISO, when thecapacitor voltagedrops below the voltage set with P; at the inverting input. It should be noted that the solid-state relay specified here has a maximum current rating of 15 A. When heavierloadsaretobeswitched, itis recommenced to usea con. ventional relay. Since the relay outputs and the transformer primaryarecon- nected to the mains, great care ELEKTOR ELECTRONICS JULY/AUGUST 1991 should be taken toensurethere {quired electrical insulation. For reasons of safety, the circuit is bestfitted inamainsadapteren- closure with a moulded mains plug. The two mains connec- tions in the enclosure must be made with properly rated and secured screw terminal blocks. The output is connected to a mains cable with a 4- or 5-way distribution board. The delay before the equip- ment is switched off will de- pend on the time needed to rewind a tape, change a com: pact disc or record, etc. To ad justthedelay,connecta 100 ke resistor across Rs, This reduces the actual delay by a factor of about 10. Turn P; fully in the direction of R,, press the START button,and waitfor thedesired delay (divided by 10) to elapse, whereupon P; mustbeadjusted until the output of ICyg goes high. Then remove the 100 kQ resistor, press START againand time the actual delay. If neces- sary, re-adjust the preset. (TP, Thomas 914063) WINDSCREEN WASH-WIPE CIRCUIT Semiconductors: DI, D2, D3= IN4148 Tl =BCSs0C 72 = BCS60C T3=BDI40 Miscellaneous Rel = 12.V relay for PCB mounting, 2>9022, contact rating >10.A NMANYoldercarsthewind- screen wash pumps not cou pled to the windscreen wipe function. This circuit switches on the wiper motor for a pre- determined time each time the ELEKTOR ELECTRONICS JULY/AUGUST 1991, pump is actuated. The wipers tart to work when the pump switch is pressed, and keep on workingawhileaftertheswiteh is released. Theanodeof diode Dis nor: mally taken to ground via the wash pump motor. When the pump is powered, C; charges rapidly via Dy and Ry Consequently, Ty, Tz and T3 are switched on,and relay Reisen: ergized. Cy ischarged as longas thepump motorand thewipers te. When the pumpswitch, is released, the washing stops, but the wiping continues for a timedetermined by RCo. Diode Dy prevents Cobeing discharged via the pump motor. Diodes Ds and Dsprotect the circuit against back em. from the relay coil Installing the circuit in a car should be easy ai three connecting points (apart from thesupply voltage). Note, though, that the circuit is de- signed to work with a pump ope motor that has a fixed contact to ground, while its positive contactistaken tothewashswitch The relay on the board is pable of switching 10-20 A. Its contacts are connected across the wiper switch via terminals ‘A’ and ‘B’ by means of heavy- duty wiring. Theconnectionsto the board are made via spade terminalsand mating socketsas used in car electrical systems Thespadeterminalsarescrewed directto the board, and soldered to minimize the contact resis- tance. Finally, the relay may be an Omron Type G2L-113P-4S- ‘SVoraBosch Type0332016 101 ‘Theomron type fitson the PCB, the Bosch type does not. (L. Rikard 914009) N MANY countries, unlike most of the UK, itis still not possible to parallel twoor more telephones easily. Thecircuitde- scribed here may either be con. nected in parallel to an exist- ing telephone or be used as a stand-alone unit, when it will energize a relay on receipt of anincomingcall. Therelaymay be used to operate an optical or an aural indicator, or cause a trigger pulse to be generated thatactuatesaninterface, which in turn operates a suitable tele- phone. The incoming a.c. signal is applied toterminalsaandb and from there fed to optocoupler IC; via and Ry. Thenegative half-wavesarereturned via Dy, while the positive half-waves are returned via the LED in the optocoupler. The resulting pul- sating d.c. output of the photo- transistor in the optocoupler is, applied to inverter ICa,. This (call signal is smoothed by Da, Ry C2 and Rs, and this results in a direct voltage at the input of IC. during the pulse spac- ing, Theconsequent low- level, short-duration pulsesatpin6 of IC are passed to inverters ICag-ICoy that serve as relay drivers, and whichenergize the relay (preferably a high-resis- tance type). Diode Ds indicates the state of the relay. The cir- cuit thus functions asa monos- ELEKTOR ELECTRONICS JULY/AUGUST 1991 table whose time constant is formed by Ry-Cs, ‘When bothSand S;areclosed, C3 does not produce a pulse from the direct voltage output of ICa,. The low-level potential then remainsat theinputsofthe relay drivers to ensure that the relay stays energized in thiscon- dition. When is closed instead of Sy therelayisenergized during, the pulse widths and de-ener- gized during the pulse spac- ing, This mode of operation is best for optical call indicators, The power supply may be a simple 12-Vmainsadapter. Diode Da protects the circuit against incorrect polarity. Higher sup: ply voltages makea 12-V regu- lator (IC3) and an additional electrolytic capacitor (Ce) nec essary. Thecurentdrawnby the circuit is only a few mA. It is advisable to check with your telecommunications au- thorities whether the circuit is allowed in your locality before building it (M. Haas 914039) TEMPERATURE-COMPENSATED CURRENT SOURCE ‘ATIONAL Semiconductors LM334Z is a three-pin pre- settable current source, whose ‘output may be set to betwe HA and 10 mA. It may be also be used floating, Inprinciple,justoneresistoris, needed for setting the current However, the current is then strongly dependent on tempera turbot 4030% °C. (This would enable the device to be used as a temperature sensor). Therefore, tooblaina stable current source, anadditional esistoranda diode are needed For good stability, the diode must be coupled thermally to the IC (the self-heating of the source Isthen compensated). Thisisbest done by squeezing the IC and thediode, separated by heat paste, Into a piece of insulating sleev ing shown in Fig. 2. Although the current source may be set between 1 And 10 mA with the aid of R,, itis most accurate between 10 A and | mA, The current provided by the source may calculated from 1,=2/15R, Resistor Rj should havea value of 10R, Setas described and with good thermal coupling between Dy and IC;, the prototype showed a tem: perature drift of not greater than (002%C2 with , <1 mA. Thelangest drift measured, 0.08%°C-I, oc. curred at I, = 5 mA. All mea: surements were carried out with a supply voltage of V G.Rufiel! 914032) S-METER FOR SHORT-WAVE RECEIVERS OME radioamateursare very keen onaccurateRST reports, others (mostly the VHE/UHF fraternity) never look at the S- meter on the receiver, and are satisfied aslongasthey canhear the other station. This circuit is for the first group, Traditionally, oneS-pointcor- responds to a 6-dB increase in signal strength, while $9" is de- fined as 50 UV into 50 2. ‘Unfortunately very few receivers these days have calibrated S- ‘meter, hencethe confusion among radio amateurs about the in- terpretationof thesignalstrength reports they exchangeand write on QSL cards. Thelogarithmic-to-linearcon- verter contained in the NE604 from Valvo (PhilipsComponents) isused hereto buildanaccurate S- (signal strength) meter for short-wave receivers. The am: plifier in the NE604 is tuned to theintermediate frequency (IF) ofthereceiver with theaid of L1 and C>, Here, the circuit is di- mensioned foran IF of 155_kHz, which is applied to input ca- pacitor Cy Theoulputof thetield strength detector in the NE604 supplies a current of 0 to 50 BA at pin 5. This current is converted into a voltage of 0-5 V by a 100 ka. resistance, R;+Rs, Notethattwo ELEKTOR ELECTRONICS JULY/AUGUST 1991 Eo6-series 1% resistorsareused here, plus a diode, Dy, instead ofa single 100 kM zesistor. This is done to compensate temper ature effects which would cause derating of the linear output voltage. Ifthe specified E%6 re- sistors can not be obtained, R; may be replaced by a parall combination of two 120 kO 1% resistors, and Rs by a parallel combination of a 39 KO 1% re- sistor,and a 1 KO 1% resistor It should be noted that the usable rangeof thelog,to-inconverter in the NE604 is roughly from 5 WA to about 40 WA of output current, corresponding about 7048, or 05 V to 4 V at pin Of1C;.The lowerleveliscaused by background noise of the IF amplifier in the NE6O4, and the upperlevelby limiting and sat- uration effects, Fortunately, the effective range of the converter i large enough for the present applications, bearing in mind that S-meterreadingstowerthan Ss are rare and of litle mean- ing inthe short-wave bands, ‘Components Ry, Cy and Cp supmesnpplendraise arp isset to provide unity gain, ice, its output voltage is 0 to 5 V. The moving-coil meter is connected between two presets, P, is adjusted until the meter reaches full deflection ata volt- ageat 45 V measured at pin 6 of ICp. Next, adjust it for an in- dicationofSswithan RF testsi nal of 50 pV applied to the re- ceiver input. As usual with S-meters, the meter is supplied with a com- R2 = 60.4 KO (E96 - see text) R3 = 40.2 ko (E96, see text) Ra, R5=1 MQ. R6=2.2kQ PL = 10 kO preset H P2= 500.0 preset H Capacitors: Cl=10nF C2=12nF (C3, CCT, C9, C13, Cl4= =1000F (C8 =47 UF, 16 V.radial Cl0=4,7 nF CU, CI2=1 nF Semiconductors: Di =IN4148 NEGOJA CA3 1308 Ica Miscellaneous: $1 = on-off push-button Li = 10 pl choke, axial =MC meter, Lm, pensationcurrentthat prevents any needle activity below S3 or so. Here, thiscompensation cur- rent is set with preset P3, The buffer opamp, IC, is not used for this purpose to keep thecir- cuit as simple as possible, On- off push-button 5; is optional and intended to save battery power in portable receivers. (A. Heinrich 914050) SYNCHRONIZATION SEPARATOR Tiiscisutiormstnemising link between various video sources and, say, a multisyne monitor. Based on discrete parts only, it extracts the composite synchronization (ie, a mix of the horizonal and the vertical component) and the vertical yn chronization froma composite video signal withan amplitude ofabout Vip. The output sync signals are Svailable in true as well as inverted form to suit ‘The positivecomposite video signal is filtered by Ry-C> and clamped by a Schottky diode, DD, to extract the syne compo. nents, The CSYNC signal is fed to XOR gate N2 which fune- tions as an inverter when 5} is closed The CSYNC signal is also fedtoatwo-siagel-Cfilter which presses the line syne com- ELPKTOR ELECTRONICS JULY/AUGUST 1991 330 pF 10 UF, 16 V, radial 47 UE, 16 V, radial 33nF Miscellaneous: LI, L2 =47 mi choke, radial K1_K2, K3=phono socket for PCB mounting 81, S2= miniature on-oft PCB Type 914077 SEQUENTIAL CONTROL ELEKTOR ELECTRONICS JULY/AUGUST 1991 Gpecuentiat contro are used vherecontinuousremotecon: trolof mechanical installations, such as rotating antennas or valves, isrequired. That shown in the diagram offers a setting accuracy of2.5%althoughit has only a few components. The control motor is tn se- ries witha bridge rectifier across the secondary of mains trans- former Trp, The rating of the transformer must accord with thatofthe motor. Theothertwo mains transformers are light- duty, 12-V types from across ‘whose secondary a small alter nating voltage may be taken by means of P; and Ps, ‘The wiper of P; isconnected to the gate of T; via resistive network Ry-Rs, The wiper of Py s connected to the source of Ty. The source-gate junction of the transistor serves a a null point detector. When the cir= uit is balanced, the potential difference between the two wipers iszero,sothatT isswitched off. No current can flow through themotorsincethecurrentloop ponent and leaves the raster sync, VSYNC, at the inputs of opamp ICIb. Like CSYNC, VSYNC is available in true or inverted form, The circuit draws about 200 1A at a supply voltage of 5.V.Theoutputsignalsare TTL compatible. (). Baretord 9140; thewupis te reir Beige brokenforeachhalfeyce Wien theo the potenlonitesiaad justed, the crett ino leer balanced and, isswitched on during either the positive or esate Welt pag. pending on Which oF he po- Tentiomiters” was, adjusted Cement then Hows through the Tot Dy an ortheough themotor Dy Tyand Ds Inother ward, the motor can ote titer direction. If te motos coupled mechanically with Ps P thay be wed for remote con folate ner tended for 12 motors fl fovent motors wre Be osed, bent ine that they axe og erated rom half waverersised voltages, hich means that transformer must be ate at 132 Umes the motor voltage (G.Peltz 914045), LTHOUGH therearea mum ber of ICs on the market with which itis quite simple to ‘constructan LED VU meter, there is still interest in building such a meter from discrete compo- nents. The meter shown in the di- agramisbased oneightopamps, contained in two Type LM324 chips, that function as com- parators. ‘The inverting input of each ofthe opampsis provided with reference voltage derived from potential divider Rs-Rio. The vValuesof theseresistorsarecho- sentogiveaS dBstep between adjacent resistors. Resistors Ry and Ry2 ensure that the refer- ence voltages are higher than half the supply voltage. ‘The non-inverting input of eachopamp issupplied withthe rectified input signal (D, and D2), whichisalso superimposed ‘on to half the supply voltage. When the voltage level at the positive input of an opamp rises above that at the invert- ing input, the output of that ‘opamp goes high and the asso- ciated LED lights. The higher THE charge-discharge-idle (C-D-Dmonitor described here is suitable for all vehicles with a I2-V or 24-V battery of which the negative terminalis connected to the chassis (point Bin the drawing) ‘Thecurrent drawn fromthe battery is measured by moni- toring the voltage drop across the heavy cable between the negative terminal of thebattery, and the chassis. Usually, this cable isextended to theengine {pointC). The positive terminal is usually connected to two ca- bles, a solid one to the starter motor (point A) and a thinner ‘one to the ignition switch Two LEDs fitted in the car interior indicate whether the battery ischarged ordiischanged witha significant current, pro- viding a reassuring check on the generator function. A third LED is provided to indicatea LED VU METER theinputsignal, themore LEDs will light. If Ds and Dg are red, thecircuit may beused asa sim ple peak indicator showing when the input signal exceeds a cer- tain value, The supply may be between 10 Vand 15 V.Thecurrent drawn from it depends largely on the ‘number of LEDs that light itis not more than 160 mA at 10 V and 110 mA at 15 V. (M.Stehouwer 914076) vevyoe = Lane CAR BATTERY MONITOR ELEKTOR ELECTRONICS JULY/AUGUST 1991 kind of neutralareain which the battery is only lightly changed or discharged, The circuit is essentially a window comparator based on ‘opamps, The voltage drop that exists across the chassis cable of the battery is fed! to resistor Rj, which forms part of a mea suring bridge consisting of Ry- Ro-RyRy-Py. The small Voltage unbalances the bridge, and is amplified 100 times by opamp IC, which is wired as a non- inverting amplifier. In practice, input woltagesassmallas +25mnV! or -25 mV are detected reli- ably by the balanced bridge The output voltage of Co controls a window comparator built around ICyy and Ie. The LEDs at the opamp outputs in- B paren dicate whether the battery is charged (D3 lights), discharged (Dg lights), or is in a “neutral state (Ds lights), The two positive feedback networks associated with IC, and IC3. are decoupled at the output oF IC, by Ry and Ry to ensure that the hysteresis of the window comparator does not affect the reference voltages sup- plied by Ry-Ry-Rjo,linecessary, Rymaybemadesmaller tomake Resistors: RI-R4, RO, R7=1.2kQ RILRI2 Ri3= 1200 10a Ris = 68.0. 2500 preset H 7 KS preset H Luk 10V 00 nF Semiconductors: 7805 M324 N4002 IN4I48 ELEKTOR ELECTRONICS JULY/AUGUST 1991 the ‘idle’ (neutral) rangesmaller. “Thefixedesistorsin thebridge must be close tolerance types ‘mounted such that they are in thermal contact with each other. ‘The circuit has an internal powersupply based on the ubig- uitous7805 three-terminal volt age regulator: The regulator re- quiresa heat-sink only when the circuit is installed in a vehicle with a battery voltage higher than 12 V. Adjusting the circutisstraght- forward. Start theengineand et itidle Set preset Ps to mid-travel Next, adjust P until the ‘idle’ LED, Ds, lights. Carefully read- just Ps until IC2, supplies an output voltage of 25 V. Rev up and check that the ‘charge’ LED, Dj, lights. With the component values shown here, the circuit will in dicatea charge ordischargecur- rent greater than about 1.5 A, which corresponds to 18 W at a battery voltage of 12. V Suggested colours for the LEDs are green forD, (change), red for Dg (discharge) and yellow for stile). Alternatively, thechang and discharge LEDs may be tri- angular types which can be fit ted to point np and down re spectively, The ‘idle’ LEDisthen a rectangular type fitted in be: tween, Finally, (he circuitdraws about 30 mA when connected toa 12-V system. (L, Rikard 914014) VARIEGATED LED HEN the control voltage atthe input of the circuit is varied from0 V to +12 V, theLEDwill firstlightup green and then gradually, via orange and yellow, turn to red. The two sections of the bi colour (red and green) LED are drivenseparately: the green one by IC, via Ry, and the red one by IC jp via Re Opaip IC}, has an ampli- fication of <2, which results in thered LED lighting from input vollagesofaboutt)5V. This see tion lightsat maximum bright ness when Ujy>U,/2. Opamp IC), is an inverting amplifier withanamplification of2. Moreover itsnon inverting, inputisatalevelof Liy/2. Whe theinput voltage-C, havea ratio of 1:10. With values as shown, theperiod of thesawtoothin the upper position of the switch can be set between | ys and 6 tts; periods below 1 is can not be obtained. The circuit as shown draws acurrentofabout7.5 mA from the 5-V supply. The negative supply is not critical and may be between 5 Vand 12 V. (GJ. Knopper 914066) sistors ‘break down’ ina stable mannerat a lower current than zener diodes). The probe allows measure- ment of alternating voltage. The maximum input volt- age is highly dependent on the dissipation allowed in Ry. For example, when this resistor is 05 W type, the input voltage may be as high as 200 V rms. The current drawn by the circuit depends on the number of lighting LEDs: it is not more than 10 mA at a supply volt- age of 3 V.In quiescent opera- tion, thecurrentissolow (about 5 WA) that an on/off switch is not necessary (1. Giffard 814071) SLAVE FLASH TRIGGER HE circuit in the diagram intended forsynchronous, wireless triggering of one or more slave lash units when the mother flash is triggered, so as to obtain better lighting of the photographic object PhototiansistorT;isswitched ‘on upon the receipt of the light of the mother flash unit. The potential atthe inverting input ‘of comparator IC), rises, the comparator toggles and for a brief instant, determined by the value of Cy, the voltage level at the inverting input of ICyy is lower than that at the non-in- verting input. This causes IC, to toggle momentarily, which results in the thyristor being triggered and the flash contacts to be closed The circuit may be used in dark as well as in brightly lit places. Theoperating rangede- pends on the mother flash and ‘willnormally be5-15 m (15-50) ‘Thesensitivity depends primarily on the base resistance of the phototransistorand this maybe modified! according to circum stances. Any tendency to insta bility may becuredby shunting Ry with a 100 pF capacitor. Power is supplied by a 9-V (PP3) battery. (H. Dopiner 914057) BINARY LOGARITHMIC LADDER NETWORK THE network provides anat- temuationbetwoen0 dBand 7875 dB that is presettable in ‘64 stepswith the aid of a 6-bit code Six independent, relay switched attenuator sections may beconnected inseriesin ac cordance with the input code Since the sections have identi- cal 1 kQ impedances, they do not affect each other and can, therefore, beinterchanged with- ‘out any problem. The only re~ quirementisthat thenetworkis terminated correctly, here by Rao, The fairly low characteris- tic resistance of | kQ was cho- sen to keep the noise generated by the attenuator low: Buifering of theattenuatoris effected by a Type NE5532, an ICthatoperatesetfortlessly with a 1_kinput impedance ‘The use of relays in the vari- cous sections ensures that there are no linearity problems with switchingelements. Furthermore, relays make it possible for the conirol circuits and the attenu- ator to be electrically isolated. ‘The relays are driven by a transistor,so that the control in- puts require relatively little en- ergy: even a simple logic cir- cuit (TTL or CMOS) can switch, the relays in this manner. The signal-to-noise ratio of theattenuator, withcomponent valuesasshownin the diagram, is 92 dB (A-weighted even 107dB), provided the input sig nalisnotsmallerthan? Vems. ‘The maximum input voltage is 7 Vrms. Total harmonic dis- tortionat frequencies upto 20kHz is not greater than 0.003%. The current drawn by the circuit depends prim arily on the re- lays: in the prototype it was about 120 mA. (1. Giffard 914075) ler =nessae THE timer is intended to ac- tuateanapparatus fora pre- determined period of time, for instance, an ultra-violet expo- sure unit ora photographic en. larger. Periods may be set be- tween 0.1 s and 999.9 5, ‘The periods are set with the aid of thumb wheel switches and stored in four Type74HCT190 counters, ICy-IC;. Setting is fa- cilitated by the set times being UNIVERSAL TIMER displayed instantly on the LED display. After the start button has been pressed, the inputs of the counters are disabled and the count down starts. At the same time, relay Re} is ener- gized. In quiescent operation, the contacts of Kaare inked to those of Ki. Since Kis connected to the mains, the load connected across Ka issupplied with mains voltage;thereisno voltagesup- plied totheload connected across ks. When Re; is energized, that is during theswitch-on period, the mains voltage is switched fromK; toKy. Atthe end of the switch-on period, a buzzer in thecollector circuit of; sounds. Inan emergency, the switch-on period may be prematurely ter- ‘inated with theaid ofthestop button When the switch-on period isover, oscillator Cy isdisabled and the relay is de-energized. ‘The preset periodisthen shown on the LED display again, Power for the clock may be provided by a simple 300 mA. mains adapter combined with a Type 7805 regulator. (A Rigby 91404) =a ELEKTOR ELECTRONICS JULY/AUGUST 1991 ‘OTOROLA'STypeTLC2201 low-noise preesionopamp is probably not the best-known amplifier made in LinCMOS technology, but its certainly a very interesting and useful de vice. Apart from a noise figure of 18. nV VHe-1, which is low for opamps, the chip also has very good dic. characteristics. The JFET inputs have an off set of only 100 V, while the temperature coefficient is 0.5 w K-1, Until not so long ago, such specifications were possibleonly inamplifiers with bipolar inputs. Thecombination of low noise good static characteristics and common-moderange thatex- tends to the negative supply voltage make the TLC2201 very HE UNIT discussed herein- dicates, by means ofa chain of LEDs, in logarithmic ratios the strength of an electric field Ra=10MQ RS, R6, RIO= 100k R7= 150k. R8,R9=1k2 P1=470k02(or500k0)multi- ‘um preset Capacitors: C1,C2=1 pF C3=1 nF ceramic C4= 100 nF C5 =4.7 p25 V, radial (€6= 10 pF, 40 V, radial ‘Semiconductors: Di =1N4148 D2-D4=LED, 3mm, green DS =LED, 3mm, yellow D6-DI0=LED, 3 mm, red ICL, 1C2=TLO271 13 =LM3915 Miscellaneous: SI =SPST switch 9V battery 50 HZ BAND-STOP FILTER suitable for applications where signal conditioning witha high source impedance is a prime requirement. ‘Anexampleofthisis the50 Hz band-stopfiltershowninthedi- agram, which provides an at- tenuationofsomed0 dB, Because ofthe highinput impedance, the filter can userelatively smallca- ppacitancesand large resistances. Owing toitsexcelientd.c_ prop: erties, the circuit is also suit able asa buffer for dc. or low frequency signals. ‘The circuits requires supply, from which it about 15 mA. (.Ruffell 914086) FIELD STRENGTH METER surroundingtheunit Theinput of (Cy, A=Ry/P). In the proto- signalacross theconductingdises type, Py wasset at about 210 K2 is applied to the non-inverting togiveanamplification of about input of IC). The amplification ~50. Opamp IC> functions as a rectifier: during the negative halvesof theinputsignal,tsout- put goes high and Dj conducts, 1 erouT gg per 0s LMa91s ELEKTOR ELECTRONICS JULY/A UST 1991 During the positive halves, the capacitor is discharged slowly minalsofthecomponentsabout _ getherwiththeaid of non-metal- signal is applied direct to the via Ry when the signal ceases. 2mm from their ends to make _ lic screws and 20 mm spacers. output via RsandR,.DiedeD; The conducting dises are better contact and strengthen __Theindicatoriscalibrated by is then reverse biased and IC formed by two round, double- the solder joints. Note that C,, turning? until the LED asso- does not funetion. sided PCBs as shown in Fig. 2. S, and the LEDs must be fitted ciated with a field strength of The level of the output volt~ The components are mounted lying down, all the others up- 10 V m1 just lights. age across Cs is monitored by at the track side of one of the right, diodechainD,-DyovialC3. The boards. Carefully bend the ter Thetwoboa dsarefixed to- (Dipl Ing. H Moser 914041) PC INTERRUPT HANDLER HE program and the circuit presented here are an intro- duction into practical interrupt handling in IBM PCs and com- patibles, a subject fraught with pitfalls to the average PC user. ‘Theprogram (shownin thel ing) is a memory-resident util ity that monitorsone ofthe PC's interrupt request lines, IRQ2 through IRQ7.Itproducesa short beep on the PC's loudspeaker whenarequestoceurs Interrupt requests may originate fromin- sertion cards, and serve to in- form the PC that a particular eventhas occurred that requires the action of a servicing rou- tine, which interrupts the cur- sraese rently running _ program. Interrupts may be used to sig- nal theactvity of, for example, a telephone ringing circuit, a temperature monitor,a voltage levelmonitor,orawatchdog. To help you understand the use PROCEDURE UNINSTALL _INTERRUPTHANDLER; and basic operation of inter- (svssssnecunseesesawnesuassannentses) rupts, a simple circuit is given that generatesaninterruptiwhen (* Restore original mask and vector *) push-button spressed. Taking goodcaretoavoideonificts with BEGIN Cardsalready installedin thePC, PoRr[Controllert1] :=originalmask: set the push-button interrupt gure ae Sola aegis SETINTVEC (IntNunber, Originalvector) ; jumper, srie JP; through P,, Inthe program, Stee thisinterruptlineshould bede- i fined accordingly by assigning BEGIN (+ MAIN *) thecorrectaluetottheconstant ‘CASE IRQ OF IRQ (see the listing) 0: IntNunber:= $08; (* SYSTEM CLOCK TICK * When the push-button is 1: IntNunber:= 808; (* KEYBOARD INTERRUPT » pressed the TLC3S5 supplies a 2: IntNunber:= $0A; (* RESERVED » 100-ms long interrupt request 3: IntNumber:= 308; (* SECOND SERIAL PORT CoM2 *) pulse whichis transferred tothe 4: IntNamber:= $0C; (* FIRST SERIAL PORT Cot *) £259 interrupt controller in the 5: IntNumber:= $0D; (* HARDDISK INTERRUPT " PG vin an ectoucion bist &: Intwumber:= $08; (* FLOPPYDISK INTERRUPT — *) arwpanents Brandy kara 7: IntNumber:= $06; (* PRINTER INTERRUPT } ichdebouncingnetwork The ee ernie circuit is readily built on the INSTALL INTERRUPTHANDLER; ng board forcomputer Extensions described in Ref. ipanakn ueetiseeyennsaxse At the end of the fisting are UNINSTALL INTERRUPTHANDEER; ) tswocommentlines thatserveto prevent the uninstall routine KEEP (0); being called. If you intend to END. (* MAIN *) aiasooas make changes to the program, werecommend that you do not attempttomakeitresidentstraight ELERTOR ELECTRONICS JULY/AUGUST 1991 PROGRAM PcAlaxm; (uesuuwanenaeny (* Blektor vi.0/aR *) (3 2000, 0,0) {$Re) S-) I>) F=,0=, R=, Vt, B=, No, Et, D=yL-} USES CRT,DOS; CONST TRQ=3; (* Select hardware interrupt (0...7) *) Controller (* Base address of 8259 interrupt controller *) Speci fickor=$60; VAR End_Of_Int :BYTE; (+ End Of Interrupt command 8259 *) OriginalVector :POINTER; OriginalMask = BYTE; IntNumber 2$08..$0R; PROCEDURE STI; (eteeuereaes) (* Set processor interrupt enable flag *) BEGIN; INLINE (SFB) END; PROCEDURE CLI; (Httaaaeaunas) (* Clear processor interrupt enable flag *) BEGIN INLINE (SFA); eND; (SPH) PROCEDURE INTERRUPTHANDLER; INTERRUPT; (ODO G ODOC ISSO Ea EERIE AIA BEGIN SOUND (800); DELAY (200); SOUND(1200); D&LAY (300); NOSOUND; PORT [Controller] :=End_Of_Int; END; {SF-) PROCEDURE INSTALL_INTERRUPTHANDLER; (Ons uOD oon naa EE aaa aaa Ra aE) VAR Enableratter: BYTE; BEGIN ( Save original vector *) GETINTVEC (IntNunber, OriginalVector) ; (+ Install new vector *) cur; SETINTVEC (IntNumber, @INTERRUPTHANDLER) ; str; (+ SAVE ORIGINAL MASK *) OriginalMask:=PORT [Controller+1]; (* Enable TRO *) EnablePattern: EnablePattern: PORT(Controllertl] :=(OriginalMask AND EnablePattern); END; FLEKTOR ELECTRONICS JULY/AUGUST 1991 away since the utility can then beremoved from memory only by rebooting the computer. Therefore place the KEEP in- struction in between braces, and VOLTAGE regulator with properties like low volt- agedrop, 1 Acurrent, protected against reversaland voltage peaks up to 60 V, inexpensive, and simple to design in, is indeed super device. It concems here National Semiconductor's LM2941C, whichisanintegrated devicewith fivepins. Three pins are for the usual connections; thefourth(GND) isrequired for the low voltage drop; and the fifth provides anadditional on- off switching function, Inthediagram,C; isrequired ‘fthedistanceto thesmooth- ing capacitor is fairly long, Its value needs to be somewhat larger than is usual with 78xx regulators. This is also the case with C:. Itis advisable to place that capacitor as close to the regulator as possible. ‘Although itis normal for the quiescent current through low- dropregulators toberatherlarger than required by traditional reg ulators, the LM2941Cnceds this onlyat voltagedifferences of be MOMENTARY ACTION PUSH BUTTON HE circuit described here isa kind of remote control {or all sorts of equipment that ‘must be started or switched on with the aid of trigger pulse, The authoress actuates it with aflashof heheadlightstoswitch on the garage lights When light falls on tothe six series-connected solar cells, Ty is switched on, which restlts inTzbeing switched off, Capacitor ois then charged When the light is removed fromthesolarcelis, Tisswitched off and T; is switched on Capacitor C2 will then be dis- charged through the LED of the electronic relay, which is con: temporarily add REPEATUNTIL, KEYPRESSED and UNIN STALL INTERRUPTHANDLER, This will save you a lot of time and troubledebugging yourown application. G. Rutfell_ 91.4102) SUPER VOLTAGE REGULATOR tween 0.5 Vand 5 ¥, Theoutputofthe circuitshown isdesigned tobesetbetween3V and 20 V Since the internal re erence vollageis 1275 Vitshould in practice be possible to set it below 5 V. Note, however, that the makers do not guarantee satisfactory operation at such low levels Thevaltueofresistor Ry must not be smaller than 1 k@. The Value of Re may be calculated from Ro= RyUpgi/1.2751-1) @ where Ugg: i the required out: put voltage “Although many three: pin eg ulators require an electrolytic capacitor at the ADJ output to improve stability, that 1s not ‘permitted with the LM2941C:in fact, it might lead to oscilla- tions. A voltage difference of only 05 Vis sufficient for an out- Reference: 1. Prototyping board for com- puter extensions". Elektor Electronics July / August 1988, supplement p. 4 put current of 1A. This differ- ence may beeven smaller if the current is smaller. ‘The input must be actuated by a positive voltage and then requitesacurrentof about 300A. ‘Since the IC toggles with a control voltage as low as 2. V, it may be switched with either CMOS or TTL logic. (NS application 914026) 5¥5...30V 91402s-1 sequently energized for an in- stant.Inthatwayatriggerpulse isgenerated for electrically iso- lated equipment without the need of an additional power supply. Inthediagram,C),Ry and Ry ensure a stable switching op- eration. ‘The solar cells used in the prototype gaveanelfective range of 2-3'm 7-10 £0) The cireuit is intended as a momentary action push but ton notasalockingswitch, The latter function may be obtained byadding, forexample,alatch- ing relay (Carin Mieslinger 914061) T12<80507 ELEKTOR ELECTRONICS JULY/AUGUST 1991 AUTOMATIC BATTERY CHARGER EEPING your car battery constantly charged when the car is not in use apprecia biy increases the life ofthe b: tery. Chargingiis,of course, nor- mally only possible in your garage. The charger described here provides constant charg- ing current that may, for exai ple, be fed to the battery via the cigarette lighter, Thechargerconsistsofa mains transformer, Iry bridge rectifier Byand smoothing capacitor Cy, The charging current through the regulator, IC), and the switched series resistors is 107 mA. G7 );230 mA 22 0);500 ma 0 2);0r 1 AG 2) Diodes DD 4indicatethe po- sition of the switch. Transistor Ty, Ry and Ds ensure constant brightness of the diodes, When the battery is not con- nected, the relay is not en gized and themainsisswitched oft When thebatteryisconnected, Cs gets charged, Ty is switched on and the relay is energized The mains is then switched on and the battery is charged via D;.Theconsequent voltagedrop across Dy causes T and T> to beswitched on, so that therelay remains energized although since its collector is at +12 V, transistor T, is switched off Resistor Rs ensures that C) is kept chargedso that Tyremains off. ‘To ensure that the charger works with flat batteries, the relay contact may be bypassed by) which enables thecharger to be switched on manually. Note that during constant charging of lead-acid batteries there is the risk that the water dissolves into hydrogen and oxygenand this will reduce the liquid in the battery. Sincesealed batteries can not be topped up, the present charger is not suit- able for these types of battery Also, do not use a current higher than necessary; in most cases 100 mA isample: Thelarger currentsareintended for charg- ing large NiCd batteries, (R. Kambach 914044) 105,07 = sw4001 ERYONE should cleanhis teethatleasta couple of times a day. Dental research shows that cleaningone'steeth for three minutesata time sbest: longer periodsmay damage the gums, TEETH-CLEANING TIMER Whereas the gums may not be ‘massaged sufficiently, nor the plaque removed adequately, if the period isshorter.Someman- Uufacturershave thereforestarted to build in timers in their elec tric toothbrushes that give a signal after three minutes, If you do not (yet) have an electric toothbrush, the timer presented heremay help. When push-buttonswitchS: is pressed, PTRONICS JULY/AUGUS 1991 the potential at the inputs of ICy, goes low. After S; has been released, C; is charged slowly via P; and Rj, so that the volt age at the inputs of IC. rises again. When the potential across Cy has reached a certain level the output of IC), toggles from a high to a low level. The con- sequentleading edgeoftheneg.- ative pulse briefly actuates the oscillator based on IC}. For a time determined primarily by thetime constant Re-Cothebuizzer thensoundsto indicate that brush- ing time is over. The time may be set at exactly three minutes with P; ice the current drawn by the circuit is minute, an on/off switch has not been provided. (. Ruffell_ 914065) ONE-SHOT SOLID-STATE RELAY TIMER The solid-state relay timer described in tt by Dr K.A. Nigim article is well suited to the on/off switching, at predetermined times, of a.c. loads rated at up to 5 kW. The electronic circuitry is optically isolated from the a.c. mains and incorporates a zero-crossing voltage- PIE advantagesof a solid-state relay over 1h conventional mechanical types are * thas no mechnical or moving parts that wear out it gives no audible noise; itis resistant to shack and vibration; ittexhibits no contact bounce it responds fast which reduces electro ‘magnetic interference (eM), The block diagram of the timer is shown, inFig. 1. Theoutputof thetimerchangesstate rom low to high potential) a very short time after the start bution is pressed. The time in by the time constant, of the series combination preset-C The output signal of the timer is applied 0 a solid-state bidirectional switch, a triac The ac. load is connes the triac. When the preset ime elapses, the ed to the mains via ‘output of the timer drops to a low level and the triacis switched off, thereby disconnect id ing the k switching technique. Circuit description The complete circuit is shown in Fig. 2. The ier section is based on the well-known n the IC) position. The timing period is initiated by pressing briefly push button If, however, this switch is kept depressed, restarting does not occur since C3 will main- tain a high potential at pin 2 of IC). The ea pacitor discharges through Ry when $y isre leased. The timer may be reset at any instant by pressing push button Sy The output signal at pin 3 of IC) is high after S has been pressed, which causes Dy to light, indicating that an active time pe riod has begun, av ser rine ee We Tran lear Fig. 1. Block diagram of the timer. tez=noca0s1 Fig. 2 Circuit dlagram ofthe solid-state relay timer. ELEKTOR ELECTRONI JULY/AU sr wai The period, inseconds, during which the output at pin 3is held high is determined by the time constant, on = TCR +P) where Ry and P; arein kQ and Cin pF. With the component values indicated, time peri ods from 10 to 20 seconds may be obtained. ‘That range can be extended by replacing Cy by a switch that can select between two ca- pacitors, Cj, and Cy. When the range is in ‘minutes, both Ry and P; must be at least 100 ko. The timer circuit and the trac driver are powered by a simple +12 V dc. source, for Which a suitable circuit is shown in Fig. 3 (ONE-SHOT SOLID-STATE RELAY TIMER AC supply isolation Toisolate the timer citcit from the high volt- age of the mains, an opto-isolater triac, ICs, ‘with zero-crossing level trigger drives the main power triae Tri. ‘Thecurrent lowing intopin of C>islim. ited by potential divider Ry-R--Rg to 15. mA fn accordance with the manufacturer's rele vant data sheet (Ref. 1). ‘Surgecurrentsat the output, pin 6,arelim- ited by Ry, The minimum value of si tor for 240 V mains is given by Rayausd = Uinipeon) / 12 =30.0, The ac. load is connected to the mains via Try. The type of triac used depends on. therm s.load currentrating plusa 30% safety ‘design factor. The triac must be ‘mounted on a suitable heat sink particularly with large loads. For largeinductiveloads suchas uni- versal motors, asnubber network consisting of R, and C, is con- nected across the triac to. mini mize the rate of rising voltage (commutatingds / dt). Good prac tical values of these components are: R, =30,3W and C,=0.1 pF 1000 ¥. The circuit performance with high do/d? is improved consi Resistors: Fi = 68 ko Fa, RG, RS, RI4 =2.2 kod Fae 10K RE, R7 = 1 KO FRB, RO, RIO, AMT, R12, R13 = 930.0 | Re = 30.0; 3W (Pra a7ka Capacitors: C1, C12= 100 uF 16V Cit = 10nF. 16V €2, 08, G7 = 22 nF; ceramic C3= 1h 16V Gs= 0.1 uF, 400 V, polypropylene 5 =2200 iF, 25 | Ca = 10 iF, 35'V, tantalum ‘Semiconductors: Ct = NIESSS P | 102 = Moc 3061 ies = 7812 Bt = WOAM rectifier Di = LED, red D2, DS = 1N4007 D4=LED, green "Trt = spectiod by load Thy, Thy2 = specified by load ELEKTOR ELECTRONICS JULY! Fig. 3. Circuit of a suitable d.c. power source forthe timer erably when the triacs replaced by two thyristors connected in anti-parallel: this modification also reduces the power dissipa tion. The modified section of the circuit is shown in Fig, 4 Construction Since part of the circuit is connected fo the mains, great care must be taken in handling the triac and the load. It is strongly advised toassemble and position the triac on its heat sink away from the timer circuit during in- tial testing, The timer is constructed on a prototyp- ing or vero board. Start by mounting the IC sockets and timer components. The minimum and maximum time peri- ods can be ascertained with the aid of astop- \watchor good wrist-watchwithsecond-hand and setting Py to its maximum and mini: mum values. A number of settings may be marked in terms of seconds or minutes as required. Diode D, should light every time Sy is pressed and stay on until the specified time has elapsed After the timer circuit has been tested, Fig. 4, When the timer is used with large induc- tive loads, it is advantageous to replace the triac by two thyristors connected in anti-parallel assemble the triac driver circuit. Connect terminal A2 of Tei with suitably rated wire to the axe. mains and the load. Start by load- ing the triac with a 40-60 W light bulb. Ifthe resultsaresatisfactory,connect the actual oad. Applications ‘Thecircuit may replaceany mechanical timer relay, Two examples for use in the home are thehot-watertankand anelectricoven. Inthe workshop, itcould beapplied toimpulse seal ers, as on/off control of electric motors, 3 in spot welding control References Motorola Thyristor Data Book, 2 ing, 1988 1d print 8088 SINGLE BOARD COMPUTER A low-cost computer system is described that forms the perfect introduction into programming Intel's 8088 CPU. The system is complete with a serial interface and a small, PROM-resident, operating system that enables the SBC to download 1-Kbyte large chunks of object code sent by a PC running a communication HE first IBM PCs were based on the 8088 microprocessor, which has a 16-bit nter- nal architecture and an external bit data bus. Today, IBM PCs proliferate the world ‘with more powerful microprocessors — the 5086, 80286, $0386 and 80486. Their ability to keep going is mainly due to upward com- patibility (the original instruction set for the BOSS has been maintained and enhanced). Hence, machine code software originally ‘written for the 5088 continues to function on the more enhanced processors. ‘This design, based on the Intel 8088, con- nects to the RS232 port of any IBM PC con figured for 9600 batd, § data bits, 1 stop bit, and no parity. It provides two eight-bit user ports five auxiliary control lines and two in- terrupt lines, The single-board computer is externally powered, thus offering consider able protection to your costly PC, which functionsas terminal Concurrent programming ‘The simultaneous execution of two or more programs by a single processor is now achievable in the domains of real-time elec- tronics. This is achieved by time division program. R. Grodzik multiplexing (TDM) and providing the recessary communication and synchroniza- tion primitives. However, where a sequence of program statements must appear to be ex- cuted indivisibly, critical sections are formed, and need to be protected. This is achieved with theaid of busy’ functions im- plemented by wait loops and flags. Furthe ‘measures have to be taken to prevent dead- lock and guarantee liveness, ie, the pro- gram must not crash under any circumstances. The fulfillment of this last re- quirement is a formidable feat of software engineering, The problem is solved by utilizing a ‘multi-processor environment, in which each individual processor executes its own pro gram, and asynchronously communicates with the other processor via a serial link ‘This principle is adopted here, and has taken the practical shape of an 8088 single-board computer, Simply upload program data from the PC to the 8088 SBC (I Kbyte max.) and you have your PC free to run any other program. The use of the second processor (the one on the SBC) brings concurrent pro- gramming within easy reach, ‘One of the Features ofthis project isanat tempt to investigate virtual memory. By using virtual memory techniques, whereby program code is downloaded in packets of 1 KBytes each, the seemingly small on-board _memory of the SBC does not prohibit the ex- ecution of a substantial program which is resident in the host, ‘The 8088 SBC is equally at home in an ‘educational environment, allowing the user to control extemal devices from a PC. Of course, all programs for the card have to be written in assembler. If the program has a bug, try again — it only takes a second to re- load the new version to the board. No emu- lators or EPROM burning are needed here. Operation and system architecture The present circuit (Fig, 2) uses a multi- plex/demultiplex system. The 8088 CPU has a multiplexed low-order data/address bus which needs to be demultiplexed to access the RAM and PROM in the system. Circuit ICz, a 74HC373 octal latch, provides this function. The 8155 PIO (C3) has internal de- multiplexing, and is connected directly to the 8088's lower data/address bus, with the ALE pin controlling the flow of data or ad~ dress information. Inaddition, [Ci and ICab provide a qualifying signal from the DEN ppin of the 8088 to prevent bus contention ‘when RAM or PROM is enabled. Circuit IC), a 8284, is a clock generator and driver for the 8088 microprocessor, pro- vviding all the source clocks needed by the system. The 11.0582 MHz master oscillator frequency is divided by three by the clock ‘generator to give a 33% duty factor 3.6864 Miz signal to the CLK input of IC. This fre- quency is further divided by two to present 1 frequency of 1.8432 MHz to IC) pin 3, a PIO with internal timer, where it is again divided down by three to output a 614.4 KHz square wave signal at pin 6. This signal feeds ICs, a 8251 UART. An internal divider in the UART (divisor 64) finally pro- duces the baud rate of 9,600 required for asynchronous communications with the host PC The operating system ‘The control software required to boot up the system resides in a bipolar PROM, ICto, ‘which is mapped into the system memory as ELEKTOR ELECTRONICS JUL’ AUGUST 991 FrFFF Ferro | — reser VECTOR OPERATING SYSTEM FrEOO 2800 — vant commano MEMORY Fig. 1. Memory structure of the 6088 single: shown in Fig. 1. The code burned in the PROM performs the following functions: + provide the reset vector address (EFEO:0000) - FFEO0}) PROM start ad- dress; + initialize data, stack and extra segments to zer0; + initialize the stack pointer to RAM top (OO7FF i); + initialize ports A, B, and C to outputs; * configure the on-board timer of IC: + initialize the UART (9600 baud, 1 stop bit, 8 data bits, no parity); + Toad binary data received from the host PC to the RAM (0400-007 ‘Once the SBC has received 1 KBytes of data, execution of the program starts automat- ELEKTOR ELECTRONICS JULY/AUGUST 1991 ieee woe ‘a | oe [mer iow | eos is ie ae 4 e001 PIORAM | auayes camera] ft PROM S12 Bytes 79 8088 SINGLE BOARD COMPUTER g@ IST ALAZAS.ASAG 12 2200 RART-RI.RI7, RIBAS 2 407 R15,R20 2 ana RIGAIB Capacitors: 1 10pF ce 2 10uF tantalum bead 02,03 42: 100F decoupting C ‘Semiconductors: 2 Bos4e Tre + 1Na148 ot + 1Naoo2 be 3 LED 4:05:06 1 e284 tc 18088 ica 1 8155 Ica 1 74Ho92 ea 4 7aHO138 es | 1 8251 os 1 7aHes73 cr 2 214 (caic9 1 PROM: Icio 1 7aH840 in Miscellaneous: 1 no press switch si 1 11,05¢2MHz quartz crystal Xt 1 26-way pin header «a * Pre-programmed PROMs and printocscir- uit oars for this project are available from the author: Fi Grodzik. 3 Chelmsford Road, Bradtord (B09 BON, ENGLAND. The price ofthe PROM is £15.00 including PAP. vo 910075 -12 joardt computer. ically from address (0000-0400) - 00400, (RAM start; see Fig. 1). For those of you with access to a PROM pro- ‘grammer, the contents of the system PROM, a 7ASA72, are given in Fig. 3 Construction and connecting up This should be relatively straightforward using the ready-made double-sided and through-plated board, and the component mounting plan, supplied by the author. Just uuse a hot iron, ensuring at all times that the Dit is clean and tinned. Dry solder joints should really be a thing of the past. Watch out for solder bridges and missed connec- tions All port lines and data connections are brought out on connector Ki, single-in-line 26-way pin header. The 5-V supply is con- nected to a separate 2-way header. On the host computer, connect a dual screened lead to the OV, RxD and TxD pins of the serial port. Also tie the RTS and CTS pins together (see the insert in the main schematic diag- ran). Programming The MSDOS operating system for any IBM. PC contains a machine code debugging f- city named DEBUG COM, in whichassem- bly cade can be written, assembled, and saved to disk, To start DEBUG, simply type the following DEBUG FILENAME.BIN Adjust the maximum number of bytes to be saved to dise (1 K). Type RCX and then iw COMPUTERS AND MICROPROCESSORS, 3 wl HL Fig. 2. Cireuit diagram of the SBC. FLEKTOR ELECTRONICS JULY/AUGUST 1991 {8088 SINGLE BOARD COMPUTER a National Seni DM748472 00 EE BO 00 28 00 03 00 00 00 00 00 00 00 oe BA 40 04 30 og 75 00 00 00 00 00 00 90 00 EO 00 0 00 09 00 00 00 00 00 00 00 90 90 00 00 EO ve on EE. eF 90 90 re 00 00 00 00 90 00 00 00130: 90140: 00150: 00360 00170: 0180: 00190: o01A0 00180 oo1co: o0b0. 00180: 001Fo: 8E 00 BA. 00 90 90 EA 00 00 00 00 00. 99 00 90 00 00 00 00 90 00 00 00 00 00 00. 00 00 00 00 00 00 po BO 04 00. 90 90 00 00 00 00 00 00 00 00 00 00 00 bo 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8E 00 00 Ba 90 90 08 00 00 00 00 00 00 00 00 00 00, 00, 00 00 00 00 00 00 00 00 90 00 90 90 00 20 20 00 ac 03 00. 00 00 00 00 00 00. 90 00 00, 00. 00 00 00 00 00 00 00 00 00 00. 20 00 Fig. 3. 400 ‘Next, invoke the resident assembler by typ- ing A100 followed by the lines of assembly code, eg. MOV Bx,0000 MOV ALOF OUTDX,AL MOV DX,0001 MOV AL 55 OUTDXAL all ports output) ‘send 55H to port A) wait) the carriage return key twice toexit the Table 1. 8185 port programming PortC PortB = Porta x cup input oF OE 0D input oc. "output ‘input ‘output 03 tpt input 02 input output ot input Contents of the system PROM, a 256-byle large 745472 assembler. Next, type Wo «CRS 1 Kbytes are written to diskas filename bin’, Next, Enter Q

Vous aimerez peut-être aussi