Having trouble powering Arduino and Sensor seperately

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?

When you used the power adapter to power the sensor did you connect the sensor GND and Arduino GND together as you should have ?

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 I must connect both the Arduino 5V and and GND. Connecting GND of adaptor seems to be optional and without any benefit or harm..

What the weird decision?

Why do you try to connect ONLY ONE WIRE - first the GND and second the VCC? You must connect both.

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?

If you feed the sensor with separate power supply, you don't need to connect 5v from arduino.

Please show your connection diagram.

Here's a block diagram of the present connections

Arduino is powered via my computer

ok, problem resolved. Apparently the oldest problem in the book - weak connections. adaptor wasn't fitting well in the wall socket.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.