0
\$\begingroup\$

I am using a raspberry pi 3 as part of a system that takes time-lapse photos. I have a camera, router and the pi plugged into a 12v battery, attached to a charge controller and a solar panel. With a bit of trail and error, it works. But I need to make the whole thing more portable and run more efficiently.

I need to know exactly how much power the whole thing needs and work out energy saving things I can do to the pi and program it uses.

I have never tested the energy usage before and looked online but get confused with all the calculations and testing methods, as there are so many. Please could someone explain, in basic terms how to work out what energy it all needs and uses and how long it should work without charging it via the panel (just thinking about smaller battery, less voltage).

Thanks

\$\endgroup\$
  • 2
    \$\begingroup\$ You need to find out how much energy it is consuming per day. Power is instaneous and measured in watts (W.) Energy is over a period of time, and would be measured in watt hours (Wh.) \$\endgroup\$ – JRE Nov 16 '17 at 11:05
  • \$\begingroup\$ It's a RPi, so "too much". You are using lots of power to generate a video signal that no one looks at, and the CPU is also vastly overpowered for your application. \$\endgroup\$ – Simon Richter Nov 16 '17 at 14:40
  • 1
    \$\begingroup\$ The RPi does not have a sleep mode, so you can't even save power there. So I have to agree with the "too much" for your application. \$\endgroup\$ – StainlessSteelRat Nov 16 '17 at 14:55
3
\$\begingroup\$

Inline power meters for DC systems are available from many sources. The better ones can measure cumulative power in mAH or mWH. Just insert between the charge controller and the loads.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ This will work IF the current is always in the range this device can detect. If the RPi goes into sleep mode it might consume so litlle current (less than 100 uA for example) that this device cannot measure it so it assumes it is zero. Over a long period of time that small current can still add up to be a significant contribution. \$\endgroup\$ – Bimpelrekkie Nov 16 '17 at 13:41
  • 1
    \$\begingroup\$ The latter does not happen with the Raspi. It always consumes a few hundred mA because of the GPU. \$\endgroup\$ – Janka Nov 16 '17 at 14:17
  • \$\begingroup\$ You could also use one of the better engineered USB power monitors on the RPI, although I suspect the router will also be consuming enough power to get you above the measurement floor. A measurement power supply like an HP 66312A (reasonably cheap used) or HP 66332 (better and cheaper used) is a very accurate tool for these kinds of measurements and a good investment if you are going to be doing ongoing projects. If cost is not an issue, get a Keithley sourcemeter. \$\endgroup\$ – Dean Franks Nov 16 '17 at 16:51
1
\$\begingroup\$

Have you seen this video from Dave from the EEVBlog: https://www.youtube.com/watch?v=Dh0xYu8YvaE&t=642s ? It explains the basics and how to measure current consumption on a board with a microcontroller. You can use the same approach for an RPi.

Note how Dave uses the integration function of an oscilloscope to accurately measure the power usage when the device is active (in your case that would be: when taking a photo).

To determine battery life Duty-cycle is a very important factor. To illustrate look at this example:

Let's say that your device uses 0.2 A (average current, you might have to use Dave's method to determine this accurately) when it is active.

When it is inactive (in sleep mode) it uses 100 uA

When the device is active (needs to take a photo) it is active for 3 seconds.

A photo needs to be taken every 5 minutes.

Now we know enough to calculate the average current consumption:

Per hour the device will be active 1 hour/5 minutes = 12 times That times 3 seconds per photo = 36 seconds per hour in active more at 0.2 A

That's a 36 seconds / 3600 seconds (on hour) = 1 % Duty cycle.

So that's an average current of 1% * 0.2 A = 2 mA Add to that the constant 100 uA of the sleep mode gives: 2.1 mA average current.

So on a 1000 mAh battery your device would then last: 1000 mAh / 2.1 mA = 476 hours which is equal to about 20 days.

Now look at the numbers and think what happens if you would:

take more photos, every 2.5 minutes instead of every 5 minutes: the battery life would practically be halved

the sleep mode current would double: not much would change.

This is just an example so depending on your actual numbers the situation might be different but I hope it is clear now how to do the estimation.

\$\endgroup\$
  • \$\begingroup\$ This would be more applicable to a well engineered solution; the pi in question here can't go into low power sleep, though it's possible some peripherals may at times increase power substantially above the baseline, and that would indeed need to be handled in the way proposed here. \$\endgroup\$ – Chris Stratton Nov 16 '17 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.