Jump to content
Electronics-Lab.com Community

newb transistor question


Recommended Posts

I have an npn transistor set up as a switch driving an LED.

If everything is connected to the 5v dc supply it works fine. But I want it to switch a 12v supply using a 5v microcontroller output. If I connect everything to the 12 v supply it works great to.

But when the base is controlled by the 5V supply and the collector -emitter/led is connected to the 12 v rail it doesn't work.

I've got the software working and everything but it's frustrating because I can't work out why it won't drive my 12V motors with the transistor base using a 5V supply.

What am I missing?

Link to comment
Share on other sites


Hi Kiwi,
Please post a sketch of your circuit for us to see whether you grounded the transistor's emitter and the LED with its current-limiting resistor is connected to its collector, and a current-limiting resistor is in series with the transistor's base.

Instead of switching the LED/resistor, it sounds like you are trying to switch the supply, maybe your transistor is an emitter-follower (with the LED/resistor connected to its emitter) instead of a switch.

Link to comment
Share on other sites

I can only do a sketch in bmp format so I can't upload it. Is there another way?

I have a BC 549 npn transistor with an led and series resistor connected between the 12 v rail and the collector.

The emitter is connected directly to 0 v, no resistor.

the base is connected to 5v through a 1.8K resistor.

As soon as I connect the base to the 12 V supply it works OK. Or if I re-wire the whole thing to work completely from the 5v supply it also works fine.

The 12 v supply is a benchtop unit and the 5v supply is a regulated supply on the pic experimenter board.

If I connect the transistor switch to 5v it will switch on and off as I connect disconnect the base to 5v. (same if everything is 12V).

I have the pic toggling an output. If I connect the base to the pic output instead of 5V the led doesn't flash. It just stays on.

To prove the pic is OK I have another LEd and resistor connected to the 0v being driven by the same output on the pic. This is flashing this led as expected.

Link to comment
Share on other sites

You're circuit should something like this:

Also:
Make sure Rb is of the right value to turn on the transistor when is driving its load, to derive its minimum value use the following formulae:

Ib = Il/HFE
Rb = (Vd-0.7)/Ib

Where:
Il = the maximum load current
Ib = base current in amps.
HFE = the gain of the transistor (look at the datasheet)
Vd is the voltage you're using to switch the load with.
Rl is the load eg. motor (Don't forget the protection diode connected in reverse)

post-0-14279142060267_thumb.gif

Link to comment
Share on other sites

Hi Kiwi,
The LED and its driver transistor don't turn off because the output voltage of the pic doesn't go low enough (0.5V to 0.6V but should be less).
You can fix it by adding a resistor from the base to 0V to make a voltage divider with the existing 1.8K resistor, try 1.8K or less.

The BC549 audio transistor may be overloaded when driving a motor since its absolute maximum collector current allowed is only 100mA. When the motor is started, loaded or stalled it will draw much more current than its typical rating and the BC549 might be damaged.

Link to comment
Share on other sites

Thanks. that's exactly what my circuit is like except there's an LEd in the collector line and the transistor input is 5 v. The transistor is saturated.

I know this should work. I must have something badly wrong.

I can make the LED light if all the + voltages are the same. But even then the LED won't flash with the high/low pic output driving it.

I'm going to buy new components and start from scratch, use a different breadboard too.

arrgh!

Link to comment
Share on other sites

Hi Kiwi,
Before you said the LED stayed on, now you say it doesn't light. Which is it? ??? ??? ???

You say that it lights with 5V on the base, but I think you mean on its 1.8K base resistor, and a 5V supply for its collector's LED. But when you use a 12V supply for the collector's LED, it doesn't light unless the input to the base resistor is also 12V.

Did you forget to join the negative wire of both power supplies together? ???

Maybe the transistor doesn't have enough gain to conduct three times the current with a 12V supply feeding the LED because it is wired backwards.The CBE pinput of a BC549 is the opposite to the EBC of a 2N3904. A transistor that is connected backwards will work somewhat if its load current and supply voltage are low. ::)

Link to comment
Share on other sites

Guru, many apologies I am sorry if I have confused anyone. I appreciate your time.

"You say that it lights with 5V on the base, but I think you mean on its 1.8K base resistor, and a 5V supply for its collector's LED. But when you use a 12V supply for the collector's LED, it doesn't light unless the input to the base resistor is also 12V."

This is exactly right.

I have not joined the 0v rail of the two power supplies. I'll try this.

I am sure the transistor is wired correctly.

Thanks for the help.

I am thinking of using a Mosfet ultimately, but I need to solve this problem, just because.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...