Sensor Recommendation for 0-30cm Distance Measurement - Page 1
Forum section: electronics / beginners

author: rneraslan
author_rank: Contributor
timestamp: April 06, 2017, 12:10:02 pm
content: I was working with a circuit measuring 4-5 meters with an ultrasonic sensor.But no matter what you do with the ultrasonic sensor design, you can not measure below 20 cmI want to add an IR sensor into this design and measure the dead distance of the ultrasonic sensor.I have 2 parameters to consider.-low cost (under $3)-distance is max 30cmthese are what I found on digikeyVL53L0Xhttps://www.digikey.com/product-detail/en/stmicroelectronics/VL53L0CXV0DH-1/497-16538-2-ND/6023691RFD77402https://media.digikey.com/pdf/Data%20Sheets/RF%20Digital%20PDFs/RFD77402_v1.0_2.07.2017.pdfTSSP77038https://www.digikey.com/product-detail/en/vishay-semiconductor-opto-division/TSSP77038TR/TSSP77038TRCT-ND/6228252TSSP4P38http://www.digikey.com/product-detail/en/vishay-semiconductor-opto-division/TSSP4P38/TSSP4P38-ND/3789835What would you recommend of these / out of these?

author: Benta
author_rank: Super Contributor
timestamp: April 06, 2017, 02:51:16 pm
content: The ST part looks promising and does exactly what you want.

author: janoc
author_rank: Super Contributor
timestamp: April 06, 2017, 03:44:39 pm
content: Quote from: rneraslan on April 06, 2017, 12:10:02 pmThat's to be expected - at 20cm the roundtrip time of the "ping" is only around 1ms. That's very difficult to measure with any reasonable accuracy using the cheap ultrasonic sonars.VL53L0X - that is a laser ToF sensor, meant for range finders up to 2m. Maaasive overkill, IMO, and may not work well at the short distance neither. Datasheet doesn't specify it but their graphs don't go below 50mm, curiously ...RFD77402 - another ToF sensor, 100mm minimal distance.TSSP77038 - these two are IR remote control receivers, that's not useful for what you want.TSSP4P38Quote from: rneraslan on April 06, 2017, 12:10:02 pmNone of the above. The ToF sensors are a massive overkill and quite expensive ($2.56@5k), fairly esoteric components. Moreover, they are also not designed to work at short distances, e.g. RFD77402 does not work under 10cm.A simple solution is a LED + phototransistor measuring amount of the reflected light. And then you calibrate the measured intensity to give you distance. It is not totally universal, different surface colors and finishes will make the measured distances vary, but that is true even for the expensive ToF sensors. This is a commonly used method for sensing short distances - e.g. the Roomba robots use it to detect obstacles and to slow down instead of slamming into them at full speed. If you don't need superb accuracy then this is hard to beat on cost and simplicity.If you want higher accuracy and the object you are measuring is conductive, then inductive or capacitive sensing can be used too. You can get plenty of industrial sensors like that, ready to go.Another option is using a camera + laser, the idea how that works is explained here:https://sites.google.com/site/todddanko/home/webcam_laser_rangerThese are best at exactly short distances where you have the most resolution. If you don't want to put a camera there, it is possible to do it with a linear CCD (like the ones used in scanners). One such project is described here:https://hackaday.io/project/9829-linear-ccd-moduleThese range finders have good accuracy, but it is a bit complicated build.However, you didn't provide enough detail of what are you trying to measure, so it is difficult to give you a more precise advice.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: April 06, 2017, 04:05:10 pm
content: Sharp makes a line of optical sensors based on geometry between a transmitter and receiver.http://www.sharp-world.com/products/device/lineup/selection/opto/haca/diagram.htmlThey work well enough within their limitations and are not expensive. You might find something you like here. Don't know about small quantity sourcing. Places like Adafruit retail some models.

author: janoc
author_rank: Super Contributor
timestamp: April 06, 2017, 04:56:45 pm
content: Didn't think of these Sharp devices - that is essentially the LED+phototransistor I have been talking about but they throw in the signal processing for you already. Nice.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 06, 2017, 04:58:38 pm
content: Have you tried the Maxbotix ultrasonic sensors - ISTR they will detect pretty close up

author: Kleinstein
author_rank: Super Contributor
timestamp: April 06, 2017, 05:04:56 pm
content: The Sharp IR sensors use a kind of triangulaton, not just by intensity. However they are not super high accuracy, but may be on par the US.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: April 06, 2017, 05:34:32 pm
content: Maxbotics stuff is good and often works up close, but they clearly point out that they are unreliable at short ranges, and in many models will no longer report ranges less than 25cm.

author: Benta
author_rank: Super Contributor
timestamp: April 06, 2017, 07:33:01 pm
content: How about just using an automotive PDC sensor?

author: janoc
author_rank: Super Contributor
timestamp: April 07, 2017, 04:24:41 pm
content: Quote from: Benta on April 06, 2017, 07:33:01 pmThose are also ultrasonic and rarely work at very short distances.

author: djnz
author_rank: Regular Contributor
timestamp: April 07, 2017, 04:32:00 pm
content: Sharp GP2Y series? They are optical.I have always gotten better use out of them than from ultrasonic sensors.

author: metrologist
author_rank: Super Contributor
timestamp: April 07, 2017, 05:05:40 pm
content: I had a thought of IR interferometry and ended up going toward laser interferometry, to discover my system's mechanical stability was at least 10x less than the resolution of what I could measure. It was like hand holding a 60x binocular to see a point a billion miles away. Anyway, it seems like that would work well in the mm wavelength range.

author: woodchips
author_rank: Frequent Contributor
timestamp: April 07, 2017, 06:02:48 pm
content: Instead or TOF why not try modulating the ultrasonic and then sweeping the frequency to get rid of the multiple zero points, like the old AGA telurometer?

author: metrologist
author_rank: Super Contributor
timestamp: April 08, 2017, 12:06:09 am
content: I ended up just setting up a classic high school Michelson interferometer made from scrap I had laying around. The beam splitter came from a DVD burner. I wanted to do this using IR but was not finding a clean enough source nor a way to "split" an IR signal (but perhaps the same laser beam splitter would work). I thought a receiver could just count nulls...I also thought that if I had an IR transceiver, I could simply measure the phase shift of a reflected signal, or even the destructive nulls.I got nowhere because I'm really a fish out of water here. The laser was too sensitive and I suspect there are no clean IR transmitters in my drawer. I still have some good applications for short, very accurate distance measurements, though.

author: miceuz
author_rank: Frequent Contributor
timestamp: April 08, 2017, 03:21:43 pm
content: I was developing an ultrasonic sensor to detect a hand in 0 - 50cm range for a year, it certainly is possible, but variation in transducer parameters was killing the production - we needed big splash resistant transducers that were unobtanium except for some obscure place in aliexpress. I have used the same principle used in cheap chinese modules - variable gain amplifier and variable threshold for echo detection controlled by a microcontroller.Then I left the company for other reasons, they got a greybeard analog guy to fix my design, he tried for a half a year to no avail. Then I got VL53L0X for myself, tried it, pointed them to it and now they are happily using it being able to throw away all the analog part of the design.In my experience short range distance measurement is a tough problem to solve if you want a cheap solution. Infrared might work in constant lighting conditions, but flies out of the window in the sunshine. Even the modulated pulse ones. Ultrasonics is killed by self resonance of transducer and mechanical system around them. Camera and laser is limited by camera resolution.