wirelessly reprogram flashlight MCU while in use with no additional parts

I excluded bluetooth in the OP.

Hmm,

Led does produce voltage when illuminated (for example with another flashlight) Perhaps it would be possible to make special mode that would “learn” modes configuration from another flashlight by simply observing voltage levels in certain time frame…

I like the IR method…but the reverse illumination method seems pretty interesting

Ooh…a SMD IR reciever!

Bingo! If we connect the LED to an ADC input pin we can read the voltage when it is not being driven. Using some modulation scheme we can transmit data from one flashlight or computer monitor to the flashlight we wish to reprogram. If the MCU has a standard bootstrap firmware it can be be reprogrammed while in use. Consider the bootstrap code for Arduino for example.

Such methods are standard in a lot of devices, to update and maintain them.
Could be done with a glas in the aluminium like the early Roche f6 had but with an additional IR transistor on the driver.

I see no real use in it, especially because the disaster and flops of the Bluetooth programmable lights, but hey it could be done with not too much work…

I have such a tangenerator for onlinebanking:

Huh, had to have seen this someplace? can’t find it now. Maybe they had to pull down the thread due to IP rights? Hope someone else could chime in on this, else I’m losing my mind.

I have a Digispark that uses an Attiny85, runs the micronucleus bootloader, and is supported by a special Arduino build. So it looks feasible to build an LED controller using an AVR MCU.

There are many software libraries for the Arduino that can be used. For example, there is an infrared remote control library that can both send and receive modulated IR. Instead of IR, we can use visible light.

Someone also managed to program an Arduino over IR.

They used to sell one called FLEX Asgard.

It had hickups due to poor transmission of signal through the aluminum host, but many worked around those shortcomings by remowing the head I think. However not many sold as hardly anyone cares really. Push a button and light comes out... Its a flashlight. I dunno. Muggles I guess ;-)

I’m not talking about RF here. If we use the LED itself as the transmitter and receiver, then it should work for most flashlights because there is a clear path for the light transmission.

The benefit is for the BLF community since it would be easier to reprogram our customized LED driver. There would be no need to take apart the driver to program it. And we would be able to use one flashlight to reprogram others by pointing them toward each other. Other parts of the flashlight do not need to be modified, just the driver.

I measured the voltage across an XM-L LED and got 2+ volts when I shone an OLight S20 on it from a few inches away. So it is defintely possible to use Cree LEDs as light sensors.

Glad your going to try this! I’ve wanted to do this but iirc I’ve read it can be tricky getting a clean transmission and decent speed over visible light. 20 years ago timex made a line of watches that could be programed like this.
You’re going to use manchester encoding?

Since LED drivers commonly use PWM, I’ll probably start with that. If I can detect the difference between 25, 50, and 75% duty cycle then I can decode one bit.

Here’s a simple modulation scheme.

Transition from 25% to 50, 50 to 75, and 75 to 25% all denote a 1 bit.
Transition from 75% to 50, 50 to 25, and 25 to 75% denote a 0 bit.

Is there a name for this?

Interesting idea, I like it. If the LED does generate about 2V when light is shone into it, it would certainly be picked up by the ADC.

Instead of using analogue signals (PWM dimming), we can see if digital communication work. I’m guessing that’s more reliable. Maybe serial protocol, such as the RS-232? RS-232 - Wikipedia

Did something like that a few years ago, before I even started with flashlight firmwares - for a geocache. The cacher finds a box with some kind of flashlight in it; too ugly to keep: Just an XR-E drop-in and some electronics molded into a block of clear epoxy, battery holder on the outside (cacher had to provide his own batteries) and a touch switch. When he presses the button, this 'flashlight' starts to blink, that blink however contains modulated data (just 2 bytes) and with that blink light he has to find a 'station', a sealed PET tube in a tree, that blinks back only when hit by that modulated flashlight blink. The cacher goes to that station. The station's blink answer (5mm LED) is also modulated, and when the cacher holds the flashlight near the station (a few centimeters), the flashlight's LED picks up the signal in it's blink pause. When it recognizes the correct answer code it knows the station has been found and changes it's own blink code to be recognized by another station; there are 5 stations and each reacts only to it's specific code; holding the flashlight near it activates the code for the next station.

I used a simple blink length code; if I remember correctly it had about 1ms per bit; for less range or more sending power a faster timing should be possible. A computer monitor might however be less bright (also has lower speed...)

I also remember that computer screen programmable flishlight at CPF but can't find it either. Hm.

Wow! So the basic concept of flashlight-to-flashlight communication has been proven years ago by DrJones.

We definitely have members in BLF that can implement custom drivers and firmware. If we can implement this concept, future BLF special edition lights such as this can be offered that can easily be programmed by the end user with just a USB dongle or another BLF flashlight. People can customized the light to however many modes they want without taking it apart.

Not quite, it would take a bunch of coding, much much more than just coding the FW for the flashlight. The other option would be to create a GUI but once again that would be even more coding and then you’ll still need to program the programmer light with a regular programmer, either ISCP or with a USB bootloader

It’s a really cool idea, I’m not arguing against that, but if someone cant flash the 13A with pre-existing FW there’s no way in hell that person will ever be able to do the work required for this…

Again I love the idea, I think it’s awesome, but it surely isnt going to become the norm, or even the way heavy DIY’ers do it.

In contrast with CK, I think it could become widely popular. And if there is some demand I’d bet RMM would be willing to sell ready made usb programmers. Usb serial to an atmega with one 7135 & an XPE. From an end user’s side, can’t get much easier than reprogramming a light without even opening it.

If the host flashlight has a GUI that accepts reprogramming, you can share the reprogramming sequence using a video posted in youtube, if the light of the monitor is enough to create a good voltage out of the LED

If General Motors made the engines in cars modular so you could swap em out at will, why would we? Once the light works, do the vast majority mess with it? I really don’t see the need for this kind of on-demand programming in the general use of a flashlight. Sure, there are those that would think it’s neat, but the practicality of it is muted by development costs and limited general user information data-base.

I can flash my MCU’s anytime I like. And I very seldom change one. I set it up like I wanted it in the first place, hence, it already is like I want it!

It’s a solution for those who can’t program the lights themselves, you buy the “blank” driver, and program it with the modes you like, without the need of soldering stars, or being limited to 4 different settings
sure, once you find the modes you like, you won’t change it again