Trouble with 3 IR distance Sensors

Following in the footsteps of the 3pi sample project involving 2 IR distance sensors which could navigate obstacles on the left, I’ve set up a m3pi robot with 3 IR sensors and a wixel module, which is supposed to send the 3 distance measures back to a computer with another wixel for monitoring. Everything works fine with 2 sensors, but the moment I plug in the third, the robot starts regularly resetting itself, and hence doesn’t work. Two of the IR sensors or powered by the Vcc ports on the 3pi expansion pins from the base, while the third is supposed to be powered by the Vcc pin on the front right of the robot. Is it possible three sensors pulls too much current and resets the microcontroller somehow? It doesn’t seem to matter which of the three sensors I unplug, 2 sensors always works fine, and 3 doesn’t work at all. I do not have the capacitors installed for each sensor, so perhaps that is the problem?

Thanks in advance!


It sounds like it’s either a noise issue or you are drawing too much current from the 5V regulator. The Sharp analog distance sensors draw large amounts of current in short bursts, and adding a capacitor near the sensor can make a big difference in both sensor performance and its impact on the rest of your system. I suggest you try adding a 10+ uF cap near each sensor to see if that fixes the problem. Otherwise, you will probably need to use a separate regulator powered from VBoost to power the distance sensors.

- Ben

So following your advice it works much better now, with caps from Vcc to Ground near all the sensors. Now I just need to finish the rest of the project!

Thank you very much!