Sei sulla pagina 1di 24

Circuit drawing of Stepper Motor controller

PIC Circuits Gallery

Stepper Motor controller


On these pages, I will introduce a control circuit for stepper motor.
The software of this project is adapted to Embedded Systems(Lab13) for 2002 of Cleveland State
University.
Pattern drawing of Stepper Motor controller
(Wiring side)
Circuit explanation of Stepper
Motor controller
Motor driving circuit
This is the circuit which drives the coil of stepper motor. There are circuits which drive coil,
coil, coil and coil respectively.
Darlington connection-type transistor is used for the drive of the coil. As for the Darlington
connection, 2 stages of transistors are connected inside in series. The "hfe" of this transistor is
the multiplication of the "hfe" of each transistor inside. In case of 2SD1209K which was used
this time, the hfe is over 4000. Because the ratio of the input electric current and the output
current is big, the rising edge and the falling edge of the control signal can be made sharp.
The diode to be putting between the collector and the power is for the protection of the transistor.
When the transistor becomes OFF from ON, the coil of the motor tries to continue to pass an
electric current and generates high voltage. An electric current by this voltage is applied to the
diode and the high voltage which applies over the transistor is prevented.

Speed control circuit


This is the circuit which controls the rotational speed of the motor.
TR1 becomes ON condition when RB7 becomes H level. In this condition, the electric charge of
capacitor C1 flows through the transistor and the voltage of the both edges of the capacitor
becomes 0 V almost.
When RB7 becomes an L level, the transistor becomes OFF condition. In this condition, the
electric current flows through VR1 and R4 into capacitor C1 and the charging to the capacitor
begins. The voltage of the both edges of the capacitor becomes high gradually as charging is
done. As for the change of this voltage, refer to "Integration circuit".
The voltage of the capacitor is detected by RB5. The software of PIC interrupts the control of the
motor until it checks RB5 after making RB7 an L level and RB5 becomes H level. When making
the value of VR1 small, the charging time of the capacitor is short and the control of the motor
becomes quick. The control of the motor becomes slow when making VR1 big. The speed
control range can be changed by changing the value of the capacitor.

Start/stop circuit
This is the circuit for the clockwise rotating, the counterclockwise rotating or stopping a motor.
The baton switch of the non lock is used. Pull-up resistor is used for the port to become H level
when the switch is OFF. The RB port of PIC16F84A has an internal pull up feature. However,
because RB5 is used for the voltage detection of the capacitor at the circuit this time, an internal
pull up feature isn't used. If using RA port for the voltage detection of the capacitor, the RB
internal pull up feature can be used. The circuit this time put an external pull-up resistor in the
relation of the pattern.
Oscillator
4-MHz resonator is used because the circuit this time doesn't need high-speed
operation.

Power supply circuit


The purpose of this circuit is to keep power supply voltage to PIC to 5V when the power of the
stepper motor is more than 5V.
Because the operating voltage of the stepper motor to be using this time is about 5V, the power
supply voltage is +5V. In this case, the voltage which is applied to PIC becomes less than 5V
because of the voltage drop (about 1V) of the regulator. In case of PIC16F84A, the operation is
possible even if the power falls to about 3V because the operating voltage range is from 2V to
5.5V. It is enough in the 100-mA type.

Stepper motor ( 42SPM-24DCZA )

This is a 2-phase unipolar PM type stepper motor with 48-poles.


Step angle : 7.5 degrees ( 360 degrees/48 )
Drive voltage : 5 to 6V
Coil current : 250mA(5V)/2 coils
PIC16F84A

The control of the stepper motor is done by this PIC. To have explained in the operation principle, coil,
coil, coil and coil are controlled by the software.

Data sheet for PIC16F84A

3 terminal regulator ( 78L05 )

This is used to make the stable voltage of +5V.


A 100-mA type is used.

Data sheet for 78L05

Motor drive transistor ( 2SD1209K )

This is a Darlington connection-type transistor.

At first, I used 2SD1590 ( 8A type ) as the transistor for the drive. However, in case of the motor which was
used this time, the coil current was about 250 mA. So, I changed into the small type transistor. The
maximum collector current of 2SD1209K is 1A and "hfe" is more than 4000.

Data sheet for 2SD1209K


Transistor for the motor speed control ( 2SC1815 )

This is the transistor to control the speed of the motor.

Data sheet for 2SC1815

Diode for the transistor protection

This is the diode to protect a transistor from the back electromotive force which occurs with the coil of the
stepper motor. It depends on the kind of the stepper motor but it is to be OK if it is possible to pass a
hundreds-of-mA electric current.

