51 Single chip microcomputer learning notes "eight"--stepping motor

Source: Internet
Author: User

I. Stepping motor fundamentals 1. Definition
    • Stepper motor is the electric pulse into the angular displacement of the actuator, the main use of permanent magnet stepper motor, the experimental use of stepper motor for four-wire bipolar stepper motor;
    • The phase number of a stepping motor refers to the logarithm of the excitation coils that produce different polarity n,s magnetic fields, usually expressed in m;
    • The number of beats in a stepper motor means the number of pulses required to complete a periodic change in a magnetic field, taking a four-wire two-phase motor as an example:
      • One-way four-shot: a/-b-a-b/
      • Bi-directional four-shot: a/b-ab-ab/-a/b/
      • Single & double eight beats: a/-a/b-b-ab-c-a-ab/-b/-a/b/
    • Step angle Specifies that the rotor does not change the power state, the angle of rotation, and the number of Poles, the number of stator phase, the power-on mode of negative correlation. Calculation
      360/(M*Z*C)
      M – Stator to number
      Z – Rotor pole number
      C – Power-on mode
      C=1 single or double turn on power
      c=2 single-and double-turn power
2. Stepper motor Stepping Mode (1). Single-shot mode: Each time only one winding power, so that the rotor rotates, and moving to the rotor permanent magnet with the opposite polarity of the winding alignment position (2). Two-way: at the same time to two winding power to make the rotor rotation, the advantage is more than a single beat to obtain more output torque, disadvantage consumes more energy; Alternating between windings and a single winding; 3. Four-wire bipolar stepper motor schematic diagram

4.udn2916 Introduction

UDN2916LB is the Sanken company launched a two-phase stepper motor Bipolar drive IC chip, to drive a double-winding bipolar stepper motor, the applicable motor voltage range is 10~45v, the logic voltage can not exceed 7V; via internal pulse width modulation Controller (PWM) It can achieve the maximum output current of 750mA, built-in 1/3 and 2/3 splitter, logic input realizes 1 phase/2 phase/w1-2phase excitation mode, built-in overheat and crossover current protection function, and built-in protection function to prevent low voltage misoperation. UDN2916LB internal structure, the chip has two sets of circuit composition, each group of circuits by the PWM controller, bridge and auxiliary circuit composition.

5. Experiment Notes

This experiment is to learn the principle and reference of stepping motor by controlling stepping motor to rotate in half step eight beats. The wiring is for stepping motor to connect m_out,p1–p1.0,p2–p1.1,i01–p1.2,i02–p1.3,i11–p1.4,i12–p1.5.

6. Example Routines Code
/************************************** > File Name: Four-wire bipolar stepper motor > Author:pengshp > Mail: [email protected] > date:2015 July 26 ***************************************/#include <reg51.h>#define UCHAR unsigned char#define UINT unsigned intSbit ph1=p1^0;//a Coil Current controlSbit ph2=p1^1;//b Coil Current controlSbit t01=p1^2;//udn2916 Current ControlSbit t02=p1^3; Sbit t11=p1^4; Sbit t12=p1^5;voidDelay (Uchar t)//Delay function{Uchar A; while(t--) { for(a= -;a>0; a--); }}/ * Half step eight beat tempo control function * /voidStep () {/*a/a Reverse Current * /ph1=0;//PH1 is 0, a set of coils is reverse currentt01=0;//With maximum current outputt11=0; Ph2=1;//PH2 to 1,b coil as forward currentT02=1;//off current outputT12=1; Delay (2);/*a/b AB beat, A is reverse current, B is forward current * /ph1=1;//PH1 is 1, a set of coils is a forward currentt01=0;//With maximum current outputt11=0; Ph2=1;//PH2 to 1,b coil as forward currentT02=1;//off current outputT12=1; Delay (2);/*b B is forward current * /ph1=0;//PH1 is 0, a set of coils is reverse currentt01=1;//off current outputt11=1; Ph2=1;//PH2 to 1,b coil as forward currentT02=0;//T12=0; Delay (2);/*ab AB are forward currents * /ph1=1;//PH1 is 1, a set of coils is a forward currentt01=0;//With maximum current outputt11=0; Ph2=1;//PH2 to 1,b coil as forward currentT02=0;//With maximum current outputT12=0; Delay (2);/*a A is forward current * /ph1=1;//PH1 is 1, a set of coils is a forward currentt01=0;//With maximum current outputt11=0; Ph2=1;//PH2 to 1,b coil as forward currentT02=1;//off current outputT12=1; Delay (2);/*ab/a is forward current, B is reverse current * /ph1=1;//PH1 is 1, a set of coils is a forward currentt01=0;//With maximum current outputt11=0; Ph2=0;//ph to 0,b coil for reverse currentT02=0;//With maximum current outputT12=0; Delay (2);/*b/b for reverse current * /ph1=1;//PH1 is 1, a set of coils is a forward currentt01=1;//off current outputt11=1; Ph2=0;//PH2 to 0,b coil for reverse currentT02=0;//off current outputT12=0; Delay (2);/*a/b/AB is reverse current * /ph1=0;//PH1 is 0, a set of coils is reverse currentt01=0;//With maximum current outputt11=0; Ph2=0;//PH2 to 0,b coil for reverse currentT02=0;//With maximum current outputT12=0; Delay (2);}voidMain () { while(1) {Step (); }}

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

51 Single chip microcomputer learning notes "eight"--stepping motor

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.