Specific gravity sensor

Anyone have ideas on an inexpensive specific gravity sensor? Probably like a refractometer type? Hopefully something that can be submerged in liquid but not a must.

For the GrovePi system or for lego?