Tech Support > Computer Hardware > Microprocessors > Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)
Posted by Tomás Ó hÉilidhe on May 13th, 2008



I've got a bi-colour LED. It has two pins. Internally it consist of
two LED's in parallel except they face in different directions.

I'm looking into ways of using one micrcontroller pin to control the
LED as follows:
Pin High = Light up Red
Pin Low = Light up Green
Pin as Input = Nothing lights up

A friend of mine suggested to me today to connect one of the LED pins
to the microcontroller, and the other to 2.5 V. That way, if the uC
pin is high, it will source current from 5 volts to 2.5 volts. If it's
low, it will source current from 0 volts to 2.5 volts. (Of course I'd
have a resistor somewhere).

So the only question is how I'd put one of the pins at a constant 2.5
volts. My first thought was to use a zener diode, i.e. take a pin from
the LED, put into one side of the zener, and tie the other side of the
zener to ground. I'm not entirely sure if this will work though.
Another complication would be that I'd need two zeners in parallel
facing the opposite direction in order to let current flow in both
directions.

Do you think the whole 2.5 volts idea is good? What's the best way of
getting one of the LED pins to sit at 2.5 volts?

Posted by linnix on May 13th, 2008


On May 13, 11:27*am, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:
You can use another uC to PWM switch a voltage source to an op-amp
integrator, since cost/components are not an issue for you.

Posted by johnspeth@yahoo.com on May 13th, 2008


You don't need a microcontroller pin to generate 2.5V. You just need
a
constant voltage source. You can use a simple voltage divider off 5V
which
uses two equal valued resistors that serve as a voltage divider AND
current
limiters.

It's good if it meets your requirements. Your stated requirement is
2.5V
from 5V. An implied requirement is it works. If you try it and it
works,
it's a good idea. You're the judge of "good".

There is no way. Your datasheet will tell you the pin will either be
0V or
5V if it's an output. It will be at high impedance if it's a an input
and
your external circuit will determine what voltage it will be.

JJS

Posted by Spehro Pefhany on May 13th, 2008


On Tue, 13 May 2008 11:27:21 -0700 (PDT), Tomás Ó hÉilidhe
<toe@lavabit.com> wrote:

Predict the current through each LED when it is on, over unit-to-unit
variations and temperature. Then see if you think it's a good idea.

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

Posted by Jim Granville on May 13th, 2008


Tomás Ó hÉilidhe wrote:

You can get Source/Sink regulators, intended for DDR memory terminators,
they are one option. Or an opamp, if the total node power is OK.
You might want slightly different from 2.5V, as the LED Vfs are not
the same, nor are the uC Pin drivers, and you might want to
adjust the 5V power a little.

-jg


Posted by Jim Stewart on May 13th, 2008


Jim Granville wrote:
Or an RS-485 driver, my first choice. Unfortunately,
he wants to use no more than one I/O pin.

Posted by Nils on May 13th, 2008


Maybe I'm just dump, but:

Why don't you simply use a 4066 bilateral-switch, a current-limiting
resistor plus some kind of inverter (can be as simple as a NPN-tranny in
your case)?


It's cheap and just works...

Nils

Posted by Tomás Ó hÉilidhe on May 13th, 2008


On May 13, 7:27*pm, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:


I think I've found what I want:

http://ourworld.compuserve.com/homep...den/page12.htm

Something along those lines anyway.

Posted by linnix on May 13th, 2008


On May 13, 3:40*pm, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:
I am too busy at the moment. Anybody wants to show him the LM317
datasheet?

Posted by Tomás Ó hÉilidhe on May 13th, 2008



I have a question...

If I have an LED that has about 2 volts across it, then is it OK to
put a 2 volt power supply across it without a current limiting
resistor?

My overall power supply would be 9 V coming from a square battery, but
I'll be putting it thru a voltage regulator to give me out 2 V.

I'll then be putting the 2 V across the LED.

Can I leave out the LED's current-limiting resistor, or is there still
a chance of there being too much current that would fry components?

Posted by linnix on May 13th, 2008


Please ignore my last post, since you are changing spec on me. You
said you were getting 2.5V out of 5V with the LM317.


Posted by Jim Granville on May 13th, 2008


Tomás Ó hÉilidhe wrote:

Go to the data sheet.
Find the V/I curves, and include the temperature coefficent.
Now find the MIN and MAX specs, and draw those load-lines for
2V drive.

