13

Click here to load reader

Report no.6..(bipolar motor n DC motor)

Embed Size (px)

Citation preview

Page 1: Report no.6..(bipolar motor n DC motor)

Al-Azhar University-Gaza

Faculty of Engineering & Information Technology

Mechatronices engineering

Microprocessors & Interfacing

(ITCE 3306)

LAB NO.6

Bipolar stepper motor

DC motor

Prepared By:

Ronza sameer Abu jayyab

No. 20111511

Submitted To:

Eng. Mahmoud I. Hasanain

First semester

2013/2014

Date: 10/12/2013

Page 2: Report no.6..(bipolar motor n DC motor)

Introduction: Bipolar stepper motor which move depend on steps and DC motor which move easily without steps in its shaft these two types of motor have a lot of usage in our life so it's better as engineering university life to know how these two motor work.

Objectives: 1. Known how bipolar stepper motor work, and how i can connect it in my

circuit also which decoder I should use with this motor.2. Incidence knowledge about how DC motor can work, how I can put it in

my circuit , and also whish decoder useful I can use with it.3. So, I can also answer about how I can turn these two motor with clock

wise and with control clock wise.4. Be enable to deal with L293 driver.

Background: Stepper motor:

A stepper motor (or step motor) is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor's position can then be commanded to move and hold at one of these steps without any feedback sensor (an open-loop controller), as long as the motor is carefully sized to the application.

There are two basic winding arrangements for the electromagnetic coils in a two phase stepper motor: bipolar and unipolar.

Bipolar motor

Bipolar motors have a single winding per phase. The current in a winding needs to be reversed in order to reverse a magnetic pole, so the driving circuit must be more complicated, typically with an H-bridge arrangement (however there are several off-the-shelf driver chips available to make this a simple affair). There are two leads per phase, none are common.[1]

A bipolar permanent magnet motor consists of a rotating permanent magnet surrounded by stator poles carrying the windings.Bidirectional drive current is used and the motor is stepped byswitching the windings in sequence. For a motor of this type there are three

possible drive sequences.

Page 3: Report no.6..(bipolar motor n DC motor)

Figure no.1: bipolar stepper motor

Figure no.2 : bipolar rotation

L293D driver:

L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors.

Page 4: Report no.6..(bipolar motor n DC motor)

L293D contains two inbuilt H-bridge driver circuits. In its common mode of

operation, two DC motors can be driven simultaneously, both in forward and

reverse direction. The motor operations of two motors can be controlled by

input logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the

corresponding motor. Logic 01 and 10 will rotate it in clockwise and

anticlockwise directions, respectively.

Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating. When an enable input is high, the associated driver gets enabled. As a result, the outputs become active and work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their outputs are off and in the high-impedance state.[2]

Figure no.3 : L293D driver.

 Pin No Function Name1Enable pin for Motor 1; active highEnable 1,22Input 1 for Motor 1Input 13Output 1 for Motor 1Output 14Ground (0V)Ground5Ground (0V)Ground6Output 2 for Motor 1Output 27Input 2 for Motor 1Input 28Supply voltage for Motors; 9-12V (up to 36V) Vcc 2

9Enable pin for Motor 2; active highEnable 3,410Input 1 for Motor 1Input 311Output 1 for Motor 1Output 312Ground (0V)Ground13Ground (0V)Ground14Output 2 for Motor 1Output 415Input2 for Motor 1Input 416Supply voltage; 5V (up to 36V)Vcc 1

Figure no.4 : Pin Description

Page 5: Report no.6..(bipolar motor n DC motor)

H bridge :

An H bridge is an electronic circuit that enables a voltage to be applied

across a load in either direction. These circuits are often used

in robotics and other applications to allow DC motors to run forwards and

backwards.

Most DC-to-AC converters (power inverters), most AC/AC converters, the DC-to-DC push–pull converter, most motor controllers, and many other kinds of power electronics use H bridges. In particular, a bipolar stepper motor is almost invariably driven by a motor controller containing two H bridges.[3]

Figure no.5 : bipolar stepper motor with L293D driver. DC motor:

A DC motor is a mechanically commutated electric motor powered from direct current (DC). The stator is stationary in space by definition and therefore the current in the rotor is switched by the commutator to also be stationary in space. This is how the relative angle between the stator and rotor magnetic flux is maintained near 90 degrees, which generates the maximum torque.

DC motors have a rotating armature winding (winding in which a voltage is induced) but non-rotating armature magnetic field and a static field winding (winding that produce the main magnetic flux) or permanent magnet. Different connections of the field and armature winding provide different inherent speed/torque regulation characteristics. The speed of a DC motor can be controlled by changing the voltage applied to the armature or by changing the field current. The introduction of variable resistance in the armature circuit or field circuit allowed speed control. Modern DC motors are often controlled by power electronics systems called DC drives.

The introduction of DC motors to run machinery eliminated the need for local steam or internal combustion engines, and line shaft drive systems. DC motors

