0% found this document useful (0 votes)
25 views65 pages

Final Report

This project report details the development of an IoT-based battery health monitoring system for electric vehicles, focusing on performance degradation due to energy supply reduction. The system includes a monitoring device and user interface to detect battery performance issues and notify users. The report is submitted by students from the Government College of Engineering Salem as part of their Bachelor of Engineering degree in Electrical and Electronics Engineering.

Uploaded by

V. Vijay Bhaskar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views65 pages

Final Report

This project report details the development of an IoT-based battery health monitoring system for electric vehicles, focusing on performance degradation due to energy supply reduction. The system includes a monitoring device and user interface to detect battery performance issues and notify users. The report is submitted by students from the Government College of Engineering Salem as part of their Bachelor of Engineering degree in Electrical and Electronics Engineering.

Uploaded by

V. Vijay Bhaskar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 65

BATTERY HEALTH MONITORING USING

INTERNET OF THINGS(IOT)
A PROJECT REPORT

Submitted by

KISHORE K - 2041019 NITHISH S R- 2040124 SATHISHKUMAR N


- 2041035 SUBRAMANI K-61772141T315

in partial fulfilment for the award of the degree

of

BACHELOR OF ENGINEERING

IN

ELECTRICAL AND ELECTRONICS ENGINEERING

GOVERNMENT COLLEGE OF ENGINEERING SALEM -11


(An Autonomous Institution; Affiliated to Anna University)

ANNA UNIVERSITY: CHENNAI 600 025

NOV 2023

GOVERNMENT COLLEGE OF ENGINEERING SALEM


(An Autonomous Institution; Affiliated to Anna University)

ANNA UNIVERSITY, CHENNAI – 600 025

BONAFIDE CERTIFICATE

Certified that this project report BATTERY HEALTH MONITORING USING

INTERNET OF THINGS(IOT) is the bonafide work of KISHORE K ,

NITHISH S R, SATHISHKUMAR N, SUBRAMANI K who carried out the

project work under my/our supervision.

SIGNATURE SIGNATURE
Dr. V GEETHA Dr. T.R.SUMITHIRA
HEAD OF THE DEPARTMENT SUPERVISOR
Professor and Head Assistant Professor
Department of Electrical and Electronics Department of Electrical and
Engineering Electronics Engineering
GOVERNMENT COLLEGE OF GOVERNMENT
ENGINEERING SALEM-11 COLLEGE OF
ENGINEERING
SALEM-11

Submitted for the project viva-voce examination held on

INTERNAL EXAMINER EXTERNAL EXAMINER

ABSTRACT

ii
This paper describes the application of Internet-of-things (IoT) in
monitoring the performance of electric vehicle battery. It is clear that an
electric vehicle totally depends on the source of energy from a battery.
However, the amount of energy supplied to the vehicle is decreasing gradually
that leads to the performance degradation. This is a major concern for battery
manufacture.
In this work, the idea of monitoring the performance of the vehicle
using IoT techniques is proposed, so that the monitoring can be done directly.
The proposed IoT-based battery monitoring system is consists of two major
parts i) monitoring device and ii) user interface. Based on experimental results,
the system is capable to detect degraded battery performance and sends
notification messages to the user for further action.

Key Words: Battery Management System (BMS), Internet of Things (IoT),Lithium


ion batteries.

ACKNOWLEDGEMENT

iii
We would like to express our sincere thanks to our Principal
Dr.R.VIJAYAN Ph.D., for forwarding us to do our project and offering adequate
duration to complete our project.
I feel privileged to express my grateful thanks and gratitude to
Dr. V. GEETHA M.E., Ph.D., Head of the Department for Electrical and Electronics
Engineering, for his precise and inspiring guidance, valuable and generous
suggestions for this project.
We express our heartfelt and sincere thanks to our project guide
Dr. T.R. SUMITHIRA, Associate Professor, Department of Electrical and
Electronics Engineering for his kind guidance and encouragement during this
project. She contributed to a measure in surmounting all hardships; I faced during the
project work. Her tolerance in dealing the problems and encouragement were
constant source of inspiration
We are also expressing our indebt thanks to our teaching and non-teaching
faculties of mechanical engineering department, Government College of engineering,
Salem.

KISHORE K - 2041019

NITHISH S R - 2041024

SATHISH KUMAR N -2041035

SUBRAMANI K -
61772141T315

iv
TABLE OF CONTENTS
CHAPTER PAGE
NO TITLE NO
ABSTRACT iii
TABLE OF CONTENTS v
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF ABBREVIATIONS xi
1 INTRODUCTION 1
1.1 GENERAL 1
1.2 INTRODUCTION 1
1.3 BATTERY 3
1.4 BATTERY MANAGEMENT SYSTEM 4
1.5 INTRODUCTION TO EMBEDDED SYSTEMS 5
1.6 EMBEDDED SYSTEM 6
1.7 EMBEDDED C 6
1.8 SIGNIFICANCE OF THE PROJECT 7
2 LITERATURE REVIEW 8
2.1 GENERAL 8
2.2 LITERATURE SURVEY 8
3 OVERVIEW OF PROPOSED SOLUTION 12
3.1 GENERAL 12
3.2 PROBLEM STATEMENT 12
3.3 OBJECTIVE 12
3.4 EXISTING METHODS 13
3.5 PROPOSED SOLUTION 13
3.6 BLOCK DIAGRAM OF PROPOSED SYSTEM 14
3.7 INNOVATION 15
4 HARDWARE REQUIREMENTS 16

v
4.1 GENERAL 16
4.2 ESP 8266(NODE MCU) 16
4.2.1 About ESP 8266 16
4.2.2 Specifications 17
4.2.3 Pin Diagram and Explanation 18
4.3 TEMPERATURE SENSOR 22
4.3.1 General 22
4.3.2 Types of temperature sensor 22
4.3.2.1 Thermocouples 23
4.3.2.2 RTD (Resistance Temperature Detector) 24
4.3.2.3 Thermistor 26
4.3.3 DHT Temperature and Humidity Sensor 30
4.3.3.1 Pin Configuration 30
4.3.3.2 DHT11 Sensor Specifications 30
4.4 BREAD BOARD 32
4.5 JUMPER WIRES 33
4.6 PRESSURE SENSOR(BMP180) 35

4.6.1 Pin configuration 35


4.6.2 Features & Specifications 36
4.6.3 Brief about BMP180 Sensor 37
4.6.4 Applications 38
4.7 CURRENT SENSOR 39
4.7.1 Specifications of current sensor (ACS712) 39
4.7.2 Brief details about current sensor (ACS712) 40
4.8 VOLATGE SENSOR 42
4.8.1 Pins of Voltage Sensor 42
4.9 RECHARGEABLE BATTERY 43

vi
4.9.1 Specifications of Rechargeable battery 44
4.10 TP4056 CHARGING MODULE 46
4.10.1 Pin details of TP4056 Charging Module 46
5 SOFTWARE REQUIREMENTS 49
5.1 GENERAL 49
5.2 ARDUINO IDE 49
5.2.1 About ARDUINO IDE 49
5.2.2 Setup( ) Block 50
5.2.3 Loop( ) Block 50
5.2.4 List of Icons and Explanation 51
5.3 EMBEDDED C 51
5.3.1 Introduction to Embedded Systems 52
5.3.2 Embedded Systems Programming 53
5.3.3 Use of C in Embedded Systems 54
6 APPENDICES 56
6.1 GENERAL 56
6.2 SOURCE CODE FOR MICROCONTROLLER 56
7 RESULT 62
7.1 GENERAL 62
7.2 RESULT 62
8 CONCLUSION AND FUTURE SCOPE 64
8.1 GENERAL 64
8.2 CONCLUSION 64
REFERENCES 65
APPRECIATIONS 67

vii
LIST OF TABLES

TABLE PAGE NO
NO TABLE DESCRIPTION

