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?