Baton switch

This is a switch for the clockwise rotating, the counterclockwise


rotating or making a motor stop.

IC socket

This is the socket to mount PIC16F84A.

Resonator

This is a 4 MHz resonator.


Variable resistor for the speed control

B type is used.

Resistor

It is to be OK at 1/8 W.

Resistor for pull up

This is the series resistor to be using for start/stop switch pull up.

Multilayer ceramic capacitor

This capacitor is used to bypass the high frequency noise of the input and output of the power
supply.

Electrolytic capacitor

This capacitor is used as the ripple filter capacitor of the power circuit.
Printed board

This is an universal printed board with 15 x 25 halls.

Wiring terminal

This terminal is used to connect a power supply wire and the variable resistor for the speed control.

Connector for the stepper motor connection

A 6-pin connector is used to connect a stepper motor.


The motor used this time, 5-pin connector is OK. Because the power of the X coil and the Y coil is
connected inside the motor. However, a power line is divided by the kind of the motor. So, 6-pin are used
for two power lines to be able to be connected.

Stud

This is used as the leg of the printed board.


Software flow chart of Stepper Motor controller
Source code file of Stepper Motor controller
001 ;********************************************************
002 ;
003 ; Stepper Motor controller
004 ;
005 ; Author : Seiichi Inoue
006 ;********************************************************
007
008 list p=pic16f84a
009 include p16f84a.inc
010 __config _hs_osc & _wdt_off & _pwrte_on & _cp_off
011
012 ;**************** Label Definition ********************
013 cblock h'0c'
014 mode ;Operation mode
015 ;0=stop 1=right 2=left
016 count1 ;Wait counter
017 count2 ;Wait counter(for 1msec)
018 endc
019
020 rb0 equ 0 ;RB0 of PORTB
021 rb1 equ 1 ;RB1 of PORTB
022 rb2 equ 2 ;RB2 of PORTB
023 rb5 equ 5 ;RB5 of PORTB
024 rb7 equ 7 ;RB7 of PORTB
025
026 ;**************** Program Start ***********************
027 org 0 ;Reset Vector
028 goto init
029 org 4 ;Interrupt Vector
030 clrf intcon ;Clear Interruption reg
031
032 ;**************** Initial Process *********************
033 init
034 bsf status,rp0 ;Change to Bank1
035 clrf trisa ;Set PORTA all OUT
036 movlw b'00100111' ;RB0,1,2.5=IN RB7=OUT
037 movwf trisb ;Set PORTB
038 movlw b'10000000' ;RBPU=1 Pull up not use
039 movwf option_reg ;Set OPTION_REG
040 bcf status,rp0 ;Change to Bank0
041 clrf mode ;Set mode = stop
042 clrf count1 ;Clear counter
043 clrf count2 ;Clear counter
044 movlw b'00000101' ;Set PORTA initial value
045 movwf porta ;Write PORTA
046 bsf portb,rb7 ;Set RB7 = 1
047 btfsc portb,rb5 ;RB5 = 0 ?
048 goto $-1 ;No. Wait
049
050 start
051 ;************* Check switch condition *****************
052 btfsc portb,rb1 ;RB1(stop key) = ON ?
053 goto check1 ;No. Next
054 clrf mode ;Yes. Set stop mode
055 goto drive ;No. Jump to motor drive
056 check1
057 btfsc portb,rb2 ;RB2(right key) = ON ?
058 goto check2 ;No. Next
059 movlw d'1' ;Yes. Set right mode
060 movwf mode ;Save mode
061 goto drive ;No. Jump to motor drive
062 check2
063 btfsc portb,rb0 ;RB0(left key) = ON ?
064 goto drive ;No. Jump to motor drive
065 movlw d'2' ;Yes. Set left mode
066 movwf mode ;Save mode
067
068 ;******************** Motor drive *********************
069 drive
070 movf mode,w ;Read mode
071 bz start ;mode = stop
072 bsf portb,rb7 ;Set RB7 = 1
073 btfsc portb,rb5 ;RB5 = 0 ?
074 goto $-1 ;No. Wait
075 movlw d'5' ;Set loop count(5msec)
076 movwf count1 ;Save loop count
077 loop call timer ;Wait 1msec
078 decfsz count1,f ;count - 1 = 0 ?
079 goto loop ;No. Continue
080 bcf portb,rb7 ;Set RB7 = 0
081 btfss portb,rb5 ;RB5 = 1 ?
082 goto $-1 ;No. Wait
083 movf porta,w ;Read PORTA
084 sublw b'000000101' ;Check motor position
085 bnz drive2 ;Unmatch
086 movf mode,w ;Read mode
087 sublw d'1' ;Right ?
088 bz drive1 ;Yes. Right
089 movlw b'00001001' ;No. Set Left data
090 goto drive_end ;Jump to PORTA write
091 drive1
092 movlw b'00000110' ;Set Right data
093 goto drive_end ;Jump to PORTA write
094 ;-------
095 drive2
096 movf porta,w ;Read PORTA
097 sublw b'000000110' ;Check motor position
098 bnz drive4 ;Unmatch
099 movf mode,w ;Read mode
100 sublw d'1' ;Right ?
101 bz drive3 ;Yes. Right
102 movlw b'00000101' ;No. Set Left data
103 goto drive_end ;Jump to PORTA write
104 drive3
105 movlw b'00001010' ;Set Right data
106 goto drive_end ;Jump to PORTA write
107 ;-------
108 drive4
109 movf porta,w ;Read PORTA
110 sublw b'000001010' ;Check motor position
111 bnz drive6 ;Unmatch
112 movf mode,w ;Read mode
113 sublw d'1' ;Right ?
114 bz drive5 ;Yes. Right
115 movlw b'00000110' ;No. Set Left data
116 goto drive_end ;Jump to PORTA write
117 drive5
118 movlw b'00001001' ;Set Right data
119 goto drive_end ;Jump to PORTA write
120 ;-------
121 drive6
122 movf porta,w ;Read PORTA
123 sublw b'000001001' ;Check motor position
124 bnz drive8 ;Unmatch
125 movf mode,w ;Read mode
126 sublw d'1' ;Right ?
127 bz drive7 ;Yes. Right
128 movlw b'00001010' ;No. Set Left data
129 goto drive_end ;Jump to PORTA write
130 drive7
131 movlw b'00000101' ;Set Right data
132 goto drive_end ;Jump to PORTA write
133 ;-------
134 drive8
135 movlw b'00000101' ;Compulsion setting
136
137 drive_end
138 movwf porta ;Write PORTA
139 goto start ;Jump to start
140
141 ;************* 1msec Timer Subroutine *****************
142 timer
143 movlw d'200' ;Set loop count
144 movwf count2 ;Save loop count
145 tmlp nop ;Time adjust
146 nop ;Time adjust
147 decfsz count2,f ;count - 1 = 0 ?
148 goto tmlp ;No. Continue
149 return ;Yes. Count end
150
151 ;********************************************************
152 ; END of Stepper Motor controller
153 ;********************************************************
154
155 end

