qenops / HelpRequest

0 stars 0 forks source link

Help with multiple Sharp GP2Y0AF15X #1

Open qenops opened 4 years ago

qenops commented 4 years ago

@sharpsensoruser I love the guides you have written they are very helpful! Great job on those.

I'm having trouble getting a clean signal from the Sharp GP2Y0AF15X. I noticed that there are short spikes in the output signal which I assume occur every time it makes a new reading. I saw some other sensors recommending the use of a capacitor nearby on the incoming power lines to provide the short bursts the sensors need, so I connected some different size caps to attempt to even out the signal. While they seemed to help, none fully eliminated the spikes. Is there a capacitor recommendation included in the documentation? From what I've seen I can't find one.

I can certainly filter the spike for a single sensor in Arduino code, however, when I have multiple sensors connected to the same power source, the spikes from one sensor also affect the others. This creates noise such that a good reading is impossible, even with capacitors connected. Do you have a recommendation on how to get around this?

Thank you so much!

sharpsensoruser commented 4 years ago

Hi there,

I haven't tried this myself but the specification for GP2Y0AF15X (http://www.socle-tech.com/doc/IC%20Channel%20Product/SHARP_GP2Y0AF15X.pdf) - Page 12 says "In order to stabilize power supply line, we recommend that a by-pass capacitor of 10μF or more shall be connected between Vcc and GND near this product". Actually, this is also recommended for Sharp's other analog distance sensors such as GP2Y0A51SK0F (https://global.sharp/products/device/lineup/data/pdf/datasheet/gp2y0a51sk_e.pdf). Also see: https://www.pololu.com/product/2450/specs. Sharp GP2Y0A41SK0F and GP2Y0A51SK0F are older sensors which have been around for few years so you may be able to find more info on them which might be applicable to GP2Y0AF15X as well.

Regards,