Main Content

Build an Arduino-based 4-Channel Data Logger

In many applications data collection is remote and Wi-Fi and Internet are not available.

In addition and in lieu of other backup opportunities, a simple on-demand logger would be a nice resource for custom applications that can accommodate the simple handshake protocol and have a serial output available to be saved into the removable SD card.

This project is an on-demand logger using an Arduino Nano-based controller. Like several similar SD serial loggers, the Arduino, used in this application is a popular choice for development and has the advantage that it creates this inexpensive data utility by exploiting the SD.lib, resident in the Arduino IDE.

This project differs from other modules because the logging feature uses a handshake protocol to support up to four external serial link requests. The configuration includes a real time clock (RTC) and supports a HC-05 Bluetooth (BT) module for clock setting and report monitoring. The code is taken and modified from the IDE library. Serial data, formatted with delimiters, will allow the filed logs to be downloaded directly into a spreadsheet as backup or for report generation.

The RTC was included to provide time tag and a the channel index is appended to the start of the saved data.

Because the logging data applications are external and on-demand, the serial source application may also include a “data taken” time tag in its saved transmission. Any serial link connected into the Arduino USB connector or the BT, thru any BT terminal application found your phone, can be used to set the clock using a simple key request sequence.

Two LED indicators are also included to reflect recording activity, error, and availability and this implementation uses a simple, one-line handshake protocol, shown below.

The protocol is simple enough, but must be included in the senor/parameter source code. In ancient times, polling was a mainstay in processing architectures. The monitor products, taken from the serial sources, are polled (pinA7) in either a sequential or priority sequence. The polled “winner” is multiplexed and stored into an individually fixed named file, maintained on the SD card.

Serial data, formatted with delimiters, will allow the filed logs to be downloaded directly into a spreadsheet as backup or for report generation. Logging for applications that cannot support the polling sequence, where you may not have that kind of flexibility, should consider the well represented, single line, serial loggers units available on line.

The serial inputs are multiplexed into the controller. While there are more integrated offerings, I am using a transistor based mux implementation in this application. The transistor version does require more discrete parts, but, as shown, works well and was both quick with available parts and inexpensive.

Because the logging data applications are external and on-demand, the serial source application may also include a ‘data taken’ time tag in its saved transmission. Any serial link connected into the Arduino USB connector or the BT through most BT terminal applications found on your phone can be used to reset the clock and define the baud rates for each channel request information on the SD card.”

Link to article