Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This project is a standalone automatic fan speed controller that controls the speed of an
electric fan according to our requirement. Use of embedded technology makes this closed loop
feedback control system efficient and reliable. Microcontroller (ATMega8 / 168 / 328) allows
dynamic and faster control. Liquid crystal display (LCD) makes the system user-friendly. The
sensed temperature and fan speed level values are simultaneously displayed on the LCD panel.
It is very compact using few components and can be implemented for several applications
including air-conditioners, water heaters, snow-meters, ovens, heat-exchangers, mixers, furnaces,
incubators, thermal baths and veterinary operating tables. ARDUINO micro controller is the
heart of the circuit as it controls all the functions.
The temperature sensor LM35 senses the temperature and converts it into an electrical
(analog) signal, which is applied to the microcontroller. The sensed and set values of the
temperature are displayed on the 16x2-line LCD. The micro controller drives Transistor to
control the fan speed. This project uses regulated 12V, 2A power supply.
This project is useful in process industries for maintenance and controlling of Boilers
temperature.
1
CHAPTER 1
INTRODUCTION
With the advancement in technology, intelligent systems are introduced every day.
Everything is getting more sophisticated and intelligible. There is an increase in the demand of
cutting edge technology and smart electronic systems.
Microcontrollers play a very important role in the development of the smart systems as
brain is given to the system. Microcontrollers have become the heart of the new technologies that
are being introduced daily. A microcontroller is mainly a single chip microprocessor suited for
control and automation of machines and processes. Today, microcontrollers are used in many
disciplines of life for carrying out automated tasks in a more accurate manner. Almost every
modern day device including air conditioners, power tools, toys, office machines employ
microcontrollers for their operation.
This project presents the design and simulation of the fan speed control system using
PWM technique based on the room temperature. A temperature sensor has been used to measure
the temperature of the room and the speed of the fan is varied according to the room temperature
using PWM technique. The duty cycle is varied from 0 to 100 to control the fan speed depending
upon the room temperature, which is displayed on Liquid Crystal Display.
2
CHAPTER 2
LITERATURE REVIEW
The circuit exploits the property of sensor to operate the DC Fan. A sensor is a type of
transducer. In a broader sense, a transducer is sometimes defined as any device that converts
energy from one form to another. Besides that, the component that made up the temperature
sensor is known as thermistor. Thermistor is a kind of temperature dependent resistor and its
resistance varies depending on the temperature in its vicinity. There are two types of
Thermistors- Negative Temperature Coefficient Thermistor (NTC) and Positive Temperature
Coefficient Thermistor (PTC).
NTC Thermistor decreases its resistance when the temperature increases while PTC
Thermistor increases its resistance when the temperature increases. Thermistors are bead like
resistors available from 100 ohms to 10K or more values. In this circuit, a 1K (25°C) NTC
Thermistor is used. A small DC fan increases or decreases its speed as per the temperature
change. When the temperature decreases below a certain level, Fan automatically turns off.
PROPOSED SYSTEM
In the proposed systems, microcontroller plays a vital role in the smart systems
development. Microcontrollers have become an essential part in the present technologies that are
being presented daily. This article discusses temperature based fan speed control and monitoring
system using an Arduino system. This system is used to control the cooling system automatically
based on the room temperature. The system uses an Arduino board to implement a control
system. Since this system is proposed to control the cooling system and it is very important to
know Arduino controlled system well.
3
CHAPTER 3
INTRODUCTION ABOUT EMBEDDED SYSTEMS
This is in direct contrast to the personal computer in the family room. It too is comprised
of computer hardware and software and mechanical components (disk drives, for example).
However, a personal computer is not designed to perform a specific function rather; it is able to
do many different things. Many people use the term general-purpose computer to make this
distinction clear. As shipped, a general-purpose computer is a blank slate; the manufacturer does
not know what the customer will do wish it. One customer may use it for a network file server
another may use it exclusively for playing games, and a third may use it to write the next great
American novel.
One embedded system controls the anti-lock brakes, other monitors and controls the vehicle's
emissions, and a third displays information on the dashboard. In some cases, these embedded.
4
Systems are connected by some sort of a communication network, but that is certainly not a
requirement.
At the possible risk of confusing you, it is important to point out that a general-purpose
computer is itself made up of numerous embedded systems. For example, my computer consists
of a keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each of
which is an embedded system. Each of these devices contains a processor and software and is
designed to perform a specific function. For example, the modem is designed to send and receive
digital data over analog telephone line. That's it and all of the other devices can be summarized
in a single sentence as well.
5
Fig: 3.1 Building blocks of the hardware of an embedded system
The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is
a low-cost processor. Its main attraction is that on the chip itself, there will be many other
components such as memory, serial communication interface, analog-to digital converter
etc.
So, for small applications, a micro-controller is the best choice as the number of
external components required will be very less. On the other hand, microprocessors are
more powerful, but you need to use many external components with them. D5P is used
mainly for applications in which signal processing is involved such as audio and video
processing
MEMORY
The memory is categorized as Random Access 11emory (RAM) and Read Only
Memory (ROM). The contents of the RAM will be erased if power is switched off to the
chip, whereas ROM retains the contents even if the power is switched off.
So, the firmware is stored in the ROM. When power is switched on, the processor reads
the ROM; the program is program is executed.
INPUT DEVICES
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the
6
embedded system is no easy task. Many embedded systems will have a small keypad-you
press one key to give a specific command. A keypad may be used to input only the digits.
Many embedded systems used in process control do not have any input device for user
interaction; they take inputs from sensors or transducers 1’fnd produce electrical signals
that are in turn fed to other systems.
OUTPUT DEVICES
The output devices of the embedded systems also have very limited capability.
Some embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the
health status of the system modules, or for visual indication of alarms. A small Liquid
Crystal Display (LCD) may also be used to display some important parameters.
COMMUNICATION INTERFACES
The embedded systems may need to, interact with other embedded systems at
they may have to transmit data to a desktop. To facilitate this, the embedded systems are
provided with one or a few communication interfaces such as RS232, RS422, RS485,
Universal Serial Bus (USB), IEEE 1394, Ethernet etc.
APPLICATION-SPECIFIC CIRCUITRY
Sensors, transducers, special processing and control circuitry may be required fat
an embedded system, depending on its application. This circuitry interacts with the
processor to carry out the necessary work. The entire hardware has to be given power
supply either through the 230 volts main supply or through a battery. The hardware has to
design in such a way that the power consumption is minimized.
CHAPTER 4
DESIGN OF HARDWARE
This chapter briefly explains about the Hardware implementation of . It discuss the circuit
diagram of each module in detail.
4.1 ARDUINO
The most common version of Arduino is the Arduino Uno. This board is what most people
are talking about when they refer to an Arduino. The Uno is one of the more popular boards in
7
the Arduino family and a great choice for beginners. There are different revisions of Arduino
Uno, below detail is the most recent revision (Rev3 or R3).
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with an AC-to-DC adapter or battery to get started.
Microcontroller : ATmega328
Operating Voltage : 5V
Input Voltage (recommended) : 7-12V
Input Voltage (limits) : 6-20V
Digital I/O Pins : 14 (of which 6 provide PWM output)
Analog Input Pins : 6
DC Current per I/O Pin : 40 mA
DC Current for 3.3V Pin : 50 mA
Flash Memory : 32 KB (ATmega328) of which 0.5 KB used by
bootloader
SRAM : 2 KB (ATmega328)
EEPROM : 1 KB (ATmega328)
Clock Speed : 16 MHz
Length : 68.6 mm
Width : 53.4 mm
8
Fig 4.1 ArduinoUno R3 Board
Every Arduino board needs a way to be connected to a power source. The Arduino Uno
can be powered from a USB cable coming from your computer or a wall power supply that is
terminated in a barrel jack. The power source is selected automatically.
The USB connection is also how you will load code onto your Arduino board. Please on
my other post on how to program with Arduino can be found in Installing and Programming
Arduino.
9
NOTE: The board can operate on an external supply of 6 to 20 volts. If supplied with less than
7V,
however, the 5V pin may supply less than five volts and the board may be unstable.If
using more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts
.
VOLTAGE REGULATOR
The voltage regulator is not actually something you can (or should) interact with on the
Arduino. But it is potentially useful to know that it is there and what it’s for. The voltage
regulator does exactly what it says – it controls the amount of voltage that is let into the Arduino
board. Think of it as a kind of gatekeeper; it will turn away an extra voltage that might harm the
circuit. Of course,it has its limits, so don’t hook up your Arduino to anything greater than 20
volts.
POWER PINS
Voltage In Pin – The input voltage to the Arduino board when it’s using an external
power source(as opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
5V Pin – This pin outputs a regulated 5V from the regulator on the board. The board can
be supplied with power either from the DC power jack (7 – 12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board. It’s not recommended.3.3V Pin – A 3.3 volt supply
generated by the on-board regulator. Maximum current draw is 50 mA.
GROUND PINS
There are several GND pins on the Arduino, any of which can be used to ground your
circuit.
IOREF PIN
10
This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and select
the appropriate power source or enable voltage translators on the outputs for working with the
5V or 3.3V.
EXTERNAL INTERRUPTS
Pins 2 and 3 can be configured to trigger an interrupt on a low value, a rising or falling
edge, or a change in value.
PWM – You may have noticed the tilde (~) next to some of the digital pins (3, 5, 6, 9, 10, and
11). These pins act as normal digital pins, but can also be used for something called Pulse-Width
Modulation (PWM). Think of these pins as being able to simulate analog output (like fading an
LED in and out).
SPI – Pins 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). SPI stands for Serial Peripheral
Interface. These pins support SPI communication using the SPI library.
Analog Input Pins – Labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). These pins can read the signal from an analog sensor (like
a temperature sensor) and convert it into a digital value that we can read. By default they
measure from ground to 5 volts, though is it possible to change the upper end of their range using
11
the AREF Pin (Stands for Analog Reference. Most of the time you can leave this pin alone).
Additionally, some pins have specialized functionality:
TWI – Pins A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library.
RESET PIN
Bring this line LOW to reset the microcontroller.Typically used to add a reset button to
shields which block the one on the board.
LED INDICATORS
Power LED Indicator – Just beneath and to the right of the word “UNO” on your circuit
board, there’s a tiny LED next to the word ‘ON’. This LED should light up whenever you plug
your Arduino into a power source. If this light doesn’t turn on, there’s a good chance something
is wrong. Time to re-check your circuit!
On-Board LED – There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it’s off. This useful to quickly check if the board has
no problem as some boards has a pre-loaded simple blinking LED program in it.
TX & RX LEDs – These LEDs will give us some nice visual indications whenever our
Arduino is receiving or transmitting data (like when we’re loading a new program on to the
board).
Reset Button: Pushing the reset button temporarily connect the reset pin to ground and
restart any code that is loaded on the Arduino. This can be very useful if your code doesn’t
repeat, but you want to test it multiple times.
12
Fig:4.2 Block Diagram of Power Supply
4.3 TRANSFORMER
A transformer is an electrical device which is used to convert electrical power from one
Electrical circuit to another without change in frequency.
When AC is applied to the primary winding of the power transformer it can either be
stepped down or up depending on the value of DC needed. In our circuit the transformer of
230v/12-0-12v is used to perform the step down operation where a 230V AC appears as 12V AC
across the secondary winding.
4.4 RECTIFIER
13
A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of
conversion a.c to d.c is called “rectification.
BRIDGE RECTIFIER
OPERATION
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased while
D1 and D4 are in reverse biased. During negative half cycle of secondary voltage, the diodes D1 and
D4 are in forward biased while D2 and D3 are in reverse biased.
4.5 FILTER
A Filter is a device which removes the a.c component of rectifier output but allows the d.c
component to reach the load.We have seen that the ripple content in the rectified output of half wave
rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high
percentages of ripples is not acceptable for most of the applications. Ripples can be removed by one
of the following methods of filtering.
A capacitor, in parallel to the load, provides an easier by –pass for the ripples voltage though it due
to low impedance. At ripple frequency and leave the d.c.to appears the load.
14
As the name itself implies, it regulates the input applied to it. A voltage regulator is an
electrical regulator designed to automatically maintain a constant voltage level. In this project,
power supply of 5V and 12V are required. In order to obtain these voltage levels,7805 and 7812
voltage regulators are to be used. The first number 78 represents positive supply and the numbers
05,12 represent the required output voltage.
4.7 LCD
A model described here is for its low price and great possibilities most frequently used in
practice. It is based on the HD44780 microcontroller (Hitachi) and can display messages in two
lines with 16 characters each. It displays all the alphabets, Greek letters, punctuation marks,
mathematical symbols etc. In addition, it is possible to display symbols that user makes up on its
own. Automatic shifting message on display (shift left and right), appearance of the pointer,
backlight etc. are considered as useful characteristics.
There are pins along one side of the small printed board used for connection to the
microcontroller. There are total of 14 pins marked with numbers (16 in case the background light
is built in). Their function is described in the table below:
15
Ground 1 Vss - 0V
D0 – D7 are interpreted as
0
4 RS commands
1
D0 – D7 are interpreted as data
8 D1 0/1 Bit 1
9 D2 0/1 Bit 2
11 D4 0/1 Bit 4
12 D5 0/1 Bit 5
13 D6 0/1 Bit 6
16
Table 4.1 Pins functions
LCD screen consists of two lines with 16 characters each. Each character consists of 5x7
dot matrix. Contrast on display depends on the power supply voltage and whether messages are
displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin marked as
Vee. Trimmer potentiometer is usually used for that purpose. Some versions of displays have
built in backlight (blue or green diodes). When used during operating, a resistor for current
limitation should be used (like with any LE diode).
All data transferred to LCD through outputs D0-D7 will be interpreted as commands or
as data, which depends on logic state on pin RS: RS = 1 - Bits D0 - D7 are addresses of
characters that should be displayed. Built in processor addresses built in “map of characters” and
17
displays corresponding symbols. Displaying position is determined by DDRAM address. This
address is either previously defined or the address of previously transferred character is
automatically incremented. RS = 0 - Bits D0 - D7 are commands which determine display mode.
List of commands which LCD recognizes are given in the table below:
Execution
Command RS RW D7 D6 D5 D4 D3 D2 D1 D0
Time
In order to monitor the temperature continuously and compare this with the set
temperature preprogrammed in the microcontroller, initially this temperature value has to be read
and fed to the microcontroller. This temperature value has to be sensed. Thus a sensor has to be
used and the sensor used in this project is LM35. It converts temperature value into electrical
signals.
18
LM35 series sensors are precision integrated-circuit temperature sensors whose output
voltage is linearly proportional to the Celsius temperature.
The LM35 requires no external calibration since it is internally calibrated. . The LM35
does not require any external calibration or trimming to provide typical accuracies of ±1⁄4°C at
room temperature and ±3⁄4°C over a full −55 to +150°C temperature range.
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.
FEATURES:
19
Fig 4.7 The characteristic of this LM35 sensor
20
pulse width modulation
Similarly, if the switches keep the voltage at 12 for 3 times as long as at 0v, the average
will be 3/4 of 12v - or 9v, as shown below.
and if the output pulse of 12v lasts only 25% of the overall time, then the average is
By varying - or 'modulating' - the time that the output is at 12v (i.e. the width of the
positive pulse) we can alter the average voltage. So we are doing 'pulse width modulation'. I said
earlier that the output had to feed 'a suitable device'. A radio would not work from this: the radio
would see 12v then 0v, and would probably not work properly.
21
However a device such as a motor will respond to the average, so PWM is a natural for
motor control.
When the demand speed it in the middle (A) you get a 50:50 output, as in black. Half the
time the output is high and half the time it is low. Fortunately, there is an IC (Integrated circuit)
called a comparator: these come usually 4 sections in a single package.
One can be used as the oscillator to produce the triangular waveform and another to do
the comparing, so a complete oscillator and modulator can be done with half an IC and maybe 7
other bits.
The triangle waveform, which has approximately equal rise and fall slopes, is one of the
commonest used, but you can use a saw tooth (where the voltage falls quickly and rinses slowly).
You could use other waveforms and the exact linearity (how good the rise and fall are) is not too
important.
22
Traditional solenoid driver electronics rely on linear control, which is the application of a
constant voltage across a resistance to produce an output current that is directly proportional to
the voltage. Feedback can be used to achieve an output that matches exactly the control signal.
However, this scheme dissipates a lot of power as heat, and it is therefore very inefficient.
A more efficient technique employs pulse width modulation (PWM) to produce the
constant current through the coil. A PWM signal is not constant. Rather, the signal is on for part
of its period, and off for the rest.
The duty cycle, D, refers to the percentage of the period for which the signal is on. The
duty cycle can be anywhere
from 0, the signal is always off, to 1, where the signal is constantly on. A 50% D results in a
perfect square wave. (Figure 1)
A solenoid is a length of wire wound in a coil. Because of this configuration, the solenoid
has, in addition to its resistance, R, a certain inductance, L. When a voltage, V, is applied across
an inductive element, the current, I, produced in that element does not jump up to its constant
value, but gradually rises to its maximum over a period of time called the rise time Figure.
Conversely, I does not disappear instantaneously, even if V is removed abruptly, but decreases
back to zero in the same amount of time asthe rise time.
23
Fig 4.10 steady-state value
Therefore, when a low frequency PWM voltage is applied across a solenoid, the current
through it will be increasing and decreasing as V turns on and off. If D is shorter than the rise
time, I will never achieve its maximum value, and will be discontinuous since it will go back to
zero during V’s off period Figure In contrast, if D is larger than the rise time, I will never fall
back to zero, so it will be continuous, and have a DC average value. The current will not be
constant, however, but will have a ripple Figure
24
At high frequencies, V turns on and off very quickly, regardless of D, such that the
current does not have time to decrease very far before the voltage is turned back on. The
resulting current through the solenoid is therefore considered to be constant. By adjusting the D,
the amount of output current can be controlled. With a small D, the current will not have much
time to rise before the high frequency PWM voltage takes effect and the current stays constant.
With a large D, the current will be able to rise higher before it becomes constant. (Figure 5)
4.10 DITHER
Static friction, stiction, and hysteresis can cause the control of a hydraulic valve to be
erratic and unpredictable. Stiction can prevent the valve spool from moving with small input
changes, and hysteresis can cause the shift to be different for the same input signal. In order to
counteract the effects of stiction and hysteresis, small vibrations about the desired position are
created in the spool. This constantly breaks the static friction ensuring that it will move even with
small input changes, and the effects of hysteresis are average out.
Dither is a small ripple in the solenoid current that causes the desired vibration and there
by increases the linearity of the valve. The amplitude and frequency of the dither must be
carefully chosen. The amplitude must be large enough and the frequency slow enough that the
spool will respond, yet they must also be small and fast enough not to result in a pulsating
output.
The optimum dither must be chosen such that the problems of stiction and hysteresis are
overcome without new problems being created. Dither in the output current is a byproduct of low
25
frequency PWM, as seen above. However, the frequency and amplitude of the dither will be a
function of the duty cycle, which is also used to set the output current level. This means that low
frequency dither is not independent of current magnitude. The advantage of using high frequency
PWM is that dither can be generated separately, and then superimposed on top of the output
current.
This allows the user to independently set the current magnitude (by adjusting the D), as
well as the dither frequency and amplitude. The optimum dither, as set by the user, will therefore
be constant at all current levels.
26
This is normally done with a variable resistor and provides a limited useful range of
operation. The operational range is limited for most applications primarily because torque drops
off faster than the voltage drops.
Most DC motors cannot effectively operate with a very low voltage. This method also
causes overheating of the coils and eventual failure of the motor if operated too slowly. Of
course, DC motors have had speed controllers based on varying voltage for years, but the range
of low speed operation had to stay above the failure zone described above.
Additionally, the controlling resistors are large and dissipate a large percentage of energy
in the form of heat. With the advent of solid state electronics in the 1950’s and 1960’s and this
technology becoming very affordable in the 1970’s & 80’s the use of pulse width modulation
(PWM) became much more practical. The basic concept is to keep the voltage at the full value
and simply vary the amount of time the voltage is applied to the motor windings. Most PWM
circuits use large transistors to simply allow power On & Off, like a very fast switch.
This sends a steady frequency of pulses into the motor windings. When full power is
needed one pulse ends just as the next pulse begins, 100% modulation. At lower power settings
the pulses are of shorter duration. When the pulse is On as long as it is Off, the motor is
operating at 50% modulation. Several advantages of PWM are efficiency, wider operational
range and longer lived motors. All of these advantages result from keeping the voltage at full
scale resulting in current being limited to a safe limit for the windings.
PWM allows a very linear response in motor torque even down to low PWM% without
causing damage to the motor. Most motor manufacturers recommend PWM control rather than
the older voltage control method. PWM controllers can be operated at a wide range of
frequencies. In theory very high frequencies (greater than 20 kHz) will be less efficient than
lower frequencies (as low as 100 Hz) because of switching losses.
The large transistors used for this On/Off activity have resistance when flowing current, a
loss that exists at any frequency.
27
These transistors also have a loss every time they “turn on” and every time they “turn
off”. So at very high frequencies, the “turn on/off” losses become much more significant. For our
purposes the circuit as designed is running at 526 Hz. Somewhat of an arbitrary frequency, it
works fine.
Depending on the motor used, there can be a hum from the motor at lower PWM%. If
objectionable the frequency can be changed to a much higher frequency above our normal
hearing level (>20,000Hz) .
Progressive control is commanded by a 0-5 volt input signal. This starts to increase PWM
% from the low speed setting as the 0-5 volt signal climbs. This signal can be generated from a
throttle position sensor, a Mass Air Flow sensor, a Manifold Absolute Pressure sensor or any
other way the user wants to create a 0-5 volt signal. This function could be set to increase fuel
pump power as turbo boost starts to climb (MAP sensor). Or, if controlling a water injection
pump, Low Speed could be set at zero PWM% and as the TPS signal climbs it could increase
PWM%, effectively increasing water flow to the engine as engine load increases. This controller
could even be used as a secondary injector driver (several injectors could be driven in a batch
mode, hi impedance only), with Progressive control (0-100%) you could control their output for
fuel or water with the 0-5 volt signal.
Progressive control adds enormous flexibility to the use of this controller. Hi Speed is
that same as hard wiring the motor to a steady 12 volt DC source. The controller is providing
100% PWM, steady 12 volt DC power. Hi Speed is selected three different ways on this
controller: 1) Hi Speed is automatically selected for about one second when power goes on. This
28
gives the motor full torque at the start. If needed this time can be increased ( the value of C1
would need to be increased). 2) High Speed can also be selected by applying 12 volts to the High
Speed signal wire. This gives Hi Speed regardless of the Progressive signal.
When the Progressive signal gets to approximately 4.5 volts, the circuit achieves 100%
PWM – Hi Speed.
The Space Vector PWM generation module accepts modulation index commands and
generates the appropriate gate drive waveforms for each PWM cycle. This section describes the
operation and configuration of the SVPWM module.
A three-phase 2-level inverter with dc link configuration can have eight possible
29
switching states, which generates output voltage of the inverter. Each inverter switching state
generates a voltage Space Vector (V1 to V6 active vectors, V7 and V8 zero voltage vectors) in
the Space Vector plane (Figure: space vector diagram). The magnitude of each active vector
(V1to V6) is 2/3 Vdc (dc bus voltage).
The Space Vector PWM (SVPWM) module inputs modulation index commands
(U_Alpha and U_Beta) which are orthogonal signals (Alpha and Beta) as shown in Figure. The
gain characteristic of the SVPWM module is given in Figure . The vertical axis of Figure
represents the normalized peak motor phase voltage (V/Vdc) and the horizontal axis represents
the normalized modulation index (M).
The inverter fundamental line-to-line Rms output voltage (Vline) can be approximated (linear
range) by the following equation:
………….. (1)
30
This document is the property of International Rectifier and may not be copied or distributed
without expressed consent
The maximum achievable modulation (Umag_L) in the linear operating range is given by:
………….. (2)
Over modulation occurs when modulation Umag > Umag_L. This corresponds to the
condition where the voltage vector in (Figure: voltage vector rescaling)increases beyond the
hexagon boundary.
Under such circumstance, the Space Vector PWM algorithm will rescale the magnitude
of the voltage vector to fit within the Hexagon limit.
The magnitude of the voltage vector is restricted within the Hexagon; however, the phase
angle (θ) is always preserved. The transfer gain (Figure :transfer characteristics) of the PWM
modulator reduces and becomes non-linear in the over modulation region.
31
Fig 4.15 Space Vector Diagram
This document is the property of International Rectifier and may not be copied or
distributed without expressed consent.
Upon receiving the modulation index commands (UAlpha and UBeta) the sub-module
SVPW M_Tm starts its calculations at the rising edge of the PWM Load signal. The SVPWM
_Tm module implements an algorithm that selects (based on sector determination) the active
space vectors (V1 to V6) being used and calculates the appropriate time duration (w.r.t. one
PWM cycle) for each active vector. The appropriated zero vectors are also being selected. The
SVPWM _Tm module consumes 11 clock cycles typically and 35 clock cycles (worst case Tr) in
over modulation cases. At the falling edge of nSYNC, a new set of Space Vector times and
vectors are readily available for actual PWM generation (PhaseU, PhaseV, PhaseW) by sub
module Pwm Generation. It is crucial to trigger PwmLoad at least 35 clock cycles prior to the
falling edge of nSYNC signal; otherwise new modulation commands will not be implemented at
the earliest PWM cycle.
The above Figures voltage vector rescaling illustrates the PWM waveforms for a voltage
vector locates in sector I of the Space Vector plane (shown in Figure). The gating pattern outputs
(PWMUH … PWMWL) include dead time insertion
32
Fig 4.16 2-phase (6-step PWM) Space Vector PWM
33
4.18 PWM CARRIER PERIOD
Input variable PwmCval controls the duration of a PWM cycle. It should be populated
by the system clock frequency (Clk) and Pwm frequency (PwmFreq) selection. The variable
should be calculated as:
……….. (3)
The input resolution of the Space Vector PWM modulator signals U_Alpha and U_Beta is
16-bit signed integer. However, the actual PWM resolution (PwmCval) is limited by the system
clock frequency.
Dead time Insertion Logic Dead time is inserted at the output of the PWM Generation
Module. The resolution is 1 clock cycle or 30nsec at a 33.3 MHz clock and is the same as those
of the voltage command registers and the PWM carrier frequency register.
The dead time insertion logic chops off the high side commanded volt*seconds by the
amount of dead time and adds the same amount of volt*seconds to the low side signal. Thus, it
eliminates the complete high side turn on pulse if the commanded volt*seconds is less than the
programmed dead time.
34
The dead time insertion logic inserts the programmed dead time between two high and
low side of the gate signals within a phase. The dead time register is also double buffered to
allow “on the fly” dead time change and control while PWM logic is inactive.
There are two modes of operation available for PWM waveform generation, namely the
Center Aligned Symmetrical PWM (Figure) and the Center Aligned Asymmetrical PWM
(Figure)The volt-sec can be changed every half a PWM cycle (Tpwm) since Pwm Load occurs
every half a PWM cycle (compare Figure :symmetrical pwm and Figure :asymmetrical PWM).
With Symmetrical PWM mode, the inverter voltage Config = 0), the inverter voltage can be
changed at two times the rate of the switching frequency.
This will provide an increase in voltage control bandwidth, however, at the expense of
increased current harmonic
Three-phase and two-phase Space Vector PWM modulation options are provided for the
IRMCx203. The Volt-sec generated by the two PWM strategies are identical; however with
35
2-phase modulation the switching losses can be reduced significantly, especially when
high switching frequency (>10Khz) is employed. Figure: three-phase and two phase modulation
shows the switching pattern for one PWM cycle when the voltage vector is inside sector 1
The field Two Phase PWM of the PWM Config write register group provides selection of
three-phase or two-phase modulation. The default setting is three-phase modulation. Successful
36
operation of two-phase modulation in the entire speed operating range will depend on hardware
configuration. If the gate driver employs a bootstrap power supply strategy, disoperation will
occur at low motor fundamental frequencies (< 2Hz) under two-phase modulation control.
In many industrial applications, Sinusoidal Pulse Width Modulation (SPWM), also called
Sine coded Pulse Width Modulation, is used to control the inverter output voltage. SPWM
maintains good performance of the drive in the entire range of operation between zero and 78
percent of the value that would be reached by square-wave operation. If the modulation index
exceeds this value, linear relationship between modulation index and output voltage is not
maintained and the over-modulation methods are required
Fig: space vector shows 8 space vectors in according to 8 switching positions of inverter,
V* is the phase-to-center voltage which is obtained by proper selection of adjacent vectors V1
and V2.
37
Determination of Switching times
The reference space vector V* is given by Equation (1), where T1, T2 are the intervals of
application of vector V1 and V2 respectively, and zero vectors V0 and V7 are selected for T0.
Fig. below shows that the inverter switching state for the period T1 for vector V1 and for
vector V2, resulting switching patterns of each phase of inverter are shown in Fig. pulse pattern
of space vector PWM.
38
Fig 4.23 Pulse pattern of Space vector PWM
4.24 COMPARISION
In Fig:- comparison, U is the phase to- center voltage containing the triple order
harmonics that are generated by space vector PWM, and U1 is the sinusoidal reference voltage.
But the triple order harmonics are not appeared in the phase-to-phase voltage as well. This leads
to the higher modulation index compared to the SPWM.
As mentioned above, SPWM only reaches to 78 percent of square wave operation, but the
amplitude of maximum possible voltage is 90 percent of square-wave in the case of space vector
PWM.
39
This means that Space Vector PWM can produce about 15 percent higher than
Sinusoidal PWM in output voltage
The Pulse Width modulation technique permits to obtain three phase system voltages,
which can be applied to the controlled output. Space Vector Modulation (SVM) principle differs
from other PWM processes in the fact that all three drive signals for the inverter will be created
simultaneously. The implementation of SVM process in digital systems necessitates less
operation time and also less program memory.
The SVM algorithm is based on the principle of the space vector u*, which describes all
three output voltages ua, ub and uc :
40
u* = 2/3 . ( ua + a . ub + a2 . uc ) ………(5)
Where a = -1/2 + j . v3/2 We can distinguish six sectors limited by eight discrete vectors
u0…u7 (fig:- inverter output voltage space vector), which correspond to the 23 = 8 possible
switching states of the power switches of the inverter.
The amplitude of u0 and u7 equals 0. The other vectors u1…u6 have the same amplitude
and are 60 degrees shifted.
By varying the relative on-switching time Tc of the different vectors, the space vector u*
and also the output voltages ua, ub and uc can be varied and is defined as:
ua = Re ( u* )
ub = Re ( u* . a-1)
uc = Re ( u* . a-2) …………(6)
During a switching period Tc and considering for example the first sector, the vectors u0,
u1 and u2 will be switched on alternatively.
41
Fig 4.26 Definition of the Space vector
Depending on the switching times t0, t1 and t2 the space vector u* is defined as:
u* = 1/Tc . ( t0 . u0 + t1 . u1 + t2 . u2 )
u* = t0 . u0 + t1 . u1 + t2 . u2
u* = t1 . u1 + t2 . u2 ………….. (7)
Where
t0 + t1 + t2 = Tc and
t0 + t1 + t2 = 1
t2 = m . sin a
t0 = 1 - t1 - t2
Their values are implemented in a table for a modulation factor m = 1. Then it will be
easy to calculate the space vector u* and the output voltages ua, ub and uc. The voltage vector
u* can be provided directly by the optimal vector control laws w1, v sa and vsb. In order to
42
generate the phase voltages ua, ub and uc corresponding to the desired voltage vector u* the
following SVM strategy is proposed.
4.27 DC FAN
A fan is a powered machine used to create flow within a fluid, typically a gas such as air.
A fan consists of a rotating arrangement of vanes or blades which act on the air. The rotating
assembly of blades and hub is known as an impeller, a rotor, or a runner. Usually, it is contained
within some form of housing or case. [1] This may direct the airflow or increase safety by
preventing objects from contacting the fan blades. Most fans are powered by electric motors, but
other sources of power may be used, including hydraulic motors, handcranks, internal
combustion engines, and solar power.
Mechanically, a fan can be any revolving vane or vanes used for producing currents of
air. Fans produce air flows with high volume and low pressure(although higher than ambient
pressure), as opposed to compressors which produce high pressures at a comparatively low
volume. A fan blade will often rotate when exposed to an air fluid stream, and devices that take
advantage of this, such as anemometers and wind turbines, often have designs similar to that of a
fan.
Typical applications include climate control and personal thermal comfort (e.g., an
electric table or floor fan), vehicle engine cooling systems (e.g., in front of a radiator), machinery
cooling systems (e.g., inside computers and audio power amplifiers), ventilation, fume
extraction, winnowing (e.g., separating chaff of cereal grains), removing dust (e.g. sucking as in
a vacuum cleaner), drying (usually in combination with a heat source) and to provide draft for
a fire.
While fans are often used to cool people, they do not actually cool air (electric fans may
warm it slightly due to the warming of their motors), but work by evaporative
cooling of sweat and increased heat convection into the surrounding air due to the airflow from
the fans. Thus, fans may become ineffective at cooling the body if the surrounding air is near
body temperature and contains high humidity.
43
4.28 TEAM
With the advent of practical steam power, fans could finally be used for ventilation. In
1837 William Fourness of England installed a steam-driven fan at Leeds. In 1849 a 6 m radius
steam driven fan, designed by William Brunton, was made operational in the Gelly
Gaer Colliery of South Wales. The model was exhibited at the Great Exhibition of 1851. Also in
1851 David Boswell Reid, a Scottish doctor, installed four steam powered fans in the ceiling
of St George's Hospital in Liverpool, so that the pressure produced by the fans would force the
incoming air upward and through vents in the ceiling. Improvements in the technology were
made by James Nasmyth, Frenchman Theophile Guibal and J. R. Waddle.
4.29 ELECTRICAL
Between 1882 and 1886 Schuyler Wheeler invented a fan powered by electricity.[10] It
was commercially marketed by the American firm Crocker & Curtis electric motor company. In
1882, Philip Diehl developed the world's first electric ceiling fan. During this intense period of
innovation, fans powered by alcohol, oil, or kerosene were common around the turn of the 20th
century. In 1909, KDK of Japan pioneered the invention of mass-produced electric fans for home
use. In the 1920s, industrial advances allowed steel fans to be mass-produced in different shapes,
bringing fan prices down and allowing more homeowners to afford them. In the 1930s, the first
art deco fan (the "swan fan") was designed. By the 1940s, Crompton Greaves of India became
the world's largest manufacturer of electric ceiling fans mainly for sale in India, Asia and the
Middle East. By the 1950s, table and stand fans were manufactured in colors that were bright and
eye catching.
Window and central air conditioning in the 1960s caused many companies to discontinue
production of fans.[11] But in the mid 1970s, with an increasing awareness of the cost of
electricity and the amount of energy used to heat and cool homes, turn-of-the-century styled
ceiling fans became immensely popular again as both decorative and energy efficient units.
In 1998, Walter K. Boyd invented the HVLS ceiling fan. A lifelong inventor, Boyd was
charged with developing a system to cool dairy cattle. Dairy cattle, when overheated, decrease
milk production. Using the laws of physics and airflow, Boyd developed a slow moving fan that
incorporated 10 aluminum blades and was 8-feet diameter. Unlike traditional ceiling fans that
44
move quickly, this large fan moved slowly. Due to its diameter size, the fan moved a large
column of air down and out 360 degrees and continuously mixed fresh air with the stale air
inside the barn. They are used in many industrial and agricultural settings, because of their
energy efficiency. It also cooled the inside of the barn without causing the dairy cattle undue
stress or kicking up dust.
After much testing, Boyd discovered HVLS fan technology to be energy efficient as it
costs less to run one HVLS fan than it did to run 50 small high-speed fans. Due to the
skyrocketing costs of energy, HVLS commercial ceiling fans are used today to supplement
HVAC systems in industrial and commercial settings, including warehouses, manufacturing
facilities and malls, as HVLS fans help lower heating and cooling costs.[12]
Mechanical revolving blade fans are made in a wide range of designs. They are used on
the floor, table, desk, or hung from the ceiling (ceiling fan). They can also be built into
a window, wall, roof, chimney, etc. Most electronic systems such as computers include fans to
cool the circuits inside, and in appliances such as hair dryers and portable space heaters and
mounted/installed wall heaters. They are also used for moving air in air-conditioning systems,
and in automotive engines, where they are driven by belts or by direct motor. Fans used for
comfort create a wind chill by increasing the heat transfer coefficient, but do not lower
temperatures directly. Fans used to cool electrical equipment or in engines or other machines do
45
cool the equipment directly by forcing hot air into the cooler environment outside of the
machine.
There are three main types of fans used for moving air, axial, centrifugal (also called radial)
and cross flow (also called tangential). The American Society of Mechanical
Engineers Performance Testing Code 11 (PTC)[13] provides standard procedures for conducting
and reporting tests on fans, including those of the centrifugal, axial, and mixed flows.
Axial-flow fans have blades that force air to move parallel to the shaft about which the
blades rotate. This type of fan is used in a wide variety of applications, ranging from small
cooling fans for electronics to the giant fans used in wind tunnels. Axial flow fans are applied in
air conditioning and industrial process applications. Standard axial flow fans have diameters of
300–400 mm or 1800–2000 mm and work under pressures up to 800 Pa. Special types of fans are
used as low pressure compressor stages in aircraft engines. Examples of axial fans are:
46
Table fan: Basic elements of a typical table fan include the fan blade, base, armature and
lead wires, motor, blade guard, motor housing, oscillatorgearbox, and oscillator shaft. The
oscillator is a mechanism that motions the fan from side to side.
The armature axle shaft comes out on both ends of the motor, one end of the shaft is
attached to the blade and the other is attached to the oscillator gearbox. The motor case joins
to the gearbox to contain the rotor and stator. The oscillator shaft combines to the weighted
base and the gearbox. A motor housing covers the oscillator mechanism. The blade guard
joins to the motor case for safety.
Domestic Extractor Fan: Wall or ceiling mounted, the domestic extractor fan is employed
to remove moisture and stale air from domestic dwellings. Bathroom extractor fans typically
utilize a four inch (100mm) impeller, whilst kitchen extractor fans typically use a six inch
(150mm) impeller as the room itself is often bigger.
Axial fans with five inch (125mm) impellers are also used in larger bathrooms though
are much less common. Domestic axial extractor fans are not suitable for duct runs over 3m
or 4m, depending on the number of bends in the run, as the increased air pressure in longer
pipework inhibits the performance of the fan.
Electro-mechanical fans: Among collectors, are rated according to their condition, size,
age, and number of blades. Four-blade designs are the most common. Five-blade or six-blade
designs are rare. The materials from which the components are made, such as brass, are
important factors in fan desirability.
Ceiling fan: A fan suspended from the ceiling of a room is a ceiling fan. Most ceiling fans
rotate at relatively low speeds and do not have blade guards. Ceiling fans can be found in
both residential and industrial/commercial settings.
47
In automobiles, a mechanical fan provides engine cooling and prevents the engine from
overheating by blowing or drawing air through a coolant-filled radiator.
The fan may be driven with a belt and pulley off the engine's crankshaft or an electric
motor switched on or off by a thermostatic switch. Computer fan for cooling electrical
components
Fans inside audio power amplifiers help to draw heat away from the electrical
components.
Variable-pitch fan: A variable-pitch fan is used where precise control of static pressure
within supply ducts is required. The blades are arranged to rotate upon a control-pitch hub.
The fan wheel will spin at a constant speed. The blades follow the control pitch hub. As the
hub moves toward the rotor, the blades increase their angle of attack and an increase in flow
results.
48
CHAPTER 5
DESIGN OF SOFTWARE
This is free software (evaluation version) which solves many of the pain points for an
embedded system developer. This software is an Integrated Development Environment (IDE),
which integrated text editor to write program, a compiler and it will convert your source code
into HEX file. Here is simple guide to start working with Arduino IDE Vision which can be used
for:
Debugging programs
Before you can start doing anything with the Arduino, you need to download and install
the Arduino IDE (integrated development environment).
49
Fig 5.1 Step 1 Downloading of software
After the opening IDE the settings are changed in order to connect to the Arduino.
50
Before you can start doing anything in the Arduino programmer, you must set the board-type and
serialport.
Select the version of board that you are using. Since I have an Arduino Uno plugged in, I
obviously selected "Arduino Uno."
Arduino programs are called sketches. The Arduino programmer comes with a ton of example
sketches preloaded. This is great because even if you have never programmed anything in your
life, you can load one of these sketches and get the Arduino to do something.
51
Fig 5.4 Step 4 Arduino programs are called sketches
52
For instance, connect center sweep (middle pin) of a potentiometer to A0, and the outer pins,
respectively, to 5v and ground. Next upload the sketch shown below:
Click the button to engage the serial monitor which looks like a magnifying glass. You can now
see the numbers being read by the analog pin in the serial monitor. When you turn the knob the
numbers will increase and decrease.
The numbers will be between the range of 0 and 1023. The reason for this is that the analog pin
is converting a voltage between 0 and 5V to a discreet number.
53
CHAPTER 6
PROJECT DESCRIPTION
This chapter deals with working and circuits of “Speed control of Fan ”. It can be simply
understood by its block diagram &circuit diagram.
54
Fig 6.1 block diagram
LM 35
ARDUINO
DC FAN
6.4. WORKING
I used an LCD shield to display the current temperature and speed of the fan, but you can
use the circuit without the LCD display. You also need to select the transistor by the type of fan
55
that you use. In my case I used the well-known BD139 transistor and a 9V battery to provide
power to the fan and transistor.
The LM35 temperature sensor and red led are powered with 5V from the Arduino board. As you
can see in the sketch on the first line I included the Liquid Crystal library (header) that includes
useful functions to use when an LCD is connected to the Arduino board. Then I set the pins for
the sensor, led and fan. The most important part is to set the variables temp Min and temp Max
with your desired values.
Temp Min is the temperature at which the fan starts to spin and temp Max is the
temperature when the red led lights warning you that the maximum temp was reached. For
example if you set temp Min at 30 and temp Max at 35 then the fan will start spinning at 30°C
and reach its maximum speed at 35°C. We store the temperature value in the temp variable and
then use some if functions to check if temp is lower than temp Min and if so let the fan OFF
(LOW).
The next if ( is to check if temperature is higher than the min Temp and lower than the
temp Max and if so then use the map) function to re-map the temp value from one value to
another. In our case fan Speed will have a value of 32 at temp Min and 255 at temp Max.
These values are Temperature based fan speed controller 28 used to control the speed of
the fan using PWM and the analog Write(). The fan LCD re-maps the temp to allow the display
of fanSpeed in a 0 to 100% range so you can say that the speed of the fan is directly dependent of
the LM35’s temperature.
When the temperature reaches the value set in tempMax the fan will be at its maximum
spinning velocity and the LCD will display FANS: 100% even though the temperature might.
.Increase above temp Max. The rest of the explanation can be read in the comments area of the
Arduino sketch.
In the next project I will make a temperature protection circuit that will turn off the power
of equipment when its temperature has reached a certain value.
56
CHAPTER 7
APPLICATIONS
1. Temperature based fan speed controller is useful for cooling the processor in the laptops
and personal computers “more efficiently”. Generally fan in laptop comes with only two
or three possible speeds. So it results in more power consumption.
57
2. The fan designed in this project, has different values of speed according to temperature
change. This can be also used in small scale industries for cooling the
electrical/mechanical equipment. The whole circuit except motor and fan can be
manufactured on a single PCB, and it can be used for temperature based control
operations.
CHAPTER 8
ADVANTAGES:
58
2. This project can be used in Industry.
4. To monitor the environments that is not comfortable, or possible, for humans to monitor,
especially for extended periods of time.
5. Prevents waste of energy when it’s not hot enough for a fan to be needed.
6. To assist people who are disabled to adjust the fan speed automatically.
DISADVANTAGES:
CHAPTER 9
FUTURE SCOPE:
1. We can monitor more parameters like humidity, light and at the same time control them.
59
4. When temperature exceeds the limit, a call will be dialled to the respective given number
by an automatic Dialler system.
CHAPTER 10
CONCLUSION
Aim of this project is to increase the safety feature for coal miners. This system can
monitor most important dangerous events. Monitoring the dangerous event and performing
rescue operation for miners safety made easy with this project. In this project we used FAN For
60
control the heat in coal miners. All the sensors can be easily place on coal mines that helps in
continuous monitoring.
CHAPTER 11
REFERENCES
61
[2] CHENG Qiang, SUN Ji-ping, ZHANG Zhe, ZHANG Fan “ZigBee Based Intelligent Helmet
for Coal Miners” World Congress on Computer Science and Information Engineering 2009
[3]. D. Kock and J. W. Oberholzer, “The development and application of electronic technology
to increase health, safety, and productivity in the South African coal mining industry,” IEEE
Trans. on Industry Applications, vol. 33, no. 1, pp. 100- 105, Jan/Feb. 1997.
[4] “Head and neck injury criteria a consensus workshop” Research information and publications
center. University of Michigan transportation research institute.
62