Assuming you are using a Brushed DC motor and the title of the thread, you may want to look at H-bridges.I am trying to build an automatic lid opener and closer for a wild life feeder with a dc motor
by Jake Hertz
by Jake Hertz
by Duane Benson
by Aaron Carman