Advanced calculators for theoretical lumens, lux, beam divergence, and more, of custom LED flashlights

47 posts / 0 new

Pages

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283
Advanced calculators for theoretical lumens, lux, beam divergence, and more, of custom LED flashlights

These are some advanced calculators I have made to help me estimate the final performance of the custom flashlights I build, and I decided to share it with you guys so you can do the same

Some example screenshots:
Aspheric Lens:

Standard Reflector:

Recoil Reflector:

.
.
Using these equations, it is possible to find:
-candela (lux @ 1m)
-throw (ANSI to .25 lux)
-lumens in spot
-lumens in spill (for standard reflectors only)
-total lumens OTF
-max beam divergence (half-angle)
.
What you need to input:
-led intensity in cd/mm^2
-led lumens
-led die diameter (if square, multiply by 1.41 (root 2))
-dimensions and focal length of the lens/reflector
-wavien collar (yes or no option)
-number and thickness of arms (for recoil reflector only):
For example, this light here has 3 “arms”:

The arms are what hold the center light source in place. I would guess that these are ~3mm thick.

These values can be set by adjusting the sliders or by clicking the number and typing in your value.
.
NOTE the lumen calculations are based on the lambertian emission pattern of a FLAT or DEDOMED led. Using these calculators for an LED with a dome will yield inaccurate results.
.
.
METRIC CALCULATORS (reflector dimensions are in mm):
Aspheric Lens: https://www.desmos.com/calculator/20c1pwz1zv
Standard Reflector: https://www.desmos.com/calculator/6zmm082cfi
Recoil Reflector: https://www.desmos.com/calculator/iidftfr1uj

IMPERIAL CALCULATORS (reflector dimensions are in inches):
Aspheric Lens: https://www.desmos.com/calculator/t0omi25hla
Standard Reflector: https://www.desmos.com/calculator/kt3nnnb6wb
Recoil Reflector: https://www.desmos.com/calculator/yzaqzdm6hh

Edited by: Enderman on 04/08/2021 - 23:20
FmC
Offline
Last seen: 9 months 1 week ago
Joined: 03/31/2013 - 05:23
Posts: 2197
Location: Brisbane, AU

Bookmarked – thanks for sharing

Trevi_lux
Offline
Last seen: 2 years 5 months ago
Joined: 09/04/2012 - 10:52
Posts: 2296
Location: Spain

subscribed

thijsco19
Offline
Last seen: 3 weeks 14 hours ago
Joined: 12/14/2012 - 16:18
Posts: 1384
Location: Nearby Rotterdam, the Netherlands

Can you include that one to calculate the reflector dimensions?
You linked it in the gt thread but it’s hard to find in all those posts.

Agro
Online
Last seen: 2 min 44 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6872
Location: Ślōnsk

Great, thanks!

Agro
Online
Last seen: 2 min 44 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6872
Location: Ślōnsk

I would be interested in how did you arrive at the collar improvement.
I remember seeing +25% as a lower-bound sanity test. And 60% as a top result. Your calculator uses 116%…

Agro
Online
Last seen: 2 min 44 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6872
Location: Ślōnsk

Also, if that’s possible, I would love to see the calculator extended with 2 features:

• support for pre-collimator lenses. I’m especially interested in how they improve light collection efficiency when compared to collar.
• support for calculations of lenses being out of focus. I’m especially interested in knowing beam widths in zoomed-out lights.

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany

Very nice! I really like this.

Some things which came to my mind:

• I would put the required measurement units (metric/imperial) into the name fields of the input values in each calculator (just to make it easier and to avoid user mistakes)
• The spot size values seem high. I’m getting 88m spot diameter @1km with 1.25mm LED “length” and 75m with 1.06mm LED “length”. From my own experience I can say that this isn’t true. My own calulations with 1,06mm LED “length” give me 11m spot diameter.
This can actually be checked easily. Lumens = lux/m^2
So 75m spot diameter at 1km distance would mean that my 1.55MCd light would be putting 6848 lumens into the spot (1.55lux at that distance). I reality it’s around 433 lumens, which your calculator also correctly calculates (if the amount of collected light is indeed true).
I am also not factoring in the corona which is part of the collected lumens. How do you account for that? I wouldn’t consider it to be part of the spot.
Of course I can get the actual values by doing the calulation backwards:
Lets say the spot is 11.27m diameter in 1km distance. So the area is 99.76m^2 and it is lit uniformly with 1.55lux. This means that 155lm are in this spot. Of the 433 “spot lumen” calculated by your calulator (maybe they should be called “reflected lumens” instead?) 433-155=278lm remain for the corona.
• Maybe we can also calculate the size of the corona? My guess is that it is determined by the minimum focal length of the reflector. In my case that is 2cm. So in 1km distance the outer corona would have a diameter of (0.00106m * 1000m) / 2cm = 53m. If it were uniformely lit (it probably is not) we could calculate it’s brightness by using the same circle-with-hole-in-the-middle-principle as we do when determining the area of a reflector (because the intensity that overlaps the actual hotspot is already accounted for in the lumens of it). So in this case 2206.18m^2-99.76m^2 = 2106.42m^2. Now we divide the Lumens by this to get the intensity: 278lm / 2106.42 = 0.132lux.

