Close

X, Y, Z, A Motors & Stepper Driver Investigation

A project log for Monoprice Select Mini Electro-Mechanical Upgrades

Endeavoring to build upon the existing fanbase work of this $200-ish printer.

michael-obrienMichael O'Brien 08/29/2016 at 00:560 Comments

This is really a "Part 3" to the other two, but it doesn't have much to do with the modifications of the axis. This here is just a place to details the motors list, technically 3 types, and their specs in case someone wants to upgrade them. I'm also fairly confident that I've identified the Z-axis motor.

With how popular this machine is, I'm sure that some of them have a label on them still, but mine had no identifying marks so this search was a needle in a haystack. Long story short, I came across this image over on Adafruit which has a Jameco PF35T-48L4 motor in the corner, which has the same general form factor as what is our our printers. It looks like these steppers are called tin-can steppers. These are the specs that I can measure from it

Z-Axis Stepper

The Nippon Pulse PF42T-48Q4 is kind of the best one this company has to offer. It is 9.7 mH and 12 ohms per phase and has a claimed pulse rate of 550 pps. The latter means that at best, it can travel the 120 mm height of the Select Mini is about 15 seconds, or ~8 mm/sec vs the previous top speed of ~3 mm/s for the stock motor.

Z-Axis Resolution

So that motor is a 7.5°, 48 step motor as I just listed. Since the motor is attached to a M4 rod, which has a 0.7 mm thread pitch, then in one revolution makes the Z-Axis travel up or down 0.7 mm. Since it took 48 steps to turn that rev, each step is 0.00145833333333333333333333333333 etc etc mm. To avoid rounding errors, you can use multiple of 3 of this number, which is a nice and pretty 0.04375 mm. That is a nice and handy number that effectively represents the layer heights that mathematically work the best for layer heights for this printer.

JK42HS34-1334

The drivers are HR4988's. Let's assume they are electrically identical to the A4988's. Both the N-channel and P-channel FETs have a minimum Rdson resistance of 320 mOhm. If you're driving 2 A through to a motor, this results in 2.56 W of power dissipation per 5mm x 5 mm IC. This is why we need heatsinks.

The next question I have is how well the stepper driver differs from real A4988. I ask this when I started looking at coil current to see if steps were being missed and see what the top speed of the motors & drivers were. I decided to test this systematically. FYI, I'm using a Hantek CC-65; it's cheap but it does the job well enough. Here are screen caps from 10 mm/s to 150 mm/s in 10 mm/s intervals:

As you can see from my quick note, at 50 mm/s you're barely not skipping steps. If you'd like to know if you're skipping steps and you don't have a current probe and an oscilloscope, you can do the following test:

  1. Set you acceleration to ~2000 mm/s^2
  2. Home in your axis.
  3. Set your feedrate with the G1 command like so: G1 F2400
  4. Use the G1 command to bring your axis to 120 mm
  5. Use the G1 command to bring your axis back to 0 mm
  6. If the acceleration is audibly smooth, increase by feedrate by 30 mm/min
  7. If the acceleration has an audible jump, decrease feedrate by 30 mm/min
  8. Repeat steps 3 through 7 until satisfied
  9. Reduce feedrate by 20% and save this value as the max for some headroom

That audible bump several of us have heard is due to the feedrate being too high. If a microstep is skipped, the motor is "accelerated" to full speed skipping the rest of the acceleration. That is my understanding of it at least. But what if you want to drive things at a higher speed?

First up is some measurements and math. In order to know how fast you can go, you need to know how fast the microcontroller can generate pulses. No screen cap here, but from what I can tell, I can get about 38.17 kHz out with just one stepper plugged in for load. I am going to assume that this means we can get that ~38 kHz on all four drivers simultaneously. The pulse is ~3.33 us wide with 0.3% @ 3.75 us, fyi. At 16 teeth per revolution and 200 steps per revolution, this is ~190 RPS and ~395 mm/s. Whether your motor can actually do that is a whole other story as we just saw.

Now the Allegro A4988, which since Pololu is mistaken as the brand, is wired with MS1, MS2, MS3 all to ground to force 16 microsteps. ROSC is tied directly to ground to prevent missed steps when moving slowly. Though as we have seen above, once we start going fast, we begin missing other steps. There are 3 articles that spurred looking into this problem:

http://hackaday.com/2016/08/29/how-accurate-is-microstepping-really/

which is the comments provide a link to:

http://cabristor.blogspot.com/2015/02/drv8825-missing-steps.html

and further research yielded:

http://www.ti.com/lit/an/slva637/slva637.pdf

As much as I don't like TI sometimes, granted I own 2 of their graphing calculators, there are gems and that application note is worth a read. Pattern 3 looks earily familiar to what I'm seeing and the problem had in the 2nd link. TI's document shows 2 solutions and the blog also notes the problem with his driver:

  1. Adjust blanking time by shortening it
  2. Adjust decay time by lengthening it
  3. When blanking time is fixed and decay time is not user-serviceable, diodes!

I have some 1N4 diodes, not 1N5, and my excess current is much less than what the guy in the blog had, so let me give a single pair of diodes a quick test instead of a double pair. This didn't work out as desired. I tested it with my 1N4448's and that caused problems by stalling the motors at certain speeds.

Another option was that since the drivers remained in slow decay mode, that additional resistance could help dissipate the current in the windings better. Unfortunately this didn't help much beyond 4200 mm/min. This was with 6 ohms added to each coil.

I did not grab captures for this because I was in the groove of soldering and testing, but needless to say that diodes or additional resistance were ineffective so I have 2 other choices I'm going to attempt to use:

  1. Buy legit A4988's
  2. Hack in A5985's and see what happens ;)

Discussions