Circuit Drawing of Stepper Motor Controller

30
Circuit drawing of Stepper Motor controller

Transcript of Circuit Drawing of Stepper Motor Controller

Page 1: Circuit Drawing of Stepper Motor Controller

Circuit drawing of Stepper Motor controller

Page 2: Circuit Drawing of Stepper Motor Controller

PIC Circuits Gallery

Stepper Motor controllerOn 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.

Page 3: Circuit Drawing of Stepper Motor Controller

Pattern drawing of Stepper Motor controller(Wiring side)

Circuit explanation of Stepper Motor controller

Page 4: Circuit Drawing 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 circuitThis 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 circuitThis 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.

Page 5: Circuit Drawing of Stepper Motor Controller

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 6VCoil current : 250mA(5V)/2 coils

Page 6: Circuit Drawing of Stepper Motor Controller

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

Page 7: Circuit Drawing of Stepper Motor Controller

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

Page 8: Circuit Drawing of Stepper Motor Controller

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.

Page 9: Circuit Drawing of Stepper Motor Controller

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

Page 10: Circuit Drawing of Stepper Motor Controller

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.

Page 11: Circuit Drawing of Stepper Motor Controller

Software flow chart of Stepper Motor controller

Page 12: Circuit Drawing of Stepper Motor Controller

Source code file of Stepper Motor controller

001 ;********************************************************

Page 13: Circuit Drawing of Stepper Motor Controller

002003004005006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054055056057

;; Stepper Motor controller;; Author : Seiichi Inoue;********************************************************

list p=pic16f84a include p16f84a.inc __config _hs_osc & _wdt_off & _pwrte_on & _cp_off

;**************** Label Definition ******************** cblock h'0c'mode ;Operation mode ;0=stop 1=right 2=leftcount1 ;Wait countercount2 ;Wait counter(for 1msec) endc

rb0 equ 0 ;RB0 of PORTBrb1 equ 1 ;RB1 of PORTBrb2 equ 2 ;RB2 of PORTBrb5 equ 5 ;RB5 of PORTBrb7 equ 7 ;RB7 of PORTB

;**************** Program Start *********************** org 0 ;Reset Vector goto init org 4 ;Interrupt Vector clrf intcon ;Clear Interruption reg

;**************** Initial Process *********************init bsf status,rp0 ;Change to Bank1 clrf trisa ;Set PORTA all OUT movlw b'00100111' ;RB0,1,2.5=IN RB7=OUT movwf trisb ;Set PORTB movlw b'10000000' ;RBPU=1 Pull up not use movwf option_reg ;Set OPTION_REG bcf status,rp0 ;Change to Bank0 clrf mode ;Set mode = stop clrf count1 ;Clear counter clrf count2 ;Clear counter movlw b'00000101' ;Set PORTA initial value movwf porta ;Write PORTA bsf portb,rb7 ;Set RB7 = 1 btfsc portb,rb5 ;RB5 = 0 ? goto $-1 ;No. Wait

start;************* Check switch condition ***************** btfsc portb,rb1 ;RB1(stop key) = ON ? goto check1 ;No. Next clrf mode ;Yes. Set stop mode goto drive ;No. Jump to motor drivecheck1 btfsc portb,rb2 ;RB2(right key) = ON ?

Page 14: Circuit Drawing of Stepper Motor Controller

058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089090091092093094095096097098099100101102103104105106107108109110111112113

goto check2 ;No. Next movlw d'1' ;Yes. Set right mode movwf mode ;Save mode goto drive ;No. Jump to motor drivecheck2 btfsc portb,rb0 ;RB0(left key) = ON ? goto drive ;No. Jump to motor drive movlw d'2' ;Yes. Set left mode movwf mode ;Save mode

;******************** Motor drive *********************drive movf mode,w ;Read mode bz start ;mode = stop bsf portb,rb7 ;Set RB7 = 1 btfsc portb,rb5 ;RB5 = 0 ? goto $-1 ;No. Wait movlw d'5' ;Set loop count(5msec) movwf count1 ;Save loop countloop call timer ;Wait 1msec decfsz count1,f ;count - 1 = 0 ? goto loop ;No. Continue bcf portb,rb7 ;Set RB7 = 0 btfss portb,rb5 ;RB5 = 1 ? goto $-1 ;No. Wait movf porta,w ;Read PORTA sublw b'000000101' ;Check motor position bnz drive2 ;Unmatch movf mode,w ;Read mode sublw d'1' ;Right ? bz drive1 ;Yes. Right movlw b'00001001' ;No. Set Left data goto drive_end ;Jump to PORTA writedrive1 movlw b'00000110' ;Set Right data goto drive_end ;Jump to PORTA write;-------drive2 movf porta,w ;Read PORTA sublw b'000000110' ;Check motor position bnz drive4 ;Unmatch movf mode,w ;Read mode sublw d'1' ;Right ? bz drive3 ;Yes. Right movlw b'00000101' ;No. Set Left data goto drive_end ;Jump to PORTA writedrive3 movlw b'00001010' ;Set Right data goto drive_end ;Jump to PORTA write;-------drive4 movf porta,w ;Read PORTA sublw b'000001010' ;Check motor position bnz drive6 ;Unmatch movf mode,w ;Read mode sublw d'1' ;Right ?

