Transistor help needed, controlling +12V with +2V signal

Thread Starter

dprothero

Joined Mar 29, 2008
5
Noob here. I've read "electronics for dummies" and that's about it :)

Anyway, what I want to do is close a +12V circuit for one device using only a +2V signal from another. Basically, I'm hacking an Audio/Video 4-input switch box and I want to close the +12V circuit if a specific input is selected. The switch box has 4 led's and one of them lights up corresponding to which input is the currently switched input.

I get +2V off the + and - leads of the LED.

So, I've taken a 2N3904 NPN transistor and wired it as so:

Emitter: +12V and +2V
Base: -2V
Collector: -12V

Now, this is my best guess from reading books and online articles such as this one on this site:
http://www.allaboutcircuits.com/vol_3/chpt_4/1.html

However, it's not behaving as I would expect. When the LED is turned ON, I get about +8V flowing out the collector. When the LED is turned OFF, I get +12V from the collector.

I was expecting: with the LED ON, +12V, LED OFF 0V.

UPDATE: Also tried swaping the Emitter and Collector to no avail (same results).

Where have horribly gone wrong?

I am fully expecting that I've done this completely wrong, so am now looking for some assistance.

Thanks!

David
 

SgtWookie

Joined Jul 17, 2007
22,230
Noob here. I've read "electronics for dummies" and that's about it :)
Welcome to the Forums. Keep reading ;)

Anyway, what I want to do is close a +12V circuit for one device using only a +2V signal from another. Basically, I'm hacking an Audio/Video 4-input switch box and I want to close the +12V circuit if a specific input is selected. The switch box has 4 led's and one of them lights up corresponding to which input is the currently switched input.

I get +2V off the + and - leads of the LED.
OK, that means the LED's Vf is 2v, perhaps yellow or green.

So, I've taken a 2N3904 NPN transistor and wired it as so:

Emitter: +12V and +2V
Base: -2V
Collector: -12V
Huh? Do you mean that you have shorted between a +12v source and a +2v source, and connected it to the emitter?

It would help a great deal if you could trace out your existing circuit and post it.
 

Thread Starter

dprothero

Joined Mar 29, 2008
5
Huh? Do you mean that you have shorted between a +12v source and a +2v source, and connected it to the emitter?
Uhhh, yeah. Judging by your reaction, that was the wrong thing to do. :D

It would help a great deal if you could trace out your existing circuit and post it.
Does this help? I just took the diagram of an NPN transistor off this site and marked what's wired up to it. That's really all that's wired up right now as I'm just trying to test things out.


UPDATE: Sorry, the +12V isn't the motor, but the power source FOR the motor. Sorry for any confusion.

I'll re-do a more complete diagram if that'll help.
 

SgtWookie

Joined Jul 17, 2007
22,230
Ahh, I don't know exactly what you mean by "Motor -12v" and "Motor + 12v" - are those the leads to a motor, or what exactly are they?

If you're going to use an NPN as a current amplifier, the emitter needs to be the most negative part, and the collector the most positive. Current is passed up through the emitter and out the collector.

The base current controls the amount of current that flows through the collector. You can look at a datasheet to find the hFE specifications, and usually a chart showing how the hFE changes with collector current and temperature. These are approximate; "real world" transistors vary considerably, however the gain will be somewhere between the guaranteed minimums and maximum.

Typically, the base voltage is 0.6v to 0.7v above the emitter voltage. If it goes much higher than that, the transistor is said to be in saturation; ie: it's carrying all of the current it possibly can.

The hFE of the 2N3904 varies anywhere from 30 to 300. Download a datasheet and have a look. It's best gain characteristics are when the collector current is about 10mA. When you get up to 100mA, its gain is quite low.
 

Thread Starter

dprothero

Joined Mar 29, 2008
5
Ahh, I don't know exactly what you mean by "Motor -12v" and "Motor + 12v" - are those the leads to a motor, or what exactly are they?
Sorry, messed that up on the diagram. It's the 12V circuit that powers a motor. I want to use the transistor as a switch to close the circuit to turn on the motor when the LED lights up.

If you're going to use an NPN as a current amplifier, the emitter needs to be the most negative part, and the collector the most positive. Current is passed up through the emitter and out the collector.
Not as an amplifier, but as a switch. And yes, I keep forgetting electron flow is from negative to positive. Counter-intuitive for a newbie like me. So when I looked at the diagram of a transistor, I read the arrows backwards.

So, I've rewired my circuit thusly (with hopefully better labels):



However, it's still not behaving the way I expect it to.

First problem, now the LED doesn't light up.

Multimeter readings (+ = red lead, - = black lead from my meter):

