Measuring resistance of brushed DC motor