Silicon ChipShut That Mutt - April 2004 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Technical people should be held in high regard
  4. Feature: Looking Into LEDs by Ross Tester
  5. Feature: Hands-On PC Board Design For Beginners; Pt.3 by Peter Smith
  6. Project: Loudspeaker Level Meter For Home Theatre Systems by John Clarke
  7. Project: Shut That Mutt by Branko Justic
  8. Feature: Worldspace Radio Via Satellite In Australia by Garry Cratt
  9. Project: A Smart Mixture Display For Your Car by Julian Edgar & John Clarke
  10. Project: The ESR Meter Mk.2; Pt.2 by Bob Parker
  11. Project: PC/PICAXE Interface For UHF Remote Control by John Holliday
  12. Review: Redback 8-Channel Pro Mixer by Ross Tester
  13. Vintage Radio: The art of cannibalism & making do by Rodney Champness
  14. Back Issues
  15. Advertising Index
  16. Book Store
  17. Outer Back Cover

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

You can view 18 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:
  • Hands-On PC Board Design For Beginners; Pt.1 (February 2004)
  • Hands-On PC Board Design For Beginners; Pt.1 (February 2004)
  • Hands-On PC Board Design For Beginners; Pt.2 (March 2004)
  • Hands-On PC Board Design For Beginners; Pt.2 (March 2004)
  • Hands-On PC Board Design For Beginners; Pt.3 (April 2004)
  • Hands-On PC Board Design For Beginners; Pt.3 (April 2004)
Items relevant to "Loudspeaker Level Meter For Home Theatre Systems":
  • Loudspeaker Level Meter PCB pattern (PDF download) [01104041] (Free)
  • Loudspeaker Level Meter front panel artwork (PDF download) (Free)
Items relevant to "A Smart Mixture Display For Your Car":
  • Smart Fuel Mixture Display PCB pattern (PDF download) [05104041] (Free)
Articles in this series:
  • The ESR Meter Mk.2 (March 2004)
  • The ESR Meter Mk.2 (March 2004)
  • The ESR Meter Mk.2; Pt.2 (April 2004)
  • The ESR Meter Mk.2; Pt.2 (April 2004)

Purchase a printed copy of this issue for $10.00.

