Tag Archives: Atmega8 MCU

Video: An Atmel-powered PID magnetic levitator

A Maker by the name of Davide Gironi recently built an Atmel-powered (Atmega8 MCU) PID magnetic levitator designed to control a small 12V 50N coil using pulse-width-modulation (PWM).

According to the HackADay crew, a hall effect sensor (Allegro A1302) mounted inside the coil is tasked with detecting the distance to the magnet – with the data used by a PID controller to automatically adjust the PWM of the coil to keep the magnet in place.┬áThe PID controller parameters, along with other configuration options, are stored in EEPROM and can be edited via software using the UART connection.

“The Atmega8 runs at 8Mhz and the hall effect sensor is polled every 1ms to provide an updated value for the PWM,” explained HackADay’s James Hobson.

“Davide has also thrown in an RGB LED that lights up when an object is being levitated.”

It should be noted that the above-mentioned Atmel-powered PID magnetic levitator was recently showcased by his friend Paolo Crespi at InverART 2013.

Interested in learning more? You can check out the project’s official page here.