I'm making a differential drive autonomous robot . I'm the proud owner of a new arduinomega 2560. I'll be using it to control my robot. I also have 2 geared dc motors, that require 12vdc and draw 300ma. I've just ordered a h-bridge motor driver, and a rechargeable 12v battery pack. My question is about the power distribution. Can I just make a splitter going from the battery to the arduino, and the motor controller, or do I need to the motor driver directly from the batteries, and use a separate regulated power supply circuit between the battery pack and the arduino? sorry if this seems like a silly question.
If yer battery pack is stout and in good condition, hooking both the motor controller and arduino to battery may suffice. Make sure your connections are good, most importantly the ground.
A capacitor or a DC noise filter on Arduino Vin may help, also on the motors. Filters to keep alternator whine out of car radio used to sell at RadioShak, not sure if they still do.
NOTE the arduino goes straight to battery, do NOT share motor power wire. If motor is disconnected while carrying current it makes a nasty voltage spike. You want arduino connected to battery, NOT the motor in case that happens. Most filters and voltage regulators will not protect you from this.
If you make good connections the filtering and regulation already built in to h-bridge and arduino will be fine, unless maybe your battery is too puny for the motors.
Nah, not worth the risk. Motor power will be very noisy, keep it away from the Arduino if you can - inductive spikes can fry voltage regulators. Also motors pull enough current to lower the supply substatially on start-up and stall conditions - this may lead to spurious resets.
If you do run the Arduino from the motor batteries you need an extra level of regulation / protection between them to be sure the Arduino is safe.
Say your Arduino and other non-motor circuitry takes a max of 100mA. You can put 39ohms between the battery +12V and the Vin of the Arduino and it will still get at least 8V. Add a large (2200uF or more say) decoupling capacitor between Vin and ground and the Arduino won't notice short term drop-outs of supply and is immune to inductive spikes.