0% found this document useful (0 votes)
43 views

Outcome Based Lab Task Report

This document is an outcome based lab task report on speed control of a DC motor using a PIC microcontroller. It includes: 1) An introduction stating the objective is to control the speed and direction of a DC motor using a PIC microcontroller. 2) A methodology section explaining that speed will be controlled by varying the armature resistance to control the voltage using a variable resistor. 3) A procedure that describes the circuit connections and code to read the potentiometer value and use it to set the PWM duty cycle to control speed in both directions using buttons to select direction.

Uploaded by

UMAMAHESWARI M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Outcome Based Lab Task Report

This document is an outcome based lab task report on speed control of a DC motor using a PIC microcontroller. It includes: 1) An introduction stating the objective is to control the speed and direction of a DC motor using a PIC microcontroller. 2) A methodology section explaining that speed will be controlled by varying the armature resistance to control the voltage using a variable resistor. 3) A procedure that describes the circuit connections and code to read the potentiometer value and use it to set the PWM duty cycle to control speed in both directions using buttons to select direction.

Uploaded by

UMAMAHESWARI M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

OUTCOME BASED LAB

TASK REPORT

1
SPEED CONTROL OF DC MOTOR USING PIC
MICROCONTROLLER

OUTCOME BASED LAB TASK REPORT

Submitted by

UMAMAHESWARI M

BANNARI AMMAN INSTITUTE OF


TECHNOLOGY
(An Autonomous Institution Affiliated to Anna
University, Chennai) SATHYAMANGALAM-638401

NOVEMBER 2021

2
DECLARATION

I affirm that the lab task work titled “Speeed control of DC Motor Using PIC
Microcontroller” being submitted as the record of original work done by us under the
guidance of Mr. R. Ashokkumar , Assistant Professor - II, Department of Electrical and
Electronics Engineering.

UMAMAHESWARI M
(201EE232)

I certify that the declaration made above by the candidates is true.

(Signature of the Guide)


Mr. R. ASHOKKUMAR M.E.,

3
TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

1. INTRODUCTION 6
1.1 OBJECTIVE OF TASK 6

1.2 APPARATUS REQUIRED 6


MAIN TEXT 7
2.

2.1 OVERALL BLOCKDIAGRAM 7


2.2 METHODOLOGY 7

2.3 PROCEDURE 8,9

2.4 CODE 10

RESULTS AND DISCUSSION 12


3.

3.1 OUTPUT 12
12
4. CONCLUSION
13
5. REFERENCES

4
OUTCOME BASED LAB TASKS
RUBRICS FORM (*to be filled by the lab handling faculty only)

Student name: Umamaheswari M


Register number: 201EE232
Name of the laboratory: Electrical Machines
Name of the lab handling faculty: Mr. R. ASHOKKUMAR M.E.,
Name of the task: SPEED OF DC CONTROL MOTOR USING PIC MICRO
CONTROLLER

Experiments mapped:
1.
2.
3.

S.N Rubrics Reward points awarded


o
1
2
3
4
5
Total (50 reward points)

5
Expt. No.: 2 SPEED CONTROL OF DC MOTOR USING PIC

Date: 07.11.2021 CONTROLLER

1.INTRODUCTION
1.1 OBJECTIVE OF TASK

The main objective of the task is to control the speed of the DC motor

along with varying the direction of rotation of the DC motor. In this task it is achieved by using

the pic microcontroller. Here PIC 16F877A type of microcontroller is used for the simulation in

proteus software.

1.2 APPARATUS REQUIRED

COMPONENTS REQUIRED IN PROTEUS SOFTWARE

 PIC16F877A

 L293D motor driver

 DC motor

 Push buttons

 Resistors

 Potentiometer

 LEDs

6
2. METHODOLOGY

2.1 OVERALL BLOCK DIAGRAM

2.2 METHODOLOGY PROPOSED

In this task, the speed of the DC motor can be controlled by controlling the

armature resistance to control the voltage drop across the armature. This method also

uses a variable resistor in series with the armature.

When the variable resistor reaches its minimum value, the armature resistance is at a

normal one, and therefore, the armature voltage drops. When the resistance value is

gradually increased, the voltage across the armature decreases. This in turn leads to a

decrease in the speed of the motor.

PROCEDURE

7
 The circuit connections are made as per the diagram shown below.
● The components we have used here are potentiometer, push button, L293D
motor driver , led and dc motor.

● If we apply +ve to one lead and ground to another , the motor will rotate in
one direction if we reverse the connection motor will rotate in the opposite
direction .

the voltage equation of a simple DC motor is

V = Eb + IaRa

V is the supplied voltage, Eb is the back EMF, Ia is the armature current, and Ra is
the armature resistance.

We already know that

Eb = (PøNZ)/60A.

P – number of poles,

A – constant

Z – number of conductors

N- the speed of the motor

Substituting the value of Eb in the voltage equation, we get

V = ((PøNZ)/60A) + IaRa

Or, V – IaRa = (PøNZ)/60A

i.e., N = (PZ/60A) (V – IaRa)/ ø

The above equation can also be written as:

8
N = K (V – IaRa)/ ø, K is a constant

This implies three things:

 The speed of the motor is directly proportional to supply voltage.


 The speed of the motor is inversely proportional to the armature voltage
drop.
 Speed of the motor is inversely proportional to the flux due to the field
findings Thus, the speed of a DC motor can be controlled in three ways:
 By varying the supply voltage
 By varying the flux, and by varying the current through the field winding
 By varying the armature voltage, and by varying the armature resistance
 In this experiment the speed of the dc motor is controlled by varying the
