Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of...

19
Department of Electrical Engineering Sensors & Instrumentation: EEEN4321 Instructor : Dr. Chedly B. Yahya Fall 2018-19 Course Design Project Report Temperature Monitoring and Controlling Using Arduino with LM35 Team: Fawaz aljar ID 201201459 Faisal almubayedh ID 201403528 Abdullah alsalem ID 201101602 Dr. Chedly B. Yahya, PMU EE, 2018

Transcript of Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of...

Page 1: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Department of Electrical Engineering

Sensors & Instrumentation: EEEN4321Instructor: Dr. Chedly B. Yahya

Fall 2018-19

Course Design Project Report

Temperature Monitoring and Controlling Using Arduino with LM35

Team:

Fawaz aljar ID 201201459

Faisal almubayedh ID 201403528

Abdullah alsalem ID 201101602

Abdulaziz alsaleh ID 201700157

Dr. Chedly B. Yahya, PMU EE, 2018

Page 2: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Contents

Chapter Topic SO Assessed1 Introduction: Specifications C12 Design: Alternatives C23 Sensor Characterization and Modeling C34 Design: System Implementation C35 Testing and Calibration C46 Discussion and Conclusion References

Progress C3Demonstration C4

Dr. Chedly B. Yahya, PMU EE, 2018

Page 3: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Chapter 1: Introduction

1. Project Definition

A Project Temperature Monitoring and Controlling Using Arduino with LM35 temperature sensor, which controls cooling system automatically according to the room temperature.

2. Project Specifications (C1)

(i) Battery 12V for the fan(ii) Microcontroller (Arduino)(iii) LM35 sensor(iv) Temperature range from -55C to 150C (v) Accuracy at 25C +/- 0.5C, and at -55 to 150C +/-1C (+/- 0.1 degree, 29.3 …. +/- 1cm ….) (vi) Temperature output Format with degrees C and Farenheit F.

3. Problem Statement

Accurate and compact digital temperature sensor to monitor Environment and weather temperature,

assist people who are disabled and are unable to control the speed of fan it may also be used for monitoring changes in environment.

Assist industries to monitor temperature and the cooling system without human interference that can be crucial for health due to the dangerous of the environment inside the industry

4. Design Objectives

The Main objective of this project is to display the temperature and when it goes beyond certain limit. then control it to bring it back into desired level and reduce waste of energy

assist people who are disabled and are unable to control the speed of fan it may also be used for monitoring changes in environment.

It can also be used in different industries and electronic devices. Another objective is to study and build an automatic system-using microcontroller and its

interfacing with other device.

Dr. Chedly B. Yahya, PMU EE, 2018

Page 4: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Chapter 2: Background and Alternatives

1. Project Background

Desiging a system that sense the tempreture and showing the reading of the temperature in the LCD screen. When the temperature reach 27C and above, the fan start working to cooling down the system. This project idea we can use it in home and design it to decrease the temperature in the room automatically.For our application we used the LM35 which is an analog sensor that converts the surrounding temperature to a proportional analog voltage. The output from the sensor is connected to one of the ADC channel inputs of the PIC16F688 microcontroller to derive the equivalent temperature value in digital format. The computed temperature is displayed in a 16×2 character LCD, in both °C and °F scales. and are rated to operate over a -55 °C to 150°C temperature range. These sensors do not require any external calibration and the output voltage is proportional to the temperature. The scale factor for temperature to voltage conversion is 10 mV per °C. The LM35 series sensors come in different packages. The one I used is in a hermatic TO-46 transistor package where the metal case is connected to the negative pin (Gnd).

Figure1 LM35 connection

2. Design Alternatives (c2)

Another alternative is using a thermoster sensor Thermistors are simple, inexpensive, and accurate components that make it easy to get temperature data for your projects. Remote weather stations, home automation systems, and equipment control and protection circuits are some applications where thermistors would be ideal. They’re analog sensors, so the code is relatively simple compared to digital temperature sensors that require special libraries and lots of code. Thermistors are variable resistors that change their resistance with temperature. They are classified by the way their resistance responds to temperature changes. In Negative Temperature Coefficient (NTC) thermistors, resistance decreases with an increase in temperature. In Positive Temperature Coefficient (PTC) thermistors, resistance increases with an increase in temperature.NTC thermistors are the most common, and that’s the type we’ll be using in this tutorial. NTC thermistors are made from a semiconducting material (such as a metal oxide or ceramic) that’s been heated and compressed to form a temperature sensitive conducting material.

