How to calculate what type of batteries to use and how many? (Please help)

Hello i currently have an arduino project that im not sure if im powering it properly and want to know how. Im new to the arduino eletronically wise and id appreciate any help.

I currently have an: Arduino mega, attached to speeed seed motor shield http://www.seeedstudio.com/wiki/Motor_Shield_V2.0 with 4 DC motors, 2 mini servos that dont work full time, an ultraSonic sensor that doesnt work full time either, and a pixy cam connected to the ISCP that draws 5V http://cmucam.org/projects/cmucam5/wiki/Powering_Pixy

I understand its a quite full project and would really appreciate any help.

Thanks, Andrew

AndrewKaram: 2 mini servos that dont work full time, an ultraSonic sensor that doesnt work full time either,

Well, there's the problem.... A vital part of the exercise is time, and you can't get much help with non-information like that.

There are two types of time yo need to consider. 1. Duty cycle. The ultrasonic may be something you can skip but the servo is probably a major player. You may also induce sleep periods for whole project. 2. Battery cycle. How long do you want it to run, hours? months?

The next part of the exercise is current draw.

and a pixy cam connected to the ISCP that draws 5V

No it doesn't, it runs on 5v, like most of your other gear, and draws an amount of current that is (currently) a secret.

I used a combination of 1 or 2 9v batteries as well as 8 double A batteries. They are high-speed low torque motors 200mA, 165 RPM. I know its a lot to power looking for the most convenient way.

A consistent power total of an hour max, it will be on and off throughout the hour though.

AndrewKaram:
1 or 2 9v

If they are PP3s you should put them back in the smoke detectors where they belong. They are the kiss of death for practically anything to do with Arduino. Batteries are required to deliver power, PP3s don’t have any.

AndrewKaram:
A consistent power total of an hour max,

So you are not particularly demanding, but you may not be utilising things wisely. If the 8xAA are in series for 9.6v and feeding through the power jack, you waste a lot of power heating up the regulators, and I suspect a decent external 5v regulator is a prerequisite for any battery operation. If you do that, you may find that 8xanydecent NiMHs will suffice. Another option might be just a pair of 18650s which have plenty of grunt.

Okay how did you calculate that? Im a bit confused on how powering something works like if you add up all the volts required for each them it is well over 20 with motors, the camera, servos and the sensor and 8 rechargeable batteries are only like 12v. How would that work? There is also amps that throws me off.

AndrewKaram: Okay how did you calculate that?

I didn't. I also couldn't because the only information given is that the demand is probably not that great and for only about an hour, and you have used some small cells without complaining that they didn't work. I still have no idea how the cells are arranged, or what on earth the 9v batteries do, or are supposed to do. The only thing you have been remotely specific about is the motors, which draw 200mA. They are probably not very powerful but, at 165 rpm, I imagine they have a lot of torque. I know you have four, I will assume they run continuously. They therefore draw 800 mA. In the absence of better information, I'm guessing the camera needs another 200mA and also runs continuously. That is a total of 1000mA, and thus 1000mAh if you do it for an hour..

A decent AA NiMH like Eneloop is good for 2000mAh and a typical 18650 LiIon is good for 4000mAh, which means the former (in theory) should deliver 2000mAh and the latter 4000mA for an hour.

In the face of the above, I guess the sensor can be neglected.

Similarly, whatever the servos take momentarily, I assume it is a lot less than what the motors take continuously and, if they need 1000mA momentarily, the batteries will stand the strain. Guess 200mAh.

So, with the AAs, that leaves 800 mAh @ 9.6v to drive the Mega, any peripherals you haven't mentioned, slack-arsed charging by you, and lies about the real capacity by the manufacturer. I don't think it sounds unreasonable but you I submit that you should get a decent 5v regulator, perhaps more than one.

if you add up all the volts required for each them it is well over 20 with motors,

You don't add volts, you add current. You only need to provide the recommended voltage, and hopefully it is the same for all devices, but if you draw too much current, the voltage will fall.

There is also amps that throws me off.

Evidently. See above.

That should give you something to work on.