Page 15: Circuit Drawing of Stepper Motor Controller

114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155

bz drive5 ;Yes. Right movlw b'00000110' ;No. Set Left data goto drive_end ;Jump to PORTA writedrive5 movlw b'00001001' ;Set Right data goto drive_end ;Jump to PORTA write;-------drive6 movf porta,w ;Read PORTA sublw b'000001001' ;Check motor position bnz drive8 ;Unmatch movf mode,w ;Read mode sublw d'1' ;Right ? bz drive7 ;Yes. Right movlw b'00001010' ;No. Set Left data goto drive_end ;Jump to PORTA writedrive7 movlw b'00000101' ;Set Right data goto drive_end ;Jump to PORTA write;-------drive8 movlw b'00000101' ;Compulsion setting

drive_end movwf porta ;Write PORTA goto start ;Jump to start

;************* 1msec Timer Subroutine *****************timer movlw d'200' ;Set loop count movwf count2 ;Save loop counttmlp nop ;Time adjust nop ;Time adjust decfsz count2,f ;count - 1 = 0 ? goto tmlp ;No. Continue return ;Yes. Count end

;********************************************************; END of Stepper Motor controller;********************************************************

end

Listing file of Stepper Motor controller

MPASM 02.50.02 Intermediate STEP.ASM 3-9-2001 23:52:45 PAGE 1

Page 16: Circuit Drawing of Stepper Motor Controller

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 LIST2007 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 Vector0000 2805 00028 GOTO INIT0004 00029 ORG 4 ;Interrupt Vector0004 018B 00030 CLRF INTCON ;Clear Interruption reg

Page 17: Circuit Drawing of Stepper Motor Controller

00031 00032 ;**************** Initial Process *********************0005 00033 INIT0005 1683 00034 BSF STATUS,RP0 ;Change to Bank10006 0185 00035 CLRF TRISA ;Set PORTA all OUT0007 3027 00036 MOVLW B'00100111' ;RB0,1,2.5=IN RB7=OUT0008 0086 00037 MOVWF TRISB ;Set PORTB0009 3080 00038 MOVLW B'10000000' ;RBPU=1 Pull up not use000A 0081 00039 MOVWF OPTION_REG ;Set OPTION_REG000B 1283 00040 BCF STATUS,RP0 ;Change to Bank0000C 018C 00041 CLRF MODE ;Set mode = stop000D 018D 00042 CLRF COUNT1 ;Clear counter000E 018E 00043 CLRF COUNT2 ;Clear counter000F 3005 00044 MOVLW B'00000101' ;Set PORTA initial value0010 0085 00045 MOVWF PORTA ;Write PORTA0011 1786 00046 BSF PORTB,RB7 ;Set RB7 = 10012 1A86 00047 BTFSC PORTB,RB5 ;RB5 = 0 ?0013 2812 00048 GOTO $-1 ;No. Wait 00049 0014 00050 STARTMPASM 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. Next0016 018C 00054 CLRF MODE ;Yes. Set stop mode0017 2821 00055 GOTO DRIVE ;No. Jump to motor drive0018 00056 CHECK10018 1906 00057 BTFSC PORTB,RB2 ;RB2(right key) = ON ?0019 281D 00058 GOTO CHECK2 ;No. Next001A 3001 00059 MOVLW D'1' ;Yes. Set right mode001B 008C 00060 MOVWF MODE ;Save mode001C 2821 00061 GOTO DRIVE ;No. Jump to motor drive

Page 18: Circuit Drawing of Stepper Motor Controller

001D 00062 CHECK2001D 1806 00063 BTFSC PORTB,RB0 ;RB0(left key) = ON ?001E 2821 00064 GOTO DRIVE ;No. Jump to motor drive001F 3002 00065 MOVLW D'2' ;Yes. Set left mode0020 008C 00066 MOVWF MODE ;Save mode 00067 00068 ;******************** Motor drive *********************0021 00069 DRIVE0021 080C 00070 MOVF MODE,W ;Read mode0022 1903 2814 00071 BZ START ;mode = stop0024 1786 00072 BSF PORTB,RB7 ;Set RB7 = 10025 1A86 00073 BTFSC PORTB,RB5 ;RB5 = 0 ?0026 2825 00074 GOTO $-1 ;No. Wait0027 3005 00075 MOVLW D'5' ;Set loop count(5msec)0028 008D 00076 MOVWF COUNT1 ;Save loop count0029 2062 00077 LOOP CALL TIMER ;Wait 1msec002A 0B8D 00078 DECFSZ COUNT1,F ;count - 1 = 0 ?002B 2829 00079 GOTO LOOP ;No. Continue002C 1386 00080 BCF PORTB,RB7 ;Set RB7 = 0002D 1E86 00081 BTFSS PORTB,RB5 ;RB5 = 1 ?002E 282D 00082 GOTO $-1 ;No. Wait002F 0805 00083 MOVF PORTA,W ;Read PORTA0030 3C05 00084 SUBLW B'000000101' ;Check motor position0031 1D03 283B 00085 BNZ DRIVE2 ;Unmatch0033 080C 00086 MOVF MODE,W ;Read mode0034 3C01 00087 SUBLW D'1' ;Right ?0035 1903 2839 00088 BZ DRIVE1 ;Yes. Right0037 3009 00089 MOVLW B'00001001' ;No. Set Left data0038 2860 00090 GOTO DRIVE_END ;Jump to PORTA write0039 00091 DRIVE10039 3006 00092 MOVLW B'00000110' ;Set Right data003A 2860 00093 GOTO DRIVE_END ;Jump to PORTA write 00094 ;-------003B 00095 DRIVE2003B 0805 00096 MOVF PORTA,W ;Read PORTA003C 3C06 00097 SUBLW B'000000110' ;Check motor position003D 1D03 2847 00098 BNZ DRIVE4 ;Unmatch003F 080C 00099 MOVF MODE,W ;Read mode0040 3C01 00100 SUBLW D'1' ;Right ?0041 1903 2845 00101 BZ DRIVE3 ;Yes. Right0043 3005 00102 MOVLW B'00000101' ;No. Set Left data

