We demonstrate self-calibration of an adaptive optical system using differential OTF [Codona, JL; Opt. Eng. 0001; 52(9):097105-097105. doi:10.1117/1.OE.52.9.097105]. We use a deformable mirror (DM) along with science camera focal plane images to implement a closed-loop servo that both flattens the DM and corrects for non-common-path aberrations within the telescope. The pupil field modification required for dOTF measurement is introduced by displacing actuators near the edge of the illuminated pupil. Simulations were used to develop methods to retrieve the phase from the complex amplitude dOTF measurements for both segmented and continuous sheet MEMS DMs and tests were performed using a Boston Micromachines continuous sheet DM for verification. We compute the actuator correction updates directly from the phase of the dOTF measurements, reading out displacements and/or slopes at segment and actuator positions. Through simulation, we also explore the effectiveness of these techniques for a variety of photons collected in each dOTF exposure pair.