Hi
I was thinking about this, and i recon that you could build this using just a single relay and 2 switches.
please excuse the really crap drawing, but i cant find any of the symbols in my cad library.
The relay would need to be a 3 pole changeover, possibly
https://uk.farnell.com/jsp/Electric...6283-9012-0000/displayProduct.jsp?sku=1169285
and 2 switches, 1 switch needs to be n/o and the other n/c, or you could just use 2 changeover switches, and wire them accordingly.
i choose a faston style relay, because i think the circuit could be hardwired to the relay, therefore no pcb, or anything else required, just some wire and a few faston terminals.
The switch on the RIGHT(R) hand side is N/O, and the LEFT(L) side is normally close.
Circuit operation,
when powered up, the motor will turn to the right, when it hits the RIGHT limit switch, the relay coil will energise, and latch (via the 3rd pole).
When the relay energises, it will reverse the currnet to the motor, causing it to run anti-clockwise.
When the LEFT limit switch is reached, it will break the power to the coil, causing the circuit to reset, and start heading clockwise again.
(please note, this is off the top of my head so please double check my logic before ordering parts if you use this circuit)
If needed i can draw a diagram complete with pin numbers for the relay to make wiring easy.
Hope this helps
Graham