0
\$\begingroup\$

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

\$\endgroup\$
  • \$\begingroup\$ Welcome to EESE! If you put some additional effort in formulating your answer it is more likely to obtain a response. You have basically a single run-in sentence without any capitalization to break things apart, which hinders understanding. And a schematic, to illustrate what you are getting to, will save a lot of confusion and mental contortions. Please edit your answer, and you will find a simple schematic editor in the same edit box. \$\endgroup\$ – Edgar Brown Nov 29 '18 at 18:43
1
\$\begingroup\$

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

\$\endgroup\$
0
\$\begingroup\$

schematic

Figure 1. Modifications required.

You can reverse the motor with a double-pole, double-throw (DPDT) switch.

Be careful with this. Reversing the motor while at speed will cause high currents to flow as the momentum of the motor must be overcome to reverse it.

\$\endgroup\$
0
\$\begingroup\$

Consider replacing the motor controller entirely with a H-bridge controller. A H-bridge is a motor controller that allows you to control speed with PWM and change direction with 2 digital IO pins.

The L298 is a popular one, plenty of modules available for cheap. You can control 2 DC motors with it.

\$\endgroup\$
  • \$\begingroup\$ the only reason I did not use the L298 is that I wanted a knob to control the speed at will, not use an arduino to program in the speed. and I really only need to control 1 dc motor \$\endgroup\$ – Sam Nov 29 '18 at 18:44
  • \$\begingroup\$ Do not use the L298 in a modern project. It is ancient and absolutely horrid. If you use a bridge, use an FET one. But the asker's requirement doesn't need electronic reversing. \$\endgroup\$ – Chris Stratton Nov 29 '18 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.