In this paper we present a new application of the Melnikov method to a class of periodically perturbed Duffing equations where the nonlinearity is non-smooth as otherwise required in the classical applications. Extensions of the Melnikov method to these situations is a topic with growing interests from the researchers in the past decade. Our model, motivated by the study of mechanical vibrations for systems with ''stops'', considers a case of a nonlinear equation with piecewise linear components. This allows us to provide a precise analytical representation of the homoclinic orbit for the associated autonomous planar system and thus obtain simply computable conditions for the zeros of the associated Melnikov function.