Cantor, DIY: oncomers-friendly, 1S Li-Ion, rich-control firmware, beam 3D simulations

abvgdee

Newly Enlightened
Joined
Jun 25, 2014
Messages
49
UPD: Jan 15 2018: heavily edited. Now this post is essentially a copy of my page: https://cantorbl.sourceforge.io

Cantor - beamshot octave scripts and bike light driver


----------
Beamshot octave scripts
f39baeb9011c65cc52004a79fd3c9f6c.jpg
fbe19809b0eaf1cc3aa74d7c173f1b2c.jpg

Light intensity distribution (LID) of a lamp can be measured by taking wall/ceiling beamshots with a digital camera. The scripts process jpgs images (that have to be processed from raw data) and visualize the LID nicely. See example gallery.

Taking "Cantor" beamshots is a how-to get beamshots simulation images fast. Not quite "for dummies", but I tried to make it.

Comparison with real goniometer measurements (Olaf Schultz database) - pretty good match.

Simulation comments describes some more technical aspects, like need for HDR, camera calibration. Some formulas also given. The section Raw vs. Blackbox there shows (also visually) why you should not trust your camera and use raw files, at least for measurements.

----------
Driver
da660a3bde05b1acf0c29b8a03a42820.jpg

Linear, using AMC7135 and Atmel AVR ATtiny45, Li-Ion battery powered. The firmware provides convenient control - bikelight-specific.

-----
Control

Two external buttons - "left" and "right" (one is clearly not enough, and more buttons would make control difficult when groping for buttons, especially in mittens in winter). One low-power info-LED. Each driver drives (only) one power LED. There are three flavors of the firmware, for Far-beam, Near-beam, and High-beam lights.
Example photo where I placed buttons and info-LEDs on my handle bar.

Convenient, bike-light-specific (not a tactical-light) control.


  • Multi-tasking: can do everything simultaneously: blink the info-LED, change brightness of the power LED, handle buttons presses.
  • Convenient Far/Near modes changing (e.g., to not blind oncomers). For example, press three times on left button to turn Far+High lights off - useful when approaching kids, or when riding on bumps when the Far beam rocks wildly up and down. Press three times on right button - Far+High are back on.
  • For a given Far and Near tilt angles (optimal for given speed/terrain), their (Far/Near) relative brightness difference can be adjusted, to make the illumination more uniform.
  • Monitors voltage level: there are many levels at which headlight will blink to indicate voltage drop.
  • Monitors temperature.
  • Levels can be set by the user without re-programming.
  • Strobe - makes a great signal.
  • Smooth light up/down.
  • Key lock mode (or anti-hijack): headlight requires a password.
More on the functionality: User guide. Also includes brake light.

-----
Driver board

Drivers for Far/Near/High are identical, just some differences in firmware. The printed circuit board (PCB) can house up to 8 AMC7135 (~2.8А), they are all located on one side for efficient cooling. Micro-controller is on the other side - to measure temperature of the power LED. Board diameter is 24mm. Power is 1S Li-Ion (2.7-4.2V). Boards were factory-fabricated and are available for sale.
More on PCB. There's also the (simple) circuit diagram there.

Firmware source code - for avr-gcc is opened.

----------
How I use it

All (four) lights below use the above driver. LIDs of (all three) headlights were measured using the above method.

I currently have 3 headlights: (1) Far-beam, reflector-based, a modified Philips Saferide 80, (2) Near-beam to remedy dark stripe artifact of the Saferide, and (3) High-beam (the last two are lens-based). They are all idependent, and can be used without any other (I often use Saferide as stand-alone tactical light).

-----
Far: Philips Saferide 80 modification
3d5df6c0430213fb2390f63b50eaca19.jpg

Powered by three 18650 Li-Ion cells inside the stock body (instead of 4 AA NiMH). LEDs are stock Rebels. To remove blinding artifacts, I installed a wall between the reflector halves.
More on optics: the wall and misc related notes.
More on housing: driver and battery cells.

