Please explain:
I need to run 2 servos (9V each) and 1 motor (12V) that are attached to the motor shield.
which is in conflict with the spec of the shield:
Motor controller: L298P, Drives 2 DC motors or 1 stepper motor
That means you cannot have 3 motors connected to the shield at the same time.
Only: if you want to drive the two servos in parallel.
If you want to drive 2 servos and 1 motor separately controlled, then you will need an extra driver for the 3rd motor, which then will solve your question 2., to drive the two motor types with different voltages.
- Is it necessary or desirable to power the motor shield separately (by splitting the adapter wire perhaps between mega and shield)?
Spec says:
Vin on the screw terminal block, is the input voltage to the motor connected to the shield. An external power supply connected to this pin also provide power to the Arduino board on which is mounted.
So you don't have to split the power supply.
Imho, and given that you
a) need two different voltages for your motors and
b) you need to control the two servos separately
one setup could be:
- power the two 9V servos through the shield with a suitable 9V power supply
- connect a separate DC driver which can bear 12V and drive your third motor and
- power the extra driver with 12V
If you want to go with just one power supply, you will need a 12V type with enough power to drive all motors and the Mega. In addition you will have to reduce the 12V to 9V by a suitable step down converter which is able to deliver enough current for the 2 servos and the Mega.
Example:
- Servos need 9V/0.5A each
- Mega with some other devices (sensors, LEDs etc.) connected: 0.2A
- 3rd motor: 12V/2A
Then you would need
- 12V power supply with (2x0.5A + 0.2A + 2.0A) = 3.2A (-> 12V / 4A to be safe)
- 9V step down converter with (2x0.5A + 0.2A) = 1.2A (-> 1.5 .. 2A to be safe)