Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Will this work to drive my bi-polar LED?

Status
Not open for further replies.

MikahB

New Member
Hi guys, I'm building a prototype circuit and would like to implement the "truth table" on the attached diagram. I'm a complete newb at circuit design stuff, and am just wondering if the attached diagram will in fact implement the behavior I'm trying to achieve at the LED. Both ACTIVE and ALARM signals are +5V, btw.

Specifically, I'm unsure about the FET I have driving the "red" LED - will it be happy driving this direction or do I need to switch source and drain?

I appreciate any feedback/insight.

EDIT: The "TO LED OUTPUT" is because there will be an LED on the board, but I hope to be able to drive another LED by connecting this output and ground to it approximately 10 feet away.
 
Last edited:
The minimum output high voltage from an old fashioned 74LS08 is only 2.7V. But your Mosfets need a gate-source voltage much higher to fully turn on and some barely turn on conducting only 1mA when the gate-source voltage is 2.4V (the maximum threshold voltage).

Since you have one pin of the bi-color LED connected to ground then the RED LED will never light since it needs its other pin to be at a negative voltage that your circuit does not have.

Your idea of making a NAND gate with two series Mosfets and a voltage divider will not work.

The LM324 opamp does not do anything since its output will be low all the time.
 
In short no. with one side connected to ground, you'll need dual power supplies. Something above ground for one color and something below ground for the other.

Using a single power supply, you need to reverse the connections on the leds (H-Bridge style) or connect one side to an intermediate voltage (2.5V instead of ground). There is a recent thread I started for options to drive bi-color leds from a single power supply. Check out https://www.electro-tech-online.com/threads/lighting-bi-color-led-from-single-power-supply.124434/
 
The minimum output high voltage from an old fashioned 74LS08 is only 2.7V. But your Mosfets need a gate-source voltage much higher to fully turn on and some barely turn on conducting only 1mA when the gate-source voltage is 2.4V (the maximum threshold voltage).

Since you have one pin of the bi-color LED connected to ground then the RED LED will never light since it needs its other pin to be at a negative voltage that your circuit does not have.

Your idea of making a NAND gate with two series Mosfets and a voltage divider will not work.

The LM324 opamp does not do anything since its output will be low all the time.

So I'm not even close, sounds about right! Thanks for your input.

I was trying to get around having a second power source at -5V, but I see now that I needed that on V- on my op-amp (rather than ground) to make that work anyway.

Understood about the 74LS08 output voltage - I didn't check that compared to my required gate voltage, I will find a more appropriate XOR chip.

Assuming I have an output from the XOR that will actually turn on the gate, I"m not clear why my series MOSFET's won't work - could you elaborate a little bit?
 
Your circuit does not make any sense.
Your series Mosfets have backwards polarity, your voltage divider produces a voltage that is much too low and your gate voltages for the Mosfets are much too low.

Adding a negative supply for the opamp will not do anything because its inputs have no signal.
 
Your circuit does not make any sense.
Your series Mosfets have backwards polarity, your voltage divider produces a voltage that is much too low and your gate voltages for the Mosfets are much too low.

Adding a negative supply for the opamp will not do anything because its inputs have no signal.

Okay, scrapped version 1, here is another version that is simpler if nothing else. Thanks ADWSystems for the link to your thread, this circuit is based on a couple of the solutions suggested there. It makes me feel (very) slightly better that this is not entirely trivial even for those who, unlike myself, know what they are doing.

Audioguru - thanks for your feedback. Though your delivery is... uhhh... "succinct," it's spot on and helpful. Transistor reversed polarity is because this mechanical engineer cannot get it through his head that current flows in the drain and out the source. But, point taken and fixed - collector/emitter is slightly more intuitive to me.
 
I believe your transistor bases will need current limiting resistors.

Strictly speaking, I don't believe R25 is required.

Given the same current requirements for the same brightness, Red will be brighter because the green has two voltage drops to ground, opposed to one for the red (one transistor above, two below). You could install Q88 (new) above Q8 and always on to equal the voltage drops.

I'm also thinking you could exchange the XOR gate for another properly wired transistor to control Q9.

Off the cuff, I'm thinking Q99 (new) could be connected Collector to R22, Emitter to ground, and base to alarm, to control Q9. When alarm is on Q8 will be on and Q99. Q99 on will pull Q9 base to ground, turning off Q9. I think. Can someone double check my logic?
 
Last edited:
Given the same current requirements for the same brightness, Red will be brighter because the green has two voltage drops to ground, opposed to one for the red (one transistor above, two below).
No.
The two series transistors each have a saturation voltage loss of only 0.1V, so their total voltage loss of 0.2V is less than half the voltage loss of 0.7V from the emitter-follower that drives the red LED.
A green LED has a higher forward voltage than a red LED so the current in the red LED will be higher.

