Monitoring Temperature using LM35 and Arduino UNO

Similar documents
02 Digital Input and Output

ARDUINO / GENUINO. start as professional

Workshops Elisava Introduction to programming and electronics (Scratch & Arduino)

LEDs and Sensors Part 2: Analog to Digital

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

THE INPUTS ON THE ARDUINO READ VOLTAGE. ALL INPUTS NEED TO BE THOUGHT OF IN TERMS OF VOLTAGE DIFFERENTIALS.

FABO ACADEMY X ELECTRONIC DESIGN

Embedded Systems & Robotics (Winter Training Program) 6 Weeks/45 Days

Screening Audiometer

DASL 120 Introduction to Microcontrollers

Community College of Allegheny County Unit 4 Page #1. Timers and PWM Motor Control

Pulse Sensor Individual Progress Report

Understanding the Arduino to LabVIEW Interface

Micro Controller Based Ac Power Controller

MOS (PTY) LTD. E PIR Light Controller for DC/AC Applications. General Description. Applications. Features

ME 461 Laboratory #3 Analog-to-Digital Conversion

PWM CONTROL USING ARDUINO. Learn to Control DC Motor Speed and LED Brightness

PCB & Circuit Designing (Summer Training Program) 6 Weeks/ 45 Days PRESENTED BY

Diodes This week, we look at switching diodes, LEDs, and diode rectification. Be sure to bring a flash drive for recording oscilloscope traces.

Electronic Components

ARDUINO-BASED TEMPERATURE MONITOR- ING AND CONTROL VIA CAN BUS MOHAMMAD HUZAIFAH BIN CHE MANAF UNIVERSITI MALAYSIA PAHANG

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

introduction to Digital Electronics Install the Arduino IDE on your laptop if you haven t already!

Robotics & Embedded Systems (Summer Training Program) 4 Weeks/30 Days

ARDUINO / GENUINO. start as professional. short course in a book. faculty of engineering technology

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Community College of Allegheny County Unit 7 Page #1. Analog to Digital

SMART Funded by The National Science Foundation

Design of a Heating Chamber for Sensor Characterization

1 10 V PWM Dimming for CCR Lighting Circuits

GetTutorialized Workshops Brochure-2017

DC Motor and Servo motor Control with ARM and Arduino. Created by:

Low-Cost Power Sources Meet Advanced ADC and VCO Characterization Requirements

ZIO Python API. Tutorial. 1.1, May 2009

Instrument Cluster Display. Grant Scott III Erin Lawler Mike Carlson

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

Industrial Automation Training Academy. Arduino, LabVIEW & PLC Training Programs Duration: 6 Months (180 ~ 240 Hours)

EEL4914 Senior Design. Final Design Report

International Journal of Advance Engineering and Research Development

MAKEVMA502 BASIC DIY KIT WITH ATMEGA2560 FOR ARDUINO USER MANUAL

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

Using Fusion for Closed-Loop Power Supply Margining

Figure 4.1 Vector representation of magnetic field.

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong.

J. La Favre Using Arduino with Raspberry Pi February 7, 2018

EVAL-ADM8843. Evaluation Board for Charge Pump Driver for LCD White LED Backlights. Preliminary Technical Data

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

Prelab: Introduction and Greenhouse Construction

Low Cost Screening Audiometer

Chapter 7. Introduction. Analog Signal and Discrete Time Series. Sampling, Digital Devices, and Data Acquisition

Training Schedule. Robotic System Design using Arduino Platform

Multiple Instrument Station Module

Internet of Things (Winter Training Program) 6 Weeks/45 Days

Pulse Width Modulation and

3.5 hour Drawing Machines Workshop

SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE

EVDP610 IXDP610 Digital PWM Controller IC Evaluation Board

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

Gravity: 12-Bit I2C DAC Module SKU: DFR0552

Application Note AN 102: Arduino I2C Interface to K 30 Sensor

