This data acuisition (DAQ) unit kit is designed to be robust and configuable but relatively simple. It is based upon the Arduino platform (using the Uno bootloader). It stores data to an SD card and uses a real time clock for accurate timestamping. The fastest resolution is 1 second sampling.
Data acquisition is always useful to monitor a wide range of projects. Knowledge is power. With data, you can monitor your system, make changes and record how well they do and generally improve the things you are working on. Also having real data and real facts is vital if we are trying to prove an effect.
Data is stored onto an SD card. A real time clock is used to timestamp the data and the output is a .csv file.
Sample Arduino code for a datalogger unit is provided and can be built upon.
This desiign is based upon an ATmega328 programmed with the Arduino bootloader. This makes it easy to configure and change and there are a huge amount of open libraries to use. This board (with an ATmega328) does not include the USB to serial converter (which would be on a standard Arduino), but I used an external USB to serial FTDI cable to program these boards. These cable are available at low cost and easily and are very useful.
The ATmega328 is interefaced to an SD card holder, along with very simple voltage level conversion. The ATmega IC works at 5V and the SD card works at 3V3, hence a 3V3 regulator and some potential divider resistor networs are required.
A real time clock is also used to timestamp the data. This is a standard IC (PCF8563) which has a battery backup. It is a fully configurable PCB with an SD card holder and real time clock wth battery backup. It also works as a Arduino for any other project.
The completed board is shown here:
The completed circuit board with battery backup for the real time clock and SD card holder.
As a basic unit, there are 5 digital data lines and 4 analogue data lines. The analogue lines can be converted into digital, if required. There are 4 additional digital lines which can also be used for data logging, but which mean slight loss of functionality.
The pin allocation is listed here:
|Pin Number||Type of data||Allocation|
|D0||Digital||Serial Rx – Can be used if required|
|D1||Digital||Serial Tx – Can be used if required|
|D2||Digital||Clock interrupt at 1 second – Cannot be used|
|D5||Digital||LED indicator – Can be used if required|
|D6||Digital||SD card – Card detect – Can be used if required|
|D10||Digital||SD card – Chip select – Cannot be used|
|D11||Digital||SD card – MOSI – Cannot be used|
|D12||Digital||SD card – MISO – Cannot be used|
|D13||Digital||SD card – Clock – Cannot be used|
|A4||Analogue||RTC – SDA – Cannot be used|
|A5||Analogue||RTC – SCL – Cannot be used|
Here are the build instructions:
Here is the circuit schematic:
|CR2032 3V BATT|
|C8||Trimmer capacitor 8-30pF|
|D4||LED RTC (Not used)|
|28 pin DIL socket|
|P1||2.1mm DC power socket|
|P2||3 x 2 ISP conenctor|
|P3||6 pin Programming header|
|R5||1k (not used)|
|8 pin DIL socket|
|U2||MC1703 (3v3 regulator)|
The circuit board is shown here. It is a two layer board.
This circuit schematic and PCB was designed using KiCAD, an open source PCB design package.
The full KiCad files are available to downlaod as a zipped folder here. These are open source under the creative commons share-alike by attribution license.
The code for this project was written using the Arduino bootloader and IDE. (Edit 10/3/14: This code was written for Arduino IDE version 1.0.5).
This project assumes some knowledge of the Arduino platform. If you do not have this then please start with the numerous examples available within the Arduino community.
There are two programs written, which you will need to download and add to your Arduino sketchbook:
- The main DataDuino example – this is the main full data-logger code.
- A clock adjust code – for ensuring accuracy of the real time clock (Note: You will need a high precision frequency counter)
The code has numerous comments and follows a flow structure as shown here:
Programming the unit
As mentioned previously, you will need an FTDI USB to 3v3 serial lead with a 6 pin socket to program this device. This is available here from FTDI and also electronics suppliers such as RS and Farnell. The part number is: TTL-232R-3V3. Plug your FTDI cable into the 6 pin header and you should be able to use the Arduino IDE to upload new code.
There is also an ISP (In series programming) 6 pin area (although pin connector is not included). This means you can program the chip while it is in-situ using an ATMEL ISP programmer.
This kit does not come with an enclosure. I designed a small enclosure for the LEEDR DAQ project, which is available for downloading here. It is designed to be cut out of 3mm plywood using a laser cutter. It fits onto a piece of A4 sized wood.
This is the DAQ unit in a laser cut wooden box. (Note: this is NOT included in the kit)
You can download the .dxf file for the enclosure design here. (Note: This is not large enough to hold the DAQ AND an Arduino shaped prorotyping board.
Note: We are working on an enclosure which fits the DAQ board plus an additional arduino shaped prototype board. If you would like one of these then please email to register your interest.