Electronic – arduino – Problem with Arduino and 2 Sharp IR sensors

arduinodistanceinfraredsensor

I have 1 Arduino and 2 IR Sharp GP2Y0A02YK0F proximity sensors, I connected 1 sensor, with mounted capacitors between GND and VCC (100nF, 10000nF)

Everything is fine, I have good values, but when I connect the second sensor, both get electrically disturbed.

I get strange values from both sensors. What can I do that I get good Values of both sensors with 1 Arduino board?

Best Answer

It is possible that the two sensors get cross interference, since they both work with IR beams. If you have to use them in parallel make sure they are pointing in different directions. Alternatively you can implement a switching algorithm on your Arduino. That is to turn on the first sensor, take measurement then turn off and then repeat with the next sensor. This way there will be no cross interference even if the point at the same location.