June 3, 2017
Richard S. Curtiss
Project:
Violin Data Logging
Recording: bow motion (acceleration) and audio

SD card: Sony ...

Library: #include <SD.h>

Tmsec: tenth of millisecond,
e.g. 20 is actually 2.0 msec,

Min-Tmsec 17
Max-Tmsec 896
Sum-Tmsec 325052
Count 12398
Avg-Tmsec 26.21809969
StDev-Tmsec 58.66225365
Var-Tmsec 3441.260003

Write times for 512 byte block
Tmsec,Occurrences
17,1
18,253
19,424
20,6229
21,4783
22,180
23,72
24,8
25,19
26,5
27,2
34,5
35,56
36,3
37,1
44,37
45,22
46,3
47,2
55,1
60,13
61,6
62,70
63,28
64,1
65,1
66,1
82,2
94,1
107,2
108,2
110,2
111,1
112,19
113,27
114,7
115,1
137,1
139,1
159,3
160,1
163,2
164,2
165,3
171,1
204,1
206,1
208,1
213,2
214,3
248,1
250,1
256,1
257,3
262,1
278,1
294,1
298,2
299,1
300,2
306,1
334,2
337,1
339,1
342,1
343,3
380,2
381,1
382,1
384,1
385,1
386,1
387,1
788,1
804,1
816,1
833,1
837,1
838,2
842,2
844,2
847,2
857,2
858,1
859,2
860,1
861,2
862,1
863,1
864,1
865,1
866,2
867,4
868,4
869,1
870,1
871,4
872,2
873,2
874,2
875,2
880,1
882,1
883,1
885,2
896,1


Excerpt from the Arduino monitor output
- basis for the above summary data

Audio packets and acceleration packets
include sequence number and timestamp

...

Q Out #: 512 bytes from queue sent to output file
File block write time: 18 1.8 millisecond

PK Out: 254 audio packet bytes appended to queue
(120 samples)

Q Out #: 302 queue ring buffer end wrap-around to
Q Out #: 210 queue ring buffer begin
---
512 bytes from queue sent to output file

File block write time: 20 2.0 millisecond

PK Out: 254
PK Out: 254

Q Out #: 512
File block write time: 21 2.1 millisecond

PK Out: 254
PK Out: 255

Q Out #: 512
File block write time: 21

PK Out: 26 acceleration packet bytes appended to queue
(1 sample set: two 3-axis accelerometers)
PK Out: 26
PK Out: 26
PK Out: 26
PK Out: 26
PK Out: 254 audio packet bytes appended to queue
PK Out: 255 audio packet bytes appended to queue
(byte count varies depending number of escape bytes occuring in data)

Q Out #: 512
File block write time: 21