I agree that R25 does nothing and can be replaced by a piece of wire and that the transistors need series base resistors.
 
Last edited:
Okay, I believe this is close.

Not sure the ideal size for the series base resistors - I picked 1k to give me 5mA but I suspect the base doesn't need that much current to stay on. I also suspect the data sheet for the MPSA18 tells me exactly, but I haven't figured out where yet.

Elk - I need to do some research into exactly what your symbols mean, but I will look in to your solution as it looks much more elegant. Thanks for all the help on this. So much to learn.
 
Last edited:
No.
The two series transistors each have a saturation voltage loss of only 0.1V, so their total voltage loss of 0.2V is less than half the voltage loss of 0.7V from the emitter-follower that drives the red LED.
A green LED has a higher forward voltage than a red LED so the current in the red LED will be higher.

I agree that R25 does nothing and can be replaced by a piece of wire and that the transistors need series base resistors.

I was thinking they were higher 0.3 to 0.5V. Thanks for the double check. Any thoughts on the wiring for Q99?
 
Not sure the ideal size for the series base resistors - I picked 1k to give me 5mA but I suspect the base doesn't need that much current to stay on.
the datasheet mfor almost EVERY little transistor shows that it saturates as a switch very well when its base current is 1/10th its collector current.
Most ordinary LEDs are spec'd with a current of 20mA so the saturated base current of the transistor should be 2mA, not 5mA.

How did you calculate 5mA? It would be 5mA only if the transistor is SHORTED!
The LED uses 20mA so the base current should be 2mA, not 5mA.

I suspect the data sheet for the MPSA18 tells me exactly, but I haven't figured out where yet.
The datasheet spec's its max saturated voltage loss when its base current is 1/10th its collector current here:
 
Q99 is not shown on a schematic in this thread, maybe it is in your thoughts.

Yes it is in my thoughts as noted on a previous post that you referenced. I was asking if the XOR gate could be replaced by a 'cleverly' wired transistor which I dubbed Q99 as I proposed hooking it to Q9. I don't see much point of putting a 14 pin chip on the board for one gate when a 3 pin transistor could do the job. But the question was if my proposed wiring was correct?
 
the datasheet mfor almost EVERY little transistor shows that it saturates as a switch very well when its base current is 1/10th its collector current.
Most ordinary LEDs are spec'd with a current of 20mA so the saturated base current of the transistor should be 2mA, not 5mA.

That makes sense. I did not understand that the base current had anything to do with the collector current. I need to do some more reading.

How did you calculate 5mA? It would be 5mA only if the transistor is SHORTED!
The LED uses 20mA so the base current should be 2mA, not 5mA.

I"m almost afraid to answer. In my mind, pulling down from 5V through a 1k resistor made 5mA available - I thought that would be more than enough. Apparently I was looking at it from completely the wrong end of the issue.

The datasheet spec's its max saturated voltage loss when its base current is 1/10th its collector current here:

Thank you for pointing that out.

So, can I infer from this that the voltage drop across the transistor generally increases as the ratio of base current to collector current increases? In this case, when it's 1/50th of collector current it's 0.2V and goes up by 50% at 1/10th.

canadaelk said:
MikahB: Search for and download the Cedar Logic Simulator 1.5 Beta. Verify my scribbling. E

Will do - funny I made an Excel spreadsheet to try to do the same thing - this looks significantly more user friendly.
 
I did not understand that the base current had anything to do with the collector current.
The current gain of a transistor (hFE for DC and hfe for AC) is when the transistor is active with plenty of collector to emitter voltage so it amplifies and is not saturated. When saturated the current gain is much less and since some transistors are very sensitive but other transistors are less sensitive then the spec shows to use a base current that is 1/10th the collector current so that ALL transistors saturate fairly well.
 
Attached is a slick little circuit that you may want to consider using. This is something I came across on the web several years ago that I redrew and saved. The circuit is designed around a single +12 Volt supply with inputs A & B being 5 Volt TTL level signals. The V+ could be reduced to 5 Volts and the values of R3 and R4 reduced. As drawn the LED current will be right about 20 mA. There is a nice little caveat in the logic. If a & B are low (off) nothing happens. If A is high and B is low you get one color. If B is high and A is low you get the other color. This si red or green depending on the LED orientation. When A & B are both high then both LEDs oscillate and you get a sort of yellow / amber color. Remember that R3 and R4 determine the LED current. You may want to try a few base resistors. As I recall I used it as drawn years ago.

Also, V1, V2 and V3 were only used for the simulation where I have the 12 volt supply and 5 volt pulses applied so don't let them confuse you. :)

Ron
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top