The invention is a sensor device attached to a transdermal patch or other form of transdermal delivery device (TDD) which is (1) capable of determining the quantity of drug remaining within the TDD and (2) determining the quantity or dose delivered from the TDD to a patient in real time. The preferred embodiment is a sensor capable of transmitting acoustical energy between an ultrasonic generator, through a medicine-containing TDD, providing a density measurement of the solution within the TDD and thereby calculating the dose remaining within the patch, and leading to a calculation of the dose delivered to the patient.