Control be utilized as a part of different applications

Control framework outline and examination
advancements are broadly smothered and exceptionally helpful to be connected
continuously improvement. Some can be comprehended by equipment innovation and
by the progress utilized of programming, control framework is dissected
effortlessly and detail. DC Motors can be utilized as a part of different
applications and can be utilized as a part of different sizes and rates
according to our applications. The DC Motor is utilized as a part of domestics
and modern reason.

At whatever point we consider any
programmable gadgets then the installed innovation comes into fore front. The
implanted is currently a day especially famous and a large portion of the item
is created with Microcontroller based installed innovation. The upsides of
utilizing the microcontroller is the decrease of the cost and furthermore the
utilization of additional equipment, for example, the utilization of clock, RAM
and ROM can be maintained a strategic distance from. This innovation is quick
so controlling of numerous parameters are conceivable; additionally, the
parameters are field programmable by the client.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

In this undertaking we are controlling
velocity of DC engine. As we increment the speed of DC Motor therefore, an
expansion in the efficiency of material. The utilization of this is utilized as
a part of local’s motivation illustrations are hair dryer, blender, zero
machine, lift and mechanical reason cases are footing and lift. In this
undertaking we have control the real speed of dc engine according to our
prerequisite. This can be accomplished through PIC microcontroller.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

iii

TABLE OF CONTENTS

 

ACKNOWLEDGEMENTS………………………………………………………………………ii

ABSTRACT…………………………….……………………………………………………..…iii

LIST OF FIGURES…………………………….……………………………………….……..….v

LIST OF TABLES ………………………….……………………………………….……………vi

LIST OF ABBREVIATIONS…………………….……………………………….…………..…vii

 

Chapter 1: Introduction…………………………………………………………………………..01

              1.1
Objectives…………………………………………………………………………..01

 

Chapter 2: Background…………………………………………………………………………..02

              2.1
Basic flow of speed control drive…………………………………………………..02

 

Chapter 3: Developments………………………………………….……………………………..03

              3.1
Hardware Developments……………………….….………………………………..03

                 
3.1.1 Microcontroller PIC 16F877A………….…………….………………………..03

              3.1.2 Light Depended Resistor…………….………..………………………………..03

              3.1.3 DC Motor…………………………….………….……………………………..03

               3.2 Software Developments…………………………………………………..………..03

              3.2.1 C language Code………………………………………………………………..03

 

Chapter 4: Requirements……………………………………………………….….……………..04

             4.1
PWM Waveform……………….…………………………………..………………..04

         4.2 Analog to Digital Converter……………………..…………………………………..04

Chapter 5: Working of Circuit……………………………….…………………………………..05

Chapter 6: Flowchart of general troubleshooting………………………………………………..09

Chapter 7: Instruction for Testing of circuit……………………………………………………..11

Chapter 8: Instruction for Testing of testing
Equipment……………………….………………..13

Chapter 9: Instruction for Testing of Software/PIC
Development Board………………………..15

Chapter 10: Instruction for Testing Equipment…………………………………………………..16

Chapter 11: Schematic Diagram………………………………………..………………………..17

References………………………………………..………………………………………………18

 

 

LIST OF FIGURES

 

Figure 1: Basic block diagram of project.

Figure 2: Working of Circuit.

Figure 3: Rotation of motor in CW
Direction.

Figure 4: Rotation of motor in CCW
Direction.

 

Figure 5 – Basic flow chart of troubleshooting.

Figure 6 – Schematic Diagram.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

v

LIST OF TABLES

 

Table 1: Summery of Working of
Circuit (Logic Table).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

vi

LIST OF
ABBREVIATIONS

 

 

 

DC

 

IC

 

LDR

 

PIC

 

RAM

 

CCP

 

PWM

 

ADC

 

VCC

 

GND

 

COM

 

 

 

 

 

Direct Current

 

Integrated Circuit

 

Light
Depended Resistor

 

Peripheral Interface
Controller

 

Random Access Memory

 

Capture/Compare/PWM

 

Pulse Width Modulation

 

Analog to Digital Converter

 

Voltage Supply

 

Ground

 

Common

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

vii

Chapter 1: Introduction

DC Motors are progressively required for an
expansive scope of utilization including apply autonomy, compact electronics,
sporting equipment, appliances, medical devices, automotive applications,
control instruments and numerous others. The Motor itself is a favored option
in light of the fact that it is straightforward, dependable and ease.
Similarly, vital, progressed, completely incorporated “H-Bridge”
driver ICs are accessible to control the Motor’s heading, speed and braking.

1.1
Objectives

