PDA

View Full Version : Input pin question



Cenlasoft
03-11-2012, 01:55 AM
Hello,
I created an ultrasound transducer transmitter circuit that outputs a 10 vpp pulse to the transducer. I want to read a return pulse (echo) from the same transducer. I want to tap into one of the outputs to the transducer and use a prop pin to measure the time of flight. How can I protect the prop pin and turn off the tx while waiting for a return pulse?
Thanks,
Cenlasoft

Beau Schwabe (Parallax)
03-11-2012, 07:31 AM
Cenlasoft,

Have you double checked the voltage with a scope? ... if the transducer is pulsed at its resonant frequency, you could see much more than 10V. ... observing 30V would not be out of the question.

A voltage divider would work, but you may lose sensitivity to distant objects. A zener diode to clip the voltage to a safe level (within the threshold of the I/O) might work better for further distance, Either way the resistor values for the divider or to limit current to the zener should be high so they don't load the ultra sonic transducer too much.

Cenlasoft
03-11-2012, 03:15 PM
Thanks Beau,
I used the scope and saw a 10vpp at resonance. I was thinking of using a very short pulse then turning on the receive pin (prop) to input and listening for an echo. The output from the transducer would be amplified to about 2vpp. Maybe a 10 k resistor to limit the current to the pin. The echo pulse is only about 200 mv. My worry was how long before I turn the receive prop pin on so the 10 vpp pulse doesn't get to the prop pin.
Thanks,
Cenlasoft

Beau Schwabe (Parallax)
03-12-2012, 12:00 AM
Cenlasoft,

"Maybe a 10 k resistor to limit the current to the pin" - I was thinking along the lines of a 100k resistor...

If you use a zener diode or heck, even a LED would work. Something like this...



100k //
10Vpk-pk >----/\/\---o----->|-------< Vss
| LED
|
o-----|<------< Vss *Notice that the diode is reverse biased
| Diode
|
o------------------------||---> To Sigma Delta ADC
0.01uF


...The LED would 'clamp' the voltage to the forward voltage of the LED (about 1.7V), where the diode would 'clamp' the voltage preventing it from going dangerously below Vss. The 0.01uF cap provides a DC bias for a sigma delta ADC.

If you configure the Sigma-Delta ADC for 8-bits of resolution, you should have plenty of overhead sampling at 40kHz, since at 80MHz an 8-Bit sigma delta can do a conversion in about 3.2us

With this 'clamping' configuration, you should be able to read the 10Vpk-pk (PING) as well as the 200mV (ECHO), Since the processor would ultimately know when the PING takes place, you could conditionally ignore the results from the ADC during this period.

Cenlasoft
03-12-2012, 01:28 AM
Thanks Beau,
I have attached a schematic of my TX circuit. Where should I attach the circuit you suggested. Should I put it across the transducer? Should I use the amplifier before or after your circuit? When I put the scope across the transducer, I see a 10 vpp pulse with a slight ringing.
Thanks,
Cenlasoft

HShanko
03-12-2012, 02:10 AM
I'm wondering if those inverters aren't going to load down the transducer on the Rx mode? Seems it should be decoupled from the inverters somehow.

And, as you scoped, the ringing will interfere with close-up objects. Somehow the Tx transients need to be damped out quickly to register any close objects.

And you may need some gain in the Rx direction to read distant objects. Distance costs signal level quickly.

Sorry to throw some 'grit' into the idea mill, but I've read about these devices over the years. Sorry, no real world experience though.

Cenlasoft
03-12-2012, 02:28 AM
HShanko, Thanks for the suggestions. I will address these concerns.
Thanks,
Curtis

Beau Schwabe (Parallax)
03-12-2012, 02:55 AM
Cenlasoft,

Hmmm... ok, it's been awhile since I played with 40kHz ... that design limits the ability to use the same transducer as a receiver.

Just curious , where are you placing the scope to see the 200mV pk-pk echo?

Also, just for kicks, have you tried sweeping the frequency a little higher that 40kHz or a little lower than 40kHz? ... The 7404's may limit or clip the voltage through their bulk diode to allow for this test, but if you can place a resistor (4.7k or so ) in series on the transducer and sweep the frequency while monitoring the pk-pk voltage directly across the transducer you might be in for a pleasant surprise in terms of output signal and also the echo response.

