Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Data Logger: Measuring the current and voltage

M. A. B. Salvador
BS in Electrical Engineering
Mariano Marcos State University

Abstract— A data logger was designed to B. Objectives of the Study


monitor and record the data gathering of the
current and voltage for every 5 minutes within 1. Design a Data Logger using Arduino.
the 1 hour period in a day. The data gathered 2. Write a program that will gather the data using
was stored in a sd card. An Arduino board Arduino.
work for as the project's brain. Current and 3. Store a data using Arduino.
voltage are measured via a ACS712. 4. Gather the current and voltage and save it on
Programming an Arduino Uno to take current SD Card.
and voltage measurements from a ACS712
sensor creates a file on an SD Card. Therefore, C. Significance of the Study
we are able to use the SD Card to access data
whenever it is suitable. Here, we'll import Nata This study will be beneficial to the researchers in
data into Excel in order to make graphs. The conducting their study and other researchers to
date and time are maintained using the well- embrace more modern technology. In addition, those
known RTC module DS3231. aware of this kind of development want to pursue
further studies in improving the system. This study
I. INTRODUCTION may also help future researchers by taking or using
A. Background of the Study this as their basis/guide or reference in their future
Data logger stores electrical data (voltage, related studies.
current, power, energy, etc.) in an SD card, with
times tamp for later analysis. A data logger is a type of D. Scope and Limitation of the Study
electronic device that records data over time or in
connection to a specific place using both internal or This study's primary focus will be on designing,
external instruments and sensors (also known as a data making, and testing the data logger to acquire
recorder or data logger). They are partially based on a information about the current and voltage flowing
digital processor (or computer). Data loggers are the through.
“workhorse” of recording instruments. They can record
data for days, weeks, or even years at a time. This
process is commonly referred to as data logging. They II. REVIEW OF THE RELATED
are frequently small, battery-powered, portable, and LITERATURE
equipped with a CPU, internal memory fordata storage, A. Data Logger
sensors, and other features. Some data recorders Electronic data loggers have replaced chart
feature connections for computers. Data loggers range recorders in many applications. The ability of data
from general-purpose types for a variety of loggers to automatically and continually collect data is
measurement applications to incredibly specialized one of the key advantages of using them. In order to
devices for measuring in one environment or measure and record data, data loggers are typically
application type solely. They are activated by software, turned on, deployed, and left alone for the duration of
displayed, and used to evaluate the information the monitoring period. This makes it possible to
obtained. Some have a local interface device and can monitor environmental factors like air temperature and
function independently. Technology for data loggers is relative humidity in order to provide a full and accurate
developing more swiftly than ever. The traditional picture (Kumar, n.d.)
design of a stand-alone data logger is being replaced B. Arduino Uno
with a device that not only records data but also has
access to wireless communications for event warning, The ATmega328P is the core of the Arduino Uno
automatic data reporting, and remote control. Data microcontroller board (Data sheet). It has a USB port, a
loggers are now beginning to provide customers with power connection, an ICSP header, a reset button, a 16
web sites for real-time readings, email alarms, and FTP MHz ceramic resonator (CSTCE16M0V53-R0), 6
daily findings directly into databases. (Kumar, n.d.). analog inputs, 14 digital input/output pins, and 6 of
these may be used as PWM outputs. Almost all the
components required to support the microcontroller are
included; all you need to do to get going is plug in a
USB connection, an AC-to-DC converter, or a battery.

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE


boards for a complete list of all prior, present, and out- B. Research design
of-date models. (ArduinoUnoRev3, n.d.) This study, a data logger's design and testing were
C. RTCDS3231 examined. This was built with the objective of
collecting statistics on 9 volts battery voltage and
Real time clock or RTC is a timepiece that takes the
shape of an integrated circuit, or ic. RTC is a crucial current every 5 minutes. The design and assessment
part of many time-sensitive programs and gadgets, of the data logger used quantitative research. The
including servers, gps, and data loggers. A RTC IC research will conduct a survey analysis that is
created by maxim integrated is the DS3231. It is a very enhanced by real measurements.
affordable, very accurate RTC IC that communicates C. Research materials
over the I2C interface. The embedded crystal oscillator o Computer/Laptop (with Arduino IDE)
and temperature sensor of the DS3231 RTC IC is an o Arduino Uno
intriguing feature (Amazon.com: Geekstory 5PCS o RTC DS3231
DS3231 Real Time Clock Module RTC Sensor High o SD Card Module
Precision AT24C32 IIC Timer Alarm Clock for o Breadboard
Arduino Raspberry Pi : Everything Else, n.d.). The o Male to Female DuPont Wire
DS3231 has a built-in timer that can record seconds, o Male to Male DuPont Wire
minutes, hours, days, dates, months, and years. It o ACS712
automaticallychanges the date at the end of the month,
including leap year adjustments, for months with fewer D. Diagrams and Figures
than 31 days (valid up to 2100). It includes an AM/PM
indication and may operate in 12- or 24-hour formats.
It also features two programmable time-of-day alarms.
(Engineers, 2022)

D. SD CARD MODULE
One of the most crucial components of every
project is data storage. Depending on the kind and
amount of the data, there are several methods for Fig. 1 RTC DS3231
storing it. One of the most useful storage options are
SD and micro SD cards, which are used in products like
mobile phones, minicomputers, and others. Data
logging, data visualization, and many more
applications utilize SD cards or Micro SD cards often.
We can access these SD cards with ease thanks to
Micro SD Card Adapter modules. The Micro SD Card
Adapter module is a user-friendly device with an SPI
interface and an internal 3.3V voltage regulator to
supply the SD card with the appropriate power.
(Instructables, 2019).
Fig. 2 SD CARD
E. ACS712
MODULE
ACS712 offers affordable and accurate solutions
for industrial AC or DC current sensing, systems
for commerce and communications. Thegadget Fig. 3 Complete set up of the data logger with ACS712
package enables simple customer
implementation. Applications like load sensing,
motor control, and Overcurrent, management,
and switched-mode power supply error
prevention.

III. METHODOLOGY

A. Locale of the Study