The
primary center of this venture is to plan a speed control arrangement of DC
Motor by utilizing PIC16F877A. This framework will have the capacity to control
the DC Motor speed at wanted speed in any case the progressions of load.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

Chapter 2: Background

2.1
Basic Flow of Speed Control Drive

 

Figure
1 – Basic block diagram of project

Figure 1 illustrates the block diagram of Speed Control of DC Motor using PIC
16F877A Microcontroller. Logic circuit and LDR is integrated with the microcontroller PIC16F873A, which receives signal from user
through LDR and sends a command to PIC to control whether to turn ON or OFF the output. The system utilizes
a low-cost microcontroller that is currently available in the market. The development of
this device involves with both hardware and software to
provide a preferable result.

 

2

 

Chapter 3: Development

3.1
Hardware Development

3.1.1
Microcontroller – PIC 16F877A

The PIC16F877A circuit is the main circuit that
consist the logic circuit and H Bridge circuit and DC Motor as the output. The
PIC16F877A circuit is used as a controller that control the input and output
signal and used to convert the analog signal to a digital signal.PIC16F877A is
a 40/44 pin device which can operate at up to 20 MHz clock speed.  

3.1.2 Light-Dependent Resistor

A photo
resistor is a light-controlled variable resistor. The resistance of a photo
resistor decreases with increasing incident light intensity the resistance of a
photo resistor increases with decreasing incident light intensity.

3.1.3
DC Motor.

Direct current (DC) motors have variable attributes
and are utilized broadly in factor speed drives. DC motor can give a high
beginning torque and it is likewise conceivable to acquire speed control over
wide range.

3.2 Software
Development

3.2.1
C language Code

C language software is computer program
used to program the microcontroller. Assembly language is used to program the microcontroller
of the PIC16F877A type. This microcontroller is divided into several main parts
which are as the input pins, as the output pins.

 

 

 

 

 

3

 

Chapter 4: Requirements

4.1
PWM Waveform

To
control an H-bridge you need PWM signals to control the 4 transistors. Pulse width modulation (PWM) is a
method of changing the duration of a pulse with respect to the analog input. This
makes it easy to generate and efficient as transistors are most efficient when
on or off rather than partially conducting. By thus we can easily regulate the
speed of the DC Motor.

If
we use resistors, the motor will not get enough power to rotate because some of
the power is dropped across the resistor.so that by thus we can easily regulate
the speed of the DC Motor.

PIC16F877A
microcontroller has two independent CCP(Capture/Compare/PWM) modules, named as
CCP1 and CCP2. Each CCP module has two 8-bit resistors.

4.2Analog
to digital converter.

Analog to Digital Converter (ADC) is a device that
converts an analog quantity (continuous voltage) to discrete digital values.  Most of the PIC Microcontrollers have built in
ADC Module. Here we are using PIC 16F877A for demonstrating the working.
Microcontrollers have 8 inputs for 40/44 pin devices. It is a 10-bit ADC.

The positive and negative reference voltage (+Vref and
-Vref) of PIC ADC is software selectable, which can be VDD, VSS, voltage at RA2
or RA3.

ANALOG TO DIGITAL CONVERTER (A/D) of the
microcontroller with a larger number of bits has a higher resolution and better
accuracy when converting from analog signal to digital signal.

 

 

 

 

4

Chapter 5: Working of Circuit

Figure
2: Working of Circuit

In this project, we give the supply to
PIC16F877A microcontroller. Then controller generates the pulse generally, 5V
DC. The generated pulse is nothing but PWM signal, which is given to the logic circuit.
This is necessary to switch/trigger the Transistor.

The
working principle of this circuit is very simple. The transistor acts as a
power switch for the motor. The switch can be controlled through the logic
voltage.

DC
motor drive current is mostly an H-Bridge circuit which consists of a
transistor which acts as a switch of 4 units (Q1 to Q4) via a dedicated DC
motor.

The
circuit shown has four switches and a motor. To apply a voltage across the
motor a pair of diagonally opposite switches need to be turned on. Depending on
which pair of switches are turned on the motor will turn one way or another.

There
are four possibilities to apply voltage to logic circuit as are follow:

 

 

 

5

First Condition: 0 V from C2 (PWM) and
0 V from C4 (Direction)

In
this condition output of 7400(1) is 5 V so that transistor Q1 is get 5 V and
transistor Q4 get 0 V that’s why both transistors are acted as open.

Output of 7400(2) is 5 V so that
transistor Q2 is get 5 V and transistor Q3 get 0 V that’s why both transistors
are acted as open.

All of the transistors are opened so
that no current flow through the motor so motor is in OFF condition