Dr. Chedly B. Yahya, PMU EE, 2018

Page 5: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

The Arduino will measure the voltage at a point between the thermistor and a known resistor. This is known as a voltage divider. The equation for a voltage divider is:

3. Design Architecture (c2)

In this system we used temperature sensor LM35, to use to detect temperature into appropriate voltage. This voltage is given to Arduino. According to program it process the analog signal into digital and forms an particular voltage level for a particular temperature. 16*2 LCD is used to display the output i.e. surrounding temperature of LM35 in both degree centigrade and Fahrenheit units.

At the same time, it also sends the data to Relay. If the temperature becomes maximum from set point relay becomes activate and it switches on the cooling device in this manner it monitors and controls the temperature.

Figure 2 As shows in the block diagram we used Arduino UNO as a microcontroller and LM35 as a temperature sensor and for the display we used LCD screen.

Dr. Chedly B. Yahya, PMU EE, 2018

Page 6: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

The next figure is:

Figure 3 the circuit that we used for our project

Dr. Chedly B. Yahya, PMU EE, 2018

Page 7: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Chapter 3: Sensor Characterization and Modeling

1. Sensor Characterization

Table 1. LM35 Sensor characterization data

2. Sensor Modeling

15 20 25 30 35 40 450

0.050.1

0.150.2

0.250.3

0.350.4

0.450.5

f(x) = 0.0109592207792208 x − 0.0274766233766234R² = 0.993821749920289

LM35 sensor Curve Modeling

Temprature (C)

Vout

(V)

Figure 4 LM35 sensor Curve Modeling

Dr. Chedly B. Yahya, PMU EE, 2018

Temperature(C)

Vout(V)

20 0.19521 0.20322 0.21523 0.22724 0.23925 0.24826 0.25327 0.26328 0.27729 0.29130 0.29931 0.31232 0.323333 0.33534 0.34635 0.35236 0.36637 0.37438 0.38839 0.39140 0.43

Page 8: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Chapter 4: System Design

1. Measurement System Architecture

Figure 5 functional diagram for our design measurement system

Figure 6 diagram with our real subsystems

2. Measurement System Design

2.1 Conditioning Circuit Design

For choosing the appropriate component we have been successful through researching in the many circuits that are available online and in our knowledge of sensor and a digital and electronics courses we made the circuit design

Dr. Chedly B. Yahya, PMU EE, 2018

Page 9: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

2.2 Processing Design

Dr. Chedly B. Yahya, PMU EE, 2018

Source Code

#include <LiquidCrystal.h>#define tempSensor 0int Vin; float TC;float TF;

const int rs = 8, en = 9, d4 = 10, d5 = 11, d6 = 12, d7 = 13;LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {  lcd.begin(16,2);  lcd.print("*Temprture*");  pinMode(7, OUTPUT);  }void loop() {Vin = analogRead (tempSensor);TC=(500.0*Vin)/1023.0;TF=((9.0*TC)/5.0)+32.0;lcd.setCursor(0,1);lcd.print(TC);lcd.print((char)223);lcd.print("C");lcd.print(TF);lcd.print((char)223);lcd.print("F");if(TC<27.00){digitalWrite(7,LOW);}else{  digitalWrite(7,HIGH);}delay(1000);}

Program flow chart

Page 10: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

2.3 Display

For our application we used 16*2 LCD (Liquid Crystal Display) as our display which is an electronic display module and it is very commonly used in various devices and circuits. A 16*2 it means it can display 16 character per line and it has two lines. In our application we used in first line Temperature as a title and in the second line degrees C and Fahrenheit F its records up 4 digits. And this makes it a very perfect resolution tool for monitoring.

Figure 7 The Display in our application

3. Measurement System Integration

Figure 8 the final real system we constructed and designed

For powering we used a 12 v dc battery which is connected directly to the arduino and the 12v fan and for the sensor LM35 and the LCD it is powered with the arduino pin 5v.

