Lots of strange Sharp IR Noise…?

Hey everyone. So, I just finished my first robot in a few years, my first being 2 1/2 years ago. This one is a lot more complicated in terms of hardware since I made my own boards and all, and have 5 ICs in one circuit. I'm done with programming and everything runs well but there's one ongoing problem with my Sharp IR GP2D120 sensor.

Now, there's nothing physically wrong with the sensor. When connecting to an empty Picaxe project board and debugging the adc value, it acts normally. However, when used in my circuit, when only reading the adc values from the sensor, it gives back a constant reading of 60 - 90 even if nothing is in front of the sensor!! I tried putting a 10 uF electrolytic and .1 uF non-elec. between GND and VCC right on the sensor, but it only brought the maximum false reading down from 100. This is a huge problem, since it reduces the maximum distance into about 1/3 - 1/4 of the normal. As in, when I have the sensor pointed at the ceiling even with the lights off, it gives a reading of ~ 60. As such, it has greatly reduced my robot functionality. As I've said, by itself in an otherwise empty circuit, it works great, so it's not the sensor completely to blame. Sorry on not having a schematic, I'll try to post one....

Turns out that it was just

Turns out that it was just because my mcu power supply was a 9V battery regulated to 5V, which powered 5 ICs, 2 7 segment LED displays, and 2 white LEDs. Replacing it with a 4.5 AA supply solved the problem. However, does anyone know why this would be the cause of the problem? I’m guessing the low current?

Of course!

Of course!

Cool, now I know why nobody

Cool, now I know why nobody recommends 9V batteries for robots…

Yeah 9V can only provide

Yeah 9V can only provide double digit milliamps. Good to run a few LEDs but nothing spectacular.

Same error

I am having excatly the same error with the IR sensor, but i am not using 9V battery, rather i am using 3AA (1.5V) = 4.5V, but still the error persists… adding the capacitor only worsed the condition. Please Help me out asap…