Go Down

Topic: Assembled Ultrasonic Sensor (14C01) (Read 2013 times) previous topic - next topic

SgtOneill

Feb 28, 2012, 06:47 pm Last Edit: Feb 29, 2012, 01:02 pm by SgtOneill Reason: 1
Hi everyone,

I bought 6 Assembled Ultrasonic Sensor from Futurlec (http://futurlec.com/Ultrasonic_Sensors.shtml last item) last year and never used them so far.
However, I could use a motion detection sensor now and since I have nothing standing around (IR led / receivers - PING sensors etc), I decided to try and work with one of these sensors I bought.

Quote
"Single unit only required, a short pulse of 0.5ms 40kHz is applied to the unit, the unit then acts as a receiver to detect the presence or distance of an object. "


Any idea how I can connect this to the arduino and work with it?
The datasheet is listed on the item, on the store.

Thank you.

dc42

You need to do 2 things:

1. Generate a 40KHz square wave burst to feed to the transducer. You can do this by programming one of the three counter/timers in the Arduino. I suggest you use counter/timer 2.

2. Detect the received 40KHz pulse. The ADC in the Arduino is too slow to do this, so I suggest an op-amp followed by capacitor/diode/resistor network to generate DC, which you can then read via an Arduino analog input. This circuit has to be able to withstand the transmitted signal appearing at it input, and then recover quickly enough to respond to the received signal. Use an op amp that can run from a single 5v rail, to avoid the possibility of overdriving the analog input.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

cr0sh


You need to do 2 things:

1. Generate a 40KHz square wave burst to feed to the transducer. You can do this by programming one of the three counter/timers in the Arduino. I suggest you use counter/timer 2.

2. Detect the received 40KHz pulse. The ADC in the Arduino is too slow to do this, so I suggest an op-amp followed by capacitor/diode/resistor network to generate DC, which you can then read via an Arduino analog input. This circuit has to be able to withstand the transmitted signal appearing at it input, and then recover quickly enough to respond to the received signal. Use an op amp that can run from a single 5v rail, to avoid the possibility of overdriving the analog input.


It's a bit more complex than that (you need a bit of amplification on the send side of things, mainly) - the following can give you an idea of how to achieve this using the Arduino:

http://www.kerrywong.com/2011/01/22/a-sensitive-diy-ultrasonic-range-sensor/

Note that the above system was done using 24 KHz transducers; you would have to do some modification to the code to change that to the 40 KHz resonant frequency. I would also advise having an oscilloscope handy when doing this (for best performance - you might get lucky and have it work without one; try it and see, I guess).
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

SgtOneill

#3
Feb 29, 2012, 12:32 pm Last Edit: Feb 29, 2012, 01:09 pm by SgtOneill Reason: 1
oh boy, i guess its way harder than i was expecting.
Specially having no knowledge about frequencys and currently have no Oscilloscope.

They sell them without a pair, and specify that "Single unit only required", so im guessing this sensor has the receiver and transmitter inside.

cr0sh


oh boy, i guess its way harder than i was expecting.
Specially having no knowledge about frequencys and currently have no Oscilloscope.

They sell them without a pair, and specify that "Single unit only required", so im guessing this sensor has the receiver and transmitter inside.


Hmm - I guess I should've looked at the datasheet; I looked at it after what was noted in the other thread:

http://arduino.cc/forum/index.php/topic,84001.0.html

(and this is walking a tight-rope on multiple-thread posting - but I guess it's ok)

Those transducers don't have a receiver and transmitter inside; instead they are designed to act, as a single unit, as both (whereas other transducers are sold in pairs - one a transmitter, the other a receiver). So - the circuit in the datasheet can possibly work for you, if you can get the parts - alternatively, the circuit I posted could work as well, since the transducers can be used both ways. You might also look at the hexamite website for other sample ultrasonic drive circuits for singular transducers (albeit, meant for their products, not Futurlec's - but they could probably be adapted - the nice thing about their designs is that they don't use that adjustable transformer).

...and yes, if you want to be successful at this, you will need an oscilloscope, preferably a DSO with at least two channels (so you can monitor both send and receive pings, waveshapes, and amplitudes as you adjust/tune things)...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up