Pages

Tuesday, February 1, 2011

A MOSFET based fix to the Makerbot extruder motor problem

As described in my previous blog about the first-time experience with the Makerbot, we encountered a problem where the extruder motor would stop moving after a while. Apparently there have been many discussions about this issue, such as here, here, and here. It seems to be generally agreed that the problem originated from the suboptimal performance of the extruder motor, particularly that its resistance can drop to close to 0 during operation, causing an overload current that fails the H-bridge (A3949) on the extruder controller board. I tried connecting a small power resistor in series with the motor and it still failed after a while.

The most commonly used solution seems to be the relay fix by rwensley. This allows the extruder motor to be powered directly from the +12V supply line, avoiding the failure of A3949. But the downside of a relay fix is that PWM is disabled, thus the feed speed cannot be fully controlled. So I started thinking about a MOSFET based fix. The first version is to use a single MOSFET (IRF510) in the place of relay, and this allows the motor to only move forward (which often suffices). The schematic is shown below:



The 1K resistor R1 is a pull-down resistor (1/4W is sufficient). Its value turns out to be important, because the on-board A3949 H-bridge seems to have a pull-up resistor of about 70K. Thus even when the H-bridge is inactive, the motor ports (1A and 1B) are pulled up to +12V, which must be pulled down to well below 2V in order for Q1 (IRF510) to remain off. The 1K value works perfectly (if the value is too large, it won't be able to pull the voltage low enough). The reason IRF510 works is because it allows a high current (20A pulsed) to pass through it, which is much larger than what the A3949 chip can handle.

Using MOSFET, the main benefit is that the PWM works, hence the motor feed speed can be controlled and tuned in order to print out fine details of a 3D model. I was able to print several models with great details that I wasn't able to achieve when PWM had to be fixed to 255 all the time.

After the single MOSFET solution worked, I started thinking how to make the motor move backward as well. It looked like the simplest way is to reproduce an H-bridge using 4 MOSFETs. The schematic is shown below:



It's basically one of the standard H-bridge implementations. Q1 and Q4 are N-channel MOSFETs and should use IRF510 or any alternative(STP16NF06, RFP30N06LE etc.) that supports at least 10A drain-source current; Q2 and Q5 are similar but P-channel, and should use IRF9530 or any suitable alternative (STP12PF06, FQP27P06 etc.)

Note that there is no special mechanism here to handle shoot-through, which is a known issue for H-bridge design. But in this case, even if shoot-through happens, it will be over a very short period of time, and the MOSFETs are able to handle a high impulse current if that happens. I've tested the circuit in continuously printing for several hours and have not encountered any problem. Also note that the kickback protection diodes are ignored as the MOSFETs already have built-in diodes. Here is the small protoboard with all components soldered on it:



With this fix, the extruder motor can now move forward and backward, and PWM works in both directions! I've seen in several places that eventually the extruder motor should use a stepper as it provides much better control. But before that happens, I am sticking with my fix for now.