Hi, would like some help in general as to how to calculate how much power a device will use. I do appreciate it all depends on what you're using, but I would like some guidance on how to try and calculate battery life of a device.
As an example, I have the following running:
Arduino Uno with a remote controller connected to it in pins 6 and 7.
-- The Arduino is connected to the remote controller via a 1k resistor. The pins are only used to send high or low to the remote controller as to simulate button pushes on the RC. I do that via a BC548 transistor.
-- The RC is powered by a 12v battery (its own battery)
The idea, is that the Arduino receives commands from an external device via bluetooth, and the "presses" the buttons on the remote controller.
I've got this all rigged and running. I'm right now running that via USB cable, but will want to leave it running on its own. I was thinking about powering this via a 9v battery, but wanted some advice as to how to calculate how long the battery will last.
I'd be ok powering it on the wall plug, but would much rather keep it powered via a battery as it gives me more control, and lets me have my gizmo anywhere I want.
I'd say that first you need to measure the current draw: put your ammeter in series with the whole thing and its power supply.
Then look at various batteries' mAh ratings: divide that by your current draw in mA, and you'll get the number of hours it should run. As always, ymmv.
If by 9V battery you mean one of those PP3 sized ones, forget it, it can barely power
a lone Arduino and has very low capacity.
Starting point would be rechargable NiMH pack of AA's (6 will generate about 7.5V
and they are usually about 2Ah (ampere-hours). Yes, you need to measure the current,
and calculate the battery life from the capacity.
For more battery efficiency you can use a battery pack that produces about 5V (4 NiMH do
this, but 4 alkaline will be too high a voltage). You feed this to 5V pin rather than Vin,
and you lose the voltage regulation (you are responsible for not overloading the
chip, 5.5V is the limit).
You can use a DC-DC converter to allow a wider range of batteries (a suitable boost
converter allows a 3.7V lithium cell to generate 5V, a buck-converter would allow that
12V battery to efficiently power the Arduino. In fact a car USB charger would be ideal
for that.
if you don't have a multi meter to measure the current,
have a go with a 9v battery, see how long it lasts.
generally,
with a standard UNO, a 9v battery is not going to last long,
your probably going to want to look at things like the tiny, and look at how to program for low power, sleep states et all.
qed: not easy , if you have to ask how to do it, dont try unless you want to learn.
just go with a PSU if you can.
and out of interest, the rugged UNO has a DCDC power supply.
While you are at it: consider perhaps using a 38kHz IR-Receiver, an IR LED and the IRemote lib. Then you can easily learn most codes (I had some problems with these cheap, flat China remotes e.g. for LED strips) and transmit them yourself using the led.
That will not solve your power issues, but if you want it portable, perhaps you don't want to carry a wired remote with you. Also, it enables you to control multiple devices.