5

I'm building a weather data collector and I want to be able to dump that weather data somewhere. I've considered the options, and since I'm going to be storing a fairly small amount of data (in the megabyte range) I don't want to use SD cards (also SD cards are expensive). I've heard of use of NAND flash memory chips (like the W25Q32), and I was hoping that I could possibly interact with them in a simple way (since most ways require writing to each individual address). Is there possibly a way to build a file system within one of these small flash memory chips and interact with them as simply as interacting with an SD card?

TLDR: I want to interact with a flash memory chip easily to store basic ASCII data

  • While you can put a filesystem on an SPI flash, it's generally a bad idea, as many filesystem map poorly to the block-erase nature of NOR flash, and filesystem APIs don't well represent access carefully tuned to the needs of flash. If you do, use a fileystem optimized for flash. Probably better and simpler though to organize your writes as a linear journal of data. – Chris Stratton Mar 16 '17 at 4:20
  • Could you set up a server with a simple web application, put a WiFi module on the Arduino, and have it store data in a database? Could use apache or IIS if your on windows. set it up to run PHP. Set up a MySQL database. Have a page that accepts GET variables of the data and insert it into the database. You could set up another page to access/search/analyze the data. – rpmerf Mar 16 '17 at 10:54
  • @rpmerf I've done this before, but it consumes FAR too much power and I plan to put these small weather data collectors in places away from infrastructure. – Carrot M Mar 16 '17 at 19:08
  • Why not use the raw device commands and write blocks? Does your sketch really need a file system, i.e. more than a few files? – Mikael Patel Mar 16 '17 at 19:47
  • There are a few Arduino boards out there that have RTC, SPI Flash and RF-modules, and are real low power design. See for instance Anarduino anarduino.com/miniwireless, or Moteino lowpowerlab.com/guide/moteino. – Mikael Patel Mar 16 '17 at 19:52
3

I don't think you need a file system: that is usually needed when you want to manage many files. Your weather data log sounds like a single file.

What you seem to need is to access EEPROM as a stream, exactly like you would for an open file. There are stream wrappers around some EEPROM libraries, e.g. this one for ESP. I suggest you check it out and see if you can adapt it to the EEPROM library you use.

1

This lib offers a means of reading and writing ASCII arrays to flash devices. This would be a simple solution for such a data logger requirements. It's ASCII orientated.

https://github.com/schinken/Flash

-2

There is a way to do this. Using a $2 adaptor from eBay, you can hook it up to a micro sd card. An sad card for $4 can store 128mb of data, which is plenty for you.

Arduino Storage Tutorial with weather

128mb Micro Sd card

  • 4
    This does not answer the question which was asked. The poster already seems familiar with what you propose, and is seeking to do something else. – Chris Stratton Mar 16 '17 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.