The document describes an ingestible sensor that was designed to be swallowed daily by patients to measure medication adherence in real time. The sensor allows patients, families, and doctors to monitor whether medications are being taken as prescribed and to relate compliance to health metrics. Test results are provided that demonstrate the safety and reliability of the sensor through chemical, toxicology, mechanical, and electrical tests as well as data from clinical trials with over 400 patients.