Looking for software suggestions for amateur optical design on a hobby level. - Page 1
Forum section: electronics / general

author: Refrigerator
author_rank: Super Contributor
timestamp: April 21, 2023, 02:23:54 pm
content: I have some decent 20W COB LED's and i would like to design a headlight for my ebike that would do more than just dump raw light out the front.The goal would be to direct most of the light at the road surface, to not blind anyone around, which is my biggest gripe with the recent flood of escooters.The COB LED is not a great source of light for headlight design but i like a challenge from time to time.Any suggestions for what software to use? It doesn't have to be elaborate, a simple 2D program that would show my beam pattern would suffice.

author: EPAIII
author_rank: Super Contributor
timestamp: April 22, 2023, 01:47:47 am
content: I have done optical designs the old fashioned way, as I was taught in a college class many decades ago. That means pencil and paper and simple optical rules. Strangely enough, that was very good for things like projector and telescope design but it may not be as good as a modern computer program for something like your bicycle light.I do not have any recommendations for such a program. I can say that you do want something more then simple ray tracing because you will be using an extended source (the LED) and you want a spread out pattern, not just a sharp image.But I will say a few things about this.There are two ways of designing such lights: with a reflector and with a lens. And, of course, both have been used with light sources that are omnidirectional. But LED in general, are not so it is probably one or the other.Parabolic reflectors are generally the better choice. You don't want the pattern to be too focused because that can blind others. That is a great consideration. But by moving the LED away from the focal point of the reflector, along the optical axis, you will produce a spread out beam. The further away from the focal point, the more it will be spread. Many hand held flashlights operate like this. I have one and it does effectively spread the beam out to illuminate an area instead of just one spot. This is a simple thing to experiment with. All you need is the LED and the reflector and a dark room. The rays trace themselves and you can walk around in front of it and see the results. On, and you can try positions that are moved in both directions from the focal point. They will produce somewhat different patterns.If you would prefer a lens, it would work much like the reflector. You simply move the light source away from the focal point to spread the beam out, just like with the reflector. If you want a lens I would suggest a fresnel lens. They use concentric zones to flatten the lens and therefore are a lot lighter. Plastic ones can be purchased.https://www.google.com/search?client=firefox-b-1-d&q=fresnel+lens#cobssid=sIn any case, lens or reflector, you want one that is wide enough to catch all or most of the light produced by the LED. If you have a spec sheet on it, that should show the angular pattern of the light.If I were doing this I would consider making the LED movable so I could change the pattern while riding. That could be the best of all worlds of bicycle head lights. And voice or thought wave control. And how about servo controlled or gyro stabilized so the light points in the direction of travel even when the handle bars are making small steering corrections? I could have real fun with this.I don't know if you want to consider it but an easy way to do this would be to purchase a commercial light and modify it to your specifications.

author: EPAIII
author_rank: Super Contributor
timestamp: April 22, 2023, 01:52:22 am
content: Another way to spread the beam would be to use several LEDs instead of just one. That gives you a broader, more spread out light source and any image of it produced by a reflector or lens would therefore also be spread out more.You could even control the horizontal and vertical pattern by the arrangement of the LED in the type of pattern you want. I have rode bicycles at night and would guess that it should be spread out more horizontally than vertically.

author: jonpaul
author_rank: Super Contributor
timestamp: April 22, 2023, 03:21:44 am
content: BonjourWorked in lighting for stage and cinema in 1970s..1990.Saw many reflector and lens optics designed, some for arc lamps, some for lasers and even LLNL NIF.1/ Beam output depends on the source brightness and area.A narrow intense beam demands a small (or point ) source this an array of LEDs may give a lot of light from the LED area, but not so high brightness.2/ The optics design CAD (ray tracing, FEA, etc) are spécial, costly and licensed. I know of no open source as such are very special SW for professional use.BUT a 30 days free trial from a respected vendor Ansys!https://www.ansys.com/products/optics-vr/ansys-zemax-opticstudio/zemax-opticstudio-trial3/ Obtain a good optics textbook, the old used ones are fine. A hand solution (ray tracing) may be easy! You will learn a lot.Thats about what I know as an EE!Bon ChanceJon

author: rstofer
author_rank: Super Contributor
timestamp: April 22, 2023, 04:19:00 pm
content: If ray tracing is a viable technique, there is plenty of MATLAB code on the Internet. Most of it should easily port to GNU Octave (free).Searching Google for "matlab ray tracing optics" turned up this paper and a lot of others:https://wp.optics.arizona.edu/optomech/wp-content/uploads/sites/53/2016/12/Tutorial_Ruiz_Maria.pdf

author: jwet
author_rank: Frequent Contributor
timestamp: April 22, 2023, 05:03:38 pm
content: There are a couple of optics design programs that run on the iPad or iPhone that I played with a few years back- I don't have an Apple device any more but I'm sure you could find them in the Apple store. They were free or pretty cheap and let you set up arbitrary optical setups and would give you something like Ray traces. Its nothing like Ansys or anything but might give you some insight.

author: Refrigerator
author_rank: Super Contributor
timestamp: April 22, 2023, 05:28:32 pm
content: Quote from: jonpaul on April 22, 2023, 03:21:44 amThere is 3DOptics software that is cloud based but i haven't yet figured out how it works.So far i've tried uzing CAD and tracing the rays manually but it's not very fast or intuitive and makes iterations difficult.Quote from: EPAIII on April 22, 2023, 01:47:47 amI have an SLA printer and some clear(-ish) resin so i'm capable of making both lenses and reflectors, but currently i'm leaning more towards reflectors since i think they would be more efficient.

author: switchabl
author_rank: Frequent Contributor
timestamp: April 22, 2023, 06:01:22 pm
content: The free version of OSLO (limited to 10 surfaces) is quite powerful:https://lambdares.com/oslohttps://lambdares.com/oslo-edu-downloadI think there are more specialized tools for illumination applications but if you're not doing anything fancy and know what you are doing, it should do the job (it does trace extended sources). Like with all optics design software, the UI is horrible and the learning curve is very, very steep.A more unconventional option might be Blender. I believe it can do reasonably accurate ray-tracing and you could actually set up scenes (like a road) and light them with your design.

author: Refrigerator
author_rank: Super Contributor
timestamp: April 28, 2023, 09:47:08 am
content: Quote from: switchabl on April 22, 2023, 06:01:22 pmI've only had very limited experience with blender but it does sound like it would work.