You are on page 1of 6

Automatic Temperature Control of Electric Motor

Using PIC Microcontroller


Rengarajan Sundararajan Vignesh Natarajan Vasanth Viswanathan
Student, Dept. of Electrical and Student, Dept. of Electrical and Student, Dept. of Electrical and
Electronics Engineering Electronics Engineering Electronics Engineering
SSN College of Engineering SSN College of Engineering SSN College of Engineering
Chennai, India Chennai, India Chennai, India
rengarajan183001069@eee.ssn.edu.in vignesh183001118@eee.ssn.edu.in vasanth183001117@eee.ssn.edu.in

Sri Hari Ravi Shankar


Student, Dept. of Electrical and
Electronics Engineering
SSN College of Engineering
Chennai, India
sri183001098@eee.ssn.edu.in

Abstract— Automatic control using embedded systems is an Since active cooling requires energy, it will be beneficial to
efficient technique that is crucial in recent times. This paper control the amount of cooling done in accordance with the
discusses the implementation of a temperature sensor in an requirement. For example, the speed of the cooling fan can be
electric motor to monitor the temperature, and provide automatic reduced in the event the temperature of the equipment of
safety mechanisms by controlling various components, to ensure
interest is already in or well below the desired range.
the safety and longevity of the motor. An LM35 temperature
sensor is interfaced with microcontroller PIC16F877A, and the
sensor input is processed, governed by safe motor temperature In order to continue the transition of the automotive industry
2022 IEEE Delhi Section Conference (DELCON) | 978-1-6654-5883-2/22/$31.00 ©2022 IEEE | DOI: 10.1109/DELCON54057.2022.9752892

limits, to provide intimation and automatic PWM-based speed to the electrically dominant vehicle propulsion systems,
control of a fan-based cooling system, as well as the speed of the thermal management plays an important role. As the cooling
motor, to ensure motor safety as well as better energy efficiency. system improves there will be a direct trade-off between motor
The system is simulated in Proteus and verified. performance, efficiency, cost, and sizing of electric motors to
operate within the thermal constraints[6].
Keywords—microcontroller, PIC, electric motor, LM35 sensor,
PWM control, cooling fan.
Heating in the motor through copper, magnet, lamination and
I. INTRODUCTION bearing frictional losses is a cause of concern. Thermal
gradients set due to these heat sources could lead to stresses in
It is crucial to monitor the temperature of electrical the radial and axial directions, causing uneven deformations.
appliances to ensure safety and longevity. It’s a rule of thumb As such, thermal mapping is necessary parameter for heat
that an increase in temperature of 10°C over the rated management and inturn assess the performance of the motor[9].
temperature in any component of electronic devices roughly Thermal mapping is estimating the temperatures of the
leads to the lifespan of the component becoming halved [1][2]. components of an electric traction motor in particular. This is
Even though this rule isn’t strictly accurate or applicable to all essential because the components are made of different
appliances, it does tell us that is necessary to keep the materials and their individual thermal expansion may lead to
temperatures in check, in a consistent manner, to minimize thermo-mechanical stresses.
degradation and ensure good appliance longevity.
In this paper we plan to use of electronic control unit (ECU)
Fundamentally, heat management in any device is done by comprising of DC motor driver circuit,temperature sensor and
the means of passive and/or active cooling [3]. Passive cooling a microcontroller for efficient cooling and heat
refers to the method of heat transfer that involves natural management.With the use of ECU’s the system is found to be
conduction, convection, and radiation of heat away from the robust and that we can reduce the total electricity consumed[10].
equipment to cool the equipment. Passive cooling is an
automatic process and does not require automatic or manual For development of the simulation, MPLAB which is a
control. Some examples include implementation of proprietary integrated development environment for
heatsinks/heat spreaders and heat pipes, natural airflow based development of embedded applications on PIC is used.For
cooling, usage of insulators, evaporation, the reflection of schematics,PROTEUS which is a tool suite used primarily for
radiation, etc. electronic design automation is used.

Active cooling refers to the use of energy that is directed into II. HEAT MANAGEMENT IN ELECTRIC MOTORS
cooling the component. And hence, this needs to be done by
automatic or manual control mechanisms. Some examples In electric machines, it is also necessary to control the
involve the usage of cooling fans, liquid cooling, etc. Active temperature to avoid the demagnetization of permanent
and passive cooling are usually done together to maximize the magnets [4]. It has also been shown that undesired temperatures
effectiveness of the system. could negatively impact the efficiency of electric motors [4].

978-1-6654-5883-2/22/$31..00 ©2022 IEEE

