Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Temperature Sensed Motor Control

Description

On this section I wanted to design an automatic system in which the motor starts and stops based on a
temperature value. The assumption behind is that the DC motor to act as a Fan. Previously on chapter
three it was mentioned that the starter generator was experiencing an overheating condition hence
what if a sub system that automatically sense the temperature of the commutator and to take action
based on the value.

Flowchart or Software Architecture

The flow chart shows the main routine of the program and its main purpose.
FIGURE - 15: SOFTWARE FLOW CHART OF THE SYSTEM

Circuit Block Diagram

To get a sense of what the whole project looks like, the below figure shows the rough schematic
connection of the components.

FIGURE - 16: BLOCK CIRCUIT DIAGRAM OF THE SYSTEM


Simulation

Using Figure - 14 as a starting point the component connection was made on Proteus as shown below.

FIGURE - 17: CIRCUIT DIAGRAM SETUP ON PROTEUS

The main principle of the circuit is to switch on the fan connected to DC motor when the temperature is
greater than a threshold value.

The microcontroller continuously reads temperature from its surroundings. The temperature sensor acts
as a transducer and converts the sensed temperature to electrical value. This is analog value which is
applied to the ADC pin of the microcontroller.
Component Description
LM35

The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly
proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear
temperature sensors calibrated in ° Kelvin, as the user is not required to subtract a large constant
voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external
calibration or trimming to provide typical accuracies of ± 1/4°Cat room temperature and ±3/4°C, over a
full -55 to +150°Ctemperature range. Low cost is assured by trimming and calibration at the wafer level.
The LM35’s low output impedance, linear output, and precise inherent calibration make interfacing to
readout or control circuitry especially easy.

It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 µA from
its supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over a -55°
to +150°C temperature range.

FIGURE - 18: LM35 PIN CONFIGURATION


Mathematical Modelling: Full range centigrade temperature sensor:

Range of sensor output: -550 mV to 1500mV (for temperature range of -55 to 150 degree Celsius).

Range of ADC input for ATMEGA: 0 to 5 VADC output: 0 To1023 (10 bit)For every 1 degree Celsius
temperature rise , rise of sensor output is 10mVFor every 5 milli volt input rise to ADC, count increments
by 1ADC_OUT = 1023 * (ADC_IN)/5000;So Temperature = ADC_OUT /2.046;

Analog to Digital Converter

All the parameters of nature are of analog i.e. most of the data in the real world is characterised by
analog signals. For instance, if the temperature of the room is measured. The room temperature varies
with time continuously. This measured signal, which continuously changes with time say from 1sec ,
1.1sec , 1.2 sec and so on is called Analog signal.

In order to manipulate the real world data using a microprocessor or a microcontroller, we need to
convert the analog signals to the digital signals, so that the processor or controller will be able to read,
understand and manipulate the data. Atmega32 has internal Analog to digital converter.

FIGURE - 19: ADC

ATMEGA-32 Micro Controller Unit

Microcontrollers must contain at least two primary components - memory (RAM), and an instruction
set. RAM is a type of internal logic unit that stores information temporarily. RAM contents disappear
when the power is turned off. While RAM is used to hold any kind of data, some RAM is specialized,
referred to as registers. The instruction set is a list of all commands and their corresponding functions.
During operation, the microcontroller will step through a program (the firmware). Each valid instruction
set and the matching internal hardware that differentiate one microcontroller from another. Most
microcontrollers also contain read-only memory (ROM), programmable read-only memory (PROM), or
erasable programmable read-only memory (EPROM). Al1 of these memories are permanent: they retain
what is programmed into them even during loss of power. They are used to store the firmware that tells
the microcontroller how to operate. They are also used to store permanent lookup tables. Often these
memories do not reside in the microcontroller; instead, they are contained in external ICs, and the
instructions are fetched as the microcontroller runs. This enables quick and low-cost updates to the
firmware by replacing the ROM. Where would a microcontroller be without some way of communicating
with the outside world? This job is left to input/output (I/O) port pins. The number of I/O pins per
controllers varies greatly, plus each I/O pin can be programmed as an input or output (or even switch
during the running of a program). The load (current draw) that each pin can drive is usually low. If the
output is expected to be a heavy load, then it is essential to use a driver chip or transistor buffer. Most
microcontrollers contain circuitry to generate the system clock. This square wave is the heartbeat of the
microcontroller and all operations are synchronized to it. Obviously, it controls the speed at which the
microcontroller functions.

All that needed to complete the clock circuit would be the crystal or RC components. We can, therefore
precisely select the operating speed critical to many applications. To summarize, a microcontroller
contains (in one chip) the following elements:

 Instruction set RAM


 ROM, PROM or EPROM
 I/O ports  Clock generator
 Reset function
 Watchdog timer
 Serial port
 Interrupts
 Timers
 Analog-to-Digital converters
 Digital-to-Analog converters
FIGURE - 20: PIN CONFIGURATIONS OF ATMEGA32

Liquid Crystal Display (LCD):-

LCD (Liquid Crystal Display) is an electronic display system. A 16x2 LCD display is a very basic system and
commonly used in various devices and circuits. LCD’s are preferred over seven segments and other multi
segment LEDs. The advantages of LCD’s are as follows:

• LCDs are economical.


• They are easily programmable.
• A number of characters can be displayed.
• Very compact and light.
• Low power consumption.
A 16x2 LCD means it can display 16 characters per line and 2 such lines are there. In this LCD every
character is displayed in 5x7 pixel matrix. LCD possesses two registers: Data and Command registers. The
command register stores the command instructions given to the LCD. A command can be defined as an
instruction given to LCD to do a predefined task.

For example, initializing the LCD, clearing the screen, controlling the cursor position, controlling the
display etc. The data register stores the data which is displayed on the LCD screen. The data is the ASCII
value of the character which is displayed on the LCD screen.

FIGURE - 21: 2×16 LCD DISPLAY

FIGURE - 22: LCD PIN DIAGRAM

L293D

L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on either direction.
L293D is a 16-pin IC which can control a set of two DC motors simultaneously in any direction. It means
that you can control two DC motor with a single L293D IC. Dual H-bridge Motor Driver integrated
circuit (IC). The l293d can drive small and quiet big motors as well.
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be flown in either
direction. As you know voltage need to change its direction for being able to rotate the motor in
clockwise or anticlockwise direction, hence H-bridge IC are ideal for driving a DC motor.

In a single L293D chip there are two h-Bridge circuit inside the IC which can rotate two dc motor
independently. Due its size it is very much used in robotic application for controlling DC motors. Given
below is the pin diagram of a L293D motor controller.

There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor, the pin 1 and 9
need to be high. For driving the motor with left H-bridge you need to enable pin 1 to high. And for right
H-Bridge you need to make the pin 9 to high. If anyone of the either pin1 or pin9 goes low then the
motor in the corresponding section will suspend working. It’s like a switch.

FIGURE - 23: L293D PIN DIAGRAM


Result and Conclusion

In this section of the report we will be seeing the results obtained or foreseen for this particular project.
In the process of designing and analysing the vital monitor we had to simulate the designed circuitry
initial so that it can give us a result close or exactly to the desired reading without actually building the
hardware setup.

You might also like