This paper proposes an online fault localization method for low voltage DC microgrids. This method is based on Artificial Neural Network (ANN) and only requires real-time measurements of a local power converter to locate a fault. During a DC fault, the current component fed by the AC grid can contribute to time-variant non-linearity, which is undesirable to the development of the data-driven method. A novel real-time scheme is thus proposed to exclude such components from DC fault current. The principle of the scheme is introduced and illustrated with time-domain analysis. The effectiveness is verified by case studies of locating a DC fault in a radial DC network fed by a 3-phase voltage source converter.