4.1 Specifications of ESP8266 17


4.2 Different materials and its ranges 23
4.3 Pin configuration of DHT11 31
4.4 Pin configuration of BMP180 37
5.1 List of icons in Arduino IDE with definition 52

viii
ix
LIST OF FIGURES

FIGURE PAGE
FIGURE DESCRIPTION
NO NO
3.1 Block Diagram of Proposed Solution 14
4.1 Arduino UNO Board 16
4.2 Pin Diagram of Arduino UNO 18
4.3 Pulse width Modulation in Arduino 19
4.4 Thermocouple construction 23
4.5 RTD 24
4.6 Thermistor 26
4.7 Semiconductor based Temperature sensor 28
4.8 Infrared temperature sensor 29
4.9 Thermometer 30
4.10 DS18B20 and its pinout diagram 31
4.11 Internal structure of DS18B20 32
4.12 Bread Board 34
4.13 Jumper Wire 35
4.14 L298N Module and Pinout 37
4.15 L298N Parts 38
4.16 Internal Circuit Diagram of L298N 39
4.17 Piezoelectric Buzzer 40
4.18 LED Strip 43
4.19 DC Motor 45
4.20 Amptek AT12-1.312V, 1.3AH Battery 46
4.21 LCD Display 47
4.22 Pin Diagram of LCD 48
5.1 Arduino IDE 51
7.1 Demo project in off mode 64
7.2 Demo project in on mode 64

x
LIST OF ABBREVIATIONS

AC Alternating Current
BMS Battery Management System
BTMS Battery Thermal Management System
CD Compact Disc
CPU Central Processing Unit
DC Direct Current
EV Electric Vehicle
I2C Inter-Integrated Circuit
ICSP In Circuit Serial Programming
IDE Integrated Development Environment
IOT Internet Of Things
KB Kilo Byte
LCD Liquid Crystal Display
LED Light Emitting Diode
NTC Negative Temperature Coefficient
PC Personal Computer
PTC Positive Temperature Coefficient

PWM Pulse Width Modulation

RAM Random Access Memory

ROM Read Only Memory

RTD Resistance Temperature Detector

SLA Seal Lead Acid


SOC State Of Charge
SPI Serial Peripheral Interface
UART Universal Asynchronous Receiver - Transmitter
UPS Uninterrupted Power Supply Universal
USB Serial Bus

xi
CHAPTER 1

1. INTRODUCTION

1.1 GENERAL

Now a day’s battery Powered Vehicles are gaining popularity, this is mainly
because of its environment friendly nature. These vehicles are called Electric Vehicle
or in short EV. A lot of research is being done in Electric vehicle to make them reality
and safe to be used in real world situations. A very important part and also called
heart of an electrical vehicle is Battery Management System (BMS). Battery
Management System is the central unit used to monitor different aspects of battery
that is being used in electric vehicle or any electric system like SOC, Temperature,
Voltage and current ranting and many more. This project is based on monitoring
temperature of electric vehicle and implementing corrective measures to maintain
battery temperature.

1.2 INTRODUCTION
Battery Thermal Management System (BTMS) is a subunit of battery
management system that is used to monitor and maintain temperature of batteries so
that life of batteries can be improves and reduce risk of burning of battery and
overheating of system that can damage EVs and can put human life in danger, BTSM
is being researched thoroughly and we have come a long way but still there is a lot to
achieve in this field. Battery thermal management system can regulate the
temperature of battery system either by using air as coolant or cooling liquid as
coolant. Method using cooling liquid is more efficient and can be used to cool or heat
the battery if it is required considering environment in which system is being used.

The search for alternative ways to replace the generation of electric energy that
comes from the use of non-renewable sources is very important for the current
situation of the electric sector. Seeking to generate energy through renewable sources,
various devices capable of converting other types of energy into electric energy have

1
been developed. For example, solar panels that transform solar energy into electric
energy or wind turbines to transform kinetic energy from wind into electric energy.
These devices need to store the generated energy because wind and sunshine are not
always available. Additionally, these sources of energy vary in different timescales,
from some seconds to hours and days. In this way, storing energy becomes
indispensable to overcome the intermittency behavior of non-renewable sources. A
way to store electrical energy is through the use of batteries. A battery is a set of cells
connected in series. These cells can be manufactured in various combinations of
materials. Some examples of materials used for the construction of these cells are
nickel-cadmium (NiCd), Lithium-ion (Li-ion), Lithium polymer (Li-ion polymer),
lead acid (Pb) and Sodium-Sulphur (NaS).

The choice of what battery technology best fits an application is based on


several criteria like robustness, cost, life-cycle, power density, temperature, depth of
discharge and so on. Lithium-ion batteries are the primary choice for portable
electronics applications and they are very attractive for electric vehicles due to as
efficiency around 95%, long lifecycle (3000 cycles) and high energy and power
densities. However, their relative high cost and the need for careful circuitry for
safety and protection are their main hurdles. Nickel-cadmium batteries are attractive
for Uninterrupted Power Supply (UPS) and generator-starting applications. However,
the sales of these batteries declined for the period of 1995 to 2003, motivated mainly
by the increasing environmental controls for toxic cadmium.

The battery’s temperature, voltage, current and state of charge (SoC) are the
most common parameters that are normally monitored. Monitoring each battery in the
battery bank ensures the battery system operating levels and conditions remains
optimal. And the battery should provide a power without interrupting the device
operations of the system in the absence of ac input power. In order to provide the
power for the systems in the absence of ac input, the battery should be in good
condition to provide the sufficient amount of power to the devices without
interruption. In order to know the condition of battery, it does require monitoring

2
each battery in the battery bank periodically in real time. The main goal of this
system is to inform the users regarding the present status or condition of individual
battery in the battery bank periodically and sends the alert information to authorized
person through IoT module. To know the present status of battery some important
parameters of the battery should be measure in regular interval. The important
parameters are terminal voltage, load current, capacity, discharge current and room
temperature of each battery.

1.3 BATTERY

12V 1.3 Ah Rechargeable Lead Acid Battery is normally use for robots in
competition. Wired or Wireless Robots runs for a long time with high speed with this
type of battery. Seal Lead Acid (SLA) Rechargeable battery is the most common
general-purpose battery. Low cost, robust and less maintenance required are the
advantages of SLA. But it is considered heavy weight for certain robotic application.
To charge SLA batteries, you can use any general DC power supply as long as it
provides the correct voltage to your battery.
Features:

Rechargeable

Recyclable

No Memory Effect

Able to use for most of the 12V controllers, motors or any other appliances

Specification:

Voltage: 3.7V
Capacity: 2500mAh

Power:7.4W

Weight: 0.450kg

Package Includes: 1 x 12V 1.2Ah Rechargeable Lead Acid Battery

3
1.4 BATTERY MANAGEMENT SYSTEM

A battery management system is essentially the “brain” of a battery pack; it


measures and reports crucial information for the operation of the battery and also
protects the battery from damage in a wide range of operating conditions. Thus, a
battery management system is necessary to observe battery conditions. As per the
current world situation, the Internet of Things (IoT) are used in heterogeneous areas
of research for supervising, congregating, and analyzing data from the remote
locations of batteries. This system comprises numerous sensors for assessing the
physical parameters. The parameters of the battery that can be assessed using these
sensors are input voltage, current, temperature, and status of charging. Using this
system, the real- time data can be determined and the data uploaded over the cloud is
analyzed. Battery Management System is a system that monitors, balances, and
protects a battery pack with four or more cells connected in series. BMS measures the
voltage and temperature of each cell of the battery, and the current through the
battery. Based on the measured data, the system balances the cells and protects them
from overcurrent, overcharging, deep discharge and overheating. The Battery
management system is about monitoring a battery during its functioning and
safeguarding it from damages under various working conditions. The battery is not
only used in automobiles, but also in UPS, off-grid power systems, and alternative
power systems.
1.5 INTRODUCTION TO EMBEDDED SYSTEMS

