A watchdog, blaring radio. or flood-lighting may deter raccoons temporarily, but the oNy effective way to keep them from eventually invading your vegetable patch is to electrify the fence surrounding it.
Add a single electric wire 2 inches above a strong chicken-wire fence or install a two-strand electric fence with wires 4 and 8 inches off the ground. Keep vegetation trimmed away from the live wires. Raccoons can also be caught in live traps baited with canned fish.
If raccoons move into your attic or basement, trap them and release them in a suitable area several miles away. If trapping fails, locate their entrance holes; board up the holes in the late evening when the raccoons are out hunting. Cover the holes with hardware cloth, metal flashing, or new boards. Deck a chimney top with a grid of reinforcement rods; secure it with a steel tightening band.
Clear away any raccoon feces you find with a spade; they may contain a parasite that, if ingested by a human, can be fatal.