Silicon ChipBuild A Digital Water Tank Gauge - April 1994 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Should we reduce our mains voltage to 230V?
  4. Feature: Electronic Engine Management; Pt.7 by Julian Edgar
  5. Project: Remote Control Extender For VCRs by John Clarke
  6. Project: Sound & Lights For Level Crossings by John Clarke
  7. Project: Discrete Dual Supply Voltage Regulator by Darren Yates
  8. Project: Low-Noise Universal Stereo Preamplifier by Darren Yates
  9. Feature: Microcontrollers With Speed by Darren Yates
  10. Serviceman's Log: Nothing unusual happened this month by The TV Serviceman
  11. Order Form
  12. Review: PC Product - The Video Blaster by Darren Yates
  13. Project: Build A Digital Water Tank Gauge by Jeff Monegal
  14. Feature: Spectrum Analysis With The Icom R7000 by James Lloyd & John Storey
  15. Product Showcase
  16. Feature: G-Code: The Easy Way To Program Your VCR by Leo Simpson
  17. Back Issues
  18. Vintage Radio: Bandspread tune-up for an Astor multi-band receiver by John Hill
  19. Notes & Errata: Stereo Preamplifier with IR Remote Control, September-November 1993
  20. Market Centre
  21. Advertising Index
  22. Outer Back Cover

This is only a preview of the April 1994 issue of Silicon Chip.

You can view 28 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Electronic Engine Management; Pt.1 (October 1993)
  • Electronic Engine Management; Pt.1 (October 1993)
  • Electronic Engine Management; Pt.2 (November 1993)
  • Electronic Engine Management; Pt.2 (November 1993)
  • Electronic Engine Management; Pt.3 (December 1993)
  • Electronic Engine Management; Pt.3 (December 1993)
  • Electronic Engine Management; Pt.4 (January 1994)
  • Electronic Engine Management; Pt.4 (January 1994)
  • Electronic Engine Management; Pt.5 (February 1994)
  • Electronic Engine Management; Pt.5 (February 1994)
  • Electronic Engine Management; Pt.6 (March 1994)
  • Electronic Engine Management; Pt.6 (March 1994)
  • Electronic Engine Management; Pt.7 (April 1994)
  • Electronic Engine Management; Pt.7 (April 1994)
  • Electronic Engine Management; Pt.8 (May 1994)
  • Electronic Engine Management; Pt.8 (May 1994)
  • Electronic Engine Management; Pt.9 (June 1994)
  • Electronic Engine Management; Pt.9 (June 1994)
  • Electronic Engine Management; Pt.10 (July 1994)
  • Electronic Engine Management; Pt.10 (July 1994)
  • Electronic Engine Management; Pt.11 (August 1994)
  • Electronic Engine Management; Pt.11 (August 1994)
  • Electronic Engine Management; Pt.12 (September 1994)
  • Electronic Engine Management; Pt.12 (September 1994)
  • Electronic Engine Management; Pt.13 (October 1994)
  • Electronic Engine Management; Pt.13 (October 1994)
Items relevant to "Remote Control Extender For VCRs":
  • VCR Remote Control Extender PCB pattern (PDF download) [15303941] (Free)
Items relevant to "Sound & Lights For Level Crossings":
  • Level Crossing Sound and Light Simulator PCB pattern (PDF download) [15203932] (Free)
Items relevant to "Discrete Dual Supply Voltage Regulator":
  • Discrete Dual Voltage Regulator PCB pattern (PDF download) [04103941] (Free)
Items relevant to "Low-Noise Universal Stereo Preamplifier":
  • Low-Noise Universal Stereo Preamplifier PCB [01106941] (AUD $5.00)
  • Universal Low Noise Preamplifier PCB pattern (PDF download) [01106941] (Free)
