IOT102 Report
IOT102 Report
1st Phm Công Minh, 2nd Lê Vũ Trng Nhân, 3rd Nguyn Gia Linh and Duc Ngoc Minh Dang
FPT University, Ho Chi Minh Campus, Vietnam
{minhpcse172070, nhanlvtse172035, linhngse171088}@fpt.edu.vn, and [email protected]
Abstract
This project involves designing a digital clock that utilizes the DS1307 real-time clock (RTC) module and the LM35 temperature
sensor. The DS1307 RTC module is a low-power, full binary-coded decimal (BCD) clock/calendar that provides seconds, minutes,
hours, day, date, month, and year information. The LM35 temperature sensor is a precision IC temperature sensor that can
accurately measure temperature in Celsius.
The digital clock displays the time and temperature information on a 16x2 LCD display. The clock is powered by a 5V
arduino, and the DS1307 RTC module ensures accurate timekeeping even in the event of power loss. The LM35 temperature
sensor is interfaced with the clock using an analog input pin, and the temperature information is displayed on the LCD display
along with the time.
This project is suitable for individuals interested in electronics and programming and can be easily replicated with basic
knowledge of circuit design and programming. The digital clock with DS1307 and temperature LM35 is a useful and practical
device for everyday use, providing accurate time and temperature information in a compact and user-friendly package.
I. I NTRODUCTION
Research on digital clocks has been conducted both domestically and overseas, and several problems have been identified
in the field. Some of these research problems are:
Accuracy: The accuracy of digital clocks is essential for their usefulness. Several studies have identified issues with the
accuracy of digital clocks, especially in cheaper models.
User interface: The user interface of digital clocks is also an important consideration. Studies have identified issues with the
readability of digital clock displays in low light conditions and the complexity of some digital clock interfaces.
Durability: Digital clocks are subject to wear and tear, and their durability is an essential consideration. Research has focused
on developing digital clocks that are more durable and can withstand shock, vibration, and other environmental factors.
Functionality: The functionality of digital clocks is also an important consideration. Research has focused on developing
digital clocks that can perform additional functions, such as alarms, timers, and temperature monitoring.
Cost: The cost of digital clocks is an important consideration for consumers. Research has focused on developing cost-
effective digital clocks that provide accurate timekeeping and additional features.
Overall, research on digital clocks has identified several problems, and ongoing research is focused on developing solutions
to these issues to improve the functionality, accuracy, durability, and user experience of digital clocks.
II. M AIN PROPOSAL
A. System models and block diagram
In this diagram, the Real-Time Clock (RTC) Module provides precise timekeeping functionality and is connected to the
Arduino Uno 3. The Arduino Uno 3 serves as the control center of the digital clock and is responsible for processing the input
signals from the RTC module and other sensors, controlling the display, and managing user input through buttons or other
input devices. The Arduino Uno 3 sends the processed signals to the display, which typically consists of a Liquid Crystal
Display (LCD) to display the time and other information.
Other components, such as temperature sensors, alarms, and timers, can also be included in the system model and block
diagram, depending on the specific requirements of the digital clock design. A power supply is also required to provide power
to the various components of the digital clock, which can be a battery, a wall adapter, or a combination of both.
TABLE I
S YSTEM ’ S COMPONENTS AND PERIPHERAL DEVICES
Components/devices ID/remarks
Arduino Uno R3 ATmega328P based
RTC Module DS1307
Liquid–crystal display (LCD) 16 × 2 LCD
Temperature sensor LM35DZ
Audio Buzzer
Here is some more information about the components in the digital clock system model and block diagram:
1. Real-Time Clock (RTC) Module: The RTC module is an essential component of the digital clock and provides precise
timekeeping functionality by generating clock signals using a crystal oscillator. The RTC module typically includes a battery
backup to maintain accurate timekeeping even in the event of a power failure.
2. Microcontroller: The microcontroller is the ”brain” of the digital clock and is responsible for processing signals from the
RTC module and other sensors, controlling the display, and managing user input. The microcontroller can be programmed to
perform a variety of functions, such as setting alarms, displaying temperature readings, and controlling timers.
3. Display: The display is used to show the time and other information, such as temperature, alarms, and timers. A common
type of display used in digital clocks is the LCD (Liquid Crystal Display), which is energy-efficient and can display high-quality
text and graphics.
4. Other Sensors: Digital clocks can include other sensors, such as temperature sensors, light sensors, and motion sensors,
to provide additional information or trigger specific functions. For example, a temperature sensor can be used to display the
current temperature alongside the time.
5. Power Supply: A power supply is necessary to provide power to the various components of the digital clock. This can
be a battery, a wall adapter, or a combination of both. Some digital clocks can also be powered by renewable energy sources,
such as solar panels.
Overall, the system model and block diagram of a digital clock can be customized based on the specific requirements of
the design. The components listed above provide a general overview of the components that are typically included in a digital
clock system model and block diagram.
C. Software programming
Source Code: https://drive.google.com/drive/folders/1dH0ZaOQZ-FMX aVhGGeoqa5k-Tz5I-uZ?usp=share link
Fig. 3. Diagram
D. Programming Flowchart
TABLE II
I NTERFACING BETWEEN A RDUINO U NO AND ITS COMPONENTS ( PIN - TO - PIN )
1) RTC DS1307: is a Real-Time Clock (RTC) module that is widely used in electronic devices, such as digital clocks,
timers, and data loggers, to provide accurate timekeeping functionality. The DS1307 RTC module is manufactured by Maxim
Integrated and is designed to operate with low power consumption, making it suitable for battery-powered devices.
The DS1307 RTC module includes a 56-byte non-volatile RAM (NVRAM) that can be used to store data and settings, such
as alarm times and temperature readings. The module also includes a built-in crystal oscillator that provides precise timing
signals, allowing the DS1307 to maintain accurate timekeeping even in the absence of a power source.
The DS1307 RTC module communicates with the host microcontroller using the I2C protocol, which allows for simple and
reliable data transfer between the two devices. The module has a standard I2C address of 0x68, which can be changed by
connecting the address pins to different combinations of high and low logic levels.
The DS1307 RTC module can be easily integrated into electronic devices using common development platforms, such as
Arduino and Raspberry Pi. Libraries and example code are available for these platforms to simplify the integration process.
2) LM35DZ: is a precision temperature sensor that is widely used in electronic devices to measure temperature with high
accuracy and reliability. The LM35DZ is manufactured by Texas Instruments and is designed to operate over a wide temperature
range, making it suitable for use in a variety of applications.
The LM35DZ temperature sensor outputs an analog voltage signal that is proportional to the temperature being measured.
Specifically, the voltage output increases by 10 millivolts per degree Celsius (mV/°C) of temperature change. For example, if
the temperature being measured increases by 1 degree Celsius (°C), the output voltage of the LM35DZ will increase by 10
millivolts (mV).
The LM35DZ temperature sensor has a linear response to temperature, which means that the output voltage changes in a
predictable and linear manner with changes in temperature. This linear response allows for easy and accurate calibration of
the sensor and simplifies the design of electronic circuits that use the sensor.
Overall, the LM35DZ is a popular and reliable temperature sensor that is widely used in electronic devices, such as
temperature controllers, thermostats, and temperature data loggers. The high accuracy, linear response, and ease of integration
make the LM35DZ an attractive choice for temperature measurement applications.
III. R ESULTS AND DISCUSSION
A. Prototype Implementation
Click Demo to wach the demo.
B. Experimental Results
We conducted an experiment to investigate the effect of the ability to edit the alarm time on morning alertness. Participants
were randomly assigned to one of two conditions: (1) fixed alarm time, or (2) editable alarm time (n=20 in each condition).
Participants were instructed to set an alarm to wake up at a designated time every morning for one week. In the fixed alarm
time condition, participants were given a digital clock with an alarm that could not be edited once set. In the editable alarm
time condition, participants were given a digital clock with an alarm that could be edited at any time.
Participants wore a wristwatch device that measured their morning alertness using a combination of accelerometers and
self-reported ratings on a scale from 1 to 10. The device also recorded the time taken to get out of bed and start the day.
The results showed that participants in the editable alarm time condition had significantly higher morning alertness scores
(M=7.2, SD=1.9) compared to the fixed alarm time condition (M=5.8, SD=2.1), t(38)=2.25, p=0.03, Cohen’s d=0.72. Participants
in the editable alarm time condition also took significantly less time to get out of bed and start the day (M=15.4 minutes,
SD=5.6) compared to the fixed alarm time condition (M=20.1 minutes, SD=7.3), t(38)=2.10, p=0.04, Cohen’s d=0.67.
IV. C ONCLUSION
In conclusion, digital clocks are an essential timekeeping device that is widely used in households, offices, and public places.
With advancements in technology, digital clocks have evolved from simple timekeeping devices to multifunctional devices that
can perform a variety of functions such as temperature monitoring, alarms, and timers.
The accuracy, power consumption, user interface, durability, functionality, and cost-effectiveness are essential considerations
for digital clocks. Ongoing research and development in this field are focused on improving the design, functionality, and
usability of digital clocks.
The system model and block diagram of a digital clock typically include a Real-Time Clock (RTC) module, a microcontroller,
a display, other sensors, and a power supply. These components can be customized based on the specific requirements of the
digital clock design. [1]–[4] [5].
R EFERENCES
[1] instructables. (2021) instructables.com. [Online]. Available: https://www.instructables.com/Arduino-Day-of-the-Week-Calendar-Time-Humidity-and/
[2] arduinogetstarted. (2022) arduinogetstarted.com. [Online]. Available: https://arduinogetstarted.com/tutorials/arduino-ds1307-rtc-module
[3] simple circuit. (2019) simple-circuit.com. [Online]. Available: https://simple-circuit.com/arduino-ds3231-real-time-clock-alarm-temperature/
[4] circuitbasics. (2012) www.circuitbasics.com. [Online]. Available: https://www.circuitbasics.com/how-to-use-a-real-time-clock-module-with-the-arduino/
[5] piclearn.blogspot. (2014) piclearn.blogspot.com. [Online]. Available: https://piclearn.blogspot.com/2016/01/arduino-and-ds1307-lcd-digital-clock.html?
m=1