Sharp GP2Y0D810Z0F w/ Pololu Carrier

I purchased this sensor to use with my robot as a means of detecting obstacles within 4 inches. As I was testing the sensor I found a problem that I could use some help with. I placed a small box in front of the sensor out of the 4 inch range and the sensor sensed nothing(LED was off). Then I moved the box into the 4 inch range and the LED turned on so it was being sensed. The problem that I found was when the sensor was in the open with nothing around, it seemed like it got confused because the LED flickered really fast, but then as soon as something was put in front of the sensor about 1 and a half feet away it calmed down and the LED turned off. I bought four of them and they all do the same thing. Any help would be greatly appreciated.

Hello.

I think you might have some background IR interfering with the sensor or a problem with the power supply. Are there lights that you can turn on and off to see if they are the source of the interference? How are you powering the sensor (including wire lengths)? If you have a poor power connection, putting a capacitor (around 10uF and up) close to the board could help.

- Jan

jeff10,

I’ve had the same experience with mine. I ended up debouncing the signal in software, which kind of defeats the fast reaction time on the sensor. I’m powering mine with regulated 3.3V. What voltage are you using? I was wondering if they like 5V better, but I haven’t tried it.

Michael

I was powering the sensor with a regulated 5V benchtop supply. Since I was just testing them out I ran the 5V to a breadboard and then used a 6inch 3 position custom cable from the breadboard to the sensor. At the terminal on the pololu carrier board I attached a 10uF cap. There weren’t any lights on when I was testing the sensor.

So are you saying the cap made the problem go away? How long are the leads from the power supply to the breadboard, and does that have any power supply caps on it?

- Jan

The problem did not go away with the cap. The leads from the power supply to the breadboard were 24inches and there were no caps on it.

Sorry; I forgot my own lights question and then misunderstood your post. I guess the last thing I can request is for you to try it at night. If, in the dark, and with a 10 uF cap right at the sensor, you still get the red LED flickering, I’d like to take a look at that sensor.

- Jan

I went back and attempted to test the sensors again. This time I put the 10uF cap on the breadboard right were the 6inch cable from the sensor was connected and all the sensors worked correctly. I am thinking the first time when I used the 10uF cap right at the sensor that I didn’t have a good enough connection. Jan, thank you so much for all your help.

Jeff

I’ll have to try adding a cap and see what that does for me. I’ll report back when I get the chance to test it.

Michael

Hello,

I had a question with regards to adding capacitors on the circuit . I was reading through the Maxbotic FAQ for the EZ ultrasonic range sensors.
And there was a comment (Question 8) which may apply in this case here too. Putting the analog and digital difference
aside, there is a time constant that is affected. If you put a 10uF electro capacitor, doesn’t that
effect the time constant of the circuit by slowing it down (ie. adding a 1 - 5 ms delay) on top of the sensors inherent
delays. Is my understanding correct? Don’t the internal pull up resistors (10K ohm) on most MCUs also add provide some noise regulation?

If you were polling four of the sensors in quick succession, would it not drain the battery because it is first having to
charge four 10uF capacitors before any reading can be taken? Or is it negligible?

Like many others, I have employed the same sensors (4 of them) as non contact bumper switches, one on each side of a rectangular shaped
chassis (RP5). In fact if you can mount them exactly half way (the 10 cm/4inch range sensors) can give you a clearance indicator for when you
want your robot to do a 360 turn with out crashing into objects.

Regards,
Carl.

I’m not sure what you’re talking about. The whole point of question 8 in the FAQ is about an analog signal, so I don’t think there’s much left if you “[put] the analog and digital difference aside”. We’re were talking (in this thread) about capacitors on the power supply, which shouldn’t affect the output other than removing problems arising from glitches on the power lines. The capacitors shouldn’t affect your power consumption unless you are turning the power to the sensors on and off, and even then, it probably wouldn’t be too noticeable of a difference.

- Jan

Jan.

I was just trying to question the use of 10uF from a circuit theory point of view
in terms of an RC time constant, as digital IO lines are most likely the ones to be
switched on and off.

Thank you for clearing that up.

Carl.

It still doesn’t sound like it’s very clear to you. You understand that we’re not talking about capacitors on I/O lines, right?

- Jan

Jan,

Your advice makes sense. It is the power supply filter capacitor that you are referring to and not a I/O line capacitor.

I have been using 4.7uF electro caps to achieve the same purpose and that has been sufficient so far for these same
digital Sharp IR sensors, with two motors running,reversing, turning, braking, etc. However, each persons project and set up
is different. Perhaps making the 10uF a safe bet. Mine was determined experimentally using an oscilloscope while cycling
the motors through different modes.

Carl