Shop OBEX P1 Docs P2 Docs Learn Events
ADC vs. RCTIME — Parallax Forums

ADC vs. RCTIME

Scott PortocarreroScott Portocarrero Posts: 72
edited 2010-02-09 04:57 in BASIC Stamp
I noticed projects that used the RCTIME in programming to read analog values tend to "shudder" because of the charging and discharging of the capacitor. I am trying to us an analog joystick to control my bot but I don't want the "shudder." Does anybody know if an ADC chip like the ones sold by Parallax will get rid of that "shudder?"

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-07 17:59
    The "shudder" has little to do with the method used to read analog values and more to do with the speed of the main control cycle used. ADC chips are capable of reading analog voltages much faster than the use of the RCTIME statement although the RCTIME statement technique can be sped up considerably by careful choice of a capacitor value.

    I say this because replacing the use of the RCTIME statement with an ADC may not get rid of the "shudder" if your main control cycle is too slow. Depending on how you've written your program, you may be able to use the RCTIME statement and get rid of the "shudder" by carefully rewriting the program. You may also find that the "shudder" will go away if you use a faster Stamp.
  • Scott4Scott4 Posts: 45
    edited 2010-02-08 21:19
    Mike, is this "shudder" the variation between successive reads of the RCTime circuit? -Scott
  • jeff2.0jeff2.0 Posts: 24
    edited 2010-02-09 04:53
    I have found that using a small capacitor (.01uf) helps speed up the circuit rather than a .1uf or larger with RCTIME.

    j
  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-09 04:57
    If the control loop is too slow, the servo(s) won't see a control pulse every 20ms and they'll shut down until they see the next control pulse. These pauses (> 20ms) in the control pulse stream can cause jerky movement or "shudder"s in movement by the servo.
Sign In or Register to comment.