Listing file of Stepper Motor controller


MPASM 02.50.02 Intermediate STEP.ASM 3-9-2001 23:52:45
PAGE 1
LOC OBJECT CODE LINE SOURCE TEXT
VALUE

00001
;********************************************************
00002 ;
00003 ; Stepper Motor controller
00004 ;
00005 ; Author :
Seiichi Inoue
00006
;********************************************************
00007
00008 LIST P=PIC16F84A
00009 INCLUDE P16F84A.INC
00001 LIST
00002 ; P16F84A.INC Standard Header File, Version
2.00'(modify)
00134 LIST
2007 3FF2 00010 __CONFIG _HS_OSC & _WDT_OFF &
_PWRTE_ON & _CP_OFF
00011
00012 ;**************** Label Definition
********************
00013 CBLOCK H'0c'
0000000C 00014 MODE ;Operation
mode
00015 ;0=stop
1=right 2=left
0000000D 00016 COUNT1 ;Wait
counter
0000000E 00017 COUNT2 ;Wait
counter(for 1msec)
00018 ENDC
00019
00000000 00020 RB0 EQU 0 ;RB0 of
PORTB
00000001 00021 RB1 EQU 1 ;RB1 of
PORTB
00000002 00022 RB2 EQU 2 ;RB2 of
PORTB
00000005 00023 RB5 EQU 5 ;RB5 of
PORTB
00000007 00024 RB7 EQU 7 ;RB7 of
PORTB
00025
00026 ;**************** Program Start
***********************
0000 00027 ORG 0 ;Reset
Vector
0000 2805 00028 GOTO INIT
0004 00029 ORG 4 ;Interrupt
Vector
0004 018B 00030 CLRF INTCON ;Clear
Interruption reg
00031
00032 ;**************** Initial Process
*********************
0005 00033 INIT
0005 1683 00034 BSF STATUS,RP0 ;Change to
Bank1
0006 0185 00035 CLRF TRISA ;Set PORTA
all OUT
0007 3027 00036 MOVLW B'00100111'
;RB0,1,2.5=IN RB7=OUT
0008 0086 00037 MOVWF TRISB ;Set PORTB
0009 3080 00038 MOVLW B'10000000' ;RBPU=1 Pull
up not use
000A 0081 00039 MOVWF OPTION_REG ;Set
OPTION_REG
000B 1283 00040 BCF STATUS,RP0 ;Change to
Bank0
000C 018C 00041 CLRF MODE ;Set mode =
stop
000D 018D 00042 CLRF COUNT1 ;Clear
counter
000E 018E 00043 CLRF COUNT2 ;Clear
counter
000F 3005 00044 MOVLW B'00000101' ;Set PORTA
initial value
0010 0085 00045 MOVWF PORTA ;Write PORTA
0011 1786 00046 BSF PORTB,RB7 ;Set RB7 = 1
0012 1A86 00047 BTFSC PORTB,RB5 ;RB5 = 0 ?
0013 2812 00048 GOTO $-1 ;No. Wait
00049
0014 00050 START
MPASM 02.50.02 Intermediate STEP.ASM 3-9-2001 23:52:45
PAGE 2

LOC OBJECT CODE LINE SOURCE TEXT


VALUE

00051 ;************* Check switch condition


*****************
0014 1886 00052 BTFSC PORTB,RB1 ;RB1(stop
key) = ON ?
0015 2818 00053 GOTO CHECK1 ;No. Next
0016 018C 00054 CLRF MODE ;Yes. Set
stop mode
0017 2821 00055 GOTO DRIVE ;No. Jump to
motor drive
0018 00056 CHECK1
0018 1906 00057 BTFSC PORTB,RB2 ;RB2(right
key) = ON ?
0019 281D 00058 GOTO CHECK2 ;No. Next
001A 3001 00059 MOVLW D'1' ;Yes. Set
right mode
001B 008C 00060 MOVWF MODE ;Save mode
001C 2821 00061 GOTO DRIVE ;No. Jump to
motor drive
001D 00062 CHECK2
001D 1806 00063 BTFSC PORTB,RB0 ;RB0(left
key) = ON ?
001E 2821 00064 GOTO DRIVE ;No. Jump to
motor drive
001F 3002 00065 MOVLW D'2' ;Yes. Set
left mode
0020 008C 00066 MOVWF MODE ;Save mode
00067
00068 ;******************** Motor drive
*********************
0021 00069 DRIVE
0021 080C 00070 MOVF MODE,W ;Read mode
0022 1903 2814 00071 BZ START ;mode = stop
0024 1786 00072 BSF PORTB,RB7 ;Set RB7 = 1
0025 1A86 00073 BTFSC PORTB,RB5 ;RB5 = 0 ?
0026 2825 00074 GOTO $-1 ;No. Wait
0027 3005 00075 MOVLW D'5' ;Set loop
count(5msec)
0028 008D 00076 MOVWF COUNT1 ;Save loop
count
0029 2062 00077 LOOP CALL TIMER ;Wait 1msec
002A 0B8D 00078 DECFSZ COUNT1,F ;count - 1 =
0 ?
002B 2829 00079 GOTO LOOP ;No.
Continue
002C 1386 00080 BCF PORTB,RB7 ;Set RB7 = 0
002D 1E86 00081 BTFSS PORTB,RB5 ;RB5 = 1 ?
002E 282D 00082 GOTO $-1 ;No. Wait
002F 0805 00083 MOVF PORTA,W ;Read PORTA
0030 3C05 00084 SUBLW B'000000101' ;Check motor
position
0031 1D03 283B 00085 BNZ DRIVE2 ;Unmatch
0033 080C 00086 MOVF MODE,W ;Read mode
0034 3C01 00087 SUBLW D'1' ;Right ?
0035 1903 2839 00088 BZ DRIVE1 ;Yes. Right
0037 3009 00089 MOVLW B'00001001' ;No. Set
Left data
0038 2860 00090 GOTO DRIVE_END ;Jump to
PORTA write
0039 00091 DRIVE1
0039 3006 00092 MOVLW B'00000110' ;Set Right
data
003A 2860 00093 GOTO DRIVE_END ;Jump to
PORTA write
00094 ;-------
003B 00095 DRIVE2
003B 0805 00096 MOVF PORTA,W ;Read PORTA
003C 3C06 00097 SUBLW B'000000110' ;Check motor
position
003D 1D03 2847 00098 BNZ DRIVE4 ;Unmatch
003F 080C 00099 MOVF MODE,W ;Read mode
0040 3C01 00100 SUBLW D'1' ;Right ?
0041 1903 2845 00101 BZ DRIVE3 ;Yes. Right
0043 3005 00102 MOVLW B'00000101' ;No. Set
Left data
0044 2860 00103 GOTO DRIVE_END ;Jump to
PORTA write
MPASM 02.50.02 Intermediate STEP.ASM 3-9-2001 23:52:45
PAGE 3