*If you do all of this maybe you could also implement a drawing which shows the divergence and intensity of the different parts of the beam (calculating the divergence of the spill is probably easy for you).

• If you want to be super precise you can add the area of the LED multiplied with it’s luminance and with the transmission rate of the lens to the calculated luminous intensity (throw).
• Explaining the different parts of the formulas here would be nice I think. For example you calculate the diagonal of the LED die based on the side length to get it’s maximum width.

I am having problems with the metric version of reflector type 1. What do I input for the focal length?

EDIT: I get it now. The focal length needs to be input in cm, not mm like the other values.

I am testing using the values of the Maxabeam reflector:
Diameter: 118mm – 4.65in
Small opening: 40mm – 1.58in
focal length: 10mm
“max focal length”: 94mm – 3.7in
reflectivity: 75%

EDIT2: I am having problems with the imperial version. There seems to be some problem with the geometrical part (the orange reflector curve is not touching the Y-axis where the focal point is when using the test numbers above). The lumen values are also too high.

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany
Agro wrote:
I would be interested in how did you arrive at the collar improvement. I remember seeing +25% as a lower-bound sanity test. And 60% as a top result. Your calculator uses 116%…

sma tested it here (in German). A very high degree of precision is required to get the maximum benefit. So the people who only got 60% benefit simply need to position the collar more carefully.

Agro
Online
Last seen: 2 min 44 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6872
Location: Ślōnsk

That’s a very interesting link, thank you.

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany

The BLF GT reflectors measurements might be interesting for some people to play around with:
Diameter: 118mm
center hole diameter: 20.1mm
Max focal length: 11.5cm
Reflectivity: 90%
Cree XHP-35 HI diagonal: 2.9mm (2.5mm side length)

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

FmC wrote:
Bookmarked – thanks for sharing

You’re welcome

thijsco19 wrote:
Can you include that one to calculate the reflector dimensions?
You linked it in the gt thread but it’s hard to find in all those posts.

I will try to find it when I have time, it seems that I have deleted it from my desmos account so I can’t get it immediately.

Agro wrote:
Also, if that’s possible, I would love to see the calculator extended with 2 features:
• support for pre-collimator lenses. I’m especially interested in how they improve light collection efficiency when compared to collar.
• support for calculations of lenses being out of focus. I’m especially interested in knowing beam widths in zoomed-out lights.

That will be really difficult, more of a job for an advanced ray tracing program :/
If you want to estimate stuff like that I suggest using this free software here: https://arachnoid.com/OpticalRayTracer/

The_Driver wrote:
Very nice! I really like this.

Thanks, I will double check that everything is in mm and add labels for the units.
Do you know which one of the three imperial calculators you’re having the issues with?

Also, the way I calculated the max spot diameter is by taking the distance from the LED to the closest point on the reflector/lens (which is not equal to the focal point since there is a hole)
Then just using similar triangles, LED diameter / distance * 1km = spot diameter.
This is essentially the outer edge of the “corona”.
Keep in mind I am using the MAX spot diameter, so that means using the diagonal LED diameter, not the side length.

You cannot use lumens=lux/m^2 because the brightness is not uniform, the outer edge of the spot will be much dimmer than the inner part of the spot.

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany

Enderman][quote=FmC wrote:
Do you know which one of the three imperial calculators you’re having the issues with?

Reflector1
Enderman wrote:
Also, the way I calculated the max spot diameter is by taking the distance from the LED to the closest point on the reflector/lens (which is not equal to the focal point since there is a hole)
Then just using similar triangles, LED diameter / distance * 1km = spot diameter.
This is essentially the outer edge of the “corona”.
Keep in mind I am using the MAX spot diameter, so that means using the diagonal LED diameter, not the side length.

You cannot use lumens=lux/m^2 because the brightness is not uniform, the outer edge of the spot will be much dimmer than the inner part of the spot.

Ok, that first part is very nice. I hadn’t thought of that. So in my case it wouldn’t be 20mm (only for an ideal point source), but 20mm – sqrt(2 * 1.06mm^2)/2 = 19.25mm

Why don’t you implement both, outer edge corona and actual hotspot?

Agro
Online
Last seen: 2 min 44 sec ago
Joined: 05/14/2017 - 11:16
Posts: 6872
Location: Ślōnsk

Enderman wrote:

Agro wrote:
Also, if that’s possible, I would love to see the calculator extended with 2 features:
• support for pre-collimator lenses. I’m especially interested in how they improve light collection efficiency when compared to collar.
• support for calculations of lenses being out of focus. I’m especially interested in knowing beam widths in zoomed-out lights.

That will be really difficult, more of a job for an advanced ray tracing program :/
If you want to estimate stuff like that I suggest using this free software here: https://arachnoid.com/OpticalRayTracer/

Just started playing with that, thanks.
DavidEF
Offline
Last seen: 1 week 3 days ago
Joined: 06/05/2014 - 06:00
Posts: 7699
Location: Salisbury, North Carolina, USA

I will echo what everyone else is saying: Subscribed! Thanks for sharing! This will be a very valuable resource!

The Cycle of Goodness: “No one prospers without rendering benefit to others”
- The YKK Philosophy

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

The_Driver wrote:

Ok, that first part is very nice. I hadn’t thought of that. So in my case it wouldn’t be 20mm (only for an ideal point source), but 20mm – sqrt(2 * 1.06mm^2)/2 = 19.25mm

Why don’t you implement both, outer edge corona and actual hotspot?

Ah, I found the bug, thanks. The new links I post should be fixed.

It will take a lot more calculations to find the true hotspot, because I need to figure out exactly where the projected images of the LED are overlapping the most, at the same time taht the images are changing in shape, and also moving away from the center of the spot.
I’ll have to spend some time thinking about that one and see if I can find an equation that isn’t just brute-forcing the answer.

Agro wrote:

Just started playing with that, thanks.

You’re welcome

DavidEF wrote:
I will echo what everyone else is saying: Subscribed! Thanks for sharing! This will be a very valuable resource!

Thank you!
Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

The_Driver wrote:
What do I input for the focal length?

EDIT: I get it now. The focal length needs to be input in cm, not mm like the other values.

I am testing using the values of the Maxabeam reflector:

max focal length: 94mm – 3.7in

No, the focal length of a parabola is the distance between the focal point and the vertex.

small f

The maxabeam uses a reflector with 10mm focal length.

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany

A parabolic reflector does not have a fixed focal length (is is not a lens). That is why I call it “maximum focal length”. The longest possible distance. Thus, there is also a minimum focal length. It depends on the type of light source used. With an LED it is the horizontal distance between the led and reflector surface (calculated above in post 13). With a bulb (emits light in all directions) it is half of this value, so 10mm.

One always needs to account for differences between the theory and the reflectors and light sources we use in practise.

It doesn’t make sense to argue about the specific designations though. They don’t change how we calculate things.

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

I’m just going by what the datasheets of optics manufacturers say.
You can take the values from any one of their datasheets and plug them into the calculator and you will get a reflector that is exactly like the one they designed
http://www.phoenixelectroforms.com/parabolicstandardproducts.html
https://www.optiforms.com/electroforming/parabolic-reflectors/

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany

I don’t see your point? I never wanted you to use the “maximum focal length” for the calulation of the reflector.
It is only needed for calculating the size of the actual hotspot in a specific distance.

Or are you talking about the problems I had before? I was trying to test the imperial calculator by inputting the measurements (converted from metric) of the Maxabeam reflector. I got a different result. It didn’t look right and the luminous flux values were off compared to the metric version.

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

The_Driver wrote:
I don’t see your point? I never wanted you to use the “maximum focal length” for the calulation of the reflector.
It is only needed for calculating the size of the actual hotspot in a specific distance.

Or are you talking about the problems I had before? I was trying to test the imperial calculator by inputting the measurements (converted from metric) of the Maxabeam reflector. I got a different result. It didn’t look right and the luminous flux values were off compared to the metric version.

I was talking about what you said about the focal length being in cm, which it is not, it is mm.
Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

By the way, the focal length of a parabolic reflector is the distance between the focal point and the vertex, that is the definition.
So 10mm for the maxabeam.

I also checked and the metric vs imperial versions of the calculators should give the exact same lumen/lux values when you convert your measurements form mm to inches.

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany
Enderman wrote:
I was talking about what you said about the focal length being in cm, which it is not, it is mm.

Ok, yes, I see it works. Sorry for being confusing. I never use the actual focal length for anything so I didn’t think you might need it. I was inputting the wrong number. The metric and imperial reflector1 variants work nicely this way.

BTW: the imperial version still has some metric input boxes and calculates the reflector size in square millimeter. How about luminance in cd/inch^2?

I still think calculating the actual hotspot size (the smalles possible spot) makes sense. That is what we measure with lux meters. That is what people want to know.

Can’t we just do it with the standard parabola equation? Please note that these are for an upright parabola centered on the y-axis. Yours is rotated 90 degress so you would need to switch the x and y designations.
We take half of the reflectors diameter, c/2, as the x-coordinate of the reflector point which is farthest away.
We then use the parabola equation y=((c/2)^2) / 4f to get the y-cordinate (f being the real focal length). So know we have the coordinates of a point on the rim of the reflector.
Now we just need the coordinates of the corner of the LED. That would be x=(sqrt(2*(s^2)))/2 and y=f.
So now we have two points and we can just calculate the distance between them.
dfmax = sqrt(((x2-x1)^2)+((y2-y1)^2))
dfmax is what I have been calling “max focal length”.
This allows us to calculate the actual “minimum” hotspot diameter:
dhot = diameter_of_LED * distance_to_hotspot / dfmax
(This last calculation might require converting some of the units)

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

The_Driver wrote:

Ok, yes, I see it works. Sorry for being confusing. I never use the actual focal length for anything so I didn’t think you might need it. I was inputting the wrong number. The metric and imperial reflector1 variants work nicely this way.

BTW: the imperial version still has some metric input boxes and calculates the reflector size in square millimeter. How about luminance in cd/inch^2?

I still think calculating the actual hotspot size (the smalles possible spot) makes sense. That is what we measure with lux meters. Thats is what people want to know.

Can’t we just do it with the standard parabola equation? Please note that these are for an upright parabola centered on the y-axis. Yours is rotated 90 degress so you would need to switch the x and y designations.
We take half of the reflectors diameter, c/2, as the x-coordinate of the reflector point which is farthest away.
We then use the parabola equation y=((c/2)^2) / 4f to get the y-cordinate (f being the real focal length). So know we have the coordinates of a point on the rim of the reflector.
Now we just need the coordinates of the corner of the LED. That would be x=(sqrt(2*(s^2)))/2 and y=f.
So now we have two points and we can just calculate the distance between them.
dfmax = sqrt(((x2-x1)^2)+((y2-y1)^2))
dfmax is what I have been calling “max focal length”.
This allows us to calculate the actual “minimum” hotspot diamter:
dhot = diameter_of_LED * distance_to_hotspot / dfmax
(This last calculation might require converting some of the units)

Yeah the imperial version still calculates mm^2 of the reflector because the standard way to measure intensity is cd/mm^2.
Since you don’t have to care about the area of the reflector, it’s just an intermediate value in the calculation, I left it as mm^2.

The problem with the “inner hotspot” is that for the type-2 reflector the shape of the reflected LED is getting smaller and smaller as you approach 90 degrees (the edge of the reflector) causing a “ring” of light that is not going to the center.
The farther off angle that the lens/reflector is from the LED, the more “skewed” the image is.
If you look at an LED from 45 degrees, it looks like a trapezoid.
If you look at it from 180 degrees, it looks like a line.

Also, it doesn’t matter if the parabola is vertical or horizontal, you can literally just switch the x and y in your equation to turn it sideways.

The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany
Enderman wrote:
Yeah the imperial version still calculates mm^2 of the reflector because the standard way to measure intensity is cd/mm^2. Since you don’t have to care about the area of the reflector, it’s just an intermediate value in the calculation, I left it as mm^2.

Well it’s not a “standard” calculator . Somebody who thinks in inches probably doesn’t have a feel for square millimeters. Personally I think the imperial version is not needed at all, but then again I’m not from the US.

Enderman wrote:
The problem with the “inner hotspot” is that for the type-2 reflector the shape of the reflected LED is getting smaller and smaller as you approach 90 degrees (the edge of the reflector) causing a “ring” of light that is not going to the center. The farther off angle that the lens/reflector is from the LED, the more “skewed” the image is. If you look at an LED from 45 degrees, it looks like a trapezoid. If you look at it from 180 degrees, it looks like a line.

You don’t have to do it for both. You can just add it to reflector1 which is what 99.9% of lights have.

Enderman wrote:
Also, it doesn’t matter if the parabola is vertical or horizontal, you can literally just switch the x and y in your equation to turn it sideways.

Yeah, that’s why I mentioned that.

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

The_Driver wrote:

You don’t have to do it for both. You can just add it to reflector1 which is what 99.9% of lights have.

Yeah I’ll do that.
The reason I made a metric version was because I originally had only made an imperial version, because both optiforms and phoenix have all their reflector specs in inches.
For people who plan to order reflectors from them it is really easy to take the values straight from the data sheet and put them in without having to convert to mm

I guess I could have also built in a “mm or inches” option into the calculator to choose between the two. Maybe in a future update.

miswas
Offline
Last seen: 1 year 10 months ago
Joined: 11/20/2016 - 04:01
Posts: 60
Location: Seattle, Washington, USA

WOW.  Great tools you've developed here, very interesting stuff!

Thanks for putting such time and effort into all of this, I know it is appreciated and will be put to good use

-Ben

-Ben Walker
miswas

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

miswas wrote:
WOW. Great tools you’ve developed here, very interesting stuff!
Thanks for putting such time and effort into all of this, I know it is appreciated and will be put to good use
-Ben

Thank you
The_Driver
Offline
Last seen: 1 month 5 days ago
Joined: 10/20/2016 - 05:51
Posts: 1462
Location: Germany

I have also started to play around with the lens calculator. Have you thought about how the Wavien collar impacts otf Lumens? sma calculated here is collects 75% of the light and 25% goes through the hole. Since you assume 2.19x the luminance using the collar, the lumens coming out of the hole would be 2.19 × 25% = 54.75% of the LED lumens. After this you would multiply, as before, with the lens transmission rate to get otf lumens.

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283

The_Driver wrote:
I have also started to play around with the lens calculator. Have you thought about how the Wavien collar impacts otf Lumens? sma calculated here is collects 75% of the light and 25% goes through the hole. Since you assume 2.19x the luminance using the collar, the lumens coming out of the hole would be 2.19 × 25% = 54.75% of the LED lumens. After this you would multiply, as before, with the lens transmission rate to get otf lumens.

Yes, the OTF lumens also takes into account whether the wavien collar is on or not.

The only thing is that I do not set the limit for emission angle for when the wavien collar is activated, so if the green lines are going through the collar then that will give incorrect numbers.

Enderman
Offline
Last seen: 1 hour 54 min ago
Joined: 11/03/2016 - 22:42
Posts: 4283
The_Driver wrote:
We take half of the reflectors diameter, c/2, as the x-coordinate of the reflector point which is farthest away. We then use the parabola equation y=((c/2)^2) / 4f to get the y-cordinate (f being the real focal length). So know we have the coordinates of a point on the rim of the reflector. Now we just need the coordinates of the corner of the LED. That would be x=(sqrt(2*(s^2)))/2 and y=f. So now we have two points and we can just calculate the distance between them. dfmax = sqrt(((x2-x1)^2)+((y2-y1)^2)) dfmax is what I have been calling “max focal length”. This allows us to calculate the actual “minimum” hotspot diameter: dhot = diameter_of_LED * distance_to_hotspot / dfmax (This last calculation might require converting some of the units)

I just read this over, and the problem with this method of calculation minimum hotspot diameter is that the point on the edge of the reflector, depending at what angle from the LED it is, will give a different “reflection” image.
For example, if your reflector has the furthest edge at ~60 degrees to the side from the LED, the LED will no longer be square (when viewed from that point)
Which means the reflector will be projecting an image like this:

And not like this:

.
As the angle gets bigger, this effect increases, up until your reflector point is at 90 degrees to the side of the LED and only reflects a line, making the theoretical spot size the same as the reflector diameter.
Then when you add all these ‘lines’ together you end up with a circle, which is why reflectors make a more circular spot than lenses.
.
So this “minimum spot diameter” would only be accurate for a lens/reflector directly in front of the LED.
Since a lens usually does not collect at large angles from the LED, this would be an OK approximation for the spot size with a lens.
For a type-1 reflector it would only be accurate for a deep reflector, and for a type-2 reflector it would only be accurate for long focal length and small diameter (large F-number).
.
.
What get-lit did on CPF is make a program that brute-force calculates this by taking many points and then adding up the projected images:

AFAIK this kind of calculation isn’t possible using a simple calculator like desmos, this would require a coded program.
.
I can probably do that in matlab, but it will take a lot of time which I currently do not have, and I’m not sure if there is a way to make the program available online for anyone to use.