Thanks for all of the responses! I hate to be a pain but I like to understand what I'm doing, not just copy the directions... After some research on diodes and motors (http://playwithrobots.com/dc-motor-driver-circuits/
) I realize we have built an H-bridge circuit.
I rebuilt this on a breadboard without the relay to better understand it.
As mentioned in that link, with none of the switches connected (In my breadboard example, the wires), there is no motion. With S1/S4 connected and S2/S3 not connected the motor goes one direction. With S2/S3 connected and S1/S4 not connected, the motor goes in the other direction. Then connecting S1/S3 and not connecting S2/S4 while the motor is running essentially applies the brake and stops the motor.
davidcoton, you mentioned the diodes should be close to the motor... What if that isn't possible? I'm planning on soldering this H-Bridge onto a board and then I will run about 3 foot wires from it to the motor. Is that going to be okay?
I still don't fully understand how the diodes prevent the sparks. Let's say S1/S4 are closed and S2/S3 are open - the motor would be doing in one direction. When the relay switches and S3 closes and S4 opens, the motor would stop but then generate the high voltage back EMF. Which diodes (D1, D2, D3, or D4?) protects the switch and what switch needs the protecting? Which direction is that back EMF going in this example?