1.8 (200 steps per revolution)
1.8 (200 steps per revolution)
4.2 kg/cm (42 Ncm)
1.2 A/phase
12 V
Class B (130C)
-20C to 50C operating temperature range
42 mm (1.65 in) diameter, 39 mm (1.53 in) length
Applications
| The NEMA17 Two Phase Hybrid Stepper Motor is suitable for a wide range of applications, including |
CNC machines
3D printers
Robotics
Industrial automation
Medical devices
Aerospace applications
Conclusion
The NEMA17 Two Phase Hybrid Stepper Motor is a high-performance, high-precision motor designed for applications that require accurate positioning and control. Its two-phase design, hybrid stepper technology, and durable construction make it an ideal choice for a wide range of applications.
NEMA17 Two Phase Hybrid Stepper Motor DocumentationOverviewThe NEMA17 two-phase hybrid stepper motor is a high-torque, compact motor designed for precise motion control applications. It features a bipolar configuration, 200 steps per revolution, and a maximum holding torque of 59 Ncm (8.3 kg-cm). This motor is widely used in robotics, CNC machines, 3D printers, and other industrial automation applications.Electrical Specifications| Parameter | Value |
| --- | --- |
| Motor Type | Bipolar, Two-Phase Hybrid Stepper |
| Step Angle | 1.8 (200 steps per revolution) |
| Holding Torque | 59 Ncm (8.3 kg-cm) |
| Rated Current | 1.5 A per phase |
| Rated Voltage | 3.4 V to 12 V |
| Resistance per Phase | 1.6 |
| Inductance per Phase | 2.3 mH |
| Insulation Class | Class B (130C) |Control and InterfaceThe NEMA17 stepper motor can be controlled using a microcontroller or a dedicated stepper motor driver. The motor has four wires, with two wires for each phase (A and B). The motor can be connected to a microcontroller using a L298N or A4988 stepper motor driver.Code Examples### Example 1: Basic Stepper Motor Control using Arduino and L298N DriverThis example demonstrates how to control the NEMA17 stepper motor using an Arduino board and a L298N stepper motor driver.
```c++
const int dirPin = 2; // Direction pin
const int stepPin = 3; // Step pinvoid setup() {
pinMode(dirPin, OUTPUT);
pinMode(stepPin, OUTPUT);
}void loop() {
// Set direction to clockwise
digitalWrite(dirPin, HIGH);
// Take 100 steps
for (int i = 0; i < 100; i++) {
digitalWrite(stepPin, HIGH);
delay(1);
digitalWrite(stepPin, LOW);
delay(1);
}
// Set direction to counter-clockwise
digitalWrite(dirPin, LOW);
// Take 100 steps
for (int i = 0; i < 100; i++) {
digitalWrite(stepPin, HIGH);
delay(1);
digitalWrite(stepPin, LOW);
delay(1);
}
}
```
### Example 2: Acceleration and Deceleration using Raspberry Pi and A4988 DriverThis example demonstrates how to control the NEMA17 stepper motor using a Raspberry Pi and an A4988 stepper motor driver. It includes acceleration and deceleration to prevent motor vibration and improve motion smoothness.
```python
import RPi.GPIO as GPIO
import time# Set up GPIO pins
GPIO.setmode(GPIO.BCM)
dirPin = 17
stepPin = 23
GPIO.setup(dirPin, GPIO.OUT)
GPIO.setup(stepPin, GPIO.OUT)# Set up A4988 driver
MS1 = 24
MS2 = 25
GPIO.setup(MS1, GPIO.OUT)
GPIO.setup(MS2, GPIO.OUT)# Set up motor parameters
stepsPerRev = 200
revsPerSecond = 1
acceleration = 10 # revs/s^2def setMicrostep(resolution):
if resolution == 1:
GPIO.output(MS1, GPIO.LOW)
GPIO.output(MS2, GPIO.LOW)
elif resolution == 2:
GPIO.output(MS1, GPIO.HIGH)
GPIO.output(MS2, GPIO.LOW)
elif resolution == 4:
GPIO.output(MS1, GPIO.LOW)
GPIO.output(MS2, GPIO.HIGH)
elif resolution == 8:
GPIO.output(MS1, GPIO.HIGH)
GPIO.output(MS2, GPIO.HIGH)def move(steps, dir):
# Set direction
GPIO.output(dirPin, dir)
# Accelerate
for i in range(int(steps / 2)):
GPIO.output(stepPin, GPIO.HIGH)
time.sleep(1 / (revsPerSecond stepsPerRev 2))
GPIO.output(stepPin, GPIO.LOW)
time.sleep(1 / (revsPerSecond stepsPerRev 2))
revsPerSecond += acceleration
# Decelerate
for i in range(int(steps / 2)):
GPIO.output(stepPin, GPIO.HIGH)
time.sleep(1 / (revsPerSecond stepsPerRev 2))
GPIO.output(stepPin, GPIO.LOW)
time.sleep(1 / (revsPerSecond stepsPerRev 2))
revsPerSecond -= acceleration# Move 100 steps
move(100, GPIO.HIGH)# Move -100 steps
move(-100, GPIO.LOW)
```
### Example 3: Positioning using ESP32 and TMC2208 DriverThis example demonstrates how to control the NEMA17 stepper motor using an ESP32 board and a TMC2208 stepper motor driver. It includes positioning and endstop detection.
```c++
#include <WiFi.h>
#include <TMC2208.h>const int dirPin = 18; // Direction pin
const int stepPin = 19; // Step pin
const int endstopPin = 5; // Endstop pinTMC2208 driver;void setup() {
Serial.begin(115200);
pinMode(dirPin, OUTPUT);
pinMode(stepPin, OUTPUT);
pinMode(endstopPin, INPUT);
driver.begin();
driver.setDirection(dirPin);
driver.setStepPin(stepPin);
driver.setEndstopPin(endstopPin);
}void loop() {
// Home the motor
while (digitalRead(endstopPin) == LOW) {
driver.step(1);
delay(1);
}
// Move to position 100
driver.moveTo(100);
// Wait for motor to reach position
while (driver.isBusy()) {
delay(1);
}
// Move to position 0
driver.moveTo(0);
// Wait for motor to reach position
while (driver.isBusy()) {
delay(1);
}
}
```
These code examples demonstrate the basic control, acceleration, and positioning of the NEMA17 two-phase hybrid stepper motor. They can be adapted and modified to suit specific application requirements.