Ultrasonic Sensor detectable range - Page 1
Forum section: electronics / projects

author: xolott
author_rank: Contributor
timestamp: April 01, 2015, 08:03:46 pm
content: Hi!I'm working on an ultrasonic object detector using aMA40S4R/Stransducer, based on the Reflection Sensing method. Everything works great until I reach the 2 meters of object distance.If we take a look at the transducer's datasheet, the detectable range is 4 meters max. So, my question is: This range is based on direct or reflective sensing method?I cant find much more info about the transducer from the manufacturer.Thanks

author: AndyC_772
author_rank: Super Contributor
timestamp: April 01, 2015, 08:14:07 pm
content: How are you driving the transducer, and what are you doing with the received signal?Audio volume falls off as the square of distance, so at 4m you have 1/4 of the signal you'd have at 2m. Why not just increase the gain on your receiver to compensate? What limitation are you running into?In my experience, though, 4m is a very long way to detect with a transducer of this type. To get that range you need a device which is efficient and which has a focused, narrow beam width. You also need to use the highest drive voltage permitted by the device manufacturer, and a receiver which has a high gain and a narrow band-pass filter.

author: Charles Creations
author_rank: Contributor
timestamp: April 01, 2015, 08:14:44 pm
content: I can't say for certain, but I assume their detectable range must be reflective because otherwise the sensor couldn't determine range by itself.Another factor you might want to consider is the sonic reflectivity of the target. Sound is reflected at discontinuities of sonic impedance. Usually, this means a abrupt change in density such as transitioning from air to wood. The reflectivity of the target is determined by how abrupt and great this change in density is. You will find a pillow much more difficult to sense then a steel rod because of their different densities.

author: Ian.M
author_rank: Super Contributor
timestamp: April 01, 2015, 08:24:03 pm
content: It may also require a flat (to within a small fraction of a wavelength), highly reflective surface larger than the maximum beam width at 4m. e.g. a polished marble wall.

author: xolott
author_rank: Contributor
timestamp: April 01, 2015, 08:27:59 pm
content: Thanks!I have, on the transmiter side, a MAX232 that give 15Vpp aprox. And, for the receiver side a amplifier with a gain of 6, a Band-pass filter at 40KHz and a 10 times amplifier. Then using a comparator I get the 5V square signal.Using a osciloscope I'm able to see the reflective signal according to the object distance. But after the 2.3m or 2.5m nothing change.Other thing that makes me wonder is the power supply noise (500mV). At large distance, the sound are somehow mixing with the noise? I dont know.I attach a schematic of that stage.Greetings from Venezuela.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 01, 2015, 08:33:30 pm
content: Where on earth are you getting 500mV power supply noise from, and how can you possibly expect to receive a small signal when it's that noisy?

author: Marco
author_rank: Super Contributor
timestamp: April 01, 2015, 09:03:09 pm
content: Quote from: xolott on April 01, 2015, 08:27:59 pmThat seems quite a lot ... at resonance the resistance of the transducer should be around362 Ohm. The MAX232 shouldn't be able to create that much voltage with such a low resistance load.PS. the 500 mV ripple is worrisome of course, stop using the cheapest USB power supply you could find ... the opamps have 100 dB PSRR though.

author: xolott
author_rank: Contributor
timestamp: April 01, 2015, 09:06:01 pm
content: Sorry, it's 60mV.But, I have some doubts about my measurements.This is the measure of my ground plane. I don't understand where the noise came from. Maybe environment noise?And this is the voltage across my ultrasonic receiver (measured directly on the pins):After 2.5m, the amplitude of the voltage generated by the sound is less or equal to that 100mV, so, I can't get a properly response.

author: xolott
author_rank: Contributor
timestamp: April 01, 2015, 09:18:40 pm
content: I'm using a 5V power supply that came with my Atmel SAM development board:And, without load I get:

author: AndyC_772
author_rank: Super Contributor
timestamp: April 02, 2015, 06:15:41 am
content: Your attachments aren't visible.

author: Zero999
author_rank: Super Contributor
timestamp: April 02, 2015, 11:46:16 am
content: Quote from: xolott on April 01, 2015, 08:27:59 pmAre you sure U4A isn't oscillating?Another thing to bear in mind is the LM324 doesn't have much gain at 40kHz, about 25dB (that's Av of about 18), so the gains will be much lower than expected.http://www.ti.com/lit/ds/symlink/lm124-n.pdf

author: Marco
author_rank: Super Contributor
timestamp: April 02, 2015, 03:24:37 pm
content: Quote from: Hero999 on April 02, 2015, 11:46:16 amOh hey, you're right ... he wired the schmitt trigger wrong.His highest amplification is 11x so the opamps should be able to handle 40 kHz ... but the way the amplification is divided is a bit haphazard. -6, -4 (at 40 kHz), -11 ... and those tiny C1&C5 coupling caps shave off a bit as well.The LM324 doesn't swing terribly high either, since most of the stages will be saturating most of the time the asymmetries are going to cause problems I think.Maybe it would be better to just use a common source amplifier before a logic device schmitt trigger and avoid all this opamp mess ... you lose the opportunity for a multiple feedback bandpass filter, but the one he has doesn't have a particularly high Q any way.

author: xolott
author_rank: Contributor
timestamp: April 02, 2015, 07:18:38 pm
content: Quote from: AndyC_772 on April 02, 2015, 06:15:41 amSorry about that. It is fixed!Quote from: Hero999 on April 02, 2015, 11:46:16 amI'm not at work right now, but I did the simulation on pSpice (Cadence) and everything works great. And for <2.5m I get the expected output on every stage.I have no shame to admit about my poor knowledge on analog electronic. My university teachers give me the worst education in OPAMPS, and at that time gave no importance. Until now, that I really need it.Quote from: Marco on April 02, 2015, 03:24:37 pmI connected the Schmitt trigger wrong? Can you tell me where I have the mistakes?

author: AndyC_772
author_rank: Super Contributor
timestamp: April 02, 2015, 07:56:44 pm
content: OK, please could you post a photo showing your board and how you're probing it when you see the noise?Getting rid of that noise will give a much clearer picture of what your ultrasonic signal is doing. It shouldn't really be there, and I suspect it's as likely to be a result of poor grounding and/or probe technique than anything wrong with your circuit itself.Does your scope have a bandwidth limiting function? It can be helpful to turn this on when probing low level, audio frequency signals.

author: Zero999
author_rank: Super Contributor
timestamp: April 02, 2015, 08:01:23 pm
content: As drawn, U4A and Q1 form an inverting amplifier, not a Schmitt trigger.Q1 and R14 form a common emitter amplifier which is inverting and is added on to the output of a non-inverting op-amp stage. It's quite likely it will oscillate because the transistor will boost the op-amps gain at a frequency when phase shift is 180owhich will cause positive feedback and oscillation.To make a Schmitt trigger you need positive feedback at DC.

author: xolott
author_rank: Contributor
timestamp: April 02, 2015, 08:33:38 pm
content: Quote from: AndyC_772 on April 02, 2015, 07:56:44 pmThis is a cheapOscilloscope, so I think it dont have it. But the next monday I will take the pictures to show you what I'm doing.

author: Zero999
author_rank: Super Contributor
timestamp: April 02, 2015, 10:02:10 pm
content: That oscilloscope comes in several different bandwidth options but even the 60MHz one should do here.

author: AndyC_772
author_rank: Super Contributor
timestamp: April 03, 2015, 07:07:34 am
content: My point was that 60 MHz is way more bandwidth than you want for this application. It's showing up a lot of noise which masks the wanted signal, and which may just be common mode interference that the amplifiers in the circuit don't even see.

author: Zero999
author_rank: Super Contributor
timestamp: April 03, 2015, 08:58:19 am
content: Quote from: Marco on April 02, 2015, 03:24:37 pmIdeally you want the open loop gain to be several times the closed loop gain.QuoteThe LM324 doesn't have sufficient slew rate to reach either supply rail at 40kHz.QuoteHow about ditching the whole thing and using a phase lock loop such as the CD4046?

author: mk_
author_rank: Regular Contributor
timestamp: April 03, 2015, 09:35:54 am
content: Quote from: xolott on April 01, 2015, 08:03:46 pmTry to use a VGA (THAT has some nice parts) as a 2nd stage-Receiver, starting with min. Gain and going up to max gain when distance is high. I did 6m (= 12m both ways) without any problem with a human and normal dressed personSchematic is not aviable, sorry.good luckmichael

author: Marco
author_rank: Super Contributor
timestamp: April 03, 2015, 06:21:44 pm
content: Quote from: Hero999 on April 03, 2015, 08:58:19 amOh, didn't know that had an build in amplifier ... still 150 mV sensitivity is a bit weak.

author: Zero999
author_rank: Super Contributor
timestamp: April 03, 2015, 07:58:20 pm
content: Quote from: Marco on April 03, 2015, 06:21:44 pmAnother amplifier will probably be required but it simplifies things greatly. A logic gate could be used as an amplifier and a simple band pass filter before the PLL.http://www.ti.com/lit/an/scha002a/scha002a.pdfhttp://www.ee.nmt.edu/~thomas/data_sheets/phase-ll-scha003b.pdfhttp://old.iihr.uiowa.edu/~hml/people/kruger/Teaching/ece_55141_2012/Lectures/PLLs.pdf

author: xolott
author_rank: Contributor
timestamp: April 07, 2015, 01:54:53 pm
content: Hi, I change the oscilloscope probe and almost all the noise dissapear.Yesterday, I tried to increase the amplifier gain, but the whole thing went to oscillation.Quote from: mk_ on April 03, 2015, 09:35:54 amI got an application note from Freescale that use the same transducers, and a Programmable Gain Amplifier. That will be my next test, but now I dont want to give up with my current schematic. I really wanna understand the behavior of this.Quote from: Hero999 on April 03, 2015, 07:58:20 pmI really dont understand the approach of the PLL idea.

author: Marco
author_rank: Super Contributor
timestamp: April 07, 2015, 06:11:37 pm
content: Generally you'd use the PLL to make a lock in amplifier.On second thought though, it's not terribly relevant here because of the short bursts ... you'd generally use this if you have a modulated carrier.

author: Zero999
author_rank: Super Contributor
timestamp: April 07, 2015, 06:30:34 pm
content: I was thinking of a tone detector but that's a point, if the bursts aren't very long then there might not be enough time for the PLL to lock on to the signal.Here's a tone decoder circuit found the a Forrest Mimms book (I can't remember which one), except I added a filter with a very high gain to improve the sensitivity. As shown the centre frequency is 2.4kHz so the component values would need to be changed for other frequencies. The PDFs I linked to contain the calculations.

author: xolott
author_rank: Contributor
timestamp: April 07, 2015, 06:41:20 pm
content: Quote from: Marco on April 07, 2015, 06:11:37 pmQuote from: Hero999 on April 07, 2015, 06:30:34 pmI get it, but in this case I'm facing with a low cost simpliest circuit as possible. I did a test, configuring the first opamp to Gain = 1, and a 1Khz, 40mVpp, square signal as input, but the ouput is fairly near to 3mVpp. PS: I noticed that the opamp's IC is actually a AD8544 from Analog Device, and not the LM324. My boss changed the BOM without telling me.http://www.analog.com/media/en/technical-documentation/data-sheets/AD8541_8542_8544.pdf

author: Marco
author_rank: Super Contributor
timestamp: April 07, 2015, 11:47:25 pm
content: I think if you want the best sensitivity you should use a quadrature detector, you probably have a micro ... that should be able to give you two 40 kHz square waves at 90 degree phase. Gate the input with them, amplify the AC coupled gates signals with two common source amplifiers, sum the results with an opamp and you have a 40 kHz quadrature detector. One opamp, 4 2n7002s, a couple signal clamping diodes, assorted resistors and small value capacitors.