I have a Sharp proximity sensor connected to my Arduino (analog input). This Arduino is connected and powered through USB by a laptop.
When the laptop is plugged in, everything works fine (I get consistent readings).
When the laptop is running on batteries, the values I'm reading are "chaotics". I mean that they vary a lot.
I also have an Arduino motor shield, which is powered by an external battery, but that's just for the motors (sensors are powered by the Arduino). The GND of the battery and of the Arduino are connected though, maybe that's causing the problem?
Or is too much power required from the USB?
Well, do you have any idea to understand that and fix it?
- Sensors reading are "smoothened" using a low pass filter (see my previous question about it).
- (if you need some more information, that will show up here)