Well I'm back with this thermoprobe project. I've gained some insight and I'm pretty close, but need some help. Let me reset the stage here and describe what I'm trying to do, where I am at, and what the challenge is.
The Project
I want to build a multiple-probe BBQ system that measures as many thermoprobes as I can. When I get the data, I can send it wirelessly or keep the data...I'll deal with that once I get this going. The thermoprobes are actually negative slope thermistors. Resistance decreases as temperature increases. I loosely calibrated a probe yesterday and plotted it. It turns out it is a logarithmic curve with the following trend line:
Tp = -32.228ln(Rp) + 323.17
Tp = probe temperature in °C
Rp = probe measured resistance in Ohms
I've measured resistance from 15,500 Ohms at 15°C, down to 1,500 Ohms at 89.9°C. So essentially, if I can measure the resistance as an analog input on the Arduino, I can import math.h and use the log function and find out the temperature. Bingo.
The Problem(s)
I'm not sure how to hook up the probe (two terminals on the probe) so that I can do this. Basically it's a potentiometer, but with only two pins, not three. It functions as a resistor. Do I hook it up to 5V and A0? Not too sure about this circuitry.
Second issue is the association with the resistance measure to the map. I guess I have to calculate the resistance based upon the measured input of the voltage through the probe. But how do I calculate that? Let's say it's 500/1024 = 48.8% potential of the 5V feed voltage). R = I/V doesn't help me here, and not sure what to use.
OK I have it set up and the R2 is 3500 Ohms. sensorValue comes back at 405. 405/1024 * 5V = 1.98V. My multimeter is reading 4.8V. No clue what is happening, other than the calculations are wrong. What should I try?
UPDATE: Sorry, was reading the wrong things. I'll come back to this later.
With the original setup (5V --- Rtop (350 Ohms) ----- X ------ Rbottom (2150 Ohms) ----- Ground), 1.96V. X is on a breadboard where I insert a lead to measure voltage to the Arduino ground. Should I send a picture?
OK, it turns out that Rtop was indeed wrong. 3500 instead of 350. I apologize for that. Also turns out that Rbottom was off reported resistance by the 1% it said it could have, so I replaced it. Now, here is the following to report:
So the ratios are good. The measured Voltage is good. The Rbottom is wrong though. It's measured at 2150, reported through the math at 5393.30, which is 2.5x what it should be.
Didn't take any pictures as it is taking shape now.
Just as an aside, I replaced Rbottom with a 51 Ohm resistor, and I get this: SensorValue: 11.00/Vout: 0.05/Rbottom: 322318.18/VoltRatio: 0.01/ResRatio: 0.01
Vout is right. ResRatios don't mean anything because it relies on Rbottom.
Think there is a flaw in the code as the ratio between 3500 and 5393 is almost exactly the ratio between 2150 and 3500
the current flowing through the system is +> A = (Vin-Vout) / R.top
this current also flows through Rbottom resulting in Vout => A * Rbottom = Vout
or Rbottom = Vout / A;