23
Mr. Sanjay Sinha Head of Department Mr. J.K. Vashishtha Project Coordinator Mr. Ashish Pratap Singh Project Guide P.C. Interfaced Speed Control of D.C. Motor (Using C++) DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING COLLEGE OF ENGINEERING ROORKEE ROORKEE – 247667 (INDIA) Submitted By: i) Karan Kumar ii) Mansi Agarwal iii) Pranav Haldar

Dc Motor Speed Control Using C++

Embed Size (px)

Citation preview

Page 1: Dc Motor Speed Control Using C++

Mr. Sanjay Sinha

Head of DepartmentMr. J.K. Vashishtha

Project Coordinator

Mr. Ashish Pratap Singh

Project Guide

P.C. Interfaced Speed Control of D.C. Motor(Using C++)

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERINGCOLLEGE OF ENGINEERING ROORKEE

ROORKEE – 247667 (INDIA)

Submitted By:

i) Karan Kumar ii) Mansi Agarwal iii) Pranav Haldar

Page 2: Dc Motor Speed Control Using C++

Introduction

The aim of our project was to implement a complete speed control system for a DC

motor.

Traditionally, speed control of the DC motors in the industries is implemented by

interfacing the motor through a Micro-controller which at times is a costly affair.

Thus, Our Idea is to use the Computer’s processor to control the speed of a simple

D.C. motor.

The hardware consists of discrete elements such as Darlington Pairs [TIP 122 / TIP

127], resistors[1K and 5.6K], diodes[IN4007] and DC motor[9V 500rpm].

The software comprises mainly the coding for a graphical user interface (GUI) and ‘H-

Bridge Motor Driving Algorithm’ written in C++.

The interfacing of the DC motor with the PC is done through the LPT port, which is

usually known as Printer Port.

Page 3: Dc Motor Speed Control Using C++

D.C. Motors

The Direct Current (DC) motor is one of the first machines

devised to convert electrical power into mechanical power.

Permanent Magnet (PM) direct current converts electrical

energy into mechanical energy through the interaction of

two magnetic fields.

One field is produced by a permanent magnet assembly; the other field is

produced by an electrical current flowing in the motor windings.

These two fields result in a torque which tends to rotate the rotor. As the

rotor turns, the current in the windings is commutated to produce a

continuous torque output.

Page 4: Dc Motor Speed Control Using C++

Inside DC Motor

A simple motor has six parts, as

shown in the diagram below: Armature or rotor

Commutator

Brushes

Axle

Field magnet

DC power supply of some sort

An electric motor is all about

magnets and magnetism: A motor

uses magnets to create motion.

Page 5: Dc Motor Speed Control Using C++

Some Other Parts

Page 6: Dc Motor Speed Control Using C++

Permanent Magnet DC Motor

A simple, permanent- magnet DC motor is an

essential element in a variety of products, such

as toys, servo mechanisms, valve actuators,

robots, and automotive electronics.

When compared to AC or wound field DC motors. PM motors are usually physically

smaller in overall size and lighter for a given power rating.

Furthermore its relationship between torque and speed is very linear, it can provide

relatively high torque at low speeds and PM Field provides some inherent self-breaking

when power to the motor is shut off.

There are several disadvantages through those being mostly being high current during

a stall condition and during instantaneous reversal. Those can damage some motors or

be problematic to control circuitry.

Page 7: Dc Motor Speed Control Using C++

Starting a DC Motor

At  the  moment  a  DC  motor  is  started  the armature  is  stationary  and  there  is

 no counter  EMF being generated. The only component to limit starting current is

the armature resistance, which, in most DC motors is a very low value

(approximately one ohm or less). Thus a very high starting current flows.

In order to reduce this very high starting current, an external resistance must be

placed in series with  the armature  during the  starting period.

While the this approach works well, it generates heat and hence wastes power.

Thus, simple Pulse Width Modulation DC motor control eliminates this problem.

Page 8: Dc Motor Speed Control Using C++

Reversing a DC Motor

Sometimes the rotation direction

needs to be changed.

In normal permanent magnet motors, this rotation is changed by changing the

polarity of operating power (for example by switching from negative power supply

to positive or by interchanging the power terminals going to power supply).

This direction changing is typically implemented using relay or a circuit called “H

Bridge”.

Page 9: Dc Motor Speed Control Using C++

DC Motor Speed ControlMotor speed control of DC motor is nothing new. A simplest method to control the

rotation speed of a DC motor is to control its driving voltage.

The higher the voltage is the higher speed the motor tries to reach.

In many applications a simple voltage regulation would cause lots of power loss on

control circuit, so a Pulse Width Modulation method (PWM) is used in many DC motor

controlling applications.

In the basic Pulse Width Modulation (PWM) method, the operating power to the

motors is turned on and off to modulate the current to the motor. The ratio of “on” time

