how to make a generator from a dc motor