Shop OBEX P1 Docs P2 Docs Learn Events
RC Time Decay — Parallax Forums

RC Time Decay

LAWMANLAWMAN Posts: 4
edited 2006-08-07 16:46 in BASIC Stamp
When trying to complete the exercises for PolledRcTimer.bs2 in Chap. 5 of "What's a Microcontroller" , I do not get the results that I would expect (I am using the BS2 Home Work Board).
For example, I use the same four required resistors, but when I change the Electrolytic Capacitors from 3300 uF to 1000 uF· I get approximately the same decay times.··I thought perhaps I was not sampling enough so when I change the Pause 100 sample time to 10 or 1 , I get correspondingly larger times but no relative 1/3 difference between the two capacitors..

Comments

  • RocketManRocketMan Posts: 1
    edited 2006-08-05 15:36
    I had the same problem only to find I had a miswire. The connection to the stamp I/O was incorrect.



    Hope this helps.
  • LAWMANLAWMAN Posts: 4
    edited 2006-08-07 15:47
    It appears to me that the program statement " FOR counter = 5 to 0"
    does not allow enough time for the capacitor to reach full charge which would require 5 times the RC time constant or 5RC seconds. 5RC would only be obtained with the 470 Ohm and 1K Ohm resistors in combination with the 1000uF capacitor, or 2.35 and 5 seconds respectively. All the other combinations would require more time to fully charge the capacitor. Decay voltage is exponential and not linear and would appear as a curve when graphed. 1RC should reduce the voltage to 37% or 1.85 volts.
    The logic level of 1.4 volts would be slightly less than 37% of the 5 volt charge voltage. Perhaps I should adjust the charge time and change the above statement for each of the other combinations?
  • LAWMANLAWMAN Posts: 4
    edited 2006-08-07 16:46
    The statement "For counter = 5 to 0" was not the problem. RocketMan was right. It was a "miswire"!
Sign In or Register to comment.