Geekcreit Mega 32Mb Memory - data logging memory

Hello I need an advice. I have two questions.

I am about to order Arduino Mega board. I need it for saving data logs (sensor readings) and I need logs to record the time and date of the reading .
I haven't worked with data logging yet. I've watched tutorial videos to learn about it.

I want to buy this board:
Geekcreit Mega +WiFi R3 Module ATmega2560+ESP8266 32Mb Memory

There is this build in flash memory of 32Mb.
Is it possible to use it for saving data logs?
Or do I need to order separate MicroSD card module?

My second question is
I assume I need to buy Real Time Clock Memory Module - one of those modules for coin battery.
So the arduino will set proper time and date after power black out.
Is this the function of this module?

I found separate Real Time Clock Memory Module
And combine version with MicroSD card interface.
So if I gonna need both MicroSD card and clock memory modules I choose the combine version.

Thank you

The 32Mb is the flash memory of the ESP8266; that's where you store the program that runs on the ESP8266; you might be able to store data in there (I don't know) but in general you don't use flash for that.

Basically yes; your wording is a bit odd :wink: You will need to consider how accurate your timing needs to be; some modules are more accurate than others. Will your setup be placed in an area with WiFi (with internet)? In that case, you can use the ESP8266 part to get time from the internet

How often are you going to log data? How much data per record? For how long?

Thank you for reply!

This project is home-alarm.
6 sensors will monitor open/closed windows and doors.
So the reading will be simple 1/0 (closed/open circuit)
And it will log only when a change happens.
Something like this:
01/06/2021 12:06:32 door2: 0
01/06/2021 12:06:38 door2: 1

About 20 lines a day.
History of past 30 days is enough.

Internet is only planned. So I have to rely on battery.

Would you recommend to get both modules separate - Real Time Clock Memory Module and MicroSD card interface?
Or the version of both of them in one board?

I may be wrong here but I think that the ESP8266 has an SPI flash chip. There's something called SPIFFS - SPI Flash File System - which seems to be used with the ESP8266. I'm guessing that the SPI flash chip is private to the ESP8266 and not directly accessible from the MEGA2560.

If the MEGA2560 can talk to the ESP8266, then you may be able to use that link to transfer messages to a sketch running on the ESP8266, that in turn can write to a file on the SPIFFS.

Alternatively, if you get an RTC module such as the ZS-042, then it also comes with an EEPROM device which can be used to store data. The EEPROM has a finite number of writes but that shouldn't be a problem for the small amount of data you are recording.

1 Like

@markd833

I was thinking the same about the rtc module. But the EEPROM might not be sufficient. Assume 5 bytes for a record, 20 times a day, 30 days, that will give 3 kByte and the EEPROM will be sufficient. But if doors open and close more often, it might not be.

Clever idea about SPIFFS. But remember that flash has less write cycles than EEPROM.

@miramax,

I would buy separate. You can fine tune better to your needs. Be aware that sd cards are 3.3V and not all modules provide level shifting, so be careful what you buy.

I'm wondering why you go for the specific board. I'm not familiar with all possible options in the world but just an ESP based board might do the trick; maybe a Wemos D1.

@miramax do you need a mega board? Do you need wifi?

You can get a data logging shield for an UNO that has an RTC and a micro SD.

You may want to consider how accurate you need your event timestamp to be. The DS3231 RTC is considered to be the best for accuracy of timekeeping due to its temperature compensation ability.

@sterretje I suppose it depends which RTC module he gets but I hear what you're saying re storage requirements. I usually work out what I might need and then double it (and sometimes double it again).

Thanks for advice!

I go for Mega board because I will definitely need more than 20 I/O pins...
For planned expansion.

I am not sure if I will have use for wifi interface.