Shop OBEX P1 Docs P2 Docs Learn Events
jitter on RC timing — Parallax Forums

jitter on RC timing

4x5n4x5n Posts: 745
edited 2011-09-30 09:25 in Propeller 1
I finally got around to using the counters on the prop to try measure RC timing with the intent of using it to measure resistence, etc. While it worked better then I honestly expected I did notice a bit of "jitter" on the readings. I have to admit to using a solderless breadboard which I'm sure accounts for a little of it.

My question is how do people deal with the jitter of even the 2-4 counts on the lsd that I'm seeing. Are you averaging, etc? My intent is to use a pot and a stepper motor for position control and am concerned about the problems it may cause. Of course the probability is that it's small enough not to matter but still!!! :nerd:

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-27 09:17
    You can average several successive readings. You can throw away the 2 or 3 least significant bits of the count, then average a couple of readings as well. You'll always have at least a little jitter near the roll-over point from one digit to another. You can build in some hysteresis in your control loop so you have to have a change in pot position of several counts before you move the stepper, yet you keep track of the pot position to full precision.
  • 4x5n4x5n Posts: 745
    edited 2011-09-27 20:51
    Looks like I may have to look into so form of averaging on the feedback pot. As I would expect the error gets larger as the count gets bigger. Looks like I'm going to have to do more testing.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-09-28 05:42
    I thought I had seen in other threads that the sensor should be very close to eliminate noise in the leads?
    I noticed similar on a project a while back, and have been trying to keep up on the conversations, but I haven't had time to go back and experiment.
  • 4x5n4x5n Posts: 745
    edited 2011-09-28 21:00
    I thought I had seen in other threads that the sensor should be very close to eliminate noise in the leads?
    I noticed similar on a project a while back, and have been trying to keep up on the conversations, but I haven't had time to go back and experiment.

    I did some more testing and when I soldered the components together to remove variations in conductance in the connections and increased the length of the charge pulse the jitter at the higher resistance levels was down to +/-1 least significant digit. After scaling the result the amount of jitter isn't a concern.
  • photomankcphotomankc Posts: 943
    edited 2011-09-30 09:25
    The main issue I run into with R/C conversion is in the temperature sensitivity of the capacitor. You definitely can't just use any ol cap you want, it needs to have low thermal sensitivity. I was having a devil of a time figuring out why my calibration kept drifting from day to day. Changing out the cap it became very stable and useable.
Sign In or Register to comment.