Hi there,
lets start with the General Guidance on how to post...
version of the IDE you are using and the board version - 1.8.12, VID: 1A86 & PID: 7523 (hope this is the correct information, have to use "arduino nano" and "ATmega328P (Old Bootloader)"
Sketch:
int stp = 3; //connect pin 13 to step
int dir = 2; // connect pin 12 to dir
int Speed = 400; //lower this number to find your best starting speed
int MaxSpeed = 100; //Lower this number to find your max speed
int accel = 1; //change this number to experiment different acceleration
//with 17HS4401 500=Speed and 100=MaxSpeed was my best result
void setup()
{
pinMode(stp, OUTPUT);
pinMode(dir, OUTPUT);
}
void loop()
{
if (Speed == MaxSpeed)
{
digitalWrite(dir, LOW);
digitalWrite(stp, HIGH);
delayMicroseconds(Speed);
digitalWrite(stp, LOW);
delayMicroseconds(Speed);
}
if (Speed > MaxSpeed)
{
digitalWrite(dir, LOW);
Speed = Speed - accel;
digitalWrite(stp, HIGH);
delayMicroseconds(Speed);
digitalWrite(stp, LOW);
delayMicroseconds(Speed);
}
else {
}
}
Add working links to any specific hardware as needed:
Wiring
Remember that the people trying to help cannot see your problem so give as much "ACCURATE" information as you can
So. Pretty basic, I try to get a stepper turning.
I managed to achive that with the help of Tutorial Easy Driver and Stepper #1.
Since then, a bit of testing happened and I bought stepper #2 and a A4988 driver - wanted to experiment a bit on the torque side of life.
I smoked a few arduinos due to incompentence and I am fairly sure I smoked the Easy Driver - I cannot reaccomplish the basic tutorial. You can feel either stepper working, but the "hits" or "strokes" you feel do not result in any turning. So... Screw it. Burned it. Want to use the A4988 anyways.
So here is where the actual problem comes into play.
I crosscheck everything I do with both steppers, surprisingly the results are different - no one could have guessed that. Nevertheless, it adds to meh startlement.
I went so far to use the accelstepper-lib to make things run smoothly - check at the beginning of the post for the source - just another tutorial.
With the sketch stated above here are meh results:
Stepper #2 starts to turn (lots of mechanical noise, scratching, buldging), will stall a bit into it, meaning it does a few steps forward, a few backward, a few forward, lots of noise, I THINK this looks like miswiring the coils - which it isnt. It will then continue at some point to turn again, looks nice, feels nice, no noise, no scratching, nothing. Just nice as.
Then at the MaximumSpeed, if it feels right, it stops. No noise, just a bit of feeping, simply a stop. If you give it a push with a hand it will go to fullspeed - again, nice as. If you then apply ANY KIND OF RESISTANCE - really guys, just a very descent touch with my hand - less force used than by typing on your phone - it stops. Feeping. Give it a push - runs again nice. But it is not going to start again by itself.
How do I know I connected em coils correctly? I shorted coils, tried to turn the driver, great resistance means I shorted one coil.
In comparison to every other schematic I see though my coils with the steppers are at pins 1 + 4 , 3 + 6. All schematics I see go for 1 + 3, 4 + 6. I tried that aswell, well I tried connecting anything to anything pretty much, but with 1 + 4, 3 + 6 at least something happens inside the stepper. This is the reason I am confident the wiring to the stepper is accurate.
Stepper #1 will just not turn at all and stall hard at any speed. If you cannot grasp my superb description I will upload a video - just let me know. I do not know if this problem is common and I keep being too foolish to see my obvious mistake.
My goal is to have a stepper turning with a reasonable torque. At the end of the day I would like to use 2 gear shafts on it and rotate something. Since I utilize a 3D-Printer for printing different gear shafts, it is a pleasant way for my little project. Might not be the best engineering here, but that doesnt really matter to the topic on why the steppers aint turning.
Did I damage the steppers? Do now know for sure, I opened them and they look fine to me.
External power source (applied to the upper breadboard - wanted to easily differ between 5V and external source) is 12V & 1Amp. Of course, I used the steppers with different power sources, so at some point they were able to access up to 24V and 4Amp - not at the same time though.
I played around with the potentiometers on the drivers - even went into calculation as stated in the tutorial, but ... same same.
Let me know if my post lacks any information you would like to have. Looking forward to testing around with your input. ![]()
Thanks a lot in advance!
Cheers,
Sam
