Are there any computer-programmable lights out there?

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
So, are there any lights available where any of the ICs are programmable? It seems to me like it would be personally reasonable to use a very small microcontroller (like an ATtiny5 or ATtiny10) for PWM control. If someone did, indeed, use something like this it's also reasonable to assume that you could program it. Are there any such lights that we know of? I think it would be nice to be able to re-flash the light to change PWM speed, power levels, etc.
 

HKJ

Flashaholic
Joined
Mar 26, 2008
Messages
9,715
Location
Copenhagen, Denmark
Many lights uses a small microcontroller, but usual they are not user programable. The manufacturer MrLite has some programming options in many of their lights, but the user does not have access to this programming.
I have looked at one of their light here: KC-05 and later I will review a light, where I have specified the settings.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
Many lights uses a small microcontroller, but usual they are not user programable. The manufacturer MrLite has some programming options in many of their lights, but the user does not have access to this programming.
I have looked at one of their light here: KC-05 and later I will review a light, where I have specified the settings.
is there any info available as to which microcontrollers the lights use? Very few micros these days are not re-programmable, as flash is basically cheaper and more efficient than ROM. I'm sure if you could get into the light it would be a very common surface mount PIC or AVR. If so, you could easily program it over ISP. The problem might be getting in to the light...
 

HKJ

Flashaholic
Joined
Mar 26, 2008
Messages
9,715
Location
Copenhagen, Denmark
is there any info available as to which microcontrollers the lights use? Very few micros these days are not re-programmable, as flash is basically cheaper and more efficient than ROM. I'm sure if you could get into the light it would be a very common surface mount PIC or AVR. If so, you could easily program it over ISP. The problem might be getting in to the light...

The small PIC and AVR processors are used in some of the lights, but I do not have a list.
If you can reprogram them will depend on the settings in the chip, some chips can be protected. You also need to reverse engineer the circuit and write a new program for the micro controller.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
The small PIC and AVR processors are used in some of the lights, but I do not have a list.
If you can reprogram them will depend on the settings in the chip, some chips can be protected. You also need to reverse engineer the circuit and write a new program for the micro controller.

Good. And it's true that programming can be "disabled" but there are ways around this. For example, raising the reset pin to 12 volts will enable some special programming mode on most microcontrollers. The only danger is if any electronics are attached to this pin. Writing the code should be no problem for me with AVRs... I haven't used any pics in the past. And I suppose I would have to map circuit, but it wouldn't be that hard with some probes. An oscilloscope could be really helpful here... Hmm. I suppose I would have to actually find a light that uses these first :D
 

paulr

Flashaholic
Joined
Mar 29, 2003
Messages
10,832
I've been playing around with the idea of building an AVR-based controller for a 6-Cree light using a prototype housing made by MatthewM for his new Gili line of bike lights. Also have been thinking of trying to reprogram the processors in some existing lights, maybe starting with the Photon Freedom. I notice there is at least one Deal Extreme converter board that uses an AVR: http://www.dealextreme.com/products.dx/category.917~page.3
There may be some others too. Easiest way to reprogram the part may involve unsoldering it, unfortunately.
 

carrot

Flashaholic
Joined
Dec 6, 2005
Messages
9,240
Location
New York City
The HDS/Ra lights are programmable by computer, but to my knowledge Henry has not released a way for the general consumer to do so.

Sounds like with your technical background you should be able to do just fine.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
It looks to me like the reset pin on the attiny13v on the very first driver you showed me is simply connected to vcc. It would be a very simple matter of de-soldering that one pin and then soldering it back through a resistor to vcc. This way, you can just get some really tiny clamps (I saw some at sparkfun) and hook them up to reset, clk, mosi, miso, gnd and vcc and program it. That is provided they didn't disable PB5 as reset, because I don't think the attiny13 supports high-voltage programming.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
The HDS/Ra lights are programmable by computer, but to my knowledge Henry has not released a way for the general consumer to do so.

Sounds like with your technical background you should be able to do just fine.
I'll shoot him an email.
 

HDS_Systems

Enlightened
Joined
Apr 29, 2004
Messages
563
Location
Tucson, Arizona USA
Wyager,

All of the HDS Systems flashlights designed since 2002 use a micro processor to control the power supply and implement the user interface. Our lights provide a standard ISP programming interface to allow the software to be upgraded and to handle the calibration tasks.

