Chapter No.:-01 Introuuction: Pulse-Width Modulation (PWM), Modulation (PDM)
Chapter No.:-01 Introuuction: Pulse-Width Modulation (PWM), Modulation (PDM)
USING OPTOCOUPLER.
CHAPTER NO.:- 01
INTROUUCTION
Pulse-width modulation (PWM), or pulse-duration modulation(PDM), is
a modulation technique that conforms the width of the pulse, formally the pulse duration, based
on modulator signal information. Although this modulation technique can be used to encode
information for transmission, its main use is to allow the control of the power supplied to
electrical devices, especially to inertial loads such as motors. In addition, PWM is one of the two
principal algorithms used in photovoltaic solar battery chargers, the other being MPPT.
The average value of voltage (and current) fed to the load is controlled by turning the switch
between supply and load on and off at a fast pace. The longer the switch is on compared to the
off periods, the higher the power supplied to the load is.
The PWM switching frequency has to be much faster than what would affect the load, which
is to say the device that uses the power. Typically switchings have to be done several times a
minute in an electric stove, 120 Hz in a lamp dimmer, from few kilohertz (kHz) to tens of kHz
for a motor drive and well into the tens or hundreds of kHz in audio amplifiers and computer
power supplies.
The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of
time; a low duty cycle corresponds to low power, because the power is off for most of the time.
Duty cycle is expressed in percent, 100% being fully on.
The main advantage of PWM is that power loss in the switching devices is very low. When a
switch is off there is practically no current, and when it is on, there is almost no voltage drop
across the switch. Power loss, being the product of voltage and current, is thus in both cases
close to zero. PWM also works well with digital controls, which, because of their on/off nature,
can easily set the needed duty cycle.
PWM has also been used in certain communication systems where its duty cycle has been
used to convey information over a communications channel.
1
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
PWM stands for Pulse Width Modulation. This means that we can generate a pulse whose
width (ie duration) can be altered. Microcontrollers have Analogue To Digitals Convertors
(ADC) to convert a voltage from the analogue world to a number but do not have Digital to
Analogue Convertors (DAC) to convert digital numbers back into variable voltages. PWM is the
closest solution. By turning an output pin repeatedly high and low very quickly then the result is
an average of the amount of time the output is high. If it is always low the result is 0v, always
high then the result is 5v, if half-and-half then the result is 2.5v. so we can generate analog
voltage from 0 to 5 volt by using PWM technique and by applying this variable D.C. voltage we
change Speed of D.C. motor For example: if you connect a motor to a battery then it will,
eventually, rotate at full speed. Disconnect the battery and the motor will take a little while to
slow down until it stops. Equally if the motor is only connected to the battery for a very short
time before being disconnected then it wont have enough time to get up to full speed. So if we
repeatedly connected and disconnected the battery then the motor would start turning, then slow
down, start turning, slow down etc. Obviously if we only did this a few times a second then it
would be kind of jerky - but if we did it fast enough then we could control the speed of the motor
dependent on the percentage of time the battery was connected versus not connected.
2
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
OBJECTIVE:-
IMPORTANCE:-
There are various types of motor drive working all over the world. These motors are used to
drive the various types of loads. With respect to the loads these motors requires various types of
speed. So, there is a great need of many speed controlling devices.
LIMITATION:-
The main limitation involved with our motor controller is the Electromagnetic interference
(EMI). We know the switching or commutation of any switch generates voltage and current
transients that are characterized by a whole spectrum of frequencies, ranging from the
fundamental power circuit frequency up into the radio frequency band . This EMI creates
problem for digital tachometer to show accurate speed reading of the motor. We also observed
that at slow speed heat sink heated up quickly. This is because at slow speed i.e. when pulse
width of the gate signal of the MOSFET decreases factor (ratio of the a.c components to the
average value) also increases and causes the heat sink to heat up quickly. Fluctuations of supply
voltage of our machine lab also create problems to control the speed of motor exactly
3
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-02
PWM INTRODUCTION
Microcontrollers are very good with whole (integer) numbers. So assuming we have two
numbers: one called BOTTOM and a higher number called TOP. By making the microcontroller
start at BOTTOM, and then count upwards until it reaches TOP, and then repeat the process - if
we were to then plot the resulting numbers on a graph then we end up with what is called a
Sawtooth waveform that looks like this.
4
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Of course you can never output this signal from your controller as it can only cope with on or
off and not all these numbers - it just shows how the number starts at BOTTOM, counts up to
TOP, and then starts all over again.
So the next step is to add a 'comparator' which is used to decide whether our output pin should
be high or low. This comparator is yet another number which is somewhere in the range between
BOTTOM and TOP. If the current Sawtooth number is less than the comparator value then the
output will be low, otherwise the output will be high.
If the value of the comparator was equal to BOTTOM then the Sawtooth value could never be
lower than bottom so our output pin would always be high. Equally if the comparator value
was equal to TOP then the output pin would always be low. However: if the comparator value
was the mid-value between BOTTOM and TOP then the output pin would spend 50% of its
time being low and the other 50% being high. By varying the comparator value we can change
the 'high' time anywhere between 0% and 100% of the time.
Looking back at the previous diagram we can see that the sawtooth waveform is 6 units high and
repeats every 3 units across. So if we were to set our comparator to be 2 units above the
BOTTOM value then what would happen?
The sawtooth waveform would spend 1/3 of the time below this value and the remaining 2/3 of
the time above value. So our digital output pin would be a square wave that is low for 1/3 of
the time and high for 2/3 of the time.
5
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Frequency
In the above example the sawtooth waveform repeated every 3 units. Assuming that
each unit was 1ms then our waveform repeats every 3ms.
Given that Frequency = 1 / Time
then the signal frequency is 1/0.003, or 333.33 Hz. Note that with PWM this
frequency remains constant - we just use the comparator value to adjust the duty cycle.
6
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
The L293D is a quadruple push-pull 4 channel driver capable of delivering 600 mA (1.2 A peak
surge) per channel. The L293D is ideal for controlling the forward/reverse/brake motions of
small DC motors controlled by a microcontroller
The L293D is a high voltage, high current four channel driver designed to accept standard
TTL logic levels and drive inductive loads (such as relays solenoids, DC and stepping motors)
and switching power transistors. The L293D is suitable for use in switching applications at
frequencies up to 5 KHz.
Features Include
A simple schematic for interfacing a DC motor using L293D is shown below. As you can
see in the circuit, three pins are needed for interfacing a DC motor (A, B, Enable). If you
want the o/p to be enabled completely then you can connect Enable to VCC and only 2
pins needed from controller to make the motor work. As per the truth mentioned in the
image above it‘s fairly simple to program the microcontroller. Its also clear from the truth
7
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
table of BJT circuit and L293D the programming will be same for both of them, just
keeping in mind the allowed combinations of A and B.
As you can see in the circuit, three pins are needed for interfacing a DC motor (A, B, Enable).
If you want the o/p to be enabled completely then you can connect Enable to VCC and only 2
pins needed from controller to make the motor work. As per the truth mentioned in the image
above its fairly simple to program the microcontroller. Its also clear from the truth table of BJT
circuit and L293D the programming will be same for both of them, just keeping in mind the
allowed combinations of A and B.
8
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Suppose you want to run motor by half of the its rating speed then send 50% duty cycle
square wave at enable pin effectively you will get 50% on tine but due to high frequency and
inertia motor seems to run continuously so code will be
2.3 Opto-Isolation:-
An optocoupler or sometimes refer to as optoisolator allows two circuits to exchange signals yet
remain electrically isolated. This is usually accomplished by using light to relay the signal. The
standard optocoupler circuits design uses a LED shining on a phototransistor-usually it is a npn
transistor and not pnp. The signal is applied to the LED, which then shines on the transistor in
the IC.
The light is proportional to the signal, so the signal is thus transferred to the phototransistor.
We will explain only the most commonly used opto coupler which is the combination of LED
and phototransistor. See the optocoupler ic schematic diagram below:
The microcontroller 89c51 has two pins that are used for transferring and receiving data serially.
These two pins are called as TXD and RXD i.e. pin 11(P3.0) and pin 10(P3.1) respectively.
These pins are TTL compatible so it requires a line driver to make them RS 232 compatible.
Therefore a line driver such as the MAX 232 chip is used to boost the TTL voltage level to RS
232 voltage level and vice versa. So serial communication chip MAX 232 is interface between
microcontroller 89c51 and RS 232 connector.
9
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
In this project we use, crystallonics dot-matrix alphanumeric LCD display is used for displaying
speed of moter, which is interfaced with 8bit micro controller 89c51. This built in controller
and driver provides convenient connectivity between a dot matrix
LCD and 8bit micro controller. All the functions required for dot matrix LCD display drive are
internally provided. Internal refresh is provided in the module.As shown in figure, the LCD
display module is interfaced with 8bit microcontroller 89c51. For 4bit data interface, the bus
lines D4 to D7 are used for data transfer while D0 to D3 lines are disabled. The data transfer is
complete when 4bit data has been transferred twice. For 8bit data interface, all 8 bus lines D0
to D7 are used.
As shown in figure port P1.0 to P1.3 of microcontroller are connected directly to the data pins D4
to D7 of LCD module. The control pins of LCD i.e. RS and EN are connected to the port pins
P1.4 and P1.5 of microcontroller. They can be set/reset as per the requirements of instructions
code of the display operation by microcontroller.
The read/write input pin (R/W), allows the user to write information to the LCD so it is
connected to ground. Also there is a potentiometer (VR5) is connected between VCC and GND
pin of LCD module. Pin no. 3 i.e. liquid crystal drive voltage (VEE) varies this potentiometer for
controlling the LCD contrast.
Microcontroller sends low signal to RS pin i.e. RS=0. So instruction command code register is
selected and microcontroller send commands such as clear display, cursor at home or blink
the cursor etc.
When microcontroller calculate weight and amount of postage and ready to send data to the LCD
module, make RS pin high i.e. RS=1. Then microcontroller sends data to the data pins of LCD
i.e. D4 to D7. When data is supplied to the data pins twice, a high to low pulse must be applied to
the enable pin (EN) by the microcontroller. So that LCD latch the information or data present at
its data pins and display it.
10
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Capacitor ―C5‖ and Resistance ―R5‖ are connected between RST (reset) pin of micro
controller. So that when power is turn ON programmed execution start from starting
memory location 000H between pin 18 & 19 (XTAL1 & XTAL2) quartz ceramic crystal of
12 MHz freq. Are connected to generate oscillation req. for machine cycle to fetch decode &
execution of instruction in micro controller.
For our project we req. regulated supply of +5v d.c. which can be generated using 230v/0-
15(1Amp) step-down transformer, full wave bridge rectifier & filter condenser. For stability
purpose we use 7805 voltage regulate IC at o/p at rectifier o/p we get +12v d.c. by dropping
and converting 15v AC.
11
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-03
CIRCUIT OPERATION
CIRCUIT DIAGRAM:-
12
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
1. with the use of mechanical gears to achieve the desired speed. This method is generally
beyond the capability of most hobbyist home workshops.
2. Reducing the motor voltage with a series resistor .However this is inefficient (energy wasted
in resistor) and reduces torque. The current drawn by the motor increases as the load on the
motor increases. More current means a larger voltage drop across the series resistor and therefore
less voltage to the motor. The motor now tries to draw even more current, resulting in the motor
"stalling".
3. By applying the full supply voltage to the motor in bursts or pulses, eliminating the series
dropping effect. This is called pulse width modulation (PWM)and is the method used in this
Project. Short pulses means the motor runs slowly; longer pulses make the motor run faster.
3.1 WORKING:-
Pulse width modulation is implemented using a microcontroller, dependent on an input value for
Therefore, the input value used is given with the help of potentiometer.
The 2 terminals of potentiometer are connected to Vcc& GND, resulting in variable 44voltage in
range of 0-5V, in the terminal W of potentiometer. This pin serves as the input for
microcontroller.
The ATmega8L has inbuilt 10 bit ADC (Analog to Digital Converter), which means it can
convert any analog value between 0-5V to digital value of 10 bit resolution.
The program for generating results for pulse width is written into microcontroller‘s memory
13
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
The variable output (between 0-5V) goes to the A (Analog Input) pin of the ADC (Analog to
Digital Converter) of the microcontroller and gets converted into 10 bit binary value. This 10 bit
10
binary value gets converted into corresponding decimal value of range 0-1023 (as 2 =1024),
which is responsible for triggering the output pin of microcontroller, for particular time duration,
which further triggers the MOSFET for same duration.
3.2 PRINCIPLES:-
Pulse width modulation (PWM) is a method for binary signals generation, which has 2 signal
periods (high and low). The width (W) of each pulse varies between 0 and the period (T). The
main principle is control of power by varying the duty cycle. Here the conduction time to the
load is controlled. Let for a time t1, the input voltage appears across the load i.e. ON state and
Va = Vmax. *
Where,
• The average load current Ia= Va/R = kVs/R where, T is the total time period =t1+t2, k = t1/T is
the duty cycle.
• The duty cycle can be varied from 0 to 1 by varying t1, T or f. Therefore, the output voltage V0
can be varied from 0 to Vs by controlling k, and the power flow can be controlled.
• As the time t1 changes the width of pulse is varied and this type of control is called pulse width
modulation (PWM) control.
For better understanding of PWM these diagrammatic representations can be used. These figures
represent the waveforms obtained as output at different voltage requirements.
14
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Registers :-
And a data Register ( DR ) . The IR stores the Instruction codes and address
Automatically transferred from the DD RAM or CG RAM to the DR. Data transfer
Between the MPU is then MPU is then the completed when the MPU reads the DR.
Like wise , for the next MPU read of the DR , Data in DD RAM or CG RAM at the next
Address is sent to the DR automatically . Similarly , for the MPU write of the DR , the
Next DD RAM or CG RAM address is selected for the write operation . The Register
RS R/W Operation
15
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
When the busy flag is 1, the controller is in the internal operational mode , and
the next instruction will not be accepted.
The next instruction must be written after ensuring that the busy flag is 0.
The Address counter allocates the address for the DDRAM and
CG RAM Read / write operation. When the instruction code for a DD RAM address
setting , is input to IR , the address code is transferred from IR to the Address counter .
After writing / reading the display
Data to / from the DD RAM or CG RAM , the address counter increments / decrements
by one the address , as an internal operation .
The data of the Address counter is output to DBO to DB6 while R/W =1
And RS = 0.
(DD RAM ) in the form of 8 bit character codes present in the character Font table .
The extended capacity of the DDRAM is 80 * 8 bits i.e.
80 characters.
16
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
It can generate 208, 5 * 8 dot character patterns and 32, 5 * 10 dot character patens.
In the character Generator RAM , the user can rewrite character patterns
By program. For 5 * 8 dots, eight character patterns can be written , and for 5 * 10
dots,four character patterns can be written.
17
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Chapters NO.:-05
The module , interfaced to the system , can be treated as RAM( Memory mapping ), Input /
output , Expanded or parallel I/ O ( Input / Output Mapping ) .
Since there is no conventional chip select signal , developing a strobe signal for the Enable
signal ( E ) and applying appropriate signal to the Register select ( RS ) and Read / write ( R/
W ) signal are important .
The module is selected by gating a decoded module – address with the Host – processor `s
Read / write strobe . The resultant signal , applied to the LCD`s Enable (E ) input , clocks in
the data.
The ‗ E ‘ signal must be a positive going digital strobe , which is active while data
and control information are stable and true .
The falling edge of the Enable signal enables the Data / instruction Register of the
controller . All module timings are referenced to specific edges of the ‗ E ‘ signal . The ‗ E ‘
signal is applied only when a specific module transaction is desired .
The Read and write strobes of the Host , which provides the ‗ E ‘ signal , should not be linked to
the Modules R/ W line . An Address bit which sets up earlier in the Host Machine Cycle can be
used as R/W .S
When the Host processor is so fast that the strobes are too narrow to serve as the ‗ E ‘ pulse . :
18
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
In spite of doing the above mentioned , if the problem continues ,latch both the data and
control information and then activate the ‗ E ‘ signal .
When the controller is performing an internal operation the Busy Flag (BF)
will be set and will not accept any instruction . the user should check the busy flag or
should provide a delay of approximated 2 ms after each instruction .
the liquid crystal display module can be interfaced , either to 4 – bit or 8-bit MPUS.
For 4-bit data interface, the bus lines DB4 toDB7 are used for data transfer , while DBO
to DB3 lines are disabled .The data transfer is complete when the 4- bit data has been
transferred twice.
The Busy flag must be checked after the 4-bit data has been transferred twice . Two more 4-
bit operations then transfer the Busy Flag and Address counter Data .
For 8-bit data interface , all eight bus lines ( DBO to DB7 ) are used.
19
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
20
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
21
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-06
INITIALIZATION BY INSTRUCTION
The following procedure should be carried out, to initialize the module by instruction .
When BF is not checked , the waiting time between instructions should be longer than
the instruction execution time ( about 2 ms on after this average .)
22
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
9. Set interface as 4 bits /8 bits , number of display lines character font ( Function set ).
The number of display lines and character font cannot be changed after this point .
15. Set cursor move direction and specify display shift ( Entry mode set ) .
Read / write 0
Reg. Select 0
23
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
S: Shift the entire display either to the right ( I / D =0 )or to the left
The curser will be shifted in the direction selected by I /D, during the read operation of DD
RAM, irrespective of the value of S. Similarly reading and writing the CG RAM always shifts
the curser .
Read / write 0
Reg . select 0
D to 1.
th th
The curser is displayed in the 8 line and the 11 line for the character
24
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-07
A variable regulated power supply, also called a variable bench power supply, is one
where you can continuously adjust the output voltage to your requirements. Varying the output
of the power supply is the recommended way to test a project after having double checked parts
placement against circuit drawings and the parts placement guide. This type of regulation is ideal
for having a simple variable bench power supply. Actually this is quite important because one of
the first projects a hobbyist should undertake is the construction of a variable regulated power
supply. While a dedicated supply is quite handy e.g. 5V or 12V, it's much handier to have a
variable supply on hand, especially for testing. Most digital logic circuits and processors need a
5 volt power supply. To use these parts we need to build a regulated 5 volt source. Usually you
start with an unregulated power supply ranging from 9 volts to 24 volts DC (A 12 volt power
supply is included with the Beginner Kitand the Microcontroller Beginner Kit.). To make a 5
volt power supply, we use aLM7805 voltage regulator IC .
25
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Built-in overheating protection shuts down output when regulator IC gets too hot
Circuit complexity:
Circuit performance:
Availability of components:
Design testing:
Based on datasheet example circuit, I have used this circuit successfully as part of many
electronics projects
Applications:
Component costs:
Few dollars for the electronics components + the input transformer cost .
26
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
BLOCK DIAGRAM
CIRCUIT DIAGRAM
27
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
The principal advantage of a bridge rectifier is you do not need a centre tap on the
secondary of the transformer. A further but significant advantage is that the ripple frequency at
the output is twice the line frequency (i.e. 50 Hz or 60 Hz) and makes filtering somewhat easier.
As a design example consider we wanted a small unregulated bench supply for our
projects. Here we will go for a voltage of about 12 - 13V at a maximum output current (IL)
of 500ma (0.5A). Maximum ripple will be 2.5% and load regulation is 5%.
Now the RMS secondary voltage (primary is whatever is consistent with your area) for
our power transformer T1 must be our desired output Vo PLUS the voltage drops across D2 and
D4 ( 2 * 0.7V) divided by 1.414.
This means that Vsec = [13V + 1.4V] / 1.414 which equals about 10.2V. Depending
on the VA rating of your transformer, the secondary voltage will vary considerably in
accordance with the applied load. The secondary voltage on a transformer advertised as say
20VA will be much greater if the secondary is only lightly loaded.
If we accept the 2.5% ripple as adequate for our purposes then at 13V this becomes 13 *
0.025 = 0.325 Vrms. The peak to peak value is 2.828 times this value. Vrip = 0.325V X 2.828 =
0.92 V and this value is required to calculate the value of C1. Also required for this calculation is
the time interval for charging pulses. If you are on a 60Hz system it it 1/ (2 * 60 ) = 0.008333
which is 8.33 milliseconds. For a 50Hz system it is 0.01 sec or 10 milliseconds.
Remember the tolerance of the type of capacitor used here is very loose. The important
thing to be aware of is the voltage rating should be at least 13V X 1.414 or 18.33. Here you would
use at least the standard 25V or higher (absolutely not 16V).With our rectifier diodes or bridge
they should have a PIV rating of 2.828 times the Vsec or at least 29V. Don't search for
28
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
this rating because it doesn't exist. Use the next highest standard or even higher. The current
rating should be at least twice the load current maximum i.e. 2 X 0.5A or 1A. A good type to use
would be 1N4001, 1N4004 or 1N4008 types.
These are rated 1 Amp at 400PIV, 600PIV and 1000PIV respectively. Always be on the
lookout for the higher voltage ones when they are on special.
In our example above we were taking 0.5A out of the Vsec of 10V. The VA required is
10 X 0.5A = 5VA. This is a small PCB mount transformer available in Australia and probably
elsewhere.
This would be an absolute minimum and if you anticipated drawing the maximum
current all the time then go to a higher VA rating.
The two capacitors in the primary side are small value types and if you don't know
precisely and I mean precisely what you are doing then OMIT them. Their loss won't cause you
heartache or terrible problems.
The fuse F1 must be able to carry the primary current but blow under excessive current,
in this case we use the formula from the diagram. Here N = 240V / 10V or perhaps 120V /
10V. The fuse calculates in the first instance to [ 2 X 0.5A ] / [240 / 10] or .04A or 40 ma. In
the second case .08A or 80 ma. The difficulty here is to find suitable fuses of that low a current
and voltage rating. In practice you use the closest you can get (often 100 ma ). Don't take that
too literal and use 1A or 5A fuses.
Power supply is the first and the most important part of our project. For our project
we require +5V regulated power supply with maximum current rating500mA.
29
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Following basic building blocks are required to generate regulated power supply.
Step down transformer is the first part of regulated power supply. To step down
the mains 230V A.C. we require step down transformer. Following are the main characteristic of
electronic transformer.
1) Power transformers are usually designed to operate from source of low impedance at
a single freq.
2) It is required to construct with sufficient insulation of necessary dielectric strength.
3) Transformer ratings are expressed in volt–amp. The volt-amp of each secondary
winding or windings are added for the total secondary VA. To this are added the load
losses.
4) Temperature rise of a transformer is decided on two well-known factors i.e. losses on
transformer and heat dissipating or cooling facility provided unit.
Rectifier unit is a ckt. which converts A.C. into pulsating D.C. Generally semi-
conducting diode is used as rectifying element due to its property of conducting current in
one direction only. Generally there are two types of rectifier.
30
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Following are the main advantages and disadvantages of a full-wave bridge type rectifier ckt.
Advantages:-
Disadvantages:-
1) It requires four diodes.
2) As during each half cycle of A.C. input, two diodes are conducting therefore
voltage drop in internal resistance of rectifying unit will be twice as compared
to center tap circuit.
Generally a rectifier is required to produce pure D.C. supply for using at various
places in the electronic circuit. However, the o/p of rectifier has pulsating character i.e. if such a
D.C. is applied to electronic circuit it will produce a hum i.e. it will contain A.C. and D.C.
components. The A.C. components are undesirable and must be kept away from the load. To do
so a filter circuit is used which removes (or filters out) the A.C. components reaching the load.
Obviously a filter circuit is installed between rectifier and voltage regulator. In our project we
use capacitor filter because of its low cost, small size and little weight and good characteristic.
Capacitors are connected in parallel to the rectifier o/p because it passes A.C. but does not pass
D.C. at all.
31
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
1) Power Output.
2) Operating Voltage.
3) Frequency Range.
4)Efficiency and Regulation.
SIZE OF CORE :-
Size of core is one of the first considerations in regard of weight and volume of
transformer. This depends on type of core and winding configuration used. Generally following
formula is used to find area or size of core.
P1
Ai = -----------
0.87
P1 = Primary voltage.
32
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
In transformer P1 = P2
For our project we required +5V regulated output. So transformer secondary rating is
12V, 500mA.
-3
P2 = 12 x 500 x 10 w.= 6w.
6
So Ai =
0.87
= 2.62
Generally 10% of area should be added to core to accommodate all turns for low
Iron losses and compact size.
So Ai = 2.88.
10,000
Turns / Volt = -----------------------
4.44 f Bm Ai
Here,
f is the frequency in Hz
2
Bm is flux density in Wb/m
Ai is net area of cross section.
33
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Following table gives the value of turns per volt for 50 Hz frequency.
2
Flux density Wb/m 1.14 1.01 0.91 0.83 0.76
Turns per volt 40/Ai 45/Ai 50/Ai 55/Ai 60/Ai
17
WIRE SIZE
As stated above size depends upon the current to be carried out by the winding,
2 2
which depends upon current density of 3.1 A/mm . For less copper losses 1.6 A/mm or 2.4
2
A/mm may be used. Generally even size guage of wire are used.
34
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
= Rms. Voltage x 2
= 12 x 2
= 16.97
2 Vm
Vdc = ----------
2 x 16.97
= -----------------------
= 10.80 V
PIV = 2 Vm.
= 2 x 16.97
= 34 V
& maximum forward current which flow from each diode is 500mA.
So from above parameter we select diode IN 4007 from diode selection manual.
35
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
1
C = ----------------------
43 r f RL.
r = ripple present at o/p of rectifier.
1
------------------------------
C =
43 x 0.1 x 50 x 28
= 1030 f
1000 f.
And voltage rating of filter capacitor is double of Vdc i.e. rectifier o/p which is
20V. So we choose 1000 f / 25V filter capacitor.
36
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE USING
OPTOCOUPLER.
123 Specifications :
Available o/p D.C. Voltage = +5V.
37
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-08
APPLICATION GUIDELINS
8.1 POWER SUPPLY:-
Of 10 m V.
To achieve a better / suitable contrast for the display , the voltage ( VL) at
A module should not be inserted or removed from a live circuit. The ground
The module should be isolated from other circuits, so that stray voltage are
8.2HARDWARE:-
38
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Utilize the Host`s extended timing mode ,if available , when transacting with the
module . use instructions which prolog the read and write or other
8.3 MOUNTING:-
Don‘t touch the display surface with surface with bare hands or any hard
Materials . this will stain the display area and degraded the insulation between
terminals.
Do not use organic solvents to clean the display panel as these may adversely
affect the polarizers. Dust may be removed by adhesive tape or with absorbent
cotton and petroleumbenzene.
The processing or even a slight deformation of the claws of the metal frame
Will have effect on the connection of the output signal and causes an abnormal
display.
Don‘t damage or modify the pattern wiring, or drill attachment holes in thePCB.
When assembling the module and into another equipment, the space between the
module and the fitting plate should have enough height, to avoid causing stress to
the module surface .
Make sure that there is enough space behind the module , to dessipate
The heat generated by the IC while functioning for longer durations .
When an electrically powered screw do not bring the sucking while cleaning by
a vaccum cleaner may destroy the module.
39
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Operate the LCD module under the relative condition of 40 degree c and 50%
relative humidity .
When the temperature gets to the within the normal limits , the display will
be normal . peel-off may occur with high temperature and humidity .
Contact with water or oil over a long period of time may causes deformation or
colour fading of the display .
INITIALIZATION:-
When the power supply is given to the module , with the pin 3 ( VL ) connected
to ground , all the pixcels of a character gets activated in the following manner :
The first eight characters of a signal display , operated in the two line display
mode , as in CDM 16116.
The first line of characters of a two line display , as in CDM16216 and 40216.
40
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-09
The DD RAM is used to store display data of 8 – bit character codes present In
Display position on the LCD. The DD RAM Address should be set in the Address counter,
so as to enable the display of character on the LCD. The
Co- ordination between the DD RAM address and the display position of
01 02 03 04 05 06 07 08 Display position
00 01 02 03 04 05 06 07 DD RAM address
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Display position.
00 01 02 03 04 05 06 07 40 41 42 43 44 45 46 47 DD RAM address.
41
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
When the controller IC is used along with one Driver IC up to sixteen character can be
displayed :
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Display position
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F DD RAMaddress.
Can be displayed:
42
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
01 02 03 04 05 06 07 08 Display position
01 02 03 04 05 06 07 08
To right 01 02 03 04 05 06 07 08
DisplayFirst line 01 02 03 04 05 06 07 08
Shifted Second line 41 42 43 44 45 46 47 48
To left
43
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
When the controller IC- is used along with one Driver IC, thirty two
Character ( 16 character * 2 line ) can be displayed ):
Controller
display Driver display
To left
01 02 …….07 08 09 10……..15 16
To left
Controller Driver
Display Display
44
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
45
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-10
The CG RAM allows the user to create special characters or symbols, using
Software . For 5 * 8 dot format , eight character patterns and for 5 * 10 dot
Format, four character patterns can be programmed . These character patterns can be accessed
as if they were in the CG RAM . These special characters can be displayed by mentioning the
character codes OOH-07HOr 08H-0FH.
The three bits of CG RAM address , bits 0-2, correspond to the line position
By the instruction ‗ CG RAM data write ‘ enter the character pattern data ,
Line by line . The data bus lines DB0 – DB7. correspond to CG RAM data
Bits 0-7.
The last line of the character pattern i. E. the curser position , should be all 0s.
Out of the eight bits ( 0-7 ) used as CG RAM data, only five bits ( 0-4 )
Are used for character patterns . The remaining three bits (5-7 ) , can
The CG RAM is selected , when the four higher order bits (4-7) , of
When the character patterns eight bit character code is written to the
Are displayed .
A library of custom symbols , with each set totaling eight characters. These
Eight characters can be displayed at one go, by reloading the CG RAM with
47
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-11
PCB DESIGNING AND FABRICATION
48
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Epoxy Glass; This base material has high mechanical strength and good electrical
properties usually green in color & semitransparent.
There are a variety of laminates available. We have selected Fiber Glass epoxy
laminate.
1) Layout:-
The layout of a PCB has to incorporate all the information on the board before
one can go onto the all work preparation. Detailed circuit diagram, the design
concept and the philosophy behind the equipment are very important for the
layout.
Layout Scale depending on the accuracy required artwork should be produced at a 1:1 or
2:1 or even 4:1 scale. The layout is best prepared on the same scale as the artwork to prevent the
entire problem, which might be caused by redrawing of the layout to the artwork scale. The
layout/artwork scale commonly applied is 2:1 with a 1:1 scale, no demanding single sided boards
can be designed but sufficient care should be taken, particularly during the artwork preparation.
49
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Procedure:-
The first rule is to replace each and every PCB layout as viewed from the component
side. This rule must be strictly followed to avoid confusion, which would otherwise be caused.
Another important rule is not to start the designing of a layout unless an absolutely clear
circuit diagram is available.
Among the components, the larger ones are placed first and the space in between is filled
with smaller ones. Components requiring input/output connecting come near the connector. All
components are placed in such a manner that de-soldering of other components is not necessary
if they have to be replaced.
Layout sketch
The end product of the layout designing is the pencil sketched component and conductor
drawing which is caller ‗layout sketch‘. It contains all information for the preparation of the
network.
Component holes
In a given PCB, most of the holes required are one particular diameter. Holes of a
different are shown with a code in the actual layout sketch.
Conductor Holes
A code can be used for the conductor with a special width.
Minimum spacing should also be provided.
A) Holes B) Conductor Widths
Standard holes Standard width, 0.5 mm
1.1 mm 1 mm
1.5 mm 2 mm
3.2 mm 4 mm
50
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
(2) Artwork :-
The generation of PCB artwork should be considered as the first step of the PCB
manufacturing process. The importance of a perfect artwork should not be under estimated.
Problems like inaccurate registration, broken annular rings or too critical spacing are often due to
bad artwork. And even with the most sophisticated PCB production facilities, PCB can be made
better than the quality of the artwork used.
Basic Approaches
For ink drawing on white cardboard paper, good quality Indian ink and ink-pen set are
minimum requirements.
Drawing practice – drawing procedure is very at-least by 0.1 – 0.2, and solder pad
locations.
And conductors can easily be displaced by 0.3 – 0.5 mm
51
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
In the actual printing step, ink is forced by the moving squeeze thorough the open meshes
onto the surface of the material to be printed.
The ink deposition, in a magnified cross section, shows the shape of a trapezoid.
(4) Etching:-
In all subtractive PCB process, etching is one of the most important steps. The final
copper pattern is formed by selective removal of all the unwanted copper, which is not protected
by an etching unit.
Solutions, which are used in etching process, are known as enchants.
1. Ferric Chloride
2. Cupric Chloride
3. Chromic Acid
4. Alkaline Ammonia
52
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Of these Ferric Chloride is widely used because it has short etching time and it can be
stored for a long time. Etching of PCBs as required in modern electronic equipment
production, is usually done in spray type etching machines.
Tank or bubble etching, in which the boards kept in tank, were lowered and fully
immersed into the agitated, has almost disappeared.
(6) Soldering:-
The next process after the component mounting is soldering; solder pint is achieved by
heating the solder and base metal about he melting point of the solders used.
The necessary heat depends upon:
1. The nature and type of joints
2. Melting temperature of solder
3. Flux
53
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
Soldering techniques are of so many types but we are using iron soldering.
Iron soldering:-
Soldering iron consists of an insulating handle connected through a metal shaft, of a bit
accurately makes contact with the component parts of the joint and solder and heats them up.
The electrical heating element is located in the hollow shank or handle to heat the bit.
Procedure of Soldering
The points to be joined must be cleaned first and fluxed. The hard solder iron and solder
wire is applied to the work. The melted solder becomes bright and fluid. The iron must be
removed after sufficient time and joint is allowed to coal. At the end, finishing is done.
54
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
55
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-12
ADVANTAGE:-
PWM duty cycle control techniques enable greater efficiency of the DC motor.
PWM switching control methods improve speed control and reduce the power losses in
the system.
The pulses reach the full supply voltage and will produce more torque in a motor by
being able to overcome the internal motor resistances more easily.
DISADVANTAGES:-
The main Disadvantages of PWM circuits are the added complexity and the possibility
of generating radio frequency interference .
It can give speed below the full speed, not above. It cannot be used for fast controlling
of speed.
APPLICATIONS:-
56
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-13
LIST OF COMPONUNT
2) Ic2----MAX 232
3) Ic4—MCT2E
5) Ic3 -----LD293D
RESISTANCE
R1---22K,
R2, R3,Rp-----680ohm,
R5,R6--- 10k
Variable resistance
VR1-----10K
CAPACITOR
Disc type ceramic
Ca, Cb—22pf
ELECTROLYTIC
Cp---1000mfd/25v, C1,C2,C3,C4,C5,C6---10mfd/63v
57
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
DIODE
D1 to D4---1N4007
LED---5sq.mm led
CRYSTAL
X1---11.0592MHz
TRANSFORMER
230v primary to 0-15 volt secondary 1 amp transformer.
DC MOTOR
RS232 PC CONNECTOR
58
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-14
COST OF COMPONUNT
3)Ic4—MCT2E------------- 30/-
R2, R3,Rp-----680ohm,
R5,R6--- 10k
VARIABLE RESISTANCE
VR1-----10K------5/-
CAPACITOR
59
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
ELECTROLYTIC
Cp---1000mfd/25v--------12/-,
DIODE
D1 to D4---1N4007--------------1/- EACH
LED---5sq.mm led----1/-
CRYSTAL
X1---11.0592MHz----------- 25/-
TRANSFORMER
230v primary to 0-15 volt secondary 1 amp transformer.---120/-
DC MOTOR-------------- 125/-
60
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-16
CONCLUSION
A project can open the door of knowledge for a particular topic. It introduces a
student to work in practical field. We got such kind of a project ―Speed control of
a DC motor with the aid of computer‘s parallel port‖ which introduced us with the
controlling of a DC motor in a programmable manner as well as visual basic
programming language. We saw that there is a difference between theoretical
design and practical implementation. This is due to the inherent properties of the
circuit equipments. Finally, we can say that this practical work will help us in our
working field.
61
SPEED CONTROL OF DC MOTOR USING PWM TECHNIQUE
USING OPTOCOUPLER.
CHAPTER NO.:-17
REFERENCE
Publication:-B.P.B. Publication
Publication:-KHANNA Publication
CHAPTER NO. 18
62