In this study, driver and power units of a microcontroller based ultrasonic generator, which has advanced controlling functions are designed and implemented for 28 KHz ultrasonic cleaning machines. The importance and usage of ultrasonic frequencies for surface cleaning purposes are addressed. The designed generator has the ability of automatic frequency control as a solution to the problems of degradation on power and cleaning efficiencies results from the resonant frequency deviations of ultrasonic transducers due to load changes on cleaning tanks. For this purpose, a special software algorithm is developed. Since its operation has the property of frequency sweeping in a narrow frequency band, more homogenous cleaning patterns have been observed after the foil tests, and the related results are included in this article. Moreover, temperature and timing controls, and also protections against possible short circuits in the power unit are among the additional properties of the designed generator. It can easily be adapted to the multi-frequency ultrasonic cleaning systems by additional commands into the software running on the microcontroller.