View Full Version : ADC vs. RCTIME

Scott Portocarrero
02-08-2010, 12:48 AM
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?"

Mike Green
02-08-2010, 12:59 AM
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.

02-09-2010, 04:19 AM
Mike, is this "shudder" the variation between successive reads of the RCTime circuit? -Scott

02-09-2010, 11:53 AM
I have found that using a small capacitor (.01uf) helps speed up the circuit rather than a .1uf or larger with RCTIME.


Mike Green
02-09-2010, 11:57 AM
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.