Help USB from one PC causes Temperature reading to jump around on my Arduino

I am using LM35 DZ (An Integrated Circuit Temperature Sensor) for checking temperature. When I plug into USB on one PC the temperature readings are pretty stable. It jumps around within 1 degree which is fine for my application. But when I plug Arduino into a USB port on another PC The readings Jumps around changing as much as 10 Degrees. What is causing this and how do I fix this problem. I am not using a resister. Ground is connected to ground, middle pin is connected to analog 0 and remaining pin connected to 5v power.

It works almost perfect on one PC but not another. I have to have it pluggged into PC because I monitor temp, when mixer is running, when heater is on, PH and stuff like that. So i have to have it plugged into USB .

Hello,

in my opinion there are two possible reasons for this behaviour:

In standard configuration the arduino takes Vcc (+5V) as the reference voltage for the AD-converter. When you connect the board to a PC via USB then Vcc comes from the PC and can be noisy. You could try a 100nF ceramic capacitor connected between Vcc and GND. Or you can take the internal reference voltage if the temperature readings from your sensor are below 1.1V. This is done with the commandanalogReference(INTERNAL);

The other possibility is a swing problem of the LM35. I had the same problem once and wrote a post in my blog. If interested look at:

http://heliosoph.mit-links.info/connecting-an-arduino-with-a-lm35-temperature-sensor-special-issues/

Hope this helps

Elektrix