Stepper testing

First things first, I need to make a cable that can connect from a stepper motor to the connectors on my sanguinololu.

The stepper motors use JST 2mm pitch 6 way connectors, with a similar 4 pin connector for the wires that are actually connected.

The connectors I have installed on the sanguinololu are JYK .1″ (2.54mm) pitch 90 degree headers.

I have plenty of the equivalent JYK female connectors and pins to go in them.

I intend to purchase a bunch of pins for the JST connectors, so I can simply reuse the connector, but use longer wires  – a pack of suitable pins from RS is £1.60 for a pack of 50, which should be more than enough at 6 per stepper.

Many years ago when I was into rewiring my beach buggy, I bought a pair of MSD ratchet crimpers that have interchangeable jaws.

I also have various additional sets of jaws, the best tool suited to crimping the pins for the JST connectors according to Rapid (who I bought them from) is this tool which as far as I can tell has the same jaws as these, which I just happen to have.
Some cutting, wire stripping and crimping later and we have a test cable:
The actual wire I intend to use is the same thickness as that on the test cable, it is 6 core alarm flex from Wickes at £9.99 for 50m.
I quickly mocked up the test rig as described on the sanguinololu page of the reprap wiki, power is from a 19v laptop brick for the motor and a LM7805 voltage regulator providing the 5v feed (that’s the relocated PIC18F4550 chip in the background).
The sharp eyed among you will notice that the order of the wires on the test cable have changed, this is because I was reading 1A 2A on the sanguinololu board as one coil based on A+ and A for the coil on the motor details, rather than 1A 1B as a coil – wiring is much neater, all straight through from connector to connector.
I make my own breadboard jumper wires by cutting up sections of solid core CAT5 network cable, costs next to nothing and I can have as many as I like of whatever length I want, a 1m cable makes hundreds.
Double checked the coil windings on the motor with a multimeter set for resistance.
Powered up the circuit and the motor just sits there and vibrates, shaft is not exactly locked in place either.
Try turning the trim pot and the noise level decreases and the shaft feels locked in place (not very scientific I know) although the stepstick did become quite warm on the heatsink.
The sanguinololu wiki page implies that I should see 0.500A across the coil windings, I see nothing notable, and my multimeter autoranges and still picked up nothing.
Plugged the stepstick back into the sanguinololu board and connect via Printrun, with a motor attached, I try pressing the X+1, X+10 and X+100 buttons – nothing.
I also tried connecting up my microSD card and reading from that – nothing.
Maybe it’s the marlin firmware? reload sprinter and try again – well I can see the microSD card again, so that’s a good start, the X movement buttons also cause the motor to turn, albeit with loads of vibration and the shaft is no longer locked when still again.
Looks like marlin still thinks it is on the wrong board type, loads more digging around the configuration required here then.
I have a search around the web and eventually find this post by nophead, which details how to set the voltage via the vref connection (that just happens to be present on the trim pot wiper as well).
Try again with the X buttons, still not happy with the movement, still seems to be skipping and is not locked when still.
Neither the motor nor the stepstick are even warm to the touch, but suddenly the motor stops responding.
I have since checked everything I can on the stepstick, continuity, resistance of every component and pin voltages when live, the only thing different on this board to any of the others is that the others all show the 19V from the power brick on all motor pins, whilst this one shows 10V and 0.25V.
Now from what I have read about these drivers, they should current limit to a maximum of 1A regardless of where the trim pot is set (adjusting merely lowers this figure), and I can’t believe I have damaged the motor – all resistances show the same as another stepper.
Currently I am at a loss as to what happened, I have rechecked all the boards for potential shorts and can find none.
On the plus side, I have been reading up on I2C bus at tronixstuff and found that the user Malx has a fork of the marlin firmware on github that uses the LiquidCrystal_I2C Library.
Now this is a much more interesting way of attaching an LCD – 2 pins requires that are already exposed  on the sanguinololu board.

Leave a Reply