Microcontrollers are widely used in Embedded System products. An


Embedded product uses the microprocessor (or microcontroller) to do one task & one
task only. A printer is an example of embedded system since the processor inside it
performs one task only namely getting the data and printing it. Contrast this with
Pentium based PC. A PC can be used for any no. of applications such as word
processor, print server, bank teller terminal, video game player, network server or
internet terminal. Software for variety of applications can be loaded and run. Of
course, the reason a PC can perform multiple tasks is that it has RAM memory and an
operating system that loads the application software into RAM & lets the CPU run it.

4
In and Embedded system there is only one application software that is typically burn
into ROM. An x86PC Contain or it’s connected to various Embedded Products such
as keyboard, printer, modem, Disc controller, Sound card, CD-ROM Driver, Mouse
& so on. Each one of these peripherals as a microcontroller inside it that performs
only one task. For example, inside every mouse there is microcontroller to perform
the task of finding the mouse position and sending it to PC.

Although microcontroller is preferred choice for many embedded systems,


there are times that a microcontroller is inadequate for the task. For this reason, in
recent years many manufactures of general-purpose microprocessors such as INTEL,
Motorola, and AMD & Cyrix have targeted their microprocessors for the high end of
embedded market. While INTEL, AMD, Cyrix push their x86 processors for both the
embedded and desktop pc market, Motorola is determined to keep the 68000 families
alive by targeting it mainly for high end of embedded system.

One of the most critical needs of the embedded system is to decrease power
consumptions and space. This can be achieved by integrating more functions into the
CPU chips. All the embedded processors based on the x86 and 680x0 have low power
consumptions in additions to some forms of I/O, Com port & ROM all on a single
chip. In higher performance Embedded system, the trend is to integrate more & more
function on the CPU chip & let the designer decide which feature he/she wants to us.

1.6 EMBEDDED SYSTEM

An Embedded System employs a combination of hardware & software (a


“computational engine”) to perform a specific function; is part of a larger system that
may not be a “computer works in a reactive and time-constrained environment.
Software is used for providing features and flexibility Hardware = {Processors,
ASICs, Memory...} is used for performance & sometimes security.

An embedded system is a special purpose system in which the computer is


completely encapsulated by the device it controls. Unlike a general-purpose

5
computer, such as a PC, an embedded system performs predefined task’s usually with
very specific tasks design engineers can optimize it reducing the size and cost of the
product. Embedded systems are often mass produced, so the cost savings may be
multiplied by millions of items.

The core of any embedded system is formed by one or several microprocessor


or micro controller programmed to perform a small number of tasks. In contrast to a
general-purpose computer, which can run any software application, the user chooses,
the software on an embedded system is semi- permanent, so it is often called
firmware.

1.7 EMBEDDED C

Embedded C is a set of language extensions for the C Programming the C


standards committee to address commonality issues that exist between C extensions
for different embedded systems. Historically, embedded C programming requires
nonstandard extensions to the C language in order to support exotic features such as
fixed-point arithmetic, multiple distinct memory banks and basic input output
operations. In 2008, the C Standards Committee extended the C language to address
these issues by providing a common standard for all implementations to adhere to. It
includes a number of features not available in normal C, such as, fixed-point
arithmetic, named address spaces, and basic I/O hardware addressing. Embedded C
use most of the syntax and semantics of standard C, e.g., main () function, variable
definition, data type declaration, conditional statements (if, switch. case), loops
(while, for), functions, arrays and strings, structures and union, bit operations,
macros, unions, etc.

1.8 SIGNIFICANCE OF THE PROJECT

This device that is adapted for placement on (or in thermal contact with) a
surface of an operating unit of equipment, machine, or the like, for the purpose of
raising a visible, tabular, warning flag when the operating machine unit is

6
experiencing overheating. The up-standing warning flag is sized and located to
inform nearby operating personnel that the operating unit is in danger of being
damaged by its overheated condition. Advantages of Microcontroller based Overheat
detector using Temperature sensor with Buzzer indication. This project is easy to use.
CHAPTER 2

2. LITERATURE REVIEW

2.1 GENERAL

A literature review is a written summary of major works and other sources on a


specific topic. Each source is described, summarized and evaluated in the literature
review.

2.2 LITERATURE SURVEY

The following journal papers has been reviewed and the technology used, pros
and cons are inferred.

1. A. M. Anjali Vekhande, "IOT-Based battery parameter monitoring system for an


electric vehicle," International journal of creative research thoughts, vol. 8, no. 7,
p. 7, 2020.

This paper reviews improvements made in the design and manufacture of


batteries as well as development of electric vehicles during the past decades. State of
the art for three important battery technologies in EV application, namely lead- acid
battery, NiMH battery and lithium-ion battery, as well as their current application are
presented; and in the viewpoints of chemical properties of the cell and the
performances of commercial pack for EV, detailed comparative analyses in
technology and economy are performed.

2. A. Hariprasad, "Battery Management System in Electric Vehicles," International


Journal of Engineering Research & Technology, vol. 9, no. 5, 2020.

7
Temperature sensing in electric motors is an important task to ensure
component protection against excessive heat while maximizing the power and torque
capabilities. In order to optimize the dynamic performance limits of a motor during
online operation, important motor temperatures must be known in real time. Since
temperature measurements are associated with costs and integration efforts,
modelbased estimation methods became highly relevant. In recent years, many
promising contributions have been made to this field leading to a vast literature basis.
This paper organizes the literary landscape and gives a bird's-eye overview of the
three most important estimation classes: Indirect methods, which track temperature-
sensitive electrical motor parameters, and direct methods, namely lumped-parameter
thermal networks as well as supervised machine learning.

3. B. Wang, J. Hernandez Fernandez and A. Massoud, 'A Wireless Battery


Temperature Monitoring System for Electric Vehicle Charging', 2019 IEEE
SENSORS, Montreal, QC, Canada, 2019, pp. 1-4, doi:
10.1109/SENSORS43011.2019.8956733, 2019.

Thermal monitoring during charging increases the safety and efficiency of


Electric Vehicles (EVs) batteries. Up to now, no thermal sensing solutions are able to
perform temperature sensing for each battery cell in the EV due to the cost,
deployment complexity, and/or safety reasons. In this paper, a complete wireless
thermal monitoring system for EV battery charging surveillance is presented. The
designed sensing device is wireless, fully passive, with small feature size, and low-
cost thus can be deployed on a large scale for cell-level battery temperature sensing.
The maximum reading distance of the device is >5 m in the ambient, with a sensing
precision of ±1.5 °C (3σ) from −20 to 80 °C. The whole system is validated in- house
using a 18650-36V-4.4A Li-ion battery cell to track its temperature change when
being charged at different C-rates.
4. Lu Jin, Jun Tian, Shen Gao, Peng Xie, Mohsen Akbarzadeh, Theodoros
Kalogiannis, Maitane Berecibar, Yuanliang Lan, Daozhong Hu, Yulong Ding and
8
Geng Qiao, 'A novel hybrid thermal management approach towards high-voltage
battery pack for electric vehicles', Energy Conversion and Management, Volume

247, 1 November 2021, 114676, 2021.

Controlling the temperature of a battery pack within an optimal range and


ensuring uniform temperature distribution are the key to improving battery life. With
the elevating energy density of batteries, more efficient and energy-saving thermal
management system is urgently required for improving electric vehicle (EV)
performance in terms of safety and long-term durability. In this work, a novel hybrid
thermal management system towards a high-voltage battery pack for EVs is
developed. Both passive and active components are integrated into the cooling plate
to provide a synergistic function. A 35kWh battery pack incorporated with electrical,
mechanical and thermal management components was designed, manufactured and
integrated. As the core hardware, a pack-level cooling plate set was innovatively
designed by integrating with phase change material (PCM).

