M. Ferlan, P. Simončič / Agricultural Sciences 3 (2012) 865-870 867
perature sensors with output ranged from 0 to 2500 mV
can be connected to single ended channels. Despite
manufacturer guarantee that sensors are calibrated, we
performed a test with seven temperature sensors placed
in a measurement stick and classical meteorological ther-
mometer (mercury thermometer). As a testing media,
water with ice was used and appropriate hand mixing
was performed. Temperature ranged from 4˚C to 17˚C
and values were logged or manually read every 30 min-
utes. For each temperature sensor, linear regression with
mercury thermometer measurements (n = 12) was made.
From all parameters of linear regression (N = 7), we cal-
culated means and standard deviations (R2 = 0.997 +
−0.001, slope = 0.975 + −0.023, intercept = 0.124 +
−0.377). With these temperature sensors, the temperature
is slightly underestimated compared with the mercury
thermometer. From simultaneously measurements accu-
racy of system temperature measurements was calculated
and it is ±1.1% for testing range.
2.3. Unit for Data Logging
The Philips Inter-IC communications (I2C) protocol
(Philips Semiconductors, The Netherlands) is commonly
used for interfacing peripheral devices and microcon-
trollers. We used this type of communication for data-
logging of nine measured parameters and time stamp on
an AT24C512 (Atmel Corporation, San Jose, CA) mem-
ory module. Measurement frequency in range from 5 to
3600s can be set and system informs us for how many
days the data-logger can store data (For example: meas-
uring frequency set to 30 minutes, the data-logger can
store data for 59 days). If we do not download the data to
an external device (notebook, handheld computer…) and
the memory module is full, the microcontroller stops
measuring and goes into power-down mode.
2.4. Unit for Communication with Other
Devices
The user can communicate with the circuit using ter-
minal software on a notebook or handheld computer.
Communication is available via serial interface (baud
rate: 56,000, Data bits: 8, Parity: none, Stop bits: 1,
Handshaking: none). To establish serial communication
with computer also serial to USB converter could be
used. When connection with the computer is established
the microcontroller program starts a user-interface rou-
tine and displays in the terminal program a notice with
the instructions on how to set up time and date, the loca-
tion of data-logger or download the data. One of the ad-
vantages of the presented system for measuring and
data-logging is that you do not need to install any special
software on your computer. Hyper Terminal (Windows)
or any other free software for reading data from serial
ports can be used.
2.5. Unit for Constant Power Supply with
Battery Pack
The microcontroller circuit is powered by a battery
pack, consisting of four AA-size, 1.5 V alkaline batteries.
Since the microcontroller and other devices (except sen-
sors EC-5 for which a voltage regulator is used) can op-
erate at a voltage between 4.5 and 5.5 V, only a diode
was used in the supply line to avoid short-circuits and to
reduce the voltage from the battery pack. The current
drawn is approximately 15 µA in power save mode and
22 mA during measurement. Each measurement lasts less
than 2 seconds and if the measurement frequency is set
to 30 minutes, using standard AA alkaline batteries, with
a capacity of approximately 2500 mAh, we can expect a
battery life of approximately 5.5 years.
2.6. Central Unit with Real-Time Clock and
Running Program
For the central unit a microcontroller (ATmega16,
Atmel Corporation, San Jose, CA) was used. The AT-
mega16 is a low-power CMOS 8-bit microcontroller
based on the AVR enhanced RISC architecture. The AT-
mega16 offers several functions that allow the construc-
tion of the system with minimum peripheral components,
because of which it is cost-effective and robust. To apply
a real-time clock, the crystal oscillator with 32.768 kHz
frequency must be connected to the microcontroller.
The software for the microcontroller was written in a
BASIC-like language (BASCOM-AVR, MCS Electron-
ics, Holland) for Microsoft Windows XP. The program
was compiled in microcontroller assembly language and
uploaded to the microcontroller using a programmer
(PROGGY AVR, AX Elektronika, Slovenia) connected
to a desktop computer via AVR Studio 4 software (Atmel
Corporation, San Jose, CA).
2.7. System Fabrication and Housing
The system with all its components was built by the
authors, who have also designed the electrical schematic
of the circuit board (Figure 1). The schematic was trans-
ferred to the circuit board, which was drilled out on a
small CNC machine in the laboratory for electronic sys-
tems at the Slovenian Forestry Institute.
Electronic components and connectors were soldered
onto each circuit board and sensor cables were prepared.
The tubes for temperature profile measurements were
prepared according to World Meteorological Organiza-
tion standards. For the fabrication and testing of one sys-
tem approximately 4 hours are required.
The system has a waterproof housing. Three cables for
Copyright © 2012 SciRes. OPEN ACCESS