Authorized licensed use limited to: KLE Technological University. Downloaded on April 26,2024 at 09:27:56 UTC from IEEE Xplore. Restrictions apply.
The electrical resistance of the conductors present in these D. Reducing fan noise and wear.
machines varies with the temperature as:
Slowing or turning off the cooling fans when the cooling
power is not required can reduce fan noise and wear. It is also
The increased temperature also leads to losses in the form of crucial to have direct control over the speed of the motor based
Joule losses/ohmic heating, where power loss occurs when the on the temperature inside the motor. This could act as an
electric current through the conductors produces heat. Since emergency safety mechanism in case of extreme or
this is dependant upon the resistance of the components, higher unanticipated events. This paper proposes an automatic
temperature leads to higher ohmic heating and hence more mechanism to control the speed of cooling fans of electric
power loss. Electric motors are traditionally cooled by the use motors, and in rare cases, control the speed of the motor itself,
of both active and passive cooling mechanisms. Heat transfer to prevent it from reaching unacceptable temperatures.
commonly occurs via conduction, convection, and radiation.
III. ELECTRIC MOTOR AND COOLING FAN LAYOUT
A. Conduction
Usually, electric motors are of the following types based on
Conduction involves heat transfer from direct contact cooling mechanisms:
between solid objects. This depends upon the thermal
conductivity of the materials present. This occurs inside the • Open machines
body of the electric motors.
• Self-ventilating machines
B. Convection
This involves eat transfer that occurs when a fluid moves • Axial and radial cooling circuits
along a solid body. Natural convection occurs due to a natural
motion of these fluids, while forced convection occurs when we • Liquid cooling
move the fluids by an external force. In electric machines,
forced convection is followed widely by using cooling fans to • Heat Pipes based.
force air along the components of the machine to transfer heat.
Among these types, open machines, and axial and radial
C. Radiation cooling based machines can be suited for external fan based
forced convection type cooling.
Radiation occurs in all objects that are above 0K in
temperature. The bodies emit heat via electromagnetic radiation,
and there is contactless heat transfer. This is usually ignored in Fig. 1. shows the layout of a typical radially cooled motor.
electric machines.

In this paper, the forced convection method of heat transfer


in electric motors is emphasized, which is done via the use of
cooling fans. This can also be termed as active cooling. It would
be beneficial to have automatic mechanisms that would control
the amount of heat transfer that is being done via active cooling
in a motor, by varying the speed of the cooling fan. This can be
useful for various reasons, such as

A. Maintaining stable temperatures.


It is important to ensure that there aren’t large and frequent
variances in the temperatures of components. This can lead to
damage and wear in the long run [1].

B. Maintaining safe temperatures. Fig. 1. Radially cooled motor

Allowing components to exceed the rated temperature limits The air is guided into these motors via radial ducts. The air
can be very detrimental to the components’ longevity. entering is controlled via cooling fans. Thus, the speed of this
cooling fan can be altered to control the amount of cooling
C. Reducing electricity costs. taking place inside the motor. Temperature sensors are usually
placed in the motor slots, winding head, or bearing [5]. The
Controlling the power provided to the cooling components speed of the cooling can be controlled according to the
can save energy. We can limit the power when the cooling temperature inside the motor, via a microcontroller.
requirements are lower.

Authorized licensed use limited to: KLE Technological University. Downloaded on April 26,2024 at 09:27:56 UTC from IEEE Xplore. Restrictions apply.
Fig. 3. LM35 Temperature Sensor

IV. PWM SPEED CONTROL OF MOTORS A. Microcontroller Pin Layout

Pulse Width Modulation (PWM) works based on the


principle of modulating/controlling the widths of the square
pulses. This is done by simply varying the duty cycle of the
pulse, i.e, the duration of the ON and OFF cycles. For example,
if the pulse is ON and OFF for equal periods, the duty cycle is
50%. The formula for the duty cycle is:

(%) =
+

Where is the duration for which the pulse is in ON state,


and is the duration for which the pulse is in the OFF state.

Using PWM can regulate the voltage delivered across any


terminals. When the duty cycle is higher, the voltage will be Fig. 2. Layout of PIC16F877A
higher, and vice versa. By limiting the voltage, we can thus
The structure of the PIC microcontroller (PIC16F877A) is
control the speed of the cooling fan and also the motor.
provided in Fig. 2.
V. SYSTEM LAYOUT
The Microcontroller Unit (MCU) has two PWM pins, CCP1
The layout of the system described in this paper is shown in and CCP2, located at PINs 17 and 16, which will be
fig. 3. In the figure, section 1 shows the microcontroller programmed to provide PWM control. Either of the pins RA0
connected with the temperature sensor, section 2 shows the or RA1 (pins 1 and 2) can be configured for Analog to Digital
electric motor, and section 3 shows the cooling fan. The Conversion (ADC). And any of the general-purpose I/O (GPIO)
temperature readings are displayed in the LCD marked as pins, which are RA0-RA5, RB0-RB7, RC0-RC7, RD0-RD7,
section 4. RE0-RE2, can be configured to communicate with the LCD.

