High speed data logger.


In the past I’ve made a low speed data logger that writes an 80 byte record to a SD card once per second.

I need a new version that can write a similar record but this time at about 4 times per second (or faster)

The bottle neck seems to be time taken to write to the SD card, experimentation indicates that it can take between 30 and 280ms to write data, irrespective of the size of the data being written. So even if I can measure the variables I’m interested in quickly enough (pressure, temperature, speed etc etc) I’m going to miss out logging this during the time I’m waiting for the previous samples to be written.

The only solution I can think of is to write my data to one of the serial ports, and build a separate logger that does nothing but read it’s input port and write whatever it finds straight to SD card. I can use the input port of the logger as a data buffer, and the main unit can spend all it’s time processing the samples without having to pause for 200ms everytime a record gets written.

Or is their a better way?


I did the project by Arduino Yun, log in data into RAM with speed ten to hundred thousand time speed of 4 times per second.

I think the SDCard library works with a 512 byte buffer. Maybe it would take no longer to write 6 of your 80byte messages all at once.


Still better: write entire sectors, so that no write will affect two or more sectors at the same time.

Also keep in mind that tracking of the file allocation and size, in the (FAT) file table, will take additional time. For best performance allocate (write) the entire file before, then rewrite only its content without intervenient updates to the file table.