Second Condition: 0 V from C2 (PWM)
and 5 V from C4 (Direction)

In this condition output of 7400(1)
is 5 V so that transistor Q1 is get 5 V and transistor Q4 get 0 V that’s why
both transistors are acted as open.

Output of 7400(2) is 5 V so that
transistor Q2 is get 5 V and transistor Q3 get 0 V that’s why both transistors
are acted as open.

All of the transistors are opened so
that no current flow through the motor so motor is in OFF condition.

Third Condition: 5 V from C2 (PWM)
and 5 V from C4 (Direction)

In this condition output of 7400(1)
is 0 V so that transistor Q1 is get 0 V and transistor Q4 get 5 V that’s why
both transistors are acted as closed.

Output of 7400(2) is 5 V so that
transistor Q2 is get 5 V and transistor Q3 get 0 V that’s why both transistors
are acted as opened.

 

 

6

Figure
3: Rotation of motor in CW Direction

Transistor Q1 and Q4 are acted as
switch and transistor Q2 and Q3 are opened so that current flow through the
motor from transistor Q1-Motor-Q4 so motor rotate in CW direction

Fourth Condition: 5 V from C2 (PWM)
and 0 V from C4 (Direction)

In this condition output of 7400(1)
is 5 V so that transistor Q1 is get 5 V and transistor Q4 get 0 V that’s why
both transistors are acted as opened.

Output of 7400(2) is 0 V so that
transistor Q2 is get 0 V and transistor Q3 get 5 V that’s why both transistors
are acted as closed.

Figure
4: Rotation of motor in CCW Direction

 

7

Transistor Q2 and Q3 are acted as
switch and transistor Q1 and Q4 are opened so that current flow through the
motor from transistor Q2-Motor-Q3 so motor rotate in CCW direction.

Summery
of Working of Circuit (Logic Table):

C4/C2

Output of
7400(1)

Output
of 7400(2)

Input
Of (Q1)

Input
Of (Q2)

Input
Of (Q3)

Input
Of (Q4)

Status
of Motor

00

1

1

1

1

0

0

OFF

01

1

1

1

1

0

0

OFF

11

0

1

0

1

0

1

CW

10

1

0

1

0

1

0

CCW

 

 If either the top or both the bottom switches
are turned on the motor will have no voltage difference across it so it won’t
move at all. If the top and bottom switches on one side are turned on together
by accident we will short out the supply.

 

 

 

 

 

 

 

 

8

Chapter
6: Flowchart of general troubleshooting

 

Figure
5 – Basic flow chart of troubleshooting

 

Figure 1 illustrates the flowchart for
overall project troubleshooting. The initial process is to plan how the project
or problem formulated be organized and possible solution are arranged
systematically.

 

 

 

9

The project is then divided into three parts;
Interfacing, Logic circuit design and H – Bridge circuit design.

Interfacing:

Interfacing of C language code with
PIC16F877A is first part for troubleshooting process. Once you make sure that
code is write then you can go ahead on logic circuit otherwise change the code
until it is run.

Logic
circuit design:

Make sure that the PIN diagram of PIC
controller and actual Programming Code.

In logic circuit important part is check
the input and output of logic gate and make sure that pin out diagram of logic
gate is followed.

Make sure Power supply and GND pin is
given in circuit.

H
– Bridge circuit design:

The next process in flowchart consist to
develop H bridge circuit using transistor and resistor.

For resistor make sure R1 and R2 or R3 and
R4 shows the 5 V at time. Transistor must be closed Q1 and Q4 or Q and Q3 at
time.

The final circuit design then finally be made
on breadboard and unit test is performed to ensure its error free then final
testing to indicate the integration is free from error. Troubleshooting
activity executes if error encountered.

 

 

 

 

 

 

10

Chapter
7: Testing of circuit

 

Check
whether the output control signals are coming or not at appreciate pins.PWM
signal from PIN C2 and Direction signal from PIN C4.Check
the output by removing the main controller signal from logic circuit.Apply
metered-power supply so that the problem area can be recognized in all
circuit diagram,Start
the troubleshooting process only after conforming the problem in the
circuit.Remove
the power circuit to the circuit and wait for some discharging current in
some component.Check
for the exploded or burnt parts of the circuit by seeing and smelling
them.Look
for loose, bad connection and also check the ground paths.Check
input and output pin diagram of each and every logic gate. (Include VCC
and GND PIN)Check
the voltage across individual component like Resistor and Transistor. If
any component does not show any voltage across it, then switch off the
supply and again test the component with respect meters.Condition
for CW direction,

Voltage
across R1 and R3 – 0 V, Voltage across R2 and R4 – 5 V