The real world is a little more forgiving than the corner cases,
and you will find LEDs within a batch match better than random
scattering MIN-MAX.
[SMD leds on a tape, are actually very well Vf matched]

Your practical problems will be brightness matching (well before
your current variations hit damage levels), and thermal tracking.

-jg


Posted by Vladimir Vassilevsky on May 14th, 2008




Tomás Ó hÉilidhe wrote:

LEDs are not compliant with C99.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com



Posted by MK on May 14th, 2008



"Tomás Ó hÉilidhe" <toe@lavabit.com> wrote in message
news:205cd1d5-1f20-4828-88d7-855cb4efe7a0@d1g2000hsg.googlegroups.com...
Tomas -

This has been said before - please get a processor with more pins - you are
draining the worlds supply of engineering resource by asking us to think up
single pin solutions to two pin problems - this may in fact be the cause of
global warming !!

However - to address your problem - as always soemone got there before you:

en.wikipedia.org/wiki/Th%C3%A9venin%27s_theorem

Connect 2 resistors of equal value (R) in series from the 5V supply to 0V
and the mid point is the 2.5V you need. Connect the LED from the mid point
to your processor pin and drive high/low/open.
The current limiting you *NEED* for leds comes free because the source
resistance of the 2.5V is R/2.

I'm going to let you do the sums to work out the ideal resistor value for
the LED that you have.

Michael Kellett

www.mkesc.co.uk




Posted by CBFalconer on May 14th, 2008


MK wrote:
Of course the on voltage of the LED, and the variance of that, will
not affect the values in the least. Nor will the variance in
current drive needed for the two LED colors.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.


** Posted from http://www.teranews.com **

Posted by linnix on May 14th, 2008


On May 14, 6:27 am, CBFalconer <cbfalco...@yahoo.com> wrote:
So, we need 2 resistors at the uC end, and 2 resistors at the voltage
regulator end. Oh, great, we eliminated 2 LED resistors with a
regulator and 4 other resistors.

Posted by Andrew Smallshaw on May 14th, 2008


On 2008-05-13, Tomás Ó hÉilidhe <toe@lavabit.com> wrote:
Potential problem here. What voltage is present on the MCU pin?
5V strongly suggests TTL compatible inputs/outputs to me which are
_not_ 0V and 5V. From memory low is up to 0.8V and high is at
least 2.0V. There is a possibility that your pin could be 'high'
and delivering 2.0V which is still _less_ than the 2.5V on the
other end of the LED.

This is of course the worst case scenario, but the LED's barrier
voltage is also conspiring against you. The exact value varies
depending on the device but typically around 1.7V is needed for
the LED to conduct. 2.5V+1.7V=4.2V which is a big ask from a 5V
device.

--
Andrew Smallshaw
andrews@sdf.lonestar.org

Posted by Jim Granville on May 14th, 2008


Tomás Ó hÉilidhe wrote:

Or, if you really want to have LOTS of LED drive capacity ,
and low OFF power, then you CAN drive two power outputs, from a single
pin this way : (These device have a special 3 State sense )

I think it could also drive either 2 or 3 terminal LEDs

http://www.intersil.com/cda/devicein...ISL6615,0.html

http://www.intersil.com/cda/devicein...ISL6609,0.html

-jg





Posted by MK on May 15th, 2008



"linnix" <me@linnix.info-for.us> wrote in message
news:f95b16db-d9ae-4f86-b5c5-27b959d18012@q24g2000prf.googlegroups.com...
You've got some extra resistors and a voltage regulator in here somehow - my
suggestion to Tomas was that he use 2 resistors and the 5V supply already
available for the processor. My reference to Thevenin (which you snipped)
was to give him a hint as to how to work out the values.

Given the constraints of the original question I am interested in your
alternative suggestions.

Michael Kellett

www.mkesc.co.uk



Posted by MK on May 15th, 2008



"CBFalconer" <cbfalconer@yahoo.com> wrote in message
news:482AE8D6.8333F276@yahoo.com...
Hello Chuck,

I think you mis-typed. The forward voltage of the LEDs will affect the
current.

If the two LEDs need different drive currents the resistors can be set to
different values.

The OP wanted a simple solution and set some constraints in his question.

Obviously a simple linear, passive solution has limits.

Michael Kellett

www.mkesc.co.uk