Not as complicated as it sounds.  Create two pendulums with a coil of wire at the bottom, which alternately create and are moved by the magnetic force and the current flowing through them.

http://www.exploratorium.edu/snacks/magnetic_pendulums/index.html
Last modified: Tuesday, 26 June 2012, 5:39 PM