This paper presents a modular cascaded H-bridge multilevel photovoltaic inverter for connecting solar panels to single or three-phase power grids. The modular design improves efficiency and flexibility over traditional PV systems. It uses a distributed maximum power point tracking control scheme that allows each solar panel to operate at its optimal power point, maximizing energy extraction. For three-phase systems, this control compensates for mismatches between panels to prevent unbalanced currents back onto the grid. The paper demonstrates a prototype three-phase seven-level inverter using nine H-bridge modules (three per phase) connected to 185-W solar panels.