AVL-10000T AUDIO VIDEO LINK TRANSMITTER TECHNICAL MANUAL

LRC Circuit PHYS 296 Your name Lab section

Generating DTMF Tones Using Z8 Encore! MCU

Application Note 160 Using the DS1808 in Audio Applications

Computer Controlled Curve Tracer

MiniProg Users Guide and Example Projects

PAiA 4780 Twelve Stage Analog Sequencer Design Analysis Originally published 1974

More Fun with A/D Converters

Aztec Micro-grid Power System

TS100. RTD - PT100 - Temperature Sensor. March, 2017

transformer rectifiers

EMG Sensor Shirt. Senior Project Written Hardware Description April 28, 2015 ETEC 474. By: Dylan Kleist Joshua Goertz

Hashemite University Faculty of Engineering Mechatronics Engineering Department. Microprocessors and Microcontrollers Laboratory

Arduino based pulse width modulated output voltage control of a dc-dc boost converter using Proportional, Integral and Derivative control strategy

Lesson 3: Arduino. Goals

GF of 9 THE GADGET FREAK FILES CASE #165. Analog Clock Measures Time in Meters

ECE3204 D2015 Lab 1. See suggested breadboard configuration on following page!

Study of M.A.R.S. (Multifunctional Aero-drone for Remote Surveillance)

CSCI1600 Lab 4: Sound

Exercise 5: PWM and Control Theory

Sampling and Reconstruction

Design and Implementation of Digital Stethoscope using TFT Module and Matlab Visualisation Tool

Building a Microcontroller based potentiostat: A Inexpensive and. versatile platform for teaching electrochemistry and instrumentation.

LAB 8: Activity P52: LRC Circuit

A Closed-Loop System to Monitor and Reduce Parkinson s Tremors

Chapter 5: Analog Input

Pulse Generation. Pulsout. 555 Timer. Software version of pulse generation Pulsout pin, Period

Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor

ROTRONIC HygroClip Digital Input / Output

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

The University of Texas at Arlington Lecture 10 ADC and DAC

PART 1: DESCRIPTION OF THE DIGITAL CONTROL SYSTEM

PHYSIOLOGICAL SIGNALS AND VEHICLE PARAMETERS MONITORING SYSTEM FOR EMERGENCY PATIENT TRANSPORTATION

Direct Digital Synthesis System

Experiment No. 9 DESIGN AND CHARACTERISTICS OF COMMON BASE AND COMMON COLLECTOR AMPLIFIERS

Module: Arduino as Signal Generator

School of Engineering Mechatronics Engineering Department. Experim. ment no. 1

Portable Multi-Channel Recorder Model DAS240-BAT

Rodni What will yours be?

Transcription:

Sharif University of Technology Microprocessor Arduino UNO Project Monitoring Temperature using LM35 and Arduino UNO Authors: Sadegh Saberian 92106226 Armin Vakil 92110419 Ainaz Hajimoradlou 92106142 Supervisor: Dr. Mehdi Modarressi Sara Mahdizade 92106261 July 11, 2016

1 Abstract In order to monitor temperature, we need three components: a temperature sensor, a microcontroller board and an interface for interactive communication. The temperature sensor will provide us with an analog voltage signal, which contains the temperature data. But this signal needs to be converted to a digital value, so that it can be understood by the board and microprocessor. Thus there should be an analog to digital conversion. Afterward the digital signal can be used to determine the temperature and be shown and monitored on the interface. Figure 1: circuit This procedure can be divided in three parts: circuit building, programming the board, programming the interactive graphical user interface (GUI). We will explore each part extensively. 1

2 Circuit Building We can connect the board, LCD and the temperature sensor using the design below. Here we have used LM35 sensor for measuring the temperature. This sensor is calibrated directly in Celsius, has linear +10.0 mv scale factor. This sensor is rated for full C 55 to +150 C range. In this design the output signal of LM35 is connected to pin A0 of Arduino for analog to digital conversion. The board is also connected to a LCD, which is used for showing the time and temperature. The LCD s data pins are connected to D4-D7 of the board. Figure 2: circuit 2

