I wouldn't set up any "booby traps" that will inflict harm. If someone gets hurt you can actually get in more trouble for that than growing especially if its a law enforcement official. Booby traps are premeditated aggravated assault and a judge will not like that. Stick with a camera and confront the rippers if possible.
^This is correct, although you could probably get away with it in
some states if it weren't for the fact that you were protecting illegal plants as opposed to people/legitimate personal property (and pending the circumstances). If law enforcement went to eradicate the contraband and stumbled upon your traps, you'd be in some shit.
The absolute furthest I would go in terms of traps, would be something like a simple trip wire coupled with motion sensing devices rigged to a light/sound emitter (or camera if you can afford it). If it is your own backyard that you're growing in, motion lights are good to have around; positioned so that they don't shine light directly on or near your plants. You want the lights to face a window in a common room so you would be aware that they are on.
If you go for an audible alarm, you really don't want something very loud that is going to draw attention to the residence. You want it rigged such that it would spook what/whoever is in the yard or else sound indoors where only you can hear it.
The best bet is preventing people from entering your yard in the first place. Fences are a good idea and come in many shapes, sizes and styles, but they are not practical for everybody.
No Trespass signs are important for various reasons; they affirm and extend your reasonable expectation to privacy, they make known that uninvited guests are not allowed on the property and that there is a possibility of arrest/prosecution should they enter, and they also protect you from liability should a trespasser be injured on your property.
A big dog such as a shepherd, rottweiler, doberman, great dane or a mastiff breed are the best deterrents to trespassers, as well as the best defenders. My German Shepherd alters me when any one is anywhere near my house. We got him from a shelter and I highly suggest you do the same if you're thinking about getting a dog. It takes a good deal of commitment and you need to respect your pet and treat it well if you expect it to defend you and your home, but it is worth it.