Since the Nano, et al will be active only in short bursts, the inefficiency of a Linear Regulator is minor as a result.
But, lets do some math:
The product datasheet for an EverReady 9V 522 [Energizer MAX] battery [http://data.energizer.com/pdfs/522.pdf] indicates that, at 10mA continuous draw [the lowest current case offered], the battery has a capacity nearing 600mAh
A tabulation of Current:
- PIR 50uA
- LDO -- the MCP1702 has a quiescent current of 5uA
- Nano [sleeping] -- unknown -- but, an Atmega328P in Power-Down sleep mode with the Watchdog Timer running draws an impressive 6uA! But, because of other components on the board, a more realistic number might be: 60uA.
- LED -- zero, because it is only lit when the Nano wakes up
- Buzzer -- zero, for the same reason as the LED
So, that's a total of 50 + 5 + 60 = 115uA
So, the battery should [theoretically] supply from 9V, to 4.5V, for this long: 590mAh/115uA = 5130 hours, which is 5130/24 = 214 days. Or, a little more than a half a year. That time period will of course be reduced by the thing waking up and flashing that LED and running that buzzer. But, hard to do any math, there, because of missing information, like amount of current drawn by the buzzer, and the LED, duration of LED flash, and buzzer sounding, expected amount of foot traffic, etc.. Also, as the 9V battery runs down, it's internal resistance will increase, and assuming a 9V battery is capable of supplying enough current to run everything, that might change as the battery drains, so length of service might be shorter because of this.
Here's some math using an EverReady AA E91 [Energizer MAX] battery [http://data.energizer.com/pdfs/e91.pdf]:
The AA case is a little harder to determine, since the capacity is specified to a discharge voltage of 0.8V, which would place a 4 cell battery voltage at: 3.2V. So, targeting a 4.5V minimum battery voltage, and estimating the capacity by looking the other graphs, I come up with a capacity of: 2200mAh.
So: 2200mAh/115uA = 19130 hours or 797 days or roughly 2.2 years.
Again, pulsing the LED and Buzzer will reduce that, but there's a LOT more leeway! But, AA's have a lot more current delivering capability, so greater chance of being capable of running that buzzer.
So, I would go with the AA batteries.
BTW: If you went with 6 AA batteries, that would be 0.8V * 6 = 4.8V as the minimum battery voltage as specified by the datasheet, so you would get the full 3000mAh, for a maximum operating period of: 3 years [less energy needed to flash & buzz].
Also, keep in mind, there are a few assumptions made here, so these numbers are, probably, only ballpark.
Also, I'm realizing now, that I forgot to factor in the LDO dropout voltage, which for the MCP1702 is anywhere from 50mV [or less] for currents at or below 50mA TO as much a 650mV for currents on the order of 250mA. But, a strategically sized capacitor at the output of the Regulator would take care of any Dropout problem, since this regulator goes to 0 dropout, at 0 current, so it's capable of charging a capacitor to the full regulator output voltage, even if the input voltage is the same. Of course, if that Buzzer is a current hog, that capacitor may need to be rather large to achieve this, and there's the issue of recovery time...so...