arduino-based temperature monitor- ing and control …umpir.ump.edu.my/17943/1/arduino- based...
TRANSCRIPT
ARDUINO-BASED TEMPERATURE MONITOR-
ING AND CONTROL VIA CAN BUS
MOHAMMAD HUZAIFAH BIN CHE MANAF
UNIVERSITI MALAYSIA PAHANG
ii
ARDUINO-BASED TEMPERATURE MONITORING AND CONTROL VIA CAN
BUS
MOHAMMAD HUZAIFAH BIN CHE MANAF
This thesis is submitted as partial fulfilment of the requirements for the award of the
Bachelor of Electrical Engineering (Hons.) (Electronics)
Faculty of Electrical & Electronics Engineering
Universiti Malaysia Pahang
DECEMBER 2016
iv
SUPERVISOR’S DECLARATION
I hereby declare that I have checked this thesis and in my opinion, this thesis is adequate
in terms of scope and quality for the award of the degree of the Bachelor Degree of
Electrical Engineering (Hons.) (Electronics).
Signature :
Name of Supervisor : MAZIYAH BINTI MAT NOH
Position : LECTURER OF ELECTRICAL & ELECTRONICS
ENGINEERING
Date : 30th
DECEMBER 2016
v
STUDENT’S DECLARATION
I hereby declare that the work in this thesis is my own except for quotations and summaries
which have been duly acknowledged. The thesis has not been accepted for any degree and
is not concurrently submitted for award of other degree.
Signature : huzaifah
Name : MOHAMMAD HUZAIFAH BIN CHE MANAF
ID Number : EA11098
Date : 30th
DECEMBER 2016
vi
ACKNOWLEDGMENTS
It is a pleasure to thank many people who made this thesis possible. I would like
to take this opportunity to express my gratitude and sincere thanks to my supervisor
Madam Maziyah Binti Mat Noh for her guidance, insight, and support he has provided
throughout the course of this work. I learned about the great role of self-learning and the
constant drive for understanding emerging technologies, and a passion for knowledge.
My special thanks go to research scholars, friends and juniors at Universiti Ma-
laysia Pahang for their encouragement and help throughout the course. I would like to
thank all faculty members and staff of the Falcuty of Electrical and Electronics Engi-
neering, Universiti Malaysia Pahang for their extreme help throughout course.
Finally, I am forever indebted to my parents for their love, understanding, end-
less patience and encouragement when it was most required.
ix
TABLE OF CONTENTS
Page
SUPERVISOR’S DECLARATION ii
STUDENT’S DECLARATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF SYMBOLS xii
LIST OF ABBREVIATIONS xiii
CHAPTER 1 INTRODUCTION
1.1 Background 1
1.2 Problem Statement 1
1.3 Project Objective 2
1.4 Scope of The Project 2
CHAPTER 2 LITERATURE REVIEW
2.1 Introduction 3
2.2 CAN Bus 3
2.3 A Zigbee Based Temperature Monitoring System 4
2.4
2.5
Arduino Based Can Protocol Implementation In
Vechicle Control System
Monitoring and Controlling of Temperature Using
Hardware Description & Operation
4
5
CHAPTER 3 METHODOLOGY
3.1
3.2
3.3
Introduction
Flow Chart
Block Diagram
6
8
9
x
3.4 System Design 8
3.4.1 Microcontroller 10
3.4.2 CAN Bus Shield 11
3.4.3
3.4.4
3.4.5
3.4.6
3.4.7
3.4.8
3.4.9
3.4.10
Display
DS18B20 Temperature Sensor
LM35 Temperature Sensor
Controller and Transceiver
Relay
Heater
Potentiometer
USB Fan
12
12
13
14
16
16
17
17
3.5 Prototype Circuit System Design 18
3.6 Software Development and Coding 18
3.7 Hardware Simulation 21
CHAPTER 4 RESULTS AND ANALYSIS
4.1 Introduction 24
4.2
4.3
4.4
Fan
DC Water Pump
Analysis
25
28
31
CHAPTER 5 CONCLUSION AND RECOMMENDA-
TION
5.1 Conclusions 32
5.2 Recommendation 32
REFERENCES 33
APPENDICES 34
A Appendix A 34
B Appendix B 39
C Appendix C 40
xi
LIST OF TABLES
Table No. Title Page
4.1 The result by using Fan (distance 18cm) 26
4.2 The result by using Fan (distance 7cm) 26
4.3 The result by using Water Pump (5V) 29
4.4 The result by using Water Pump (9V) 29
xii
LIST OF FIGURES
Figure No. Title Page
3.1 Flow chart of the study 8
3.2. Block diagram of implemented system 9
3.3.1 Arduino UNO board 10
3.3.2 CAN-Bus Shield 11
3.3.3 LCD Display 2x16 12
3.3.4 DS18B20 Temperature sensor 13
3.3.5 LM35 Temperature sensor 14
3.3.6 MCP2515 Controller 15
3.3.7 MCP2551 Transceiver 15
3.3.8 Relay 16
3.3.9 Heating element 16
3.3.10 Potentiometer 10kΩ 17
3.3.11 Fan 17
3.4 Prototype hardware design 18
3.5 Hooked up between Arduino Uno and CAN Bus Shield 23
3.6
4.1
4.2
4.3
4.4
4.5
CAN Receiver Flow Chart
Example of Data Read by Sensor
The Fan hardware setup
Graph (distance 18cm)
Graph (distance 7cm)
The DC water pump hardware setup
23
24
25
27
27
28
xiii
4.6
4.7
5.1
Graph (5V)
Graph (9V)
Integrate Software and Hardware
30
30
39
xiv
LIST OF SYMBOLS
Ω Ohm
℃ Celsius
mV Millivolt
V Volt
xv
LIST OF ABBREVIATIONS
CAN Controller Area Network
MSCAN Motorola Scalable Controller Area Network
LM35 Linear Monolithic 35
ADC Analog to Digital Converter
LCD Liquid Crystal Display
PWM Pulse Width Modulation
IDE Integrated Development Environment
RFI Radio Frequency Interference
GSM
DC
Global System for Mobile
Direct Current