Electronics > Electronics

Sharp GP2Y0D810Z0F Digital Distance Sensor 10cm

<< < (3/4) > >>

paulstreats:
Yep, theyre the surface mount version of the QRD sensors, sometimes they can be driven with a longer range then they were designed for but they have unreliable and differing ranges they can be pushed and a very limited lifespan when you do, theyre typical range is less yhan 2.5cm so a bit small for my application,  which is a shame with them being in such a neat little package

jwatte:

--- Quote from: paulstreats on May 04, 2013, 02:38:38 AM --- First of all, yes sunlight does disable this sensor somewhat just the same as it affects Sharp sensors (they also suffer oversaturation, just like the eyes in your head become oversaturated in bright sunlight) Thats the reason Im doing tests with different resistor values and also intend to repeat the tests with the detector in a photodarlington setup so I can minimize oversaturation while maximizing the light I want.

--- End quote ---

But that's not the point here. Light with content within the IR spectrum shining into your detector will tell the detector there's something there, no matter whether it is or not. The reason for that is that it's basically just a "light detector" coupled with a "lamp" for a particular "color."

The reason I made my comment was that you seem to claim that this simple "flood" sensor is all that's needed for a robust sensor, and from what I know, that simply isn't so except in the most simplistic of cases.

Sensors that are more robust, modulate the output light at a certain frequency, and filter the input signal for that frequency of baseband. Note that this is a modulation frequency, like 38 kHz, rather than the bazillion-hertz-range light frequency I'm talking about :-) Thus, the analog receiver stage can de-modulate by looking for the presence of a 38 kHz signal within the general, flooded, IR input signal. As long as you don't saturate the sensor entirely (which can largely be prevented with an automatic gain control -- AGC circuit) then the carrier-modulator mechanism is more robust than the circuit you are showing. It is my understanding that the Sharp sensors use this mechanism. This is similar to how IR remote controls modulate the light signal with a carrier frequency (which is then also modulated with an actual bit pattern!)

So, that's what I'm getting at: Your detector does nothing to make sure that the light it detects comes from the light it's intended to read. The light emitter does nothing to make sure its signal is discernible from any other light signal in the same spectrum. Your sensor would take a significant step up in robustness if you modulated the output LED, and filtered the input signal for that frequency (or, at a minimum, filtered out DC from the input signal.) The simplest possible change to your circuit would be to drive the LED from a digital out pin on your microcontroller, and set it to PWM, and then add an RC filter to high-pass the output of the phototransistor (and then re-buffer it with an opamp or whatever.)

Here's an example of what I mean:



Pin change interrupts would be a great way of reading that sensor! (And it's a sketch; you'd probably have to tweak the component values some)

Try it! Run 10 kHz or better PWM, as that's the time constant of the RC filter. You'll likely find that it's a lot better at discrimination than the simple circuit you posted. It can be made a lot better still, for example with a much narrower filter around the modulating (PWM) frequency. Right now, it will detect a change of input light as a "change" no matter what, so you have to look for presence over some amount of time. You could also filter the post-opamp

Another good link if you want robust detector designs is this analog devices website and photo detector design tool: http://designtools.analog.com/dt/photodiode/photodiode.html

paulstreats:
Im sure i mentioned that setting frequency can be done in code... the idea right now is just to get it working and find the constraints. Really that kind of thing is common sense. Plus you can use light cancelling as a much simpler way if you require. Take a reading without the the LED's on, then switch on and take another reading. The first should be the background light, and the second should be a combination of the background light plus the light reflected from the LED's. So takes the first reading from the second reading and i'll be left with only the reflected light values. quick and easy as long as the sensor doesnt oversaturate (the reason im developing it in solid state to start with).

 My program will likely have direct read, background cancellation and frequency modulation built in but only use the second 2 when it becomes needed to save code and make a smart program that can decide whether to trust the sensors or to read them in a more advanced way when it needs to. Saving runtime etc...

 I do understand your concerns but somebody thats building something rather than using a generic off the shelf product is probably going to put time and effort into finding problems and trouble shooting and resolving them.

 The circuit diagram i posted was the setup right now and to demonstrate the basic principle, once i incorporate them into my robot, the leds wont be connected direct to the power supply but connected to the microcontroller via a mosfet or transistor to allow pulsing, and other things like PWM to conserve power in lower light conditions and of course switch them off during standby and the such.

 Im am spending a while on developing these, not just the hardware side but also the software side too, in order to develope a reliable and resilient detector that i can trust, I have faith in my ability so I believe that by the time im finished, my sensors will be as reliable as the off the shelf generic ones, only tailored to my needs. Im not saying they'll be suitable for all applications (I will be using 3 sharp sensors too and potentially the big 3 metre one ive got - currently set up as the head on my bug, it looks amazing! just the right size and the lenses big enough to look like eyes!!) and im not pushing them onto other people, just allowing them to decide whether to try and make their own and giving them a starting point.

jwatte:

--- Quote ---I do understand your concerns but somebody thats building something rather than using a generic off the shelf product is probably going to put time and effort into finding problems and trouble shooting and resolving them.
--- End quote ---

Agreed! And they may find this thread when searching for information. And I think it would be great if this thread actually contained an illustration of a robust way of doing it.
Note that the schematic you posted does not support any of the features you mention in your later reply, as it just feeds the LED from +5V and has no de-coupling or filtering of the input signal.

Doing "cancellation" by reading twice is less robust than a proper high-pass filter, because it relies on the ADC being very precise AND covering your entire sensor working area. Typical AVR ADC implementations are actually pretty noisy in the last two bits, and thus give you perhaps 8 bits of resolution, which means about 48 dB of sensitivity from "absolute lowest" to "absolute highest." Yet, the difference between "full sunlight" and "starlight" is about 120 dB. (Even "full sunlight" to "twilight" is about 80 dB)

I'm not saying you're doing anything wrong, except you seemed to be saying that the very simplistic diagram you posted is as good as industrial sensors, which I think is untrue, and would confuse others who find this post and want to replicate your progress, that's all!

calinezul:
There are some features of the sensor http://letsmakerobots.com/node/5385 and more help about connection mode can be found in this article http://www.pololu.com/catalog/product/1134

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version