Hi Lily, you could try making a deterrent spray by bringing some water to a boil, then adding yellow onions, jalapeno poppers along with some cayenne pepper. Once the water has cooled down, transfer it into a spray bottle. (Note) It might be a good idea to put on goggles and a mask before spraying it around your garden. There is a youtube video on how to do this here
(note) Credit for this info goes to
http://howzak.com/ethical-raccoon-removal-tricks/.