Input pin question
Cenlasoft
Posts: 265
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
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
Comments
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.
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
"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...
...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.
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
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.
Thanks,
Curtis
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?
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
...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
http://www.robot-electronics.co.uk/acatalog/Ultrasonic_Rangers.html
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
"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.
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