It may be easier and cheaper if you used a DPDT relay to change the direction of the motor. Here is a schematic of what I mean: <!-- Begin schematic: In order to preserve an editable schematic, please don't edit this section directly. Click the "edit" link below the image in the preview instead. --> ![schematic](https://i.sstatic.net/gE4x5.png) <!-- End schematic --> The microcontroller pin you use on the power transistor (labeled Q2 in the schematic) will allow current to flow through the relay, the direction the current moves through the motor is dependant on the state of the relay. I have used this circuit for many projects due to its simplicity, cost, and the inherent robustness of relays. *Quick note the transistor used in the schematic is not capable of handling 10 amps of current. *Make sure the capacitor you use on the motor can handle many hundreds of volts *The relay coil will need something to drive it, that can take a few configurations depending on the relay used.