Electronic – NPN transistor not switching 12V from microcontroller

microcontrollertransistors

schematic

simulate this circuit – Schematic created using CircuitLab

I'm at a complete loss over here. What I'm trying to do is switch 12V voltage with a NPN transistor (the switched signal later goes to a P-CH-MOSFET). My problem is that nothing works. I've tried a simple circuit as this with a 1K resistor, tried adding a pull-down resistor (tried 1K and 200 ohm values), tried using different transistors (TIP122, BC337, PN2222a), tried using different controllers (Arduino, Intel Edison) and nothing works.

To elaborate, the problem is that I add the load to the collector (whether it's a LED strip, a single LED with a resistor, multimeter) it constantly stays on. Also I do have common ground, I have the power supply and controler's grounds connected to the same rail on the breadboard.

What are the possible problems? Is there hope to solve this or are somehow all of my components are fried? Appreciate all the help.

EDIT: added one of the schematics that I tried. For load I'm actually using a RGB LED strip, so the load in this circuit is just an example.

EDIT2: adding a picture of the circuit on the breadboard. enter image description here

EDIT3: small update, forgot to mention that my transistor is BC337-40, the difference is that it has hfe of 250.

Best Answer

The circuit you should should definitely shut off the LED current when V1 is switched from 5 V to 0 V.

Most likely the problem is that the transistor is connected incorrectly. Look carefully at the datasheet to see which leads are emitter, base, and collector, then make sure your circuit is really connected that way.

It's hard to tell from your picture how exactly the transistor is hooked up.

Also note that while many transistors have leads E-B-C from left to right when looking at the flat, that is certainly not universally true. You have to read the datasheet for your specific transistor, then double-check that it is connected correctly.