World’s first open source flashlight?

Last updated Jun 6, 2011 — 25773 views

Robotics wizard and two-time Battlebots champion Christian Carlberg first achieved notoriety shredding competitors’ robots with Minion’s 14-inch saw blade on one of TV’s first reality shows. Now he’s all fired up to begin shipping what may prove to be the “world’s first open source flashlight.”

Carlberg says the pocket-sized “HexBright” flashlight provides super-high light intensity, up to five times that of conventional LED flashlights. It will be offered in two models — the Prime, with maximum output intensity of 350 lumens; and the Flex, a reprogrammable model controlled by an embedded microprocessor and offering 500 lumens of light output. (Carlberg and robot Minion are pictured at right; click the image to enlarge.)

In order to manage the economies of scale required for making the flashlights cost-competitive, Carlberg and hardware/software specialist (and project partner) Terry Cooke created a Kickstarter project to finance the project. If successful, Kickstarter funding would enable them to purchase critical components by the thousands and also would cover the expense of buying an extrusion die, another key step toward minimizing manufacturing costs.

No ordinary flashlight

“Just about anywhere you can buy a cheap flashlight with a zillion unnecessary modes (high, med, low, slow blinky, fast blinky, SOS blinky… laser pointer too??),” Carlberg writes on the project’s Kickstarter page. Unfortunately they’re “all garbage, and the light will usually break on you.”

“I made myself a light the way I wanted it,” Carlberg recalls. “I picked the best available LED (a CREE XM-L; pictured at right, click to enlarge), a good rechargeable battery, built the electronics and programmed it with the only modes I wanted: high, low, and blinky. From necessity (also known as cheapness) I machined the body out of 1-inch aluminum hex bar stock and came up with a unique elegant look with a surprisingly very comfortable grip. Based on the aluminum hex-bar body, I named my light the HexBright Prime, and I was pretty happy with it.”

But Carlberg soon came up with more ideas for enhancing the HexBright design. So he and Cooke set about developing a higher-end version, dubbed the “HexBright Flex.”

The Flex adds a mini-usb plug, enabling the built-in microprocessor’s firmware to be re-flashed from a PC. Additionally, it incorporates circuitry for charging its lithium-ion battery from DC power supplied over the usb cable.

But by the time the Flex design was completed, they realized they were “tapped out of cash to actually make one.” The solution to this was to pre-sell HexBright flashlights on the project’s Kickstarter page, where supporters are offered “reproductions of the original and first-made HexBright Prime for just $35, or you can pre-order the more powerful and versatile HexBright Flex for $60.” For reference, “a good quality $30 brand-name flashlight puts out 100 lumens of light,” Carlberg adds.

The key specs of the two HexBright models are summarized in the table below.

  HexBright Prime HexBright Flex
Length 4.75 in. 5.25 in.
Bezel diam. 1.125 in. 1.125 in.
Weight 4.5 oz 4.75 oz
Max output 350 LM 500 LM
Amps at max. 1.0 amp 1.6 amp
Default modes hi/low/flash hi/med/low/flash
Programmable? no via usb
Battery 2 x CR123A 1 x 18650 li-ion
Rechargeable? no via usb

As indicated in the table, the key advantages of the Flex over the Prime are that the Flex offers higher light output than the Prime, and it can be recharged and (re)programmed over its usb port. Thanks to the Flex’s usb-based firmware reflashing capability, “if you want, you can rewrite the default code and tweak the HexBright Flex however you desire,” explains Carlberg. We’ll have more to say about that later on.

HexBright videos

In the first video below, Grant Imahara, of the popular MythBusters TV show, checks out the HexBright at the recent Bay Area Maker Faire event. In the second video, Carberg gives some background on the project and briefly discusses the design of the HexBright Plus and Flex models.

Grant Imahara demos the HexBright


 

Christian Carlberg tells the HexBright story

 
 
HexBright’s embedded hardware and software

Carlberg supplied DeviceGuru with the block diagram below, which details the Flex’s embedded architecture:



HexBright Flex block diagram
(click image to enlarge)

As seen in the diagram, the heart of the HexBright Flex’s embedded electronics is an Atmel ATmega88 microcontroller. This highly integrated chip contains a low-power, 8-bit, 20MHz, RISC CPU; 8KB flash, 1KB SRAM, and 512B EEPROM memory; an 8-channel 10-bit A/D converter; three timers supporting pulse-width modulation (used for LED control); and one serial port, which is transformed by a chip on the Flex’s circuit board to a usb port.

Understanding the HexBright Flex’s programmability

