Hello!
I'm working with one stepped motor 17hs19 2004s1 with the driver TB6600, but I'm having troubles for making the motor move, I've seen lots of tutorials but none seems to work for me. I have tried connecting it with the PUL+ DIR+ and ENA+ to the 5V of arduino, and the negative to different pins. The power supply I'm using is 12V 40A.
The only way I can make it move, is when I put a very specific speed. This is how I have configured the six switchers in order from 1 to 6: ON, OFF, ON, ON, OFF, OFF (Which is 400 pulse/rev; and 2.0 A). And this is the code I'm sending to the arduino:
int PUL=7; //Pin para la señal de pulso
int DIR=6; //define Direction pin
int EN=5; //define Enable Pin
void setup() {
pinMode (PUL, OUTPUT);
pinMode (DIR, OUTPUT);
pinMode (EN, OUTPUT);
digitalWrite(EN,HIGH);
}
void loop() {
digitalWrite(DIR,LOW);
for (int i=0; i<1600; i++) //Forward 1600 steps
{
digitalWrite(PUL,HIGH);
delayMicroseconds(200);
digitalWrite(PUL,LOW);
delayMicroseconds(200);
}
delay(100);
digitalWrite(DIR,HIGH);
for (int i=0; i<1000; i++) //Backward 1000 steps
{
digitalWrite(PUL,HIGH);
delayMicroseconds(200);
digitalWrite(PUL,LOW);
delayMicroseconds(200);
}
}
I can't change the speed, or it starts vibrating like if it was trying to move. And even on that speed that "works", it sometimes stops moving for some seconds. I don't know if I'm doing something wrong or the motor is just broken, but I don't want to buy a new motor if I'm not sure that it is broken. I noticed that it also moves when I set the first three switchers at 200 pulse/rev and change the speed in the code from 200 to 400, if I enter any other value, it starts vibrating again. I'm using an arduino mega 2560.
I hope you can help me. Thanks in advance. Here are some pics of the connections.
Yes I did and they are, as I said, it actually moves when I set it at 400 pulse/rev and 200 microseconds. Concretly. I even changed the pins in case that they could have any kind of polarized. But the result is the same.
That stepper takes 2A/phase, that's 4A. You can't run 4A through a breadboard and a bunch of skinny wires.
Connect the power supply directly to the driver
Set the current to 2.5A
Please supply code as You did in the first post. Pictures only consume Your time and giving us crap that can't be copied into the IDE.
Please create and post proper schematics. Else the posting might go on forever.
I apologize, I'm kinda new in the forum and I'm still trying to figure out how all this works out. I thank you all who are trying to help me. I made a schematic of how the wires are connected, I hope this helps. Also here is the last code I just posted in the pic.
int PUL=7; //Pin para la señal de pulso
int DIR=6; //define Direction pin
int EN=5; //define Enable Pin
void setup() {
pinMode (PUL, OUTPUT);
pinMode (DIR, OUTPUT);
pinMode (EN, OUTPUT);
digitalWrite(EN,HIGH);
}
void loop() {
digitalWrite(DIR,LOW);
for (int i=0; i<1600; i++) //Forward 1600 steps
{
digitalWrite(PUL,HIGH);
delayMicroseconds(20);
digitalWrite(PUL,LOW);
delayMicroseconds(10000);
}
delay(100);
digitalWrite(DIR,HIGH);
for (int i=0; i<1000; i++) //Backward 1000 steps
{
digitalWrite(PUL,HIGH);
delayMicroseconds(20);
digitalWrite(PUL,LOW);
delayMicroseconds(10000);
}
}