I don't know the frequency response of raccoons however if it is similar to cats it should work. I have two cats
that I have effectively trained to keep off my desk and other areas by the use of a $39 motion sensor that kicks off
a burst of high frequency sound. I can't hear it but it is loud to my cats when they cut the beam. It doesn't hurt them,
being just loud enough to be uncomfortable. The device is called CatScram and can be purchased from Comtrad
Industries 1-800-704-1211. It lasts 1-6 months on one 9V battery depending on how often it detects motion.
Offered by Mike.