How to... Wire Transistor To Motor Correctly ?

Hi, I have surfed the internet looking for answers as well as reading multiple forum topics and discussions on how to correctly wire a transistor to a motor. However, I have been unable to get my project to work.
I am currently trying to power a 12 volt motor with my Arduino, however, I didn't have enough voltage so I thought I would use a transistor. However, it isn't working and I was hoping you guys could help me figure out why. I attached a snapshot of how I wired everything (virtually replicated on Fritz), and the code in a note on the screenshot.

Thank-you for your help!

P.S. The snapshot in Fritz says the pin from the Arduino to the middle of the transistor is 8 but it is actually 9, (I switched it, but that still didn't fix the problem).

You need to have a look something like this adafruit tutorial.

Okay, that looks like it could be the answer, however I haven't really done anything with schematics before and am not sure how to read them. Is there a tutorial you know of that will show me how to read schematics? Or is it just a simple thing you can tell me?

Thanks!

Ok well the main thing is that Q1 is the transistor. The arrow pointing out means it's an NPN, and you should check the web for the part number of yours to find a datasheet to make sure it's also an NPN. The datasheet will also explain which pin is which, they're not all the same.

The pin on the left side of Q1 is called the base, and goes to Arduino via a resistor, R1

The bottom pin on Q1 with the arrow is the emitter and it goes to ground.

The top pin on Q1 is the collector, and your motor goes between it and the +ve power. It shows it going to the Arduino 5V which is not what you want, make that go to your 12V +ve, and have your 12V -ve joined to the emitter / Arduino ground.

D1 is a diode, I won't explain it right now, but don't leave it out. The silver end of such a diode is the one that goes to 12V +ve.

Here's a scribble on the adafruit circuit for 12V.

The snapshot in Fritz says the pin from the Arduino to the middle of the transistor is 8 but it is actually 9,

OMG: you have apparently no idea about electronics?

The middle wire of a transistor is the "Base". It's the spot where you connect the resistor copming from a pin of the Arduino to control the transistor and its load (your motor in this case).

If you are using pin x or pin y as output - that has to match with your sketch.

Look at the schematics of @manor_royal above, he is using the PWM pin D3 of the Arduino.
So your sketch has to be modified such that this is the one pin which controls the motor.

The external power supply is just an amplifier for delivering the required current as the Arduino cannot drive the motor directly.

Um, I tried wiring it up like the schematic says, and the motor has extra power and everything, however I am unable to control it from my Arduino. I'm thinking something is wrong with how I wirired my motor in. I currently am having the + on my motor go to the silver end of my diode, and the gnd to my arduino, is that correct?

Sorry about my electronics ability, I haven't ever used a transistor before.

Thanks for your help!

Your description sounds incorrect. See below.
The diode will have a bar on end, that goes to the motor + supply. The other end goes to the other motor lead.

You will need to know which of the three transistor legs are which.
Emitter goes to Gnd, along with the Arduino Gnd and the motor supply Gnd. That is the common reference for all signals.
The collector goes to the motor/diode per above.
The Arduino drives the base thru a resistor, 150 ohms or higher (220, 270, up to about 1K).
Current into the base turns on the transistor.

Okay, I got it, works now. I wasn't getting all my grounds together, nor was my motor and diode in the right place. Thank you all so much for your help!

P.S. Transistors can be confusing! :slight_smile:

Is there a tutorial you know of that will show me how to read schematics?

Reading a schematic

Colin's Lab video on reading a schematic

Also read this about your grounds:-
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html