Authorized licensed use limited to: KLE Technological University. Downloaded on April 26,2024 at 09:27:56 UTC from IEEE Xplore. Restrictions apply.
For extending the application, PIC microcontrollers like the C. Motor Driver IC configuration
dsPIC series can be used, which have up to 8 PWM pins, and
Table 2 shows the process to control the cooling fan and the
can hence be used to control multiple motors simultaneously.
motor. Depending upon the current motor temperature, the
speeds of the fan and the motor can be controlled similarly to
B. Procedure to Approach Driver Code Creation
the logic provided in the table to achieve optimum power
efficiency and longevity. The logic has been simplified in the
For creating the MCU driver code, we would need to first
table, however, when implementing it practically, all the values
establish the MCU pins to be used, and methods to
will change according to the motor and the applications.
communicate with various elements of the system.
TABLE II. SPEEDS OF COOLING FAN AND MOTOR FOR DIFFERENT
The LM35 temperature sensor will be placed inside the TEMPERATURES
motor, as discussed in the previous section. First, the data from
Temperature Cooling Fan Speed Motor Speed
the LM35 temperature sensor is processed via the inbuilt ADC (in 0C) (%PWM) (%PWM)
circuit of the MCU. The analog pins and registers should be
>120 100 0
configured accordingly. Sensor data will be in analog format (or the provided
and is converted to a processable digital format via the ADC. maximum limit)
The next step involves an optional LCD which can be 100-120 100 No change (or) Reduced
configured to display the temperature and status. The next stage until target temperature
involves the interfacing of the cooling fan and the motor with range is obtained
the MCU. Driver ICs have been used to implement PWM 80-100 Incremented in large steps No change
voltage control of the fan and the motor. This is done using the until target temperature
PWM pins of the MCU. A function can be made within the range is obtained
MCU to perform PWM in accordance with the temperature 40-80 Incremented/Decremented No change
readings and the temperature limits of the motor. The safe in moderately large steps
temperature limits are provided in table 1. until target temperature
range is obtained
TABLE I. DIFFERENT TEMPERATURE RANGES OF OPERATION <40 Incremented/Decremented No change
in small steps until target
Temperature Temperature Action to be taken via speed temperature range is
(in 0C) Status control obtained.
>120 Dangerously Motor needs to be slowed
(or the provided high down/halted. D. Logic
maximum Heat transfer needs to be maximized.
limit) The logic of the sensor and PWM implementation is
100-120 Abnormally The motor could be slowed down. provided in a flowchart in Fig. 4.
high Heat transfer needs to be increased
considerably.
80-100 High Heat transfer needs to be increased.

40-80 Moderately Heat transfer could be increased.


high
<40 Normal Can maintain/reduce heat transfer.

VI. PROGRAMMING THE MICROCONTROLLER


A. LCD Interfacing

The layout of the LCD is given in Fig 3(Section-4). An 8-bit


interface, via the GPIO pins RD0-RD7 has been established
with the LCD, for the exchange of commands and data. Pins
RC0 and RC3 are used for sending reset/enable signals to the
LCD. The LCD will be used to display the temperature and the
status.

B. LM35 Interfacing using ADC

The sensor is connected to ADC capable pin AN0/RA0 of


the MCU. Thus, the MCU should be configured to read from
AN0 and process the data into binary format.
Fig. 4. Flowchart

Authorized licensed use limited to: KLE Technological University. Downloaded on April 26,2024 at 09:27:56 UTC from IEEE Xplore. Restrictions apply.
VII. RESULTS
A. Temperature and Speed Readings

Proteus simulation software was used to achieve the


interfacing, by using the hex file generated with MPLAB-X.
The results obtained using the given code are represented in fig
5. In fig 5 (a) and (b), it can be seen that the speed of the cooling
fan is automatically reduced for lower temperature readings,
and increased for higher temperature readings, to conserve
energy and manage heat transfer efficiently. In fig 5 (c), it can
be seen that the speed of the motor is reduced in the event of
the temperature exceeding the maximum safety limit.

Fig. 5 (c) Motor halted

