1460294501-1f62290a-65a3-4862-9c51-54ae6c73db72

A rate smoothing function used in implantable pulse generators uses detected triggering events, which cause the rate smoothing function to be activated or deactivated, and detected parameter adjusting events, which cause parameter of the rate smoothing function to be changed. The method includes: delivering power from the battery to the motor in accordance with an operator input; detecting a condition of the power tool indicating a shutdown of the power is imminent; and fading the power delivered from the battery to the motor, in response to the detected condition, through the use of a controller residing in the power tool. Alternatively the sacrificial anode may be composed of zinc or an alloy thereof.