Shop OBEX P1 Docs P2 Docs Learn Events
I need a voltage sink reality check — Parallax Forums

I need a voltage sink reality check

ElectronegativityElectronegativity Posts: 311
edited 2009-11-21 23:42 in Propeller 1
Suppose I have a Vdd of 6V coming onto a board.
I run that through a regulator that produces Vcc of 3.3V and place an 11 Ohm resistor between Vcc and a Propeller Chip.

Now suppose I run Vdd to the positive side of a blue LED with a forward voltage drop of 4V, and connect the negative side of the LED to one of the Propeller's pins.

It seems to me that the Propeller is sinking 2V, and therefore I should be able to get away with this, but thought it would be wise to ping the forum.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I wonder if this wire is hot...

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-21 20:13
    You might possibly damage your Propeller. One question for you is: What is the actual forward voltage drop of the LED, particularly the forward voltage drop at low currents? You may find that it's substantially lower than 4V. Remember that the Propeller I/O pin has a diode to Vcc such that it will conduct if the I/O pin voltage rises more than one diode drop above Vcc. The diode will be damaged if its current is greater than 0.5mA and the Propeller will be damaged if the local voltage on the Vcc bus on the chip rises much above 4V.

    Why are you putting an 11 Ohm resistor between Vcc and the Propeller chip?
  • ElectronegativityElectronegativity Posts: 311
    edited 2009-11-21 21:07
    Hi Mike, thanks for helping out.

    For the last few years I have been making light up jewelery and giving them as Christmas presents using SX chips and was horrified by their end of life.
    I ordered a batch of Propeller chips and need to get up to speed quickly on the new hardware.

    There is no problem running an SX with 6V from 2 coin cells and powering LEDs to blink in various pattens, but the propeller will fry if I try that.
    The idea of the 11 Ohm resistor was to limit the current to the Propeller to 300mA, but I will leave it out if you don't think it is necessary.

    What I plan is a circle of 16 LEDs controlled by a Propeller to display various patterns of light that is powered by 2 CR2032 coin cells.
    I ordered some QFN Propellers and found voltage regulators and EEPROM in 6-MLP and 8-MSOP packages to keep everything as small as possible since the whole necklace will only be about 1.8" in diameter. I am using 1206 SMD resistors and LEDs and was hoping to get away without using transistors.

    Worst case scenario I have some 2222As in SOT-23 but it will significantly up the part count and board complexity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-21 21:27
    You don't need the 11 Ohm resistor.

    You should have no problem with red, green, or yellow LEDs running off 3V or less. I've seen some datasheets for white LEDs where the forward voltage is less than 3V at currents under about 10mA and there's a Panasonic blue LED whose datasheet shows a forward voltage under 3V at 2.5mA or less. The forward voltage is very much current dependent and you're not going to want to run these at high currents anyway because of battery life. You certainly don't need a crystal and should run your program with the RCSLOW built-in clock.

    Sounds like a really lovely present. You might consider a piezoelectric speaker and have it optionally play tunes.

    Post Edited (Mike Green) : 11/21/2009 9:32:47 PM GMT
  • ElectronegativityElectronegativity Posts: 311
    edited 2009-11-21 21:36
    Yes, I plan to make some smaller ones in red yellow and orange that run off a single CR2470.

    As far as battery life goes, I always power the LEDs near their peak efficiency and control the intensity by flickering.

    I guess I'll just suck it up and use the transistors for high voltage lights.

    Thanks again for the help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-21 21:48
    The problem that you run into with directly switching the LEDs with the Prop and running them off 6V is that their forward voltage can be quite a bit under 3V at low currents. If the I/O pin voltage rises above around 3.9V, you'll get conduction through the protective diodes. If you pick your blue and white LEDs carefully (according to their datasheets) and test them yourself for forward voltage at low currents, you may find that their forward voltage never gets anywhere near the point where the Propeller's protective diodes would conduct. In that case, you'd be fine running them from the 6V supply. It's just that you can't tell without careful examination of the datasheet and then verifying the behavior with a sample diode after you get them.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-21 21:57
    The '2222s will require base resistors. You can get transistors with built-in base resistors in SOT-23 and smaller (e.g. SOT-416) packages. You can also get dual resistor-included transistors in SOT-23-5 and -6 and smaller packages. DigitKey carries both Rohm and Panasonic brands of these. None of them is very expensive. (BTW, they're sometimes called "logic transistors".)

    -Phil
  • ElectronegativityElectronegativity Posts: 311
    edited 2009-11-21 22:07
    I understand what you are saying, but if I use a 332 ohm resistor and a 6V source then the current will be fixed at 18mA.

    It's not clear to me how the low current condition could manifest under that circumstance.

    Considering that the LDO voltage regulator will drop Vcc under the 2.7V brownout threshold when Vdd is around 3.7V, the lowest possible current is around 11 mA.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • ElectronegativityElectronegativity Posts: 311
    edited 2009-11-21 22:10
    Hi Phil.

    I'm a little hazy here since I haven't used a transistor in awhile, but wouldn't the LED's protective resistor fulfill that requirement?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-21 22:24
    The resistors Phil is talking about are the base resistors of the transistors and the LED's resistors won't affect the base circuit. These serve the same purpose as the LED resistors, but for the base-emitter diode of the transistor.

    The problem that you run into with the LED running off 6V is "what happens with the voltage on the I/O pin when the LED is not on?"

    An LED is not a perfect diode. If the Propeller I/O pin is set to input mode, there's only a leakage current from the Propeller pin through the imperfect LED to the 6V supply. If the forward voltage of the LED at that current is over 2.1V or so, you're safe since the Propeller pin will be at 3.9V. If the forward voltage of the LED is at 2.1V or less, the protective diode will start to conduct to the Vcc line. If the LED can leak at least 0.5mA without the forward voltage of the LED rising above 2.1V, the protective diode will become damaged and may conduct enough current into the Propeller chip's internal Vcc power bus so that the voltage from point to point across the chip will exceed 4V and damage some of the gate oxide on the chip (which can only handle 4V before damage can occur).

    There are a lot of "if"s in the previous paragraph and they can be checked. It may be that you're safe, but it's impossible to be sure without checking. Remember that the voltage drop across a 330 Ohm resistor is low when the current through the resistor is low. I don't know what the "leakage" current through the LED is. It's not one of those things that's carefully characterized on the LED datasheet.

    Post Edited (Mike Green) : 11/21/2009 10:29:21 PM GMT
  • ElectronegativityElectronegativity Posts: 311
    edited 2009-11-21 22:42
    Hmm...

    That last post by Mike raised a problem I hadn't considered.

    4V was an arbitrary number I threw out for the sake of making the numbers easy, it's actually closer to 3.6V for maximum efficiency but they will run on less.

    Suppose the actual shut off voltage is 2.4V.
    By Mike's numbers above the Propellor will be safe but there is another problem.

    The light will never shut off!

    Even if I pull the pin high to 3.3V there will still be a 2.7V differential across the light.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-21 22:54
    That's why you have to work out the details. If you set the I/O pin to output high, the voltage on the pin can be as low as 3V or higher than 3.3V depending on what you're doing.

    By the way, it's getting to be close to Christmas time. There are still lots of SX chips available. If you have an existing design, you could certainly produce this years' batch using the SX (and maybe the next year or two's batches as well). You could spend next year working on the new design.
  • ElectronegativityElectronegativity Posts: 311
    edited 2009-11-21 23:42
    I'm intrigued by the Propeller now.

    Certainly the SX will provide a fallback if I can't get up to speed fast enough, but the Propeller assembly code is much more powerful and it has substantially more RAM that's better organized.

    The PII looks like it will open up some new doors as well.
    I have some Cypress L2 cache lying around that needs 52 pins just for the address and data.
    It can crank out a 32 bit DDR bus at 166 MHz, so it could communicate to each cog in turn and provide the equivalent of a 256 bit bus in one cycle of the hub.
    That kind of data flow and single instruction per cycle pipelining opens up the possibility of putting together reasonable demos of chaos theory of computational fluid dynamics.

    Of course I could make such a demo on my PC, but where is the fun in that?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
Sign In or Register to comment.