Do you have a water tank on your property? This digital gauge will let you keep tabs on the water level without having to look in the tank itself. It has the option of two digital dis­plays & is controlled by a microprocessor. By JEFF MONEGAL Build this digital water tank gauge W HILE MOST people on farms have large water tanks, they are now also becoming more common in the cities for people who want rain water to drink or for use on their gardens. On a farm (and now in the cities), water conservation is paramount and keeping a con­stant eye on water usage is mandatory. The problem arises when users need to take a reading of the present tank level. This usually involves trudging out to the tank with a calibrated measuring stick, manoeuvring a heavy manhole cover out of the way, then dipping the stick into the tank to read off the contents. It would be much easier to glance at a digital display in the kitchen; especially if your tank is 200 metres 60  Silicon Chip from the house and it is a freezing day. Freeze no more, this digital tank gauge will do the job. It has a 2-digit display which indicates the tank contents from zero to 99%. If you have access to a secondary water supply such as a bore, the project will also control a pump to maintain the level of water in the tank at a preset percent­age. The digital tank display consists of two parts: the main unit which sits out on the tank and the remote display which is situated in the house; it can be up to 800 metres from the main unit. The main unit contains most of the electronics, including the microprocessor. The remote display will normally be situated in the kitchen but a second display can be built in the unit at the tank. This is how the prototype was built and how it is shown in the dia­ grams and photos in this article. Like many projects, this one was borne out of necessity. The author lives on a property which uses a concrete water stor­age tank and so this project was produced, the result of many months of research and development. Four prototype installations were used and originally the project used many ICs (13 just for the main unit) to achieve the desired result. As time and the project evolved, 10 of the ICs were replaced with a micropro­cessor and more functions were added. Principle of operation Essentially, the circuit works by transmitting a pulse of ultrasonic en- Circuit description Fig.2 shows the main circuit of the Digital Tank Gauge while Fig.3 shows TRANSDUCER HEAD ASSEMBLY TANK LID OVER-FLOW OUTLET WATER INLET PIPE FROM HOUSE GUTTERING MAXIMUM WATER LEVEL 90mm PVC TUBE FITTED THROUGH HOLE CUT IN STRAINER BASKET CONCRETE OR STEEL TANK CABLE TO MAIN PCB 400mm ergy down a tube to the surface of the water. The pulse is reflected off the water surface back to an ultrasonic receiver. The microprocessor then com­­ putes the time period bet­ ween the initial pulse and the received pulse and then calculates the level of water in the tank as a percentage. Fig.1 shows the general installation with the transducer assembly mounted at the top of a tube which fits into the tank. You may wonder why the tube is necessary. There are two reasons. The transmitter only pulses the ultrasonic transducer very briefly but being a mechanical device, the transducer will continue to “ring” for some time after each pulse. Because of this, the system has a minimum range below which it will not function. Therefore, the transducer must be positioned so that the a minimum distance above the highest water level is 400mm. This means that the transducers must sit above the top of the tank. The tube acts as a support for the transducers, suspending them 400mm above maximum water level. The second reason for the tube is that it acts as a baffle. The surface of the water can be quite rough at times, especially when the tank is being filled from a tanker or during heavy rain. This rough water surface can result in readings which jump up and down by as much as 10%. By using the tube, the surface of the water inside is very smooth. One of the problems with the test units was a jittery dis­play. Software was then written to allow the microprocessor to store the last five readings and then only to update the display if they are all equal. This results in a much more stable display. Once conversion has been done, the microprocessor displays this value on its digital display and then transmits the reading to the remote dis­play. The microprocessor then compares the present reading against presettable upper and lower limits to see if a pump should be turned on or off. As well, diagnostic routines are written into the software. The reading is updated every few seconds and an alarm in the remote display will sound every half hour for a few seconds if the level in the tank drops below 20%. EXISTING PLASTIC STRAINER BASKET WATER LEVEL Fig.1: this diagram shows the general scheme for mount­ing the ultrasonic transducers in a tube above the surface of the water. The transducers must be mounted 400mm above the maximum water level in the tank. the circuit for the remote display. The entire cir­cuit is under the control of a 68705P3 microprocessor which has internal RAM and ROM. The latter memory stores the program which controls the transmitter and receiver circuits and drives the digital displays. Let’s start the circuit description with the ultrasonic transmitter which is shown at the top right-hand corner of Fig.2. Actually, the microprocessor (IC4) is the source of the transmitter signal. Its pin 16 delivers a 3-cycle burst at 40kHz which is fed to transistors Q2 and Q3 to drive the ultrasonic transducer X2. Q2 and Q3 are fed by an adjustable DC supply comprising transis­ tor Q1, trimpot VR3 and This is the transducer assembly for the Digital Tank Gauge. It consists of the two ultrasonic transducers (transmitter & receiver) plus a small light bulb which automatically switches on at night & serves as an anti-condensation heater. April 1994  61 62  Silicon Chip 100k VCC B CE 12-16V AC OR DC BR1 W04 LDR ANTI CONDENSATION HEATER D2 1N914 2.7k 1% ULTRASONIC RECEIVER X1 E CB  B E C 10 A 6 7 K B 47 .01 1k 2200 Q6 BC548 .0047 VR2 10k 10k 1% 1k 1% VR1 50k .01 VCC C E 10 5 3 +12V 1 8 .01 1.5k E C VIEWED FROM BELOW B LED1 LAMP Q7 BD139 IC3 555C 2200 2 4 27k 27k 27k  3 2 ZD1 10V 1 C 10k F 10k 27pF 22 E 10k D B 10k 10k A 10k 10k SET UP X3 3.58MHz IC1a LM358 2.2M 2.2pF 5 4 11 10 9 8 19 18 17 12 7 10k PC3 PC2 PC1 PC0 PB7 PB6 PB5 2 3 6 5 6 7 IC4 68705P3 VPP 4 IC6 LM741 220  1 VSS TMR/BT PB0 .01 4 3 SET VOLTS VR4 1k 6 1 9 IC9c 10 1 4011 3 6 5 7 LE A 7 4 b B 1 c 820  20 16 2 13 26 4.7k 1k E 100 Q5 TIP31 B BUZZER 8 Q4 BC548 C B 7.5k 15 21 E C VCC 2 GND VCC +12V 100k 7 0.47 IC9a 7x 470  16 4 a BI 6 D d IC8 4511 2 e 7 f 4 2 g a b 1 9 10 g 15 14 LT 1k 6 5 1 5 6 11 8 3 8 3 a LT 7 b B 1 c 10k 0.47 C 6 D d IC7 4511 2 B e Q2 BC548 7 f 4 2 g a b 1 3,8 e c d DIS1 MSD LC5611 6 B 68  C E f BI LE 9 10 4 E C VCC 100k Q8 BC548 RLY1 ULTRASONIC TRANSMITTER X2 Q3 BC559 0.47 16 4 5 IC9b g 15 14 6 5 VCC B D3 1N4004 +12V CRO TRIGGER E C 4.7k 1k 47k 13 12 11 10 9 A ALARM TX CLOCK TX DATA TX 100 7x 470W VCC 2 4 2 10 3 3 VCC E DIGITAL TANK GAUGE 3,8 e c d DIS2 LSD LC5611 6 f 8 IC5 MC3487 16 B Q1 BC548 0.47 13 12 11 10 9 C 7 1 100  28 RESET PB3 PA5 TP2 .01 14 VR3 1k 27 47k 10  IC2b 4093 5 10 9 VCC D1 1N914 TP1 VCC +12V 14 7 PA1 25 24 PA2 23 PA3 22 PA4 PA0 PB4 INT PB1 PA6 PA7 VCC PB3 IC1b 8 VCC 1M C ▲ Fig.2: the circuit of the Digital Tank Gauge is based on a 68705P3 microprocessor (IC4) which is programmed with software to provide quite a few functions. The microprocessor pulses ultraso­ nic transmitter X2 via Q2 & Q3 & counts the time until a return pulse is received at transducer X1. It then converts the count to a percentage reading for the 2-digit display. associated components. After sending the transmitter pulse, IC4 takes pin 6 of IC2b briefly low to allow for the ringing period of the transmitter. Then it goes high again, to enable the receiver circuitry. The reflected pulse is picked up by the ultrasonic receiver transducer X1 (see top lefthand corner of Fig.2). This is AC-coupled to trimpot VR1 and then fed to op amps IC1a & IC1b, which have a combined gain of about 3700 at 40kHz. Pin 7 of IC1b drives diode D1 which charges the .01µF capacitor at pin 5 of IC2b. When a pulse is amplified by IC1 and detected by D1, the voltage at pin 5 of NAND gate IC2b will go high. The other input of IC2b is high, as determined by the microprocessor. Hence, IC2b’s output goes low and pulls the interrupt pin (4) of the microprocessor low which is the cue for a number of events. First, it takes pin 6 of IC2b low. This effectively closes the gate. During the time between the transmitter pulse and the received pulse, the microprocessor counts pulses from IC3, a 555 timer connected in astable mode. The count is converted to percentage terms and sent to the local and remote displays. A couple of internal counters are now reset and the microprocessor waits for a few seconds and then does it all again. This photograph shows the main PC board in the local unit. The microprocessor is clearly visible at centre right & is mounted in a socket (sockets for the other ICs are optional). Note the heatsink fitted to Q5. A piezo buzzer connected to pin 15 of the microprocessor is used to communicate with anybody who wants to listen. Each time a reading is taken the buzzer will beep once. If the processor talks to the remote display, it will beep the buzzer again. If the setup link (pin 12, IC4) is in the setup position, then the microprocessor does not check the last five readings. It simply sends the last reading to the displays and gives a beep. If the link is in normal mode then the microprocessor will compare the last reading with the previous four readings and if they are all equal it will talk to the remote display as well as the local display. When it does talk to the displays, it will give another beep. What all this means is that if the buzzer beeps once then an echo was received after the last transmission. If the buzzer beeps twice, then an echo was received and the processor sent the reading to both displays. There is a third buzzer indication and that is six short beeps. This means that a burst of energy was sent but no echo was received within the time allowed for the pulse to go Local display The local display is driven by 4511 7-segment decoder/drivers, IC7 & IC8. Also on the local display PC board is Q8. If the upper and lower trigger points have been set, the microprocessor uses Q8 to drive relay RLY1. The relay supplied is rated at 10 amps and 240VAC. The local PC board is connected to the expan­sion plug on the main PC board via a standard 10way ribbon cable and IDC (insulation displacement connectors) connectors. The display board in the local unit is connected back to the main PC board via a 10-way cable fitted with IDC connectors. April 1994  63 The PC boards for the remote display unit fit inside a small plastic instrument case with a red filter at one end for the displays to shine through. The buzzer can be considered optional & can be left out of circuit. down to the bottom and return. This may mean that the calibration is not set correctly. Want to leave that buzzer out? Why not? Once you have the unit up and running, this buzzer is largely superfluous. Remote display data As noted above, you can have a remote display which can be up to 800 metres away. The 8-bit serial data is sent via standard 6-way telephone cable by IC5, a Motorola MC3487 RS422 line driver. The microprocessor sends data to pin 1, clock signals to pin 7 and any alarm information to pin 9. IC5 converts these single line digital signals to two-line antiphase signals and these are sent along the telephone cable to the MC3486 quad RS-422 line receiver chip (IC1, Fig.3) which converts them back into single line digital signals. Monostable IC3a & IC3d is triggered on the positive edge of the first clock pulse from IC1. Pin 3 of IC3 goes high while the BCD data is clocked into 8-bit shift register IC2. This takes about 4ms. About 5ms later, pin 3 of IC3 will go low and this signal is AC-coupled to the latch enable pins of the display driver chips, IC4 & IC5. The data sent by the microprocessor is then shown on the 7-segment displays. When pin 3 of the monostable goes 64  Silicon Chip low at the end of its time period, pin 11 of IC3d goes high and triggers a second monostable comprising IC3c & IC3b. Pin 10 of IC3c goes low and at the end of the timing period will go high again and reset the shift reg­ister ready for another 8-bit word from the microprocessor. The whole process then repeats itself. Alarm A third line into the remote display is for the alarm. If the contents of the tank drop below 20%, the microprocessor takes its pin 14 high. This high appears at pin 13 of IC1 on the remote display board; it enables oscillator IC6a and, via IC6b, removes the reset condition on counter IC7. IC7a’s output drives the blanking inputs of IC4 and IC5, causing the display to flash. Counter IC7 now starts to count the pulses from the Schmitt oscillator, IC6a. 2048 pulses later, its pin 1 goes high and triggers monostable IC6c & IC6d and at the same time resets itself via D3. Pin 11 of IC6d now turns on Q2 which drives the buzzer. Therefore, approximately every 30 minutes the buzzer will beep on and off for about 6 seconds. If the alarm condition is removed by filling the tank up above 20%, the buzzer will stop and the display will cease flashing. (Editor’s note: if you decide that having the display flashing is enough warning of a low tank, you could dispense with the buzzer and the components associated with Q1 & Q2). Transducer heater The circuit built around transistors Q6 and Q7 (Fig.2) turns on a light bulb which is situated on the same board as the two trans­ducers. During daylight hours, the LDR (light dependent resistor) has a low resistance which holds Q6 and therefore Q7 off. The result is that the lamp is out. When night falls the resistance of the LDR rises. At a point around dusk, Q6 will turn on. This will supply base current to Q7 and the lamp will light. The lamp supplies a little warmth to the transducers to keep condensation from forming on them. Finally, we come to the power supply. This uses op amp IC6 to control a Darlington transistor pair (Q4 & Q5). A 10V zener, ZD1, regulates the supply to IC6 and trimpot VR4 is used to set the output voltage, Vcc, to +5V. Not much more can be said about the circuitry itself except that if the remote display is less than 100 metres from the main unit, then power can be supplied down the main data cable by using 8-core cable. If the distance is further than that, a sepa­rate power source will be required. Assembly The alarm board in the remote display unit sits upside down on top of the main board, as shown in this photograph. When building this project you must decide whether or not to include the local display PC board. If you only want to have a display in the house of DISP1 MSD LC5611 VCC 16 16 9 7 CLK D Q0 5 7 4 1 Q1 IC2b 4015 Q2 3 10 Q3 RST 6 3 LT A f B 2 C 6 5 e IC4 4511 D d c LE 4 b BI a 1 ALARM 14 CLOCK 7 6 10 15 9 9 1 10 2 11 4 12 6 13 7 a f e c d DISP2 LSD LC5611 VCC IC1 MC3486 15 3 5 1 RST 13 D IC2a CLK 13 7 12 1 11 2 2 6 VCC 3 LT A g f B C e IC5 4511 D 5 8 d c LE 4 b BI a 7x 470  10 14 15 9 9 1 10 2 11 4 12 6 13 7 a f g e 5.6k 1 11 c 0.1 3 IC3a 2 VCC 0.1 0.1 8 IC3c 9 27k 3,8 D1 1N914 27k 1 b d 8 4001 14 13 IC3d 12 b 3,8 16 14 8 g 27k D2 1N914 2 15 14 8 16 12 4 DATA g 7x 470  10 VCC 5.6k 1 4.7k 5 IC3b 4 Q1 BC558 C 6 7 E B VCC BUZZER VCC IN GND 5 OUT 6 14 270k IC6b 4093 4 D3 1N914 10k IC6a IC6c 10 VCC 3 2 RST IC7 4040 16 10 Q12 12 IC6d 11 4.7k C B E D5 1N914 Q2 BC548 1 47k BR1 W04 CLK 8 220k 22 13 9 11 1 8 7 B E C VIEWED FROM BELOW D4 1N914 IN 12-16V AC OR DC 1000 4.7 7805 GND OUT 10 VCC .0033 DIGITAL TANK GAUGE REMOTE DISPLAY Fig.3: the remote display has data sent to it via an RS-422 link which is converted back to normal data by IC1. The data is fed into shift register IC2 & then decoded by IC4 & IC5. present tank contents and not a display on the main unit then you do not need the extra PC board. Alternatively, you may opt not to have a display in the house, thereby saving the prob­lems of running the data cable. In this case, all you need to do is install the unit as described and supply power at the tank. Normally the main pump is situated near the tank and from here you can get power. Depending on what type of installation you want, there can be up to five circuit boards to build. We will start with the main PC board. Go over the PC board with a magnifying glass to spot any track faults and fix any that you find. This done, insert the resistors, capacitors and trimpots. Next, insert all diodes and transistors, making sure that they are correctly oriented, then insert all remaining components but at this stage do not install the microprocessor. Check all your work to ensure that all components are in the correct positions and properly soldered. Now connect a DC or AC supply of 10 to 18V. LED1 should light. Using your multi­ meter measure the voltage at the emitter of Q5. Adjust trimpot VR4 until the meter reads +5V. Measure the voltage at the supply pins of all chips and ensure that +5V is present. Measure the voltage at the emitter of Q1. It should be somewhere between April 1994  65 SQ-40R X1 Fig.4: the component wiring diagram for the main unit with local display. Note that the local display is optional. SQ-40T X2 12V LAMP 0.47 2.7k D2 Q1 LAMP IC9 4011 0.47 Q8 0.47 D 1 D3 4.7k 1 TO RLY1 TO EXPANSION SOCKET ON MAIN BOARD 1 +8V and +15V. Adjust trimpot VR3 and make sure that the voltage reading varies. Reset the voltage to +8V for the time being. Before you can go any further a display must be built. Either the local or remote display will do. Our description will start with the local display. Insert all components into the PC board and solder them in. Ensure that the displays are insert­ed the correct way. Having completed the local display the system can be tested. Using the 66  Silicon Chip 100k TX F E BUZZER 1 2 100k 5 1uF SET UP ALARM TX RX EXPANSION CLOCK TX 1 DATA TX VR1 .01 27k B 27pF .01 1 A C IC4 68705P3S 10uF 1 LK2 X3 2.2M 27k 27k IC8 4511 6 47uF 2.2pF 10k 1 1 IC5 MC3487 .01 IC1 LM358 LK1 10k 10k 10k 10k 10k 10k 1M 10k IC7 4511 68  47k .01 TP1 Q7 LDR TP1 CRO TRIG 10  D1 470  TP2 10k 1 Q5 1 3 IC2 4093 Q6 Q2 0.47 1 4 VR2 1k 100uF 470  470  470  470  470  470  470  VR3 7.5k Q3 470  470  470  470  470  470  470  1k .01 1k 10k 100uF 100k 10uF VR4 22uF 1.5k IC3 555 DISP2 Q4 K 10k 1 LED1 A 2200uF DISP1 1 1k 47k .0047 820  10uF IC6 LM741 4.7k 2200uF 100  220  BR1 ZD1 12-16V AC OR DC assembled cable supplied, connect the local display to the main PC board expansion pins, insert the microprocessor and switch on. After a few seconds the buzzer should give six short beeps. There may or may not be anything on the display. Place the setup link in the setup position, furthest away from the microprocessor. This shorts pin 12 of IC4 to pin 7. The buzzer should beep six times, pause about a second, then beep six times again. This will contin­ ue as long as the transducers are not connected. Place the setup link in the normal position. The six beeps will now be followed by a 6-second gap. If everything is happening as described then your system will function correctly when the transducer assembly is connected. Transducer assembly The transducer assembly can be built now. Solder the two transducers into the PC board as well as the lamp holder. Next connect the cable. The cable used has to be 3-core shielded. D5 22uF D4 IC6 4093 IC7 4040 10k 1 220k D3 4.7uF 10uF 1 Q1 BUZZER 1 1 Q2 4.7k 47k 270k 4.7k Fig.5: the component wiring diagram for the remote display. This has three boards, the one at the top providing a tank level alarm. 1 7x 470  27k 0.1 .0033 1 7805 6 A BR1 1 D2 0.1 27k 5.6k 100uF 7x 470  1 27k IC3 4001 0.1 1uF IC4 4511 5 DISP2 1 1uF 1 4 IC2 4015 B DISP1 3 IC5 4511 IC1 MC3486 2 5.6k TO MAIN PCB MATCHING NUMBERS Solder two leads to the active sides of the transducers and the third lead to the positive side of the lamp. The earth braid goes to the earth track on the PC board. Be sure to remem­ber which cable went to which point as the transmitting and receiving transducers will not work properly if they are swapped over. Next, connect the transducer assembly cable to the corre­ sponding terminals on the main PC board. Place the setup link into the setup position, then place the transducer assembly over the 90mm tube in the tank and again supply power. This time after a few seconds the buzzer should beep twice then after a second or two beep twice again. This should then continue as long as power is connected. The display should show some number. Adjust the cali­bration trimpot VR2 and the reading should vary. If all is well, then measure the actual depth of water at the moment. Convert this to a percentage of the maximum level of water, then adjust the calibration trimpot VR2 until the reading on the display corresponds with the calculated reading. Do not worry if the reading jumps a digit or two either side of the value you want as this is quite normal. Now place the link in the normal D1 12-16V AC OR DC position and listen to the buzzer. This time the buzzer will beep once every six seconds. If it beeps a second time then the display is updated. The software remembers the last four readings and compares the last reading with these. If they all the same then the displays are updated and the buzzer is The light dependent resistor (LDR) is mounted on the top of the case & is connected back to its terminals on the main PC board via flying leads. It can be secured in position using epoxy resin. beeped a second time to indicate that the reading is correct and the display was updated. When in the setup mode this software checking of the last four readings is by­passed. The last thing to be done at the main PC board is to test the anti-condensation heater. Connect the LDR to the The display board in the remote display unit is soldered at right angles to the main board. Lightly solder tack the two outside connections first, then make any necessary adjustments before soldering the remaining connections. April 1994  67 PARTS LIST 1 PC board, code CE/93/DTG, 128 x 84mm, 1 PC board, 100 x 52mm (local display) 1 PC board, 70 x 32mm (transducer head assembly) 1 plastic utility case, 159 x 95 x 54mm (Altronics Cat H-0151) 1 3.579MHz crystal (X2) 1 SQ-40R 40kHz ultrasonic receiver (X1) 1 SQ-40T 40kHz ultrasonic transmitter (X2) 1 PC-mount piezo buzzer 1 MES lamp and holder 1 12V DC 500mA plugpack 1 U-shaped heatsink to suit Q5 (Altronics H-0502) 2 10-pin DIL header sockets 1 10-way cable for local display 1 50kΩ 10-turn trimpot (VR1) 1 10kΩ horizontal trimpot (VR2) 2 1kΩ horizontal trimpots (VR3, VR4) 1 1µF 16VW electrolytic 4 0.47µF monolithic 3 .01µF monolithic 1 .0047µF metallised polyester 1 27pF ceramic 1 2.2pF ceramic Semiconductors 1 TL072 dual op amp (IC1) 1 4093 quad NAND Schmitt trigger (IC2) 1 555 timer (IC3) 1 68705P3 programmed microprocessor (IC4) 1 MC3487 RS-422 line driver 1 741 op amp (IC6) 2 4511 7-segment decoder/drivers (IC7,IC8) 1 4011 quad NAND gate (IC9) 5 BC548 NPN transistors (Q1,Q2,Q4,Q6,Q8) 1 BC559 PNP transistor (Q3) 1 TIP31 NPN transistor (Q5) 1 BD139 PNP transistor (Q7) 2 1N914, 1N4148 signal diodes (D1,D2) 1 1N4004 silicon diode (D3) 1 3mm red LED (LED1) 2 LC5611-11 7-segment LED displays 1 W04 bridge rectifier (BR1) 1 10V 1W zener diode (ZD1) Semiconductors 1 MC3486 RS-422 receiver (IC1) 1 4015 dual 4-bit shift register (IC2) 1 4001 quad NOR gate (IC3) 2 4511 7-segment decoder/drivers (IC4,IC5) 1 4093 quad NAND Schmitt trigger (IC6) 1 4040 12-stage counter (IC7) 1 7805 3-terminal 5V regulator 1 BC558 PNP transistor (Q1) 1 BC548 NPN transistor (Q2) 1 W04 bridge rectifier (BR1) 5 1N914 signal diodes (D1-D5) Capacitors 2 2200µF 16VW electrolytic 1 1000µF 16VW electrolytic 2 100µF 16VW electrolytic 1 47µF 16VW electrolytic 1 22µF 16VW electrolytic 3 10µF 16VW electrolytic 68  Silicon Chip Resistors (0.25W, 5%) 1 2.2MΩ 1 1.5kΩ 1 1MΩ 5 1kΩ 3 100kΩ 1 820Ω 2 47kΩ 14 470Ω 3 27kΩ 1 220Ω 10 10kΩ 1 100Ω 1 7.5kΩ 1 68Ω 2 4.7kΩ 1 10Ω 1 2.7kΩ Remote display 1 PC board, 85 x 50mm (main) 1 PC board, 50 x 25mm (display) 1 PC board, 60 x 50mm (alarm) 1 plastic case, 120 x 60 x 30mm 1 buzzer (with internal electronics) Resistors (0.25W, 5%) 1 270kΩ 1 10kΩ 1 220kΩ 2 5.6kΩ 1 47kΩ 2 4.7kΩ 3 27kΩ 14 470Ω Capacitors 1 1000µF 16VW electrolytic 1 22µF 16VW electrolytic 1 10µF 16VW electrolytic 1 4.7µF 16VW electrolytic 1 1µF 16VW electrolytic 3 0.1µF monolithic 1 3300pF ceramic Miscellaneous Red perspex filter, screws, nuts, lock washers, hookup wire. appropriate terminals on the PC board and insert the lamp into the holder in the transducer assembly. Cover the LDR with a dark cloth. The lamp should light and then go out when the LDR is uncovered. The next thing to do is to waterproof the transducer head assembly. We simply poured Selleys “Kwik Grip®” into the assembly. Use enough to cover the PC board by about 3mm. Do not allow any glue to enter the transducers or lamp holder. Installation Installation involves laying a standard 8-core telephone cable from the remote display to the main unit at the tank. As well as this, a 90mm hole must be cut in the top of the tank. Normally this would be done in the plastic strainer. If you do not require the remote display inside the house, then installation involves only cutting the 90mm hole and supplying power to the unit. Calibration is done by adjusting trimpot VR2. Included in the software are a few diagnostic routines. These are activated using a clip lead with one end connected to Vcc while the other end is touched on pins soldered to the cir­cuit board. Bridging pin B to Vcc will put the unit in diagnos­tics mode. Pins C, D, E and F are now used to select the diagnos­tic routines. Pin C will cause the transmitter to give a burst of energy then wait just long enough for the returning echo before trans­mitting again. This routine makes it easy to test the transmitter and receiver sections as the whole Tx/Rx trace can be more easily viewed on an oscilloscope. Under normal operating conditions the Tx/Rx trace occurs for about 12ms every five seconds. This makes it difficult to check the operation of the receiver but if we use this diagnostic routine, the Tx/Rx waveform is easy to inspect. Pin D will cause the displays, both remote and local, to be clocked from 0 to 99 and then through to 0, then upwards to 99 again. This test routine is useful in testing the data transmit­ ter and remote display, as well as the cable. Pin E will turn the relay on if it is fitted and pin F will turn it off again. It should be noted that before the next rou­tine can be executed the unit must Kit availability This project will be available in kit form from CTOAN Electronics, PO Box 211, Jim­boomba, Qld 4280. Phone (07) 297 5421. Kit 1 contains the PC boards for the main unit and the transducer head assembly, plus all on-board components including the transducers, lamp holder, heatsink and a programmed microproces­sor (note: does not include the local display board or components). Price: $90.00 + p&p. Kit 2 is a complete local display kit containing displays, PC board and all other components, including a strip of red perspex and a pre-assembled connecting ribbon cable. Price: $26.00 + p&p. Kit 3 is a complete remote display including case, PC board and all components. The plugpack is not included. Price: $32.00 + p&p. Postage and handling on each kit is $5.00. CTOAN Electronics will also be offering the following back-up service on this project: (1) Fix any fault not including microprocessor replacement – $30.00; (2) Microprocessor replacement – $25.00; (3) Reprogram microprocessor with updated software – no charge. Note: copyright of the PC boards for this kit remains the property of CTOAN Electronics. be taken out of diagnostic mode by bridging pin A to Vcc. Now re-enter diagnostic mode and select a different routine. When in normal mode (the default mode at power-up), bridging pin C will display the presently set upper limit. Note that the power-up default for the upper limit is 99, while the lower default is zero. This effectively means that the relay is disabled when the unit is first turned on. Bridging pin E will advance the tens digit and pin F will advance the units digit. Once the required upper limit is on the display, bridge pin A. This will store the new upper limit and put the system back into normal mode. The lower limit is set in a similar fashion by bridging pin D which will display the present­ly set lower limit. Pins E and F will again advance the tens and units digits as before and pin A will store the new value and put the system back into normal mode. Be aware that the software does not check to see if the upper limit is higher than the lower limit and visa versa. You must ensure that this does not happen when you set the upper and lower limits. Once the limits have been changed from the default values, the pump will effectively be enabled. The pump relay will be energised when the level in the tank falls below the set lower limit and will remain energised until SATELLITE SUPPLIES Aussat systems from under $850 SATELLITE RECEIVERS FROM .$280 LNB’s Ku FROM ..............................$229 LNB’s C FROM .................................$330 FEEDHORNS Ku BAND FROM ......$45 FEEDHORNS C.BAND FROM .........$95 DISHES 60m to 3.7m FROM ...........$130 the level of water rises above the set upper limit. Remote display assembly There is nothing special about the construction of the remote display – just follow Fig.5 and make sure that your soldering is of a high standard. Once you have completed the remote display, connect it to the system via suitable cable. We used 8-way ordinary telephone cable. Power for the main PC board at the tank was supplied along two of the wires in the 8-way core telephone cable. The whole system was then powered by a 500mA plugpack. Power up the system and check the operation of the remote display. It should read the same as the local display. To test the operation of the alarm, raise the tube in the tank until the reading drops below 20%. This is best done with the setup link in the setup mode. The display should start flashing when the level reads 19% and 30 minutes later the buzzer should sound for about six seconds. One last point to consider is that the box that you use for the main PC board out near the tank must be made waterproof. Any water that gets in during rain will surely damage the unit. Also remember that the microprocessor is only rated to 60°C so do not leave the unit in direct sunlight. It should be in SC permanent shade. LOTS OF OTHER ITEMS FROM COAXIAL CABLE, DECODERS, ANGLE METERS, IN-LINE COAX AMPS, PAY-TV DECODER FOR JAPANESE, NTSC TO PAL TRANSCODERS, E-PAL DECODERS, PLUS MANY MORE For free catalogue call or write to . . . L&M SATELLITE SUPPLIES 33-35 WICKHAM RD MOORABBIN 3189 PH (03) 553 1763 April 1994  69