LOC OBJECT CODE LINE SOURCE TEXT


VALUE

0045 00104 DRIVE3


0045 300A 00105 MOVLW B'00001010' ;Set Right
data
0046 2860 00106 GOTO DRIVE_END ;Jump to
PORTA write
00107 ;-------
0047 00108 DRIVE4
0047 0805 00109 MOVF PORTA,W ;Read PORTA
0048 3C0A 00110 SUBLW B'000001010' ;Check motor
position
0049 1D03 2853 00111 BNZ DRIVE6 ;Unmatch
004B 080C 00112 MOVF MODE,W ;Read mode
004C 3C01 00113 SUBLW D'1' ;Right ?
004D 1903 2851 00114 BZ DRIVE5 ;Yes. Right
004F 3006 00115 MOVLW B'00000110' ;No. Set
Left data
0050 2860 00116 GOTO DRIVE_END ;Jump to
PORTA write
0051 00117 DRIVE5
0051 3009 00118 MOVLW B'00001001' ;Set Right
data
0052 2860 00119 GOTO DRIVE_END ;Jump to
PORTA write
00120 ;-------
0053 00121 DRIVE6
0053 0805 00122 MOVF PORTA,W ;Read PORTA
0054 3C09 00123 SUBLW B'000001001' ;Check motor
position
0055 1D03 285F 00124 BNZ DRIVE8 ;Unmatch
0057 080C 00125 MOVF MODE,W ;Read mode
0058 3C01 00126 SUBLW D'1' ;Right ?
0059 1903 285D 00127 BZ DRIVE7 ;Yes. Right
005B 300A 00128 MOVLW B'00001010' ;No. Set
Left data
005C 2860 00129 GOTO DRIVE_END ;Jump to
PORTA write
005D 00130 DRIVE7
005D 3005 00131 MOVLW B'00000101' ;Set Right
data
005E 2860 00132 GOTO DRIVE_END ;Jump to
PORTA write
00133 ;-------
005F 00134 DRIVE8
005F 3005 00135 MOVLW B'00000101' ;Compulsion
setting
00136
0060 00137 DRIVE_END
0060 0085 00138 MOVWF PORTA ;Write PORTA
0061 2814 00139 GOTO START ;Jump to
start
00140
00141 ;************* 1msec Timer Subroutine
*****************
0062 00142 TIMER
0062 30C8 00143 MOVLW D'200' ;Set loop
count
0063 008E 00144 MOVWF COUNT2 ;Save loop
count
0064 0000 00145 TMLP NOP ;Time adjust
0065 0000 00146 NOP ;Time adjust
0066 0B8E 00147 DECFSZ COUNT2,F ;count - 1 =
0 ?
0067 2864 00148 GOTO TMLP ;No.
Continue
0068 0008 00149 RETURN ;Yes. Count
end
00150
00151
;********************************************************
00152 ; END of Stepper Motor
controller
00153
;********************************************************
00154
00155 END
MPASM 02.50.02 Intermediate STEP.ASM 3-9-2001 23:52:45
PAGE 4

Label list has been deleted.

MEMORY USAGE MAP ('X' = Used, '-' = Unused)

0000 : X---XXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX


XXXXXXXXXXXXXXXX
0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXX-------
----------------
2000 : -------X-------- ---------------- ----------------
----------------

All other memory blocks unused.

Program Memory Words Used: 102


Program Memory Words Free: 922

Errors : 0
Warnings : 0 reported, 0 suppressed
Messages : 0 reported, 0 suppressed
Processing explanation of Stepper Motor
controller

Label definition
;**************** Label Definition ********************
cblock h'0c'
The data area is automatically assigned from 0ch by CBLOCK directive. ENDC is used for the
ending of assignment.
The purpose of each data area is shown below.

