Save energy by sleeping

I'm trying to run arduino from 9v battery for as long as possible.
The arduino get's his input from IR sensor. He will get input once every few hours.

I want it to sleep till he get's an input from the IR sensor, and then wake up and do something according to the input, and then go to sleep again.

Is it possible ? I know i can send it to sleep, but how can he "listen" to the IR sensor while he is sleeping ?

The arduino get's his input from IR sensor. He will get input once every few hours.

Does it need to be awake to receive data? Or will some other trigger wake it first?

Is it possible ?

The IR receiver will not wake the Arduino. It must be awake to read IR data.

I'm trying to run arduino from 9v battery for as long as possible.

consider how much battery capacity you're wasting in the regulator.

Have a look at Nick Gammon’s low power tutorial

…R

Hi,

I'm planing on doing the needed hardware changes, but currently let's assume that i'm working with a simple arduino pro mini.

I want it to wake up from the IR, nothing else will wake it up.

Is this just a raw IR pulse, or an encoded signal from something like an IR remote?

I want it to wake up from the IR, nothing else will wake it up.

The IR needs to produce a pulse, which can wake the Arduino. The IR detector must be powered for this to work.

The IRRemote library, as written, does not have the inherent ability to wake up an Arduino from sleep. I would try combining it with a pin change interrupt library.

Immediately before going to sleep, enable the pin change interrupt on the receiver pin. The only thing the ISR for the interrupt needs to do is turn off the PC interrupt. Then you wait until you received the whole code, decode it, then go back to sleep.

Pin change interrupts can wake up the processor from even the deepest sleep mode.