Using a transistor - what am I doing wrong?

So I have been working with some basic concept of electronics to learn the basics before building a plant watering system.
Since I need to power an pump it seems I need to use a transistor.
I connected it into a very basic circuit just to get the hang of it, however it seems I am doing something really wrong.

So idea of the circuit is to give a LED power when the transistor gets a current on its base.
I have connected one of the outer legs of the transistor to GND, and the other to the LED. From the LED we have a resistor and then it has 5V.
The base input of the transistor gets power from digital out 3 via resistor.

Attaching schematics.
The transistor is a s8050 d331 and its a NPN type.
The resistors used are 330 ohm.
From this page: we can see that if I have the flat end of the transistor against me, the left most pin is the emitter, so that is the leg connected to the GND. The collector is connected to the negative end of the LED.

So lets see what happens!

The LED lights up. It doesnt matter if I have anything at all connected to the base of the transistor, or if I send a current there, the LED lights up anyway.
Thinking I missunderstood the collector and emittor part of the transistor, I turned it the other way. The LED lights up anyway, however this time very weak.

Can someone explain this to me? I was under the impression that if no current is given on the base, the transitor will not allow current to flow between the collector and emitter parts of it.
And how come it can flow the oposite way as well?

Can’t follow that fritzing nonsense.
What kind of transistor do you really have?
LED transistor drives.jpg

The led should be off, if the base has no current. I think the transistor is blown, or your sketch is doing something wrong, or something wrong with the wires. Perhaps you have another transistor than you think you have.

In the drawing, the led is not connected to 5V (via resistor) but to GND. The red wire is connected to the upper row.

Could you make a photo of your wiring ?
Could you show us the sketch ?

The best way to solve this problem is to start all over with new components. Put everything aside, take a new Arduino board, use another pin, another breadboard, a new transistor, new resistors, a new led, and even an other USB cable and other wires. And write a new sketch.

See reply by Koepel ...

If your schemtic as illustrated in the attachments you have to replace the transistor piece because it’s may be blown.
Usually i’m using BC547 npn transistor.


First of all I want to say thanks all the replies! Lets get to the bottom of this

I got some question if the transistor was broken. I had thought that a broken one would not forward current at all, not that a broken one could forward current even when it shouldnt.
I found another transistor of the same type in my starter box, and it turns out the first one was broken!
Phew, I thought I was going mad :slight_smile:

Thanks all!