  A conceptually simple physical interpretation of a conserved Hamiltonian
$\mathcal{H}$ for a mechanical system with a time-dependent constraint is
given. For the case of a bead on a vertical hoop forced to rotate with constant
angular velocity $\omega$, $\mathcal{H}$ is nothing but the total energy of the
system plus the external actuator keeping $\omega$ fixed. In an analogy with
thermodynamics, the Hamiltonian is introduced as a thermodynamic potential
obtained from a Legendre transformation of the energy, in a very instructive
way. The ideas can be made extensive to different problems with time-dependent
constraints.
