In this video Davide Gironi demonstrates his AVR Atmega based magnetic levitator:
This is a magnetic levitator implemented using Atmega8 microcontroller. Magnetic levitation is a method by which an object is suspended with no support other than magnetic fields.

this will work also in water