Label Purpose
This is the area which manages the condition of the motor control.
mode :
0=Stop, 1=Clockwise, 2=Counterclockwise
This is the count area to make control waiting time.
count1 :
It counts 1 millisecond five times and 5 milliseconds are made.
count2 : This is the counter to make 1 millisecond.

Program start
;**************** Program Start ***********************

Instruction is executed from Zero addresses of the program memory when making the
power ON of the PIC. When there is interruption processing, processing is begun from
the addresse 4. Because it isn't using interruption this time, there is not program
execution from the addresse 4. It makes the interruption prohibition condition if the
interruption occurs. It isn't necessary to do this processing.

Initialization process
;**************** Initial Process *********************
The following processing is done as the processing of being initialized after the turning
on.
The initialization of the mode of port A
All ports are set to output mode.

The initialization of the mode of port B


RB0,1,2 and 5 are set to input mode. And RB7 is set to output mode.

Port B pull-ups are disabled (RPBU=1)


Because RB5 is used as the high impedance input at the circuit this time, the RB
pull up feature should not be used.

Setting of a stop mode


Immediately after turned on, it sets a motor to the stop mode. When there is not
this step, the original value of mode becomes 0. It is put for the safety.

Counters for the control waiting time are initialized


There is not a problem even if there is not these processing. They are put for the
safety.

Port A initialization
It sets 0101 as the initial state of port A. Because it drives with the transistor, the
logic reverses. It is in the condition, =H =L =H =L, from the bit on the
left.

Discharging of the capacitor for the speed control


It makes RB7 H level and it makes TR1 ON and discharging in the electric charge
of the capacitor for the speed control. The end of the discharge is confirmed by
RB5.

Switch condition confirmation process


;************* Check switch condition *****************
It detects the ON condition of the stop switch, the RRC switch, the RLC switch. A
condition is set to mode according to the kind of the switch which was made ON. The
order of the detection is a stop, a RRC, a RLC. When more than one switch is pushed at
the same time, the switch which detected ON earlier is effective.
This processing is done every time it controls 1 step of motor.

Motor drive process


;******************** Motor drive *********************
A stop mode is checked first. In case of the stop mode, it doesn't drive the motor and it
jumps to the switch condition confirmation process.

In case of not being a stop mode, the following process is done.


Discharging of the capacitor for the speed control
Discharging the capacitor as the preparation to make the timing of the speed
control.

The wait processing of 5 milliseconds


In the high-speed control, the rotor doesn't follow the change of the magnetic pole
and the step motor doesn't rotate normally. It sets a timer value to turn a full speed
normally.
In case of the motor which was used this time, it doesn't rotate normally when
making less than 5 milliseconds.

The charging of a capacitor for the speed control and the confirmation process
It makes RB7 an L level and it begins charging the capacitor. It confirms that the
charging completes by RB5. It is completion if RB5 becomes H level. Correctly, it
is not charging completion and it is the fact that the voltage of the capacitor
became above the threshold voltage of RB5.

The motor drive process


After the speed control timing, a motor is driven. The control state of the motor is
confirmed first. This is done by reading the condition of port A. Next, whether it
is a clockwise mode or a counterclockwise mode is judged. The following control
state which should drive a motor by the result is set to port A. Because there are
four conditions, processing is done in each condition.
After the motor drive process, it jumps again to the switch condition confirmation
process.

Operation confirmation of Stepper Motor


controller
The stationary torque of the stepper motor is large. However, as the turn becomes fast, the turn
torque falls. The stepper motor can not do a high-speed turn. A stepper motor is made to control a
turn position correctly. It is to control a turn position correctly like the drive motor of the printer
and so on. The circuit this time controlled the number of rotations of the motor by the charging
of the capacitor but can control a turn angle in the drive number of times (the step) if remodeling
software.

By making this controller, I found the following.


The turn torque falls extremely when the revolution rises.
It shivered and the motor didn't rotate when making the high-speed side when
adjusting control timing.
When grasping an axis of rotation with the hand when turning at high speed,
the turn has stopped immediately.

The torque in case of stop is large.


I don't find how much power it is because I don't have a measurement
receptacle. However, it doesn't move when not applying considerable power
when the motor stops.
A measurement result with number of rotations is shown below.
The most low speed : 27 rpm
The full speed : 128 rpm

The most low speed can make the turn which was more slowly if it makes the value of
the capacitor for the speed control big.
Because the full speed is the speed that the turn stops when applying a few loads, it isn't
practical. Because the mass of rotor of the motor is related, this is the speed limitation
of this motor.

Potrebbero piacerti anche