# Datalogger storage calculation

How to calculate the required storage capacity of a data logger given the measurement time sampling rate and resolution?

I want to log two voltages at 1Hz rate for 3 months continuously and looking for a cheap data logger for this purpose. But most of them have not enough storage.

• Data_per_sample x Samples_per_second x seconds_in_total – Eugene Sh. May 16 '17 at 14:36
• It would make more sense to monitor and save changes and disturbances – Sunnyskyguy EE75 May 16 '17 at 14:51
• @TonyStewart.EEsince'75 It is a bit dangerous. Is some portion of the data is lost - everything (after that point) is lost... – Eugene Sh. May 16 '17 at 14:52
• absolute data can be included less frequently say once an hour or day to permit.. DATAQ makes RMS loggers – Sunnyskyguy EE75 May 16 '17 at 14:57
• But if you are concerned about PC PSU loss of power, then dropouts > 1 cycle must be detected. – Sunnyskyguy EE75 May 16 '17 at 15:01

This is really basic math, although you left out one important parameter, which is the sample size.

Let's say each sample is 16 bits for sake of example. At 1 Hz rate, that means you need 16 bits, or two bytes, for every second of running time. Your running time is 3 months. Do the math:

(3 months)(30 days/month)(24 hours/day)(3600 s/hour)(2 bytes/s)(2 channels) = 31 MBytes

Yes, it really is that simple.

Isn't this just basic maths?

1 sample per second * 60 seconds * 60 minutes * 24 hours * 30 days * 3 months = 7,776,000 points.

Assuming a 16 bit ADC that is then 2 channels * 2 bytes * 7,776,000 = 31.104 MBytes of data.

Even allowing for basic checksums and data formatting any data logger with the ability to log to an SD card should do the job.

• Not even maths...arithmetic. Upvoted. – TonyM May 16 '17 at 14:42
• Actually, it's basic math, not maths, but still otherwise correct. "Math" is a subject of study, so the plural form doesn't make any sense. You don't say "physicses", "geologies", or "arithmetics" either. – Olin Lathrop May 16 '17 at 14:45
• @OlinLathrop ... grammarist.com/spelling/math-maths – Tut May 16 '17 at 14:52
• don't forget the timestamp... – dandavis May 16 '17 at 16:45