Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I am quite new to hardware hacking, and have chosen to use the Arduino for my first project.

I am attempting to build a cat deterrent, something akin to this. I have figured out detection, and now realize that I need to use an ultrasonic transducer to produce the 'blast' that I need.

However, I am clueless as to how I would interface one of these with an arduino.

Does anyone have any advice?

Thanks for helping a newbie out.

share|improve this question
For the record, cats can hear up to about 65 kHz, vs 20 kHz for humans (so sayeth the Internet) – endolith Aug 24 '10 at 21:24
ultrasonic transducers tend to have a preferred frequency. – JustJeff Nov 9 '11 at 22:49

2 Answers

up vote 2 down vote accepted

Just looking at the ultrasonic transducer without having open one ever it looks like it ha similar functionality to a standard movement activated light. That means that in the top half of the transducer you see the lens which detects movement using a Passive infra red (PIR) sensor. When this detects any motion it switches a signal pin which triggers the ultrasonic burst. Of course you can take advantage of this and switch the signal pin using an arduino or any other microcontroller using your own cat detection method. Might be a good idea to put in a optocoupler between the arduino and the ultrasonic transducer to protect both circuits from each other.

here is some info about some optocoupler and I cant post the link about the pir since chiphacker dosnt trust me enough... But just go into arduino.cc and search for pir and you will find it

share|improve this answer

Since the Arduino pin won't be able to source enough current to drive the transducer very well, you can use a transistor with base connected to the Arduino pin to drive the transducer.

If we assume the transducer is a 40kHz (very common) one, then you would toggle the pin at 40kHz. Nice and simple.

Here are a couple of schematic options. The first one will probably work a bit better as it will develop a higher drive voltage (higher than the supply) due to the resonant circuit formed by the inductor and transducer capacitance.

Ultrasonic 1

The reciever part in the above picture is not necessary for the cat deterrent project, this was taken from an ultrasonic range finder schematic where the echo needs to be timed. Unless you want know how close the cat is of course :-)

Ultrasonic 2

share|improve this answer
In the first diagram, what is the point of resistor R2? – Randomblue Feb 9 at 12:14
@Randomblue - It looks like the designer wished to bias the transistor so it's slightly on without any drive from the micro (as opposed to cutoff or saturation) This would stop the transistor switching off completely when the drive voltage heads to 0V and limit the peak reverse voltage across the inductor. If you don't use an inductor in parallel then you don't need it (or the diode). – Oli Glaser Feb 9 at 22:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.