Page 6: Report no.6..(bipolar motor n DC motor)

can operate directly from rechargeable batteries, providing the motive power for the first electric vehicles. Today DC motors are still found in applications as small as toys and disk drives, or in large sizes to operate steel rolling mills and paper machines.[4]

Figure no.6 : DC motor Figure no.7 : DC motor with L293D driver

Figure no.8 : DC motor rotation.

Experiment: Control circuit:

Figure no.9 : bipolar stepper motor circuit.

Page 7: Report no.6..(bipolar motor n DC motor)

Experiment no.1:Bipolar stepper motor (move with clock wise n control clock wise).

Control code:

Figure no.10 : bipolar stepper motor control code in VB.

Dim i As IntegerPrivate Sub Command1_Click()Timer1.Enabled = TrueTimer2.Enabled = FalseTimer1.Interval = 1End SubPrivate Sub Command2_Click()Timer1.Enabled = FalseTimer2.Enabled = TrueTimer2.Interval = 1End SubPrivate Sub Form_Load()ntport1.address = 888End SubPrivate Sub Timer1_Timer()If i = 0 Then ntport1.Value = 1If i = 1 Then ntport1.Value = 2If i = 2 Then ntport1.Value = 4If i = 3 Then ntport1.Value = 8i = i + 1If i > 3 Then i = 0End SubPrivate Sub Timer2_Timer()If i = 0 Then ntport1.Value = 8If i = 1 Then ntport1.Value = 4If i = 2 Then ntport1.Value = 2If i = 3 Then ntport1.Value = 1i = i + 1If i > 3 Then i = 0End Sub

Page 8: Report no.6..(bipolar motor n DC motor)

Comment:We are moved bipolar stepper motor clock wise and control clock wise by make timer and defined variable I as integer which will increase after finish one turn to make motor turn Sequence. We give first pin of motor value (1), the second pin value (2), the third pin has value (4), and the fourth and final pin has value (8) all to move with clock wise.To move with control clock wise we will reverse the value.

Experiment no.2:Bipolar stepper motor (move with clock wise n control clock wise slow and fast).

Control code:

Figure no.11 : bipolar stepper motor control code in VB.

Dim i As IntegerPrivate Sub Command1_Click()Timer1.Enabled = TrueTimer2.Enabled = FalseTimer1.Interval = 1End SubPrivate Sub Command2_Click()Timer1.Enabled = FalseTimer2.Enabled = TrueTimer1.Interval = 1End SubPrivate Sub Command3_Click()Timer1.Enabled = TrueTimer2.Enabled = FalseTimer1.Interval = 100End SubPrivate Sub Command4_Click()Timer1.Enabled = FalseTimer2.Enabled = TrueTimer1.Interval = 100End SubPrivate Sub Form_Load()ntport1.address = 888

Page 9: Report no.6..(bipolar motor n DC motor)

End SubPrivate Sub Timer1_Timer()If i = 0 Then ntport1.Value = 1If i = 1 Then ntport1.Value = 2If i = 2 Then ntport1.Value = 4If i = 3 Then ntport1.Value = 8i = i + 1If i > 3 Then i = 0End SubPrivate Sub Timer2_Timer()If i = 0 Then ntport1.Value = 8If i = 1 Then ntport1.Value = 4If i = 2 Then ntport1.Value = 2If i = 3 Then ntport1.Value = 1i = i + 1If i > 3 Then i = 0End Sub

Comment:This code control bipolar stepper motor to move in clock wise and control clock wise by reduce the interval of turn or increase this interval.

Experiment no.3:DC motor (move with clock wise n control clock wise).

Control code:

Figure no.12: DC motor control code by VB

Private Sub Command1_Click()ntport1.Value = 1End SubPrivate Sub Command2_Click()ntport1.Value = 2End SubPrivate Sub Command3_Click()ntport1.Value = 0

Page 10: Report no.6..(bipolar motor n DC motor)

End SubPrivate Sub Form_Load()ntport1.address = 888End Sub

Comment:DC motor turn without steps so we don't have timer to give value for each pin in motor we just have two value first one to turn it and the second one to stop the motor movement.In this code we want to turn DC motor three command, first one to turn it with clock wise, the second one with control clock wise, and the third one to stop its movement.

Experiment no.4: Control code: Comment:

Conclusion: Finally after do test for bipolar stepper motor and DC motor to turn with clock wise and control clock wise, we enable to use these motors in our projects.and now there are questions remains is going on in our minds,firstly, how can I control the steppe motor speed? I can do that by controlling of on and off (pulse).Secondly, how can I know which pins connect with each other by H-bridge? I can know that by but parties of hour measurement on the pins, if it make voice Then two pins are connected to each other.

References:

[4] http://en.wikipedia.org/wiki/DC_motor

[3] http://en.wikipedia.org/wiki/H_bridge

[2]http://www.engineersgarage.com/electronic-components/l293d-motor-driver-ic

[1] http://en.wikipedia.org/wiki/Stepper_motor