Chillum Baba, Try to auto focus using a Nikon 50mm f1.8G, it will help u than trying to do the same with 50mm f1.8D.
Nikon bodies like D3100/5100 ... doent have in-built motor support. So the AFD lenses will not auto-focus. But bodies like D90/D7000 can manage this out, since its having inbuilt motor.