Invoke Sleep mode for current draw

Hi,
I have an arduino pro mini consuming 12ma constant if on and about 30ma with the addition of the NRF24L01.

once the circuit is initiated the consumption goes to about 50-60ma..(leds comes on and off)

I am looking for a way to drop this software wise for remote battery life most importantly .
and whats the smallest battery I could use, recheargeable to last about 5-6 hours of intermittent use.

this is used to turn leds on for turn signal so it is used not very very often.

TIA,

See Nick Gammon's power saving page.

Pauly:
See Nick Gammon's power saving page.
Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors

I checked it out , very interesting but some commands like "avrdude -c usbtiny -p m328p -U lfuse:w:0xFF:m -B250" can they be run for the arduino ?

another question:

using a 3.7V 1250 ma battery and consuming 120ma constant , am I right to assume that it will last me powered on for ~10.41 hours ?

what about the battery voltage? for sure the voltage 3.7 will deplete to about what?
is there a graph or calculation map this ?

to keep a 10 hour use what battery do I need in terms to keep voltage enough to power board and deliver current .

am I right to assume that it will last me powered on for ~10.41 hours ?

Unlikely. You should divide manufacturer's battery capacity claims by a factor of 2 to be safe.

The battery life can be anything you want it to be. It depends almost entirely on how often and long your processor is awake, and for how often/long you are transmitting data. Make that intermittent, and a battery could last for years.

For a solar powered Arduino/NRF24 project see this page.

jremington:
Unlikely. You should divide manufacturer's battery capacity claims by a factor of 2 to be safe.

The battery life can be anything you want it to be. It depends almost entirely on how often and long your processor is awake, and for how often/long you are transmitting data. Make that intermittent, and a battery could last for years.

For a solar powered Arduino/NRF24 project see this page.

so what you are saying is if I need a 700mah for my circuit I should go for a 1500 or 2000 to last within calculation timeframe?

void ReceiveLoop()
{
  //delay(5);
  if (radio.available())
  {
    radio.powerUp();
    while (radio.available())
    {
      radio.read( &inputs, sizeof(inputs) );
      Serial.println ("available");
    }
  }
  else
  {
    Serial.println("No radio available");
    radio.powerDown();
  }
}

so I tried this for test to put the nrf24 to sleep - but I noticed if I don't put a min delay of 5 it always goes to the else part
the other thing is I am not able to powerup again or sense that the TX unit is plugged again.

please help thanks

I wonder why the delay should help.

You check radio.available() and then you call radio.powerUp().

Do you expect to receive in powerDown mode?

Whandall:
I wonder why the delay should help.

You check radio.available() and then you call radio.powerUp().

Do you expect to receive in powerDown mode?

when you reset the TX arduino it takes x ms to trigger the radio module so it makes sense that it sees it not available very fast and jumps to execute the ELSE that part until further notice ,

what I want is when I reset the tx side and air data connection is available to know to power back the rx somehow ..this is my issue.

You have to power up the chip to receive anything.
The code (and your explanation) are pretty senseles.

Somewhere in your code the chip is powered up,
or you would never enter the if part.
Then it's pretty strange to power it up again.

Reading all available messages into the same buffer
will lead to interesting/unexpected behaviour.

But hey, you do not have to believe me.

Whandall:
You have to power up the chip to receive anything.
The code (and your explanation) are pretty senseles.

Somewhere in your code the chip is powered up,
or you would never enter the if part.
Then it's pretty strange to power it up again.

Reading all available messages into the same buffer
will lead to interesting/unexpected behaviour.

But hey, you do not have to believe me.

actually the only way to powerup is by resetting the nrf chip - can it be done by code to reset power to it ?
just like pressing the reset on the arduino board ?

You might want to spend some time with the NRF24L01 documentation.

destiny2008:
actually the only way to powerup is by resetting the nrf chip

Rubbish.

What do you think that the functions radio.powerUp() radio.powerDown() do?

I press the reset button on my Arduinos very rarely,
mostly to restart a 'run once' testscript.

Without using sleep I would not powerDown my NRF at all,
and even then, I would prefer to be woken up by a packet reception,
so it would not make sense to shut the receiver down.

The NRFs need quite some time from power up to standby, so I try to avoid that.

jremington:
You might want to spend some time with the NRF24L01 documentation.

I need to power down to get the 14ma to save battery.

So power it down, where is the problem?

radio.powerDown();

Whandall:
So power it down, where is the problem?

radio.powerDown();

powerdown works , but how to get it up ?
powerup not triggering it that is the issue.

So power it up. Again, where is the problem?

 radio.powerUp();

You have to call it, radio.powerUp() will never 'trigger'.

Read and try to understand the datasheet.

Whandall:
So power it up. Again, where is the problem?

 radio.powerUp();

You have to call it, radio.powerUp() will never 'trigger'.

Read and try to understand the datasheet.

void ReceiveLoop()
{
  //radio.startListening();
  delay(5);
  if (radio.available())
  {
    while (radio.available())
    {
      radio.read( &inputs, sizeof(inputs) );
      radio.powerUp();
      Serial.println ("available");
    }
  }
  else
  {
    Serial.println("No radio available");
    radio.powerDown();

  }
}

precisely what I am doing an d not working!

There is a difference between

  • precisely what I am trying to do
  • precisely what I am doing.
    And, as you already noticed, the difference is functioning.

Without understanding the principle of operation (of the NRF and the library) your task will fail.

So study both.

And please don't always quote the full previous message.

Perhaps this comment is hopeless, but I'll try anyway.

This bit of code attempts to read the radio, THEN turns on the radio power:

     radio.read( &inputs, sizeof(inputs) );
      radio.powerUp();

But you don't see a problem.