(the simple question)
I'd like to power multiple sensor off of the 5V. A couple of these sensor are resistance based and I use voltage dividers to get voltage readings from them. Does hooking multiple sensors to the one power pin cause an interaction between these (I would think so)? How do I account for this? How do I prevent this from skewing my sensor readings?
(more complicated)
Currently I have a 2.5Ohm thermistor on the R2 position of a voltage divider (R1 is 10kOhm). In addition I have two buttons using pull up resistors (1kOhm I believe) powered off this same 5V pin. I'd like to add two additional temperature sensors with similar voltage dividers. A curious thing happened last night when I hooked this all up. I got an arduino (0-1024) voltage reading of around 170-180 which is roughly equivalent to 1V and according to my rough calculations is about 2500Ohms or 25C according to the manufacturers spec sheet (see below). This makes sense as the sensor was sitting on my desk at room temp. Then I held it between my fingers to warm it and the voltage dropped to ~160. Big whoops on my part. I thought resistance had a positive correlation with temperature...
you can connect many voltage-divider type sensors to the 5V supply, assuming that they do not draw too much current. There is about 400ma available form the 5V.
The thermistor setup you mention is a total of 12,500 ohms, so the current it draws would nominally be:
I= V/R = 5/12,500 = .4ma
So with 400 ma to go around, you could theoretically put about 1,000 of these thermistor circuits on the 5V supply form the Arudino.
The other question about the temp coefficient... they can be negative and positive, depends on the material used in the sensor. Also, if you put your fingers on the sensor contacts, then your skin resistance probably influenced the reading.
Check out this link: http://www.designinfo.com/cornerstone/ref/negtemp.html
Shortly after this post I dug just a little deeper and found this all out for myself. Unfortunately R-T curves are difficult to use in arduino and I'll probably end up using a lookup table for some values. I posted something about this in the software section.
I bought the sensors with temp specs in mind. Unfortunately, I needed something that would go from freezing to around 350F. The sensors are for a car telemetry system and 350F can be expected at time for some underhood temps.
I do have semi-success to report. Last night i hooked the sensor up in voltage divider configuration (sensor in the R2 position) with a 1000Ohm resistor. I happened to have a warm room temp of ~80-84F and got a correct voltage reading of ~700 (roughly 3.14V). I figure I'll use a lookup table to do the conversion for a proper display. 32F-350F is 318 temp steps (1deg resolution). A lookup table/array would only be on the order of 318 * 2 pieces. Each integer is 2 bytes so that's about 1272bytes. Which isn't horrible. Now I just have to figure out how to access the array at speed and do the between a and b calculations.
a start...
int reading = analogRead(temppin);
int a = whatever the low threshold is...ie 32F
int b = whatever the high threshold is...ie 350F
if the reading is lower than a, display an L for low
if the reading is higher than b, display an H for high
for (i = 0; ( (reading < lookuptable*[0]) && (reading <= lookuptable[i+1][0]) ); i ++){*
_ outputvariable = lookuptable*[1];_
_} _ print outputvariable;
_...cycling over 318 possibilities may seem slow, but temperatures don't change that fast (at least not in my application). I might only sample the temp every 20 ms or so.*_