Cannot get motor to even spin

I have an RC car, and I'm trying to control the motor with my Arduino Uno.

My circuit is the same circuit as Circuit 12 in the Sparkfun Inventor's Kit (basically through a diode and motor, to a transistor back to ground), but I just bought a TIP31AG transistor to replace the P2N2 222A transistor, and a IN5404 HVCA diode to replace the 1N4148. The only problem is, it doesn't work. ---I even tried the TIP120 transistor, and it didn't work. Is there something I'm doing wrong?

I tried simple code to make the motor spin (I set the motor pin on HIGH and delayed it by 1000), and nothing happens. I think it's the transistor, but I'm not sure.

Can someone please help me?

My battery I'm using to power this RC car is a 7.2 volt battery, with 2 amps of current.

I think it may have to do with the transistor because if I bypass the transistor and connect it straight to ground, the motor spins perfectly fine.

My script:

int motorPin1 = 2;

void setup(){
pinMode (motorPin1, OUTPUT);

}
void loop(){
digitalWrite (motorPin1, HIGH);
delay (1000);
}

You don't give us a lot to go on.
You have tried a tutorial with no mistakes in it and it does not function.
Therefore you are doing something wrong, so post a link to what you are doing and post a photo of what you have done, then we can check and try and see what you have done wrong.

Sorry about that. Here's a few pictures on what I have. If you need another picture, I will be glad to post one.

I have a potentiometer on my board as a way to control the motor (I've dont it in the past), but it of course doesn't work.

The battery I'm using belongs to the RC car.

I have the positive lead connected to the left side of the breadboard and the negative to the right.

This schematic is what I'm going off of, except I have the other transistors I bought to work with 2 amps of current.

(Also, there shouldn't be a delay(1000); in my code --- It really doesn't do anything.)

***Because I can't post multiple pictures in one post (I exceeded the limit), I will post the other two separately.

This is the RC car.

This is the schematic I'm going off of. Of course I have a different transistor and diode so it can support 2 amps of current.

You need to connect the Arduino ground to the emitter of the TIP120 or TIP31 (which in turn is connected to the negative side of your 7.2V battery).

Doh you just beat me to it. =(

Off to bed now - you're welcome to the night shift :smiley:

Thank you very much! I will try that!

Connecting my arduino's ground to the transistor's emitter pin won't hurt anything, right? I mean, it's only ground...

Then again, will 2 amps with 7.2 volts run through the arduino? That could hurt it...

dc42:
Off to bed now - you're welcome to the night shift :smiley:

Well I was in bed when I answered that, that is the beauty of the iPad.
Now it is 4 in the morning.

No all that current dosen't flow through the arduino's ground, it only flows to your supply. The common ground is needed for the very small current to flow from the arduino, through the base of the transistor and back to the arduino. It is the only way to control the transistor.

Ahh I see, that makes sense; there must be a common ground present.

Thank you guys so much for your help! I appreciate it! :grin: