A medical device includes a sensor that is configured to measure a property of an outer layer of an anatomical body surface. The sensor includes a source probe configured to stimulate a local surface of the outer layer of an anatomical body surface. The sensor also includes a detector configured to measure a response of the outer layer resulting from the source probe stimulation. A controller coupled to the source probe and the sensor drives the source probe using a tailored stochastic sequence and determines the property of the outer layer using the measured response received from the detector. The sensor can be used with medical devices, such as drug delivery devices including microneedle transport devices and needleless injection devices.