Small dogs are great, especially if they are trained (or it comes natural) to always alert anytime anybody approaches the house from any direction. Their hearing can be many times better than yours, giving you time to react and get armed.
I was thinking about (1) those things you walk by and they start singing, such as a plastic garden frog, and (2) those motion-activated recorders that play witchy sounds, used on Halloween.
Seems like both of those types of gadgets could be adapted to play a loud, large dog bark and growl upon motion activation.