VIII. CONCLUSIONS & FUTURE SCOPE


This paper provides an approach to forced convection type
heat management for electric motors using a cooling fan. The
control of the fan and the motor has been optimized to provide
a power-efficient system, as well as to maximize the longevity
of the components. Logic has been provided to control the
speed of the cooling fan and the electric motor to maintain the
temperature at a stable range, and to prevent it from exceeding
Fig. 5 (a) Lower fan speed
the safety limits. The power management has been considered
by limiting the power provided to the cooling in accordance
with the cooling requirements. The system has been simulated
in Proteus, and the simulation has been verified.

In this paper we are controlling the speed of the cooling fan


based on the logic that we discussed above. In future the logic
can be enhanced such that the time required for measure the
acutal temperature of the motor is less which inturns helps with
in optimizing the cooling for better efficiency and in turn
improving the performance of the system.

REFERENCES
[1] F. A. Khalifa, S. Serry, M. M. Ismail and B. Elhady, "Effect of
temperature rise on the performance of induction motors," 2009
International Conference on Computer Engineering & Systems, 2009,
pp. 549-552, doi: 10.1109/ICCES.2009.5383074.
[2] M. Xu, D. Teng, G. Wang and Y. Fei, "High Efficient BLDC Controller
for Automobile Cooling Fan," 2010 International Conference on
Intelligent System Design and Engineering Application, 2010, pp. 809-
812, doi: 10.1109/ISDEA.2010.318.
[3] M. -S. Kim, J. -H. Park, K. -S. Lee, S. -H. Lee and J. -Y. Choi, "Optimum
Design of Cooling Fan considering Experimental Method for Three-
Fig. 5 (b) Higher fan speed Phase Induction Motor," 2020 23rd International Conference on
Electrical Machines and Systems (ICEMS), 2020, pp. 1220-1224, doi:
10.23919/ICEMS50442.2020.9290852.
[4] Gyu-Hong Kang, Jin Hur, Ha-Gyeong Sung and Jung-Pyo Hong,
"Optimal design of spoke type BLDC motor considering irreversible

Authorized licensed use limited to: KLE Technological University. Downloaded on April 26,2024 at 09:27:56 UTC from IEEE Xplore. Restrictions apply.
[5] demagnetization of permanent magnet," Sixth International Conference Thermal and Thermomechanical Phenomena in Electronic Systems
on Electrical Machines and Systems, 2003. ICEMS 2003., 2003, pp. (ITherm), 2020, pp. 660-665, doi: 10.1109/ITherm45881.2020.9190262.
234-237 vol.1. [10] Frajnkovic, M.; Omerovic, S.; Rozic, U.; Kern, J.; Connes, R.; Rener,
[6] P. Ostojic, R. Yabiku, J. Vico, P. F. Lopes and A. Balista, "Improving K.; Biˇcek, M. Structural Integrity of In-Wheel Motors; SAE Technical
the usage of temperature sensors for motor thermal protection," 2012 Paper; SAE: Warrendale, PA, USA, 2018.
Petroleum and Chemical Industry Conference (PCIC), 2012, pp. 1-7, doi: [11] Wang, Chong & Sun, Qun & Xu, Limin. (2017). Development of an
10.1109/PCICON.2012.6549681. Integrated Cooling System Controller for Hybrid Electric Vehicles.
[7] Bennion, Kevin. Electric Motor Thermal Management R&D. Annual Journal of Electrical and Computer Engineering. 2017. 1-9.
Report. United States: N. p., 2016. Web. doi:10.2172/1248569. 10.1155/2017/2605460.
[8] Li, B., Kuo, H., Wang, X. et al. Thermal Management of Electrified [12] Sharma B.B., Banshwar A., Pathak M., Sharma N.K., Joshi A. (2021)
Propulsion System for Low-Carbon Vehicles. Automot. Innov. 3, 299– Microcontroller-based PID Temperature Controller Using Genetic
316 (2020),doi:10.1007/s42154-020-00124-y. Algorithms. In: Dewan L., C. Bansal R., Kumar Kalla U. (eds)
[9] Z. Yao, Y. Saadon, R. Mandel and F. Patrick McCluskey, "Cooling of Advances in Renewable Energy and Sustainable Environment.
Integrated Electric Motors," 2020 19th IEEE Intersociety Conference on Lecture Notes in Electrical Engineering, vol 667. Springer,
Singapore. https://doi.org/10.1007/978-981-15-5313-4_26

Authorized licensed use limited to: KLE Technological University. Downloaded on April 26,2024 at 09:27:56 UTC from IEEE Xplore. Restrictions apply.

You might also like