DIY Ultrasonic ping possible with SX?
Jed
Posts: 107
If I have 2 ultrasonic sensor/emitters, JUST the little speaker things. Can I create my own ping unit easily? I know it's possible, but not sure how to start going about it. I've used the ping)) unit parallax sells before, but where these are just the sensors, I'm not sure exactly how to use them. Can anyone give me some pointers? I've attached an image of the sensors. If I can get away with it, I'd rather spend $3 on a pair of these and program an sx to control them rather than $30 on a ping)) module.
Post Edited (Jed) : 1/29/2009 5:42:24 PM GMT
Post Edited (Jed) : 1/29/2009 5:42:24 PM GMT
Comments
The obvious answer is that it CAN be done, Parallax uses an SX in their Ping))) sensor. As I recall that took the engineer a month or two of serious work; you're probably not going to get a ready-made answer by making a post here. Google is your friend; perhaps a search will turn up circuit using another micro that you can adapt (I do this all the time).
I believe there is an old BS1 app note that shows how to build a such a device, but it uses a 555 to modulate the sensor and a 567 to do the demodulation.
Most ultrasonic modules have the micro generate the appropriate frequency for the tx transducer, but sending out pulses. Then the micro "counts" how many echos it gets back and converts the time for the echos to be received into either a pulsout to the host (like the Ping))) which holds it's signal line high to represent time for the echo) or converts to actual binary data and sends via serial or I2C tx.
You might want to do a search on the web for folks who may have posted their own firmware for this sort of application (even if the firmware is for a micro you don't use); that might cut down a lot of homework and trial-and-error to get an idea of timing, pulse counts, etc.
[noparse][[/noparse]edit p.s.] -- heh, JonnyMac musta hit submit moments before I did....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
The first problem i ran into was that after transmitting i needed to pause a significant amount of time (well, in microprocessor world) before attempting to receive, or else I'd see the "ringing" (or whatever you want to call it) from the transmission.
I was trying to make it work with only 1 transceiver, so you might avoid this issue using 2. One for send and one for receive. This may be the reason the ping has 2?
If i recall i "sort" of had it working, but i was getting random values from time to time as well.
Dan
Mark
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot