Motor stepper driver surprise

Edit: A week later! I solved the problem I discovered here. Nothing to do with the stepper drivers. Everything to do with not thinking clearly enough. Software problem! – read about it here: https://polargraph.co.uk/2018/09/a-good-day-at-the-office/.

I had a good Saturday, trying to get to the bottom of my bumpy stepper issue.  There was some weird quantisation going on, and microstepping was really unreliable. Each full step seemed accurate, so dimensional accuracy was sound, but travelling was far from smooth.

It was also quite noisy. So my hypothesis was that the new circuits in the Polarshield v3 were different somehow, and so I wanted to do a bit more digging before deciding these boards were ready. I rigged an old PolargraphSD machine to use the stepping circuits in the new board and found the exact same problem. My heart sank.

Much as I enjoy these kinds of hacking expeditions, it makes a mess! Here’s a view of the workshop. I meant to highlight the explosion of parts on the desk, but actually it blends in perfectly with the rest of the workshop. Ok, the whole place is a mess. That’s characteristic of an research and development phase of the build. I’m sticking with that explanation.

I did a bit more testing and tried a few more things. Breathed a sigh of relief when I tried moving the stepper drivers from the old board into the new one. The machine hummed into life and delivered that buttery smooth sound I was hoping for.

I took a closer look at the stepper drivers that were in the old machine (that worked great) and the new ones. The old ones had sense resistors labelled R200 (0.2 ohms) and Allegro A4988 chips. The new ones had sense resistors labelled R10 (0.1 ohms) and a HR4988SQ chip onboard. The HR4988SQ is a near-clone of the Allegro part made by Heroic Technology (http://www.heroic.com.cn/en/products_show.asp?id=143http://www.heroic.com.cn/uploadfile/1602/05133625.PDF).

Now weirdly I’d never noticed that this was not an actual Allegro part. In old Polargraph machines it has behaved exactly as a regular Allegro part. Looking more closely at it, the HR4988SQ drivers microstep all the way up to 1/128, whereas the Allegro part only goes up to 1/16. Now although the wiring of the Polarshield configures both drivers to run at 1/8 microstepping mode, there’s obviously something else different between the way the two different boards interact with the chip. (A bit of further reading – https://www.reddit.com/r/3Dprinting/comments/75w22r/psa_hr4988_drivers_cause_noise_and_vibration/ makes me think I might try to get it up to 128 stepping instead!)

So the really good news is that I figured out a way to solve the problem. The neither-good-nor-bad news is that I still don’t really understand the issue. The bad news is that I’ve got a hundred of these HR4988 based drivers and now I don’t know if I can use them. Boo!

This morning I also beat my half-marathon time by almost two minutes. Overall, I call this a good weekend even if it is going to cost me another couple of hundred quid.

7 thoughts on “Motor stepper driver surprise

  1. Hey! I’m a big fan of Polargraph since I saw the instructables 7 years ago. This machine is one of the reasons why I’m studying Electrical Engineering in college. It was my first Arduino project and I learned a lot trying to make my own. So thankyou for sharing the project documentation.
    Maybe it’s late now that you’ve got a hundred HR4988, but the TMC2130 can be a good (and more expensive) solution.

    Marco Reps have a good video on this:

    https://www.youtube.com/watch?v=ZzO9skEYqwY

    I set up my 2 polargraphs on my bedroom so the noise was a real nightmare, maybe the TMC2130 can mitigate both the noisy lines and the audible noise emitted by the motors =)

    Thank you again and sorry for my bad english.

    • Hi! Really glad to hear I gave you a push! The really good news is that I totally solved the problem. I’m going to write up a separate post to explain it, but it was embarrassingly simple. I can use my HR4988s after all and I have no changes to make to the hardware.

      That said, I’ve been reading about the TMC2130s – they look amazing – but you’re right, they’re expensive!

  2. Pingback: A good day at the office | Polargraph

  3. I am doing polargraph as my project. I have something not clear to understand the algorithm for design code. Could you help me understand how stepper motors move on x, y coordinates and how calculate the variable speed?

Comments are closed.