Arduino Forum

Using Arduino => General Electronics => Topic started by: brucester83 on Jan 13, 2013, 06:40 am

Title: Can someone please explain this simple NPN circuit?
Post by: brucester83 on Jan 13, 2013, 06:40 am
Hi,

I have built the very simple circuit on my breadboard but am getting weird result.

(http://i48.tinypic.com/33zd0yx.jpg)

The 5 volt supply is from the arduino digital output pin 13 and flashes on and off every second like in the blink led tutorial.

The other is a 9v battery.

The transistor is a BC338.

Anyway, what happen is, the led stays on even without the arduino plugged in. I measured the voltage across the 10k resistor and it says 3.3volts. It alterates between 3.3v and 6.3v when i plug in arduino.

So confused.

I though no current would flow if arduino wasnt plugged in but somehow current flows from the 9v battery throught the base, to the arduino and also makes it out of the emitter to ground completing the circuit.

Why is this happening?

I tried another transistor, this time the BC547 and the same thing happen.

When i run this circuit on my simulator, it works when i manually flick the switch on and off.

Whats going on?

Thanks for any help
Title: Re: Can someone please explain this simple NPN circuit?
Post by: CrossRoads on Jan 13, 2013, 06:48 am
Any chance you are not connected to the pins you think you are?
http://61.222.192.61/mccsemi/up_pdf/BC337~338(TO-92).PDF
http://61.222.192.61/mccsemi/up_pdf/BC546-BC548C(TO-92).pdf

Like collector & emitter swapped?
Title: Re: Can someone please explain this simple NPN circuit?
Post by: brucester83 on Jan 13, 2013, 07:20 am
spot on :P

Thanks, that worked

I was certain i had it the right way round.

From left to right with flat face toward me CBE

But for some reason, its EBC on this model.

Wierd..

Thanks again
Title: Re: Can someone please explain this simple NPN circuit?
Post by: dhenry on Jan 13, 2013, 03:52 pm
Quote
But for some reason, its EBC on this model.


That's why it pays to read the datasheet.
Title: Re: Can someone please explain this simple NPN circuit?
Post by: brucester83 on Jan 13, 2013, 04:12 pm
Yep :P

Anther thing that confuses me, the real circuit flows from negative to positive?

My negative battery lead is ground in my real circuit and it works, but if i switch positive for negative, it doesnt work.

In other words, only conventional flow works with this circuit.

I'm so confused :P

Wish i could take a pic of my breadboard so someone could see it, but i will try explain it.

The transistor has its flat square edge facing me.

My positive battery lead, the red one, is first, connected to one side of an led, the other side of the led is connected to one side of a 330 ohm resistor, the other side of the resistor is plugged into the right pin of the transistor. (collector)

The middle pin is connected to arduino digital out pin 13 via a 10k resistor. (base)

The negative lead of my battery and arduino ground pin ar connected to the left pin of transistor. (emitter)

This circuit works but i dont understand why.

It makes sence if electrons flow from red lead to black. But if they flow from black to red, i dont get it.

Title: Re: Can someone please explain this simple NPN circuit?
Post by: retrolefty on Jan 13, 2013, 06:59 pm
Quote
My negative battery lead is ground in my real circuit and it works, but if i switch positive for negative, it doesnt work.

In other words, only conventional flow works with this circuit.


It has nothing to do with conventional current flow Vs electron flow (as interesting a topic as that can be). It's rather that most semiconductors like LED and npn/pnp transistors are polarity sensitive devices, they only allow current to flow in one direction. By changing the polarity of your battery in your circuit none of the semiconductors will allow current to flow, they will all be said to be 'reversed biased'.

Lefty
Title: Re: Can someone please explain this simple NPN circuit?
Post by: krupski on Jan 14, 2013, 03:21 am

Hi,

I have built the very simple circuit on my breadboard but am getting weird result.

(http://i48.tinypic.com/33zd0yx.jpg)

The 5 volt supply is from the arduino digital output pin 13 and flashes on and off every second like in the blink led tutorial.

The other is a 9v battery.

The transistor is a BC338.

Anyway, what happen is, the led stays on even without the arduino plugged in. I measured the voltage across the 10k resistor and it says 3.3volts. It alterates between 3.3v and 6.3v when i plug in arduino.

So confused.

I though no current would flow if arduino wasnt plugged in but somehow current flows from the 9v battery throught the base, to the arduino and also makes it out of the emitter to ground completing the circuit.

Why is this happening?

I tried another transistor, this time the BC547 and the same thing happen.

When i run this circuit on my simulator, it works when i manually flick the switch on and off.

Whats going on?

Thanks for any help


What program are you using to do that simulation? It looks like it may be useful for other things.....
Title: Re: Can someone please explain this simple NPN circuit?
Post by: brucester83 on Jan 14, 2013, 03:49 am
Its very useful.

Its called Yenka and its free :)