There is a small modification in the implemented circuit than this design which is lack of potentiometer. As we know, the third pin of LCD is for adjusting the contrast. Here, by using the potentiometer, we can adjust the contrast. However we have provided two ways for setting the LCD contrast without using potentiometer. Constant Contrast In this way we have supplied the VO pin with constant approximately 1V, which is obtained using resistor chain. The main drawback of this scheme is that the LCD contrast is no longer adjustable. The resistor chain can be seen in the picture below. Figure 3: circuit Arduino PWM Pulse Width Modulation, or PWM, is a technique for getting analog results with digital means. Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal spends off. The duration of on time is called the pulse width. To get varying analog values, we change, or modulate, that pulse width. If we repeat this on-off pattern fast enough, then we will almost get the desired voltage. 3

Figure 4: PWM Using this PWM technique we can make the LCD contrast adjustable. We set digital pin 9 on board to be OUTPUT and then set the desired voltage, which represent the contrast, to that pin. But this voltage is carried in high frequencies, which can be seen in the LCD s pixels blinking. In order to solve this problem, we can use a Low Pass Filter (LPF) to eliminate the unwanted frequencies. We build this filter using capacitors and resistors. We have used R = 470 Ω and C = 30 µf. Thus the cutoff frequency will be: f C = 1 2πRC 11.29Hz Figure 5: LCD Contrast Now we send the PWM-generated signal to this LPF, and connect the output to the VO of LCD. Now there will be no pixel blinking problem and user can now simply selects the desired contrast from GUI. 4

Figure 6: LCD Contrast Below is a picture of the built circuit. Figure 7: circuit 5

3 Programming the Board We have to convert the sensor analog signal using the ADC module of Arduino. We also have to set up the LCD and serial communication. We have to provide a reference voltage for ADC module in order to work. We can use 5 V or 1.1 V, both provided by Arduino. We use 1.1 V, as it has higher resolution. We also know that the ADC module on Arduino is a 10-bit converter. Thus the ADC output(n) and temperature can be related together with what follows: temperature C = N 1024 1.1V 1000mV 1 V 1 C 10 mv = N 10 1.0742 We read the analog signal from A0, and the digital value for it(reading) is then used to calculating the temperature. N 9.31 Figure 8: ADC and Signal conditioning Afterward the temperature is converted to the user-desired unit, and will be shown on both LCD and PC GUI. The time, in seconds, is also shown on LCD. Arduino sends the calculated temperature (in C) to the serial communication with PC GUI. Arduino also listens the serial port in order to get the unit and brightness adjustments from GUI. Whenever user changes the temperature unit in GUI, Arduino gets two bytes on serial. One U which indicates that the temperature unit must change, and the other byte indicates what unit has been selected( R, K, C, F ). Afterward the temperature shown on LCD will change into selected unit, and the unit symbol on LCD would also be updated. When user changes the LCD contrast on GUI, it sends two bytes to Arduino. First one is B indicating that LCD contrast needs to change, the next byte indicates that which level was selected by user( H, L, M ). Then the value of PWM duty cycle is determined and set, using analogwrite() function, due to the selected level. Figure 9: LCD Constrast selection 6

4 Programming the GUI We need a graphical user interface (GUI), so that user can easily interact with the system. In order to implement such GUI, we have used Python. The designed GUI can be seen below. Figure 10: GUI As we can see, the are radio buttons for selecting temperature unit. There is also radio buttons for selecting the LCD contrast. The user can adjust them by just click on the desired unit or contrast level. User can set the sensor check time, which determines the amount of time between two temperature updates. The measured temperature and time are shown on GUI. There is also a plot of temperature versus time, which is updated every time the new measured temperature is ready. The update ratio for this plot is related to the sensor check time. The value of check time is the amount of time between two plot updates. 7