Circuit with reversing polarity and two microswitches

dc motorpwmreverse-polarityswitches

I am building a time-lapse camera slider with the following components

  • 2rpm DC gearbox motor
  • PWM with reversible DPDT switch to reverse motor
  • 2 SPST Microswitches

I am trying to wire the microswitches at either end of the track to stop the motor from running. However when the cart reaches the end of the track, the circuit is open, and the reverse direction switch is thrown the microswitch is still open and doesn't allow the cart to move. Is there a way to disable one switch at a time and leave the other active. Here is an image of how its currently setup.

enter image description here

Best Answer

put diodes in parallel with the switches so that when activated the motor can back-out of the switch activation.

else move the microswitches into the circuitry around the DPDT so that each switch only breaks one of the directions.