Close

Adding the SDCard

A project log for Portable environmental monitor

A handheld, battery powered, sensor array unit for environmental monitoring focused mostly on air quality using a global infrastructure.

Radu MotisanRadu Motisan 03/11/2016 at 15:178 Comments

As a result of the previous indieGogo campaign, we not only got the funding but also a few stretch goals. One was adding SDCard support to the uRADMonitor D, and can tell you - this wasn't easy. First it involved redesigning the PCB and making enough space for the card slot. Then it was the software: spi communication, card physical layer then the file allocation table implementation.

Finally, after many tests, we have the basic card functionality up and running. The pictures shows one of the latest uRADMonitor D iterations, using a 16GB SDCard.

Now how much data will we be able to hold on those? Easy answer: all of it :)

Discussions

x-labz wrote 03/15/2016 at 13:57 point

HI,

do You use the FatFs module? ( http://elm-chan.org/fsw/ff/00index_e.html ) It works as expected, and it's included in Atmel's ASF as well.

  Are you sure? yes | no

Radu Motisan wrote 03/15/2016 at 14:38 point

Thanks, I used that some time ago, but couldn't get it working this time: only FAT16 cards. I didn't have the chance to investigate the causes yet.  But I went on a different approach and have a working solution.

  Are you sure? yes | no

Leonard wrote 03/14/2016 at 23:01 point

With 2Gb per file, FAT32 is sufficient and widely supported (I would keep everything lower case anyway). Since your environment monitor keeps track of time I think multiple time stamped files are the way to go.

  Are you sure? yes | no

Radu Motisan wrote 03/15/2016 at 08:21 point

Those were my thoughts as well.  Also the logged data should be small in size  as that is just simple numbers saved in CSV format (easy in firmware, but also for those that need to import data)

  Are you sure? yes | no

Radu Motisan wrote 03/14/2016 at 15:59 point

hey guys! I'd like to keep to fat32 as it's widely supported. The 2GB limit will most likely be avoided by creating multiple files. What do you think?

  Are you sure? yes | no

Shrad wrote 03/14/2016 at 12:57 point

Hi Radu, ever tested unix filesystems? I guess some could be easier than FAT :)

  Are you sure? yes | no

esot.eric wrote 03/14/2016 at 14:23 point

LOL, for some reason that seems like a joke to me...(?)

  Are you sure? yes | no

Shrad wrote 03/14/2016 at 15:55 point

Well, I'd say some could be more practical/efficient, that's just a
suggestion... I imagine one could rapidly reach the FAT file size limit
with logging data continuously, or there could be issues with non
indexed data (this is purely academic)

  Are you sure? yes | no