5. Xinghui Zhang, Zhao Li, Lingai Luo, Yilin Fan and Zhengyu Du, 'A review on
thermal management of lithium-ion batteries for electric vehicles', Energy,
Volume 238, Part A, 1 January 2022, Page 121652, 2021.

Compared with other batteries, lithium-ion batteries have the advantages of


high specific energy, high energy density, long endurance, low self-discharge and
long shelf life. However, temperature of the battery has become one of the most
important parameters to be handled properly for the development and propagation of
lithium-ion battery electric vehicles. Both the higher and lower temperature
environments will seriously affect the battery capacity and the service life. Under
high temperature environment, lithium-ion batteries may produce thermal runaway,
resulting in short circuit, combustion, explosion and other safety problems. Lithium
dendrites may appear in lithium-ion batteries at low temperature, causing short
circuit, failure to start and other operational faults.

9
6. F. H. Mohd Helmy Abd Wahab, "IoT-Based Battery Monitoring System for
Electric Vehicle," International Journal of Engineering & Technology, 2018.

The system also proposes a wireless connectivity by using the Bluetooth


communication standard providing of a reliable, portable and a low-cost tool for
industry where it is necessary to have an environmental control to carry out critical
processes. The weather system consists of an embedded system to the development of
multimedia applications based on the PIC32 microcontroller, and development is
performed using the SPIES methodology for the construct embedded systems. In this
paper the design of a portable system that allows monitoring of four climatic
variables (temperature, relative humidity, pressure and altitude). The purpose of the
system is to serve as an auxiliary tool to make decisions subsystems for
environmental control in different areas.
CHAPTER 3

OVERVIEW OF PROPOSED SOLUTION

3.1 GENERAL

This chapter gives the overview of the proposed solution.

3.2 PROBLEM STATEMENT

Security and safety threats are major issues in today’s world. In such a case,
consider a few scenarios like,

• Electrical energy is not 100% converted to power, some energy is lost in the form
of heat so that the motor temperature rise affects the operating time limit and
motor life.

• The temperature of the battery pack will increase in case of internal Short Circuit
this can occur when the battery got a severe shock, so that the battery will have a
high current discharge and will heat up.

10
• Failure of charge controller leads to over-charging and over-discharging of the
battery pack and ends in temperature rise.

• Due to the temperature rise (over heating) of motor and battery in EV’s causes
great damage to the windings of the motor & damage to the battery pack and
electric vehicle as well. Finally leads to burning of EV.

3.3 OBJECTIVE

The aim of this project is thus to describe the designed system. In the designed system,
current and temperature sensors are used as inputs to the analog to digital converters of an
Microcontroller.
The microcontroller then communicates the sensor data to an ESP8266 Wi-Fi module.
The Wi-Fi module connects to the Internet of Things (IoT) cloud server named Thing
Speak, where the data is stored and displayed. The structure of this project is as follows.
Firstly, the Wi-Fi Module, the Things Speak server, and the Microcontroller is introduced.
After that, the Batteries of the electric vehicle was monitored.

3.4 EXISTING METHODS

• The existing temperature detection system is mostly used in factory machineries.

• We are using this system in electric vehicle’s battery and motor temperature
detection.

• Nowadays temperature monitoring system is made in built in the BMS but when
BMS failed to work properly, the temperature will not be monitored and leads to
damage of EV.

3.5 PROPOSED SOLUTION

11
• If the motor or battery found to be overheated, it will give the alert signal to the
vehicle driver till the temperature reaching the maximum threshold value with
motor running in constant decreased speed.

• If it runs again and reaches the maximum temperature, the signals from the
microcontroller stops the working of motor with the help of motor driver and
gives continuous alert to the driver.

• If the temperature of the motor rises above the threshold value of the particular
motor design specified in the controller program, the power supply gets isolated
from the motor using motor driver circuit.

• The maximum temperature of a motor and battery in an electric vehicle


• can vary depending on several factors, such as the design of the vehicle, the size
and type of the motor and battery, and the operating conditions of the vehicle.

• In general, the maximum temperature for an electric vehicle motor should be


150-220°C and for the battery it should be between 20-60°C.

• However, it is important to note that the maximum temperature limits may vary
between different manufacturers and models of electric vehicles, and may also be
affected by factors such as the ambient temperature, charging and discharging
rate, and the duration of operation.
• We also indicate the pressure sensor, voltage sensor, current sensor for the
measurement purposes.
• A current sensor is a device that detects and converts current to an easily
measurable output voltage, which is proportional to the current through the
measured path.

3.6 BLOCK DIAGRAM OF PROPOSED SYSTEM

12
Figure 3.1 Block Diagram of Proposed Solution
3.7 INNOVATION

• In industrial machines different alarms are embedded in machines controllers.


They make use of sensors and machine states to indicate to end-users’ various
information (e.g., diagnostics or need of maintenance) or to put machines in a
specific mode (e.g., shutdown).

• Here we use this system in the electric vehicle to avoid overheating of the motor
and battery, thus prevents the damage of and burning or spark from the EV.

• This system can be used anywhere apart from the above uses to detect the
overheating of any machines or batteries.

13
CHAPTER 4

HARDWARE REQUIREMENTS

4.1 GENERAL

This chapter gives the basic description of the hardware components that is
used in the proposed solution.

4.ESP8266(NODE MCU)

4.2.1 About Node MCU

• The ESP8266 is a low-cost Wifi microchip


• NodeMCU - ( Node MicroController Unit)
• Built-in TCP/IP networking software
• Type: 32-bit microcontroller
• Power: 4.5 to 9 V DC or via micro USB connector
• Pins: 30 ( 8 digital and 1 analog pin)
• Input : 17 GPIO pins
• Frequency : 2.4GHz to 2.5GHz

Figure 4.1 ESP8266 Board

14
The chip was popularized in the English-speaking maker community in August 2014 via
the ESP-01 module, made by a third-party manufacturer Ai-Thinker.

4.2.2 Specifications

Table 4.1 Specifications of ESP8266

Processor Tensilica LX106


Type ESP8266
Clock frequency 80-160 MHz
RAM 64kb
Data Storage 96kb
Frequency 2,4 GHz
Operating voltage 3.0-3.6V
Operating current 80 mA
Dimensions 49*26*13 mm
Operating temperature - 40°C - 125°C
Weight 8g
Data interfaces UART/I2C/PWM/GPIO
4.2.3 Pin Diagram and Explanation

15
Figure 4.2 Pin Diagram of ESP8266

1.Vin: Power supply voltage (3.3V recommended).


2.GND: Ground.
3.3V3: Output from the on-board 3.3V regulator. You can use this to supply
power to other components.
4.EN: Enable pin. Keep it pulled high for normal operation.
5.D0 to D8: General-purpose digital I/O pins.
6.RXD0 and TXD0: Serial communication pins.
7.A0: Analog input pin.
8.SD2, SD3: Additional general-purpose digital I/O pins.
9.SD1 (also known as CMD), CLK, SD0, SD4, SD5, SD6, SD7, SDCS: Pins
used for SPI communication.
10.GPIO 9 and GPIO 10: Pins used for SPI communication (can be
repurposed as general-purpose I/O).

16
11.GPIO 11, GPIO 12, GPIO 13, GPIO 14, GPIO 15: General-purpose
digital I/O pins.
12.TXD1 and RXD1: Additional serial communication pins.
13.SDA and SCL: I2C communication pins.
14.D9 (also known as S2), D10 (also known as S3): General-purpose
digital I/O pins.
15.D5, D6, D7, D8: General-purpose digital I/O pins.

4.3 TEMPERATURE SENSOR

4.3.1 General
A temperature sensor is a type of sensor used to measure the temperature of a
body, surface, liquid, or air using an active or passive sensing element. In other
words, a temperature sensor measures the degree of hotness or coldness of a surface,
liquid, gas, or air.

