The Cartesian diver, named after French philosopher and scientist René Descartes, works because of several factors.
When you squeeze the bottle, the pressure on the water pushes on the pocket of air inside the pipette. You can see the level of the water in the diver rise as you squeeze the bottle. As the water level inside the diver goes up, it compresses the air above it into a smaller space. This demonstrates that gases are considerably more compressible than liquids.
As the water level rises in the diver, it becomes less buoyant and the diver sinks. As you release the pressure on the bottle, the compressed air expands and forces the water backs out. Which makes the diver float to the top of the bottle, because now it is more buoyant.
Here I have trained Cartesian divers with this experiment, I Numbered five divers, I will get the divers to ascend from 5,4,3,2 and 1 this will show you how mass affects density.
The way this works is:
Diver #5 contains the greatest amount of water because I adjusted the water level inside so that it would just barely float. Since diver #5 has the most water, it has the smallest pocket of air. When I squeeze the bottle, this diver will descend first. On the other end of the scale, diver #1 contains the least amount of water and has the largest pocket of air. Diver #1 is the most buoyant of the five divers and should be the last one to sink. The divers will progressively sink in the order 5 to 1 if the densities of the divers are properly adjusted.
You will also notice that you have to squeeze harder and harder to get each successive diver to sink. In essence, you have created a strength tester. One person may only be strong enough to sink three divers while someone else may have the strength to sink all five.
WHEN I SQUEEZE THE BOTTLE, THE DIVER WILL NOT SINK?
It is very important to initially adjust the diver so that it just barely floats in the cup of water. If the diver requires a very strong squeeze to make it sink, then there is not enough water in the pipette. Remove the diver from the bottle and re-adjust the water level so that the diver just barely floats. (HINT: The diver should by about half full of water.)
THE DIVER STAYS ON THE BOTTOM OF THE BOTTLE. WHY?
If the diver sinks to the bottom of the bottle on its own, there is too much water in the pipette. Remove the diver from the bottle and adjust the water level so that the pipette is about half full. Test to make sure that the diver just barely floats in the cup of water before placing it back in the soda bottle. (Conserve water! Make a wire hook to fish the sunken diver out of the bottle instead of dumping the water down the drain.)