Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stealtchop stops motor working #59

Open
SteveWCoder opened this issue Nov 11, 2018 · 1 comment
Open

Stealtchop stops motor working #59

SteveWCoder opened this issue Nov 11, 2018 · 1 comment

Comments

@SteveWCoder
Copy link

SteveWCoder commented Nov 11, 2018

Hi,

I've got a 2130 connected to an adafruit arduino(bluefruit LE). I've changed the various pins(en, cs, dir, step) to ones on the board and have(it has dedicated pins) MOSI -> SDI, MISO -> SDO, SCK -> SCK.

I've tried getting the simple example to work but it doesn't work unless I comment out the line

driver.stealthChop(1);

Worked this out by trial and error. Without this line the motor turns and changes direction, though is noisy as if using a normal stepper driver. I've tried 3 different stepper motors and the same thing happenes for all of them.

Any ideas how I can resolve this ?

Thanks.

EDIT: Another thing I just noticed is that sometimes it doesn't change direction, it sort of stalls for a short time then continues in the same direction, then this behaviour either continues or it goes back to switching direction.

@SteveWCoder
Copy link
Author

SteveWCoder commented Nov 12, 2018

Hi,

to follow up. I have a 2100 board as well so used that to check the motor connections, with the 2130 board replaced with the 2100 and using the simple example the motor spins correctly(and pretty silently). I realise that it's ignoring all the actual 2130 driver stuff just using the step commands.

I then set up the stallguard example with correct pins and added

digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(10);

When I ran it the motor ran really erratically and this was the output in serial monitor

Start...
0 318 305
0 0 581
0 0 581
0 0 581
0 252 581
0 244 581
0 0 581
0 0 581
0 0 581
0 253 581
0 225 581
0 243 581
0 0 581
0 0 581
0 0 581
0 256 581
0 240 581
0 0 581
0 0 581
0 241 581
0 251 581
0 228 581
0 0 581
0 0 581
0 244 581
0 249 581
0 236 581
0 0 581
0 0 581
0 247 581
0 253 581
0 0 581
0 0 581
0 245 581
0 251 581
0 0 581
0 0 581
0 0 581
0 0 581
0 0 581
0 235 581
0 240 581
0 235 581

So it seems that it is reading something via SPI though what this means I don't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant