wall wart vs USB/9V battery

Hello,

Why does the analog sensor (lets say a 5V temperature sensor) value differ when powering Arduino with a wall wart/USB/9V battery?
With all these three power sources I receive different values.

Thanks.

Best,

Z

Perhaps the temperature changed in the time it took you to switch the power. Are you comparing the temperature you read against a known value?

No temperature didn't change. I know temperature is constant since I am trying to calibrate.
Using wall wart I see almost correct results, 23C but with USB, it shows 40-42C and 9V battery shows 26-27C.

I didn't just notice these differences with only temperature sensor but also with gas sensors.
I am wondering what is the issue here.

Wow, 23 vs 40+ is kinda drastic....

Maybe you need to check that the voltage supplied from the Arduino 5v is actually 5v under all three situations?

Are you using the 5v pin?- not accidentally using the Vin pin which at least in the case of the 9v battery would be 9v... wouldn't explain the usb problem tho