A portable insulin pump can utilize readings from a sensor incorporated into an infusion set used with the pump to deliver insulin to a patient to determine if the infusion set is or is likely to become dislodged from the patient. Readings from the sensor that are inconsistent with expected readings or a range of expected readings can indicate that the infusion set has become dislodged from the patient.