How can I find the right resistor to make 50% brightness in an led? I know how to find the right resistor to get the brightest but I'm wanting to find the perfect middle.
Chances are that for an perceived "half as bright" LED you'll need to increase the resistor by around (5:1), which will yield around 20% of the lumens.
Compare the popular North American auto tail light bulb the 1157, which has two filaments- brake and running light. The filaments are about 28W and about 8W, but the lumens are about 10:1 (402 vs. 38 lumens). Yet the brake lights are not perceived as ten times brighter- maybe 3 times.
This is because your eye has approximately a logarithmic response over some range, so in fact a difference of 20% or 25% in lumens is barely perceived.
You will never be able to get 50%...the properties of resistors and other semiconductors might change with temperature and every resistor has a tolerance of how much not exact is it's resistance.
Good LEDs have in their datasheet a drop like graph that shows the spread of light, so the brightness also depends on the angle that you look at it.
In any case, the datasheet should show you the relationship between
current and you can get some estimative about it:
Get the maximum current the LED can handle and with it you get the maximum lumen, than you can calculate easily the resistor, assuming half this maximum current, using V = R*I.
Remember the relationship will not be that much linear, and only a good LED will give you all the parameters to calculate half the brightness, but in practice, assuming half the brightness for half the maximum current is usually a good approximation.
Also get in mind that the human eye doesn't respond to all colors in the same way, some colors will appear brighter than others for the same lumens, that's why there are several color correction curves and calibrations for light related equipments.
Most LED's will have a datasheet showing you two important graphs: the forward current vs luminous intensity. Plus another graph showing the forward voltage veruss forward current.
An example is this datasheet: http://www.farnell.com/datasheets/1626761.pdf at the bottom of page 2.
You can see that 100% intensity is at 30mA, and 50% at 15mA.
Then looking at the other graph, 15mA responds to 1.8V as opposed to 30mA which is around 1.9V.
Knowing the forward voltage voltage and current, you can now easily calculate the resistor required. In this example at 5V supply, 100% intensity is: (5-1.9)/0.030 = 103 ohms, and for 50% intensity: (5-1.8)/0.015 = 213.33ohm.
Generally speaking the relativionship between luminous intensity and current is always linear. While the effect of forward voltage on current is little. So a general rule of thumb is you just half the current to half the luminous intensity. Using that rule of the thumb you would have calculated half brightness requiring: 5-1.9/0.015 = 206.66 ohm.
Of course brightness is a subjective property. 50% luminus intensity may not appear 'half as bright' to an eye.
How about hooking it up to a variable resistor (pot) and playing with it until you get the desired brightness? Then you could measure the pot's resistance and get/build a 1% or 5% resistor (even 10% might do) to replicate that resistance.
If it's going to be a fixed resistance, play with it under various ambient lighting conditions to make sure a given brightness is adequate under all conditions.