Control 12v DC motor with arduino and two relays in both directions
You can try this:



simulate this circuit &ndash; Schematic created using CircuitLab
Generally it's better to use a completely separate supply for the motors and to actually use the opto-isolation that is built into your relay module rather than bypassing it by tying the grounds together.