Logomatic Hookup Guide
First Time Power-Up
Initializing the Configuration and Log Files
Before powering up your Logomatic for the first time, insert your microSD card into a card reader, and make sure to format it for FAT32. Insert the card into your Logomatic, insert a LiPo battery into the two pin JST connector, and turn the power switch to the ON position. The STAT0 and STAT1 LEDs will blink reassuringly then go quiet.
Mounting as a USB Drive
Turn the unit off, plug a USB (connector type micro-B) into the unit, and power back on with the power switch. 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 in a text editor and you will see this default configuration:
MODE = 0 ASCII = Y 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
Configuring LOGCON.TXT File
The LOGCON.TXT allows you to control how the Logomatic records data to the memory card. Let's go over the different settings.
There are 3 mode settings:
"Mode = 0" (Automatic UART Logging) - 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" (Triggered UART Logging) - 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" (ADC Logging) - 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 these formats:
- "ASCII = Y"- ASCII
- "ASCII = N" - binary
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
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.
MODE = 2 ASCII = Y Baud = 4 Frequency = 01 . . .
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.
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.
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:
|LPC2148 Microcontroller Pin Assignment||Logomatic Digital/Analog Silkscreen Pin Number|
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.
Example Output Formats
The formats of the text files produced by the Logomatic will be a little different in each mode depending on the configurations explained above. Here are a few possible configurations:
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 "$$".