Shop OBEX P1 Docs P2 Docs Learn Events
RCTIME resistor value? — Parallax Forums

RCTIME resistor value?

computer guycomputer guy Posts: 1,113
edited 2012-07-24 21:18 in Propeller 1
I am planning to use the RCTIME function from the BasicStamp functions object in order to measure the value of a variable capacitor.
My problem is, I don't know what value resistor to use for charging the capacitor to give the most accuracy and scope.
The capacitor ranges from about 10nF to 60nF.

Is there a formula I can use to calculate the value of the resistor? I have looked at a lot of RCTIME stuff and a lot of formulas but none of the info appears to give me this information.



Thanks :)

Comments

  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-07-24 19:33
    I don't know the stamp but suspect the trip point is about 50% of Vdd, just like the Prop.

    The charging time to 50% in seconds is about 0.7*R*C=S.
    See:
    RC Charging Circuit

    Duane J
  • computer guycomputer guy Posts: 1,113
    edited 2012-07-24 20:02
    Hello Duane,

    I am using the propeller to do this. I am using the BS object as the prop doesn't have an RCTIME function natively.

    As for the formula, wouldn't this result in the time being less as the resistance increased.
    My calculations:

    R = 10K, C=10nF
    0.7x10,000x0.00000001 = 0.00007 Seconds

    R = 100K C=10nF
    0.7x100,000x0.00000001 = 0.0007

    I don't see how how increasing the resistance could charge the capacitor faster.
    Am I doing something wrong? Are the units maybe not Ohms and Farads as the link you posted suggests?


    Thanks :)
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-07-24 20:49
    Hi guy;
    R = 10K, C=10nF
    0.7x10,000x0.00000001 = 0.00007 Seconds (70uS)

    R = 100K C=10nF
    0.7x100,000x0.00000001 = 0.0007 Seconds (700uS)
    Ahh, it did increase the time.
    Time, ( S ), is directly proportional to R and also directly proportional to C.

    BTW, where are you getting 10nF-600nF variable capacitors?

    Duane J
  • computer guycomputer guy Posts: 1,113
    edited 2012-07-24 21:18
    Oh, my fault. I was looking at it wrong. Thanks.

    It's a dielectric capacitor made from two foil plates. I adjust the distance, causing it to rage from 10 - 60 nF.
    It's to sense the volume of liquid in a plastic bag.

    Thanks Duane. :)
Sign In or Register to comment.