Why would a flashlight need an embedded microcontroller (uC) in the firstplace, and what could you, as a user, do to influence its operation by revising its embedded firmware?

Cooke provides the answers to these and other provocative questions below…

  • Q1: What does the Atmel microcontroller do for the Flex?

    A1: The Flex’s microcontroller (uC) varies the light intensity via PWM (pulse-width modulation). You can change the light intensity and switch between modes with the only limit being creativity and the program memory of the uC. The uC has a battery voltage monitor input, so you can change up your program depending on how much charge is left. The uC recognizes when the Flex is charging and informs the user via some light flashing signal. It also has an onboard temperature monitor, so it can keep the system from overheating and optimize the efficiency of the LED. Additionally, it has a current monitoring input, so you could potentially keep constant brightness even though the battery might be draining.

  • Q2: Why would anyone want to reprogram the Flex?

    A1: Cooke answers this question five ways…

    • Short answer: You can optimize the efficiency of a SMD LED and battery with a microcontroller.
    • Flippant answer: It’s an LED run by a microcontroller. Might as well have access to it.
    • Zen answer: I don’t know. I want to see what unique applications people come up. We will let people post their findings on HexBright.com
    • Tech answer: There’s a lot you can do besides just setting light levels and blink rates. You can run have your light run up and down mathematical equations, come up with unique styles, or even use it to transmit Morse code. I can even imagine a next generation light with a sensor on board so you can start to “talk” to other lights.
    • User answer: Special functionally for Law Enforcement just by re-flashing the uC
    Basically, the microcontroller (uC) controls the transistor that regulates the voltage and current applied to the LED. It uses PWM (pulse-width modulation control), but you can write whatever algorithms you want to try for programming. Additionally, we are planning a simple user interface for folks who don’t want to write code and we are allowing people to completely re-write the source code. And there is an in-between approach, whereby people can open the source code, change just a few little things, and see what happens. In case they mess up their light, they will be able to restore the Flex’s default firmware by downloading the original source code from our website.
  • Q3: What programming language does the embedded microcontroller run?

    A3: We will be using the open-source AVR-GCC tools. These tools allow efficient programing in both C and C++. Most of the source code will be written in C++ to take advantage of overloaded functions and classes to make program changes for the end user more intuitive. The choice of an Atmega uC and the AVR-GCC tools will also allow us to make the Flex Ardunio-compatible in the near future.

  • Q4: Will the flashlight’s standard firmware be released as open source, or does the “open source” angle only apply to some control parameters and algorithms that can be reflashed, rather than the entire controlling firmware?
    A4: There will ultimately be two options for programming the Flex:

    • A serial interface, used for changing the default brightness constants as well as the blinking period and modes (high, med, low, blinky)
    • An on-chip bootloader, allowing which the microcontroller to be completely programmable (similar to Arduino). Allowing the user to modify the source code to optimise the flashlights functionality to their liking.

Although Carlberg and Cook haven’t decided which open source license to use for releasing the Flex’s firmware, they’re committed to making it open.

“I want to release the HexBright Flex [source code] into the wild and let the community develop original source code,” states Carlberg. “I want to see how brilliant (pun intended) people can be and supply an outlet (hexbright.com) where folks can swap and share lighting code. I’m not fundraising just to make creative lights, I want to build online creativity.”
 
 
UPDATE: New video about the HexBright Flex

The video below provides a few additional details on the HexBright Flex.


 
 
For further information, visit the HexBright flashlight’s Kickstarter project page or the HexBright website.
 