4.3.2 Types of temperature sensor

Following types of temperature sensors are available to measure the temperature of


surrounding air or a surface. Each technology has its advantages and limitations.

1. Thermocouples

2. RTD (Resistance Temperature Detector)

3. Thermistor

4. Semiconductor-based Temperature Sensor.

5. Infrared Temperature Sensor

6. Thermometers

4.3.2.1 Thermocouples
17
Thermocouples are the most commonly used types of temperature sensors
consisting of two junctions (Hot and Cold Junctions) of dissimilar metals welded
together. Voltage is produced at the junction because of the temperature difference.
And this voltage is used to determine the temperature.

Figure 4.4 Thermocouple construction


Source: https://www.smlease.com/entries/automation/types-of-temperature-sensors-and-
their-applications/

Table 4.2 Different materials and its ranges

Type Temperature Range


Positive Material Negative Material (°C)

B
Platinum Rhodium-6% 0 to 1800
Platinum Rhodium-30%
C Tungsten 5% rhenium
Tungsten 26% rhenium 0 to 2300
E
Chromel (nickel 10% Constantan (nickel 45% copper) -270 to 2000
chromium)
J Iron
Constantan (nickel 45% copper) -210 to 760
K Chromel (nickel 10% -270 to 1370
Alumet (nickel 5% aluminum and
chromium)
silicon)
S
Platinum -50 to 1770
Platinum 10% Rhodium

Advantages of Thermocouple

Thermocouples temperature sensors have the following advantages.

18
1. Simple in Design
2. Ease of use
3. Good response time to the change in temperature.
4. Working limit from -200°C to up to +1750°C

Disadvantages of Thermocouple

1. Thermocouples temperature sensors have the following disadvantages.


2. Non-Linear Nature
3. Low Accuracy
4. Less Stable

4.3.2.2 RTD (Resistance Temperature Detector)

Figure 4.5 RTD


Source: https://www.processparameters.co.uk/pt100-temperature-sensors/rtd-pt100-temperature-
sensor-ip68-kne-terminal-head-4-20ma-transmitter-ppl3-p/

RTD works on the principle that any change in temperature results in a change in
the electrical resistance of the conductive material. Any Increase in the temperature
results in an increase in electrical resistance. Whereas a decrease in temperature
decreases the electrical resistance of the conductive material This change in electrical
resistance is measured to determine the relative change in the temperature.

Following two types of RTD are available in the market

19
1. Thin Film Type

2. Wire wound Type

RTD Materials

Platinum, nickel, and copper materials are widely used to manufacture


conductors in RTD. But out of these materials, platinum is more preferred because it
is highly stable, chemically inert, and can function over large temperature ranges.

➢ Advantages of RTD

RTD has the following advantages.

1. Highly Precise

2. Stable Reading

3. Linear change in resistance with temperature

4. Change in electrical resistance is relatively easy to measure compared to change in


voltage

➢ Disadvantages of RTD

RTD has the following disadvantages

1. High Cost
2. Self-Heating

4.3.2.3 Thermistor

Thermistors are thermally sensitive resistors. Similar to RTD, thermistor


electrical resistance changes with temperature change. But thermistors are different
from RTD because thermistors use resistive material instead of conductive material

20
used in RTD. Therefore, change in resistance in the thermistor is higher compared to
RTD.

Figure 4.6 Thermistor Source:


https://sharvielectronics.com/product/20d-8-ntc-thermistor/

Types of Thermistors

1. Negative Temperature Coefficient (NTC) Thermistors

NTC resistance decreases with an increase in temperature. They are used for
temperature sensing applications.

2. Positive Temperature Coefficient (PTC) Thermistors

PTC thermistor's electrical resistance increases with an increase in temperature.


They are used in electrical circuit protection applications.

Advantages of Thermistor

1. Small Size

2. Low Cost

3. Fast Response

4. More Sensitive

5. Higher Accuracy

Limitations of Thermistor

21
1. Non-Linear Temperature Response Curve

2. Self-Heating Problem

3. Limited temperature Range

4.3.3 DHT11 TEMPERATURE AND HUMIDITY SENSOR

Figure 4.10 DHT11 PINS

4.3.3.1 Pin Configuration

Table 4.3 Pin configuration of DHT11

No: Pin Description


Name

1 Ground Connect this pin to the ground (0V) of your power source

2 Vcc(POWER) Connect this pin to a 5V power source


This is the pin through which the sensor sends the temperature
3 Data and humidity data. Connect it to a digital input/output pin on
your microcontroller or development board.

22
4.3.3.2 DHT11 TEMPERATURE AND HUMIDITY SENSOR Specifications

• Operating voltage: 3.5 to 5.5 V


• Operating current: 0.3mA
• Temperature Range: 0°C to 50°C
• Humidity Range: 20% to 90%
• Resolution: Temperature and Humidity both are 16-bit
• Accuracy: ±1°C and ±1%

The DHT11 is a popular sensor for measuring temperature and humidity. It consists of a
thermistor for temperature sensing and a humidity sensing component. The sensor provides
digital output, making it easy to interface with microcontrollers like Arduino.
To use the DHT11:

 Connect the sensor to your microcontroller.

 Use a library (e.g., in Arduino IDE) to read data from the sensor.

 Retrieve temperature and humidity values through the digital signal.

4.4 BREAD BOARD

A breadboard, solderless breadboard, or protoboard is a construction base used


to build semi-permanent prototypes of electronic circuits. unlike a perf board or
stripboard, breadboards do not require soldering or destruction of tracks and are hence
reusable. For this reason, breadboards are also popular with students and in
technological education.

A variety of electronic systems may be prototyped by using breadboards, from


small analog and digital circuits to complete central processing units (CPU).

23
Compared to more permanent circuit connection methods, modern breadboards
have high parasitic capacitance, relatively high resistance, and less reliable
connections, which are subject to jostle and physical degradation. Signaling is limited
to about 10 MHz, and not everything works properly even well below that frequency.

Figure 4.12 Bread Board

4.5 JUMPER WIRES

A jump wire (also known as jumper, jumper wire, DuPont wire) is an electrical
wire, or group of them in a cable, with a connector or pin at each end (or sometimes
without them – simply "tinned"), which is normally used to interconnect the
components of a breadboard or other prototype or test circuit, internally or with other
equipment or components, without soldering.

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

A jumper wire is an electric wire that connects remote electric circuits used for
printed circuit boards. By attaching a jumper wire to the circuit, it can be
shortcircuited and short-cut (jump) to the electric circuit.

By placing the jumper wire on the circuit, it becomes possible to control the
electricity, stop the operation of the circuit, and operate a circuit that does not operate
with ordinary wiring. Also, when specification change or design change is necessary
on the printed circuit board, reinforcement of the defective part, partial stop of the

24
unnecessary function, and change of the circuit configuration of the unnecessary
output part by attaching or detaching the jumper wire can.

SHOWA jumper wire (NSL: New Showa Lead) is a lead-free tin-plated annealed
copper wire. Tin plating is tin: 99.2%, copper: 0.8%.

In general, it is said that hot plating is difficult to control the plating thickness
compared with electroplating, but we control the plating thickness by the original
processing method.

Figure 4.13 Jumper Wire

4.6 PRESSURE SENSOR

A pressure sensor measures force applied per unit area and converts it into an electrical
signal. Types include:

Strain Gauge Pressure Sensors: Utilize the strain in a material due to applied pressure.

Piezoelectric Pressure Sensors: Generate an electrical charge in response to pressure-


induced mechanical deformation.

25
Capacitive Pressure Sensors: Measure changes in capacitance due to pressure-induced
deflections.

Resonant Solid-State Pressure Sensors: Rely on the frequency changes of a vibrating


element under pressure.

4.6.1 Pin configuration

Table 4.4 Pin configuration of BMP180

Pin Name Description

