A disaster on Arrakis! Warning to all using servomotors

I had to downsize the Arrakis mechanism slightly owing to an error in the sand box design for the table. After taking the XY mechanism apart, milling the frame pieces and reassembling, I tested it. It homed fine, so I pulled up one of the old patterns and ran it… for about 1 second…

The old pattern was for a larger table so the magnet carriage slammed into the end of one axis at full speed (1000 or 1500 mm/sec). The sudden stop caused the motor to pull huge current, forcing either the motor driver or the power supply shut down. All the energy stored in the motor had to go somewhere so it went back onto the 24V rail which let the magic smoke out of a voltage regulator chip on the Duet controller board and killed the power supply.

I tested the motors and they both seem to be OK as is the other power supply. I’ve ordered a new Duet board and power supply, and decided that in the interest of protecting the expensive controller board, I will power it from its own supply instead of putting it on one of the motor supplies.

If anyone is considering using servomotors, consider this a warning! Learn from my mistake!

1 Like

Thanks for the info, but a sand table at this high speed isn’t so common I believe :wink:

Well, not yet, anyway…

Would your board have been saved if you had enabled max hard or soft endstops?

1 Like

Only if the stops were set in the right place.

1 Like

When the motor is spinning fast and comes to a sudden halt, the energy stored in the windings has to go somewhere, and it creates a voltage spike on the power supply line. AFAIK, endstops are only checked during homing in most or all 3D printer controllers, so additional endstops would not have helped. I do have physical travel limits set in the firmware, but I had reduced the size of the mechanism and didn’t update those limits in the firmware. Had I done so it might have helped. That said, with as much energy as gets stored in the motors when running at high speed, it’s probably best to add some protective circuit.

The solution is to protect the controller from the motors by using separate power supplies, but it’s also a good idea to protect the power supply and motor drivers from the motors using a circuit like the one described in this file.

Soft stops are limits in the firmware. So you might set the bed size to be 1000mm and then turn on soft stops. If you command 2000mm, it will only drive to 1000mm (and properly decelerate first). But if you have an 800mm table and the limits are still set to 1000mm, that won’t help you.

They might be called something else in duet land.

The way I think servos work, it isn’t the stopping or momentum that causes the current spike. The momentum goes into the frame as it stops the motors. Stopping a generator doesn’t create current AFAIK.

But what might have happened is that it wasn’t in the right position, the servo controller wanted it to be. So the servo controller sent more and more current. This must have been too much for the supply.

1 Like

I think the servo controllers have a hard limit on the current preprogrammed, so when the motion stopped abruptly, it probably cranked the current up to the limit then shut itself off. Any time you abruptly change the current in a coil it will generate a back EMF and that is what spiked the power supply and the controller board. The power supply was rated for more current (8A) than the motor’s maximum limit (5A), but the voltage spike was still sufficient to kill the power supply.

The protective circuit in my previous post detects when the voltage from the motor is higher than the supply voltage and shunts the current to ground via a resistor that limits the maximum current through the transistor switch.