In order to automatically identify the electrical parameters of PMSMs, rather than measure the parameters using instruments such as RLC meters, this paper proposes an approach in which the testing voltage is injected into the motor from the drive. Based on the analysis of equivalent circuits of the PMSMs as well as the phase voltage and phase current information recorded from standstill to sensorless control operation, the RLS method is employed to estimate the values of electrical parameters of the PMSMs. Moreover, the automatic motor parameter identification algorithm developed in this paper is also integrated into the open loop startup procedure of the sensorless control drive. Consequently, the proposed automatic motor parameter identification method has attractive features such as fast identification and being highly convenient. In addition, both the proposed automatic motor parameter identification method and the sensorless control drive developed in this paper are implemented using a low-cost 16-bit microcontroller. Two commercial surface-type and interior-type PMSMs are used in the experiments to assess the performance of the proposed approach. Experimental results verify the effectiveness of the proposed automatic motor parameter identification method.