How to get Arduino Mini Pro 3.3 V consume a few amps on sleep mode?

Hi every one,

Before posting this new topic, I read alot and disabled the 2 LEDs and regulator on sparkfun arduino mini pro 3.3V board. However, I could not get the arduino board sleeps at a few micro amps as people claimed. Right now, it’s sleeping at 220 micro amp. My goal is to get to about 10 or 30 micro amps or so.

Could anyone please give me a hint to get there? Below is the description that I did.

Thanks alot
A.H.

Modified hardware:

arduino modified.jpg

Programming:

// **** INCLUDES *****
#include "LowPower.h"

void setup()
{
    // No setup is required for this library
}

void loop() 
{
    // Enter power down state for 8 s with ADC and BOD module disabled
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);  
    
    // Do something here
    // Example: Read sensor, data logging, data transmission.
}

I'd read about power saving at Nick Gammons page. Here you'll find everything you need :slight_smile:

Hi Hansibull,

Thanks for the reply. I read that page as well. It's not for arduino and I'm not familiar with that technique.

A.H.

What, if anything, is it connected to?

Did you remove the regulator? You say you "disabled" it, but I don't know what that means.

Is it really disabling the ADC? I see you're telling the library to do it - but that's about exactly what you'd expect if everything else was successfully turned off but the ADC wasn't.

Try ADCSRA &=127; before sleeping ADCSRA |=128; after leaving sleep, to make sure it's actually getting turned off.

Thanks DrAzzy for the reply.

It connects to a relay to control a light bulb. The signal was cut off during sleep. I made sure that there was no other components eating up power while sleep.

I cut the trace line to the regulator but did not completely remove it.
Image:

I’m not sure if the ADC was disabled. It should be for both ADC and BOD. However, I just use a single line for the code such as:
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

ADCSRA &=127;
ADCSRA |=128;
Can you explain what do they mean? It’s above my head.

Thanks
A.H.

arduno_dude:
Thanks DrAzzy for the reply.

It connects to a relay to control a light bulb. The signal was cut off during sleep. I made sure that there was no other components eating up power while sleep.

I cut the trace line to the regulator but did not completely remove it.
Image:

I'm not sure if the ADC was disabled. It should be for both ADC and BOD. However, I just use a single line for the code such as:
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

ADCSRA &=127;
ADCSRA |=128;
Can you explain what do they mean? It's above my head.

Thanks
A.H.

I would measure it with nothing at all connected, first. Including any sort of serial adapter.

ADCSRA is the ADC Status and control Register A.

The high bit of that controls whether the ADC is enabled

ADCSRA&=127 is bitwise-and-equals, ie, it reads ADCSRA, bitwise and's it with 127 (ie, 0111111), and writes it back to the register. Thus, it unsets the high bit to turn off the ADC, but doesn't change anything else.

ADCSRA|=128 is bitwise-or-equals, ie, it reads ADCSRA, bitwise-or's it with 128 (ie, 1000000), and writes it back. Thus, it sets the high bit to 1 (turning on the ADC) without changing the other bits.

DrAzzy,

Thanks for an explanation in detail. I included those lines before and after the line:
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

Then measured the arduino board only (with no other attachment). It still says 220 micro amps. There is no different.

Is there anything else that I could try? hardware OR software ?

Thanks
A.H.

arduno_dude:
Hi Hansibull,

Thanks for the reply. I read that page as well. It's not for arduino and I'm not familiar with that technique.

A.H.

As far as I know, there doesn't exist any arduino code that let you significantly reduce the power consumption. As you can see in Nick Gammons page, he is using the AVR sleep library instead. All the code on the site will run on an Arduino pro mini, but the code manipulates the internal registers directly. If you want to understand what all those weird acronyms means I suggest you find the Atmega328p datasheet and search around. You will find all the necessary information there :slight_smile: you can run AVR code in your Arduino sketch with no errors. Arduino code is basically AVR code wrapped in a user friendly package.