Protein mechanical unfolding: a model with binary variables