Stepper Motor ရဲ့ Electromagnetics Coils ၂ ခုထက်ပိုပြီး ဖွဲ့စည်းထားပါတယ်။ အလယ် ဝန်ရိုးမှာ သံလိုက်တုံးတွေတပ်ထားပါတယ်။ Electromagnetic Coil တွေကို AC Voltage ပေးလိုက်တဲ့ အခါ Electromagnetic ထွက်ရှိလားပြီး အလယ်ဝန်ရိုးကို တွန်းသလိုဖြစ်ကာ လည်ပတ်စေပါတယ်။ Stepper Motor ဆိုတာ အိမ်သုံးရေတင်မော်တာတွေနဲ့ အတူတူပါပဲ။
Stepper Motor မှာ Coil အများကြီးပါတဲ့ အတွက် လည်ပတ်မှုနှုန်း၊ လည်ပတ်မယ့် ဒီဂရီ တွေကို အတိအကျ ထိန်းချုပ်နိုင်တယ်။ ဥပမာ၊ ၂ ဒီဂရီ ပဲတိုးပြီး လည်စေချင်တဲ့ အခါ၊ ၁၈၀ ဒီဂရီပဲ လည်စေချင်တဲ့ အခါမျိုးမှာ Stepper Motor ကိုပဲ သုံးရပါတယ်။ ဒါကြောင့် Stepper Motor ကို Printer, Hard drives, Automatic Door Control System တွေမှာ သုံးကြပါတယ်။ High Precision Positioning System တွေမှာ Stepper Motor ကို အသုံးပြုကြတယ်လို့ အလွယ်တကူ မှတ်နိုင်ပါတယ်။
Stepper Motor ၂ မျိုးရှိပါတယ်။ (၁) Unipolar Stepper (၂) Bipolar Stepper.
Unipolar Stepper Motors
Unipolar Stepper Motors တွေမှာ ဝါယာ ၅ ချောင်း (သို့) ၆ ချောင်း ပါပြီး အလယ်ဝါယာက Coil နှစ်ခုအလယ်မှာ ရှိပါတယ်။ အောက်ပါပုံကိုကြည့်ပါ။ အလယ်ဝါယာကြိုးတွေကိုု အတူတွဲချည်ထားပြီး ပါဝါနဲ့ ချိတ်ဆက်ထားတဲ့ Stepper Motor ကို Unipolar Stepper Motor လို့ခေါ်ပါတယ်။
Bipolar stepper motors
Bipolar stepper motors တွေမှာ Unipolar တွေမှာလို အလယ်ဝါယာ မပါ ပါဘူး။ Coil တစ်ခုစီတိုင်းမှာ ဝါယာကြိုး ၂ စီပါတယ်။ အလယ်ဝါယာပါ မပါကို ကြည့်ပြီး Unipolar လား၊ Bipolar လားခွဲခြားနိုင်ပါတယ်။
Stepper Motor က High Power လိုအပ်တဲ့ အတွက်ကြောင့် Microprocessor ကနေ တိုက်ရိုက် Power ပေးလို့မလို့မရပါဘူး။ External Power Supply သုံးမှ အဆင်ပြေမှာပါ။ Stepper Motor ကို Voltage ဘယ်လောက်ပေးရမလဲဆိုတာကို တော့ Motor Datasheet မှာ ဖတ်နိုင်ပါတယ်။ အကယ်၍ မသေချာဘူးဆိုရင်တော့ Variable Power Supply ကိုသုံးပြီး 3V ကနေ Motor လည်တာ ပုံမှန်မဟုတ်တဲ့ အထိ Voltage ကို တင်ပြီး စမ်းသပ်နိုင်ပါတယ်။ Motor မပျက်စီးအောင်တော့ ဂရုစိုက်ပါ။ ပုံမှန်အားဖြင့် 5V, 9V, 12V, 24V ဆိုပြီးတော့ Stepper Motor တွေရှိပါတယ်။ Small Stepper Motor တွေမှာ 24V ထက်ကျော်တာမရှိသလောက်ပါပဲ။ 24V ထက်ကျော်သွားရင် Stepper Motor အသေးတွေမဖြစ်နိုင်ပါဘူး။ Industrial Motor အမျိုးအစားမျိုးတွေပဲ ဖြစ်နိုင်ပါတယ်။
Stepper Motor ရဲ့ Speed ကို ထိန်းချုပ်ဖို့ အတွက် Coil ခုခြင်းစီကို သင့်တော်တဲ့ Voltage ပေးတဲ့ အခါ အောက်ပါ ဇယားကွက်အတိုင်းပေးနိုင်ပါတယ်။ ဥပမာ Step 1 အတွက်ဆိုရင် Wire 1 ကို High, Wire 2 ကို Low, Wire 3 ကို High, Wire 4 ကို Low ပေးရပါမယ်။ Step 2, 3 ,4 ပြောင်းချင်တဲ့ အခါ ဇယားကွက်အတိုင်းပြောင်းပေးဖို့ပါ။
Step | wire 1 | wire 2 | wire 3 | wire 4 |
1 | High | low | high | low |
2 | low | high | high | low |
3 | low | high | low | high |
4 | high | low | low | high |
Unipolar Stepper Motor တခုကို ထိန်းချုပ်ဖို့အတွက် Darlington Transistor Array ကို သုံးဖို့လိုအပ်ပါတယ်။ voltage ပေးတဲ့ Sequence ကတော့ အထက်ပါ ဇယားကွက် အတိုင်းပါပဲ။ Wire 5 နှင့် Wire 6 ကို Vcc နှင့် Gnd ပေးဖို့လိုအပ်မှာပါ။
Bipolar Stepper Motor ကို မောင်းနှင်တဲ့ အခါတော့ ပိုမိုလွယ်ကူပါတယ်။ ပုံမှာ ပါတဲ့အတိုင်း အစ ၂ စကို အပေါင်းအနှုတ်ပေးရုံပါ။ ပြောင်းပြန်လည်ချင်ရင် အပေါင်းအနှုတ် ပြောင်းပြန်ပေးရင်ရပါပြီး။
Bipolar Stepper Motor တွေကို ထိန်းချုပ်ဖို့ အလွယ်ဆုံးနည်းကတော့ H-Bridge IC ကို အသုံးပြုခြင်းပါ။ L293D dual H-bridge IC မှာ H-Bridge ၂ ခုပါတာကြောင့် အသုံးပြုရတာ အဆင်ပြေစေပါတယ်။
Once you have the motor stepping in one direction, stepping in the other direction is simply a matter of doing the steps in reverse order.
Knowing the position is a matter of knowing how many degrees per step, and counting the steps and multiplying by that many degrees. So for examples, if you have a 1.8-degree stepper, and it’s turned 200 steps, then it’s turned 1.8 x 200 degrees, or 360 degrees, or one full revolution.
Two-Wire Control
Thanks to Sebastian Gassner for ideas on how to do this.
In every step of the sequence, two wires are always set to opposite polarities. Because of this, it’s possible to control steppers with only two wires instead of four, with a slightly more complex circuit. The stepping sequence is the same as it is for the two middle wires of the sequence above:
Step | wire 1 | wire 2 |
1 | low | high |
2 | high | high |
3 | high | low |
4 | low | low |
The circuits for two-wire stepping are as follows:
Unipolar stepper two-wire circuit:
Biolar stepper two-wire circuit:
Programming the Microcontroller to Control a Stepper
Because both unipolar and bipolar stepper motors are controlled by the same stepping sequence, we can use the same microcontroller code to control either one. In the code examples below, connect either the Darlington transistor array (for unipolar steppers) or the dual H-bridge (for bipolar steppers) to the pins of your microcontroller as described in each example. There is a switch attached to the microcontroller as well. When the switch is high, the motor turns one direction. When it’s low, it turns the other direction.
The examples below use the 4-wire stepping sequence. A two-wire control program is shown for the Wiring/Arduino Stepper library only.
Wire pins 9-12 of the BX-24 to inputs 1-4 of the Darlington transistor array, respectively. If you’re using the PicBasic Pro code, it’s designed for a PIC 40-pin PIC such as the 16F877 or 18F452. Use pins PORTD.0 through PORTD.3, respectively. If you’re using a smaller PIC, you can swap ports, as long as you use the first four pins of the port.
Note that the wires read from left to right. Their numbers don’t correspond with the bit positions. For example, PORTD.3 would be wire 1, PORTD.2 would be wire 2, PORTD.1 would be wire 3, and PORTD.0 would be wire 4. On the BX-24, pin 9 is wire 1, pin 10 is wire 2, and so forth.
Wiring Code (for Arduino board):
This example uses the Stepper library for Wiring/Arduino. It was tested using the 2-wire circuit. To change to the 4-wire circuit, just add two more motor pins, and change the line that initalizes the Stepper library like so:
Stepper myStepper(motorSteps, motorPin1,motorPin2,motorPin3,motorPin4);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
/* Stepper Motor Controller language: Wiring/Arduino This program drives a unipolar or bipolar stepper motor. The motor is attached to digital pins 8 and 9 of the Arduino. The motor moves 100 steps in one direction, then 100 in the other. Created 11 Mar. 2007 Modified 7 Apr. 2007 by Tom Igoe */ // define the pins that the motor is attached to. You can use // any digital I/O pins. #include <Stepper.h>; #define motorSteps 200 // change this depending on the number of steps // per revolution of your motor #define motorPin1 8 #define motorPin2 9 #define ledPin 13 // initialize of the Stepper library: Stepper myStepper(motorSteps, motorPin1,motorPin2); void setup() { // set the motor speed at 60 RPMS: myStepper.setSpeed(60); // Initialize the Serial port: Serial.begin(9600); // set up the LED pin: pinMode(ledPin, OUTPUT); // blink the LED: blink(3); } void loop() { // Step forward 100 steps: Serial.println("Forward"); myStepper.step(100); delay(500); // Step backward 100 steps: Serial.println("Backward"); myStepper.step(-100); delay(500); } // Blink the reset LED: void blink(int howManyTimes) { int i; for (i=0; i< howManyTimes; i++) { digitalWrite(ledPin, HIGH); delay(200); digitalWrite(ledPin, LOW); delay(200); } } |