Data logger design, evaluation, and testing were
completed on January, 6 2022, at Mariano Marcos
StateUniversity in Batac City, Ilocos Norte. The study
was carried out at Mariano Marcos State University.
E. Code Itself dataFile.print("\tC: ");
dataFile.println(I);
#include dataFile.close();
<ACS712.h> // Print the collected data in a row on the Serial
#include Monitor
<EduIntro.h> Serial.print("Date : ");
#include <Wire.h> Serial.print(t.mday);
#include <ds3231.h>
#include <SPI.h> Serial.print("/");
#include <SD.h> Serial.print(t.mon);
Serial.print("/");
ACS712 acs712(D10); // creating the object sensor on Serial.print(t.year);
pin 'D10' Serial.print("\t Time :
struct ts t; ");Serial.print(t.hour);
int I; // Current I readings are integers Serial.print(":");
float V; // Voltage V readings are returned in float Serial.print(t.min);
format Serial.print(".");
int P; // Power readings are integersvoid Serial.print(t.sec);
setup() Serial.print(" : ");
{ Serial.print("P: ");
// initialize serial communications at 9600 bps Serial.print(P);
Serial.begin(9600); Serial.print("\tC: ");
Wire.begin(); Serial.println(I);
DS3231_init(DS3231_CONTROL_ADD delay(1000); // Wait one second before get another
R); current reading
}
t.hour = 11; else{
t.min = 00; Serial.println("Error opening data.txt");
t.sec = 0; }
}
t.mday = 06;
t.mon=01;
t.year=2023;
DS3231_set(t);
while (!Serial){
;
}
Serial.print("Initializing SD card ...");
if (!SD.begin(10)){
Serial.println("Card failed, or not present");
while(1);
}
Serial.print("Card initialized data");
}
void loop()
{
DS3231_get(&t);
File dataFile =
SD.open("data.txt",FILE_WRITE);if
(dataFile){
dataFile.print("Date : ");
dataFile.print(t.mday);
dataFile.print("/");
dataFile.print(t.mon);
dataFile.print("/");
dataFile.print(t.year);
dataFile.print("\t Time : ");
dataFile.print(t.hour);
dataFile.print(":");
dataFile.print(t.min);
dataFile.print(".");
dataFile.print(t.sec);
dataFile.print(" : ");
dataFile.print("P: ");
dataFile.print(P);
F. Data Gathering Procedure TABLE 1: DATA FOR CURRENT, VOLTAGE AND
POWER AS RECORDED INTO THE SD CARD.
o Connect the RTC (Real Time Clock) DS
3231, SD Card Module and ACS712 on their Date and time Voltage Current
respective connection on the Arduino Uno. Jan.06(11:00am) 8.4 2.75
o Verify if the codes are ready to upload.
o After uploading use the serial monitor to see Jan.06(11:05am) 8.37 2.73
ifthe data logger saved a data to the Sd card Jan.06(11:10am) 8.34 2.71
o Set the delay on the program to 1000 to gather
the battery voltage and current every 5 Jan.06(11:15am) 8.31 2.69
minutes. Jan.06(11:20am) 8.28 2.67
o Enter the specific time and date on the codes Jan.06(11:25am) 8.25 2.65
for us to have a precise output after gathering
and upload the code. Jan.06(11:30am) 8.22 2.63
o Place the data logger on the safest part of the Jan.06(11:35am) 8.19 2.61
room to prevent disconnection of the data
Jan.06(11:40am) 8.16 2.59
logger
Jan.06(11:45am) 8.13 2.57
IV. RESULTS AND DISCUSSION
Jan.06(11:50am) 8.1 2.55
Jan.06(11:55am) 8.07 2.53
Jan.06(12:00noon) 8.04 2.51
Average 8.205 2.62

V. SUMMARY, CONCLUSIONS AND


RECOMMENDATIONS
A. Summary
A data logger was designed, constructed, and tested
to gather data on the battery voltage and current. Within
the 1 hour of a day, the data recorder stored the battery
current every 5 minutes. The experiment was carried
out at Mariano Marcos State University's Electrical
Engineering Department in the College of Engineering
in the City of Batac, Ilocos Norte. The data logger is
composed of an Arduino IDE-equipped computer or
laptop, Arduino hardware, an SD card module, a
breadboard, male-to-female and male-to-male DuPont
wire, and an ACS712. The findings of this inquiry will
Fig.4 aid in identifying the voltage and current that will
operate or flow in the battery. In addition, keep an eye
on the battery's voltage and current at both its highest
It shows in figure 4 the data gathered in
and lowest points.
performing the experiment. We used a battery in
performing the task. On January 6 at 11:00 am, we’ve
got 8.4 volts, and 2.75 ampere. However, we met the B. Conclusion
total amount of time and attempt in performing the To conclude, we were able to design an Arduino-
experiment. At 12:00 pm, we’ve got a result of 8.04 based data logger. Create an Arduino program to collect
volts, 2.51 ampere (current). The table below shows the data. Utilize an Arduino to store data. Every 5
that the average current was 8.205 Volts and 2.62 minutes, collect the battery voltage and current and save
Ampere respectively. it on an SD card. Voltage and current sensors have been
successfully installed in this project using Arduino. The
ACS712, which has a capacitive sensor to check the
current and measure voltage, is connected to an
Arduino microcontroller to detect the force produced by
the water stream in the environment. This project will
be helpful to our group because we can use and apply to
our thesis requirement entitled “Evaluation of Solar
Powered Aquatic life support system”.
C. Recommendation
o Monitor the data logger using IOT to keep an
eye on the information acquired there.
o During the data gathering process, we
commonly discover that the date and time of
the texts we read are inaccurate.
o Examine and confirm the code that will be
immediately entered into the data that has been
gathered.

References:
• https://www.slideshare.net/NiranjanKumar17
5/dataloggers-seminar-report
• https://lastminuteengineers.com/ds3231-rtc-
arduino-tutorial/
• https://www.electronicshub.org/arduino-
ds3231-rtc-module-tutorial/
• https://www.instructables.com/SD-Card-
Module-With-Arduino-How-to-ReadWrite-Data/.
• https://store.arduino.cc/products/arduino-uno
-rev3

You might also like