WHEN THE LED 'SHOULD' BE ON (i.e. the switch box is on the correct input, even though the LED isn't lighting up any more)...
+ Base, - Emitter = 0.75V (why isn't this 2V?)
+ Collector, - Emitter = 0.04V (was expecting this to be 12V)

WHEN THE LED 'SHOULD' BE OFF (switch box is on another input)....
+ Base, - Emitter = 0.00V (that's expected)
+ Collector, - Emitter = 11.33V (huh? I thought it should be 0 if base was 0)

I'm so confused.

I apologize for my lack of knowledge of correct terminology and diagramming abilities. I was really hoping this was going to be a simple "oh you silly n00b, you've wired it backwards" (which I did :p) but if this is more complicated than it seems, I'm not asking to be spoonfed. I'll just hit the books and the net harder.

Thanks.

David
 

SgtWookie

Joined Jul 17, 2007
22,230
What's the current rating of your motor, or what current does it draw when you connect it across 12v?
BTW, the motor should be connected BETWEEN the collector and +12v.

Right now, you have no current limiting resistor on the base of the transistor. Remember how I said the voltage on the base would be somewhere around 0.7V unless the transistor was saturated? That's why your LED no longer lights - the transistor's base is passing all that current through to the emitter, like a forward-biased diode.

If you put a resistor in series with the base, say around 5k Ohms, it will limit the base current and the LED will come back on.

However, that probably will not allow enough base current to get the transistor into saturation. In that case, you should investigate a Darlington pair configuration. Darlington pairs multiply the gain of one transistor by the gain of the 2nd transistor.

(Do some research on Darlingtons first - if you figure it out or get confused, c'mon back and say what's going on)
 

Thread Starter

dprothero

Joined Mar 29, 2008
5
Oorah SgtWookie! Thanks for the tips. Yes, OK, so my problem is that there's not a big enough load and too much base current. I'll look into Darlingtons. Thanks again!
 

SgtWookie

Joined Jul 17, 2007
22,230
Actually, I don't know WHAT your load is yet, as you haven't described it - except that it's a motor of some sort.

Unless the motor needs a very small amount of current, it's likely that the transistor goes into saturation with no response from the motor, because the transistor can't conduct enough current to run the motor - hence, the load is too large for the transistor.

Hint: take a look at TIP120 Darlingtons. Find a spec sheet. If you don't know where to look, try here:
http://www.alldatasheet.com

I would much rather that you figure much of this out for yourself, than doing it for you.

Give a man a fish, he'll eat for a day.

Teach a man to fish, and he'll sit in a boat and drink beer all day ;)
 

Thread Starter

dprothero

Joined Mar 29, 2008
5
Thanks again. I do want to learn this stuff myself. It's slowly starting to make more and more sense.

Another idea I had was to use the transistor to turn on a small current that in turn triggers a relay handling a large enough current for the motor.
 

Norfindel

Joined Mar 6, 2008
326
Thanks again. I do want to learn this stuff myself. It's slowly starting to make more and more sense.

Another idea I had was to use the transistor to turn on a small current that in turn triggers a relay handling a large enough current for the motor.
The transistor can control a large current flowing thru the Collector-Emitter, by using a small current flowing thru the Base-Emitter junction.

Now, you need a power supply (say, 12v, whatever the motor needs), you need to take the + of the supply, connect it to the + of the motor, then the - of the motor to the Colector (for a NPN transistor), then the Emitter to the - of the power supply. This makes a circuit, but you need to form another one for the current to flow thru the Base-Emitter junction. To do this, you take another wire from the power supply +, connect the wire to a resistor, then the resistor to the transistor's base. The resistor limits the current to (Vcc - 0,7v) / resistor_value (Vcc is the voltage of the power supply, 0,7v the voltage drop of the Base-Emitter junction).
For this to work correctly, you need to know the hFE of the transistor, so you can calculate the base current and the base resistor. You need to also know how many current the motor needs, the amount of current the transistor can conduct, etc.
The transistor would work fully saturated, so i don't think there would be too much problems about power dissipation.
The motor could or couldn't have polarity marks. If it's a DC motor probably the worst it would happend if you connect it backwards, is that it would rotate backwards.
 

mjelic

Joined Mar 11, 2008
21
The transistor can control a large current flowing thru the Collector-Emitter, by using a small current flowing thru the Base-Emitter junction.

To do this, you take another wire from the power supply +, connect the wire to a resistor, then the resistor to the transistor's base. The resistor limits the current to (Vcc - 0,7v) / base_current (Vcc is the voltage of the power supply, 0,7v the voltage drop of the Base-Emitter junction).
And I assume you still connect the "trigger" (in this instance, the + side of the LED) to the NPN Base as well as the resistor that is connected to +

For this to work correctly, you need to know the hFE of the transistor, so you can calculate the base current and the base resistor.
Where do I find the formula to help me work out what size resistor?

I'd most likely be using a BC547 in a 12 volt circuit. Is there a "default" resistor value that is the best for this purpose?

PS. I'm using it to drive a relay, and the trigger is a 555 timer IC that goes "high" at the output. (Not sure what voltage but not much off full 12v.)

Thanks in advance,
Mark
 

Norfindel

Joined Mar 6, 2008
326
And I assume you still connect the "trigger" (in this instance, the + side of the LED) to the NPN Base as well as the resistor that is connected to +
I was only explaining how to wire a transistor to switch a motor on and off, but to do what you want, there are a lot of things that can go wrong. For example: what amount of current can deliver whatever is driving the LED?

If it can deliver enough current, maybe you can meter the voltage between the LED's + (or whatever is driving the LED) and ground, then conect that point to the transistor's base thru a resistor.

Where do I find the formula to help me work out what size resistor?
You should read the transistor's chapter in this site, or better, all the site, if you're interested in electronics.

I'd most likely be using a BC547 in a 12 volt circuit. Is there a "default" resistor value that is the best for this purpose?

PS. I'm using it to drive a relay, and the trigger is a 555 timer IC that goes "high" at the output. (Not sure what voltage but not much off full 12v.)

Thanks in advance,
Mark
mmm... the BC547 is a small signal transistor. Are you sure it's capable of driving the relay?
Sorry, no defaults here, you must measure, calculate, etc, there is no short paths.
If you want to take 12v output from the 555, assuming the 555 can drive whatever he's driving AND the transistor base current at the same time, you must take into account the base-emitter voltage drop of the transistor (read Kirchoff laws), so you would get the voltage drop on the resistor to be 12v-0.7v = 11.3v
Then, you need to know what base current do you need to saturate the transistor. For that, you need to know the current needed by the relay coil, and the transistor's current gain (hFE). Base current = Collector current / hFE.
Once you know what base current you need, you can calculate the resistor. To be sure it works saturated, you can use the double of the calculated base current. The resistor needed would be 11.3v / base_current.
You also need to make sure that the transistor can safely conduct that amount of current, and that the 555 can deliver the needed base current. The datasheets have the information you need.
As you can see, this isn't trivial. You should start by the beginning, and advance to more complex circuits. This site is a good start to learn electronics, read volumes 1, 2, and 3, and try to test what you calculate.
You should look in this forum, also, as it points to a lot of information: http://forum.allaboutcircuits.com/forumdisplay.php?f=15
 

mjelic

Joined Mar 11, 2008
21
I was only explaining how to wire a transistor to switch a motor on and off, but to do what you want, there are a lot of things that can go wrong. For example: what amount of current can deliver whatever is driving the LED?
I'm sure the 555 can deliver whatever is required to saturate a transistor to drive the relay.

If it can deliver enough current, maybe you can meter the voltage between the LED's + (or whatever is driving the LED) and ground, then conect that point to the transistor's base thru a resistor.
Yep, that is what I was thinking. The voltage coming out of the 555 is only a few tenths off the full 12v, when it is high.

You should read the transistor's chapter in this site, or better, all the site, if you're interested in electronics.
I agree... And back when I was a teenager, over 20 years ago, I actually HAD that understanding as well as the time to read oodles of info to get a better understanding if I needed to. Nowadays, however, I am not so time rich.

I know what you are saying: You are not here to create my circuits for me, and I should learn something from the process. And with this I also agree. But if someone comes up with a circuit (schematic) that mostly works, and all they need is a little help with the actual selection of the correct resistor to drive a particular transistor... Is that too much to ask? OK, maybe they don't give you all the info you need to give the answer... Like, what is the coil resistance of the relay. (I have 3 to choose from: 330, 450 and 700 - Maybe the 555 could drive one of these directly?)

mmm... the BC547 is a small signal transistor. Are you sure it's capable of driving the relay?
To be honest, no I am not sure... But it's the transistor I have in hand. *shrug* If it is not powerful enough, then those here with a better understanding I would hope would tell me so, and suggest a better one.

Sorry, no defaults here, you must measure, calculate, etc, there is no short paths.... (read Kirchoff laws).... For that, you need to know the current needed by the relay coil, and the transistor's current gain (hFE). Base current = Collector current / hFE....
Yes, I know there are lots of things to take into account... But I am working with (rather extensive) knowledge that has degraded in my brain for over 20 years, and I simply don't have the time to start from the beginning and re-learn it all over again, just so I can work out a single timer circuit. It would be cheaper (time-wise) to just go out and buy a timer kit. But then what do I learn from that? At least here, when I come to you with a circuit in mind, at least I have an inkling as to how it should work... All I'm missing is a few values. Surely I (and those like me that come here for help) should be given some kudos for trying?

Thanks for replying... I do appreciate it. :)

Mark
 

Lesaid

Joined Apr 16, 2008
9
Having read through this thread, I'm a little perplexed as to why that type of device is being used to switch the motor. Might a FET not be a simpler way and avoid some of the issues? Or am I misunderstanding something?
 
Top