Skip to content

Promake Logger M1

Description

The ProMake Logger M1 allows you to store data on an SD card. The included RTC (Real Time Clock) can be used to add a timestamp, so that you know the exact time of each record. The RTC chip on the board tracks day of month, day of week, month, year, hours, minutes and seconds. In the absence of a power supply, a coin cell lithium battery allows keeping track of the time.

The RTC chip also contains alarm configuration based to generate an event at a predetermined time. This event can cause an interrupt that can be verified either via the INT pin or via an I2C command.

The Serial Data Logger supports 32GB TF card, making it suitable for long-time data storage

Features

  • Battery holder for CR/BR 1216, 1220 or 1225 batteries.
  • SD Card for data storage
  • RTC power supply input for 3.3V or 5V (configurable via solder jumpers).
  • FAT32 file system, support 32GB TF card
  • Breadboard-friendly

APPLICATIONS

  • Offline data collection
  • Capture product debug logs

Important Notes

  • Does not come with a micro SD card.
  • A CR1220 coin cell is required to use the RTC battery-backup capabilities! We don't include one by default, to make shipping easier for those abroad, so use any CR1220 you have handy.
  • If you're not using the RTC part, a battery is not required

Resource

Module Pinout

Module Schematic

Software

Developement using Arduino

To set up the hardware, Insert your SD card and Coin cell then easily plug this module into:

  • Module1 or Module2 slot of your ProMake® Arduino Nano Kit

or

  • Module1 or Module2 slot of your ProMake® Arduino Uno Shield

or

  • Use your breadboard to connect the Power, I2C and SPI lines.
SD Card write sample
#include <SPI.h>
#include <SD.h>
File myFile;
void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial); // wait for serial port to connect. Needed for native USB port only
  Serial.print("Initializing SD card...");
  if (!SD.begin(10)) {
    Serial.println("initialization failed!");
    while (1);
  }
  Serial.println("initialization done.");
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  myFile = SD.open("test.txt", FILE_WRITE);
  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to test.txt...");
    myFile.println("This is a test file :)");
    myFile.println("testing 1, 2, 3.");
    for (int i = 0; i < 20; i++) {
      myFile.println(i);
    }
    // close the file:
    myFile.close();
    Serial.println("done.");
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
}
void loop() {
// nothing happens after setup
}
Working with RTC

To use the RTC on this module first you need to install "RTClib" library (by Adafruit) in your Arduino® IDE. Then using the code below you can adjust and read time from RTC:

#include "RTClib.h"

RTC_DS1307 rtc;

char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

void setup () {
 while (!Serial); // for Leonardo/Micro/Zero
 Serial.begin(57600);
 if (! rtc.begin()) {
   Serial.println("Couldn't find RTC");
   while (1);
 }
 if (! rtc.isrunning()) {
   Serial.println("RTC is NOT running!");
   // following line sets the RTC to the date & time this sketch was compiled
   rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
   // This line sets the RTC with an explicit date & time, for example to set
   // January 21, 2014 at 3am you would call:
   // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
 }else{
     Serial.println("RTC is running!");
 }
}

void loop () {
 DateTime now = rtc.now();
 Serial.print(now.year(), DEC);
 Serial.print('/');
 Serial.print(now.month(), DEC);
 Serial.print('/');
 Serial.print(now.day(), DEC);
 Serial.print(" (");
 Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
 Serial.print(") ");
 Serial.print(now.hour(), DEC);
 Serial.print(':');
 Serial.print(now.minute(), DEC);
 Serial.print(':');
 Serial.print(now.second(), DEC);
 Serial.println();
 Serial.print(" since midnight 1/1/1970 = ");
 Serial.print(now.unixtime());
 Serial.print("s = ");
 Serial.print(now.unixtime() / 86400L);
 Serial.println("d");
 delay(2000);
}

Developement using Raspberry