INDIA versatile | / timer • digitizer multi purpose time switch • universal I/O bus for VIC64 • programmable \array logic ,*€RK€RS FOR COLOUR TV Suitable for Toshiba Kit. 8x13 LCT 3 (3 'A" x 5" Oval) Speakers for B/W TV: 10 x 15 LG 6 TV (4" x 6" Oval). . 10 LG 5 TV (4" Square). 7 x 10 LG 2 TV (21/2* x 4" Oval). 8« 13LG5TV(31/4'x5"Oval). 8 LG 1 TV (3’/4" square) For Portable TV. Transistors. Tape recorders. Stereo systems. Car Stereos. Intercoms and P.A. systems. The LUXCO Range also covers speakers for. □ Distributors for Maharashtra, Gujarat and South India: precious Electronics Corporation • Chotani Building. 52. Proctor Road, Grant Road (East), Bombay-400 007. Phones: 367459, 369478 • 9, Athipattan. Street. Mount Road. Madras— 600 002. Phone: 842718. □ Manufactured by: LUXCO Electrtonics Allahabad— 21 1 003 □ Sole Selling Agents: LUXMI & CO. 56. Johnstonganj AllahaMd— 21 1 003. Phor 11, Telex: 540-286 □ p ____ Delhi & Haryana: k Electronics Radio Place. ChandniChowk Delhi-110 006. Phone: 239944. 233187. Wanted stockists oil over Indio sound technology from a sound source Volume 3-Number 6 EDITOR: SURENDRA IYER PUBLISHER: C R. CHANDARANA PRODUCTION: C, N. MITHAGARI ADVERTISING & SUBSCRIPTIONS eIeI2, and the power lines (+5 V; +12 V; earth). Address lines A1 and A0 represent four address locations in a slot. These are often used for register select inputs of VIAs and similar devices. The synchronization clock, 02. is also more often used with peripheral ICs. There is a facility on the bus board to synchronize the data bus signals with 2 (wire link 0 to obviate so- called bus conflicts. Finally, the system bus has co nnec tions BUS SEL (bus select) and BUS ACK (bus acknowledge). The bus select input may be used for external actuation of the I/O bus (so-calledjtalf-memory mapped), while the BUS ACK output indicates when the bus is actuated. This signal may be fed back to certain computers to switch off the memory. Power for the circuit is normally drawn from the + 5 V supply in the computer. If that supply is thereby stretched, or if several levels of voltage are required, the auxiliary supply given in figure 4 may be used. This provides + 5 V, + 12 V via three 1 A regulators. When the auxiliary supply is used, the +5 V from the computer must not be used, but the earth or power return lines must, of course, be interconnected. 6.30 ele Construction The bus is most conveniently built on the pcb illustrated in figure S. The peripheral pcbs should be inserted into the slot con- nectors at right angles to the board of figure S. We have not indicated the con- nections to the computer, because there is such a multitude of differences between the various makes that this becomes totally impracticable. When the auxiliary power supply is used, the + 5 V connection must not be used. The DIL switches are mounted so that. viewed from the system bus, the MSB (most significant bit) is at the left, and the LSB (least significant bit) is at the right. This facilitates the locating of the I/O range. Operation After the bus has been built and thoroughly checked, it is connected to the computer. As there are so many dif- ferences between various makes of com- puter, it is not possible to give connection i 6.31 4 instructions for all micros in detail. In the Commodore 64. the expansion con- nector is used: the pin designations of this are given in figure 6. Pins D0. . . D7. 5 A0. . .A3. IRQ, 2, is, apart from at the ports, also present in the bus circuit itself, and can, therefore, be used to synchronize the data bus. This is not always necessary (for instance, where the system bus of the computer is already synchronized), but it does not do any harm. If the facility is used, fit wire link g. The indications to the system bus connec- tions only apply to 6500 and 6800 systems. Signals R/W and 2 do not exist in Z80 systems. Instead of 2, the IOREQ signal can then be used, while in place of R/W the WR signal may be employed. As you can see, interconnecting the bus and your specific computer requires some thought, but, with the guide lines given, it should be fairly straightforward. As far as the frequency of the system clock is concerned, the bus circuit presents no problems. If, for instance, the micro operates at 2 MHz, the peripheral units should obviously be able to cope with that. H T1 = BC 547 IC1 - 74LS245 1 02 74LS244 IC3.IC4 - 74LS688 IC5 = 74LSI39 IC6 = 74LS02 an IBM compatible micro A great many people would love to own a really first class I personal computer, but are defeated by the cost of such a machine. It is for those people that we have designed a PC that is compatible with what is currently probably the best PC around. We had planned to publish the project this month, but, unfortunately, owing to lack a space this was not to be. It will, however, definitely appear in these pages next month. Our apologies to all those keen readers who would have liked to make an immediate start! In principle, it is possible to build any computer yourself, presupposing, of course, that you can obtain all the necessary parts. This is true even for an IBM PC2 compatible, which will give you an entree to the 16-bit world and a mass of efficient software. Note well that this soft- ware is immediately usable: it does not have to be modified in any sense. There are not all that many IBM com- patible machines, and most of those are Japanese. It is an open question why so few home-made IBM compatible machines exist. Is it because most people think it is culty, nor is it that there is no software available. It cannot be the technology used by IBM: this is pretty well current. We have a feeling that the cause lies to some extent in the typical buyer/user of the IBM PC2 as contrasted with the Apple user. The former are largely small and medium businesses as well as pro- fessional people: doctors; lawyers; managers; company directors, who in the main would not dream of building their own computer, whereas the latter includes many electronics hobbyists. Another factor is that, in the main, the technical press has hardly touched upon the subject; at least not as far as we have been able to find in any of the world's technical periodicals. The only 16-bit D1Y computers published are not, in the true sense of the word, IBM compatible. Most of these are 68000 machines, the software of which is either wanting or very expensive. Where the software is offered as compat- ible, it has often been adapted so badly that the home constructor is still faced with figuring out his own modifications and improvements. At the prices con- sidered here, some £2000 . . . £3000, that is not going to attract a great many people. No, it is far better to build your own com- patible and leave those problems to For our prototype we have used the Megaboard (part) construction kit, which is produced by DTC of Dallas, Texas, USA, and which is available from a number of too difficult? We have tried to find the answer to that question, and can now say that it is not: the prototype is working very satisfactorily in our laboratories and con- tinues to do so. There is not much to say about the IBM PC2 that is not already well known. This machine has set yardsticks by which all other home computers are measured. Together with its compatible brothers and sisters, it has gained almost seventy-five per cent of the world's home computer markets. Part of its appeal, of course, the tremendous amount of software that does not consist for 80 ... 90 per cent of games. The software ranges from a simple editor (at around £30 . . . £40) to a complete specialist retailers. This kit contains the mother board (complete with component layout foil and solder resist), the Boot EPROM with MEGA BIOS, the memory mapping PROM, and extensive documen- tation (c. 90 pages) giving full instructions for the construction and operation, and containing all necessary circuit diagrams, timing diagrams, and so on. We advise all those interested to work with this or a similar kit, because then you will not have any problems with the PROM and EPROM; you can, of course, buy those by themselves, but you then have to program them, and that's the crux of the matter. The assembly instructions supplied with the Megaboard kit are a great help with CAD/CAM system at anything from £10 000 upwards, and contains a farm adminis- tration program as well as a blend optimization program for the timber, steel, and glass industry. We have found that building the compat- ible prototype does not present an experienced electronics hobbyist with insurmountable problems. That does not mean to say that it is easy! We also had no problems in obtaining the required parts. There still remains the question why so few compatible machines exist. As we have seen, it is not the degree of diffi- the completion of the mother board. To explain: the IBM PC2 is a modular con- structed computer, which means that the mother board contains apart from the pro- cessor, RAM banks, and so on, also six (in the IBM PC2), but eight in the case of the Megaboard, positions for extension cards. Two of these at least are needed for the video card and the floppy controller card. And thei\ there are: power supply; drives; keyboard; ... All these will, of course, be looked at in detail in the construction article which will be published in our July issue. H 6.34 panorama mixer One of the most popular fields of electronics, certainly for hobbyists, has always been audio. This is one of the few areas in which you can actually hear the results of long hours spent designing or building a circuit, which could be anything from a single-chip radio receiver up to a polyphonic synthesizer with all the trimmings. A small part of this field, namely home recording, is becoming ever more popular in its own right. For all enthusiasts of this 'hobby' we have now j designed a simple mixer with an unusual feature — a facility for J. Wallaert j placing a sound anywhere you like in the stereo 'spectrum'. panorama mixer a four-channel mixer and balance control in one Figure 1. This circuit enables a number of stereo image. Each of the In home recording the quality of the sound is all-important so it is quite under- standable that most enthusiasts are prepared to spend a lot of time and money to get this right. Unfortunately there is then very little left over for special effects that can give a recording a special character of its own. The circuit shown in figure 1 has a dual function. It mixes the signals that are presented to its inputs (four inputs are used in the example shown but this could be more or less) and at the same time it enables each of the in- put signals to be placed at a particular ‘place’ in the total sound. What this means, actually, is that there is an in- dividual balance control for each input. ®T?- LI Four inputs, two outputs Each of the four input channels to the cir- cuit can be considered separately as each is virtually independent of all the others. The number of channels used can be in- creased or decreased depending on in- dividual requirements. This is simply a matter of duplicating or deleting the rel- evant section. Consider input 1 as the model for all the channels. The do. component of the sig- nal presented to this input is removed by electrolytic capacitor Cl. The signal then passes to logarithmic potentiometer P5 where the volume is set. Both IC1 and IC2 are connected as inverting amplifiers whose closed-loop gain for a given input is determined by the ratio of the feedback resistor (R5 or R6) to the resistance be- tween the wiper of PS and the inverting input (virtual earth) of the op-amp (if we ignore the source impedance of PI and the audio source). Moving the wiper of PI from the ‘L’ extreme to ‘R’ varies the gain of IC1 from two to one, while at the same time the gain of IC2 goes from one to two. In effect this means that IC1 has a high gain while IC2 has a low gain and vice versa, so the input signal is split between the left and right output channels in a ratio that depends on the position of the wiper of PI. The transfer ratio (output/in- put) of each channel ranges from zero to two. When the wiper of PI is in mid- position the gain of each op-amp is the same so the input signal is split evenly between the left and right channels. The wiper of PI therefore determines exactly where the signal is located relative to the left and right channels. Each of the other channels operates in precisely the same way. The input impedance depends on the position of the wipers of presets P5 . . . P8; output impedance depends on the op-amps (about 60 S with the CA 3140s). The maximum input level is about 7.5 Vpp. Building this circuit is quite straightfor- ward and as it is so small it could prob- ably be incorporated within some other equipment. Current consumption depends on the number of channels used but as shown it is about 5 mA. The op-amps in- dicated give a reasonable performance but this can be improved by selecting low-noise types instead. The circuit can be made more ‘user-friendly’ by using slider pots for PI . . . P4 and P5 . . . P8. It is then possible to see at a glance exactly what the volume and ‘position’ of each channel is with respect to all the others. H ,6.35 Communication with the outside world >s vital for a computer but most information from that outside world arrives in analogue, that is, continuously varying, form rather than as a series of binary digits, bits which are the computer's staple diet. The continuously varying signals can be converted into bits by the digitizer presented here. The pcb on which the digitizer is housed fits nicely onto the versatile input output bus featured elsewhere in this issue. It comprises a single analogue/digital converter 1C, the input of which is connected via software to one of the eight analogue input terminals on the pcb. Operation is simple and effected by BASIC with a single peek and poke command. digitizer the outside link The layout of the digitizer is fairly simple; yet, its performance is excellent. The printed circuit board (pcb) has eight input terminals, to each of which an analogue signal may be applied. A poke command in BASIC enables the selection of one of the eight input pins which is then con- nected to the input of the converter IC. The same command serves to start the analogue-to-digital conversion process. Afterwards, the converted bits may be extracted with a peek command for pro- cessing in the computer. The converter IC National Semiconductor’s ADC0804 is an eight-bit analogue/digital converter that operates by the successive approximation method. It has been designed specially for use with microprocessors, so that it contains eight data outputs that can be switched to a high-impedance state. The eight outputs tell us at once that the resol- ution of the converter is 2® = 256 steps. In the successive approximation method, the input voltage is compared, in discrete steps, with a reference voltage that in binary divided steps approaches the input voltage more and more accurately. The IC therefore uses a ladder network of R-2R resistors and a reference voltage, V wl . First, half the reference voltage is compared with the input voltage, V,„. If V < '/rk'ref, ,he highest-numbered output goes logic low, and the reference voltage is reduced to Vt K reI , which is again com- pared with V m . If V m > V,V ie „ the highest- numbered output goes logic high, and the reference voltage is increased to % K Io( . Depending on the result, the reference voltage is reduced or increased by 1 's V re , at the next step; by ‘'i6K le i the following step; and so on, until all eight outputs . have a logic value (1 or 0). The block schematic of the ADC0804 is shown in figure 1. The voltage provided by 6.36 elekto the ladder network is set with on-chip analogue switches. The most significant bit (MSB) is tested first, and after eight comparisons (sixty-four clock pulses), the eight outputs of the ladder have a binary code that represents the value of the input signal (1111 1111 = full scale). That code is transferred to the output latches, and at the same time an interrupt signal is given via the INTR bistable. There are two inputs vi a wh ich the^ con- verter may be enabled: WR and CS, but first, the IC has to be selected by a logic low at CS. When the WR input goes from logic high to low, the on-chip SAR back- ing stores are reset. As long as CS and WR remain logic low, the converter remains in the reset state. The conversion process does not commence until 1 ... 8 clock periods after at least one of these inputs has gone logic high. The reset state (both CS and WR logic low) implies the following: the starting bistable, F/F, is set which causes the reset- ting of the interrupt bistable; the 0 output of D-type bistable F/Fl goes high: this logic level is applied to the input of the 8-bit shift register after one clock pulse, and also to the input of AND gate Gl. This AND gate combines the ”1” with the clock signal into a reset signal for the starting bistable. When after tha t a " 1" is applied to one of the inputs CS and WR, the starting bistable is reset, whereupon the shift register accepts the ”1” from F/Fl and the conversion process commences. After the "1" has been clocked through digitizer the shift register, it appears at the 0 out- put of the register to indicate that the con- version can be terminated. This high signal also ensures via AND gate G2 that the digital levels are entered into the out- put latches. At the next clock pulse, the "1" is written into D-type bistable F/F2, which causes the setting of interru pt bistable INTR F/F, whereupon the INTR output goes logic low via an inverter. For reading the data, the combination CS/RD ensures that the interrupt bistable is reset, and that the data appear at the outputs of the output latches. These out- puts are normally high impedance. Circuit description The heart of the digitizer is, of course, the analogue/digital converter, IC1 — see figure 2. Resistor f?4 and capacitor C2 are the frequency determining components for the on-chip clock. The WR input, pin 3, is connected direct to the R/W ter- minal on the I/O bus. The CS input, pin 1, is fed with a combination of 02 and SS_ (slot select) via gates N2 and N3. The RD signal for pin 2 is derived from the R/W signal via inverter Nl. The input of IC1, pin 6, is fed from the output, pin 3) of eight-channel multiplexer IC3. The inputs of this IC, pins 1 ... 8, accept analogue signals over a maximum range of 0 ... 5 V. Which of the signals is connected to IC1 is determined by four- bit latch IC2. This latch is controlled via A bistable (multivibrator) is also known as a half-shift register or by its American name flip-flop. ,6.37 data lines D0. . . D2 and it receives the clock pulses from the i 12 V Logic symbols A number of logic symbols are used in this article, which are neither accepted by the British Standards Institute, the American National Stan- dards Institute, and the International Electrotechnical Commission, nor standardized throughout the electronics industry. None the less, they have been informally adopted by many IC manufacturers, because they show a clear relation between the chip layout and the logic diagram. An input signal is always applied to two buffers which make the non- inverted as well as the inverted signal available at their respective outputs. To simplify this, the two buffers in PAL symbology are drawn as a single buffer with two outputs as shown above. Logic gates and their numerous matrix-shaped inputs are also drawn in a simplified manner. Intact fuses are represented by crosses at the cross- ings of the relevant lines. Mo— As long as all the fusible links of a gate are intact, they are not shown separately, but instead a cross is drawn in the gate symbol itself. The ov put of such a gate is always logic low. rray logic Figure 1. This illustrates the use of a bipolar PROM for the coding of an RGB signal. ,6.41 2a b 5U W V V I I I I d f ■ f | |- 1 1 I -d-H-H- t t T f P T t T ~ I I T I T i~ d '~T T t H i 4l tRTrr t t T T " D T T "~ III | D I f 4- IIII D itt | | | | D t I | - f- I III P 4 t r r | || | D f ++- | t | D 4 r r || | |D 1 i n p- yoy 1 + ■ Figure 2a. A PROM con- sists of a fixed AND array and a programmable OR array; when all fusible '\Z is converted into an input. This facility is of interest in the design of a shift register or a data loop. When the output inverter is switched over to high impedance, the out- put line can be used as an input. The output of an R type PAL in figure 4c is buffered by a bistable and fed back to the matrix. The feedback allows the PAL to remember the previous state and it can alter its function based upon that state. The 0 output of the bistable may be gated to the output pin by enabling the active low three-state inverter. This inverter can be switched to high impedance via a line common to all outputs. Figure 4d shows how the sum of products is XORed at the input of the D type bistable. This function is of interest in the HOLD operation of counters. Arithmetic functions are executed by gated feedback to the XOR device as shown in figure 4e. This set-up makes possible the combinations I + Q, I + Q, T + 0, and I + 0 which are fed to the matrix. This arrangement enables a sharp reduction (about 12 to 1) in the number of components as compared with standard logic circuits. First steps An example of simple programming is illustrated in figure 6: (a) shows a circuit that is required to be replaced by a PAL device; (b) is a virgin PAL device chosen 6.42 6a as described below; and (c) is the pro- grammed PAL. As more than half the output signals are inverted, an L type is indicated. To obtain ten inputs and six outputs, the choice should fall on a type 10L8, but figure 5 shows that not one of the NOR gates in this type has more than two inputs. A further look at figure 5 shows that the type 12L6 has two NOR gates, each with four inputs. Since one of the outputs in figure 6a, Q5, is a combination of three signals, the type 12L6 is suitable for our purpose. The outputs in figure 6a may be defined, according to De Morgan's Theorem, as follows: 01 , IT « 51 = II 02 = II - 12 = 55 = II + j? 03 - II 4- 13 - 03 - II 13 Q4 = I? 14 ± 54 = 13 14 Q5 13 15 16 + 17 4 18 19 = <55 ^ 13 15 16 ^ 17 + 18 • 19 06 18 19 • 13 17 I9_ 110 = 36 - 18 19 + 15 • 17 19 110 As stated, the PAL type 12L6 shown in figure 6b, has all its fusible links intact. To effect that Q1 = II and Q1 = II, the three unused inputs of NOR gate N1 in figure 6c must be logic 0; the fusible links on lines, 9, 10, and 11, therefore, remain intact. On line 8, only the link with line 2 remains: all other links are blown. Output Q2 com- bines II and 12, but because it is inverting, the result is 02 = 11+12. Only the links which connect the inputs of NOR gate N2 to columns 1 and 2 are retained: i.e., the inverting output of II and the non-inverting output of 12. For Q3, only the input line of AND gate N3 to which the non-inverting outputs of II and 13 are connected is needed. The coding of Q4, Q5, and 06 is left to your own ingenuity: it is good practice! The results are shown in figure 6c in any Another example concerns the replace- ment by a PAL of the logic functions shown in figure 7a. As you see, it con- cerns an inverter, an AND, OR, NOR, and XOR gate, and a NAND gate with three inputs. Thai gives a total of twelve inputs and six outputs which are active high. From the logic symbols in figure 5, it is easily seen that a 12H6 is required. When that type is programmed properly, the fuse pattern of figure 7b will ensue. Programming The programming voltage should be 11.5 V ± 0.5 V, while the programming pulses should have a width of 10 ... 50 i*s. To make it possible for the fusible links to be arranged in turn, the matrix has been divided into two groups: one for the links on lines 0. . .31, and the other for lines 32. . .63. In matrix columns 1. . .31 selec- tion takes place with the aid of signals A0. . . A2 and O0. . .03. The connections to the IC are dependent on whether the first or the second group of lines is being addressed. Tables 2 and 3 show how the Figure 7a. Another example of a PAL device replacing a number of standard logic functions. 7a form. There is a special program available for this: PALASM (PAL assembler), written in FORTRAN IV, that translates the logic equation to a PAL fuse pattern. This soft- ware has been designed by Monolithic Memories. Unless you use it often, it may not be worth your while obtaining it, although making fuse patterns without it will not be easy, particularly when you first start. The PAL Databook published by National Semiconductor gives programming tables for the fifteen PALs National produce. Apart from this book, the PAL Handbook published by Monolithic Memories is also strongly recommended. The more you O’ > -tjjj j H 1 H — B-O • 4IH -■ !!!! ! n. ■' ™ addressing should take place, while figure 8 gives the connections for both groups. Figure 9 gives the timing diagram which also shows the programming and verify voltages. It does happen from time to time that certain links refuse to be blown; in that case, reprogramming after testing is necessary, and may be necessary again. It cannot be pretended that every retailer is able to program PAL devices, even if he stocks them, but there are some! You have to draw a matrix as shown in figures 6b and 7b (but, of course, relevant to your particular device!) and convert that into a code that is acceptable to the program- mer. That means that the addresses and data must be converted into hexadecimal become engrossed in PALs, the more they will grip you! H Literature: PAL Handbook Monolithic Memories Ltd Monolithic House 1 Queens Road Farnborough Hants GUM 6DJ Telephone: (0252) 517431 PAL Databook National Semiconductor (UK) Ltd 301 Harpur Centre Home Lane Bedford Telephone: (0234) 47147 6.46 ele L.C.D. thermometer The 7106 is a well known 1C in the world of A/D converters, and was chosen for three main reasons. Firstly this 1C is a 'jack of all trades' and is widely used in all forms of voltage or temperature measuring instruments. Secondly, because it is universally available and relatively inexpensive. Last but not least, the 7106 and its big brother (7116), have so many functions already integrated within themselves that only a few passive components and a LCD are needed to complete a good circuit. The 7106 contains an A/D converter, clock generator, reference voltage dependant upon the time. In turn the contents of the counter are then dis- played on the LCD. The advantage of using this method is that a relatively simple and straigthforward oscillator can be applied. The oscillator frequency of the 1C is in fact determined by the values of R2 and C3. This frequency also determines the number of 'samples' taken in every second. As a matter of interest, using the values as indicated in the circuit diagram, three samples are taken every second. The 1C ensures a zero setting before each 'sample', or measurement, auto- matically. Quite simply, the inputs are L.CJ). thermometer . . . accurate to 0.1 of a degree During the past few months, the Elektor offices have been inun- dated with requests for a digital thermometer. In answer to all these requests, and to relieve the pressure on our technical queries department, we present a digital circuit using a special 1C and a LCD display. The design is inexpensive, but, nevertheless accurate, precise, and has a very low power consump- tion! The range of the instrument is from — 50° C to +150°C. The temperature is displayed 0.1 degree at a time, therefore making it suitable for practically any appli- cation. source, BCD-to-seven-segment decoders, and latch and display drivers! Quite a bundle of energy! And even if this array of goodies was not enough, it is also equipped with an automatic zero correction, and polarity indication. The 7116 (believe it or not), not only has everything the 7106 has to offer, but also includes a hold facility enabling the read-out to be frozen, if required. The circuit described here is The circuit diagram The circuit as shown in figure 1 is really nothing more than a digital voltmeter, which in turn measures the voltage drop across a temperature sensor. The dual slope conversion principle is applied for the voltage measurement. Basically the input voltage from the sensor charges capacitor C4 for a fixed period of time. The capacitor then discharges, the rate at which the capaci- tor is discharged being determined by the reference voltage. The actual time it takes for the capacitor to discharge fully (return to zero) is then pro- portional to the input voltage level. During the discharge period, pulses from an oscillator are stored in a counter, obviously the number of pulses first of all decoupled internally from the actual input pins and then short cir- cuited. The automatic zero capacitor (C5 in this case) is charged via a separate feedback loop, so that the offset voltages of the buffer amplifier, inte- grator, and comparator are compensated for, inside the 1C. This guarantees any measurement really does start from 0 V, and that when the display reads 000, it does denote a 0 input voltage. The temperature measurement stage is straightforward if somewhat sophisti- cated. It contains three voltage dividers: R10 and R11; R8/P1; R9/P2. The junction of the first divider containing the sensor R11 is connected to the 'IN HI' input of the 1C. The wiper of potentiometer PI is linked to the 'IN LO' input and the wiper of P2 to the 'REF HI' in- put. In effect the circuit measures the differential voltage between one side of the sensor and the wiper of PI. Any measurement is com- pletely independant of the supply voltage level, because the reference voltage of the 1C is also derived from the supply (via the divider R9/P2). Keep in mind that a full scale readout will be equal to twice the reference voltage. Any decrease in supply voltage will not change the readout, because the reference voltage will decrease by the same amount (when compared with the measuring voltage that is). Resistor R4 and capacitor C6 act as a input smoothing filter. The display is driven directly by the 1C. The EXOR gate N2 ensures that the decimal point is activated, by supplying the inverted backplane signal to the corresponding LCD points. The circuit also has a low battery indication function. The display denotes this by either an arrow or the term 'Low Bat'. An EXOR gate also controls this function I Transistor T1 is used as a supply voltage level detector. The emitter is connected to the junction of R5 and R7, and its base to the test connection of the 1C. This pin not only allows the display itself to be tested (by connecting it to a +5 V supply), but, moreover can provide us with a positive stabilised d.c. voltage! By choosing the right ratio between R5 and R7, T1 will cutoff the moment the supply voltage drops below 7.2 V. As a result the collector voltage of T2 increases, causing N1 to activate the correct notation on the display. A 9 V battery such as a PP3 is quite sufficient, since the circuit consumes only a few milli-amps. A mains supply is also possible, and it is for this reason that R1 and the zener D1 are added to the circuit. The temperature sensor There are various types of sensors on the market, and the only reason we have picked two particular ones, is that they are inexpensive. Original tests showed the KTY 10 from Siemens to be ideal, but, as this can be difficult to get hold of, we also tried the TSP102 manufactured by Texas Instruments which worked well. Most of the types looked at consisted of a silicon plate, whose resistance depended on the temperature. The only real difference between types was their temperature range. The KTY10, for instance ranged from -50°C to +1 50°C, whereas the TSP was effective over a range from -55°C to 125°C. The first version has a nominal resistance of 2000 SI at 25°C and the TSP 1 000 SI again at 25°C. The temperature co- efficient was 0.75%/° C and 0.7%/°C respectively. These last figures denoting the resistance increase, per degree celcius, as a percentage over the nominal value. The accuracy of the circuit is mainly dependant on the width of the measuring range. Which type to use is left to the discretion of the constructor. A serial resistor (R10) is applied (in series with the sensor) in order to stabilise the linearity of the sensor, especially when small measuring ranges are required. Table 2 provides a sum- mary of several ranges, with the linearity error, and serial resistor values needed. Table 3 describes, in detail, the differing sensors, together with their housing dimensions and type numbers. Construction Figure 2 illustrates the specially de- signed printed circuit board of the circuit. The dimensions of the board and the way that the components have been grouped together allow the com- pleted circuit to fit into a case manu- factured by Vero (type Nr. 65-2996H). Provision has been made for all the components to be mounted onto the printed circuit board. Constructors should make sure that low profile sockets are used for I Cl, IC2 and the display. The display can be inserted into a 40 pin socket which has been sawn in half. We also advise the use of good quality multi-turn presets. As with anything made of glass, great 3 Figure 3. An external power supply can be connected as shown. The battery is auto- matically switched oft when the plug is care should be taken when handling the display, especially when inserting it into its socket. Too much pressure on the glass plates may cause the display to appear internally smudged, permanently! When using the circuit as a normal thermometer, the decimal point DPI should be connected to point Y by means of a wire link. Obviously, depending on the application, the decimal point can be moved around, by using a rotary or slide switch, if required. As already stated earlier, the circuit is designed to take either the 7106 or the 7116. For the 7106 wire links are required across points A and B and 06, as shown on the component overlay illustration of the printed circuit board. In the case of the 7116, link 06 is removed and replaced with a link on points '16' Should you then require the ability to freeze (hold) the display reading, link AB has to be replaced with a simple on/off press button switch. Keep in mind that this facility is not available when using the 7106. The sensor can be connected to the circuit by means of ordinary insulated wire, the length of which is not critical. In fact anything up to 30 metres is possible without difficulty. For re- liability we suggest encapsulating the soldered connections of the sensor with epoxy resin or glue. A PP3 type 9 V battery is ideal for the power supply, as it has the advan- tage of fitting nicely into the battery compartment of the Vero case. Constructors wishing to feed the circuit from the mains, can install a miniature supply socket next to the battery, to cater for a 9 V mains adapter. Figure 3 clearly illustrates how this should be wired. The battery supply will be automatically cut off immediately a power plug is inserted. A single bolt or screw with a spacer ensures the circuit is firmly fixed into the case. A piece of clear perspex in the window of the case will protect the L.C.D. thermo mete Table 3 Nominal resistance value of the several types new indication KTY 1 0 old indication KTY10. KTY1 1-1 . KTY1 1-2 -3 1910 0 11% -4 1940 0 11% -5 1970 0 11% -6 2000 0 1 1 % -7 2030 0 1 1% -8 2060 0 1 1% -9 2090 0 1 1% suffix reS **£* VaUe A 2000 0 1 1% B 2000 O 1 2% C 2000 01 5% 0 2000 0 110 % TSP102, TSF102, TSU102 F 1000 Oi 1% G 1000 Oi 2% J 1000 Oi 5% K 1000 0 110% I Table 2 KTY sensors temp, range -20 . . . + 40°C 5k6 +40...+100°C 8k2 +60...+140°C 10k -20 . . . +130°C 6k8 -50 . . . +150°C 6k8 +0.08 +0.03 +0.07 . — 0,04°C . — 0,02°C . — 0,04°C . — 0,6°C ,-1°C Housings of the several types KTY10, TSP102 The housing most frequently used. The setting time is 30 s to 63% of the final value and 150 s upto 99% KTY11-1, TSF102 This is a smaller version with screw connection. The settable time is 7 s to reach 63% of the final value. Housing B KTY11-2, TSUI 02 The same case as housing B, but without screw fastening Housing C display. The switches, sockets and so forth can be mounted in the power part of the housing. The current consumption of the circuit when using the most commonly avail- able sensor (TSP102) is only 2 mA. Several sensors, which are activated consecutively by a separate switch can also be used. To do this correctly, sensors have to be selected for equality, otherwise errors in measurement readings will occur. itance for TS ... 1 02 sensors -25 ... + 45°C 0 . . ,+100°C -55 . . ,+125°C +0.05 . . . — 0,07°C +0.3 . . . — 0,2°C Calibration Perhaps we have been a little too quick to explain how to install the circuit into the case, because first of all it has to be calibrated. Initially the sensor has to be placed into a small cup of chopped melting ice. The cup should contain more ice than water, and the water must cover the ice com- pletely. Give the sensor time to react (about 5 minutes), and turn PI until the display reads 00.0. P2 sets the scale factor. How this is adjusted depends on the measuring range required. For lower temperatures (— 25°C to +45°C), P2 can best be calibrated using a normal thermometer. Insert both thermometers into a bowl of water having a tempera- ture of around 36 ... 38 C, give the sensor a little time to react, and then set P2 so that the reading on the display corresponds. Higher measuring ranges can be cali- brated by suspending the sensor in boiling water, and then adjusting P2 until the readout is 100°C. The only critical aspects of this procedure are to ensure that the water really is boiling and that the sensor does not touch the sides, or bottom of the kettle. Finally as you have completed the circuit, why waste the hot water. Make a nice cup of tea and relax. K temperature- to-voltage converter This circuit provides a simple means of constructing an electronic thermometer that will operate over the range 0 to 24 C (32 to 7S°F). The circuit produces an output of approximately 500 mV/ C, which can be read off on a voltmeter suitably calibrated in degrees. In order that the circuit should be kept simple the temperature sensing element is a negative temperature coefficient thermistor (NTC). This has the advantage that the temperature coefficient of resistance is fairly large, but unfortunately it has the disadvan- tage that the temperature coefficient is not constant and the temperature-voltage output of the circuit is thus non-linear. However, over the range 0 to 24 C the linearity is sufficiently good for a simple thermometer. Op-amp IC1 is connected as a differential amplifier whose inputs are fed from a bridge circuit consisting of R1 to R4. Rl, R2, R3 • and PI form the fixed arms of the bridge, while R4 forms the variable arm. The voltage at the junction of Rl and R2 is about 3.4 volts. With the NTC at 0 C PI is adjusted so that the output from the op-amp is zero, when the voltage at the junction of R3 and R4 will also be 3.4 V. With increasing temperature the resistance of the NTC decreases and the voltage across it falls, so the output of the op-amp increases. If the output is not exactly 0.5 V/ C then the values of R8 and R9 may be increased or decreased accordingly, but they should both be the same value. The IC can be a general purpose op-amp such as a 741, 3130 or 3140. The compen- sation capacitor C2 is not required if a 741 is used since this IC is internally compensated. Almost any 10 k NTC thermistor may be used for R4, but the smaller types will obviously give a faster response since they have a lower thermal inertia. 5 k or 15 k types could also be used, but the values of PI and R3 would have to be altered in proportion. multi- purpose time switch Using two CMOS counters it is a simple matter to construct a versatile time switch. The total cycle time of the switch can be set between zero and 93.2 hours, and the time switch can be made to switch equipment on and off at any time during this cycle. The reference frequency for the timer is the 50 Hz mains frequency. Two 4040 counters are connected in cascade and count the 50 Hz pulses. Each of these ICs is a 12-bit counter, so the maximum time that the counters will count to is 0.02 x 2 24 seconds, where 0.02 seconds is the period of the mains waveform. This is equal to 93.206 hours. If a shorter cycle time is required it is necessary that the counters be reset when the required count is reached. As an example suppose that the desired cycle time is 24 hours. The counter must therefore count up to 24 x 60 x 60 x 50 = 4320000, which in binary is 10000011110101100000000. Where a 1 occurs in this number the corre- sponding counter output is connected to one of the inputs of the diode AND gate D6 to D 1 3 . When the desired count is reached these outputs will all be high simultaneously and monostable N1/N7 will be triggered, giving the counter a reset pulse. A manual reset button is also provided. Any other desired cycle time up to the previously mentioned maximum may also be accommo- dated, but obviously some counts will require more or less diodes in the AND gate. The switch-on and switch-off times of the equipment to be controlled are also deter- mined in the same manner. The binary equivalents of the on and off times are calculated and the appropriate counter out- puts are connected to AND gate inputs B1 to B4 for switch-on and Cl to C4 for switch- off. At switch-on monostable N2/NS is triggered, which sets flip-flop FF1, turning on T1 to activate the relay. At switch-off monostable N3/N6 is triggered, which resets FF1. Manual controls are also provided. If several circuits are to be controlled with different switch-on and switch-off times then N2, N3, N5, N6, FF1 and T] may be duplicated. The one disadvantage of this circuit is that initially it must be reset at the time that the timing cycle is required to start, i.e. there is no time-setting facility, so in the event of a power failure it would be necessary to wait until the correct start time before resetting the circuit. For this reason it is best to make the start of the timing sequence occur at a convenient moment, such as in the morning or early evening. To make the clock input of the counter less susceptible to interference pulses on the mains waveform it may be a good idea to precede it by a Schmitt-trigger using two CMOS NAND gates reading- in- bed limiter At a certain age, children are often packed off to bed with the final admonition: 'All right, you can read in bed for a quarter of an hour, but then you must turn off the light and go to sleep'. However as most parents will know, the children tend to suddenly loose all sense of time in this situation . . . When a member of the Elektor design team was faced with this problem, he started looking for an electronic solution. The final circuit, as published here, has proved extremely effective. Figure 1. Complete circuit of the reading-in- bed limiter. SI must be a key-switch that can only be operated by the parents. In the situation outlined above, what is really required is a unit that will auto- matically turn off the bedside reading lamp after the specified time has elapsed. This time switch must have a few special features: - It should only be possible for the parent(s) to switch on the lamp. This can be achieved by using a Key It should be possible for the child to turn off the lamp before the alotted time has elapsed, if it finds that it is getting too sleepy to read. Since the child hasn't got the key to the main switch, a further reset button is required. For safety reasons, it is essential to use a low-voltage lamp. The whole circuit, including the lamp, should be run off a reliable mains transformer. Since they are easy to obtain, a logi- cal choice is to use a 12V lamp as used in cars. The circuit The obvious choice for the timer itself is the SSS timer IC, since this can be set to give delay times up to several hours with complete reliability. Furthermore, the obvious transistor type to use for switching the lamp is the well-known 'work-horse' the 2N3055. Having chosen these two components, the cir- cuit design is almost finished! The com- plete circuit is shown in figure 1 . The IC is used as a monostable multi- vibrator (MMV). The duration of the output pulse is set by a single RC- network, R1 and C2. In this particular application, the pulse duration is practically equal to the RC time. If Rl is 1 M and C2 is 1000 ft, as shown, the RC time is 1 000 seconds, or iusl over a quarter of an hour. Note that any leakage in C2 will extend this time appreciably; for this reason it is advis- able to use a tantalum electrolytic, and not to increase the value of Rl any further. Initially, C2 is discharged. When the cir- cuit is switched on via the key-switch S I , C2 starts to charge through Rl During this time, the output of the IClpin 31 is at positive supply level. This turns on transistor Tl . lighting the lamp. R2 limits the base current to the transistor. With the type of lamp shown (12 V. 10 . . . 15 W). the dissipation in Tl should be so low that a heat sink is not required. The supply to the lamp is the raw, full-wave rectified supply voltage. There is nothing to be gained by smoothing this supply. An extra diode (D5) and a relatively small smoothing capacitor (Cl ) are used for the supply to the IC. When the RC-time has elapsed, the out- put of the IC switches to 0 V, turning off Tl and the lamp. Pushing the reset button (S2) will switch the lamp off sooner Since the 'set' input (pin 2) is not used, the only way to switch the lamp on again is to first turn the supply off, wait until C2 has discharged, and then switch on again. Officially, this should be done with the key-switch. It is not advisable to demonstrate even once that the same effect can be pro- duced by pulling out the mains plug for A printed circuit board layout for the unit is shown in figure 2. Note that sufficient care should be taken with the mains connection. Use good cable, a rubber grommet where the cable enters the box, and some form of clamp over the cable just inside the box so that there is no 'puli' on the con- nection to the transformer. N Figure 2. Printed circuit board and com- ponent layout for the unit. Tl can be mounted on the board, since a heat-sink should not be necessary (EPS 16601. Digilex Inexpensive Digital Trainer Eventhough it is possible to decipher the functions of digital circuits with paper and pencil, it is much more exciting to try out the circuits in actual practice. And to bring you the excitement, we have put together a digital experimenting system, namely the Digilex- Board. This has been designed in such a way that no soldering work is required while trying out the experiments. The circuit can be hooked up in a minute and tested. Digilex is conceived as a suppliment to our Digi-Course. The experimental instructions refer to this system. Naturally, all other possible circuits can also be tested on this board. Digilex-Board has place for five 14 pin and two 16 pin ICs of the inexpensive TTL series. 1C sockets are soldered on the board, instead of directly soldering the ICs, so that different ICs can be tried out. The ICs listed in the component list provide for eight NAND gates and four NOR gates. (The meaning of NAND and NOR is explained in the Digi-Course.) All the input/outputs of the ICs. except for the voltage supply connections, are brought to the pins through copper tracks. The pins are soldered on the PCB, and the experiments are connected with wire bridges having plug sockets soldered at the ends. These plug sockets fit onto the pins soldered on the PCB. Eight LEDs are provided for indicating the individual logic states during the experiments. Power supply to the board can be given in three different ways. 1 . With a 4.5 V battery. Although the rated operating voltage of the TTL-series ICs is 5 Volts, even 4.5 V can be used. The battery supply can be directly given at the plus and minus connections on the board. 2. With the help of power supply circuit on the Digilex-Board. In this case, a 9 V transformer forms the source of power. The transformer must be properly housed in a casing with good insulation from the mains connection. The power supply circuit on the board rectifies the 9 V AC voltage from the transformer and stabilises it to 5 V DC. 3. With a 9 V unregulated battery eliminator. The 9 V DC output of the battery eliminator can be connected to the input of the stabiliser circuit on the board; consisting of capacitors C7 and C8 along with the stabiliser 1C 8. The rectifier diodes D9 to D12 are not used in this case. The assembly of the Digilex-Board is very simple. The resistors are soldered first, then the capacitors and then the semiconductors. While soldering the semiconductors and electrolytic capacitors, remember to keep the polarity correct. The voltage regulator 1C 8 (7805) is fitted with a screw on the board, along with the heat sink. As the earthing pin of the 1C (center pin) is internally connected to the cooling fin, care should be taken so that the other two pins do not touch the heatsink anywhere. Insulating sleeves can be used on these two pins for this purpose. It is needless to say that only best quality hardware and components should be used to avoid problems in In case of brand new ICs, the pins stand far apart from the desired spacing of the socket, and it is necessary to gently press the rows of pins towards the centerline of the 1C to match with the socket dimensions. Also check that the marking on the 1C is as per the orientation shown in the printed component layout on the board. The wire used for the connecting bridges should be of the multi-strand type, so that it does not break quickly during use. The Circuit Figure 5 shows only the essential features of the circuit of the Digilex-Board. The supply is connected to pins 1 4 (+) and pins 7 (-) of the ICs 1 , 2 and 3, as well as the tracks marked (+) and (-). All the eight indicator units consist respectively of a transistor, two resistors and an LED. Whenever there is a logic 1 (5 V) at the input A H, current flows through the 1 K ohm resistor into the base of the transistor and makes the transistor conductive. When the transistor conducts, current flows through the LED and the LED glows. The 180 ohms resistor limits the current through the LED. When there is logic 0 (0 V) at the input A H, no current flows and the LED does not glow. Capacitors Cl to C6 serve as noise suppressors and prevent any spurious triggering. Diodes D9 to D12 form the rectifier bridge to convert the AC voltage from the transformer to DC voltage Capacitors C7 and C8 serve as filters to smooth out the rectified DC voltage and 1C 8 provides a stabilised 5 V output., which is also short circuit protected. When using the Digilex-Board. care should be taken not to connect any of the gate outputs either to ground or to 5 V supply line, and for the sake of safety, the power supply should be disconnected before plugging the ICs into the sockets. 3 Suggestions for a variety of connecting bridges. Digi-Course Chapter 2 NAND, NOR Three basic operations of the binary system of numbers— namely the AND. OR and NOT operations were introduced in Chapter 1 of our Digi-Course. All these operations can be carried out by electronic circuits called gates. Figure 1 will help in refreshing ~..r numnrv about these gates and their truth tables. The truth table, as we have seen before, presents a precise picture of how the gate output behaves in response to different input combinations. The symbols + and • used here have nothing to do with the usual addition and multiplication symbols. Here the symbol • stands for AND operation and the symbol + stands for OR operation. NOT operation is characterised by a horizontal bar. The TTL gates process the binary numbers in form of voltage levels 0 V and 5 V. An OR gate produces a 5 V output in response to 5 V at least at one of the inputs, (see the second, third and fourth line of the OR truth table.) With the new Digilex-Board the truth table can be tested easily. But stopl The Digilex-Board has no AND. OR. NOT gates. What to do? Possibility 1 . : Purchase one AND gate 1C. one OR gate 1C and one NOT gate 1C (see figure 9 for type specification) and use in place of the NAND gate 1C on the Digilex-Board. Possibility 2. : Check, if a NAND gate 1C can also be used to create AND. OR, NOT functions? AND o NOT What is actually a NAND? "NAND" is the combination of NOT and AND; both in the verbatim sense as well as in the technical sense. The truth table of the NAND operation can be derived from that of the AND operation. Table 1 . Let us observe the last two lines carefull y. In b oth the cases A is "1". B and the NAND-output A • B are exactly opposite of each other. In other words, when A is at 5 V, the NAND gate behaves as an inverter or the NOT gate. (Since the TTL gates interpret an unconnected input as "1". one need not bother about A at all. But this feature is seldom made use of in practice.) The same is true when B remains "1", the input A is then inverted. And finally when A and B both are identical, both are simultaneously inverted. This means that when A and B are physically tied together, the NAND gate behaves as an inverter or NOT gate. 3