Electrical – adding a switch for direction reversal in 12v DC motor w/ PWM controller system

dc motorpwm

I have a circuit for a 12v dc motor with a battery and a PWM controller. the system sort of is in this order battery–>PWM–>motor. I want to add in a switch to reverse the polarity to switch directions of the DC motor at will. Without the PWM, its a pretty simple operation and straightforward, but I was wondering how to do it now with the PWM. Do I put the switch after the pwm before the motor or between the battery and pwm? I wasn't sure how the PWM would affect the system direction and didnt want to ruin anything in my system while implementing the new switch

Best Answer

There are a few ways of doing this, but the easiest is the one to insert a DPDT relay in line with the motor.

Depending on the polary of the output, you might need to connect VCC instead of GND on the contact of the Relay, but the concept remains the same.

With a simple switch or a GPIO you can drive the relay and change the direction

schematic

simulate this circuit – Schematic created using CircuitLab

Related Topic