Hmm, I wonder whether you could use the phone's camera instead. Just mark the container at, say, 10mm increments (for calibration), and then point the phone at it. Easy to use a threshold to detect the resin (assuming it's one of the brighter colours), and that gives you both the water level (bottom of the resin layer) and resin volume remaining (total height of the resin layer). The advantage would be that it provides an absolute height - whereas the microphone method is an integral and may or may not suffer from drift.