Introduction
Compared to the previous Fermion: MicroSD Card Module for Arduino (Breakout) (https://www.dfrobot.com/product-875.html), this Fermion: Serial Data Logger can store data more conveniently, and supports direct data printing through serial port without additional codes. Fermion: Serial Data Logger supports 32GB TF card, making it suitable for long-time data storage. The device comes with a USB function, which means you can directly connect it to a PC computer to read the stored files without using a card reader. Meanwhile, with the onboard LED indicator, data writing status can be viewed visually. And the SAVE pin makes it easier to store data into separate files.
To avoid data recording error, please update the firmware for users who purchased before 2022/5/1.
- Unzip the download.7z
- Enter the folder download/download to find the file download_flash_sdk.bat
- Connect your module to the PC via a USB cable that can transfer data, double click download_flash_sdk.bat to burn the firmware.
For First Time Use
- If the storage is not formatted, format the storage first. The file system is FAT32.
- Power on the module for over 2 seconds (not from USB host) to make the module automatically generate the CONFIG.TXT file, and the SD light will blink once.
- Check whether the CONFIG.TXT file is generated normally, if not, refer to FAQ please. You can change the module communication baud rate and file storage name by changing CONFIG.TXT file.
Baud: serial port communication baud rate select (00 indicates 2400 baud rate and 01 indicates 4800 baud rate). Data can be stored normally only when the module baud rate matches the one printed by the maincontroller serial port.
FIleNum: the serial number of the next new file (FileNum=0099, the name of the next generated file is FILE0099.txt). If the file already exists, the system skips this file and continues to search for the next file.
- Connect the module to the maincontroller serial port to store data.
Note
- Don't send data to the module serial port before CONFIG.TXT file is generated.
- Don't connect the USB and serial ports at the same time.
- Connect the PC through USB. It is recommended to eject the USB flash drive before removing the module.
Features
- With USB function, no card reader required
- Support multiple baud rates, with good compatibility
- LED indicator for viewing data writing status visually
- FAT32 file system, support 32GB TF card
Applications
- Offline data collection
- Capture product debug logs
- Robots and drones debug
Specification
- Supply Voltage: 3.3V~5V
- Operating Current: 23mA
- USB Protocol: USB2.0
- Operating Temperature Range: -30℃~85℃
- Operating Humidity Range: 5%RH~85%RH
- Dimension: 23.5×22.5mm/0.93×0.89"
Pinout
Num | Silkprint | Description |
---|---|---|
1 | 5V | Power VCC |
2 | D- | Data- |
3 | D+ | Data+ |
4 | NC | Empty Pin |
5 | GND | Power GND |
6 | VCC | Power VCC |
7 | GND | Power GND |
8 | RX | UART Receive |
9 | TX | UART Transmit |
10 | S | SAVE pin/button, save the current file, and create a new file to store the following data, save data at low level. |
SD LED indicator is the one for data interaction between module and storage. It blinks when data is being written or a new file is being created.
Tutorial
Requirements
- Hardware
- DFRduino UNO R3 x 1
- Fermion: Serial Data Logger x 1
- M-M/F-M/F-F Jumper wires
- Software
Connection Diagram
Sample Code 1 - Write Data
Write data to the module through Serial.print, save a file every once in a while.
#define SPIN 6 //Connect to the module Pin S, trigger to save files at low level
uint16_t i = 0;
void setup(void)
{
Serial.begin(9600);
delay(2000); //To aviod data lost, delay a period of time to wait for the module to start
pinMode(SPIN, OUTPUT);
digitalWrite(SPIN, HIGH);
}
void loop(void)
{
Serial.println(String(i));
i++;
if((i % 10) == 0){
digitalWrite(SPIN, LOW);
delay(500);
digitalWrite(SPIN, HIGH);
}
delay(300);
}
FAQ
Q&A | Some general Arduino Problems/FAQ/Tips |
---|---|
Q | The CONFIG.TXT file isn't automatically generated when the module is powered on. |
A | Check whether the USB host is used to power the module first, and then check whether the file system for storage is FAT32. |
Q | The SD indicator is not lit when data is rapidly written to the module. |
A | The SD card has write endurance cycles of 100 thousand times. In order to ensure the SD life, write to SD card once about 50ms or 512 bytes after the module writes to data. |
Q | When will the module enter USB flash drive mode? When to enter data storing mode? |
A | When a USB host is used to connect the module, the module enters the USB flash drive mode, at the time data can't be stored in the module and the CONFIG.TXT file and new blank files will not be automatically generated when the module is powered on. In other cases, the module enters the data storing mode, and the CONFIG.TXT file and new blank files will be generated automatically if the module doesn't have a CONFIG.TXT file. |
Q | What can I do if a file cannot be deleted? |
A | Please format the storage first, and then refer to the methods in "For First Time Use". |
A | For any questions, advice or cool ideas to share, please visit the DFRobot Forum. |