Saturday, October 27, 2018

The Structure and Principle of the Number of Stator Phases

1.Single phase stepper motor
The single phase stepper motor is winding a loop coil on a coils framework, giving it a positive and negative alternating current, and each switching current takes a step in a fixed direction. Because the magnetic conductance of the rotor magnetic path become bigger to change the rotation direction, the single phase stepping motor can only move in one direction, so a single phase stepper motor just only moves in a one direction. In order to ensure the fixed rotation direction, the magnetic conductance takes many measures, for example, to make the stator air pole wider than the rotor, and the working air gap between the stator and rotor is not uniform, and the direction of rotation is in the direction of small reluctance.

The Classification, Structure and Principle of the Number of Stator Phases

2.Two phase stepper motor
The simplest structure of the two phase stepper motor is that Nr=1, Generally ,the number of the stator magnetic pole is a multiplier of 4, at least 4. The rotor is a two pole rotor with one at N pole and one at S pole.

3.Three phase stepper motor
The stepper motor, of which does not use permanent magnet on its rotor, is very early used on three phase stepper motor. In 1986, a Japan servo company developed a stepping motor with permanent magnet and stator magnetic pole with gear, the matching of stator and rotor pitch can achieve higher angular resolution and torque. The main pole number of the stator winding of the three phase stepping motor is multiples of three, so the stator main pole number of the three phase stepping motor is 3, 6, 9, 12 and so on.


4.Four phase stepper motor
According to the formula θs=180°/PNr, if Nr=50, θs=0.9°,then P=4,that is four phase stepper motor. Because of the even phase of the four phase step motor, the power pipe of the driving circuit is 16, the number of the main pole of the stator is 16, all of which are two times of the two phase stepper motor, so the drive structure is complicated and the cost is high, so it is only used for special purpose.

5.Most of stepper motors sold on market are are five phases
The stator structure and drive circuit are simpler than the four phase stepper motor, but more complex than the two phase and three phase stepper motors and the cost is high.


Friday, October 19, 2018

HOW TO READ INPUT VALUE FROM STEPPER MOTOR ENCODER

You will need :
Motor with encoder
Arduino board ( I used arduino Uno)
Computer
Battery or DC voltage supply
Encoder library , download from https://www.pjrc.com/teensy/td_libs_Encoder.html or from the zip file attached
( A little experiment I did with multimeter :
power the encoder with 2 AA battery, attach multimeter GND cable to GND of the battery , and multimeter RED cable to the C1 or C2 output of the encoder.
As you turn the motor slowly, you can see that the output voltage of C1 and C2 change from 0V to 3V.
If you have 2 multimeter, attach C1 and C2 each to a multimeter, then turn the multimeter slowly you can see the value of multimeter change from 3V-3V, 0V-3V,0V-0V,3V-3V, which is the pulse according the background theory).

Step 1: Wiring
Picture of Wiring
The DC motor with encoder has 6 wires :
2 wires to power the motor (Often labeled as : M1, M2 , motor power ...)
2 wires to power the stepper motor with encoder (often labeled GND and 3.3V)
2 wires to send signal of position to the microcontroller (Arduino) (labeled as encoder output or C1 & C2)
First you will connect 2 wires to power the encoder to Arduino Gnd And Vcc 3.3V (in my version of encoder motor, the encoder led turn on when I connected the wire power)
Then connect 2 wires signal of the encoder to 2 pins with interrupt of Arduino , (which is pin 2 and 3 of the Arduino Uno)
You can turn the motor by hand or connect 2 motor wires to the battery to rotate the motor.
Note : normal pin will still work at low speed when you turning the motor by hand, however, when you run the motor with the battery and the motor rotates at high speed, the encoder will misread the position of the motor, result in duplication while reading. Using interrupt pin with the library prevent the encoder from making this mistake (in my experiment it was quite accurate when read the motor with interrupt pin, the only time it make a mistake is in the end when I stop the motor and the motor slowing down, that time the reading was duplicate for a few position).

Step 2: Upload the Code:
After the installed the library, you can open File/Example/Encoder/Basic to run the code , or copy paste this code in :

/* Encoder Library - Basic Example
 * http://www.pjrc.com/teensy/td_libs_Encoder.html

 * This example code is in the public domain.
 */
#include 
// Change these two numbers to the pins connected to your encoder.
//   Best Performance: both pins have interrupt capability
//   Good Performance: only the first pin has interrupt capability
//   Low Performance:  neither pin has interrupt capability
Encoder myEnc(2,3);
//   avoid using pins with LEDs attached
void setup() {
  Serial.begin(9600);
  Serial.println("Basic Encoder Test:");
}
long oldPosition  = -999;
void loop() {
  long newPosition = myEnc.read();
  if (newPosition != oldPosition) {
    oldPosition = newPosition;
    Serial.println(newPosition);
  }
}

Step 3: Results
Picture of Results
After successful with all above step, turn on the serial monitor :
And first turn the motor with your hand to see that the position is slightly change
Then run the motor with battery to see that position reading change rapidly as the motor run fast.
I hope you find this helpful. Thanks for reading. If You have any question about stepper motor, you can visit our website :oyostepper.com for help.

Saturday, October 13, 2018

Practice on Controlling a Stepping Motor

In our article about stepper motors we have presented this type of electric motors, how they operate and what makes them highly compatible with digital control systems. Now we will talk about how to control such a motor together with a simple example, involving a H-bridge electronic circuit and simple scripting. In our implementation we have used a bipolar 23 stepper motor, however minor changes in control sequences are required for other types of stepper motors.

Practice on Controlling a Stepping Motor


To summarize, the electromagnetic coils are located on the stator of the stepper motor, while permanent magnets, equal in pair numbers, are located on the rotor. A more detailed discussion about stepper motors can be found in our dedicated article, but making a long story short, like any DC motor, these motors rotate when the coils are energized however, if the coils are continuously energized in the same way, the movement will stop when opposite magnetic poles are aligned, e.g. S-pole on coil aligned with N-pole on rotor permanent magnet.

Practice on Controlling a Stepping Motor

Electromagnetic coils found in a bipolar nema 17 stepper motor are arranged as independent windings, each of them corresponding to one phase. Usually such stepper motors have 6 terminals, 5 if the common wires of the two windings are internally connected, and the terminals can be identified by measuring the resistance between terminals using a multimeter.

Practice on Controlling a Stepping Motor


In short, if resistance of a coil, between its two end terminal has a certain value, the resistance between the common lead and any of its terminals must a value divided by 2. In 5-lead motors, coil terminals can be determined by touching each two wires together. When the rotor shaft becomes harder to turn it means that the two connected wires belong to the same winding.

See more:



How to adjust the dip switch of the stepper motor driver

‌1.Explanation of stepper motor driver The stepper motor driver is an actuator that converts electrical pulses into angular displacement, w...