Got a problem with barking dogs? Shut ’em up with this high-powered ultrasonic screamer. It has an external microphone to pick up the dog’s first bark and then it gives them a blast that only they can hear. They’ll soon learn to keep quiet... Design by Branko Justic* 32  Silicon Chip www.siliconchip.com.au WARNING! Never place your ears (or anyone elses!) near the tweeters when this device is operating, even ultrasonically. The sound output is high enough to cause hearing damage. L et’s face it, barking dogs can make life a misery. And as luck will have it, the people who own barking dogs seldom have enough consideration to anything about it. This Dog Silencer lets you do something about it. And you can solve the problem without your neighbours ever having to know that you have acted. This updated version of the Dog Silencer, first published in July 1999, incorporates a microphone to sense the dog’s barking. It then triggers a 2-second ultrasonic warbling blast that will quickly teach most dogs to keep a low profile. If you don’t want to use the microphone facility, the Dog Silencer also has a pushbutton to allow you to trigger the ultrasonic blast at will. Because the sound will be in the range of 20-32kHz, humans cannot hear it but most dogs can. Of course, we don’t claim that the Dog Silencer will be effective on all dogs. Ideally, the Dog Silencer should be within 20 metres of the offending canine to be most effective. Nor will the Dog Silencer work if the www.siliconchip.com.au offending dog is deaf – many old dogs tend to be deaf, although they usually don’t have a barking problem. And of course, some dogs are like their owners – just plain stupid – and very little can be done to stop them barking (the dogs that is, not the owners!). WARNING! Never place your ears (or anyone elses!) near the tweeters when this device is operating, even ultrasonically. The sound output is high enough to cause hearing damage. Nor will the Dog Silencer stop all barking. Even when cured of their incessant barking habit, most dogs will still bark when people come into their territory. Kangaroos too? This unit is also claimed to be suitable as a deterrent to kangaroos on the road, especially when driving at night. In this case, it would need to be operating all the time while a vehicle is being driven in kangaroo country. We cannot vouch for its effectiveness in this application – kangaroos are in relatively short supply on the suburban streets of Sydney. Hey, maybe that proves it works? As you can see from the photos, the Dog Silencer comprises two piezoelectric tweeters, a small box to house the electronics and a plugpack power supply. If you want to use it in a car, it can be powered from the 12V battery. Circuit details Fig.1 shows the full details of the circuit. It is based on a TL494 pulse width modulation (PWM) controller. This device is widely used in power supplies but is suitable for any PWM application. The key functions of the TL494 which we need to know about for this circuit are: • The internal oscillator which has its frequency set by the capacitor at April 2004  33 34  Silicon Chip www.siliconchip.com.au Fig.1: it might look a bit complicated but it’s actually quite simple. A microphone picks up the dog’s bark, a high gain amplifier triggers a burst of modulated oscillation above human hearing range but within the dog’s hearing range. This is amplified and fed to a pair of tweeters. This is the sine wave signal across the tweeters, operating at 25kHz. Note that at this frequency, the tweeters may still be audible, at 12.5kHz. pin 5 (Ct) and the resistance at pin 6 (Rt). • A 5V reference at pin 14. This can be used as a 5V supply for rest of the circuit. • A “dead-time” control input at pin 4. This can be used to enable or disable the internal oscillator. • Two 200mA output transistors with their emitters at pins 9 & 10. • An internal flipflop which halves the oscillator frequency to drive the output transistors with complementary (ie, out of phase) pulse trains. None of the usual control features of the TL494 are used here. The internal oscillator typically runs at between 50kHz and 60kHz (depending on the setting of VR1) and this is divided by the internal flipflop to drive the internal output transistors and thus the external output transistors Q4 & Q5. These drive the centre-tapped transformer which steps up the 12V supply to a square wave of around 30V peak to peak. This is used to drive the parallelconnected tweeters via inductor L1. The inductance of L1 and the capacitance of the two tweeters form a series resonant circuit which removes the harmonics of the waveform to produce a fairly clean sinewave of around 60V peak to peak. That’s the essence of the operation of the TL494 driving the tweeters, with the rest of the components providing features like frequency modulation, bark detection, timeout and so on. The output frequency to the tweeters is frequency modulated to (hopefully) make it more annoying to dogs. Dogs The frequency modulated output of the tweeters (top trace) is controlled by the 3Hz sawtooth waveform from the programmable unijunction transistor, PUT1. www.siliconchip.com.au In this screen shot, the tweeters are being driven at 21.45kHz (top trace) but their output (as picked up by a microphone) is quite audible at 10.8kHz (lower trace). have never told us that it is more annoying but we hope it is. Actually, by suitably adjusting trimpot VR1, you can make the tweeter output audible and we can vouch for the fact that the frequency modulation certainly does make it more annoying for us humans. Frequency modulation The frequency modulation is provided by the programmable unijunction transistor (PUT1) and transistor Q3. PUT1 is connected to oscillate at around 3Hz and the 2V sawtooth waveform at its anode is fed to transistor Q3 which is connected as an emitter follower. The output waveform is fed to pin 6 of IC2 via a 47kΩ resistor modulate the output frequency fed to the tweeters While the tweeters are driven by a sinewave, the output from the transformer is actually a square wave, as shown here. April 2004  35 Fig.2: here’s how to wind the transformer. The coils are actually wound on some form of mandrel – we use the shank of a twist drill – then transferred to the centre post of the ferrite cores. The choke is wound in a similar way. by about 3kHz or so. Looking now at the audio section of the circuit, trimpot VR2 provides DC bias to the electret microphone, as well as serving as the audio sensitivity control. Its output is fed to Q1 which acts a crude high gain amplifier, followed by Q2 which provides further amplification and clipping of the signal. This is arranged so that sufficiently positive peaks of the audio signal will exceed the positive threshold of Schmitt trigger gate IC1a and cause its output to go low. Trigger & timeout When pin 3 of IC1a goes low it charges the 1uF capacitor at the input of IC1d, via diode D2. This causes IC1d’s output to go low and this condition is inverted by IC1c to turn on LED1 and to enable the oscillator in IC2 via diode D3. IC1d also now charges the 1µF capacitor at the input to IC1b via a 470kΩ resistor. This causes IC1b’s output to go low and this pulls the collector of Q2 low, via diode D1, effectively muting the output of the microphone audio amplifier stages. The 1µF capacitor at the input of IC1d now discharges so the operation of IC2 is enabled for only about two seconds, ie, a 2-second burst of oscillation. It takes a further half a second or so for the 1µF capacitor at the input of IC1b to also discharge, before the clamp on Q2 is released, to allow the 36  Silicon Chip cycle to repeat, if necessary. Power supply A 12V DC plugpack was used to power the prototype but a 9V AC plugpack would be just as suitable because the circuit includes a bridge rectifier and suitable filter capacitors (9VAC x 1.4142 = 12.7VDC). The plugpack could be replaced by a suitable 12V DC battery (such as a car battery). To sum up, a loud noise (or a dog barking) is sensed by the electret and this triggers the timeout cycle controlled by IC1. During the next 2.5 seconds or so, the circuit can’t be retriggered by further noise because the microphone audio stage has been disabled. Pushbutton S1 provides a manual Parts List – Dog Silencer Mk2 1 PC board, coded K112, 125 x 64mm 1 Mini pushbutton switch SPST 1 choke, 8.5T on ferrite core 1 transformer, 2x 10T & 8T on ferrite core 1 electret microphone 2 tweeters 2 cable ties 1 IC socket, 16 pin 1 IC socket, 14 pin various lengths red and black hookup wire Semiconductors 3 C8050 NPN transistor (Q1-3) 3 1N4148 diode (D1-3) 1 2N6028 PUT (PUT1) 2 TIP41C NPN Power Transistor (Q4,5) 2 BA159 or 1NH42 diode (D4,5) 1 4093B (IC1) 1 TL494 (IC2) 1 BR1 bridge rectifier (BR1) 1 red LED (LED1) Capacitors 1 2.2nF (code 222 or 2n2) 3 100nF (code 104 or 100n) 1 470nF (code 474 or 470n) 3 1µF 16V electrolytic 3 100µF 16V electrolytic 1 1000µF 16V electrolytic Resistors 2 47Ω 1 100Ω 2 120Ω 0.5W 1 330Ω 1 1kΩ 1 2.2kΩ 2 4.7kΩ 2 10kΩ 1 22kΩ 1 33k Ω 1 47kΩ 1 68kΩ 1 100kΩ 1 150kΩ 4 470kΩ 1 2.2MΩ 1 10kΩ preset pot, PC mounting 1 5kΩ preset pot, PC mounting Optional: 1 utility case, 130 x 68 x 40mm 1 self-adhesive front panel 1 panel mounting SPST pushbutton switch 1 9VAC/2A (or 12VDC) plugpack transformer www.siliconchip.com.au Fig.3: everything except the tweeters, microphone and power supply fit on a single PC board. The optional pushbutton switch is used if you want to put it on the front panel – it connects in parallel with the PC board mounted switch. trigger function, as it pulls the input of IC1a high whenever it is pressed. Putting it together The electronics is housed on a single PC board which can mount in a small utility box. In the basic kit, you’ll get the PC board and all the electronics plus the two tweeters. Oatley Electronics also have a suitable box which also comes with a second pushbutton switch, to be wired in parallel with the on-board one and mounted on the front panel of the box. A 9VAC 2A plugpack is also available to power the kit. This gives more than enough to drive the tweeters to full output – in fact, another two tweeters could be added if a really wide-area coverage was required. The method of mounting the board is a little different to “normal” but we’ll cover this a little later. There is a transformer and a choke (L1) which you need to wind but fear not, they are quite simple and we’ll also give you detailed instructions on these shortly. Otherwise, the PC board is assembled pretty much as normal - inspect the board for defects first, then mount the small passive components (ie, resistors and capacitors), followed by the larger electrolytic capacitors (watch the polarity!). Finally, at least as far as the small components are concerned, the semiconductors. www.siliconchip.com.au Of course, you need to pay careful attention to the orientation of the semiconductors – follow the PC board overlay (fig.2) and you shouldn’t go wrong. In the prototype, the acknowledge LED was mounted on the PC board but if you are putting the project in a case, you may wish to mount this LED on the front panel. If so, it can be connected via a short length of ribbon cable or similar. Again, watch the polarity. The “hardware” can now go on – the two preset pots and the various cables which connect the electret microphone (use the shielded cable), the power supply (plugpack) and the two speakers. Note that the tweeters are polarised so it’s a good idea to use small diameter red and black hookup wire for these to ensure that you get the polarity right at the tweeter end. Here’s a close-up view of the choke – the transformer is wound in a similar manner but there are more coils, of course. Note how the turns are all tightly wound together. All that’s left now is the transformers and choke. Winding transformers Many constructors are hesitant about projects where you have to wind your own transformers. Well, try this one – and you’ll find out how easy it is. There is one transformer and one choke to wind. The choke is simplest, so we’ll start with that. It consists of 8.5 turns of the enamelled copper wire, wound over a 10mm former. The former (or “mandrel”, to give it the correct name) we most usually use is a 10mm twist drill, because we know its diameter exactly (it’s stamped on the drill!). Keep the windings tight and right alongside each other. When complete, slide the coil off the drill and slide the two halves of the ferrite core through the coil. Hold the two halves together with tape and cut the ends of the coil to a length appropriate to soldering onto the PC board. Scrape away the enamel insulation from the ends of the coil with a sharp blade, ready for soldering. The completed coil is secured to the PC board with a cable tie and the bared ends of the coil are pushed throught their appropriate holes on the board and soldered. The transformer is similarly wound, except that there are three coils wound instead of one: two primaries and a secondary. April 2004  37 be on the same side of the drill. When completed, if necessary, use some tape to hold the coils in place, then wind the single secondary coil of eight turns over the top of the primary. The secondary winding start and finish should be on the opposite side of the drill from the primary starts and finishes. It’s important to know which are the start and finish ends of each primary coil so that you get them into the right places on the PC board. It doesn’t matter which way around the secondary winding goes – the start and finish are interchangeable. Slide the completed primary/ secondary coils off the drill and onto the centre of the transformer core and complete in the same way as you did the choke. Assembly This only applies if you have purchased the optional box. The case is used “upside down” – that is, the normal lid of the case Here’s a shot of the completed project just before the PC board is turned over and becomes the base and the front mounted in the box. We’ve left the LED on the PC board but it would make more sense panel affixes to the normal bottom to mount it on the front panel, along with the second switch. of the case. The PC board mounts componentsto the former side-by-side, the result For maximum efficiency, the pribeing that you have two coils exactly down, sitting on the top of the lidmary coils need to be identical, or mounting pillars, while the lid screws the same. balanced – that is, exactly the same Take the two lengths of wire for your on in the normal way. Then the whole length, starting and finishing at exactly primary and grasp together tightly. thing is turned over. Confused? Maybe the same place. Wind the ten-turn primary coils, the photographs will help clear it up To achieve this, the primaries are tightly and neatly, keeping the turns a little! wound in “bifilar” mode – that is, two The pushbutton switch which together. The start and finish should lengths of wire are wound as one on Resistor Colour Codes o o o o o o o o o o o o o o o o No. 1 4 1 1 1 1 1 1 2 2 1 1 1 2 1 2 38  Silicon Chip Value 2.2MΩ 470kΩ 150kΩ 100kΩ 68kΩ 47kΩ 33kΩ 22kΩ 10kΩ 4.7kΩ 2.2kΩ 1kΩ 330Ω 120Ω 100Ω 47Ω 4-Band Code (1%) red red green brown yellow purple yellow brown brown green yellow brown brown black yellow brown blue grey orange brown yellow purple orange brown orange orange orange brown red red orange brown brown black orange brown yellow purple red brown red red red brown brown black red brown orange orange brown brown brown red brown brown brown black brown brown yellow purple black brown 5-Band Code (1%) red red black yellow brown yellow purple black orange brown brown green black orange brown brown black black orange brown blue grey black red brown yellow purple black red brown orange orange black red brown red red black red brown brown black black red brown yellow purple black brown brown red red black brown brown brown black black brown brown orange orange black black brown brown red black black brown brown black black black brown yellow purple black gold brown www.siliconchip.com.au comes with the box is connected in parallel with the on-board switch. Very carefully solder a couple of wires to the on-board switch where shown (it needs to be done this way because when the PC board mounts in the box, there is no room to get wires from the copper side around to the front). As we mentioned before, if we were putting this project in a box we’d also mount the acknowledge LED on the front panel also. Operating notes While LED1 lights whenever the circuit is triggered into oscillation, it is useful to be able to hear the output of the tweeters when you are first checking its operation. You can do this by rotating trimpot VR1 clockwise. Place the tweeters face down for this test and throw a cushion over them because they are truly deafening in this mode. You could easily do damage to your hearing if you are careless. When operation is confirmed, rotate trimpot VR1 anti-clockwise until you (and everyone else in your household) can no longer hear the tweeters, each time you press S1. Then rotate the trimpot a little more anti-clockwise, just to be sure. If you have an oscilloscope, set the output from the tweeters to at least 30kHz. The reason for going so high is because the tweeters can be audible even though the drive frequency is well above 20kHz. This www.siliconchip.com.au The completed PC board sits upside-down on the mounting pillars for the lid. When the lid is screwed on, it holds the board in place, then the box is turned over with the box bottom becoming the front panel and the lid becoming the base. OK, so it’s a tad confusing. . . but you get the point, we hope! is demonstrated in one of the scope screen shots which shows an audible output from the tweeter at 10.8kHz, even though the drive frequency is around 21.45kHz. Note that while the tweeters may be inaudible, their supersonic output is truly deafening and can still be dangerous to your ears at close quarters. Where from, how much? The various components of this kit are available only from Oatley Electronics. The basic kit, with the PC board, all on-board components and the tweeters (Kit K1112A) sells for $39.00. The case and extra pushbutton (K112B) is $5.00, while a suitable plugpack (K112P) is $8.00. Contact Oatley Electronics on (02) 9584 3563 or via their website: www.oatleye.com * Branko Justic is the owner of Oatley Electronics. SC April 2004  39