I don't know if you knew about the John Bedini Motor, but your idea is close to it.
If you search the net a bit, look for Bedini motor on google and you'll find everything you want to build it yourself. It is a smart pulse firing propulsion and attraction DC motor. It actually uses the counter-electromotion force to attract and propel the magnet on the rotor. It can recharge up to ten batteries before it uses one of the same capacity. So, it is a perpetual movement motor if you have an electronic interface to make the switching.
Here some explaination:
http://peswiki.com/index.php/Directory:Bedini_SG
Namaste, Steven