Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Distance sensor

Status
Not open for further replies.

MoRoH

New Member
Hello all,

I am building a distance sensor..I have the ucontroller portion done. I was going to use IR to reflect a beam and get a proportional analog voltage to estimate distance but...it has no range:mad:

Any ideas/methods?


-MoRoH
 
Last edited:
If you want to measure range with light/IR you need either precision optics (uses angle of reflection and triangulation) or precision and ultra-fast timing circuits (time of flight). You can't really build either yourself.

Just buy an IR sensor from Sharp (that uses angle of reflection). Time-of-fligt sensors are just too expensive (at least $5000 each, easily up to $10k and beyond).

For example, and of the SHarp IR sensors on this page like the GP2D12. Because of they they work however, they do have noticeable minimum ranges and maximum ranges (to get a longer max range you must tolerate a longer minimum range as well unless you use multiple sensors).
Infrared and Light Sensors - RobotShop.ca

But for cheapness and low minimum range with large maximum range, ultrasonic is the way to go on a hobbiest budget:
Ultrasonic Range Finders - RobotShop.ca

All of the aformentioned Sharp sensors models plus more models and most of the aformentioned ultrasonic sensors can also be found here:
Sensors

In case you were wondering...measuring intensity to determine distance tends not to work because it is too dependent on object colour and reflectivity. Plus the light dissipates too much so you have to use lasers or something. Time-of-flight is probably the best, but the hardest to make with since you must time something that travels at the speed of light. That's why sonar is popular- sound travels much slower than electronics work at so it's easy to measure. Otherwise, with light, angular reflection and triangulation tends to be the cheapest method.
 
Last edited:
Thanks, ill look into that. I'm thinking about scraping the IR idea all together. Just seems like the IR like wont reflect like i want it to.

Did you ever see anyone build any ultrasonic/sonar sensors?

All i really want it 0v output when your 4feet away and 5vdc when you 4 inches away type thing. But it has proven harder than expected :)
 
So what you really want is a proximity sensor, not a rangefinder. There are special versions of those IR sensors on the websites I gave you- the ones with "digital output". THey just output a high or low if something is within range or not rather than a voltage that represents distance (which, by the way is non-linear, and sort of like an exponential curve...it's on the tutorial/info/app notes on the Acroname website for those sensors and must compensated for by a MCU).

Sharp IR Rangers Information
Linearizing Sharp Ranger Data

But an ultrasonic sensor is quite buildable. It's not really a side-thing though. It's more of its own project. It is basically getting a piezo ultrasonic transducer (not electrostatic because although they have better sensitivity, range and bandwidth they are much harder to drive because of the high voltages involved). Get a small driver like a transistor or several, depending on how you want to do it and wire it up to an MCU to send a square wave of the frequency of the crystal you want into the ultrasonic sensor (piezo crystals have a tendency to not vibrate frequencies other than their resonant frequency so they will filter out the harmonics of the square wave themselves, which is great because producing a sine-wave is a lot more difficult than making a square wave). The receive circuit is taking the output from the sensor and amplifying it and filtering out stray frequencies making a pulse that the MCU is supposed to detect.

If you are interested, here are some hints on how to make receivers and drivers.
**broken link removed**
And look at a lot of ultrasonic schematics on the web to get a gist of how they all work, then build your own with your own ideas. Some GOOD reference schematics rather than a lot that are found on the net are provided by the manufacturers for some of the models of the better ultrasonic sensors given so far:
**broken link removed**

My description above how the basic concept for the simplest rangers should go a long way to help you understand what to look for when trying to figure out how the circuit works if you know nothing.
 
Last edited:
I think you are using a uc with IR sensor pair and want to find out range then you have to measure the analog voltage across IR photodiode . This can be done by using a A2D converter which is an external ic and some uc have inbuilt a2d ic's.
You require a2d because uc can understand only digital logics and you have to convert the analog voltage across the IR photodiode to digital value so that uc can further process it.

After you finish this setup you need to do a bit of research and manually check the voltage developed across the photodiode for a given distance and then write code in uc accordingly.

If your sensor pair has very little range and you want to increase its range you can ask me.
 
friends i want the circuit diagram plus all the details of distance sensor with complete discription of the circuit. if any body knows then help me. i want it urgently.or tell me a web site on which many latest projects are there.
 
friends i want the circuit diagram plus all the details of distance sensor with complete discription of the circuit. if any body knows then help me. i want it urgently.or tell me a web site on which many latest projects are there.
 
friends i want the circuit diagram plus all the details of distance sensor with complete discription of the circuit. if any body knows then help me. i want it urgently.or tell me a web site on which many latest projects are there.

What range? Have you tried Google? Why is it urgent?
 
Can you tell me which kind of laser beam you are using in this project . after the complete information i can help you ....:confused:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top