Re: Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)




"Tomás Ó hÉilidhe" <toe@xxxxxxxxxxx> wrote in message
news:205cd1d5-1f20-4828-88d7-855cb4efe7a0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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?

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



.



Relevant Pages

  • Re: PMOS in parallel with NMOS
    ... Connect 5 volts directly to the emitter. ... The 0 volts on the base is provided by a microcontroller pin. ... happens to come from an LM7805 voltage regulator. ... I am not as worried about the LEDs as I am the MCU. ...
    (comp.arch.embedded)
  • Re: PMOS in parallel with NMOS
    ... NMOS transistor. ... When my microcontroller pin is high, I want it to be green. ... be turned on and it will put five volts onto the green anode. ... both LEDs off. ...
    (comp.arch.embedded)
  • Re: LM3914 --help :/
    ... The output current for the LEDs is a 10x current mirror of the output ... of the REF OUT pin. ... voltage of 1.25, ...
    (sci.electronics.design)
  • Re: LED & Resistor befuddlement
    ... Spehro Pefhany wrote: ... >>With this circuit the IO pin will be high if the MCU is not pulling it ... > This will work with good margin for some LEDs and some input buffers, ... output low for a few cycles then switch it back to an input. ...
    (comp.arch.embedded)
  • TECH: Stern or Sega Whitestar board info
    ... There are 2 leds on the CPU/Sound board. ... trying to run CPU version 1.03 with .90 sound roms. ... it comes from pin 19 on U6 of the driver board ... you can verify the signals on the DS1232 chip. ...
    (rec.games.pinball)