Instructables

Girino - Fast Arduino Oscilloscope

Featured

Step 24: Time calibration

Picture of Time calibration
deltas8.png
data16.png
deltas16.png
data32.png
deltas32.png
data64.png
deltas64.png
data128.png
deltas128.png
slopes.png
intercepts.png
slopes.png
Using the test signals I calibrated the horizontal scale of the plots. By measuring the widths of the pulses (that are known because were generated) and plotting the measured pulses widths against the known values, we get a hopefully linear plot. Doing this for each prescaler setting we have the time calibration for all acquisition rates.

On the images we can see all the data that I took an analyzed. The "Fitted slopes" plot is the most interesting because it tells us the actual acquisition rate of my system at each prescaler setting. The slopes were measured as a [ch/ms] number but this is equivalent to a [kHz], so the slopes values are actually kHz or also kS/s (kilo Samples per second). That means that with the prescaler set to 8 we get an acquisition rate of:

(154±2) kS/s

Not bad, uh?

While from the "Fitted y-intercepts" plot we get an insight of the system linearity. All the y-intercepts should be zero because at a signal with zero length should correspond a pulse with a zero length. As we can see on the graph they all are compatible with zero, but not the 18-prescaler dataset. This dataset, though, is the worst one because is has just two data and its calibration can not be trusted.

Following there is a table with the acquisition rates for each prescaler setting.

Prescaler Acquisition rate [kS/s]
128 9.74 ± 0.04
64 19.39 ± 0.06
32 37.3 ± 0.6
16 75.5 ± 0.3
8 153 ± 2
The cited errors are coming from the Gnuplot fit engine and I am unsure about them.

I also tried an unweighted fit of the rates because you can see that they roughly double when the prescaling halves, this looks like an inverse proportionality law. So I fitted the rates vs the prescaler settings with a simple law of

y=a/x

I got a value for a of

a=1223

with a χ²=3.14 and 4 degrees of freedom, this means that the law is accepted with a 95% confidence level!

 
Remove these adsRemove these ads by Signing Up