electronic switch and 4 motors on 2 motor supported motor shield

Hi community,

i'm looking for an electronic element, which i can use for switching the power supply between 2 motors.
SO my english is very stunning, i drawed a scribble for understanding what i want to do:

Motor 1A and 1B will never run at the same time, the 2A and 2B too. Thatswhy i want to build this switches.
(m1a-LOW -> m1b HIGH; m1a HIGH -> m1b LOW)
But what electronic parts i need? I tagged the parts with the "?".

I hope that will be operate.
thank you.

You could use a DPDT relay for one group of two "?" devices. The Arduino output for each relay should go to a transistor to turn the relay on or off as the Arduino doesn't have enough current to turn on a typical relay (and it can be damaged by the kickback).

To turn the relay on/off you can use circuits like this:


Frankly, it would be easier to just use two motor drivers and not need any additional hardware. For example, you can stack two of our Rugged Motor Drivers on top of each other, make some simple modifications to one of them to use different control pins, and control all 4 motors independently.

The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Thats the problem:
i need the other pins for a ethernet shield.
An on my Arduino-Clone is a Motor-Shield integrated.
So i need the pins for the integrated and for the put-on Motor Shield.

I want to control 2 DC-Motors by the integrated, and 4 Motors by the added via the switch-idea.
Maybe my problem needs a entire better solution.

Hrrr, what could I do?

This is the board:

and the MotorShield:

an the EthernetShield:


Thatswhy i asked if is possible to switch the energy by digitalPin.
May i need a Arduino-Mega to control more shields...?