The code needed to control the power supply and user interface took months to develop the first time and has seen years of ongoing development since then. The code is probably far more complicated than you are imagining.

We provide a user customization interface to allow users to customize most features of our flashlights. This handles the customization needs of most users without adding excessive complexity and without the need for expensive external hardware.

Henry.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
Wyager,

All of the HDS Systems flashlights designed since 2002 use a micro processor to control the power supply and implement the user interface. Our lights provide a standard ISP programming interface to allow the software to be upgraded and to handle the calibration tasks.

The code needed to control the power supply and user interface took months to develop the first time and has seen years of ongoing development since then. The code is probably far more complicated than you are imagining.

We provide a user customization interface to allow users to customize most features of our flashlights. This handles the customization needs of most users without adding excessive complexity and without the need for expensive external hardware.

Henry.
got it, thanks. I'm sure making code that has to interpret user commands and change settings based on complex input is a heck of a lot harder than simply changing brightness levels. Plus, since your lights are already programmable it would mean less to re-program them. Thanks for the help!
 

ifor powell

Enlightened
Joined
Nov 18, 2007
Messages
230
Location
Bristol UK
Modern TaskLed's Flex drivers have a Tiny85. I have various reprogramed versions in a number of my home made lights. On my bike lights I have them set up so I can controll them from my home made bike computer. The bar light had a uart RX channel. The helmet setup is more complex with an Ant+ radio link added the bike computer has a simplar link to transmit to it as well as picking up my heart rate strap signals.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
Modern TaskLed's Flex drivers have a Tiny85. I have various reprogramed versions in a number of my home made lights. On my bike lights I have them set up so I can controll them from my home made bike computer. The bar light had a uart RX channel. The helmet setup is more complex with an Ant+ radio link added the bike computer has a simplar link to transmit to it as well as picking up my heart rate strap signals.
Very cool! Is the bar light using a chip with a hardware UART or a software serial connection?
 

paulr

Flashaholic
Joined
Mar 29, 2003
Messages
10,832
I've been wanting to put bluetooth in my Gili light so I can control it from my cell phone. I found on an old thread, the Photon Proton (and presumably Freedom) use PIC controllers. I guess the AVR's are easier to program.
 

wyager

Flashlight Enthusiast
Joined
Feb 10, 2010
Messages
1,114
I've been wanting to put bluetooth in my Gili light so I can control it from my cell phone. I found on an old thread, the Photon Proton (and presumably Freedom) use PIC controllers. I guess the AVR's are easier to program.

PICs and AVRs are about equal in terms of programming... it's just that each has distinct advantages. I prefer AVR due to more efficient use of clock cycles (and power). You wouldn't really need this on a flashlight, as you're not trying to do heavy math or conserve every µA. It's basically arbitrary which micro you use here. And the bluetooth should be really cool, there are lots of simple bluetooth>serial converters with simple command sets that should work just fine.
 

paulr

Flashaholic
Joined
Mar 29, 2003
Messages
10,832
I think AVR's are easier to program just because they tend to have more memory (program and ram) than the smaller pic's, so you don't have to code as tightly. Plus you can compile for them with gcc, there is the whole Arduino dev environment, etc. Bluetooth-serial converters seem to be crazy big and expensive. I was thinking of an using FTDI chip and one of those cheap tiny USB bluetooth dongles.
 

ifor powell

Enlightened
Joined
Nov 18, 2007
Messages
230
Location
Bristol UK
Very cool! Is the bar light using a chip with a hardware UART or a software serial connection?

I am not using the hardware USI on the Tiny85 for the serial it's software serial. The code is based off Amtel aplication note and works well enough for just reciving a single byte level. The Helmet mount version is more complex as I need rx and tx to talk to the Ant+ radio chip so I have had to modify the board and the fuse programing to enable me to use the reset pin. I have it setup with a very nice little serial bootloader I found so I can still reprogram it.

The bike compute is based around an xmega128A1 board with a micro sd slot and serial to usb chip on it. I then have a host of other peripherals attached eg gps, barometer, 2 * i2c graphical lcd, rtc, etc.

There is a tutorial about bluetooth controll form a mobile handset for a light here. I have used the basic linear driver design in some of my smaller lights. I coded it in C rather than assembeler though as there is no need for assembeler with an 8k tiny.
 
Top