Silicon ChipSound & Lights For Level Crossings - 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)
Sound & lights for level crossings This Sound & Lights module is intended to be controlled by the Level Crossing Detector published last month. It drives LEDs or miniature incandescent lamps for the level crossing signs & produces a most convincing bell sound as an accompaniment. By JOHN CLARKE Apart from the lifelike effect of flashing lights, the particular attraction of this project is the uncanny sound of the bell. Anyone who has stopped at a level crossing on a rainy or foggy night will recall the eerie sound of the bells as their rate of ringing wavers up and down. This circuit reproduces this effect and thereby greatly adds to the realism. The Sound & Lights module comprises an on/off control, a lamp flasher and circuitry to generate the bell sound, as depict­ed in Fig.1. The on/ 22  Silicon Chip off control (IC2) prevents the circuit from operating unless its input is low. The lamp flasher alternately flashes the two lamps at a rate of about twice a second which is close to the rate used on typical level crossing lights. The bell sound circuitry is more complex and comprises a ringing oscillator which provides the bell tone, a bell rate oscillator which determines the rate at which the bell is struck, and a warble oscillator to vary the rate of the bell rate oscillator. The ringing oscillator produces a pure sinewave whenever the bell rate oscillator pulses its input. The sine­wave starts with a high amplitude which dies away in volume until the next pulse from the bell rate oscillator. The amplifier stage (IC3d) boosts the signal to a suitable level for the loudspeaker. It produces only a small amount of drive, just sufficient to make the bell sounds audible when you are close to the speaker which will be concealed under the layout close to the level crossing. The sound level must not be too loud, otherwise it will be “out of scale” with the rest of the layout and would quickly become annoying. Now have a look at the complete circuit of the Sound & Lights module, as shown in Fig.2. We’ll discuss the flasher section first. It employs IC1, a 4093 quad 2-input Schmitt NAND gate package. IC1a is used as a conventional Schmitt trigger oscillator and its frequency is determined by the 47µF capacitor at pins 1 & 2, together with the series 2.2kΩ resistor and 50kΩ trimpot VR1. IC1c inverts the output of IC1a so that the two Schmitt triggers constitute a two-phase square wave oscillator with the outputs fed to gates IC1b and IC1d. These two gates are enabled or disabled by IC2a which can be thought of as the master switch; it is part of the on/off control referred to earlier. When pins 9 & 12 of IC1 are pulled low by IC2a, their out­puts at pins 10 & 11 are high and the circuit is effectively disabled. When pins 9 and 12 are high, the alternating square wave signals from pins 3 & 4 are fed through to transistors Q1 and Q2 to drive the level crossing lights. Note that there are four lights in total, two for each side of the crossing, and they must be cross-connected so AMPLIFIER IC3d BELL RATE OSCILLATOR IC3a ON/OFF IC2b,c RINGING OSCILLATOR IC3c WARBLE OSCILLATOR IC3b ON/OFF CONTROL INPUT SPEAKER IC2a LIGHTS LAMP FLASHER Fig 1 Fig.1: the Sound & Lights module uses three oscillators to produce the bell sound and another for the lamp flasher. Fig.2 (below): just three ICs are used in the circuit for the Sound & Lights module. One of the op amps in the LM324 package drives the loudspeaker directly via a 68Ω resistor and 1µF capacitor. +10V 0.1 10 10 OSCILLATOR ADJ VR 3 500W 100k 100k 100k 10k 100k 6 5 IC3b LM324 10 100k 100k 10 IC2c 11 RATE VR2 50k 11 2 8 27k +10V 10 IC2b 8 .0047 100k 10k 14 9 6 +11.5V D1 1N4004 2.7k 12V INPUT IC2a 4066 1 68  1 IC3d 12 1M BELL STRIKER RATE OSCILLATOR 10k 3 14 .0047 47k +10V 13 10 33k IC3c D2 1N418 100  WARBLE OSCILLATOR 8 IC3a 9 100k 10k 4 12 3.3M 7 10k 68  +10V ZD1 10V 1W 1000 16VW 2 13 7 INPUT +10V 1 1 IC1a 4093 IC1b 13 3 2 FLASHER RATE VR1 50k 12 5 2.2k IC1c 4 8 6 B 47 A K 9 C VIEWED FROM BELOW 14 IC1d +11.5V 2.2k 11 22k 10 22k B Q1 BC557 7 2.2k E B Q2 BC557 C 1 LAMP 1A LAMP 1B LEVEL CROSSING LIGHTS AND BELL E C 2 LAMP 2A LAMP 2B 1 LED 1A LED 1B A A  K 2 LED 2A LED 2B A A  K OPTIONAL LED LIGHTS   K K 1k 1k April 1994  23 Fig.4: the wiring diagram. Note that IC3 is oriented differently to the other two integrated circuits. D1 1uF 22k 2.2k GND 100k 2.7k PARTS LIST 1 PC board code, 15203932, 150 x 97mm 1 10-way PC mount screw terminal block 1 4-way PC mount screw terminal block 1 small 8-ohm loudspeaker 2 50kΩ horizontal trimpots (VR1, VR2) 1 500Ω horizontal trimpot (VR3) Semiconductors 1 4093 quad NAND Schmitt trigger (IC1) 1 4066 quad analog switch (IC2) 1 LM324 quad op amp (IC3) 2 BC557 PNP transistors (Q1,Q2) 1 1N4004 1A diode (D1) 1 1N4148 diode (D2) 1 10V 1W zener diode (ZD1) 4 2mm red LEDs (see text) Capacitors 1 1000µF 16VW electrolytic 1 47µF 16VW electrolytic 4 10µF 16VW electrolytic 1 1µF 16VW electrolytic 1 0.1µF MKT polyester 2 .0047µF MKT polyester Resistors (1%, 0.25W) 1 3.3MΩ 5 10kΩ 1 1MΩ 1 2.7kΩ 8 100kΩ 3 2.2kΩ 1 47kΩ 2 1kΩ 1 33kΩ 1 100Ω 1 27kΩ 2 68Ω 2 22kΩ 24  Silicon Chip 2.2k D2 22k 10k 10k TO LAMPS 1 and is connected to the threshold voltage input 2x.0047 (pin 10) of IC3a via a 3.3MΩ TO LED CATHODES VR1 VR3 Q2 resistor. This slightly varies the threshold voltage of the bell striker oscillator (IC3a) 100k 1k 2.2k to provide a small variation 1k in the pulse rate. The resulting pulses from IC3a drive the centre leg of that each pair of lights on the level a T-section filter connected across the crossing signals flash alternately. 1MΩ feedback resistor of op amp IC3c. The circuit can be made to drive This op amp is adjusted using trimpot red LEDs rather than miniature incan- VR3 so that it is just on the verge on descent lamps. We have shown the oscillation. As a result, each time it alternative connection for LEDs with receives a pulse from IC3a, it briefly a 1kΩ current limiting resistor for each bursts into oscillation. cross-connected pair. This effect can be seen in the oscilloscope photograph of Fig.3. The top Bell oscillators trace of this photograph shows the The bell circuit comprises op amps very brief pulses which trigger IC3a IC3a-IC3d. IC3 is an LM324 quad into operation, while the lower trace op amp and IC3a is connected as a shows the bursts of oscillation which Schmitt trigger oscillator to provide come at varying intervals. the bell strike rate. It operates as fol­ Amplifier stage lows. Initially, the 10µF capacitor at pin Op amp IC3d functions as an am9 is discharged and the output of plifier to drive the loud­speaker. As IC3a is high. Pin 10 of IC3a is held at explained previously, only a modest about +6.6V by the 100kΩ resistors power output is needed and so an op to ground, to the +10V supply and amp is quite adequate. to the op amp’s output (pin 8). When IC3d is biased at half supply via the power is applied, the capacitor begins two 10kΩ voltage divider resistors at to charge via diode D2 and the 100Ω pin 3, with bypassing provided by resistor. When its voltage reaches the 6.6V threshold, the output at pin 8 goes low and pin 10 now drops to about +3.3V (due to the loading effect of the 100kΩ resistor to pin 8). The 10µF capacitor now discharges via the 47kΩ resistor and trimpot VR2 until it reaches the 3.3V threshold, at which point the op amp output again goes high. Thus, we have an oscillator which produces very short pulses at a rate of about twice a second (depending on the setting of trimpot VR2). Fig.3: the top trace of this photograph IC3b is also set up as a Schmitt shows the very brief pulses which trigger oscillator and this charges and trigger IC3a into operation while discharges the 10µF capacitor at pin the lower trace shows the bursts of 6 via a 100kΩ resistor. The oscillator oscillation which come at varying output in this case is a square wave intervals. 47uF 33k VR2 ZD1 IC1 4093 2x10uF 1 1M 1 10k IC3 LM324 10uF 100k 0.1 47k IC2 4066 100  + +12V TO SPEAKER 3.3M + GND Q1 1 100k SPARE INPUT 10k GND 100k INPUT 100k 10uF 68  27k 68  10k 100k 100k 100uF TO LAMPS 2 Fig.5: actual size artwork for the PC board. Check your board carefully against this pattern before mounting any of the parts. the asso­ciated 10µF capacitor. IC3c is also biased from this voltage divider, via trimpot VR3. The bell signal from IC3c is fed to IC3d via analog switch IC2b which is closed while its pin 6 is high. Since pin 6 of IC2b is controlled by the same signal line which enables the flasher circuitry, it ensures that the two circuits switch on and off at the same time. One analog switch has not been mentioned so far and that is IC2c which is connected between the inverting and non-inverting inputs of IC3d. IC2c is closed (ie, conducting) whenever IC2b is open. Thus, when the bell signal is not being fed to IC3d, switch IC2c ensures that the amplifier stage is fully muted. IC3d drives the loudspeaker via a 68Ω resistor which limits the current, while the 1µF capacitor prevents any DC from flowing through the loudspeaker’s voice coil. Construction All the components for the Sound & Lights module are assem­bled onto a PC board measuring 150 x 97mm and coded 15203932. Before you begin any soldering, check the board thoroughly for any shorts or breaks in the copper tracks and repair any faults that you do find. This done, install the resistors, link, PC stakes (if used) and ICs. Note that IC3 is oriented differently to the other ICs. Now install the transistors, zener diode and diodes, making sure that they are all oriented correctly. The trimpots and capacitors can be mounted now, taking care with the orientation of the electrolytic capacitors. Finally, if you are using terminal blocks, mount these as well. Once the PC board has been assembled, it is ready for testing. Note that the power for the PC board should be obtained from a 12V DC supply. If you built the Walkaround Throttle de­scribed in the April & May 1988 issues of SILICON CHIP, or the IR Remote Controlled Throttle described in the April, May & June 1992 issues, you won’t need a separate supply as this facility is already provided. Make sure that you have your multimeter handy, so that you can measure the DC voltages on the PC board. Connect an 8Ω loud­speaker and two lamps (or LEDs) to the board in their designated positions. Now apply power and check that the voltage across ZD1 is close +10V. If not, switch off and find the fault before applying power again. Even though the voltages are all correct, the circuit should not be operating unless the you have a jumper wire in the input terminal block, to connect the input to GND. With the input connected to GND, the lamps should be flash­ing alter- nately and you should be able to adjust the rate of flashing with trimpot VR1. The correct rate is about twice a second. You will probably also find that the loudspeaker is howling and this can be stopped by rotating trimpot VR3 clockwise, after which it should sound like “dink dink dink dink ..”. By carefully rotating VR3 anticlockwise, you will reach a point where the loudspeaker sounds just like a bell. You can also adjust the rate at which the bell is struck by rotating trimpot VR2 but after doing that, you may need to tweak VR3 again for the best effect. With the board complete and running, you can install it underneath your layout and operate it with a switch when required or have it controlled by the Level Crossing Detector board de­scribed last month. Finally, we should comment about the size of the LEDs used for level crossing signs. Ideally, these should be as small as possible. If you have an HO-scale layout (1:87), even 3mm LEDs are too large as they will “scale out” to a diameter of 261mm. Ideally, you should use 2mm LEDs as made by Hewlett Packard (they make them in red, orange, yellow and green). You can purchase these miniature LEDs from HT Electronics, PO Box 491, Noarlunga Centre, South AustralSC ia 5168. Phone (08) 326 5590. April 1994  25