I'm not familiar with the D40 ISO performance but, your ISO should be set as high as you feel will give you acceptable results. In my opinion, a noisy sharp shot is better than a less noisy blurred shot (unless that is the effect you are going for.
Set your exposure manually as in the auto...