Raspberry Pi breadboard control works, but motor spins constantly when installed over longer wires
Opened this issue · 1 comments
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?
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.