Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15374

Nema17 does not work

$
0
0


Hi. I connected it like the picture, but the motor doesn't work. It doesn't even vibrate and it doesn't work at all.
I used Nema17(17HS8401) and tmc2208. I used a 12V 3A adapter for the motor and connected to the computer with a usb port for the Arduino board.

It's a reference image.

DIR = 4 pin
STEP = 3 pin
EN = 2 pin

M2B = red
M2A = blue
M1A = green
M1B = black

I used 25V 100uf capacitor. The driver current was adjusted to 1.4amps

const int stepPin = 3; 
const int dirPin = 4; 
const int enPin = 2;   

void setup() {

  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(enPin, OUTPUT);


  digitalWrite(enPin, HIGH);
}

void loop() {

  digitalWrite(enPin, LOW);

  digitalWrite(dirPin, HIGH);

  for(int i = 0; i < 200; i++) { 
    digitalWrite(stepPin, HIGH); 
    delayMicroseconds(700);    
    digitalWrite(stepPin, LOW); 
    delayMicroseconds(700);
  }

  delay(1000);


  digitalWrite(enPin, HIGH);

  delay(3000);
}

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 15374

Trending Articles