2
\$\begingroup\$

I am currently developing my own homebrew GameBoy game and I would like to try some tricks to reduce power consumption (for the sake of learning).

The GameBoy has a HALT instruction that will stop the system's clock until some interrupt is fired. I would like to use it as much as possible but I need a way to verify that it does indeed reduce power consumption. I am quite a beginner in electronics so I'm not sure how to go about it.

My first idea was to use a multimeter between the AA battery and the GameBoy battery pins but I think it will not be helpful as the value displayed would vary a lot and will be unreadable (it is not an average value).

What I really need is a way to compute the average power consumption for a given time duration. Is there any cheap way to do this ?

Also can I assume that voltage will be constant and that measuring average current is enough to computer power?

\$\endgroup\$
  • \$\begingroup\$ If you wanted a way to just check it improved things rather than an absolute / accurate measurement you could try powering it from a capacitor and see how long it lasts. A 1F supercap would probably keep it running long enough for those sorts of tests, or 10F etc are pretty affordable now too. \$\endgroup\$ – PeterJ Apr 4 '15 at 10:57
  • 1
    \$\begingroup\$ Would it be possible to just use an oscilloscope ? \$\endgroup\$ – anotherCode245 Apr 4 '15 at 13:20
  • \$\begingroup\$ A college electronics lab would have a scope you can use \$\endgroup\$ – Passerby Apr 4 '15 at 14:38
  • \$\begingroup\$ Why do you think multimeters aren't able to display the average value? \$\endgroup\$ – Dmitry Grigoryev Oct 18 '15 at 7:10
2
\$\begingroup\$

I had the same problem, with a battery powered Arduino circuit. It would wake up for a millisecond, every second, to check for input and then sleep. I wanted it to last a long time on a battery. With only a multimeter, how do you measure the power consumption?

I got good accurate results by powering the circuit from a large capacitor (to ground), and a carefully chosen resistor (in series with the power supply. This "smoothes out" the current consumption, making it possible to measure with a multimeter.

schematic

simulate this circuit – Schematic created using CircuitLab

R1 is chosen to have a reasonable voltage drop at the average current. C1 is chosen to keep the time constant of the RC a few seconds or longer, so you can read the multimeter.

For example, if you expect your processor to use 100 mA, 5% of the time, the average current is 5 mA. A 220 Ohm resistor will drop about 1 V at 5 mA, which should be ok. (if it's battery powered, that's just the differ between full and empty batteries).
Now choose a capacitor such that R*C > 10 s, so the variation in 1 second will be under 10% . In this example you'll need about 47 000 uF. This size is not difficult to find; get some bigger ones while you're shopping.

Things to watch out for:

  • when the processor is in full-speed mode for more than a short time, it will quickly drain the capacitor, and the 220 Ohm resistor won't be enough to supply the current. To stop this from resetting your circuit, keep the resistor short-circuited with a jumper or Croc-lead, until your circuit has booted up and is in power-save mode.
  • the current reading will change slowly, so you need to wait a while for it to settle.
  • voltage variations from the power supply side will cause current variations too, so rather use a regulated supply than a battery.
  • you must pre-charge the capacitor before connecting your circuit, otherwise the slow rise in voltage could cause it not to start up properly
  • all of the above ideas depend on your circuit having some sort of voltage regulator in it, so it can accept variable voltage and still work well. If it's strictly 5 V in, then you might need to add your own regulator, and supply it with 9 V from the RC arrangement. The current reading will still be accurate (if it's a linear regulator).
  • capacitor leakage, and other leaks like a voltmeter, if you are using the above circuit to measure microAmps. Test with and without the circuit in question
\$\endgroup\$
  • \$\begingroup\$ Why do we need a resistor ? (Sorry if it is a dumb question) \$\endgroup\$ – anotherCode245 Apr 4 '15 at 13:21
  • \$\begingroup\$ To slow things down, to filter the fast-changing current into something slow. Imagine a strong bench power supply with small internal resistance the capacitor will make no difference to it, as your circuit draws current, the supply will provide it. It's only by making the supply a bit soft, that the pulsed current becomes fairly smooth. \$\endgroup\$ – tomnexus Apr 4 '15 at 13:57

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.