-3
$\begingroup$

This question already has an answer here:

I've posted about this project before as math is not at all my strong subject anymore. I have a couple sets of data and I need to make some equations for them. I've used Excel to get trend lines, but the equations that I'm getting aren't close enough to be accurate and useful.

Firstly, I need an equation that can give me the appropriate Resistance (R) value based off of the Voltage value being read by an ADC.

Excel's closest trend line for V compared to R is saying: V = 121.98(R)^-0.814. This yields value that are 40 off in the higher end. That's the most important end, around 5V, as I can't go above about 5.1V. I need that to be relatively close.

Next, my ADC values range from 0 to 1024. My top value of 1024 is 230°F, and I'm setting the bottom value of 0 to be 75°F. So I need an equation that will correspond the voltage value read by my ADC (V) to the range of 0 to 1024 (Let's make that variable ADC)

You guys were really helpful before. Thank you so much in advance for your help now. It means a lot

Here is my set of data: http://i.stack.imgur.com/eycjy.png

$\endgroup$

marked as duplicate by Qmechanic Sep 21 '15 at 22:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Hi Dominic Luciano. Please don't repost a closed question in a new entry. Instead, you are supposed to edit the original question within the original entry. $\endgroup$ – Qmechanic Sep 21 '15 at 22:25
  • $\begingroup$ I wasn't reposting a closed question. This has relation to an old question, but the questions aren't the same. I apologize for the confusion $\endgroup$ – Dominic Luciano Sep 22 '15 at 0:14
0
$\begingroup$

I'm assuming that you are reading the temperature of the resistor here. Now if $V$ is the voltage applied across a resistor $R$, the power generated by joule heating by the resistor would be $\frac{V^2}{R}$. But there also will be some heat losses through radiation and this will counteract the joule heating so that the resistor reaches an equilibrium temperature(which you are also measuring).Let us assume for simplicity that this heat loss is proportional to $T^\beta$(Note that this temperature is in Kelvin, you will have to convert your values). Since in equilibrium, heat gained by joule heating = heat lost by radiation and other processes,

$\frac{V^2}{R} = \alpha T^\beta$ ($\alpha$ is just another constant here).

Taking logarithms on both sides,

$ log\frac{V^2}{R}= log\alpha + \beta logT $

If you plot a graph with $log\frac{V^2}{R}$ on the $y-axis$ and $\beta logT$ on the $x-axis$, then the slope of this graph will be your $\beta$. Also the $y-intercept$ of this graph will be your $\log\alpha$. Now since we have determined both constants, you can plugin some value of $V$ and $T$ here and obtain $R$.

$\endgroup$
  • $\begingroup$ I'm using a temperature probe in an engine block that has 12V going through it, and the difference of voltage on the other side equates to your temperature basically. The values are very specific, which is why I was assuming I was going to need a more custom equation for getting the values into the MCU. But you're saying this will graph out the same value sin the sheet I've provided, correct? $\endgroup$ – Dominic Luciano Sep 21 '15 at 23:27
  • $\begingroup$ Yes, but I don't get how an ADC value of the voltage can equate to a temperature. From where exactly are you getting the temperature values? $\endgroup$ – sarat.kant Sep 22 '15 at 8:43
  • $\begingroup$ +12V goes through a NTC thermistor, and the heat will change the resistance, and the difference in voltage on the other side will give you the thermistor's resistance value, and that resistance value tells you (based off the chart I provided) what the temperature is. But that voltage drop is read by an MCU ADC, and once again, based on the value of resistance in the chart provided, you can find temperature based on what the voltage value read by the ADC is. $\endgroup$ – Dominic Luciano Sep 22 '15 at 14:15
  • $\begingroup$ I had someone say to look at the equations on this page (en.wikipedia.org/wiki/Thermistor), and the Steinhart–Hart equation caught my eye, but I can't set it up. The reason I ask for help with math like this is I have brain tumors that have messed with my ability to do most math beyond algebra, even though I went through stats in college. So I don' post here just to be lazy. I post after I've spent three days trying and gotten nowhere. How would I go about setting this up? Is this a better way to find the heat-resistance relationship for the thermistor? $\endgroup$ – Dominic Luciano Sep 22 '15 at 14:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.