Pages: [1]   Go Down
Author Topic: digital input jitter  (Read 693 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 1
Posts: 175
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?


* jitterScale.png (32.3 KB, 468x312 - viewed 20 times.)
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49040
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 175
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Bad code?
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 480
Posts: 18721
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What's the X scale? microseconds? Where is your code?
Logged


Offline Offline
Full Member
***
Karma: 1
Posts: 175
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: