Digital Clock With Temperature and Humidity Monitoring System !

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

GOVERNMENT COLLEGE OF ENGINEERINE , AMRAVATI

(An Autonomous Institute of Govt of Maharashtra)


DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION

A Project Report on

Digital Clock with Temperature And Humidity


Monitoring System…!

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

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 1


DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI


(An Autonomous Institute of Govt of Maharashtra)

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 :

RAGHUNANDAN CHARKHA - 20104010


In partial fulfillment for the award B.tech in Electronics and Telecommunication Engineering
from GOVERNMENT COLLAGE OF ENGINEERING , AMRAVATI during the
academic

year 2021-2022.

Signature of project guide Signature of seminar coordinator

Mrs. R.R. Harne Mrs.S.J.Meshram

Signature of HOD Signature of Principal

Dr.P.R. Deshmukh Dr. A.M. Mahalle

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 2


ACKNOWLEDGEMENT
We thank the almighty for giving us the courage and perseverance in completing
the main-project. This project itself is acknowledgements for all those people who
have given us their heartfelt co-operation in making this project a grand success.
We extend our sincere thanks to Dr.A.M. Mahalle principle of our college, for
providing sufficient infrastructure and good environment in the college to complete
our course . We would like to thank Head of the E.C.E. Department
Dr.P.R. Deshmukh for his constant encouragement.

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.

My Special thanks to our class teacher Prof. S.J.Meshram Assistant Professor,


E&TC department , for his support and valuable suggestions regarding project
work.

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 3


INDEX
Chapter 1 : Introduction
1.1 Objective
1.2 Problem statement

Chapter 2: Methodology
2.1 Working
2.2 Block diagram
2.3 Circuit Diagram

Chapter 3: Process & Requirement


3.1 Software Requirements
3.1.1 Arduino Compiler
3.1.2 circuito.io
3.1.3 Project Code
3.2 Component List
3.2.1 Arduino nano
3.2.2 lcd 16x2
3.2.3 i2c module
3.2.4 Ds3231 RTC
3.2.5 DHT22
3.2.6POWER Supply
Chapter 4: Advantages & Future Scope
4.1 Advantages
4.2 Future Scope
4.3 Application

Chapter 5: Conclusion & Reference


5.1 Conclusion
5.2 References

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 4


ABSTRACT
In this project, we designed an Arduino based Real Time Clock with alarm. A Real
Time Clock or RTC is a battery powered clock that measures time even when there is no
external power or the microcontroller is reprogrammed. An RTC displays clock and
calendar with all timekeeping functions. The battery, which is connected to the RTC is a
separate one and is not related or connected to the main power supply.

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 5


1. INTRODUCTION

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

1.2 PROBLEM STATEMENT :

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 6


2. METHODOLOGY

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:

i. To construct a clock using microcontroller.

ii. To display date and time using lcd display.

iii. To alert the public of the current time.

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.

2.2 BLOCK DIAGRAM:

RTC MODULE BUZZER


DS3231 MODULE
Arduino
Nano

TEMP. & HUM. POWER SUPPLY

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).

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 7


i. Power Supply: This block can be called the power house of the whole system
which supplies each block with the required voltage for effective output of the system.

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.

2.3 Circuit connections:

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 8


3. PROCESS AND REQUIREMENTS

3.1 SOFTWARE REQUIREMENTS:

3.1.1 Arduino Compiler:

The Arduino IDE is a cross-platform application written in Java, and is derived


from the IDE for the Processing programming language and the Wiring project. It is
designed to introduce programming to artists and other newcomers unfamiliar with
software development. It includes a code editor with features such as syntax highlighting,
brace matching, and automatic indentation, and is also capable of compiling and
uploading programs to the board with a single click. There is typically no need to edit
make files or run programs on a command-line interface. Although building on command-
line is possible if required with some third-party tools such a Ino.

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++.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 9


3.1.2 CIRCUITO.IO

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 10


It does not end there though, and it only gets better with circuito.io. After building with
the aid of the diagram, one can move on to the CODE module; this is a part of the platform
that gives examples on how to program every piece used in the previous steps. The
platform will solve the problem of hundreds of Arduino users, and it will be a lot easier
to program your circuit after going through sample sketches for various pieces. It even
acts as a tutorial method for beginners. So if you are stuck on what Arduino project to
work on, circuito.io might just be the app for you.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 11


3.1.3 PROJECT CODE :

#include <DS3231.h>

#include <LiquidCrystal_I2C.h>

#include <DHT.h>

#define DHTPIN 7

#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);

DS3231 rtc(SDA, SCL);

LiquidCrystal_I2C lcd(0x27, 16, 2);

float h; //Stores humidity value

float t; //Stores temperature value

void setup() {

Serial.begin(9600);

rtc.begin(); //Initializing RTC Modul//Initializing LCD

dht.begin();

lcd.init ();

lcd.backlight();

// Uncomment to set the date and time

//rtc.setDOW(FRIDAY); // Set Day-of-Week to SUNDAY

//rtc.setTime(02, 50, 45); // Set the time to 24 HR (HH:MM:SS)

//rtc.setDate(8 , 04, 2022); // Set the date to DD-MM-YY

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 12


void loop()

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());

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 13