to “off” time is what determines the speed of the motor.

Page 10: Dc Motor Speed Control Using C++

Pulse Width Modulation

The speed of a permanent magnet DC motor can be altered by varying the voltage

applied to its terminal.

One way of varying the applied voltage is by using the pulse-width modulation (PWM)

technique. Using this technique, a fixed frequency voltage signal with varying pulse-

width is applied to the motor terminal.

The PWM voltage wave forms for the motor can be obtained using a special power

electronic circuit called a DC chopper [Class E].

A DC chopper basically uses power switching devices to switch a constant DC

voltage on and off according to a specified switching scheme in order to obtain the

required voltage and current wave forms.

In this project, we have taken one type of DC chopper configuration called bridge

power converter also known as “H-bridge converter”.

Page 11: Dc Motor Speed Control Using C++

Pulse-width modulation control works by switching the power supplied to

the motor ON and OFF very rapidly.

The DC voltage is converted to a square-wave signal, alternating

between fully ON and zero, giving the motor a series of power “kicks”.

By adjusting the duty cycle of the signal i.e., the time fraction it is “ON”,

the average power can be varied, and hence the motor speed.

PWM Control

Page 12: Dc Motor Speed Control Using C++

PWM Control

Page 13: Dc Motor Speed Control Using C++

Drive and Control Circuitry

A very popular circuit for driving DC motors is called an “H-bridge”. It is called that

because it looks like the capital letter ‘H’ on classic schematics.

The great ability of an H-bridge circuit is that the motor can be drive forward or

backward at any speed, optionally using a completely independent power source.

 

An H-bridge design can be really simple for prototyping or really extravagant for

added protection and isolation.

An H-bridge can be implemented with various kinds of switching components

(commonly, Bipolar Transistors, FETs, MOSFETs, etc

Page 14: Dc Motor Speed Control Using C++

Simplified Model : H-Bridge

On can alter the states of these four

switches in order to manipulate the

voltage across the motor, and through

that the direction of current flow and

rotation of the motor.

Page 15: Dc Motor Speed Control Using C++

Figure 1: Motor spins freelyFigure 2 : Motor spins freely in

opposite direction

Figure 3 : Active Braking Figure 4 : Short Circuiting

Simplified Model : H-Bridge

Page 16: Dc Motor Speed Control Using C++

PC Interfacing

The original IBM-PC’s Parallel Printer

Port had a total of 12 digital outputs

and 5 digital inputs accessed via 3

consecutive 8-bit ports in the

processor’s I/O space.

8 output pins accessed via the DATA

Port [D0 to D7]

5 Input pins (one inverted) accessed via the STATUS Port [S3 to S7]

The remaining 8 pins are grounded.

Page 17: Dc Motor Speed Control Using C++

Programming

The Coding of the Project has been done in C++.

The coding has been done with the following objective:-

Coding for Graphic User Interface [GUI]

Generation of the PWM output on port pins (2, 3, 4, 5), as well as

Switching of the transistors to change the direction of motor.

The Software is mainly divided into 3 parts:-

Mouse Interfacing

Graphics

PWM Generation

Page 18: Dc Motor Speed Control Using C++

Programming

Figure : PWM Generated through our Software

Page 19: Dc Motor Speed Control Using C++

Basic Circuit Design

This is from where we started.

Page 20: Dc Motor Speed Control Using C++

Final Circuit

Page 21: Dc Motor Speed Control Using C++

Conclusion

The motor can be started / stopped and made to retain a set speed irrespective of

the load.

The motor can be run as low as 100 rpm and as high as 1200 rpm.

Program interface is user-friendly enabling flexible and simple operation.

H-bride controller drives the motor to reach the speed smoothly and within an

acceptable period of time.

Since we control the average armature voltage, speed could be controlled only

below the rated speed.

Though PC was used in controlling due to ease of programming and simplicity, in

particular as a demonstrative prototype, the program is used to generate the signal.

Page 22: Dc Motor Speed Control Using C++

Application & ScopeThis project is hardware cum software application, which controls the speed and direction of a

DC motor through mouse click. Thus this project helps in many real life applications where

variable speeds may be required like, drives for blowers and DC powered fans used in

electronics, telecommunications and industrial equipment applications.

The most recent application of this project was in mars rover (spirit, opportunity) in this

application the movement of vehicle and also the camera provided was controlled by same type

of speed control concept in wireless mode.

We can also design a GPS (Global Positioning System) for unmanned spaced vehicle and

Robots by utilizing the similar principle.

Other applications of this project can be in Internet Rovers, Personal Mobility, Submersible

ROVs, Unmanned Aerial Vehicles (UAV), Machine Control, Animatronics Props, Force-Feedback

Systems.

Page 23: Dc Motor Speed Control Using C++

QUESTIONS ?

Thank You