adding a switch for direction reversal in 12v DC motor w/ PWM controller system
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







simulate this circuit &ndash; Schematic created using CircuitLab