

The Gravity: Serial Data Logger V2.0 (Manufacturer Part ID: TEL0147) by DFRobot is a compact and efficient data logging module designed specifically for Arduino projects. This module enables users to record and store real-time data from various sensors or devices via serial communication. It supports microSD cards for data storage, making it ideal for applications requiring long-term data collection and analysis.








Below are the key technical details of the Gravity: Serial Data Logger V2.0:
| Parameter | Specification |
|---|---|
| Operating Voltage | 3.3V - 5V |
| Communication Interface | UART (Serial) |
| Baud Rate | 9600 bps (default, configurable) |
| Storage Medium | MicroSD card (up to 32GB, FAT32) |
| Power Consumption | < 20mA |
| Dimensions | 30mm x 20mm |
| Weight | 5g |
The module has a simple 4-pin interface for easy integration with Arduino boards:
| Pin | Label | Description |
|---|---|---|
| 1 | VCC | Power input (3.3V - 5V) |
| 2 | GND | Ground connection |
| 3 | RX | UART Receive pin (connect to Arduino TX) |
| 4 | TX | UART Transmit pin (connect to Arduino RX) |
Hardware Setup:
Software Setup:
Data Logging:
Below is an example sketch to log temperature data from a DHT11 sensor to the Gravity: Serial Data Logger V2.0:
#include <DHT.h>
// Define the DHT sensor type and pin
#define DHTPIN 2 // Pin connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11 sensor
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 bps
dht.begin(); // Initialize the DHT sensor
delay(2000); // Allow the sensor to stabilize
}
void loop() {
float temperature = dht.readTemperature(); // Read temperature in Celsius
float humidity = dht.readHumidity(); // Read humidity percentage
// Check if the readings are valid
if (isnan(temperature) || isnan(humidity)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
// Format the data as a CSV string
String data = String(temperature) + "," + String(humidity);
// Send the data to the Serial Data Logger
Serial.println(data);
delay(2000); // Log data every 2 seconds
}
25.3,60.2) and sent to the Serial Data Logger via the Arduino's serial interface.No Data Written to the microSD Card:
Corrupted Data on the microSD Card:
Module Not Responding:
Data Logging Too Slow:
Q1: Can I use this module with microcontrollers other than Arduino?
A1: Yes, the module can be used with any microcontroller that supports UART communication, such as ESP32, Raspberry Pi (via USB-to-UART), or STM32.
Q2: How do I change the baud rate of the module?
A2: Refer to the manufacturer's documentation for instructions on changing the baud rate using specific serial commands.
Q3: What happens if the microSD card is full?
A3: The module will stop writing data once the microSD card is full. Regularly check and clear the card to ensure continuous operation.
Q4: Can I log binary data instead of text?
A4: Yes, the module supports logging binary data. Ensure your microcontroller sends the data in the desired format.
By following this documentation, you can effectively integrate the Gravity: Serial Data Logger V2.0 into your projects for reliable and efficient data logging.