arduino based time and temperature display

21
ECE PROJECT REPORT ARDUINO BASED TIME AND TEMPERATURE DISPLAY SUBMITTED BY -BHOJ KUMAR SINGH

Upload: ajit-kumar-singh

Post on 12-Apr-2017

62 views

Category:

Education


4 download

TRANSCRIPT

Page 1: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

ECE PROJECT REPORT

ARDUINO BASED TIME AND TEMPERATURE DISPLAY

SUBMITTED BY

-BHOJ KUMAR SINGH

-SEC:- E1614

-REG. NO:-11607789

Page 2: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

ACKNOWLEDGEMENT

At the very beginning, I would like to thank all those who have helped me in making this project. Without their support, it would have been impossible for me to make this project. At first, I would like to thank my ECE teacher, Manie Kansal mam . Mam has been a great teacher for me as well as my classmates. Then, I would like to thank the LPU administration for providing all the facilities required by students.

Page 3: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

INDEX

CONTENTS PAGE NO.

1. Introduction 12. Abstract 2

2.1. Working2.2. Application

3. Components3.1. Arduino developed board 33.2. LM-35 The temperature sensor 43.3. RTC ds1307 time sensing device 53.4. LCD 63.5. Misc(wires,potentiometer,breadboard etc) 8

4. Circuit diagram 9 4.1. Interfacing of RTC with Arduino and LCD4.2. Interfacing of LM35 with Arduino and LCD

5. Program code 106. Reference 11

Page 4: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

List Of Figures1. Complete project of arduino based time and temperature display.2. Arduino wth its pin conFiguration3. Pin conFiguration of LM 354. LM 355. RTC ds 1307 Front view 6. RTC ds 1307 Back view7. Pin descrption of RTC8. Pin description of 16*2 LCD9. A 16*2 LCD10. A 10K Potentiometer11. Jump Wires12. Connection in Breadboard13. Interfacing of RTC ds1307 with Arduino and LCD14. Interfacing of LM35 with Arduino and LCD15. Coding of the project

Page 5: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

INTRODUCTION

This Arduino based time and temperature display project, displays time and temperature according to the situation and surrounding. This project consists of Arduino Uno board, LM-35 the temperature sensor,RTC ds 1307 for sensing time and LCD for displaying the measured . The LM 35 measures and displays time in Degree Celsius. RTC can work as a complete package of clock and calendar as it can measure hour, min, sec, day, month, yearand can automatically adjust for month having 30 or 31 days, even for leap year.

Fig 1- Complete project of arduino based time and temperature display

Page 6: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

WORKING OF PROJECT

The main component of this project is the Arduino developed board. It is like heart of circuit of this whole project which control all its operation.

An IC LM 35 is used as an temperature sensor. It is interfaced with the analog pin of Arduino board.

The RTC ds 1307 is used as an time measuring device. It senses current time i.e. hour, min, second and day of the week. It is interfaced with Arduino board using 2 analog pins.

The Arduino has an built in analog to digital convertor which converts these analog signals to digital and displays on the LCD.

APPLICATIONS

This type of assembly can be used to control many temperature based devices like fan, AC’s and DC motors can also be controlled by using this.

Arduino based auto intensity control of street light.  Arduino can be used to make home automation system by interfacing with a Bluetooth

and a smartphone with arduino. Traffic signal based on microcontroller system. Heat sensing devices which ncan be used for safety precautions.

Page 7: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

COMPONENTS

1. Arduino Arduino is an open-source project that created microcontroller-based kits for building

digital devices and interactive objects that can sense and control physical devices. It  is an open source hardware and software project, created with a simple aim in mind, to be as simple as possible.

It is used by artists, hackers, hobbyists, and professionals to easily design, prototype and experiment with electronics.

 An Arduino contains a microchip, which is a very small computer that you can program. You can attach sensors to it so that it can measure conditions (like how much light there is in the room). It can control how other objects react to those conditions (room gets dark. LED turns on).

 Microcontrollers use inputs and outputs like any computer. It provide sets of digital and analog input/output (I/O) pins that can interface to various expansion boards and other circuits. 

 For programming the microcontrollers, the Arduino project provides an integerated development environment (IDE) based on a programming language named Processing which also supports the languages C and C++. 

Fig 2- Arduino wth its pin conFiguration

Page 8: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

2. LM 35 The Temperature Sensor LM35 is a precision IC temperature sensor with its output voltage proportional to the

temperature (in oC). The LM35 does not require any external calibration or trimming to provide typical

accuracies of ±1⁄4˚C at room temperature and ±3⁄4˚C over a full −55 to +150˚C temperature range.

The LM35’s low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy.

As it draws only 60 µA from its supply, it has very low self-heating, less than 0.1˚C in still air.

The LM35 is rated to operate over a −55˚ to +150˚C temperature range. The sensor circuitry is sealed and therefore it is not subjected to oxidation and other

processes. With LM35, temperature can be measured more accurately than with a thermistor.

It has got 3 pins Ground, Output, and Vcc.The Output pin is connected to analog pin of Arduino and Vcc is given 5V.

Fig 3- Pin conFiguration of LM 35

Fig 4-LM 35

Page 9: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

3. RTC ds1307 RTC is an 8 pin device using an I2C interface. The DS1307 is a low-power clock/calendar with 56 bytes of battery backup SRAM. The clock/calendar provides seconds, minutes, hours, day, date, month, and year

information. The end of the month date is automatically adjusted for months with fewer than 31 days,

including corrections for leap year. The clock operates in either the 24-hour or 12- hour format with AM/PM indicator.

The DS1307 has a built-in power-sense circuit that detects power failures and automatically switches to the backup supply.

RTC has different pins but we only need 4 pins SDA, SCL, GND and Vcc for our this project.

SDA & SCL pins of RTC are given to A4 and A5 analog pin of Arduino respectively.

Fig 5- RTC ds 1307( Front ) Fig 6-RTC ds 1307( Back)

Fig 7-Pin descrption of RTC

Page 10: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

4. Liquid Crystal Display LCD (Liquid Crystal Display) screen is an electronic display module and find a wide

range of applications They come in many sizes 8x1 , 8x2 , 10x2 , 16x1 , 16x2 , 16x4 , 20x2 , 20x4 ,24x2 , 30x2

, 32x2 , 40x2 etc . First digit shows number of columns and second digit show number of rows.

In this project we have used a 16*2. This means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

Their programming is also same and they all have same 14 pins (0-13) or 16 pins (0 to 15). ALL LCDs have

i. Eight(8) Data pinsii. VCC (Apply 5v here)

iii. GND (Ground this pin)iv. RS (Register select)v. RW (read - write)

vi. EN (Enable)vii. V0 (Set Lcd contrast)

8-Data pins carries 8-bit data or command from an external unit such as microcontroller.  There are three important pins in LCD RS,RW,EN.

RS(Register select)

There are two registers in every LCD

i. Command registerWhen we send commands to lcd these commands go to Command register and are processed their.. - When RS=0    Command Register is Selected.

ii. Data Register When we send Data to lcd it goes to data register and is processed their. -  When RS=1    Data Register is selected.

RW(Read - Write)    1.  When RW=1  We want to read data from lcd.       2.  When RW=0  We want to write to lcd.

EN(Enable signal)

Page 11: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

1. When you select the register(Command and Data) and set RW(read -  write) now its time to execute the instruction.

2.This requires an extra voltage push to execute the instruction and EN(enable) signal is used for this purpose. Usually we make it en=0 and when we want to exectue the instruction we make it high en=1 for some milli seconds. After this we again make it ground en=0.

Fig 8- Pin description of 16*2 LCD

Fig 9- A 16*2 LCD

5. OTHER COMPONENTS

Page 12: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

Potentiometer A potentiometer, informally a pot, is a three-terminal resistor with a sliding or rotating contact

that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, it acts as a variable

resistor or rheostat. In this project , a10K potentiometer is used. In this project pin connection of pot are done as:-

1. GND—connected to ground from Arduino.2. OUTPUT—connected to 3rd pin of LCD.3. INPUT—input of 5V is given from Arduino.

FIG

Fig 10-A 10K Potentiometer Fig 11- Jump Wires

Breadboard

A breadboard is a construction base for prototyping of electronics.  Breadboard does not require soldering, it is reusable. This makes it easy to use for creating

temporary prototypes and experimenting with circuit design.

Fig 12-Connection in Breadboard

Jump Wires A jump wire is an electrical wire or group of them in a cable with a connector or pin at

each end Individual jump wires are fitted by inserting their "end connectors" into the slots provided in a breadboard, the header connector of a circuit board.

Page 13: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

CIRCUIT AND CONNECTION

Fig 13-Interfacing of RTC ds1307 with Arduino and LCD

Fig 14-Interfacing of LM35 with Arduino and LCD

Page 14: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

PROGRAM

Using this program we can display time and temperature

Fig 15-Coding of the project

Page 15: ARDUINO BASED TIME AND TEMPERATURE DISPLAY

RESULT

In this whole project I have shown how effectively Arduino can be used with different components to create something good. In this project I have interfaced Arduino with LM35 and RTC ds1307 to display time and temperature of the surroundings on a 16*2 LCD.

REFERENCE

First I would thank my ECE teacher Miss Manie Kansal for her proper guidance. https://m.youtube.com/watch?v=NDwSrgfsiYQ http://www.alldatasheet.com/ http://www.engineersgarage.com/ All the Lovely faculty of Lovely Professional University