Should my transistor heat up THAT much with this circuit

Okay now here is a picture since my schematic drawing abilities are not up to par, and by the looks of it neither are my circuit building abilities because i dont know if i am doing something wrong or if this is how things go, i know transistors dispense heat but i thought it would be when you got up there like at 24 volts or something and this transistor i thought would be more then enough and not get hot, anywho here is a picture of my connections and transistor datasheet my goal was to make my own little H bridge on a circuit board but i cant even get passed testing out my components

oh and the code on the Arduino is simply the fade led example code that comes with the ide, and the motor does run and the code works fine it speeds up and slows down but the transistor gets reallly really hot

I think you need to rewire. Connect +12V to the motor, other side of the motor to the Collector. Connect the Emitter to ground. Finally, add a resistor (330 ohms, 220 ohms, something around there) between pin 6 and the Base.

-- The Rugged Circuits Yellowjacket: 802.11 WiFi module with ATmega328P microcontroller, only 1.6" x 1.2", bootloader

Good MAN thank you! works like a charm, now perhaps a little insight as to why? And i would of figured since i was switching the transistor to the ground i would need a PNP transistors, since that for the "negative" side of things..?

I'm afraid I can't summarize a semester's worth of circuit analysis :disappointed_relieved: Perhaps someone else can provide a gentle introduction to the theory and operation of NPN transistors. Or maybe find some on-line resources to start learning? There are common misconceptions floating around that get in the way of actually understanding things, and you may have to "un-learn" some things first.

This site looks like it might be a good start:

-- The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Oh i have done my share of online reading , and specially on transistors but i guess i just had it totally wrong i was using them all with the same polarity just like my picture connecting all positives to all 3 leads but then after really looking at what you told me to do, the most obvious thing clicked " NPN " why would i add all of the same polarities to both N and P type material. Thanks a lot though for part taking in my breakthrough!

This crucial moment is almost as important as the invention of the transistor it self lol, at least to me.

The key phrases are "emitter follower" (which is the circuit you started with and only put 4V into the motor) and "common emitter" which is the one that can actually have voltage gain as well as current gain and thus switch 12V from a 5V microcontroller.

@eddiea6987: As a rule of thumb, to use a transistor as a switch an NPN transistor should be on the "low side". That is, connect it directly to ground and put your "load" (motor) "above" it (on the V+ side). The reason is that to turn it on the voltage of the base needs to be raised a bit above (.7 volts BJT rule of thumb) the voltage at the emitter. If the emitter is connected to ground that is really easy to do! But if the load is below the emitter (i.e. between it and ground) it opens the question what is the exact voltage at the emitter? This voltage will depend on the current running through the load, and what the load actually is, i.e. resistor, motor, led. So it is a lot harder to guarantee that the base voltage is raised above that of the emitter. You end up running your transistor in the "active" region (i.e. the switch is not fully on) so it gets nice and hot.

If you need a switch on the "high side", use a PNP transistor. Connect its collector directly to V+. Now to turn on, the base needs to be pulled below that of V+. Again, that is pretty easy to do. But note that in your particular case, since you are using 5v arduino and 12v motor, in fact you would not be able to turn the transistor off. In fact what would happen is the Arduino pin would get exposed to 12v which would be very unhealthy for your chip! So a PNP transistor/high side switch would not work for you without some addtl stuff between the arduino and the PNP's base...

Cheers! Andrew