VCC Connects to the power supply (3.3V or 5V, depending on your


circuit)

Connects to the ground of your circuit


GND

SDA (SERIAL Connects to the data line of your microcontroller for I2C
DATA) communication

SCL (SERIAL Connects to the clock line of your microcontroller for I2C
CLOCK) communication

26
Figure 4.14 BMP180 PIN DIAGRAM

4.6.2 Features & Specifications

• Operating voltage: 1.3 to 3.6 V


• Pressure Range : 300 to 1100hPa
• Accuracy: ±0.12hPa
• Pressure conversion time : 5msec
• Low power consumption (3uA)

4.6.3 Brief about BMP180 Sensor

The BMP180 is a digital barometric pressure sensor designed for use in mobile
applications, and it's commonly used in electronic projects. Here are some key points
about the BMP180 pressure sensor:

Pressure Measurement: The BMP180 sensor measures atmospheric pressure. It is capable


of providing pressure data with high accuracy and resolution.

27
Temperature Measurement: In addition to pressure, the BMP180 also includes a
temperature sensor. This allows for compensation of pressure readings with temperature
variations.

Communication Protocol: It communicates with microcontrollers using I2C (Inter-


Integrated Circuit) protocol, making it relatively easy to interface with various
microcontroller platforms.

Accuracy: The BMP180 is known for its accuracy in measuring pressure and temperature.
It can be used for applications where precise environmental data is required

4.7 CURRENT SENSOR

Figure 4.17 Current sensor

A current sensor is a device that measures the flow of electric current in a circuit. It
provides a way to monitor and control current levels in various applications.

28
There are different types of current sensors, including Hall effect sensors, shunt resistors,
and transformers.
These sensors can be used in industrial, automotive, and electronic systems to ensure safe
and efficient operation by monitoring current levels and providing feedback or triggering
actions based on the measured values.

4.7.1 Specifications Of Current Sensor( ACS712)

• Input voltage: +5 V
• Types: 5,20and 30 A module
• Current: Both AC and DC
• Easy to integrate with MCU, since it outputs analog voltage

4.7.2 Brief details about Current Sensor( ACS712)

The ACS712 is a Hall effect-based current sensor that is used to measure the intensity of
electrical current flowing through a conductor. It works on the principle of Hall effect,
where a voltage is generated across a conductor when subjected to a magnetic field
perpendicular to the current flow.
The ACS712 uses a Hall-effect sensor to measure this voltage and provides an analog
output proportional to the current.
There are different variants of the ACS712 sensor with various current ratings, allowing
users to choose one that suits their specific application. It is commonly used in electronic
projects and automation systems to monitor and control current flow.

4.8 VOLATGE SENSOR

29
Figure 4.18 VOLTAGE SENSOR

A voltage sensor is a device that measures the electrical potential difference


between two points in an electrical circuit. It detects and provides information about
the voltage level, which is the force that drives the flow of electric current.
Voltage sensors are crucial in various applications, including electronics, power
systems, and industrial equipment.
There are different types of voltage sensors, such as resistive dividers, capacitive
voltage dividers, and electromagnetic sensors.
These sensors can be analog or digital, providing a continuous or discrete
representation of the voltage. Voltage sensors play a vital role in monitoring and
controlling electrical systems, ensuring safety, and optimizing performance

4.8.1 Pins of Voltage Sensor

Voltage sensors can have various pin configurations based on the specific model or
type. Generally, voltage sensors may have three pins:

VCC (Power Supply): This is the pin where you provide the power supply voltage for the
sensor to operate.

30
GND (Ground): Connect this pin to the ground or common reference point in your circuit.

OUT (Output): The voltage sensor provides an output signal proportional to the input voltage,
and this pin carries that signal.

4.9 RECHARGEABLE BATTERY

Fig 4.19 Rechargeable Battery


Rechargeable batteries, also known as secondary batteries, are energy storage
devices that can be reused multiple times. They work on the principle of reversible
electrochemical reactions. When discharging (providing power), chemical reactions
within the battery generate electricity. During recharging, these reactions can be
reversed by applying an external electrical current.
Common types of rechargeable batteries include lithium-ion, nickel-metal
hydride, and nickel-cadmium. They offer the advantage of being more cost-effective
and environmentally friendly compared to single-use (primary) batteries because they
can be recharged and reused, reducing waste.
However, rechargeable batteries do have a limited lifespan, and their
performance gradually decreases over time. It's essential to follow proper charging and
discharging practices to maximize their longevity.

31
4.9.1 Specifications for Rechargeable battery
• Lithium ion battery (2 Nos)
• Capacity: 2500mAh
• Voltage: 3.7V
• Power: 7.4wh

4.10 TP4056 CHARGING MODULE

Fig: 4.20 TP4056 Charging module

The TP4056 is a lithium-ion battery charging module commonly used in electronic devices.
It's a compact and cost-effective solution for charging single-cell lithium-ion or lithium-

32
polymer batteries. The module typically includes a linear charger, current sensor, and
protection circuitry.

Key features of the TP4056 module:

Charging Parameters: The TP4056 is designed to charge 3.7V lithium-ion or lithium-


polymer batteries. It provides a regulated charging voltage and current to safely charge the
battery.

Constant-Current/Constant-Voltage (CC/CV) Charging: It follows a two-stage charging


process. Initially, it provides a constant current to the battery until it reaches a certain
voltage, and then it switches to a constant voltage mode.

Charge Status Indicator: Many TP4056 modules have LEDs to indicate the charging
status. For example, a red LED might indicate that the battery is charging, and a green LED
could signify a fully charged battery.

Overcharge Protection: The module incorporates overcharge protection to prevent the


battery from being charged beyond its safe voltage.

Temperature Protection: Some variants include temperature protection mechanisms to


safeguard against overheating during charging

4.10.1 Pins details of TP4056 Charging module

The TP4056 charging module typically has the following pin specifications:
BAT- (Battery Negative Terminal): Connects to the negative terminal of the
rechargeable battery.

BAT+ (Battery Positive Terminal): Connects to the positive terminal of the


rechargeable battery.

OUT+ (Output Positive Terminal): Provides the positive output voltage after
charging. Connects to the load or device being powered.

OUT- (Output Negative Terminal): Connects to the negative side of the load or
device being powered.

33
PROG (Programming Pin): Used to set the charge current. Connecting it to BAT+
or leaving it floating with a resistor to BAT+ sets different charge currents.

CE (Chip Enable): Connects to GND to enable charging, and disconnects charging


when left floating or connected to a voltage higher than 2V.

GND (Ground): Connects to the ground reference.

VCC (Voltage Input): Connects to the power source for charging. Typically, it's
connected to a 5V source.

34
CHAPTER 5

5. SOFTWARE REQUIREMENTS

5.1 GENERAL

This chapter gives the description of the software methods used in this proposed
system.

5.2 ESP8266(NODE MCU)

5.2.1 About ESP8266

The Arduino UNO board is programmed using Arduino IDE software which is an
official software introduced by Arduino.cc to program the board. Arduino programs are
written in the Arduino Integrated Development Environment (IDE). Arduino IDE is a
special software running on your system that allows you to write sketches (synonym for
program in Arduino language) for different Arduino boards. The sketch is nothing but a
set of instructions that allow the board to perform certain functions as per your
requirements.

The Arduino programming language is based on a very simple hardware


programming language called processing, which is similar to the C language. After the
sketch is written in the Arduino IDE, it should be uploaded on the Arduino board for
execution. The first step in programming the Arduino board is downloading and
installing the Arduino IDE. The open-source Arduino IDE runs on Windows, Mac OS
X, and Linux.

Arduino programs have a minimum of 2 blocks. They are Preparation &


Execution blocks as shown in figure (5.1). setup( ) is the preparation block and loop( )
is an execution block. Each block has a set of statements enclosed in curly braces.

35
Figure 5.1 Arduino IDE

