Simple LED question
TC
Posts: 1,019
Hello all,
I just want to confirm what I am figuring out. Could someone please tell me if I am right or not?
I have a dual color (green/red) 2 pin LED that I do not have the specs for. Currently I have a 33Ω resister on each leg of the LED, and each resister is going to 1 I/O pin on the prop(using 2 prop I/O pins). And the red die is brighter than the green die. Mark_T suggested using 2 "1N4148" diodes, placed in opposite directions with A resister for one of the two colors. From what I am understanding from the datasheet of the diodes, there is about a 1V drop (depending what company I would pick) across the diode.
Normally I would use R = ( Vs - Vf ) / I to find the required resister. But now I would have another part in series with the led and resister.
I was thinking I would have to change the formula to account for the diode. R = ( Vs - Vf of diode - Vf of led) / I
And if I am right, and using the max values I could find for a led like what I have. Green would be 2.2V@20mA, and red would be 2.1V@20mA. I should need resister values of;
( 3.3V - 1V - 2.2V ) / 20mA = 5Ω for the green die
( 3.3V - 1V - 2.1V ) / 20mA = 10Ω for the red die
Am I correct on my calculations?
Thanks
TC
I just want to confirm what I am figuring out. Could someone please tell me if I am right or not?
I have a dual color (green/red) 2 pin LED that I do not have the specs for. Currently I have a 33Ω resister on each leg of the LED, and each resister is going to 1 I/O pin on the prop(using 2 prop I/O pins). And the red die is brighter than the green die. Mark_T suggested using 2 "1N4148" diodes, placed in opposite directions with A resister for one of the two colors. From what I am understanding from the datasheet of the diodes, there is about a 1V drop (depending what company I would pick) across the diode.
Normally I would use R = ( Vs - Vf ) / I to find the required resister. But now I would have another part in series with the led and resister.
I was thinking I would have to change the formula to account for the diode. R = ( Vs - Vf of diode - Vf of led) / I
And if I am right, and using the max values I could find for a led like what I have. Green would be 2.2V@20mA, and red would be 2.1V@20mA. I should need resister values of;
( 3.3V - 1V - 2.2V ) / 20mA = 5Ω for the green die
( 3.3V - 1V - 2.1V ) / 20mA = 10Ω for the red die
Am I correct on my calculations?
Thanks
TC
Comments
I can't. I replaced a incandescent light bulb inside of a SPDT button. I want to make the button show green for go, and show red for stop. There is only two contacts inside of the button.
I thought of using fiber, but, except for the cover that covers the LED(light bulb) the button is sealed. I do not know where the contacts are at.
And for a couple videos I have already. The flicker you see is not from the display, but it is my camera.
This video is my first proof of concept of a reflow profile. The values on the display are fake, and just there to get an idea of location.
This video is one idea(proof of concept) I made for the menu of my reflow oven. I was using an encoder to go between options, and using the encoder push to select/change options.
Thank you. I wanted this oven to push me for hardware and programming.
Right now (still prototyping) I know the cool down is to slow. I wanted to add a servo that would hold the door open based on how fast/slow the oven is cooling down. But I gave up the idea (for now) when I could not figure out the best way to protect the servo from the heat. I might still do it later on. I have accounted for the servo for later use. power suppy, wire, etc...
But for now I am just going to prop the door open when it hits the cool down cycle.
It would have to be, But I dont want the servo outside of the oven case. I am trying to keep stuff covered as much as I can. Just a personal want, that's all.
I might do that later on, right now I want to keep it simple. I have a lot on my plate, and right now I don't want to add something as trivial as PWMing LED's, when I have harder problems I have to figure out.
That's understandable. I guess you won't be worrying about a little difference in brightness of the LEDs right now then, eh?
With a 2-lead bi-color LED, the only thing you can do to balance the brightness is to use PWM. The reason, of course, is the you have a simple series circuit and whether you use one resistor or two, both will affect each LED. It comes down to the voltage drop. If you switch to a 3-lead LED, then you can balance with resistors; this happens because you have separate current paths.
I defiantly will. I can promise you that.
Nope, not right now. It just annoys me where the red is insanely bright, and the green is half the brightness of the red. I would say this and the other post about the LED is only because I have issues, and something like a LED that is not where it should be bugs the boogers out of me.
Like I said in post #3 that the LED is replacing A incandescent light bulb in A button like this (just older). And I only have 2 connections to work with.
Chance's are, I will be going with PWM later on. I just want to get it working better than it is right now.
Pin1 Use a counter in some duty mode drives RED LED
Pin2 LOW
Pin1 LOW
Pin2 HIGH drives green
Or something to this effect
I currently have an object similar to that. Just no PWM.
This is from my memory since I am not at my home computer.
Then in my main program, I would have
That way I can put in my code
See, simple. until I take care of the more important things.
R1 controls one color, R2 controls other
Make Pin1 high and Pin2 Low for one color
Make Pin1 Low and Pin2 High for other
(sorry doesn't show a bi color LED)
I did that exact idea earlier today. I was not happy with the outcome, so I went with what everyone has been suggesting. I went with a PWM object.