Dr. Chedly B. Yahya, PMU EE, 2018

Page 11: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Chapter 5: Testing and Calibration

1. Testing

For the testing and verifying the measurement accuracy we have to have a reference that is more reliable to test the measurement and for that we choose a regular thermometer we tested our designed in many conditions like we test it inside the refrigerator and freezer and inside the house and outside the open air and this the results we got in the table below

Table 2. Instrument measured data

2. Calibration

Based on previous section measurement using the thermometer The LM35 device does not require any external calibration or trimming to provide typical accuracies at room temperature or over a full −55°C to 150°C temperature range.

3. Accuracy and Precision

For accuracy we got a nice result which is approximately +/- 0.01C

For precision we performed multiple testing at the same temperature environment inside the house and outside and the results shows that it records the same output. The only environment that the instrument was not precise when it was inside the refrigerator and the freezer the results changed for the same input.

Dr. Chedly B. Yahya, PMU EE, 2018

Temperature Measured by Thermometer in (C)

Temperature Measured by Designed Instrument LM35 in (C)

-17.00 -17.08

6.00 6.06

20.00 20.01

24.00 24.02

25.00 25.01

26.00 26.02

27.00 27.01

28.00 28.03

Page 12: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Chapter 6: Discussion and Conclusion

1. Discussion

We had reached a good and satisfying overall design output in which we were planning to accomplish. The LM35 measuring temperature in Celsius with good precision, yet we had a small error in our temperature reading with +/- 2 % percentage error. This error occurred due to small voltage drop in the circuit components.

2. Conclusion

In our project, we designed and implemented an efficient temperature monitoring and controlling system with an Arduino board. Output was verified by setting the temperature at different levels and it was found that the led turn on and off when the device crosses the set value. It is very useful for the people who are disable. There is still much room for future development that would enhance the system and increase its business value. Although we faced difficulty in performing some of the designing steps, but we had spent a great time in designing this circuit due to excellent team work that we do.

In future the circuit can be enhanced by connecting a GSM Module to the circuit so that in industrial area when a machine crosses the set temperature, we can inform the control room by sending a message, or else a call to control roon1 manager so that damages to the machine can be avoided by disconnecting the equipment with GSM technology.

Dr. Chedly B. Yahya, PMU EE, 2018

Page 13: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

References

http://www.circuitbasics.com/arduino-thermistor-temperature-sensor-tutorial/

https://www.instructables.com/id/ARDUINO-TEMPERATURE-SENSOR-LM35/

https://www.allaboutcircuits.com/projects/monitor-temperature-with-an-arduino/

https://www.arduinolibraries.info/libraries/lm35

https://www.hackster.io/TheGadgetBoy/making-lcd-thermometer-with-arduino-and-lm35-36-

c058f0

Dr. Chedly B. Yahya, PMU EE, 2018

Page 14: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Electrical Engineering DepartmentEEEN 4321: Sensors & Instrumentation

Design Project Evaluation

Project Title:

Team:

Item Max Pts Description Comments Mark

Progress 10Submitted proposal on time, showed intermediate progress (f)

Rep

ort

Technical Format (10) 10

Organization, completeness, accuracy (introduction, application, design, test results, discussion, conclusion) (g1)

Design (35)

5Stated design clear and enough specifications (c1)

10Considered alternatives for sensor, circuit and other functions (c2)

20

Implemented design by selecting appropriate components and values (c3)

TestingErrors, Calibration (30)

20

Tested product with clear test objectives matched to design specifications, showing testing setup, instruments, data measured, analysis, discussion. (c4)

10

Studied errors, stated measurement accuracy, precision, and performed calibration (c4)

Presentation/Demo 15

Demonstrated product operation and answered questions with clear understanding and confidence. (c4)

Bonus 0-10Extra features added, Participation in Dept Open Day …

Total 100

Dr. Chedly B. Yahya, PMU EE, 2018

Page 15: Chapter 1: Introduction - aalsaleh393.files.wordpress.com€¦  · Web viewDepartment of Electrical Engineering. Sensors & Instrumentation: EEEN. 4321. Instructor: Dr. Chedly B.

Dr. Chedly B. Yahya, PMU EE, 2018