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

Raspberry Pi breadboard control works, but motor spins constantly when installed over longer wires #51

Open
SummittDweller opened this issue Feb 26, 2021 · 1 comment

Comments

@SummittDweller
Copy link

Great project, and I have it working in Alexa mode as-written. However, for adjustment purposes I'd like to be able to swap the ESP8266 controller with a RPi 3B+ that I've programmed in Python. The odd thing is that this works when I make the connections with the DRV8825 mounted in a breadboard using short Dupont connectors to make the circuits. However, when I connect the same circuits using a long CAT5 cable in place of short Dupont connectors, the motor runs without control. I've continuity tested each CAT5 wires individually and found no problems.

In both cases I'm pulling 5v from the RPi and using GPIO pins 16, 20, and 21 for ENABLE, DIR and STEP, respectively.

I was going to prepare a diagram, but since it's not yet working in "production" I haven't created one. Can anyone suggest what might be wrong?

@SummittDweller
Copy link
Author

SummittDweller commented Feb 26, 2021

Just FYI... since posting here I've switched my wiring so that the DRV8825 is mounted near my power source and RPi, only the 4 motor output wires from the DRV8825 to the motor are of any length. In fact, I'm using a standard CAT5 cable with each twisted pair carrying one of the 4 outputs. My test cable is 20' in length and I seem to have reliable control over the motor with no ill-effects, at least none yet.

Since this wiring is intended only for adjustments I don't leave the 12v power connected for very long. There's no appreciable heating of the motor or DRV8825 that I can detect.

I may just stick with this configuration since it is simple to wire, but am still curious why long wires from the RPi to the DRV8825 in my previous configuration were causing apparent problems.

At least now I have reason to put together that diagram I promised, and I'll add it to this issue once I have.

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