Without it, when the temp sensor/thermistor was at infinite resistance, the Arduino pin would essentially be floating, and you'd get erratic readings.
A pull down resistor is usually proportionally very high resistance in relation to the sensor or other device that is the variable in the circuit.
If it were tied to Vcc, it would be a pull UP resistor, but same concept.
The idea behind it is that the pin is never just left "open". If there is no voltage coming through the sensor (temp sensor in this case), then the resistor pulls the pin to ground and you would get a reading of zero volts.
You want the resistance of the pull-down (or pull-up) to be high, 10K-100K are typical values. Voltage drops across all elements in a circuit, in proportion to that elements resistance in relation to the total circuit resistance.
If the temp sensor ranged from 0K to 10K, and you used a 10K pull-down, then you would have a range of 5V-2.5V for readings at that pin. As you scale up the value of the pull-down resistor, you will get less voltage drop across that resistor, meaning that you have a wider voltage range at the input pin for the same temperature variance, which results in more precise readings.
They are taking an analog reading here, and the resistor is used as part of a voltage divider. You can use Ohm's law to calculate the output voltage.
To understand why R2 is needed, imagine the circuit without it. It would always read 5V, no matter the temperature.
Pull-down (and up) resistors are used on digital components with floating outputs, like switches, buttons, etc. For example, if a button is either open or connecting to a high potential, you would use a pull-down resistor to give meaning to that open state.
The best way around this is to use a voltage divider to produce a reference voltage and feed that into an op-amp that adds the reference voltage to the voltage coming from the device to be measured (in this case the thermistor).
As an example of this see my blog posting on building a temperature probe for the OLPC: http://www.jgc.org/blog/2008/03/building-temperature-probe-f...
If you're going to use an op-amp, you'd be better off using a different configuration, say with the thermistor as the feedback resistor, to get a linear response.
Taking a look at the circuit on your page, it seems like you could drop R9 and R3 (while changing the value of R8), as the function of those 3 resistors is only to feed a fixed current into the node of pin 2 (which is always held at 0V by the op amp). In fact, if you play around a bit, you should be able to get the proper range using only one op amp, at which point you can use a 5V rail-to-rail amplifier and get rid of that dual supply.
There should also be an anti-aliasing filter.
If the resistor were replaced by a wire, the pin would always be connected to ground, rendering the thermistor irrelevant.
If the resistor were removed and ground disconnected entirely, the pin would be connected, through the thermistor, to +5V, again rendering the thermistor mostly irrelevant.
It needs to be part of a ratio of resistors in order to vary between 0 and +5V.
This really simple circuit illustrates my confusion.
There are several specifications that might have to be met:
* Power delivery limit of the energy source
* Current specification for optimal operation of the thermistor
* Voltage level of the A/D input
For example, if the thermistor has an effective resistance of about 1kOhm and requires a current of about 1mA, then you need to set the resistor to 4kOhm (assuming the A/D input draws negligible current). If this is the case, you're stuck on the other requirements. Your power consumption will be 5mW (5Vx1mA) and the nominal level of the A/D converter input will be about 4V (5Vx4k/(1k+4k)).
Experienced circuit designers seem to magically come up with correct values because they are familiar with typical requirements and can quickly identify the limiting specification. You'll have to struggle a bit at the beginning to get the hang of it.
So read up on voltage dividers, RC circuits, pull-up and pull-down resistors, and diode current-limiting resistors. Google them right now and start reading. That will make you dramatically better equipped to understand real-world circuits.
In a circuits lab you would regularly hear the cry "grrr, it's not working! Fetch me the resistors". No one has quite worked out how they do it every time.
Or as one of my favourite lecturers put it "you can design the most impressive, streamlined, cut down, beautiful circuit in the world. But I bet it still has a resistor in it"
Though, in the example you linked to, there's no use of the resistor -- it's connected to the ground. It's just useless. Unless of course, I'm not understanding things right. (If I'm wrong anywhere, please point it out!)
The problem is that resistors have many uses. One of them is, indeed, to limit the current flowing through some bit of a circuit: If you have a nine-volt source, and you want some current to flow from nine volts to ground (because, say, you want to run that current through an LED and make light), and you don't want that current to be too large, put in more resistance.
Another obvious application that everyone learns is: If you want to heat something up, strap a resistor to it and run a bunch of current through the resistor and it will heat right up. (Although you had better heed the wattage rating on your resistor or it will blow out right away.)
This is a third application: Resistors convert a current to a voltage. Voltages are often easier to measure than currents. In this case, if you just hooked a 5 volt source across a thermistor, the voltage at the top of the thermistor is always 5 volts, and the voltage at the bottom is always zero by definition. (Because we're defining it as ground -- ground means "the point which we define as zero voltage in this diagram", although sometimes it also means "a point which we literally attach to the earth" -- darned EEs with their crazy terminology!) You can't use a voltage probe to measure anything interesting in this thermistor-only circuit. The resistance of the thermistor is changing with temperature, which means that the current in the circuit is changing with temperature, but you can't see that with your voltage probe. Unless you put in a second resistor -- the voltage across that resistor will be proportional to the current. That's what the resistor is doing here: Converting current to voltage so that we can see it.
Of course, one of the reasons EE is tricky to grasp is that the resistor is doing more than one thing at once. For example, it is also limiting the total amount of current in the circult, just as you suggested. If you let the current be limited only by the thermistor you might draw too much of it and break the thermistor. Or, even if the thermistor has enough resistance to prevent that, there's a catch: If the thermistor draws enough current it will heat up, which will affect its reading. So you might want to choose a second resistor that is big enough to keep the current very small. But not too small, or there will be a lot of noise.
Sooner or later you have to stop thinking and use good old trial and error! Learning this stuff is a little bit of thinking, then some math, then some more thinking from another angle, then some tinkering. Occasionally you have to melt some things -- that can help you learn too. It does take time. I was probably halfway through college before I could see this stuff, and I'm still blind compared to the real circuits guys.
> ...the voltage at the top of the thermistor is always 5 volts, and the voltage at the bottom is always zero by definition. (Because we're defining it as ground -- ground means "the point which we define as zero voltage in this diagram", although sometimes it also means "a point which we literally attach to the earth" -- darned EEs with their crazy terminology!)
Isn't what you're referring to rather a "common" than a ground?
I remember, when I was a beginner, being completely confused about what all those ground symbols meant. That was one of my first big stumbling blocks in electronics. The answer is that they're usually nothing but notational: They save you drawing some wires (every ground symbol is assumed to be attached directly to every other ground symbol by a very-low-resistance wire ) and more importantly they define your reference voltage (once you've drawn a ground, you can say things like "this point in the circuit is at 3.2 volts", instead of "this point in the circuit is at 3.2 volts relative to Point X".)
 There are times when the connections from ground to ground have too high a resistance, or when you pour so much current into ground that the ground-lead resistance can't be ignored anymore. Those are called ground loops, and are topics for advanced class. I have a nasty ground loop when I connect my stereo system to my cable TV. It manifests as the sixty-hertz hum from hell.
A resistor is a meiocre surrent sink because its own voltage drop is current dependent.
these would be better choices [lot more expensive, but hugely more accurate]
avishak, new delhi india
Where: V = voltage
I = current
R = resistence
For this circuit: R = VR1 + R2
V = 5
I = 5 / (VR1 + R2)
That means the voltage at analog pin 0: VO = 5 - I * VR1 = 5 - VR1 * 5 / (VR1 + R2)
So if you did not have the R2 resistor: VO = 5 - VR1 * 5 / VR1 = 0
Stay consistent for goodness' sake! (Or someone might confuse 'x' to be a variable)
Caution: I'm a CS major, not an EE, so your probably want to verify my assertion before trusting it...
it's pretty meaningless by itself, you also need to know the bit resolution of the ADC and reference voltage.