Page 19: Circuit Drawing of Stepper Motor Controller

0044 2860 00103 GOTO DRIVE_END ;Jump to PORTA writeMPASM 02.50.02 Intermediate STEP.ASM 3-9-2001 23:52:45 PAGE 3

LOC OBJECT CODE LINE SOURCE TEXT VALUE

0045 00104 DRIVE30045 300A 00105 MOVLW B'00001010' ;Set Right data0046 2860 00106 GOTO DRIVE_END ;Jump to PORTA write 00107 ;-------0047 00108 DRIVE40047 0805 00109 MOVF PORTA,W ;Read PORTA0048 3C0A 00110 SUBLW B'000001010' ;Check motor position0049 1D03 2853 00111 BNZ DRIVE6 ;Unmatch004B 080C 00112 MOVF MODE,W ;Read mode004C 3C01 00113 SUBLW D'1' ;Right ?004D 1903 2851 00114 BZ DRIVE5 ;Yes. Right004F 3006 00115 MOVLW B'00000110' ;No. Set Left data0050 2860 00116 GOTO DRIVE_END ;Jump to PORTA write0051 00117 DRIVE50051 3009 00118 MOVLW B'00001001' ;Set Right data0052 2860 00119 GOTO DRIVE_END ;Jump to PORTA write 00120 ;-------0053 00121 DRIVE60053 0805 00122 MOVF PORTA,W ;Read PORTA0054 3C09 00123 SUBLW B'000001001' ;Check motor position0055 1D03 285F 00124 BNZ DRIVE8 ;Unmatch0057 080C 00125 MOVF MODE,W ;Read mode0058 3C01 00126 SUBLW D'1' ;Right ?0059 1903 285D 00127 BZ DRIVE7 ;Yes. Right005B 300A 00128 MOVLW B'00001010' ;No. Set Left data005C 2860 00129 GOTO DRIVE_END ;Jump to PORTA write005D 00130 DRIVE7005D 3005 00131 MOVLW B'00000101' ;Set Right data005E 2860 00132 GOTO DRIVE_END ;Jump to PORTA write 00133 ;-------005F 00134 DRIVE8005F 3005 00135 MOVLW B'00000101' ;Compulsion setting 00136 0060 00137 DRIVE_END

Page 20: Circuit Drawing of Stepper Motor Controller

0060 0085 00138 MOVWF PORTA ;Write PORTA0061 2814 00139 GOTO START ;Jump to start 00140 00141 ;************* 1msec Timer Subroutine *****************0062 00142 TIMER0062 30C8 00143 MOVLW D'200' ;Set loop count0063 008E 00144 MOVWF COUNT2 ;Save loop count0064 0000 00145 TMLP NOP ;Time adjust0065 0000 00146 NOP ;Time adjust0066 0B8E 00147 DECFSZ COUNT2,F ;count - 1 = 0 ?0067 2864 00148 GOTO TMLP ;No. Continue0068 0008 00149 RETURN ;Yes. Count end 00150 00151 ;******************************************************** 00152 ; END of Stepper Motor controller 00153 ;******************************************************** 00154 00155 ENDMPASM 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 XXXXXXXXXXXXXXXX0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXX------- ----------------2000 : -------X-------- ---------------- ---------------- ----------------

All other memory blocks unused.

Program Memory Words Used: 102Program Memory Words Free: 922

Errors : 0Warnings : 0 reported, 0 suppressedMessages : 0 reported, 0 suppressed

Page 21: Circuit Drawing of Stepper Motor Controller

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

Page 22: Circuit Drawing of Stepper Motor Controller

mode :This is the area which manages the condition of the motor control.0=Stop, 1=Clockwise, 2=Counterclockwise

count1 :This is the count area to make control waiting time.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.

Page 23: Circuit Drawing of Stepper Motor Controller

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.

Page 24: Circuit Drawing of Stepper Motor Controller

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

Page 25: Circuit Drawing of Stepper Motor Controller

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 rpmThe 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.