The key to making this work is to choose a condiment-packet diver that barely floats. This works because, while many sauces are denser than water, it’s actually the air bubble sealed inside the packet that determines whether it will sink or swim.
Squeezing the bottle increases pressure on the condiment packet, compressing the air bubble inside. When the higher pressure compresses the air in the packet, the packet displaces less water, thus decreasing its buoyancy and causing it to sink. When you release the sides of the bottle, the pressure decreases and the air inside the packet expands once again. The packet’s buoyancy increases and the diver rises.
Each Tuesday is EducationTuesday here at Adafruit! Be sure to check out our posts about educators and all things STEM. Adafruit supports our educators and loves to spread the good word about educational STEM innovations!