21 responses to “World’s first open source flashlight?”

  1. DeviceGuru says:

    Please note…

    DeviceGuru is not involved in the HexBright project. Beyond what’s covered in this blog post or on the project’s Kickstarter page, we can’t provide any additional information or insight into the HexBright project’s manufacturing plans, hardware/software details, specs, etc. For further information please visit the project’s Kickstarter project page or the HexBright website, or send an email to the project team at “mail at hexbright dot com” — thanks!

  2. Alexey says:

    Seems to be a yet another “burn bright, die fast” flashlight…

    // Alexey, the caving enthusiast, Moscow, Russia *:-)

  3. grr says:

    Where will these be manufactured at?

  4. Richard says:

    Presumably program with care – because as well as optimising the output you can cook it if you don’t take care with that temperature control or you accidentally hang with the transistor turned on.

    Still, interesting idea and I expect quite fun. If you’re into control engineering you could perhaps come up with some interesting ways of getting the most out of the LED, though I expect any non-blinky system would (should) end up stabilising quite soon to steady average power/temperature. Now blinky systems, fast strobes, could be interesting.

  5. rkl says:

    I presume the CPU can provide elapsed time since switch-on – because you could see features like auto-dimming (possibly gradually over time) or auto-switch-off based on on time (or maybe battery level?).

    Maybe the torch needs an LCD display as well, which would make it much more flexible (show the current time or something when the main torch is off). And how about a speech chip or some audio chip – a talking programmable torch with display, now there’s a fun toy 🙂

  6. Tom Jones says:

    I wonder how this will compare to other flashlights. I found a whole series of test photos at fonarevka.ru but they do not appear to have measured the lumens on any of them.

    REF: http://fonarevka.ru/indexen.html

  7. Dr. Kenneth Noisewater says:

    How many buttons (to select lighting modes or do other stuff)? Also, having it remote-triggerable via USB would be cool, particularly if it’s mounted on a Picatinny rail.

    Plus, IR and UV LEDs added would be super super cool in a programmable flashlight.

  8. Dr. Kenneth Noisewater says:

    (ooh, also, with customizable timing and intensity, you could have fake lighter effect for rock concerts!)

  9. Fast Eddy says:

    I’d like to see more of the promised open source content before I pony up the $$s. I don’t want to commit the cash without seeing the goods.

  10. VI says:

    I’d like to see color LEDs included, so these can be programmed and used as ad-hoc navigational beacons.

  11. a raccoon says:

    What measurement of Lumens do you arrive at 500 LM? 1) Conventional “Out The Front” rating which uses the assumed maximum potential of the emitter/battery combo? 2) Or the ANSI Lumen rating which is based on actual light output after 180 seconds on highest output using the batter(ies) included with the light? (usually much lower)

    How long before we can view output graphs from a lightbox?

    Will there be a ‘duty cycle’ at the highest output due to heat dissipation issues, or can this light sustain a constant-on without a cooldown period?

    Will the tail-button be a forward or reverse clicky?
    Will it have a half-click state, such as the Fenix PD series, that can be used to switch modes?
    Will the software be able to detect button-hold durations?
    Will the software be able to save variable state across power off?
    What would be the fastest strobe frequency?
    Where will the USB port be located on the light?
    Will you be using USB A/B, or Mini-USB, or Micro-USB, or some other random USB plug? (I would recommend one of the popular cellphone USB plugs)

  12. Nelson says:

    Sender for a wireless line of sight com device.

    Would varying light levels help a robot navigate?

  13. froit says:

    could incorporate a movement sensor, for Idle-Auto-Shut-off?
    And for Voilent-Shake-On?
    For Roll-To-Dim?

  14. Chuck says:

    It could be like a Lego system, which has a common interface (“…” below) for plug-ins

    power button … batteries … uC & light

    If another module can be added wherever the “…” is, then that opens the system up to extensibility to include: LCD, GPS, mounting brackets, accelerometer, firewire, HDD, digital compass, vibrate motor, etc.

    e.g. Program it to flash the light and vibrate whenever it points north

  15. dark_alex says:

    where can i get this Hexbright? i am a student from china.

  16. dark_alex says:

    it‘s too expensive,i think! about RMB:1000.0! i cannot afford it,how can i get it for free ,i just want to learn it

  17. GL says:

    I notice in the kickstarter videos that a) the flashlight is designed to passively cool the interior by using the body to dissipate the heat, and b) a woman in a video commented on the warmth of the flashlight.

    So my question is, will the flashlight get very warm/hot the longer you use it? If so, at some point will it be ‘too hot to handle’? And lastly, how long will the batteries last on a single charge?

  18. Jose_X says:

    Adding interesting sensors to “robotize” the flashlight would be neat.

    — Give it commands or have the intensity match sound it hears.
    — Have the light flash to suggest the angle of incline (eg, in hundreds of a radian or degree etc), and even combine this to be a feature you can turn on with voice command.
    — Hearing noises and then flashing (of course, we could consider adding a small led screen or even more) when the dB passes a certain level or in any other way to help identify certain aspects of sound. This would allow for a portable (camping) cheap intrusion alarm (or “scaring away”) system.
    — Alarm time flashing.
    — Multiple bulbs would lead to interesting effects.
    — Simple actuator would allow widening the beam, etc.
    — Add a mini-speaker.
    ….

  19. Dave says:

    Thanks for the interesting light. Have you tried mounting it to a bike yet? Do you have any preferred mounting products that you like?

    I think this would make a very good headlight. There’s plenty of reasons to blink away on a bike.

  20. Dave says:

    My only other concern with this light is will there be a way to adjust the beam throw? Wide angle vs. pinpoint?

  21. Aljosa says:

    Wow, this would look really nice on my new bike. I particularly like the Flex one… I could really use the USB charging.