Is it possible to wake Arduino from sleep using a sensor?

Hi all, I have recently been looking into sleep mode for a project that will be battery operated 8 hours a day. It is a simple project using an Arduino nano and two HC-SR04 ultrasonic sensors. If you hold your hand under one sensor it increments a counter, if you hold it in front of the other it decrements the counter. Through most of the day, no one will be using it, but when someone does it needs to be ready.

I would like to put the Arduino into sleep mode after a short while of no presence detected, but is it possible to still read input from the ultrasonic sensors while in sleep mode? Once someone comes along and waves their hand under a sensor I would like to have it wake up and count.

Currently, I have figured out how to activate sleep more, how to start it after X amount of time since the last person waved their hand in front of it, and I have it exit sleep mode by clicking a button connected to Interrupt 1 (pin 2). However the goal here is to be hands-free no contact, so I need to replace the button with input from the ultrasonic sensor or another sensor, like an IR or something.

Why can the Arduino read signals from the button while in sleep mode to wake up, but not the sensor? Both connected to interrupt pins.

I think you will see better battery life by switching to a 5V Promini and power it via the VCC pins from 3AA batteries.
If you add a P Channel MOSFET transistor you could also power down the HC-SR04
and do something like wake up every couple of seconds, do a scan, go back to sleep.

You'll have to check if your HC-SR04 is 4.5V tolerant or not. Some may require 3.3V,
in which case an 8 MHz 3.3V Promini running on just two batteries may be a better solution.

jamminhyaku:
Why can the Arduino read signals from the button while in sleep mode to wake up, but not the (HC-SR04) sensor? Both connected to interrupt pins.

I'm guessing you mean the 'echo' pin of the HC-SR04 is connected to in interrupt pin. The 'echo' pin doesn't do anything until the 'trigger' pin is pulsed so it can't cause an interrupt by itself.
The HC-SR04 uses less than 20 mA so it can be powered from an Arduino UNO output pin. You can use the Watchdog timer to periodically wake up the Arduino, turn on the HC-SR04, send a trigger pulse, wait for an echo pulse (with a short timeout), turn the HC-SR04 off and process the echo distance.