5.2.2 Setup( ) Block

The setup function is the first to execute when the program is executed, and this
function is called only once. The setup function is used to initialize the pin modes and
start serial communication. This function has to be included even if there are no
statements to execute.
• void setup() – this sets up the things that need to be done once and they
don’t happen again in the running program.

5.2.3 Loop() Block

After the setup( ) function is executed, the execution block runs next. The
execution block hosts statements like reading inputs, triggering outputs, checking
conditions etc. In the above example loop( ) function is a part of the execution block. As
the name suggests, the loop( ) function executes the set of statements (enclosed in curly
braces) repeatedly.
• void loop() – this part comes with the instructions that get repeated again
and again until the board is turned off.
5.2.4 List Of Icons and Explanation

Table 5.1 List of icons in Arduino IDE with definition

36
Verify
Check your code for errors compiling it.
Upload
Compiles your code and uploads it to the configured board.
See uploading below for details.
New
Creates a new sketch.
Open
Presents a menu of all the sketches in your sketchbook.
Clicking one will open it within the current window
overwriting its content.

Save
Save your sketch.
Serial Monitor
Opens the serial monitor.

Through Arduino programming, Arduino uno can be interfaced with LCD display,
MATLAB, Relay, Power supply and IOT module etc.

5.3 EMBEDDED C

Embedded C is a set of language extensions for the C Programming the C


standards committee to address commonality issues that exist between C extensions for
different embedded systems. Historically, embedded C programming requires
nonstandard extensions to the C language in order to support exotic features such as
fixed-point arithmetic, multiple distinct memory banks and basic input output
operations. In 2008, the C Standards Committee extended the C language to address
these issues by providing a common standard for all implementations to adhere to. It
includes a number of features not available in normal C, such as, fixed-point arithmetic,
named address spaces, and basic I/O hardware addressing. Embedded C use most of the

37
syntax and semantics of standard C, e.g., main () function, variable definition, data type
declaration, conditional statements (if, switch. case), loops (while, for), functions, arrays
and strings, structures and union, bit operations, macros, unions, etc.0

5.3.1 Introduction To Embedded Systems

Looking around, we find ourselves to be surrounded by various types of


embedded systems. Be it a digital camera or a mobile phone or a washing machine, all
of them has some kind of processor functioning inside it. Associated with each
processor is the embedded software. If hardware forms the body of an embedded
system, embedded processor acts as the brain, and embedded software forms its soul. It
is the embedded software which primarily governs the functioning of embedded
systems. During infancy years of microprocessor-based systems, programs were
developed using assemblers and fused into the EPROMs. There used to be no
mechanism to find what the program was doing. LEDs, switches, etc. were used to
check correct execution of the program. Some ‘very fortunate’ developers had In-circuit
Simulators (ICEs), but they were too costly and were not quite reliable as well.

As time progressed, use of microprocessor-specific assembly-only as the


programming language reduced and embedded systems moved onto C as the embedded
programming language of choice. C is the most widely used programming language for
embedded processors/controllers. Assembly is also used but mainly to implement those
portions of the code where very high timing accuracy, code size efficiency, etc. are
prime requirements.

Initially C was developed by Kernighan and Ritchie to fit into the space of 8K
and to write (portable) operating systems. Originally it was implemented on UNIX
operating systems. As it was intended for operating systems development, it can
manipulate memory addresses. Also, it allowed programmers to write very compact
codes. This has given it the reputation as the language of choice for hackers too.

5.3.2 Embedded Systems Programming

38
Embedded systems programming is different from developing applications on a
desktop computer. Key characteristics of an embedded system, when compared to PCs,
are as follows:

• Embedded devices have resource constraints (limited ROM, limited


RAM, limited stack space, less processing power)

• Components used in embedded system and PCs are different; embedded


systems typically use smaller, less power consuming components.

• Embedded systems are more tied to the hardware.

Two salient features of Embedded Programming are code speed and code size.
Code speed is governed by the processing power, timing constraints, whereas code size
is governed by available program memory and use of programming language. Goal of
embedded system programming is to get maximum features in minimum space and
minimum time.

Embedded systems are programmed using different type of languages:

• Machine Code

• Low level language, i.e., assembly

• High level language like C, C++, Java, Ada, etc.


• Application-level language like Visual Basic, scripts, Access, etc.
Assembly language maps mnemonic words with the binary machine codes that
the processor uses to code the instructions. Assembly language seems to be an obvious
choice for programming embedded devices. However, use of assembly language is
restricted to developing efficient codes in terms of size and speed. Also, assembly codes
lead to higher software development costs and code portability is not there. Developing
small codes are not much of a problem, but large programs/projects become
increasingly difficult to manage in assembly language. Finding good assembly
programmers has also become difficult nowadays. Hence high-level languages are
preferred for embedded systems programming.

39
5.3.3 Use Of C in Embedded Systems

• It is small and reasonably simpler to learn, understand, program and


debug.
• C Compilers are available for almost all embedded devices in use today,
and there is a large pool of experienced C programmers.
• Unlike assembly, C has advantage of processor-independence and is not
specific to any particular microprocessor/ microcontroller or any system.
This makes it convenient for a user to develop programs that can run on
most of the systems.

• As C combines functionality of assembly language and features of high-


level languages, C is treated as a ‘middle-level computer language’ or
‘high level assembly language’
• It is fairly efficient
• It supports access to I/O and provides ease of management of large
embedded projects.

Many of these advantages are offered by other languages also, but what sets C
apart from others like Pascal, FORTRAN, etc. is the fact that it is a middle level
language; it provides direct hardware control without sacrificing benefits of high-level
languages. Compared to other high-level languages, C offers more flexibility because C
is relatively small, structured language; it supports low-level bit-wise data manipulation.
Compared to assembly language, C Code written is more reliable and scalable, more
portable between different platforms (with some changes). It is easier to write good
code in C & convert it to an efficient assembly code rather than writing an efficient code
in assembly itself. Benefits of assembly language programming over C are negligible
when we compare the ease with which C programs are developed by programmers.

40
CHAPTER 6

APPENDICES

6.1 GENERAL

This program is used to control the motor operation according to the temperature
sensor values through motor driver module.

6.2 SOURCE CODE FOR MICROCONTROLLER

#include <OneWire.h>

#include <DallasTemperature.h>

#include <LiquidCrystal.h>

LiquidCrystal Lcd(13, 12, 11, 10, 9, 8); //RS EN D4 D5 D6 D7

#define ONE_WIRE_BUS 2

#define alert 4

#define Motor 5

#define Speed 6

#define light 7

#define bright 3

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature

sensors(&oneWire); int deviceCount =

0; float tempB; float tempM; void

setup(void)

41
pinMode(alert, OUTPUT);

pinMode(Motor, OUTPUT);

pinMode(light, OUTPUT);

sensors.begin(); // Start up the library

Serial.begin(9600);

Serial.print("Locating devices...");

Serial.print("Found "); deviceCount =

sensors.getDeviceCount();

Serial.print(deviceCount, DEC);

Serial.println(" devices.");

Serial.println("");

digitalWrite(alert, LOW);

digitalWrite(Motor,

LOW); digitalWrite(light,

LOW);

analogWrite(Speed, 255);

analogWrite(bright,165);

delay(1000);

Lcd.begin(16, 2);

delay(100);

} void

loop(void)

sensors.requestTemperatures(); Serial.print("Sensor ");

Serial.print(0);

42
Serial.print(" : ");

tempB = sensors.getTempCByIndex(0);

Serial.print(tempB);

Serial.println(":C");

Lcd.setCursor(0, 0);

Lcd.print("B T:");

Lcd.setCursor(4, 0);

Lcd.print(tempB);

Lcd.setCursor(10, 0);

Lcd.print("C");

Serial.print("Sensor ");

Serial.print(1);

Serial.print(" : ");

