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: http://www.mouser.com/ds/2/149/SS8050-117753.pdf 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?