The driving voltage of this stepper motor is 12V, and the step angle is 7.5 degrees. A circle of 360 degrees requires 48 pulses to complete!!!
This stepper motor has 6 leads, arranged in the following order: 1: red, 2: red, 3: orange, 4: brown, 5: $, 6: black.
Use the method of 51 to drive ULN2003 to drive.
The drive of ULN2003 directly uses the 5V voltage of the single-chip microcomputer system, but the torque is not very large. You can increase the driving voltage to 12V by yourself. ;****************************************************************** ;****************************Stepper Motor Drive*************************************** ; DESIGN BY BENLADN911 FOSC = 12MHz 2005.05.19 ;--------------------------------------------------------------------------------- ; The driving signal of the stepper motor must be a pulse signal!!! The speed of rotation is proportional to the frequency of the pulse!!! ; The step angle of this stepper motor is 7.5 degrees. One circle of 360 degrees requires 48 pulses to complete!!! ;--------------------------------------------------------------------------------- ; Group A coil corresponds to P2.4 ; Group B coil corresponds to P2.5 ; Group C coil corresponds to P2.6 ; Group D coil corresponds to P2.7 ; Forward order: Group AB--Group BC--Group CD--Group DA (i.e. one pulse, forward 7.5 degrees) ;---------------------------------------------------------------------------------- ;----------------------------Forward-------------------------- ORG 0000H LJMP MAIN ORG 0100H MAIN: MOV R3,#144 Forward rotation for 3 circles, a total of 144 pulses START: MOV R0,#00H START1: MOV P2,#00H MOV A,R0 MOV DPTR,#TABLE MOVC A,@A+DPTR JZ START Judge A, when A = 0, then jump to START MOV P2,A LCALL DELAY INC R0 DJNZ R3,START1 MOV P2,#00H LCALL DELAY1 ;-----------------------------Reverse rotation------------------------ MOV R3,#144 Reverse rotation for one circle, a total of 144 pulses START2: MOV P2,#00H MOV R0,#05 START3: MOV A,R0 MOV DPTR,#TABLE MOVC A,@A+DPTR JZ START2 MOV P2,A CALL DELAY INC R0 DJNZ R3,START3 MOV P2,#00H LCALL DELAY1 LJMP MAIN DELAY: MOV R7,#40 Stepper motor speed M3: MOV R6,#248 DJNZ R6,$ DJNZ R7,M3 RET DELAY1: MOV R4,#20 2S delay subroutine DEL2: MOV R3,#200 DEL3: MOV R2,#250 DJNZ R2,$ DJNZ R3,DEL3 DJNZ R4,DEL2 RET TABLE: DB 30H,60H,0C0H,90H Forward table DB 00 Forward end DB 30H,90H,0C0H,60H Reverse table DB 00 Reverse end
Previous article:Thermal flow sensor signal acquisition
Next article:Experience in implementing a remote-controlled smart car based on 51 single-chip microcomputer
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Diode frequency multiplier circuit, transistor frequency multiplier circuit
- [Silicon Labs BG22-EK4108A Bluetooth Development Evaluation] + Environment Construction SimplicityStudio-5
- 【National Technology N32G430】06 Comprehensive debugging, RTC, analog IIC, serial port
- Why GaN is the super power of 5G
- Book Review: Fundamentals of Power Supply Design
- CMOS circuit design issues under normal operating current
- Why are current and magnetic sensors crucial to TWS (true wireless earphones) design?
- MBD environment construction of TMS320F28335
- MSP430 digital tube display problem
- Sensors and measurement and control circuits