Go Down

Topic: digital input jitter (Read 771 times) previous topic - next topic

permnoob

I think this is the right subforum.

I am reading an input signal from an RC remote, which is a servo pulse, 1000-2000 uS in length.  looking at it on my scope it sure SEEMs to be stable down to 4 uS (ie on my highest res, no jitter avail on the scope)  however a lookk at the output yields a very periodic jitter, here is a screen cap of the plot, x axis is time, so the whole window is one second, and the y axis is pulse duration (using pulseIn()) in uS.

I tried putting a cap across the input, I tried a 10k resistor.  Then i plotted the data and threw out my background noise jitter theory.  My current ideas are

1) timing drift on the arduino clock
2) ??
3) I don't know how to use a scope

2% error can be coded around, but I don't wanna accept something I don't have to.  currently there is nothing else on the circuit that makes me think twice (no relays) about pwr supply noise.  any one have any idea where I should be poking my nose around?  any more info i can supply to help y'all guess at my issue?

PaulS

I have no idea what your problem is, but there are some things that need clarification.

Quote
however a lookk at the output yields a very periodic jitter

Output from what?

Quote
here is a screen cap of the plot

A plot of what, where?

#2 might possibly be issues with code on the Arduino. Can't see that.

permnoob

sorry got distracted with all the other irons, not enough hands.

there is an attachment on my first post. it shows a small data set I collected with my arduino.   this data set shows a very periodic variation in the pulse length.  However my oscilloscope says this variation very definitely does not exist.  I trust my scope more than the arduino, so I am trying to figure out what is giving me these results.

zoomkat

Quote
I trust my scope more than the arduino, so I am trying to figure out what is giving me these results.


Bad code?
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Nick Gammon

What's the X scale? microseconds? Where is your code?
http://www.gammon.com.au/electronics

permnoob

the x scale is seconds, meaning the time at which the pulse was captured, and the Y axis is pulse length, in uS.

Let me find the code I used, but I collected that data by sending pulsein() and millis() to the serial monitor, and copy pasta it into my spreadsheet software.  will return with code.

Go Up