Pick a Memory Card, but Not Just Any Memory Card

by Carolyn Ivans | Updated: 10/23/2020 | Comments: 0

Tags


Search the Blog


Subscribe to the Blog

Get an email when a new article is posted. Choose the topics that interest you most.


Area / Application

Product Category

Activity

Corporate / News

Enter your email address:



Suggest an Article

Is there a topic you would like to learn more about? Let us know.

Leave this field empty

CompactFlash cards and microSD cards

You may already know that you can add external data storage to your data logger with flash-memory cards. But do you know what kind of card you need—or if you even need one? In this article, I’ll answer these and other memory card questions. In a future article, I’ll discuss how to store your data to a memory card.

How do I know if I need external data storage?

If you have a CR1000, CR3000, or CR6, your data logger has 4 MB* of static random-access memory (SRAM), where the currently compiled program is stored along with some data logger and communications settings. (*If you have a CR1000 datalogger with a serial number less than 11832, your data logger has only 2 MB of SRAM.) Hence, there is approximately 3.7 MB of internal memory available for final data storage. 

Now, 3.7 MB may not sound like a lot of storage room, but for many data logger applications, this is ample room to store more than a year of data! For example, consider a weather station that stores averages of 10 variables (for example, air temperature, soil temperature, barometric pressure, wind speed, wind direction, precipitation, etc.) into three tables on 15-minute, hourly, and daily intervals. If we assume that these three tables are auto-allocated (that is, programmed to fill up at approximately the same time), it would take 1,533 days for these three tables to fill up 3.7 MB of space. That’s over 4 years! Of course, that’s in a perfect world where batteries never die and natural disasters never occur.

A general rule of thumb is that you should not store any more data than you can afford to lose before collecting it. In other words, if you can afford to lose a month’s worth of data, that’s how often you should collect data. So, although 3.7 MB is adequate for many data logger applications, if you need to store high-frequency data, you may need to add external memory to your data logger.

Tip: After a program is running, you can confirm the data fill times. In the Connect Screen of LoggerNet, click the Station Status menu item and then click the Table Fill Times tab.

When you are trying to determine your external versus internal memory requirements, the following are some variables to consider:

  1. Number and resolution of data points to be stored per data storage output period—Is the data to be stored in high resolution (4 bytes per datum) or low resolution (2 bytes per datum)? Don’t forget to take into account the time stamp and record number memory requirements (16 bytes).
  2. Data storage rate—At what rate will the data be stored? Will there be more than one data table?
  3. Time between data collection—How much time passes between data collections?

Example to Calculate Needed Storage Space

Let’s look at an example to put this into perspective. Imagine that you want to store 20 data points at 10 Hz. Thirteen of the data points will be stored in a low-resolution, two-byte format (FP2), and the other seven will be stored in a high-resolution, four-byte format (IEEE4). The DataTable/EndTable() instruction might look like this:


DataTable (Test,1,-1) 
	DataInterval (0,100,mSec,10) ’10 Hz
	CardOut (0 ,-1 )
	Sample (13,Var_One(),FP2) '13 low-resolution data points
	Sample (7,Var_Two(),IEEE4) '7 high-resolution data points
EndTable

A time stamp and record number will be stored with every record, which account for 16 bytes of space. Your data will be collected from your data logger after every eight hours of operation. How much data storage space do you need?

Based on the size of each data point and the storage interval for those points, you can calculate the bytes per record (in other words, bytes for each row of the data table). Then, based on the bytes per record, you can calculate the bytes per eight-hour period:

Bytes per data-storage interval (10 Hz):
Low-resolution data High-resolution data Time Stamp/Record #
(13 datum) x (2 bytes/datum) + (7 datum) x (4 bytes/datum) + 16 bytes
= 70 bytes per storage interval or data record
Bytes per eight-hour period:
Bytes per record Records/Second Seconds/Hour # of Hours
(70 bytes/record) x (10 records/s) x (3600 s/h) x (8 h)
= 20,160,000 bytes or 20.16 MB between collections

In this example, you need a minimum of 20.16 MB of space on your data storage device. Because your data logger only has approximately 3.7 MB of internal memory available for final data storage, you need external data storage.

Note that this is a conservative estimate because, in most cases, the data logger does not need to store a time stamp with every record. Rather, the data logger support software data extraction routine uses a frame time stamp to calculate each record’s time stamp as it is stored to computer memory. (For more details, see the CRBasic Editor Help file for the DataInterval() instruction.)

What do I need to add a memory card to my data logger?

If you have a CR6, CR1000X, or GRANITE™ data logger/data-acquisition system, your device has a built-in microSD slot that accepts microSD cards.

Recommended for You: To learn more about the CFM100, NL116, CompactFlash modules, or microSD cards, visit our Data Storage web page.

If you have a CR1000 or CR3000, you can expand your data logger memory using CompactFlash (CF) cards combined with a CompactFlash module (CFM100) or a CompactFlash module with a built-in Ethernet port (NL116). These CompactFlash modules connect to the 40-pin peripheral port on your data logger.

What kind of memory card do I need?

Not all memory cards are created equal. There are different types of microSD-flash and CompactFlash memory cards.

There are three types of microSD-flash cards available today:

  • Single-Level Cell (SLC)
  • Multi-Level Cell (MLC)
  • advanced Multi-Level Cell (aMLC)

Until recently, Campbell Scientific offered only SLC microSD cards due to greater durability, reliability, and much faster read/write speeds (300% faster in write mode, and 43% faster in read mode) than MLC cards. However, due to advances in technology, we are now able to offer 16 GB aMLC microSD cards that feature 13X endurance, 1.5X write performance, and 5X data retention improvement compared with traditional MLC cards.

There are also two types of CF cards:

  • Industrial Grade
  • Standard (or Commercial) Grade

Campbell Scientific only offers CompactFlash and microSD flash-memory cards with an industrial rating because Industrial Grade memory cards are held to a higher standard; more specifically, they operate over a wider temperature range, offer better vibration and shock resistance, and have faster read/write times than their commercial counterparts.

Recommended for You: Visit our web pages to see a list of CompactFlash cards and microSD cards that are well suited for applications in which Campbell Scientific data-acquisition products are used.

Conclusion

This article focused on using memory cards to expand your data logger memory for data storage and to back up your measurements. Another common use for memory cards is to store images or transport programs to the field without the need for a PC connection.

I hope this article has helped you to understand the following: how you can use memory cards to expand your data logger memory, how not all memory cards are created equal, and why picking a memory card requires careful consideration. In a future article, I’ll provide information about how to store your data to a memory card.

If you have any questions or comments about memory cards, post them below.


Share This Article



About the Author

carolyn ivans Dr. Carolyn Ivans is the Technical Communications Manager at Campbell Scientific, Inc. She has a doctorate in Ecology, Evolution, and Conservation Biology from the University of Nevada, Reno. She enjoys working with the Technical Communications team, product developers, and customers to create documentation and tutorials for Campbell Scientific products. In her spare time, Carolyn enjoys kayaking, hiking, and bike rides with her family.

View all articles by this author.


Comments

Please log in or register to comment.