Ultrasonic sensor
Steve2381
Posts: 94
Anyone built an ultrasonic sensor unit?
I know parallax make a module, but I have a ton of spare ultrasonic parts here and it would be good to work it out for myself (well... with assistance! )
I am thinking along the lines that I need to make·an NE555 based transmitter and then possibly connect the receiver to the stamp and read it with a pulsin command?
I assume there is no way of sending a transmission signal without an external circuit.
Thanks in advance
Steve
I know parallax make a module, but I have a ton of spare ultrasonic parts here and it would be good to work it out for myself (well... with assistance! )
I am thinking along the lines that I need to make·an NE555 based transmitter and then possibly connect the receiver to the stamp and read it with a pulsin command?
I assume there is no way of sending a transmission signal without an external circuit.
Thanks in advance
Steve
Comments
I have, but not with a Stamp. In the end it's performance was as good or a tiny bit better than the Daventech module, but much, much larger. Still it was a fun project.
I am now working on an ultrasonic navagation beacon system, which will display the 'bots position on a PC. I have the PC software done, made one beacon and a receiver. I am tweaking the reciever and need to make 2 more beacons to start final testing, should be in a couple of weeks. It's gonna be cool...
Feel free to contact me off list if you like, since I didn't use a Stamp for this project this isn't the place to discuss it.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
I don't know much about this subject (and it shows!).... can you not directly drive the transmitter using a Freqout command?· This however I believe is a Sinewave output.
I appologise in advance if its a stupid question.
There is no such thing as a stupid question. Yes, a square wave is used to drive the transducer, but the output of the transducer is still a sine wave because the transducer is a mechanical device.
I doubt the FREQOUT command would work very well. Most sensors cheaply available are in the 40kHz range, and the Stamp won't produce a clean enough 40kHz to drive it very well. In any case, you need to drive the transducer with a transisitor, a Stamp pin can't drive it hard enough. If you try it, get a Schmitt trigger NAND like the 74HC132. This will give a much cleaner output.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
I have no idea your level of expertise with ultrasonics, so PLEASE don't take any of the following coments as condescending. That was CERTAINLY not intended.
Jonathan is quite correct in all that he says (as usual). Generally speaking, the outgoing "ping(s)" is/are produced by one or more executions of PULSOUT which will produce a square wave pulse of known duration. A VERY informative picture of what PULSOUT will produce during one iteration, can be found in the PBASIC Help File (thanks Jon!). Now, imagine a string of those pulses being output to an ultrasonic transducer. The generated pulse may need to be amplified to drive the transducer "harder", but the waveform itself should be quite usable as is. Beware of inadvertantly clipping the waveform during the amplification process if it needs amplification.
Just as a sidenote, during this transmission period (regardless of how long or short it is) and for a short period thereafter, the ultrasonic receiver circuit MUST be disabled ("blanked") to prevent the receiver from seeing these outgoing pulses (aka "ringing") and thus indicating a false early reading. The other caveat you might want to keep in mind is the issue of crostalk between beacons that might be proximate to one another. Differing pulse trains (pulse width or duration) are sometimes used to avoid this problem. You might have a switch on each beacon to control the "code" (pulse width) it uses: A, B, C, D. This would provide the local ability to avoid crosstalk or interference from other units nearby. Obviously, both the transmitter and receiver sections must be synchronously configurable for each of these proposed "codes".
BTW, this is not an easy project, due to the many considerations that have to go into the design. Good luck with it!
Specific use ultrasonics (such as your beacon system) are a bit easier since you don't need to provide a generalized solution usable by a large audience with differing applications, and differing requirements. By way of example, the Parallax PING ))) unit needs to be quite a bit more generalized. Commercial ultrasonic beacon systems, such as the one you are proposing, are VERY expensive unfortunately, but they are highly accurate, and quite configurable.
Regards,
Bruce Bates
I've recently had interest in building my own ultrasonic object distance locator from available parts as well. Can anybody explain to me why two tranducers are required? If at any one point, only either the transmitter or receiver is in use, could a single tranducer be used for both purpose and switched on/off during the period of use?
Secondly, Jonathan and Bruce mentioned something to help "drive the tranducer." Would a transistor setup like this work? Anything seriously wrong with my circuit and do I need to amplify my receiving tranducer as well?
Thirdly, on the receiving tranducer, on this circuit uses a tone decoder to compare frequencies to drive a pin low when it detects a matching one. I'm trying to keep parts to the most basic minimal possible and working with available parts, how accurate is it to read the pulsewidth using PULSIN to compare with a resolution of 10ms?
I have a couple 25kHz tranducers I've picked up for dirt cheap, I would like to put them to use and maybe learn a thing or two.
This is just a guess, but I would imagine that the reason you need two transducers is that the transmitter "rings" for awhile after it sends the ping.
Has anyone tried sending data with ultrasonics ? Would something like 1200 buad be possible ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"Wise men know when they're right. The wisest also·know when they're wrong."
·
With the standard transducers, you'd be hard pressed to reach datarates that high - the transmitters _and receivers_ do ring badly.
You can quench the transmitters by sticking a carefully crafted antiphase pulse or two on the end of your pulse stream, and you can use (with care) standard electret microphone capsules instead of the conventional receivers - you then have to do the frequency discrimination yourself, rather than letting the receiver do it by resonating. No big deal, but harder than the alternative.
(I spent some time trying to encode ultrasound pulses, so I could have several in flight at a time. Not successful - OK in controlled circumstances, doomed in the real world.)
Steve
http://www.amazon.com/gp/product/0071371923/sr=8-1/qid=1141826053/ref=sr_1_1/102-9516656-4761711?%5Fencoding=UTF8 ) has a an entire chapter on building a short range sonar...
... I also noted that Sparkfun is now selling the single barrel Maxbotix EZ1 Ultrasonic Range Finder ... http://www.sparkfun.com/commerce/product_info.php?products_id=639