Serial.print('\n');

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');

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 14


Serial.print("temp:");

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("%");

// DHT22 sampling rate is 0.5HZ.

delay(2500);

Serial.print('\n');

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 15


3.2 COMPONENT DESCRIPTION :
• ARDIUNO NANO
• 16x2 LCD DISPLAY
• I2C MODULE
• DS3231 RTC MODULE
• DHT22 MODULE
• Wall Adapter Power Supply - 5V DC (1A)

3.2.1ARDIUNO NANO

This microcontroller is based on Atmega168 or Atmega328p. It is fairly similar to


Arduino Uno board but when it comes to pin-configuration and features, this nano board
has replaced Arduino Uno due to small in size. As we know that while designing
an embedded system small size components are preferred. Arduino boards are mainly
used to build electronic projects. embedded systems, robotics, etc. But the nano boards
are mainly introduced for the beginners who are not from the technical background.

What is an Arduino Nano Board?

Arduino Nano is one type of microcontroller board, and it is designed by Arduino.cc. It


can be built with a microcontroller like Atmega328. This microcontroller is also used
in Arduino UNO. It is a small size board and also flexible with a wide variety of
applications. Other Arduino boards mainly include Arduino Mega, Arduino Pro Mini,
Arduino UNO, Arduino YUN, Arduino Lilypad, Arduino Leonardo, and Arduino Due.
And other development boards are AVR Development Board, PIC Development
Board, Raspberry Pi, Intel Edison, MSP430 Launchpad, and ESP32 board.
This board has many functions and features like an Arduino Duemilanove board.
However, this Nano board is different in packaging. It doesn’t have any DC jack so that
the power supply can be given using a small USB port otherwise straightly connected to
the pins like VCC & GND. This board can be supplied with 6 to 20volts using a mini
USB port on the board.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 16


Arduino Nano Features

The features of an Arduino nano mainly include the following.

• ATmega328P Microcontroller is from 8-bit AVR family


• Operating voltage is 5V
• Input voltage (Vin) is 7V to 12V
• Input/Output Pins are 22
• Analog i/p pins are 6 from A0 to A5
• Digital pins are 14
• Power consumption is 19 mA
• I/O pins DC Current is 40 mA
• Flash memory is 32 KB
• SRAM is 2 KB
• EEPROM is 1 KB
• CLK speed is 16 MHz
• Weight-7g
• Size of the printed circuit board is 18 X 45mm
• Supports three communications like SPI, IIC, & USART

Arduino nano pin configuration is shown below and each pin functionality is discussed
below.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 17


Arduino-nano-pinout
Power Pin (Vin, 3.3V, 5V, GND): These pins are power pins
• Vin is the input voltage of the board, and it is used when an external power
source is used from 7V to 12V.
• 5V is the regulated power supply voltage of the nano board and it is used to give
the supply to the board as well as components.
• 3.3V is the minimum voltage which is generated from the voltage regulator on
the board.
• GND is the ground pin of the board

RST Pin( Reset): This pin is used to reset the microcontroller

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.

Inbuilt LED (13): This pin is used to activate the LED.

IIC (A4, A5): These pins are used for supporting TWI communication.

AREF: This pin is used to give reference voltage to the input voltage

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 18


Difference between Arduino UNO and Arduino Nano

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.

Arduino Nano Communication

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 19


Arduino Nano Programming

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.

Applications of Arduino Nano

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.

• Samples of electronic systems & products


• Automation
• Several DIY projects
• Control Systems
• Embedded Systems
• Robotics
• Instrumentation

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 20


3.2.2LIQUID CRYSTAL DISPLAY (16 X 2 ):

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

Fig: LCD Display

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).

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 21


Figure : Internal Structure of LCD

LCD Basic Commands


All data transferred to LCD through outputs D0-D7 will be interpreted as
commands or as data, which depends on logic state on pin RS:
RS = 1 – Bits D0 - D7 are addresses of characters that should be displayed. Built in
processor addresses built in “map of characters” and displays corresponding symbols.
Displaying position is determined by DDRAM address. This address is either previously
defined or the address of previously transferred character is automatically incremented.
RS = 0 - Bits D0 - D7 are commands which determine display mode.

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 22


Data Register
The main function of the data register is to store the information which is to be exhibited
on the LCD screen. Here, the ASCII value of the character is the information which is to
be exhibited on the screen of LCD. Whenever we send the information to LCD, it
transmits to the data register, and then the process will be starting there. When register set
=1, then the data register will be selected.

LCD 16×2 Pin Diagram

The 16×2 LCD pinout is shown below.

• 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.

• Pin15 (+ve pin of the LED): This pin is connected to +5V

• Pin 16 (-ve pin of the LED): This pin is connected to GND.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 23