tempM = sensors.getTempCByIndex(1);

Serial.print(tempM);

Serial.println(":C");

delay(1000);

Lcd.setCursor(0, 1);

Lcd.print("M T:");

Lcd.setCursor(4, 1);
Lcd.print(tempM);

Lcd.setCursor(10, 1);

Lcd.print("C");

if ((tempB < 40) && (tempB > 35))

43
analogWrite(Speed, 50);

analogWrite(bright, 50);

digitalWrite(Motor,

HIGH); digitalWrite(light,

HIGH); digitalWrite(alert,

HIGH); delay(400);

digitalWrite(alert, LOW);

delay(7000);

Lcd.setCursor(12, 0);

Lcd.print(" ");

else if (tempB > 40)


{ digitalWrite(alert, HIGH);

digitalWrite(Motor, LOW);

digitalWrite(light, LOW);

delay(3000);

Lcd.setCursor(12, 0);

Lcd.print("HIGH");

delay(1000);

else if ((tempM < 40) && (tempM > 35))

analogWrite(Speed, 50);

analogWrite(bright, 50);

digitalWrite(Motor,

HIGH); digitalWrite(light,

44
HIGH); digitalWrite(alert,

HIGH); delay(400);

digitalWrite(alert, LOW);

delay(7000);

Lcd.setCursor(12, 1);

Lcd.print(" ");

else if (tempM > 40)


{ digitalWrite(alert, HIGH);

digitalWrite(Motor,

LOW); digitalWrite(light,

LOW); delay(3000);

Lcd.setCursor(12, 1);

Lcd.print("HIGH");

delay(1000);

else {

digitalWrite(alert, LOW);

digitalWrite(Motor,

HIGH); digitalWrite(light,

HIGH);

analogWrite(Speed, 255);

analogWrite(bright, 165);

delay(1000);

45
}

46
CHAPTER 7

RESULT

7.1 GENERAL

This chapter gives the result of the proposed solution.

7.2 RESULT

The electric vehicle's motor and battery temperatures are sensed by our project.
On the LCD panel, the motor and battery's current temperatures are shown. When a
system's, motor's, or battery's temperature surpasses the pre saturation value, which we
fixed the threshold value in the microcontroller (threshold value – 5 deg). The motor
speed will be reduced, and the driver will receive a warning signal continuously. The
system is shut down when the temperature hits or surpasses the threshold setting. The
driver should be aware of the vehicle throughout the alert period and take the required
steps to cool the vehicle.

Currently we are setting 40deg as maximum threshold value and 35deg as pre
saturation value in the Arduino microcontroller. These temperature settings vary for
different EV’s according to the surrounding temperature and different rating of the
motor and battery pack of the electric vehicles.

47
Fig: 7.1 Demo project in off mode

Fig: 7.2 Demo project in on mode

48
CHAPTER 8

CONCLUSION AND FUTURE SCOPE

8.1. GENERAL

This chapter tells the conclusion of the proposed system and further ways to
develop the system.

8.2 CONCLUSION

In conclusion, the use of a microcontroller in an electric vehicle (EV) to detect


motor and battery overheating is essential for ensuring safe and reliable operation. By
installing temperature sensors on the motor and battery and connecting them to the ADC
inputs of the microcontroller, the temperature readings can be monitored and compared
to a threshold value. If the temperature exceeds the threshold value, the microcontroller
can trigger an alarm or turn off the motor or battery to prevent overheating. The
microcontroller can also store the temperature readings in memory or send them to a
central monitoring system for further analysis. Overall, the implementation of a
microcontroller-based temperature monitoring system in an EV is an effective solution
for preventing potential hazards and ensuring the safe operation of the vehicle. With the
increasing adoption of EVs, such safety measures are becoming increasingly important
to ensure the reliable operation of the vehicles and the safety of their passengers and the
environment.

All of the earlier experiments were unique in that they had separate temperature
measurement system for the motor and the battery. In this instance, a single device uses
temperature detection for both the battery and the motor. Finally, we are monitoring the
Motor and Battery temperatures and protecting our electric vehicle.
REFERENCES

1. M. R. I. R. Md. Al Amin, ‘Design & Construction of Machine Overheat


Protection & Detection System’, Bachelor Electrical and Electronic Engineering
World University of Bangladesh (WUB), 2021.

49
2. A. M. Anjali Vekhande, "IOT-Based battery parameter monitoring system for an
electric vehicle," International journal of creative research thoughts, vol. 8, no.
7, p. 7, 2021.

3. Xinghui Zhang, Zhao Li, Lingai Luo, Yilin Fan and Zhengyu Du, 'A review on
thermal management of lithium-ion batteries for electric vehicles', Energy,
Volume 238, Part A, 1 January 2022, Page 121652, 2020.

4. Lu Jin, Jun Tian, Shen Gao, Peng Xie, Mohsen Akbarzadeh, Theodoros
Kalogiannis, Maitane Berecibar, Yuanliang Lan, Daozhong Hu, Yulong Ding
and Geng Qiao, 'A novel hybrid thermal management approach towards
highvoltage battery pack for electric vehicles', Energy Conversion and
Management, Volume 247, 1 November 2021, 114676, 2020.

5. B. Wang, J. Hernandez Fernandez and A. Massoud, 'A Wireless Battery


Temperature Monitoring System for Electric Vehicle Charging', 2019 IEEE
SENSORS, Montreal, QC, Canada, 2019, pp. 1-4, doi:
10.1109/SENSORS43011.2019.8956733, 2020.

6. O. Wallscheid, 'Thermal Monitoring of Electric Motors: State-of-the-Art Review


and Future Challenges', in IEEE Open Journal of Industry Applications, vol. 2,
pp. 204-223, 2021, doi: 10.1109/OJIA.2021.3091870, 2019.

7. Song, Younha & Yang, Y. & Hu, Zechun, 'Present status and development trend
of batteries for electric vehicles', Dianwang Jishu/Power System Technology.
35. 1-7, 2018.

8. D. S. K. S. R. M. R. k. H. K. Channi, ‘Modeling And Simulation of Machine


Overheat Detection With Alert System’ in International Journal for Science and
Advance Research In Technology, International Journal for Science and
Advance Research In Technology, vol. 3, no. 11, pp. 842, 2017.

50
9. P. G. P. Kunal Pardeshi and R.Y. Patil, ‘Cooling System for Electronics in
Computer System - An Overview’, International Journal of Recent Engineering
Research and Development (IJRERD), vol. 02, no. 02, pp. 01-04, 2017.

10. K. Kim, J. Lee, and J. Kim, ‘Thermal analysis of electric vehicle battery packs
using temperature sensors’, Energy, vol. 36, pp. 5863-5868, 2016.

11. X. Chen, Y. Wang, and X. Sun, ‘Thermal imaging-based temperature


measurement of lithium-ion batteries’, Measurement Science and Technology,
vol. 26, pp. 055107, 2015.

12. B. Chen and X. Liu, ‘An intelligent thermal management system for electric
vehicle battery packs’, IEEE Transactions on Vehicular Technology, vol. 67, pp.
6076-6087, 2015.

13. J. Zhang, Y. Wang, and H. Wang, ‘A novel temperature prediction method for
electric vehicle battery pack based on machine learning’, Energy Conversion
and Management, vol. 198, pp. 111711-1716, 2014.

14. S. Kim, J. Kim, and J. Lee, ‘Thermal management of lithium-ion batteries in


electric vehicles’, Journal of Power Sources, vol. 224, pp. 91- 101, 2013.

APPRECIATIONS

1. Our project is approved by Tamil Nadu State Council for Science and
technology (TNSCST) and they have sanctioned Rs. 7500/- for the
implementation of our project.

51
2. Received appreciation certificate for the “Poster Presentation Contest”
conducted by Department of Humanities & Science (Physics) – NCMFM-2023
organized by FMRL.

52
53

You might also like