I think someone here posted their work on a dildo that senses insertion depth.
EDIT: here’s what I was thinking of. Theres another person who posted about two other devieces here and here