Low current in a motor used in a line following robot

hi!
i'm trying to make a line following robot for my students, the problem is that i have not done any calculations.

the motor can't move the robot unless i connect it directly to the 9v power supply, but when i connect the other compenents(arduino) in parralel to the same 9v powersuply the motor doesn't get enough current when put on the floor so it just freeze's.

where do you think should i start ?
in the attachements a schematic of what i have done:

NPN C1815

full size image attached

If the 9V is from a "transistor radio battery" PP3 type, that's would be why: they don't provide much current.

Two other observations:

  • there's no resistor on the transistor base
  • you have the servo on 9V: is it a 9V servo? Most are 6V

yes it the 9v transistor radio battery, apparently it's the source of the problem,
for the transistors base i used a 1kohm resistor i just forgot it in the schematic, for the servo i guess i'll use the regulated 5v from arduino and a decoupling capacitor,
what alternative can i use for the battery? a mobile phone battery for example ?

Don't use Arduino 5V for powering motors, logic and motor supplies should be separate.

6V high current battery pack?

The 2SC1815 cannot safely power a 300mA motor, its only good to 150mA, and without a base resistor
you've risked cooking it or the Arduino pin.

You need a switching transistor with a higher current rating and 150 ohm base resistor, or
a logic level MOSFET. Even a 2N2222 can do 0.5A

Lose the 1uF electrolytic cap across the motor and use something like 10nF to 100nF ceramic
if you need EMI-suppression - needs to be mounted right on the motor terminals.

ok i solved this using two separate batteries, i also changed the transistor to 1.5 amp transistor
thank you