སྒྱུ་རྩལ
མཛེས་སྡུག་དང་བདེ་ཐང
བཟོ་རིག
རིག་གནས་དང་ལོ་རྒྱུས
དགའ་སྟོན
ཁོར་ཡུག
ཟས་དང་བཏུང་རྫས
ལྗང་མ་འཇོར་ལུགས
ཕྱིར་འཕྲུལ་རིག
ཚན་རིག
རྩེད་འགྲན
རིག་རྩལ
གྱོན་རུང
Controlling a Stepper Motor with an EasyDriver
Martin

བཟོས་མཁན

Martin

13. སྤྱི་ཟླ་བདུན་པ 2026NO

Controlling a Stepper Motor with an EasyDriver

A stepper motor doesn't just spin — it moves in exact, repeatable steps, so you can command a precise angle with no position sensor at all. This motor takes 400 steps per revolution (0.9° per step). The EasyDriver board turns two simple Arduino signals — one pulse on STEP, one level on DIR — into the carefully sequenced coil currents a bipolar stepper needs. It's the same open-loop precision that drives 3D printers, CNC machines and camera sliders.

བར་མ
1 hour

ལམ་སྟོན

1

Identify the two motor coils

A bipolar stepper has 4 wires — two coils of two wires each. Set a multimeter to continuity (or ohms) and find the pairs: the two wires that beep (low resistance) share a coil. Call them Coil A and Coil B. There is no polarity within a coil.

གོམ་པ་འདིའི་རྫས་རིགས:

Stepper Motor - 68 oz.in (400 steps/rev)Stepper Motor - 68 oz.in (400 steps/rev)1 piece

ལག་ཆས་དགོས་མཁོ:

Digital Multimeter - BasicDigital Multimeter - Basic
2

Wire the driver, motor and power

Push the EasyDriver into the breadboard. Screw Coil A into the driver's A+/A- terminals and Coil B into B+/B-. Connect a 9 V battery to M+ and GND (motor power, 6–30 V). From the Arduino: D2 to STEP, D3 to DIR, D4 to MS1, D5 to MS2, D6 to ENABLE. IMPORTANT: also join Arduino GND to the EasyDriver GND so they share a ground.

གོམ་པ་འདིའི་རྫས་རིགས:

Arduino Uno R3 SMDArduino Uno R3 SMD1 piece
EasyDriver Stepper Motor DriverEasyDriver Stepper Motor Driver1 piece
Breadboard - ClassicBreadboard - Classic1 piece
Jumper Wires Premium M/M 20 AWG - 15.5 cmJumper Wires Premium M/M 20 AWG - 15.5 cm1 pack
9V Battery Holder9V Battery Holder1 piece
3

Set the driver's current limit

The EasyDriver has a small potentiometer that limits coil current. With a small screwdriver, start it near the middle; once running, turn it down if the motor or chip gets hot, or up if the motor is weak or skips. Never exceed the motor's rated current — this board delivers up to 750 mA per phase.

4

Connect and open the IDE

Plug the Arduino into your computer with the USB cable, open the Arduino IDE, and select Arduino Uno and its serial port. Leave the 9 V motor battery switched off until the sketch is uploaded.

གོམ་པ་འདིའི་རྫས་རིགས:

SparkFun Cerberus USB Cable - 1.8 meterSparkFun Cerberus USB Cable - 1.8 meter1 piece

ལག་ཆས་དགོས་མཁོ:

Computer with Arduino IDEComputer with Arduino IDE
5

Upload the stepper sketch

Paste this sketch and upload, then switch on the battery. It turns the shaft one full revolution one way, pauses, and reverses — on a loop.

stepper_easydriver.inoarduino
// Drive a bipolar stepper with a SparkFun EasyDriver.
// Arduino -> EasyDriver:  D2=STEP, D3=DIR, D4=MS1, D5=MS2, D6=ENABLE (active LOW).
// Motor power (6-30V) on M+/GND; the Arduino and driver must share GND.
// Full-step mode (MS1=LOW, MS2=LOW): 400 STEP pulses = one revolution on this 400-step motor.

const int STEP_PIN = 2;
const int DIR_PIN  = 3;
const int MS1_PIN  = 4;
const int MS2_PIN  = 5;
const int EN_PIN   = 6;

const int STEPS_PER_REV = 400;   // full step, 0.9 deg per step

void setup() {
  pinMode(STEP_PIN, OUTPUT);
  pinMode(DIR_PIN, OUTPUT);
  pinMode(MS1_PIN, OUTPUT);
  pinMode(MS2_PIN, OUTPUT);
  pinMode(EN_PIN, OUTPUT);

  digitalWrite(MS1_PIN, LOW);   // MS1=LOW, MS2=LOW -> full step
  digitalWrite(MS2_PIN, LOW);
  digitalWrite(EN_PIN, LOW);    // LOW enables the driver outputs
}

void turnOneRevolution(bool clockwise) {
  digitalWrite(DIR_PIN, clockwise ? HIGH : LOW);
  for (int i = 0; i < STEPS_PER_REV; i++) {
    digitalWrite(STEP_PIN, HIGH);
    delay(2);                   // high time sets the speed
    digitalWrite(STEP_PIN, LOW);
    delay(2);
  }
}

void loop() {
  turnOneRevolution(true);    // one full turn clockwise
  delay(1000);
  turnOneRevolution(false);   // one full turn back
  delay(1000);
}
6

Test it

Switch on the 9 V battery. The shaft turns exactly one revolution one way, pauses a second, then one revolution back. In full-step mode this 400-step motor needs 400 STEP pulses per turn. If it only buzzes or vibrates without turning, a coil pair is split across the two channels — swap two wires so each coil sits on one channel (A or B).

7

Turn steps into precise motion

Steppers move an exact angle per pulse, so you can position with no feedback: to rotate a set angle, use steps = 400 × angle ÷ 360 (e.g. 100 steps = 90°). For smoother, quieter motion set MS1 and MS2 HIGH for 1/8 microstepping (3200 micro-steps per revolution). This precise, repeatable motion is exactly what drives 3D printers, CNC machines, camera sliders and robot joints.

རྫས་རིགས

7

ལག་ཆས་དགོས་མཁོ

2
ཚོད་དཔག་བསྡོམས
$82.00

འབྲེལ་ཡོད་བིལུ་པིརིན་ཊི

བིལུ་པིརིན་ཊི་འདི་ཚུ་ཐབས་ལམ་དང་རྫས་རིགས། སྤྱི་ཆོས་བགོ་བཤའ་བྱེད

CC0 སྤྱི་དབང

བིལུ་པིརིན་ཊི་འདི་CC0 འོག་བཀྲམས་ཡོད། ཁྱེད་རང་གིས་ཆོག་མཆན་མ་བཞེས་པར་ཕབ་ལེན་དང་བཟོ་བཅོས། བགོ་བཤའ། དགོས་མཁོ་གང་ལའང་བཀོལ་སྤྱོད་བྱས་ཆོག

བཟོ་མཁན་ལ་རྒྱབ་སྐྱོར་བྱེད་པའི་ཆེད་ཁོང་ཚོའི་བིལུ་པིརིན་ཊི་བརྒྱུད་ཐོན་སྐྱེད་ཉོ། བཟོ་མཁན་གྱིས བཟོ་མཁན་གྱི་ཁེ་ཕོགས ཚོང་པས་གཏན་འཁེལ་བྱས་པ། ཡང་ན་བིལུ་པིརིན་ཊི་འདིའི་པར་གསར་བཟོས་ཏེ་ཁྱེད་རང་གི་བིལུ་པིརིན་ཊི་ནང་མཐུད་སྦྲེལ་བྱས་ཏེ་ཡོང་སྒོ་བགོ་བཤའ་བྱེད།

གྲོས་བསྡུར

(0)

ནང་འཛུལ གྲོས་བསྡུར་ནང་མཉམ་ཞུགས་ཆེད

བསམ་ཚུལ་ཚུ་ཐོབ་བཞིན...