Intro: Simple Sonic Cat Repeller
Cats, teenagers, kids: at least one of them likes to use my garden as a toilet, but fortunately they can all be repelled with some simple electronics. I’m going to use a 555 astable to produce a high frequency square(ish) wave signal that should range from annoying to painful for the “targets”, whilst remaining inaudible for most adult humans. I’ll try to make my instructable easy enough for relative beginners to understand.
Step 1: The Plan
This is how I’ll make the repeller.
The frequency of the output of the chip in this setup is given by the formula
Frequency = 1.44/((R1 + 2R2)C)
From experience I know that 12,000 Hz is a good frequency for the job, but feel free to try out others with different values of R1, R2 and C (if you have a breadboard I recommend trying a 100kR variable resistor as R1 and finding a suitable frequency). Do bear in mind that R1 should be at least 1kR.
12,000 = 1.44/((R1 + 2R2)C)
1.44/12,000 = (R1+2R2)C
1.44/(12,000 x 0.0000001) = R1 + 2R2 = 1200
I’ve used 100nF as my value for the capacitor, and I’ll use a 1kR resistor R1 and a 100R for R2.
As I’ll be using a 9V PP3 battery for +Vs, and my red LED has a voltage drop of 2V and draws 30mA of current, I ideally need R3 to be 233.3R. I have 220R resistors, but as they have 1% tolerance (i.e. they go up to 222.2R) they aren’t suitable to protect the LED from excessive current. The next highest value of resistor in my supply is 270R, which would limit the LED to drawing 25.9mA – perfectly acceptable. Check the ratings for your LED – don’t complain to me if its ratings are different to mine’s and it blows!
Ohm’s law: Current = Voltage/Resistance
Therefore Resistance = Voltage/Current
(9-2)V/(30 x 10-3)A = 233.3R
R4 is to increase the impedance (read resistance) of the output into the speaker. As with the LED’s resistor, less resistance means more current, and as power (in Watts) is given by current x voltage, less resistance means more power. “Nice!” I hear you remark in your best Jeremy Clarkson voice, but not so when you try to pass 2W into a speaker designed to take a maximum of 0.25W and you’re left with an expensive magnet. Read the specs for your speaker – do the maths and aim for the nominal power and don’t go over the maximum power. The nominal power of my speaker is 1W with a maximum power of 1.5W. A 47R resistor for R4 in series with my 8R speaker will give 1.02W of power (having measured the output of the 555 as 7.5V with a 9V supply).
Step 2: Parts and Tools
555 integrated circuit (IC) chip
SPST (single pole single throw) push to make switch
Miniature speaker (check that your chosen frequency is within its specified frequency range)
Stripboard or a PCB if you’re rich
8 pin socket for the IC
PP3 battery clip
LED panel clip (the appropriate size for your LED)
Wire (single core or stranded - not much)
Suitable container (bearing in mind what you’ll have to fit in it – for me it will be the battery, stripboard and switch, with the speaker mounted outside to allow a narrower box)
Wire cutters and strippers
Soldering iron and solder
Tool to break stripboard tracks (try a small drill bit)
Electrical insulation tape
Adhesive pads or glue
Pen (e.g. a Sharpie)
Continuity tester (your multimeter may include one)
Step 3: Construction
Start by breaking your stripboard down to size. We need 8 copper tracks, each ten holes long. Count these off carefully and mark the break points with your pen. We’ll be breaking the stripboard through the middle of the next line of holes. Line up the bit that you want over the edge of something sturdy with a sheer edge, like a tool bench or a window ledge. Hold the board down tightly with the palm of one hand (or secure it with a vice if you prefer), and push down the other end firmly over the edge with the palm of your other hand. *SNAP!* Retrieve the piece from the floor and repeat the procedure on it if necessary. Any jagged edges should be pulled off with pliers.
Break the stripboard at the points marked by red Xs on the diagram. I put a 3mm drill bit in the appropriate holes and manually twisted it until the track was completely broken in two (using a continuity tester to tell). Then insert and solder your resistors, capacitors, IC socket (NOT WITH THE CHIP IN IT), wires with both ends in the board, 0v (black) lead of your battery clip and wire to the switch (10cm) a few at a time, working from those with the lowest profile (resistors) to the highest (capacitors). A little masking tape is a good idea to hold everything in place whilst soldering. Solder the switch to its wire from the board and the +Vs (red) lead of the battery clip (a terminal each). Solder by heating the copper tracks with the iron for a few seconds, and then apply a little solder to the components.
For both the LED and speaker wires, cut and strip two wires of good, equal length. Grip one end of each wire in your pliers, and twist the two wires together all the way along their length, with about a centimetre left at each end. One end of the speaker wires can now be soldered into the board- untwist them a little if they won’t reach the holes.
To solder the LED to its wires, twist its legs around them as much as you can (long leg to red; short leg to black). Put something across the legs to absorb the heat and protect the LED, such as a crocodile clip or a paperclip. Try to run a decent amount of solder along the length of where the legs meet the wires. After it’s cooled, cover up the bare metal with insulation tape. Then solder the other ends of the wire into the board.
Read the specs for the switch and LED clip to find the size of hole that you need to drill in your box. If you plan to mount the speaker outside of the box like me, you should also drill a 3mm hole for the twisted wires to pass through.
Knut your switch and clip your LED into their holes. In order to make the circuit removable from the box, I made another short twisted wire pair which I soldered to the speaker connections (using my continuity tester and pen to mark polarity). Then I connected these to the original leads inside the box using two screw connectors. If you don’t fancy this you can thread the leads through the hole from the inside and solder them to the speaker, which I am mounting on the outside of the box with a couple of adhesive pads.
Step 4: And We're Done!
Stick it in the box. Screw the lid on. Give it a go.