switched electromagnet control to pwm for reduced current draw