[Davide] saw our recent post on magnetic levitation and quickly sent in his own project, which has a great explanation of how it works — he’s also included the code to try yourself!
His setup uses an Atmega8 micro-controller which controls a small 12V 50N coil using pulse-width-modulation (PWM). A hall effect sensor (Allegro A1302) mounted inside the coil detects the distance to the magnet and that data is used by a PID controller to automatically adjust the PWM of the coil to keep the magnet in place. The Atmega8 runs at 8Mhz and the hall effect sensor is polled every 1ms to provide an updated value for the PWM. He’s also thrown in an RGB LED that lights up when an object is being levitated!
So why is there a kid with a floating balloon? [Davide] actually built the setup for his friend [Paolo] to display at an art fair called InverART 2013!
After the break check out the circuit diagram and a short demonstration video of the device in action!
Oh yeah, those of you not impressed by magnetic levitation will probably appreciate acoustic levitation.