We consider a mechanical system consisting of n penduli and a d-dimensional generalized rotator subject to a time-dependent perturbation. The perturbation is not assumed to be either Hamiltonian, or periodic or quasi-periodic, we allow for rather general time-dependence.The strength of the perturbation is given by a parameter ε P R. For all |ε| sufficiently small, the augmented flow -obtained by making the time into a new variable -has a p2d`1q-dimensional normally hyperbolic locally invariant manifoldΛε.We define a Melnikov-type vector, which gives the first order expansion of the displacement of the stable and unstable manifolds ofΛ0 under the perturbation. We provide an explicit formula for the Melnikov vector in terms of convergent improper integrals of the perturbation along homoclinic orbits of the unperturbed system.We show that if the perturbation satisfies some explicit non-degeneracy conditions, then the stable and unstable manifolds ofΛε, W s pΛεq and W u pΛεq, respectively, intersect along a transverse homoclinic manifold, and, moreover, the splitting of W s pΛεq and W u pΛεq can be explicitly computed, up to the first order, in terms of the Melnikov-type vector. This implies that the excursions along some homoclinic trajectories yield a non-trivial increase of order Opεq in the action variables of the rotator, for all sufficiently small perturbations.The formulas that we obtain are independent of the unperturbed motions and give, at the same time, the effects on periodic, quasi-periodic, or general-type orbits.When the perturbation is Hamiltonian, we express the effects of the perturbation, up to the first order, in terms of a Melnikov potential. In addition, if the perturbation is periodic, we obtain that the nondegeneracy conditions on the Melnikov potential are generic.