resistance.
 The speed of dc motor can be varied by the help of potentiometer
 L293D motor driver is used to control the direction of the dc motor
 When the push button 2 is pressed the motor starts to rotate in anti-
clockwise direction and it is indicated by LED-2
 When the stop button is pressed the motor tends to stop.

2.4 CODE

9
#include <16F877A.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#device ADC = 10
#use delay(clock = 8000000)
#use fast_io(B)
#use fast_io(C)

unsigned int16 i ;
void main(){
  port_b_pullups(TRUE);                  // Enable PORTB pull-ups
  output_b(0);                           // PORTB initial state
  set_tris_b(7);                         // Configure RB0, RB1 & RB2 as inputs
  output_c(0);                           // PORTC initial state
  set_tris_c(0);                         // Configure PORTC pins as outputs
  setup_adc(ADC_CLOCK_DIV_32);           // Set ADC conversion time to 32Tosc
  setup_adc_ports(AN0);                  // Configure AN0 as analog
  set_adc_channel(0);                    // Select channel AN0
  setup_timer_2(T2_DIV_BY_16, 255, 1);   // Set PWM frequency to 488Hz
  delay_ms(100);                         // Wait 100ms
  while(TRUE){
    i = read_adc();                      // Read from AN0 and store in i
    if(input(PIN_B3) == 1)               // If direction 1 is selected
      set_pwm1_duty(i);                  // Set pwm1 duty cycle
    if(input(PIN_B4) == 1)               // If direction 2 is selected
      set_pwm2_duty(i);                  // Set pwm2 duty cycle
    delay_ms(10);                        // Wait 10ms

10
    if(input(PIN_B0) == 0){              // If RB0 button pressed
      if(input(PIN_B3) == 0){            // If direction 1 not already selected
        output_b(0);                     // Both LEDs OFF
        setup_ccp1(CCP_OFF);             // CCP1 OFF
        setup_ccp2(CCP_OFF);             // CCP2 OFF
        output_c(0);                     // PORTC pins low
        delay_ms(100);                   // Wait 100ms
        setup_ccp1(CCP_PWM);             // Configure CCP1 as a PWM
        output_high(PIN_B3);             // RB3 LED ON
        }}
    if(input(PIN_B1) == 0){              // If RB1 button pressed
      if(input(PIN_B4) == 0){            // If direction 2 not already selected
        output_b(0);                     // Both LEDs OFF
        setup_ccp1(CCP_OFF);             // CCP1 OFF
        setup_ccp2(CCP_OFF);             // CCP2 OFF
        output_c(0);                     // PORTC pins low
        delay_ms(100);                   // Wait 100ms
        setup_ccp2(CCP_PWM);             // Configure CCP2 as a PWM
        output_high(PIN_B4);             // RB4 LED ON
        }}
    if(input(PIN_B2) == 0){              // If RB2 button pressed
      setup_ccp1(CCP_OFF);               // CCP1 OFF
      setup_ccp2(CCP_OFF);               // CCP2 OFF
      output_c(0);                       // PORTC pins low
      output_b(0);}                      // Both LEDs OFF
   }
}

11
3. RESULTS AND DISCUSSION
3.1 OUTPUT

4. CONCLUSION
Electric motor is accomplished in almost every mechanical movement that

we see around us. Electric machines are a means of converting energy. Motors take

electrical energy and produce mechanical energy. Electric motors are used to

power hundreds of devices we use in everyday life. With this very basic concept of

direction and speed control we can move the motor clockwise and anticlockwise as

a result lift can move in forward and backward direction and we can vary the speed
12
of a dc motor.The speed control mechanism is applicable in many cases like

controlling the movement of robotic vehicles, movement of motors in paper mills

and the movement of motors in elevators where different types of DC motors are

used. Speed control of the DC motor is one of the most useful features of the

motor.

5. REFERENCES
 https://www.electrical4u.com/speed-control-of-dc-motor/

 https://simple-circuit.com/pic16f877a-l293d-dc-motor-control-proteus-simulation/

13
PROCESS PLAN
Proposed Process Plan Actual Plan Executed

SOFTWARE SIMULATION SOFTWARE SIMULATION

 Drawing the circuit diagram – 20  Drawing the circuit diagram – 20


mins mins

 Choosing the required components in  Choosing the required components in


the proteus software – 30 mins the proteus software – 30 mins

 Connecting the chosen components as  Connecting the chosen components as


drawn in the circuit diagram. – 40 drawn in the circuit diagram. – 40
mins mins

 Writing the code for the simulation in  Writing the code for the simulation in
mikroC software. – 30 mins mikroC software. – 30 mins

 Verification and compiling the code  Verification and compiling the code
in the mikroCsoftware. – 15 mins in the mikroCsoftware. – 15 mins

 Uploading the compiled mikroC file  Uploading the compiled mikroC file
into the PIC microcontroller in into the PIC microcontroller in
proteus software. - 10 mins proteus software. - 10 mins

 Simulating the circuit and verifying  Simulating the circuit and verifying
the output as control the speed of the the output as control the speed of the
DC motor – 20 mins DC motor – 20 mins

Skill: Electrical Machines Date: 07-11-2021 Name: Umamaheswari M

14
Reflection Sheet
S/N Problems Counter measures Status

1. Faced difficulty in picking components in Temporary


proteus software

2. Faced difficulty in coding part Temporary

3. Faced difficulty while simulating the Temporary


circuit

Date: 07.11.2021 Prepared By: Umamaheswari M

15
Status Legend :
Self-understood and resolved
Discussed with Trainer and resolved
Yet to discuss / find solution

16

You might also like