Apparatus and method for controlling the frequency of the current in the excitation coil of a handpiece of a dental magnetostrictive ultrasonic scaling unit, or a similar transducer. A microprocessor continually samples predetermined functions of the current through the excitation coil, and periodically adjusts the frequency, by performing a coarse-stepped frequency scan, followed by a fine-stepped frequency scan until the function samples are close to predetermined optimum values. The functions can include the peak of the current and the peak of a high-pass filtered version of the current. The frequency adjustment is performed each time the handpiece is energized by the practitioner, and at frequent intervals thereafter, assuring automatic optimal frequency at all times and under all conditions. Apparatus according to the invention does not require sensing coils or complex power- or impedance-sensing circuitry and covers a wide range of resonant frequencies for different handpiece- and insert types. A configuration with multiple handpieces is supported.