A question on actual application of those LED's:
IceFirePro
Posts: 86
Today I bought the following three LED's and I would like to know a simple way to make them just turn on/off thru P0-P15 in order to learn some basics (I am afraid to try before asking).
So, the first says:
FW current: 20mA
FW supply: 3.5V (typical), 4.0V (max)
Does it mean I can use it directly with the output pins, since they support up to 20mA and probably I need a 470 ohm resistor?
The second is the same, but FW voltage is 3.2 to 3.8 V.
And the third is interesting and more complicated : it says "7-Color Blinking LED" (I was interested what that is)
On the back it reads
Single color, color-changing or flashing modes
FW current: 35mA
FW supply: 3.2V (Typical), 3.5V (max)
Does it mean that if I connect it at less volts, it will consume less mA? Or; can I connect it via a resistor?
The HomeWork board's data sheet reads that it can deliver up to 50mA total. But it's not clear whether this includes Vdd, or is only for P0 to P15! How can i know? If it's for Vdd too, probably I might want to connect my higher drain LED's to Vin (which is 9V from battery) and regulate them via resistors and turn them on/off with the transistor?
Please, shed some light for actual experiments. Thanks!
Thanks!
So, the first says:
FW current: 20mA
FW supply: 3.5V (typical), 4.0V (max)
Does it mean I can use it directly with the output pins, since they support up to 20mA and probably I need a 470 ohm resistor?
The second is the same, but FW voltage is 3.2 to 3.8 V.
And the third is interesting and more complicated : it says "7-Color Blinking LED" (I was interested what that is)
On the back it reads
Single color, color-changing or flashing modes
FW current: 35mA
FW supply: 3.2V (Typical), 3.5V (max)
Does it mean that if I connect it at less volts, it will consume less mA? Or; can I connect it via a resistor?
The HomeWork board's data sheet reads that it can deliver up to 50mA total. But it's not clear whether this includes Vdd, or is only for P0 to P15! How can i know? If it's for Vdd too, probably I might want to connect my higher drain LED's to Vin (which is 9V from battery) and regulate them via resistors and turn them on/off with the transistor?
Please, shed some light for actual experiments. Thanks!
Thanks!
Comments
You may want to start with higher value resistors and 10 to 15 mA . Remember RED LED's have a much lower forward voltage than do white or blue so larger value resistors are needed. (use calculator link above and it has some basic information you need to get started.
When I use an LED for an indicator for a pin, typically I just use a 1Kohm resistor since that is bright enough to see and only takes a couple of mA.
If you want them for light output then you should use a transistor or mosfet or lots of other options instead of directly from a pin.
Typically using the PIN to sink current is better than driving the led from a HIGH pin. So LOW PIN would turn it on and HIGH pin would keep it off.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Following this, in order to calculate the current through a resistor connected to LED and Vdd/Vss, they say you calculate
Vdd (5v) - LED (1.6v) = 3.4 volts = and that's the volts passing through the resistor. From there they calculate the current through the resistor.
But what if I use a 5V LED, connected to a resistor and Vdd/Vdd (again 5V) - then 0V will be left for the resistor, so how can I calculate the current passing through it using this law?
Work through the "What's a Microcontroller?" projects. They'll give you a good feel for how things work.
Re: whether the LED will use 3.5 or 4 volts ... Look at the graphs for a similar LED for forward voltage vs. current. You can also design your circuits for "worst case". What resistor do you need to limit the current to something that will not damage the LED or the I/O pin under the worst possible conditions. What if the LED uses the least possible voltage? What resistor would be safe? Once you get the circuit working, you can measure the actual current and actual voltage and adjust the parts values for optimal performance understanding that components do age and their values vary slightly with time and, if you ever have to replace a part, the new part may have different values. That's why resistors and capacitors have a tolerance. Carbon resistors come in 20%, 10%, and 5% tolerances and their values can vary by as much. You have to design for that.
But what happens to this LED, (more likely 4.5v that's taking 5v but heating up.)· if you use a variable resistor instead of a fixed one and turn the resistance up and down?
Does it stay 1>stay on?· 2> stay on & go off at a certain point 3>go dim at a certain point? or 4>go dim & then off ata certain point?
·after all, it IS an LED not an incandescent bulb.....Hook up a little·test circuit and see!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown