Shop OBEX P1 Docs P2 Docs Learn Events
help with Applied Sensors, theory governing the rate of change of voltage on th — Parallax Forums

help with Applied Sensors, theory governing the rate of change of voltage on th

dynasty_dynasty_ Posts: 3
edited 2006-02-24 10:34 in Learn with BlocklyProp
Hi!

I'm reading Applied Sensors and need som help with calculus. I'm stuck on page 69. I'm having problems getting 153000 as quoted in the text below. Can someone help me step by step to get that value as the writer gets it?

Thank You

edit: Merry Christmas :-)

It´s a temperature transducer with current source.

Output = 1 microamp / Kelvin
That is, at 273 Kelvin (freezing, 0° C), it produces 273 µA.

Here is a quote from the page:

[font=Arial,Bold size=1]The [/font]equation governing the rate of change of voltage on the capacitor is
[font=Arial,Bold size=1]dV/dt = I/C
[/font]where [font=Arial,Bold size=1]I [/font]is the current and [font=Arial,Bold size=1]C [/font]is the capacitance. If you know calculus, and assume that [font=Arial,Bold size=1]I [/font]and [font=Arial,Bold size=1]C [/font]are constant, you can easily solve for elapsed time in terms of the change in voltage and the capacitance and the current:
[font=Arial,Bold size=1]t = C * V / I
[/font]where [font=Arial,Bold size=1]t [/font]is in seconds, [font=Arial,Bold size=1]C [/font]is in farads, [font=Arial,Bold size=1]V [/font]is in volts, and I is in amps. If we substitute TK in Kelvin for microamps, 0.22 µf for C, 1.3 for the voltage, and 2*rct for the time in microseconds, and taking care for the units, we come up with the formula in the text:
[font=Arial,Bold size=1]rct = constant / TK
[/font]The constant is 153,000, when those ideal values are plugged into the formula. In reality, the capacitor will not be exactly 0.22 µF, the threshold will not be exactly 1.3 volts, and the AD592 will not have an output of exactly 1 microamp per Kelvin. Nevertheless, since there is only one free constant, we will need just one point of calibration.
qoute from:
http://www.parallax.com/dl/docs/books/edu/AppliedSensors1_3.pdf· , page 69

Post Edited (dynasty_) : 12/23/2004 9:51:20 AM GMT

Comments

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2004-12-23 22:26
    I'll try to answer that.

    Start with the constitutive equation for a capacitor:

    Q = C*V

    Charge on the capacitor equals the capacitance times the voltage across it. Charge gets into and out of a capacitor as electical current, which is the rate of change of charge:


    I = dQ/dt = C * dV/dt

    That is, th current equals capacitance times the rate of change of voltage. The capacitance is constant. That can be rearranged to give the rate of change of voltage:

    dV/dt = I/C

    Both I and C are constants in this situation, so the rate of change of voltage is also constant. The graph of voltage against time is a straight line (with slope I/C). That is a lot simpler than the case of a resistor with a capacitor, where the graph is an exponential function, and current too decreases exponentially with time.

    Our voltage is going to start off at zero, at time zero, so the equation can be simplified to,

    V = t * I/C

    That is the straight line with slope I/C, voltage as a function of time. Or rearranging ,

    t = V * C/I

    That is the equation we need, to answer the question of how long it will take to charge the capcitor C up to voltage V, with a constant current I. The capacitor is 0.22 microfarad, and the voltage threshold of the Stamp is approximately 1.3 volts.

    The AD592 temperature sensor has current output, simply, microamps = temperature in Kelvin.
    The temperature will be constant over the fraction of a second it takes the Stamp to make the measurement with RCTIME. The current is "TK" in microamps.

    Putting it all together:

    t = 1.3 * 0.22 / TK

    The factor of E-6 that goes with the microfarads is canceled out by the factor of E-6 that goes with microamps. Time is in seconds. But we want time in microseconds, so we have to multiply times E6 on the right hand side.

    t = 1.3 * 0.22 * 1000000 / TK = 286000 / TK

    There is one more step with the Stamp 2. It measures time in units of 2 microseconds (that is the original BS2--the '2sx, '2p, and '2pe are a little different) So the above factor has to be divided by two to get the answer as the Stamp will count it out:

    rct = 143000 / TK

    Or, to calculate TK in Kelvin from the rct value:

    TK = 143000 / rct

    I see that it says 153000 in the text, and that is probably a typo. It does not matter too much, because the capacitor has a 5% tolerance, and the threshold of Stamp can be anywhere around the range of 1.3 to 1.4 volts. If you use 1.4 instead of 1.3, the factor is 154000. The chapter in Applied Sensors goes on to discuss how to calibrate the sensor to compensate for the tolerance of the components.

    I hope that helps. Let me know if you have further questions about it.

    And merry Christmas to you too, and to others who may be reading this!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • tmatma Posts: 27
    edited 2004-12-30 18:40
    Thanks Tracy
    I have not got to the temperature transducer yet but I will save your reply to this problem.
    tma
  • kogeratkogerat Posts: 31
    edited 2005-12-16 23:19
    Tracy Allen said...
    Putting it all together:

    t = 1.3 * 0.22 / TK

    The factor of E-6 that goes with the microfarads is canceled out by the factor of E-6 that goes with microamps. Time is in seconds. But we want time in microseconds, so we have to multiply times E6 on the right hand side.

    t = 1.3 * 0.22 * 1000000 / TK = 286000 / TK

    There is one more step with the Stamp 2. It measures time in units of 2 microseconds (that is the original BS2--the '2sx, '2p, and '2pe are a little different) So the above factor has to be divided by two to get the answer as the Stamp will count it out:

    rct = 143000 / TK

    Or, to calculate TK in Kelvin from the rct value:

    TK = 143000 / rct

    I see that it says 153000 in the text, and that is probably a typo. It does not matter too much, because the capacitor has a 5% tolerance, and the threshold of Stamp can be anywhere around the range of 1.3 to 1.4 volts. If you use 1.4 instead of 1.3, the factor is 154000. The chapter in Applied Sensors goes on to discuss how to calibrate the sensor to compensate for the tolerance of the components.

    I hope that helps. Let me know if you have further questions about it.

    And merry Christmas to you too, and to others who may be reading this!
    Thank you very much for this explaination. I could understand everything up to this point but didn't quite understand what you were doing with the decimal point, and when I finaly came up with 143000, I was really lost, although the expriment worked perfectly.·I'm enjoying·the text and experments, and learning something·to boot.

    Hope you had a good 2004 Christmas and have a better 2005 Christmas!

    PS, the Google search·works great!

    Thank You,

    Jim K
  • japerjaper Posts: 105
    edited 2006-02-24 02:39
    hello Tracy Allen
    your explaination on the theroy governing the rate of change of voltage on the capacitor
    was excellent, you made the problem easy to understand.
    my question while splitting hairs is just for further understanding.
    while the example uses a 1.3 volt value that does give the 143000 Constant
    Thoughout most of the courses a 1.4 volt value has been given as the
    threshold value.
    while doing the ice bath experiment the 1.4 volt value seemed close.
    should i be concerned with this small value or should i just concern myself with
    the calibration program using a known "DS1620" or equilvalent sensor ?
    thanks
    japer
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2006-02-24 05:37
    Hi Japer,

    Thank you for your kind words.

    The switching threshold for the BASIC Stamp is around 1.3 or 1.4 volts, but it can vary from one Stamp to the next.

    When you do the calibration in an ice bath or in reference to an accurate thermometer, all of the initial error terms will be taken care of at once, including the threshold of the stamp, and the tolerance of the capacitor and the resistor.

    The threshold can change with temperature, too. As temperature goes up, the threshold goes down, about 1% for a 15 degree Celsius change in temperature. That can be a large effect if you are also using the Stamp to drive lots of power into LEDs and things like that. That is what limits the long term accuracy of the RCTIME method.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • japerjaper Posts: 105
    edited 2006-02-24 10:34
    hello Tracy Allen

    thanks for responding to my question,
    also your explanation of how temperature affects RCTIME was an eye opener.
    that i would never have though of.
    I am very greatful that i can lean on great people like you Mr. Allen and all
    the people that have helped me in this forum.
    thank you
    japer
Sign In or Register to comment.