|This article does not cite any references or sources. (March 2009)|
A Cartesian diver or Cartesian devil is a classic science experiment, named for René Descartes, which demonstrates the principle of buoyancy (Archimedes’ principle) and the ideal gas law. Descartes is said to have invented the toy.
Experiment description 
The cartesian diver experiment is set up by placing a "diver"—a small, rigid tube, open at one end, very similar to an eyedropper, in a larger container with some flexible component; for example, a two liter soft drink bottle. The larger container is completely filled with water, as you can see in the demonstration, and must be made airtight when closed. The "diver" is partially filled with a small amount of water, just enough to allow it to contain enough air so that it is nearly neutrally buoyant, but still buoyant enough that it floats at the top while being almost completely submerged.
The "diving" occurs when the flexible part of the larger container is pressed inwards, increasing the pressure in the larger container, causing the "diver" to sink to the bottom until the pressure is released, when it rises back to the surface.
There is just enough air in the diver to make it positively buoyant. Therefore, the diver floats at the water's surface. As a result of Pascal's law, squeezing the airtight container increases the pressure of the air, part of which pressure is exerted against the water that constitutes one "wall" of the airtight container. This water in turn exerts additional pressure on the air bubble inside the diver; because the air inside the diver is compressible but the water is an incompressible fluid, the air's volume is decreased but the water's volume does not expand, such that the pressure external to the diver a) forces the water already in the diver further inward and b) drives water from outside the diver into the diver. Once the air bubble becomes smaller and more water enters the diver, the diver displaces a weight of water that is less than its own weight, so it becomes negatively buoyant and sinks in accordance with Archimedes’ principle. When the pressure on the container is released, the air expands again, increasing the weight of water displaced and the diver again becomes positively buoyant and floats.
It might be thought that if the weight of displaced water exactly matched the weight of the diver, it would neither rise nor sink, but float in the middle of the container, however, this does not occur in practice. Assuming such a state were to exist at some point, any departure of the diver from its current depth, however small, will alter the pressure exerted on the bubble in the diver due to the change in the weight of the water above it in the vessel. It is an unstable equilibrium. If the diver rises, by even the most minuscule amount, the pressure on the bubble will decrease, it will expand, it will displace more water, and the diver will become more positively buoyant, rising still more quickly. Conversely, should the diver drop by the smallest amount, the pressure will increase, the bubble contract, additional water enter, the diver will become less buoyant, and the rate of the drop will accelerate as the pressure from the water rises still further. This positive reinforcement will amplify any departure from equilibrium, even that due to random thermal fluctuations in the system. A range of constant applied pressures exists that will allow the diver either to float at the surface, or sink to the bottom, but to have it float within the body of the liquid for an extended period would require continuous manipulation of the applied pressure.
Other uses 
In addition, the principle is used to make small toys often called "water dancers" or "water devils". The principle is the same, but the eyedropper is instead replaced with a decorative object with the same properties: a tube of near-neutral buoyancy. For example, a blown-glass bubble. If the tail of the glass bubble is given a twist, the flow of the water into and out of the glass bubble creates spin. This causes the toy to spin as it sinks and rises. An example of such a toy is the red "devil" shown here. The device also has a practical use for measuring the pressure of a liquid.
Plastic divers were given away in British cereal boxes as free gifts in the 1950s.