The Cartesian diver is named, of course, after René Descartes. It is a device that demonstrates Archimedes’ principle (see demonstration 36.36), which states that a body wholly or partly immersed in a fluid is buoyed up with a force equal to the weight of the fluid it displaces. The Cartesian diver is a vessel that contains just enough liquid that it barely floats in a bath of the liquid; its remaining volume is filled with air. The diver is placed in a closed container filled with the liquid. This outer container either is flexible or it has a flexible diaphragm over the top, which one can depress to exert pressure on the container. The container does not have to be completely filled with liquid, but may contain air at the top. For the divers in the photograph above, the liquid is, of course, water. The diver in the bottle on the left is an open diver; that is, the bottom end is not sealed. The diver on the right is a sealed diver; its bottom end is sealed with a drop of glue. To exert pressure on the bottles, you squeeze them as in the photograph below:
The divers now sink to the bottom. Why? Water is incompressible, but air is not. When you exert pressure on the bottle, not only do you compress any air in the bottle, but you raise the pressure throughout the water. For the open diver, this forces water into the bottom of the diver, compressing the air inside the top of the diver. With the additional water, the diver is now denser than it was before, and it weighs more than the water it displaces. In other words, its weight now exceeds the buoyant force on it, and the diver sinks to the bottom. For the closed diver, the increased external pressure compresses the diver, which has a flexible wall. The volume of water inside it does not change, of course, but the air is compressed, the volume of the diver decreases to where the weight of the water it displaces is less than its own weight, and the diver sinks.
If you squeeze carefully, so that you have forced just enough water into the open diver, or compressed the sealed diver just enough, you can make the buoyant force just balance the weight of the diver, and it will neither float nor sink, but will stay suspended somewhere in the middle of the water, as in the photograph below: