Application of a piezoelectric quartz crystal as a partition detector. Development of a digital sensor