Cat Deterrent - High Frequencies from Picaxe

tiiiim

Member
Helpful people,

First, thanks for all the help you guys gave me for the hen house project a few months back. I'm trying to expand the design bit by bit.

I'm trying to incorporate a cat/dog/fox deterrent which will be set off when required. I've read various sources and it seems the ultrasonic frequencies of commercial items are of the order of 18-24kHz.

Q1: Is it possible to create a specific frequency using a Picaxe. SOUND just lets you choose a number up to 255 - what frequencies are they?
Q2: Assuming Q1 is positive, would it then be fairly trivial to sweep the full frequency range from 18 to 24kHz in a matter of seconds?

I'm not too hot on piezo sounders and resonant frequencies when applied to electronics, so be gentle!!

Thanks in advance!!

P.S. I have an active 28X2 (loads of outputs left) or an 08M (one output left) to attach the (as yet unpurchased) piezo to in the chicken run - any preference?
 

hippy

Ex-Staff (retired)
You can use PWMOUT to generate frequencies from 3kHz up to 16MHz if you choose the right PICAXE. All which support PWMOUT, including 08M, can generate ~20kHz tones.
 

tiiiim

Member
You can use PWMOUT to generate frequencies from 3kHz up to 16MHz if you choose the right PICAXE. All which support PWMOUT, including 08M, can generate ~20kHz tones.
OK, so using the example in the manual which uses the software calculator, using the command:

Code:
PWMOUT PIN,99,200
for a particular pin, will cause the piezo sounder attached to that pin to resonate at that frequency (10kHz from the example)? And is it just as simple as attaching the piezo sounder in between the pin and ground (with perhaps a cap as shown in the manual)?
 

BeanieBots

Moderator
Not sure what the chickens will make of it, (or even if they can hear that high) but the results on cats varies with each cat.
Some run as fast as they can in the opposite direction but I've found some individuals which actually find it curious and even come closer to investigate.

Back to your original question.
Have a play with the PWM wizard in the PE to see what frequencies you can generate. (use 50% duty).
You can certainly 'sweep' the frequency quite fast.
 

tiiiim

Member
um..... i'm not sure but are you sure the chickens won't be annoyed by the high frequency sound
To be honest, I'm not sure. I've seen these sorts of things marketed on poultry websites, so I just assumed they'd be OK with it. In any case irritating the chickens whilst also fending off a potentially fatal attack is a fairly good compromise...!!
 

demonicpicaxeguy

Senior Member
To be honest, I'm not sure. I've seen these sorts of things marketed on poultry websites, so I just assumed they'd be OK with it. In any case irritating the chickens whilst also fending off a potentially fatal attack is a fairly good compromise...!!
i'd be interested to see how the chickens react
 

inglewoodpete

Senior Member
From my experiece with chickens, there's not a lot happening in between the sides of their heads:) A PICAXE would have more processing power.
 

eclectic

Moderator
Following BB's knowledgeable post #5.

Please DO NOT use just ultrasonics as your sole method of defence,
if you are protecting valuable chooks.

There is only one sure way to
legally and "psychologically" scare off a cat.

A bigger, tougher 'arder Moggie!

Stick to Picaxe-controlled fences and barriers.

e
 

tiiiim

Member
Following BB's knowledgeable post #5.

Please DO NOT use just ultrasonics as your sole method of defence,
if you are protecting valuable chooks.

There is only one sure way to
legally and "psychologically" scare off a cat.

A bigger, tougher 'arder Moggie!

Stick to Picaxe-controlled fences and barriers.

e
Don't worry - I have a linear actuator opening and closing the door.

The ultrasonic deterrent would only be used IF a predator (probably not the cats round here - they're too scared of the chickens. It's foxes around these parts...) managed to get into the chicken run and even then the door would still be closed so it can't get at the chickens anyway - its just to get it to bugger off (for its safety - if we woke up and saw it there in the morning....:D)

To be honest it's just an idea I had. By the looks of things I'd need to construct driver circuits and more guff, so I probably won't bother - I just thought it might be as easy as pin to piezo, piezo to ground and away we go!!
 

Dippy

Moderator
LOUD = WATTs. (with a bit of efficiency/resonance chucked in). No escaping it I'm afraid.

Would your iPod be generously audible down the garden without an amplifier?


I'm sure you must be able to get a second hand amp for a few quid.. Then all you have to do is inject some horrible noises... There must be some totalled cars round your way pre-owned by 20 year old lads with their haha 1000W amps (2W RMS) :)

We're all spoilt with ready-made cheap boxes and modules, so things always look dead easy.
But to be honest, this isn't exactly difficult. Twnety quid and half a day out of your life and the job is done! ;)

On the other hand you can get piezos sounders with a built-in driver. Some are b. loud!
It maybe that a sudden shrill sound would frighten off a predator - you know, make 'em jump and run.
One sounder, a few discretes, 20 minutes, under a tenner. How much is a chicken/egg-machine worth?

If it doesn't work very well, nothing much lost and the bits can go into the drawer for the next project.

But, if time is pressing and you don't want to do it then go and buy a commercial device.
Or make an automatic pepper dispenser.
 

tiiiim

Member
There must be some totalled cars round your way pre-owned by 20 year old lads with their haha 1000W amps (2W RMS) :)
Ha, and one of them is probably mine anyway....:rolleyes:

But, if time is pressing and you don't want to do it then go and buy a commercial device.
Unfortunately, time is pressing (gotta go back to uni in a few days) so I'm gonna let this idea slide and concentrate on rigorous testing of the rest of the project - still gotta install the PIR detector, which I know I'll screw up first time anyway :D.

Thanks for all the comments!!
 

Dippy

Moderator
If you are doing Meeja Studies , Psychology or Art at Uni then you will have plenty of spare time - especially if the local bars are closed for refurb :)
 

tiiiim

Member
If you are doing Meeja Studies , Psychology or Art at Uni then you will have plenty of spare time - especially if the local bars are closed for refurb :)
Hey - don't knock Media Studies: got a lovely GCSE grade for that one. I'm afraid it's none of those: Aerospace Engineering MEng is what I do, or at least try to do.... :rolleyes:
 
Top