The SparkFun OpenLog is an open-source data logger that is easy to use and capable of recording serial data from various sensors and devices. It is designed to be connected directly to a microcontroller's serial output and can log data to a microSD card at up to 115200 baud. The OpenLog is ideal for applications such as capturing sensor data over time, logging GPS coordinates, and recording system events for debugging purposes.
Pin # | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VCC | Power supply (3.3V to 12V) |
3 | RXI | Serial Receive Input |
4 | TXO | Serial Transmit Output |
5 | DTR | Data Terminal Ready, used for automatic logging control |
Q: Can the OpenLog be used with sensors that do not have a serial output? A: Yes, but an intermediary microcontroller is required to read the sensor data and send it to the OpenLog via serial communication.
Q: What is the maximum size of the microSD card that can be used with the OpenLog? A: The OpenLog supports microSD cards up to 32GB in size.
Q: How do I change the baud rate of the OpenLog?
A: The baud rate can be configured by editing the config.txt
file on the microSD card or by sending serial commands to the OpenLog.
Below is an example Arduino sketch that demonstrates how to send data to the OpenLog. This example assumes that the OpenLog is connected to the Arduino's hardware serial port.
#include <SoftwareSerial.h>
// Create a software serial port called 'openLog'
SoftwareSerial openLog(2, 3); // RX, TX
void setup() {
// Start the hardware serial port for debugging
Serial.begin(9600);
// Start the software serial port at the baud rate of the OpenLog
openLog.begin(9600);
Serial.println("OpenLog test begins");
}
void loop() {
// Send test data to the OpenLog
openLog.println("Hello, OpenLog!");
// Wait for 1 second
delay(1000);
}
Remember to adjust the openLog.begin(9600);
line to match the baud rate of your OpenLog if it is set to a different value.