Shop OBEX P1 Docs P2 Docs Learn Events
RC-Time Circuit?? — Parallax Forums

RC-Time Circuit??

computer guycomputer guy Posts: 1,113
edited 2012-12-17 05:08 in Propeller 1
Hello,

I am using the RC-Time object in a propeller project of mine, using the following setup.
rctime_pic1.PNG

I noticed that between readings the value was fluctuating by about a value of 10.
If however I change the top GND to VDD I get the same reading with a fluctuation of about 2-3.

Can someone please explain to me why this makes a difference and if keeping it like this is likely to do any damage?


Thanks :)

Comments

  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-11-22 22:28
    Hi guy;

    It's probably caused by noise on VDD and GND.

    The recommended method for this type of circuit in general is to use 2 capacitors.
    Each capacitor is 1/2 C, one connected to VDD and the other to GND.
    Any noise in the system is canceled out.

    Duane J
  • computer guycomputer guy Posts: 1,113
    edited 2012-11-22 23:08
    Hi Duane,

    Thanks for your feedback.
    I should have probably mentioned, I am using a fixed value for R, it is C that changes. Therefore having two capacitors wouldn't be possible.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-23 18:57
    First off, there is no danger at all in keeping the capacitor hooked up in the alternative position to Vdd instead of Vss. Either one is a fixed a reference point with respect to the switching threshold of the Stamp.

    However, not completely fixed, due to noise, and either Vss or Vdd nodes are distributed and the fluctuations differ depending on where you choose to attach to the Vss or Vdd. Is your variable capacitor out on the end of some wires or a cable?
  • computer guycomputer guy Posts: 1,113
    edited 2012-11-23 19:02
    Hi Tracy,

    Yes it is on the end of a 1m cable. I am planning on putting a ferrite thingy on it to minimise interference.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-23 19:40
    Is it a coaxial cable, or twisted pair, or something else? And is it connected to the circuit right at the input pin and the closest Vdd pin?
  • computer guycomputer guy Posts: 1,113
    edited 2012-11-23 21:01
    Self made cable. I can twist the pairs or wrap it in shielding if it will help.
    At the moment it's on an experimenters board, but the final version will have it connect mm from both pins.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-23 22:57
    Shielding or twisting could certainly help if you discover there is a problem with pickup from external sources or from the prop itself. The shield and twisting themselves will add some capacitance, and if that is substantial in relation to the value being measured, well, that could introduce worse issues though.

    The RCtime technique is sensitive to noise, because as the RC voltage approaches the switching threshold of the prop at around 1.65V, and bit of noise can make it fire early or late. The amount of noise can vary quite a bit depending on the point of attachment on an experimenter's board.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-11-24 05:22
    Hi Guy;
    I should have probably mentioned, I'm using a fixed value for R, it is C that changes. Therefore having two capacitors wouldn't be possible.
    Hang on there pardner. Sure you can, well sort of. See:
    V-Cap.png

    The caps should be large compared to the variable one.

    This could be done with a pair of resistor dividers but they would waste power and are not elegant.

    The ferite bead is a nice touch but tiny coax cable is better.
    Twisted pair will suppress noise but it doesn't suppress stray capacitance, coax does.

    Duane J
    388 x 368 - 10K
  • computer guycomputer guy Posts: 1,113
    edited 2012-12-17 02:55
    Hello Duane,

    Thanks for the diagram and info.
    Should the prop pin side be connected to the shielding or core?
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-12-17 05:08
    Hi guy;
    Hello Duane,

    Thanks for the diagram and info.
    Should the prop pin side be connected to the shielding or core?
    The shield goes to the pair of capacitors and the core wire to the pin side.
    The capacitor pair presents a low impedance to gnd, (also to VDD), so environmental noise gets shunted off and doesn't show up on the pin, a good thing.
    While you could use a twisted pair, its not nearly as effective at shielding as coax.

    Duane J
Sign In or Register to comment.