-----
Lens-based Near + High lights

This photo is old. "Far" here is from older setup, when it was used as Far light. Now it is used upside-down as High-beam light.
ff86860ff12cc7432e2e4874e56afd4f.jpg

I shifted lenses relative to LEDs to improve a bit the light distribution. For housings, I modified common "Magic-shine"-type headlight (Xeccon-S14T), and also М25-housing from easy2led.com. Each button is connected to both headlights (or to all three, if Saferide is connected). Info-LED - one for each headlight.
More detailed overview - optics and housing (LED+lens, PCB, external) of the lens-based lights.

-----
Brake light

Mounted on the luggage carrier:
80fb7149a684c918a6811cecc76d497a.jpg
82ac52b3be2945477fdd02c6f33627fa.jpg

Red LED - Cree XPE on a star, lens - oval Carclo 10003/l25. Housing - plastic container for medical pills.
More
 
Last edited:

Derek Dean

Flashlight Enthusiast
Joined
Nov 14, 2006
Messages
2,426
Location
Monterey, CA
Very cool. A nice presentation of some really useful information, and a neat project. Thanks for taking the time to write it up and do all the photos :thumbsup:.

I'm thinking that rather than just designing better optics for road illumination, that we might see more of a move towards reflectors, or some combination of reflectors and optics.

In any case, it's neat seeing what you were able to do with what's currently available. A very useable beam pattern indeed.
 

abvgdee

Newly Enlightened
Joined
Jun 25, 2014
Messages
49
I now think explicit "targeting" could make it more clear, for what activities those my pages can be helpful. I can think of essentially only two. So "To whom it may concern":

(1a) Someone modding some factory-made good far light (reflector-based) to make it work together with another near or/and upper (blinding, for offroad) beam, and wishing to have a convenient control of both/all. If LEDs are battery powered, my firmware (and PCB) may be of high interest.

For example, when approaching kids (or adults sitting on a bench), you turn Far beam off, but keep Near on - with a single simultaneous press on 2 buttons that are easy to press even blind, and in mittens in winter. Another simultaneous press - and Far is back on. This is just example. I doubt any commercial lights control can be so polite and convenient.

(1b) Brake light firmware is also very interesting from this perspective - to take as a donor a factory-made light (housing + LED + good optics + battery), and put your own driver with the very best control firmware (external buttons of course).

Headlight housing ideas probably are of little use. This DIY-ing takes too much time, and so is overall inefficient. But may become of interest in few years when suitable lens/catadioptrics appear. Together with optics tuning - may be useful for those wishing to "improve beam shape", to help to realize that it's easier to give up these attempts, and buy a decent headlight instead.

(2a) Someone wishing to sensibly present his wall beamshots, clearly conveying the light intensity distribution (LID). My simulations and comments provide very good examples. I'm not optics expert, but physicist by education, and these issues/examples/comments are simple enough to be safely recommended (but I'm of course open to any concerns, everybody makes mistakes). As everything in science, it's simple and reasonable - as I could think of. May be some (Olaf Schultz) explain more and better, but I didn't see anything similar, and my comments are in English.

(2b) Also those simulations pages are (as I hope) good for general understanding, to become more literate in this area. For example, I see people confuse and use interchangeably lumen and lux. It's like I purchased apples, and they measured 3 kg in the grocery store. Then I placed apples along a wall at home, and measured them to be 2 meters :whistle: (yes, we can measure kg in meters if apples are always the same size and weight.. but...).
 
Last edited:

abvgdee

Newly Enlightened
Joined
Jun 25, 2014
Messages
49
There was some (little really) interest in my octave scripts a long time ago..

I wrote instructions how-to get beamshots simulation images fast (the proper beamshot visualization): Taking "Cantor" beamshots. It's not quite "for dummies", but I tried to make it.

Also I re-structured main page heavily.
 
Last edited:
Top