Logomatic Hookup Guide

Contributors: Toni_K
Favorited Favorite 0

Logging isn't Just for Lumberjacks

The Logomatic is a data logger that allows you to log analog or serial data from your project. It logs to a microSD card and is compatible with high capacity cards. The board can be plugged in via microUSB and mounts as a universal mass storage device.


Suggested Reading

If you are not familiar with any of the following concepts, you may want to review them before moving ahead with the Logomatic.

Board Overview


The Logomatic has a very useful power circuitry. There is an on-board power switch, enabling the user to turn off the board to save power as needed. The board also comes with a JST connector for a LiPo battery to be connected to the board. While there is a battery plugged into the board, and the board is connected via USB, the battery will also be charged. You do not need to have the board turned on to charge the battery.

There is also an low dropout 3.3V regulator on the board. The maximum power dissipation of the voltage regulator is about 450 mW, and the maximum current draw of the Logomatic is about 80 mA. This puts the maximum voltage of the Logomatic at (450mW)/(80mA) + 3.3V = 8.925V. However, this will almost put the voltage regulator into thermal shutdown. To prevent this, the supply voltage should be kept between 3.6V and 7.5V.


The microSD card can be accessed over USB. When connected to a computer using a microUSB cable, the Logomatic will mount as a new drive. This will appear just like a standard flash drive would once the board is turned on. Once it is mounted, you can create, delete, or edit files. To remove it, simply turn off the board, and disconnect the USB cable.

Stop Button

The stop button will halt the Logomatic. All logging will stop, and any partially-filled buffer will be automatically logged to the microSD card. Turning off the Logomatic or removing its power source will also stop the unit from logging (and keep the log file intact), but, if there is a partially filled buffer, it will not be logged. When the unit is stopped with the stop button, the LEDs will blink continuously until the unit is power-cycled.

Logomatic Labeled

Logging Configuration

First Time Power-Up

Before powering up your Logomatic for the first time, put your microSD card into a card reader, and make sure to format it for FAT32. Insert the card into your Logomatic, and turn it on. The LEDs will blink reassuringly then go quiet. Turn the unit off, plug a USB (connector type microB) into the unit, and power back on. The unit will mount as a drive on your computer (alternatively, you can remove the card and use a card reader to read it). You will now find two files on your card, LOGCON.TXT and LOG0.TXT. The first file is the configuration file, and the second is the first logged file (empty). Open up the configuration file and you will see this:

MODE = 0
Baud = 4
Frequency = 100
Trigger Character = $
Text Frame = 100
AD1.3 = N
AD0.3 = N
AD0.2 = N
AD0.1 = N
AD1.2 = N
AD0.4 = N
AD1.7 = N
AD1.6 = N
Safety On = Y


There are 3 mode settings: “0” for automatic UART logging, “1” for triggered UART logging, and “2” for ADC logging.

Mode 0 logs everything that comes in on UART0, provided that it’s the right UART configuration (8 data bits, one stop bit, no parity, data rate of your choosing).

Mode 1 logs a specified number of characters (“Text Frame = 100” in this case will result in 99 characters logged after the trigger) after a specified character (“Trigger = $” in this case).

Mode 2 logs ADC measurements according to which are selected as active (see below) at whatever frequency is specified (“Frequency = 100” in this case).


The “ASCII” field only applies to ADC mode (Mode 2). It specifies whether the unit will log in ASCII format (“ASCII = Y”) or binary format (“ASCII = N”).


The “Baud” field sets the baud rate for the UART logging modes. The available rates are as follows:

"1" = 1200
"2" = 2400
"3" = 4800
"4" = 9600
"5" = 19200
"6" = 38400
"7" = 57600
"8" = 115200

Safety On

The last field in the configuration file is the “Safety On” field. This sets the frequency caps for ADC mode on with a “Y” or off with an “N”. The frequency caps are as follows:

1 channel active, 1500 Hz maximum
2 channels active, 750 Hz maximum
3 channels active, 500 Hz maximum
4 channels active, 375 Hz maximum
5 channels active, 300 Hz maximum
6 channels active, 250 Hz maximum
7 channels active, 214 Hz maximum
8 channels active, 187 Hz maximum

There is also a hardware test function that can be accessed through this parameter. Instead of a “Y” or an “N”, setting it to “T” will put the unit in hardware test mode, where you can watch the ADC lines slowly polled over the serial UART lines at 9600 baud. Note: this mode is not intended for normal operation. It is only intended for determining hardware failures.


The “Frequency” field only applies to ADC logging mode and is responsible for setting the sampling rate of the Logomatic. The number shown (100 in this case) is in Hertz and can be set from 1 to 9999. However, if the frequency safeties are active, the maximum values will be imposed as indicated in the Safety On section.

Trigger Character

The “Trigger Character” field only applies to the triggered UART mode (Mode 1). This is the character that the device waits for to begin logging a specified number of characters.

Text Frame

The “Text Frame” field specifies the number of characters to be logged with the trigger character when the Logomatic is running in Mode 1. The reader should be aware that the first character in the logged text frame will be the trigger character, so if you wish to log 100 characters after the trigger you should set the text frame to 101.

Note: This mode of operation is slightly different than the other modes in that each text frame has it owns dedicated 512 byte buffer. When the end of the text frame is reached, the buffer will be logged, and any new data coming in will be routed to the other input buffer.

Each text frame is delimited with a carriage return and a line feed character, so the maximum text frame size is 510 bytes. If this number is exceeded, it will be automatically reset to 510.

Operational ADC Lines

The next eight lines in the configuration file indicate which ADC lines are to be read by the Logomatic. They can each be turned on by changing the “N” to a “Y”. These values have no affect when the Logomatic is in one of the two UART modes.

The ADC values in the configuration files correspond to the outputs on the board as follows:

1 = AD 0.3
2 = AD 0.2
3 = AD 0.1
4 = AD 0.4
5 = AD 1.7
6 = AD 1.6
7 = AD 1.2
8 = AD 1.3

Output Formats

The formats of the text files produced by the Logomatic will be a little different in each mode.

For mode 0 (automatic UART), any ASCII characters that come in on the UART will be sent to the microSD card. Nothing is omitted and nothing is added.

For mode 1 (triggered UART), anything after and including the trigger character will be logged, including white space characters, up to the end of the specified data frame. Each data frame is delimited with a carriage return and a line feed character to make it easier to distinguish between the frames.

In ASCII ADC mode (mode 2, ASCII = Y), each single measurement is between 1 and 4 characters in length depending on how many digits are required, followed by a tab (ASCII 9) for delimiting. At the end of each measurement frame, that is, one time through the list of selected active ADC lines, carriage return and line feed characters are placed for further delimiting. The sequence of measurements displayed in the file from left to right are exactly the sequence of channels selected in the configuration file from to to bottom.

In binary ADC mode (mode 2, ASCII = N), each measurement is two bytes in length (MSB, LSB), and they will occur in the same sequence as the ASCII logs with respect to the configuration file. There are no delimiters between measurements, but measurement frames are delimited by the characters “$$”.

Example Hardware Hookup

Hardware Hookup

It’s now time to hook up your Logomatic to your system of choice for logging. For our example, we will be hooking the Logomatic up to an analog temperature sensor, the TMP36. We will be logging the temperature readings to our micro SD card.

Logomatic and TMP36 Hookup

Logomatic Hook-up Diagram

The connections above are as follows:

TMP36 → Logomatic

  • VCC → 3.3V

  • Signal → A0

  • GND → GND


Now that you know how the Logomatic works and have it connected, it’s time to power it up. Set your configuration however you like, make sure the SD card is fully inserted in the SD slot, and turn the switch to the on position. The two status LEDs will blink at you rather quickly during the initialization, then the unit will go to work with the settings you chose. The only further indication of operation that you will see is when one of the two data buffers logs to the SD card, STAT0 for buffer # 1 and STAT1 for buffer # 2. These will be very quick “blips” because the LEDs are only on during the write process, between 20 and 40 mS.

When you are done logging, press the STOP button before shutting off the unit to be sure that any unfilled buffers are logged to the SD card and all the interrupts are disabled.

The Logomatic will create up to 256 log files in text format, numbering from LOG0.TXT to LOG255.TXT. The most recent log file will be the one with the highest number.

Resources and Going Further

Going Further

Now that you’ve successfully gotten your Logomatic logging away, you can start tweaking the system to your exact preferences. The firmware is open-source and available here, or you can check GitHub for the most current version. Feel free to tweak or change the firmware. The unit’s code can be changed via the USB bootloader or you can reprogram the unit via and LPC programmer. Check out the tutorial here on reprogramming the Logomatic via the bootloader.

Additional Resources

If you have any feedback, please visit the comments or contact our technical support team at TechSupport@sparkfun.com.

Check out these additional resources for more information and other project ideas.