3.2.3 I2C MODULE:

Due to limited pin resources in a microcontroller/microprocessor, controlling an


LCD panel could be tedious. Serial to Parallel adapters such as the I2C serial
interface adapter module with PCF8574 chip makes the work easy with just two
pins. The serial interface adapter can be connected to a 16x2 LCD and provides two
signal output pins (SDA and SCL) which can be used to communicate with an
MCU/MPU.

Features and Specifications of I2C Serial Interface Adapter Module

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)

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 24


Pin Configuration of I2C Serial Interface Adapter Module

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.

Pin Name Pin Type Pin Description

GND Power Ground

VCC Power Voltage Input

SDA I2C Data Serial Data

SCL I2C Clock Serial Clock

A0 Jumper I2C Address Selection 1

A1 Jumper I2C Address Selection 2

A2 Jumper I2C Address Selection 3

Backlight Jumper Control Backlight of panel

Note: The module has an onboard potentiometer to vary the contrast of the display.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 25


Addressing Table of I2C Serial Interface Adapter Module

A0 A1 A2 Address

Open Open Open 0x27

Jumper Open Open 0x26

Open Jumper Open 0x25

Jumper Jumper Open 0x24

Open Open Jumper 0x23

Jumper Open Jumper 0x22

Open Jumper Jumper 0x21

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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 26


Connecting I2C Serial Interface Adapter Module to an MCU/MPU

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.

Alternatives for I2C Serial Interface Adapter Module

PCF8574T, MCP23017

Applications of I2C Serial Interface Adapter Module

Here are some of the applications of the I2C Serial Interface Adapter Module.

1. Serial to parallel data adapter


2. Robots
3. LCD Displays

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 27


3.2.4 DS3231 RTC 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.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 28


▪ Temperature Compensated Crystal Oscillator(TCXO)
The DS3231 is driven by a 32kHz temperature compensated crystal oscillator (TCXO).
It’s highly immune to external temperature changes. So the external temperature cannot
affect the oscillation frequency of this crystal. Temperature Compensated Crystal
Oscillator(TCXO) is packaged inside the RTC chip, making the whole package bulky.

▪ 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.

▪ 24C32 EEPROM chip


RTC module also comes with a 32 bytes Atmel 24C32 EEPROM chip which having
limited read-write cycles. It can be used to save settings or clock/calendar. It uses the
I2C interface for communication and shares the same I2C bus as DS3231.

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).

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 29


3.2.5 DHT22

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.

Vcc Power supply 3.5V to 5.5V

Data Outputs both Temperature and Humidity through serial Data

Ground Connected to the ground of the circuit

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 30


It is small in size and utilizes low power. It has a long transmission distance of about
20m. Normally, we use DHT22 sensor in applications for measuring ambient
temperature and humidity. You can also use DHT11 sensor as it has same function but
DHT22 sensor is more reliable as compared to DHT11 sensor. It is pre-calibrated and it
has internal temperature compensation.

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.

How to use DHT22 Sensor

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

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 31


fractional temperature data +8 bit parity bit. To request the DHT11 module to send these
data the I/O pin has to be momentarily made low and then held high as shown in the
timing diagram below.

The duration of each host signal is explained in the datasheet, with neat steps and
illustrative timing diagrams.

DHT22 Specifications

• Operating Voltage: 3.5V to 5.5V


• Operating current: 0.3mA (measuring) 60uA (standby)
• Output: Serial data
• Temperature Range: -40°C to 80°C
• Humidity Range: 0% to 100%
• Resolution: Temperature and Humidity both are 16-bit
• Accuracy: ±0.5°C and ±1%

Applications

• Measure temperature and humidity


• Local Weather station
• Automatic climate control
• Environment monitoring

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 32


3.2.6Power Supply

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

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 33


4. ADVANTAGES , FUTURE ENHANCEMENT & APPLICATIONS

4.1 ADVANTAGES:
▪ Sophisticated Device.

▪ Monitors environmental conditions.

▪ Alert alarm so useful where time is important factor.

4.2APPLICATIONS:
▪ TIMEING appliances.

▪ In digital circuits .

▪ Useful for public places such as railway station , college .

4.3 FUTURE ENHANCEMENT:

▪ This system used in mobile phones

▪ Same system used for soldier health monitoring system in war zone using heart
beat sensor.

▪ By using navigator we change time zones as per location

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 34


5. CONCLUSION & REFERENCES

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

[3] B.Vijaylashmi, Renuka’s, PoojaChennur, Sharangowda.Patil.SELF “REAL TIME


MONITERING ” International Journal Research in Engineering and Technology
(IJARTET), 2015 May.

[4] Gowri Predeba B, Shyamala. N, Tamilselvi.E, Ramalakshmi.S, Selsiaulvina.


“WEATHER MONITERING USING SENSORS ” International Journal of Advanced
Research Trends in Engineering and Technology (IJARTET), 2016 April.

GOVERNMENT COLLEGE OF ENGINEERING , AMRAVATI Page 35

You might also like