Transistor
Q1 and Q4 must be acted as Closed switch.

Transistor
Q2 and Q3 must be acted as opened switch.

 

11

Condition
for CW direction,

Voltage
across R2 and R4 – 0 V, Voltage across R1 and R3 – 5 V

Transistor
Q2 and Q3 must be acted as Closed switch.

Transistor
Q1 and Q4 must be acted as opened switch.

Here are some of the problems that I faced.

A) Motor not spinning:

Make
sure you have placed the transistors correctly. i.e. Flat side of the
transistors is in the correct side according to breadboard layout. Make
sure all connections are right as per diagram.

B) Transistors getting too hot:

If
you are using any other DC motor then it could Draw more than 1000mA
easily. Resulting in heating of the transistors. So,
make sure that you are using the right motor.Test
voltage across transistor. There are only two cross transistors must be
closed at time.Check
the logic circuit output.

 

 

 

 

 

 

12

Chapter 8: Testing of Testing
Equipment

Resistor

Power off the circuit containing
the resistor you wish to measure and discharge any capacitors in the circuit by
touching the leads of a spare, high wattage resistor to the leads of the
capacitors.

Touch one multimeter probe to
each lead of the resistor. Since resistors are not a directional component. you
may connect either probe to either lead of the resistor without altering your
reading.

Observe the reading on the
display. A good resistor should test within its rated range. A bad resistor
will either show infinite resistance or a measurement far higher than its rated
resistance. In either case the resistor is no longer functioning properly.

Transistor

To test a transistor, we measure
one diode junction with the multimeter leads situated one way and then we flip
the leads of the multimeter to the reverse position, to switch polarity.

One side of the diode junction
should read a very high resistance, above 1M? of resistance (the
anode-to-cathode side) and the other side should read a much lower resistance,
maybe of a few hundred thousand ohms (the cathode-to-anode side).

So, in total we’ll have six readings,
which are shown below:

Emitter to baseBase to emitterEmitter to collector

 

13

4. Collector to emitter

5.
Collector to base

6.
Base to collector

Each pair should have one side with
very high resistance (>1M?), and the other side with a much lower resistance
of a few hundred thousand ohms.

If this is the case for all the
transistor leads, the transistor is good. If not, the transistor is defective.

Integrated Circuit

If the device containing the IC
chip can be safely powered on, voltage can be read from the chip. With the
negative lead from the multimeter applied to an appropriate grounding location,
the positive lead can be applied to the IC chip.

 If no voltage can be read, there is either a
malfunction with the IC chip or the location for the ground is not suitable due
to dirt, dust, or some other contaminant. Try different locations for the
ground to rule out poor contact.

If a voltage reading is obtained
on the multimeter, it will need to be evaluated to determine proper function.
Some IC chips function as voltage regulators, meaning that it is possible to
have a voltage output different than voltage input. Some manufacturer wiring
diagrams provide the level of detail about what the voltage range needs to be
and should be consulted.

 

 

 

 

 

14

Chapter
9: Testing of Software/PIC Development Board

Power
Supply Circuit

Take the following steps if the power led
does not glow

Check the
adapter output.

Port
Extensions

Check your
software (whether you have selected proper port, proper configurations
etc.).Make sure
your pin output is C4 and C2 from PIC.Make sure you enable proper pulls to
the external connected circuits.Make sure
external hardware is connected with the proper signals from the baseboard.
Check the connections of VCC, GND.Check the
signal level at the pin (you should get 5V if you have chosen 5V as source
and 0V if it is GND.Check for
proper continuity once the circuit is connected.

 

 

 

 

 

 

 

 

 

 

 

 

 

15

Chapter 10: Testing
equipment

Multimeter

Testing
voltage

Plug the black probe into the COM port and the red probe
into the V?mA port
on your multimeter. Switch on your multimeter, and set the dial to DC voltage
mode.

Most multimeters are not auto
ranging, meaning you will need to set the correct range for the voltage you
expect to measure.

Place the red probe on the
positive terminal, and the black probe on the negative terminal.

With the range set correctly, we
get a reading in volts.

Testing Resister

To begin, make sure no current
is running through the circuit or component you want to test. Switch it off,
unplug it from the wall, and remove any batteries.

Plug the black probe into the COM port and Plug the red
probe into the V?mA
port on your multimeter. Switch on your multimeter, and set the dial to
resistance mode.

Most multimeters are not auto
ranging, meaning you will need to set the correct range for the resistance you
expect to measure.

Place one probe at each end of
the circuit or component you want to test.

With the multimeter set to a
usable range, we get a reading in ohms.