Submodule (SM) voltage balancing of a modular multilevel converter (MMC) is crucial for stable operation of the converter. The conventional sorting algorithm is usually used to achieve this balance through instantaneous measuring of SM voltages and arm currents. However, in practice, this process utilizes digital out pins from the controller to fire the switches, which are slower and inaccurate, compared to the embedded PWM interface module provided in most of the commercial controllers. This work proposes a voltage balancing technique using a modified sorting algorithm to be compatible with the PWM interface output port of any controller. The technique is validated experimentally through a three-phase grid connected solar MMC system and the obtained results are presented to show the performance of the proposed technique to balance the SM voltages.