Project 03 - What's happening when I don't connect temp sensor to ground?

Hi all. I'm very new to Arduino and electronics so this is a very basic question.

I've just been working through project 3 which I've got working nicely. However, on my first try I forgot to connect the temperature sensor to the ground. This caused quite erratic readings and basically reported a random voltage somewhere between 4 and 5 volts and therefore a completely incorrect temperature.

Can anyone explain what's actually happening when I don't connect the sensor the ground please? My assumption is that the sensor wouldn't report anything since the circuit isn't complete and therefore no power is going through the sensor.

Here's a sketch of the missing piece:

A0 is gonna float because the sensor circuit is open and there is no input. When you read an analog pin that is floating without input the result is random.

Thanks for the speedy reply! I see. So it's the same as if I tried reading A0 without anything plugged in?

Yes

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