Coffee grounds can help deter chickens from the garden. You can sprinkle them around your garden. It may take time for the birds to know that they are not welcomed there. But eventually, they will keep off.