Reply by Jim Granville May 12, 20082008-05-12
Tom�s � h�ilidhe wrote:

> 2) Choose a PMOS transistor that needs a very low gate voltage to turn > on.
Do you mean higher gate threshold voltage ? A high threshold PMOS part, would be turned on by the Port LOW, but not (fully) turned on by a Red Led voltage above that. Green LEDS commonly have higher Vf, so you could swap R/G here to get more margin. (then, the Green Led Vf is trying to turn on the PMOS driving the Red Led ) -jg
Reply by Spehro Pefhany May 12, 20082008-05-12
On Mon, 12 May 2008 21:59:16 +0200, Arlet Ottens <usenet+5@c-scape.nl>
wrote:

>Tom&#4294967295;s &#4294967295; h&#4294967295;ilidhe wrote: >> On May 12, 10:43 am, Arlet Ottens <usene...@c-scape.nl> wrote: >> >>> If you turn off both LEDs, there will be a small current through the >>> pull-up resistor, the 200 Ohm resistor, and the red LED. >>> >>> For example, if your pull-up resistor is 100k, the current will be about >>> 3/100k = 30uA. The voltage drop across your 200 Ohm resistor is then >>> reduced to only 200R*30uA = 6mV, and your gate voltage approximately >>> equal to Vf = 2V. This may be sufficient to turn it on enough to make >>> the green LED light up. >> >> >> Oh I see now, thanks for that. >> >> I think I've got two options in that scenario: >> 1) Decrease the value of the pull-up resistor so that less voltage is >> dropped across it. The only problem with this though is that the Red >> LED might light dimly at all times because of the increased current. > >Yes, any pull-up low enough to turn off the green LED will turn on the >red one. > >> 2) Choose a PMOS transistor that needs a very low gate voltage to turn >> on. > >This might work, but it still needs to turn on reliably, for a range of >devices and temperatures. > >> How would you go about it? > >My 2 favourite solutions are a) pick a controller with more pins, or b) >use one or more 74HC595 devices to create additional outputs.
This solution works for LEDs that do not have a common: http://electronicdesign.com/Articles/Print.cfm?ArticleID=1683 This solution works for bipolar LEDs (two leads): http://www.edn.com/contents/images/112201di.pdf For your 3-lead LED with common cathode, there's a simple circuit along the lines of the above that uses four parts (a dual optoisolator and three resistors). Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Reply by Arlet Ottens May 12, 20082008-05-12
Tom&#4294967295;s &#4294967295; h&#4294967295;ilidhe wrote:
> On May 12, 10:43 am, Arlet Ottens <usene...@c-scape.nl> wrote: > >> If you turn off both LEDs, there will be a small current through the >> pull-up resistor, the 200 Ohm resistor, and the red LED. >> >> For example, if your pull-up resistor is 100k, the current will be about >> 3/100k = 30uA. The voltage drop across your 200 Ohm resistor is then >> reduced to only 200R*30uA = 6mV, and your gate voltage approximately >> equal to Vf = 2V. This may be sufficient to turn it on enough to make >> the green LED light up. > > > Oh I see now, thanks for that. > > I think I've got two options in that scenario: > 1) Decrease the value of the pull-up resistor so that less voltage is > dropped across it. The only problem with this though is that the Red > LED might light dimly at all times because of the increased current.
Yes, any pull-up low enough to turn off the green LED will turn on the red one.
> 2) Choose a PMOS transistor that needs a very low gate voltage to turn > on.
This might work, but it still needs to turn on reliably, for a range of devices and temperatures.
> How would you go about it?
My 2 favourite solutions are a) pick a controller with more pins, or b) use one or more 74HC595 devices to create additional outputs.
Reply by May 12, 20082008-05-12
On May 12, 10:43=A0am, Arlet Ottens <usene...@c-scape.nl> wrote:

> If you turn off both LEDs, there will be a small current through the > pull-up resistor, the 200 Ohm resistor, and the red LED. > > For example, if your pull-up resistor is 100k, the current will be about > 3/100k =3D 30uA. The voltage drop across your 200 Ohm resistor is then > reduced to only 200R*30uA =3D 6mV, and your gate voltage approximately > equal to Vf =3D 2V. This may be sufficient to turn it on enough to make > the green LED light up.
Oh I see now, thanks for that. I think I've got two options in that scenario: 1) Decrease the value of the pull-up resistor so that less voltage is dropped across it. The only problem with this though is that the Red LED might light dimly at all times because of the increased current. 2) Choose a PMOS transistor that needs a very low gate voltage to turn on. How would you go about it?
Reply by Jim Granville May 12, 20082008-05-12
Tom&#4294967295;s &#4294967295; h&#4294967295;ilidhe wrote:
> On May 11, 5:57 pm, Arlet Ottens <usene...@c-scape.nl> wrote: > > >>>The idea is: When the microcontroller pin is high, the Green will >>>light on its own. When the microcontroller pin is low, the Red will >>>light on its own. >> >>The red LED will pull the voltage down to its forward voltage (check >>value for Vf in the datasheet). This will probably turn on your p-FET > > > > Could you please explain this to me? I've looked over my circuit and I > can't see any way in which the Red anode's voltage could turn on the > PMOS. > > When current is flowing thru the Red LED, there'll be about 2 V across > the LED about 3 V across the 200 ohm resistor. > > When current is flowing thru the Green LED, the 0 V from the uc will > turn on the PMOS which will allow 5 V onto the Green anode, and thus > there should be about 2 V across the LED and 3 V across the 200 ohm > resistor. > > Do I misunderstand something?
Yes. How many states did you describe in your original operation, and how many have you covered above ? Cover all the states in your analysis, and you will see what Arlet refers to. -jg
Reply by Arlet Ottens May 12, 20082008-05-12
Tom&#4294967295;s &#4294967295; h&#4294967295;ilidhe wrote:
> On May 11, 5:57 pm, Arlet Ottens <usene...@c-scape.nl> wrote: > >>> The idea is: When the microcontroller pin is high, the Green will >>> light on its own. When the microcontroller pin is low, the Red will >>> light on its own. >> The red LED will pull the voltage down to its forward voltage (check >> value for Vf in the datasheet). This will probably turn on your p-FET > > > Could you please explain this to me? I've looked over my circuit and I > can't see any way in which the Red anode's voltage could turn on the > PMOS. > > When current is flowing thru the Red LED, there'll be about 2 V across > the LED about 3 V across the 200 ohm resistor.
If you turn off both LEDs, there will be a small current through the pull-up resistor, the 200 Ohm resistor, and the red LED. For example, if your pull-up resistor is 100k, the current will be about 3/100k = 30uA. The voltage drop across your 200 Ohm resistor is then reduced to only 200R*30uA = 6mV, and your gate voltage approximately equal to Vf = 2V. This may be sufficient to turn it on enough to make the green LED light up.
Reply by May 12, 20082008-05-12
On May 11, 5:57=A0pm, Arlet Ottens <usene...@c-scape.nl> wrote:

> > The idea is: When the microcontroller pin is high, the Green will > > light on its own. When the microcontroller pin is low, the Red will > > light on its own. > > The red LED will pull the voltage down to its forward voltage (check > value for Vf in the datasheet). This will probably turn on your p-FET
Could you please explain this to me? I've looked over my circuit and I can't see any way in which the Red anode's voltage could turn on the PMOS. When current is flowing thru the Red LED, there'll be about 2 V across the LED about 3 V across the 200 ohm resistor. When current is flowing thru the Green LED, the 0 V from the uc will turn on the PMOS which will allow 5 V onto the Green anode, and thus there should be about 2 V across the LED and 3 V across the 200 ohm resistor. Do I misunderstand something?
Reply by linnix May 11, 20082008-05-11
On May 11, 1:55 pm, Jim Granville <no.s...@designtools.maps.co.nz>
wrote:
> linnix wrote: > >>My microcontroller is the PIC16F684. > > > You are using the wrong uC. You need our multi-level uC. The I/O > > pins can be set to 1/4 VCC, 1/2 VCC or 3/4 VCC. An advanced version > > can drive 1/8 VCC, 3/8 VCC, etc. They are less than $1 each, at high > > enough volume. > > What drive level is that at ?
Depends on the customer's budget. We can go as high as 100mA if necessary.
> Sounds like an LCD driver, which would be slow into a > Power MOSFET gate Cap ?
You don't need MOSFET, drive LEDs directly. When there is a will (money), there is a way.
> > -jg
Reply by Jim Granville May 11, 20082008-05-11
linnix wrote:

>>My microcontroller is the PIC16F684. > > > You are using the wrong uC. You need our multi-level uC. The I/O > pins can be set to 1/4 VCC, 1/2 VCC or 3/4 VCC. An advanced version > can drive 1/8 VCC, 3/8 VCC, etc. They are less than $1 each, at high > enough volume.
What drive level is that at ? Sounds like an LCD driver, which would be slow into a Power MOSFET gate Cap ? -jg
Reply by linnix May 11, 20082008-05-11
> My microcontroller is the PIC16F684.
You are using the wrong uC. You need our multi-level uC. The I/O pins can be set to 1/4 VCC, 1/2 VCC or 3/4 VCC. An advanced version can drive 1/8 VCC, 3/8 VCC, etc. They are less than $1 each, at high enough volume.