Supply for my project

To kind of reiterate what others have said,

  1. 7805 has a dropout voltage of about 2V, so with a series diode, 1N400x, you'll need
    a battery voltage = 8V MINIMUM.

  2. It's generally not the best idea to try and run the motors and controller off the
    same battery, although I do it all the time. I use 6 NiMH rechargeable cells [7.2V],
    plus an LDO v.reg [LM2940], plus schottky series diode, so the v.reg will operate on
    about 6V input.

  3. Better to use AA cells than AAA cells for motor driving, as you can get 2500 mAhr
    NiMH cells, which will last quite a long time.