Ideally you would use a MOSFET H-bridge where you can control the gate drives independently. Finding the resonant frequency is important for maximum distance efficiency. ...it's not always at exactly 40kHz. The MOSFET configuration would allow you to turn all of the MOSFETs off after the ping to listen for the echo.

Curious ... what distance range are you observing right now?

Cenlasoft
03-12-2012, 03:08 AM
Thanks Beau,
I had originally used two sensors and received a 200 mv pulse. I then used a lm358 op amp module from sparkfun to amplify the 200 mv to between 1 vpp to 4 vpp. I will try your suggestions. What kind of MOSFETS should I use? I get resonance at 40 khz I think. The distance is about 2 to 3 cm.
Thanks,
Curtis

Beau Schwabe (Parallax)
03-12-2012, 04:07 AM
Zetek(sp?) used to make some nice bare bones MOSFET packages where you had to provide the logic control, I'll have to check 9899 seems to ring a bell but I'm not sure.

...as far as amplifying the signal, you shouldn't really need to if your using a Sigma Delta off of the Propeller. In a sense that is the amplifier.

When amplifying a signal that low, you need to be aware that you are amplifying the noise floor also, which won't do you any good. Because the 8-bit sigma delta running at 80MHz can resolve a value every 3.2us... a 40kHz pulse is 25us ...because the 40kHz is HIGH 50% of the time and LOW 50% of the time you can only sample for half of the 40kHz period (12.5us), .... so about 3 times over sampling. This alone will increase the signal to noise ratio by a factor of 1.73 .... simply take the square root of the number of times that you can over sample the signal ... sqrt(3) = 1.73

2-3 cm seems like an awfully short distance for ultrasonic ... I would have expected 2-3 meters

As far as being resonant at 40kHz, you can't really tell with the circuit that you posted without increasing the drive impedance a little. Otherwise, you can brute force the transducer at 40kHz but it may not be optimal. I found this out by accident years ago when I was messing with short range (10ft) communication over ultrasonic. I wasn't getting the initial results that I expected, I suspected that I wasn't tuned properly, so I tried sweeping the frequency and what I saw in the receiver 20 ft away was orders of magnitude better values that I had previously been observing.

Something like this for an H-Bridge:
http://parts.digikey.com/1/parts/1027219-mosfet-h-bridge-dual-sot223-8-zxmhc3a01t8ta.html

Javalin
03-12-2012, 10:08 AM
or you could use a pre-made one of course.... ;-)

http://www.robot-electronics.co.uk/acatalog/Ultrasonic_Rangers.html

Cenlasoft
03-12-2012, 01:15 PM
Hello,
The reason my detecting range is short is that I want to eventually use this setup to do non-destructive testing using ultrasound. I will use a coupling gel and look at metals and non-metals for defects. Next week, I am going to a week long conference in Dallas, TX on non-destructive testing (ASNT spring conference). Ultrasound is the big thing, but I wanted to try and make an instrument using the propeller for my own knowledge. Beau, I have some MOSFETS (Digikey 576-3551-5-ND). Will they work?
Thanks,
Cenlasoft

Beau Schwabe (Parallax)
03-12-2012, 01:49 PM
Cenlasoft,

"I have some MOSFETS (Digikey 576-3551-5-ND). Will they work?" - That is a mosfet driver, it won't allow you to turn OFF all of the mosfets in an H-Bridge at once. There will always be two that are ON at a time. To use a single ultrasonic transducer, you need the ability to turn all 4 H-Bridge mosfets OFF at the same time. Doing so allows for the input to read an unobstructed high impedance "echo" from the transducer without any of the mosfets loading the signal to one of the power or ground rails.

Cenlasoft
03-12-2012, 02:14 PM
Thanks, I will order the MOSFETS you suggested. I'll keep you posted. Thanks, Cenlasoft

Cenlasoft
03-12-2012, 02:35 PM
Hi Beau, I just ordered the MOSFETs you suggested. Looking at the datasheet, I see 4 possible gates. Do I use the same transmitter I have and switch it using one of the gates? Thanks for helping, Cenlasoft.

Cenlasoft
03-15-2012, 12:29 AM
To Beau or anyone that can help.

I just got a mosfet dual h-bridge (ZXMHC3A01T8CT-ND) that Beau suggested. Where do I tap into the circuit that I posted? How many gates do I need? I read the datasheet, but I never used one of these ICs.
Thanks,
Cenlasoft