We investigate localization properties in a family of deterministic (i.e., no disorder) nearest neighbor tight binding models with quasiperiodic on site modulation. We prove that this family is self-dual under a generalized duality transformation. The self-dual condition for this general model turns out to be a simple closed form function of the model parameters and energy. We introduce the typical density of states as an order parameter for localization in quasiperiodic systems. By direct calculations of the inverse participation ratio and the typical density of states we numerically verify that this self-dual line indeed defines a mobility edge in energy separating localized and extended states. Our model is a first example of a nearest neighbor tight binding model manifesting a mobility edge protected by a duality symmetry. We propose a realistic experimental scheme to realize our results in atomic optical lattices and photonic waveguides.