Go Down

Topic: Magnetic levitation (Read 26 times) previous topic - next topic

ea123

Hello,
here is a magnetic levitation project realized with arduino. The suspended ball is a permanent magnet whose distance from the electromagnet is measured by a hall effect sensor placed under the coil. The digital control loop is a PID algorithm that modulates a PWM output to energize the electromagnet through a MOSFET. A voltage regulator is used to provide a fixed voltage and to limit the current in the coil (the schematics can be found in attachment).

http://www.youtube.com/watch?v=7yGMYXWVjSU



robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

ea123

You can find the sketch file in attachment. Basically it consists in the following functions:

1) PWM setup to change the frequency from the default value (490 Hz) to 3921 Hz;
2) A command handler used to configure the controller gains and setpoint through the serial line (when arduino is connected to USB cable);
3) A state machine that manages the transition between OFF, IDLE and CONTROL modes (this to avoid the controller to turn on the electromagnet
   at full power when the ball is not in range);
4) The control loop.


robtillaart


I forwarded the tube to a teacher at a technical school this afternoon and he was so enthousiastic he thinks about adding it as a exercise in the semester.

Thanks again (also for the code),
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

tytower

#4
Jan 28, 2012, 09:50 pm Last Edit: Jan 29, 2012, 12:10 pm by tytower Reason: 1
Any chance of a picture?
Edit - when I logged in am -no videos but schematic pic was there
I think videos might have been turned off for a time by the server.
Good as gold now thanks
Governments should do what they were designed to do only.
Manage the larger issues best done by Government.
My Family and my Property are no

Go Up