I've got a Infrared sensor working on 5V and giving out an analog signal being read by my Arduino Nano 5V. It works fine when the sensor is powered by Arduino, but I was noticing that the base line signal was rising after continuous use.
I figured it might be solved if I power the sensor separately by a 5V adaptor, but for some reason doing that shoots the analog figures to the full 1024 ADC value , i.e 5V, instead of the base 3-5 ADC readings. But when I connect the 5V and GND from Arduino to the sensor in line with the adaptor connections, things go fine. Why is that? Must I power the sensor with adaptor and arduino both? Can I not just power the sensor with the adaptor and read tha analog output on arduino?
earlier I had not connected the arduino GND to the sensor but later I tested it by disconnecting the Arduino 5V from the sensor and only connecting the Arduino GND. That completely removed any signal, I got flat 0 V on the plotter.
Then to test further I removed the GND of the adaptor, but that had no effect on anything. Apparently I need only the +ve from the adaptor to make things go. Don't get it.
Right now, the sensor is connected to 5V and GND from both arduino and adaptor. I need to understand why must the arduino connection be there? The reason I am asking is because I might eventually power the sensor with a higher voltage, I don't want to pour that higher voltage into Arduino 5V pin.
Your assumptions are wrong.
Please show a full connection diagram for your power supplies, Arduino board, the sensor and its adaptor.
What is your experience in electronics and programming?