How to configure for low power?

Questions about the Really Bare Bones Board
Post Reply
nparlante
Posts: 4
Joined: Tue Jul 20, 2010 12:10 pm

How to configure for low power?

Post by nparlante » Tue Jul 20, 2010 12:16 pm

I used a RBBB to build the world's greatest geocache:
http://www.geocaching.com/seek/cache_de ... 836cc72241

But the battery life is killing me!

I'd love to know what the easiest steps are to configure a RBBB for low power use, but still using the arduino software stack. Not super-crazy lower power use, just the easiest steps vs the default. I expect it's something like..

-omit the clock, use the internal one. Or perhaps use an even slower external clock.
-maybe turn off timers or comparators that I know I'm not using
-Maybe I could run at a lower voltage, but keeping the 5v i/o is pretty handy, so I'm more interested in the clock

this seems like a good fit for the RBBB, where on the factory arduino cutting out the clock looks hard.

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: How to configure for low power?

Post by paul » Tue Jul 20, 2010 12:24 pm

Search site:jeelabs.org low power
on Google

one potential problem is that Jean-Claude Wippler is a real coder and his code can be hard to read, but the tricks are there.

Search - Arduino sleep on the Arduino playground too.

Hope that helps,

Paul

nparlante
Posts: 4
Joined: Tue Jul 20, 2010 12:10 pm

Re: How to configure for low power?

Post by nparlante » Tue Jul 20, 2010 11:12 pm

The jeelabs stuff is cool, however his techniques are really focused on a device that effectively sleeps doing nothing 99% of the time. The other common case is a device that does something all the time, and you want it to use less power, and in particular I've read that changing the clock down can work well for that case.

So the question is: how do you get an rbbb to use the internal clock instead of external. Seems like you just snip a couple wires and write a couple magic bytes, but I have zero experience in this area. Here's what I can find with some google searching:

At this page
http://www.edwindertien.nl/interactivos ... tivos.html

it has the following which seems quite promising, although it's for another chip:
Underclocking Arduino's for less power consumption
At the FuseBits section of the programmer tool, the frequency of the controller was changed from 16MHz external to 8MHz internal RC oscillator. The freshly compiled bootloaders can be loaded after that. For the Arduino programming software itself the file board.txt (in the dir 'hardware') needs to be altered for use of a different CPU frequency. -> atmega168.build.f_cpu=8000000L . The effect of this under-clocking operation is a reduction in current of 1/3. (so 27mA at 12V instead of 37mA at 12V)
On the arduino site, it talks about burning a bootloader using an USBtinyISP -- I'm hoping my moderndevice Usb is an isp, although its docs do not use that term.
http://arduino.cc/en/Hacking/Bootloader ... Bootloader


So I think this is the right outline, but I'd love to get pointers from someone who knows.

-how do the constants change for the different chips? I assume it's just a question of finding and editing the right base file for your chip
-can the moderndevice usb bub do this?
-how could you clock even lower .. is there some divider you can use on the internal clock? or could you hook up a 1mhz external clock?

Any pointers much appreciated!

Nick

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: How to configure for low power?

Post by paul » Wed Jul 21, 2010 11:48 am

You need to set the fuse bits when the bootloader is burned. You could just burn the Lilypad option onto the chip, which runs at 8 Mhz.
You can do this with another RBBB - read about how to program one arduino with another - you just need to hookup three wires I think, then download the burner sketch to the first RBBB.

This would probably be your least painful way to go, financially. The least painful way technically might be to get an AVRmkII (about $40 at digikey) and use AVRstudio on a Windows box. - That's what I use to burn bootloaders. The nice thing about AVRstudio is that is shows you a lot of the options you are selecting in the fuses, instead of just a lot of trial and error.

Jean Claude also has his flash burner - which I have boards for, but have not populated them. This is going to be some research. You're going to get into research any way you do this though.

My advice is to keep googling around for a bit before you start buying hardware. Others have done this.

Paul

nparlante
Posts: 4
Joined: Tue Jul 20, 2010 12:10 pm

Re: How to configure for low power?

Post by nparlante » Wed Jul 21, 2010 10:32 pm

Thanks Paul -- so the key thing I see here is: can I burn the bootloader using the usb-bub or whatever other usb-arduino cable I have, and the answer is no.

Here's a link for the arduino-to-arduino bootloader technique .. haven't tried, it but it does not look hard at all:

http://www.benjohansen.com/archives/755

the suggestion to just use the lilly-pad bootloader has an excellent no-brainer easyness to it.

Cheers,

Nick

nparlante
Posts: 4
Joined: Tue Jul 20, 2010 12:10 pm

Re: How to configure for low power?

Post by nparlante » Wed Jul 21, 2010 10:50 pm

Also this link looks interesting:

http://www.arduino.cc/cgi-bin/yabb2/YaB ... 1163418637

talking about CLKPR, which seems like an easy second thing you want to do, once you're running the 8mhz internal clock. IT also appears to have the nice quality that you can change it dynamically depending on what you're doing.
The ATmega48P/88P/168P/328P has a system clock prescaler, and the system clock can be divided by setting the ”CLKPR – Clock Prescale Register” on page 377. This feature can be used to decrease the system clock frequency and the power consumption when the requirement for processing power is low. This can be used with all clock source options, and it will affect the clock frequency of the CPU and all synchronous peripherals.
seems like it might send serial communications to hell though.

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: How to configure for low power?

Post by paul » Wed Jul 21, 2010 11:06 pm

Serial communication may be a weak spot in your code. There's bound to be some things in the Arduino playground by people who have done this. I think you can make serial work - but the advertised baud rates may end up being way off.

I'd try and go way slower than 8Mhz if you're serious about low power (and you also don't need the speed for anything)

Another place to look is AVRfreaks.

Paul

tim_ui
Posts: 1
Joined: Thu May 01, 2014 3:12 pm

Re: How to configure for low power?

Post by tim_ui » Thu May 01, 2014 3:23 pm

He there...I am using an RBBB Pro for datalogging. I have seen the JeeLib stuff and am trying to avoid using an external clock. Just by using sleepy time and an Adafruit Micro SD board, I have reduced the draw to 2 mA during sleep mode. I notice that the on board LED is always on. Can I turn this off, and if so will it make much difference? Just getting to to 1 mA would help a lot.

Thanks.

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: How to configure for low power?

Post by paul » Tue May 13, 2014 12:03 pm

Definitely turn the pilot light off by disconnecting it. It doesn't do anything useful except tell you that the board is on . If you want a low power pilot light you could blink a pilot light for a few ms (as short a flash as you can see 5-10ms? ) in synch with your sleep routine - twice a second or whatever you sleep interval is. That should get your pilot light power budget down under a microamp average.

If you're not adverse modding some board traces you could cut the trace to the pilot light resistor and run a wire over from a pin, and then blink the pin in software as described above.

Lawexpert100
Posts: 1
Joined: Mon Feb 01, 2016 6:01 pm

Re: How to configure for low power?

Post by Lawexpert100 » Mon Feb 01, 2016 6:33 pm

Hello look at this employment lawyer.

Post Reply