Digital Clock With Temperature and Humidity Monitoring System !
Digital Clock With Temperature and Humidity Monitoring System !
Digital Clock With Temperature and Humidity Monitoring System !
A Project Report on
Submitted By
RAGHUNANDAN CHARKHA - 20104010
STUDENT OF THIRD YEAR BACHLOR OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING
Under Guidance of
R.R. HARNE
ASSISTANT PROFESSOR OF ELECTRONICS AND TELECOMMUNICATION DEPARTMENT
CERTIFICATE
Certified that seminar work entitled
“ Digital Clock with Temperature And Humidity Monitoring System”
is a bonafide work carried out in the sixth semester by :
year 2021-2022.
We are greatly indebted to project guide Prof. R.R. Harne Assistant Professor,
Electronics and Communication Engineering, for providing valuable guidance at
every stage of this project work. We are profoundly grateful towards the unmatched
services rendered by her.
Our special thanks to all the faculty of Electronics and Communication Engineering
and peers for their valuable advises at every stage of this work. Last but not least,
we would like to express our deep sense of gratitude and earnest thanks giving to
our dear parents for their moral support and heartfelt cooperation in doing the main
Project.
Chapter 2: Methodology
2.1 Working
2.2 Block diagram
2.3 Circuit Diagram
When the power is restored, RTC displays the real time irrespective of the duration for
which the power is off. Such Real Time Clocks are commonly found in computers and
are often referred to as just CMOS . Most microcontrollers and microprocessors have
built in timers for keeping time. But they work only when the microcontroller is
connected to power supply. When the power is turned on, the internal timers reset to 0.
Hence, a separate RTC chip is included in applications like data loggers for example,
which doesn’t reset to 0 when the power is turned off or reset. Real Time Clocks are
often useful in data logging applications, time stamps, alarms, timers, clock builds etc.
In this project, a Real Time Clock, which displays accurate time and date along with an
alarm feature is designed. In this project an attempt is made to develop and explain the
use of Digital alarm clock using Arduino.
1.1 OBJECTIVIES :
Time can be defined as a measurable period which an action, process, or condition exist
or continues (Merriam, 2005). It is the indication of moment of a day through physical
display and sound alert measured in seconds, minutes, hours and days. In the early day’s
time has being one of the most valuable human race companions that even the creation of
man was based on time. It is also seen as the numerical indication of moment using
devices such as sand glass which is been translated into clocks and watches and even in
some the devices we used for communication.
As time goes on, devices for time indicators are being modified for easier identification
even to the level of sound alarm. The implementation of this device will serve as a good
time keeper to the public and also eliminate the stress of your need for multiple
cumbersome devices along when going out.
The world as it stands now can be said to be digitized in every ramification and as such,
this project is aimed at looking for a way in which time will be indicated, by computing
and displaying to the user using Arduino microcontroller. Also, it is of essence to use
sound to alert the public on an daily basis for easy activities scheduling and to avoid letting
go of some programs of the day
Presently, in our schools, offices and work places, people find it difficult to go on
checking their phones or the wall clock, that is, if there is; it is deemed it fit to design and
construct louder digital clock alarm system for everyone to know the time without stress,
people see it as stressful when setting their clock alarm or handsets hourly for their daily
activities. In the early days, manual indicators were used for timing such as sun, moon,
shadows; cockcrow etc. for activities executed both day and night.
2.1 WORKING:
This project is intended for Day Today life , As we know importance of time in every
field The aim of this project is to design and implement the Arduino based digital clock
with alarm. The objectives of this project are:
This circuit simply Shows Real time In 24 hour format and also shows current
environmental temperature and humidity so people can predict weather conditions and
accordingly people carry their safety measures in this way this project useful for common
peoples
One advance feature is alarm circuitry which plays important role in case of athletics,
students and various field where time is crucial factor.
SENSOR DHT22 5V DC
DHT22
The diagram consists of five blocks connected by arrow and pointers cascaded
sequentially according to their operations. The blocks are; power supply, RTC module,
control system, amplifier and a display unit (LCD).
ii. RTC Module: This block holds the digitized information of the clock which is
being fed into the control system and also receives command signal from the control
system on what to do and when to act.
iii. Amplifier: This block receives audio signal from the control system and magnifies
it to the desired sound and sending the amplified signal to 40watts speaker as an output.
iv. Display: This block can be called the visual display unit (VDU) of the system which
displays the time and received from the control system. It can also be served as a platform
for date and time pre-setting.
The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of
the same name), which makes many common input/output operations much easier.
Arduino programs are written in C/C++.
Arduino is an open source hardware and software company that creates Single Board
Controllers (SBC) and Microcontroller kits, and these kits come in a Do-It-Yourself
(DIY) form. Arduino can be used by almost anyone because it is inexpensive and also
easy for professionals and even amateurs to use. Despite the fact that Arduino kits come
in a pre-assembled manner, one can get stuck trying to think of ideas for a project or
experiment. Situations, where ideas are not forthcoming, are not unusual as it is a brain
freeze caused by tension. Arduino has provided open source hardware and software
however without ideas to work on; the kits become useless. Most times, there could be a
knowledge of what components to use but how to fix them together might be a problem.
This is where circuito.io comes in, imagine having a platform that affords one the
opportunity to create the coolest projects just by selecting components you want to use.
Circuito.io is an online tool for designing complete electronic circuits. The Circuito app
generates instant and accurate schematics and code for your electronic circuit. You select
the major building blocks, and it computes all the electrical requirements for your
selection. It has a fantastic interface that allows you to drag and drop different parts
together. It also has three different sections that one needs to work on before testing, and
the first is the Bill of Materials (BoM) called DESIGN.
#include <DS3231.h>
#include <LiquidCrystal_I2C.h>
#include <DHT.h>
#define DHTPIN 7
void setup() {
Serial.begin(9600);
dht.begin();
lcd.init ();
lcd.backlight();
h = dht.readHumidity();
t = dht.readTemperature();
lcd.print("Welcome To ENTC!");
Serial.print("Welcome To ENTC!");
Serial.print('\n');
lcd.setCursor(0, 1);
lcd.print("MINOR PROJECT");
Serial.print("MINOR PROJECT");
Serial.print('\n');
delay(3000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("PRESENTED BY:");
lcd.setCursor(0, 1);
lcd.print("RAGHU CHARKHA");
delay(3000);
lcd.clear();
//Print time
lcd.setCursor(0, 0);
lcd.print(rtc.getTimeStr());
Serial.print("Time:");
Serial.print(rtc.getTimeStr());
lcd.print(rtc.getDOWStr());
Serial.print(" ");
Serial.print(rtc.getDOWStr());
//Print Date
lcd.setCursor(0, 1);
Serial.print(" ");
lcd.print("Date: ");
lcd.print(rtc.getDateStr());
Serial.print('\n');
Serial.print("Date: ");
Serial.print(rtc.getDateStr());
delay(1000);
//Print Temprature
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("temp:");
lcd.print(t);
lcd.print("*C");
Serial.print('\n');
Serial.print(t);
Serial.print("°C");
//Print Humdity
lcd.setCursor(0, 1);
lcd.print("humidity:");
lcd.print(h);
lcd.print(" %");
Serial.print('\n');
Serial.print("humidity:");
Serial.print(h);
Serial.print("%");
delay(2500);
Serial.print('\n');
3.2.1ARDIUNO NANO
Arduino nano pin configuration is shown below and each pin functionality is discussed
below.
Analog Pins (A0-A7): These pins are used to calculate the analogue voltage of the
board within the range of 0V to 5V
I/O Pins (Digital Pins from D0 – D13): These pins are used as an i/p otherwise o/p
pins. 0V & 5V
Serial Pins (Tx, Rx): These pins are used to transmit & receive TTL serial data.
External Interrupts (2, 3): These pins are used to activate an interrupt.
PWM (3, 5, 6, 9, 11): These pins are used to provide 8-bit of PWM output.
SPI (10, 11, 12, & 13): These pins are used for supporting SPI communication.
IIC (A4, A5): These pins are used for supporting TWI communication.
AREF: This pin is used to give reference voltage to the input voltage
The Arduino Nano board is similar to an Arduino UNO board including similar
microcontroller like Atmega328p. Thus they can share a similar program. The main
difference between these two is the size. Because Arduino Uno size is double to nano
board. So Uno boards use more space on the system. The programming of UNO can be
done with a USB cable whereas Nano uses the mini USB cable. The main differences
between these two are listed in the following table.
The communication of an Arduino Nano board can be done using different sources like
using an additional Arduino board, a computer, otherwise using microcontrollers. The
microcontroller using in Nano board (ATmega328) offers serial communication (UART
TTL). This can be accessible at digital pins like TX, and RX. The Arduino software
comprises of a serial monitor to allow easy textual information to transmit and receive
from the board.
The TX & RX LEDs on the Nano board will blink whenever information is being sent out
through the FTDI & USB link in the direction of the computer. The library-like
SoftwareSerial allows serial communication on any of the digital pins on the board. The
microcontroller also supports SPI & I2C (TWI) communication.
The programming of an Arduino nano can be done using the Arduino software. Click the
Tools option and select the nano board. Microcontroller ATmega328 over the Nano board
comes with pre-programmed with a boot loader. This boot loader lets to upload new code
without using an exterior hardware programmer. The communication of this can be done
with the STK500 protocol. Here the boot loader can also be avoided & the microcontroller
program can be done using the header of in-circuit serial programming or ICSP with an
Arduino ISP.
These boards are used to build Arduino Nano projects by reading inputs of a sensor, a
button, or a finger and gives an output by turning motor or LED ON, or and some of the
applications are listed below.
Thus, this is all about an overview of Arduino nano datasheet. From the above information
finally, we can conclude that for the beginners who are new to electronics, this Nano board
is extremely suggested to go for this board due to its features like low cost and very simple
to use in different applications. This board can simply connect to any computer throughout
its mini USB port.
Nowadays, we always use the devices which are made up of LCDs such as CD players,
DVD players, digital watches, computers, etc. These are commonly used in the screen
industries to replace the utilization of CRTs. Cathode Ray Tubes use huge power when
compared with LCDs, and CRTs heavier as well as bigger. These devices are thinner as
well power consumption is extremely less. The LCD 16×2 working principle is, it
blocks the light rather than dissipate. This article discusses an overview of LCD 16X2,
pin configuration and its working
LCD screen consists of two lines with 16 characters each. Each character consists
of 5x7 dot matrix. Contrast on display depends on the power supply voltage and whether
messages are displayed in one or two lines. For that reason, variable voltage 0-Vdd is
applied on pin marked as Vee. Trimmer potentiometer is usually used for that purpose.
Some versions of displays have built in backlight (blue or green diodes). When used
during operating, a resistor for current limitation should be used (like with any LE
diode).
Registers of LCD
A 16×2 LCD has two registers like data register and command register. The RS (register
select) is mainly used to change from one register to another. When the register set is ‘0’,
then it is known as command register. Similarly, when the register set is ‘1’, then it is
known as data register.
Command Register
The main function of the command register is to store the instructions of command which
are given to the display. So that predefined tasks can be performed such as clearing the
display, initializing, set the cursor place, and display control. Here commands processing
can occur within the register.
• Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the
GND terminal of the microcontroller unit or power source.
• Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to
connect the supply pin of the power source.
• Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display,
used to connect a changeable POT that can supply 0 to 5V.
• Pin4 (Register Select/Control Pin): This pin toggles among command or data
register, used to connect a microcontroller unit pin and obtains either 0 or 1(0 =
data mode, and 1 = command mode).
• Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or
writes operation, and it is connected to a microcontroller unit pin to get either 0
or 1 (0 = Write Operation, and 1 = Read Operation).
• Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write
process, and it is connected to the microcontroller unit & constantly held high.
• Pins 7-14 (Data Pins): These pins are used to send data to the display. These
pins are connected in two-wire modes like 4-wire mode and 8-wire mode. In 4-
wire mode, only four pins are connected to the microcontroller unit like 0 to 3,
whereas in 8-wire mode, 8-pins are connected to microcontroller unit like 0 to
7.
This section mentions some of the features and specifications of the I2C Serial
Interface Adapter Module.
1. Operating Voltage: 5V DC
2. I2C control using PCF8574
3. Can have 8 modules on a single I2C bus
4. I2C Address: 0X20~0X27 (the original address is 0X20, you can change it
yourself via the onboard jumper pins)
The module has multiple pins onboard for communication with the MCU/MPU via
the I2C protocol. The table below shows the pin name, type, and their functions.
Note: The module has an onboard potentiometer to vary the contrast of the display.
A0 A1 A2 Address
Up to 8 devices can be connected on a single I2C bus. The address of each can be changed
using the solder points provided on the board(A0, A1, A2). The table below shows how
the address is set using the points A0, A1, A2.
The I2C serial adapter can be connected to 16x2 or 20x4 LCD displays via breakout pins.
Once it fits perfectly onto the LCD, we can connect the module to any MCU/MPU using
I2C protocol pins.
The power points VCC and GND can be connected to the 5V and the ground terminal of
the MCU/MPU, respectively. Also, connect the SDA, SCL pins of the module to the
MCU/MPU I2C pins respectively to send the data.
PCF8574T, MCP23017
Here are some of the applications of the I2C Serial Interface Adapter Module.
The DS3231 RTC module is a time tracking device that gives the current time and date.
The word RTC is meant Real Time Clock. The RTC module made of clock chip
DS3231. This module is generally used in computers, laptops, mobiles, embedded
system applications devices, etc. to provide time and date. RTC module works on the
I2C protocol. The module provides details such as second, minute, hour, day of the
week, day of the month, month, and year including correction for leap year. One more
interesting thing It can operate either in 12 Hour or in 24 Hour format. It’s can be used
in projects like containing data-logging, clock-building, time stamping, timers, and
alarms.
▪ Battery Holder
The bottom side of the module has a battery holder for a 20mm 3V lithium coin cell.
Any CR2032 battery can fit in the battery holder. The DS3231 incorporates a battery
input and maintains accurate timekeeping when the main power to the device is
interrupted. The built-in power-sense circuit continuously monitors the status of the
input (VCC) power supply to detect power failures and automatically switches to the
backup supply. So, it can continue to maintain the time and date while device power is
incorrect.
▪ Temperature Sensor
Also a temperature sensor inside the IC package.
Which compensates the frequency changes by adding or removing clock ticks so that the
timekeeping stays on track. That’s the reason Temperature Compensated Crystal
Oscillator provides a stable and accurate reference clock and maintains the RTC to
within ±2 minutes per year accuracy.
We can be changed easily the EEPROM I2C address using the three A0, A1, and A2
solder jumpers. Each one of these is used to hardcode in the address and we can set the
address by shorting the jumper in the proper way. According to the 24C32 EEPROM
chip’s datasheet, these 3 bits are placed at the end of the 7-bit I2C address, just before
the Read/Write bit. These 3 address inputs can take 2 states, either HIGH/LOW. So, we
can create 8 (23) different combinations(addresses).
The DHT-22 is a sensor which measures relative humidity and temperature sensor and
provides a calibrated digital output. It is an inexpensive sensor that is almost similar to
the DHT11 but measures temperature and humidity with higher accuracy and wider
range. You don’t need extra components for operation. It is pre-calibrated, and you can
directly connect it to obtain the output. The DHT22 sensor is composed of a humidity
sensing sensor and a thermistor. These two components measure the humidity and
temperature and send out a digital signal on the data pin.
This figure shows the pinout diagram of DHT22 humidity and temperature sensor. It
consists of three pins.
These sensors are well suited for use in all kinds of harsh applications and you can
interface this device with microcontrollers easily. If you need a sensor for measuring
temperature in a range of -40°C to +125°C or you need to measure humidity, then this
sensor would be ideal for use in such an application.
The DHT22 Sensor is factory calibrated and outputs serial data and hence it is highly
easy to set it up. The connection diagram for this sensor is shown below.
As you can see the data pin is connected to an I/O pin of the MCU and a 5K pull
up resistor is used. This data pin outputs the value of both temperature and humidity as
serial data. If you are trying to interface DHT22 with ARDIUNO NANO then there are
ready made libraries for it which will give you a quick start.
If you are trying to interface it with some other MCU then the datasheet given below will
come in handy. The output given out by the data pin will be in the order of 8bit humidity
integer data + 8bit the Humidity decimal data +8 bit temperature integer data + 8bit
The duration of each host signal is explained in the datasheet, with neat steps and
illustrative timing diagrams.
DHT22 Specifications
Applications
Power supply circuit, the name itself indicates that this circuit is used to supply the
power to other electrical and electronic circuits or devices. There are different types
of power supply circuits based on the power they are used to provide for devices.
For example, the micro-controller based circuits, usually the 5V DC regulated power
supply circuits, are used, which can be designed using different techniques for
converting the available 230V AC power to 5V DC power. Generally the converters
with output voltage less than the input voltage are called as step-down converters.
In this project we have power supplies with +5V & -5V option normally +5V is
enough for total circuit. Another (-5V) supply is used in case of OP amp circuit
.Transformer primary side has 230/50HZ AC voltage whereas at the secondary winding
the voltage is step downed to 12/50hz and this voltage is rectified using two full wave
rectifiers .the rectified output is given to a filter circuit to filter the unwanted ac in the
signal After that the output is again applied to a regulator LM7805(to provide
+5v)regulator. Whereas LM7905 is for providing –5V regulation
4.1 ADVANTAGES:
▪ Sophisticated Device.
4.2APPLICATIONS:
▪ TIMEING appliances.
▪ In digital circuits .
▪ Same system used for soldier health monitoring system in war zone using heart
beat sensor.
5.1: CONCLUSION: Our effort behind this project is to design and fabricate a gadget
which is so compact in itself that provide real time with alarm alert and also provide weather
condition at public places
5.2: REFERENCES:
[1] Premkumar.P, Cibi Chakkaravarthi.R, Keerthana. M, Ravivarma. R, Sharmila. “NEED
OF CLOCK ” International Journal of Science Technology & Management, 2015 March.
[2] Nishant Bhardwaj and Nitish Aggarwal Design and Development of “Suraksha”-A
ELCTRONICS AND TIME RELATION AND ITS IMPORTANCE International Journal of
Information & Computation Technology, ISSN 0974-2239 Volume 4, Number 8 (2014), pp.
787-792