Depends on how wide an area it might be.
The 2 mega pixel models should be ok. 2230 is indoor.
There's an outdoor version of it.
You can always set up an nice ir illuminator to light up the backyard. Oh yeah those can get hot so be careful mounting as your barn could burn down.
There's also a 3716 model but that's kind of pricey.