Tim Alex Jacobs Adds Light-Based Wireless Programming to an LED Badge — with No Hardware Changes

Clever software-only reprogramming upgrade brings a whole new meaning to "flashing" a firmware.

Gareth Halfacree
2 months agoHW101

Maker Tim Alex Jacobs has come up with a way to reprogram existing LED badges wirelessly, without the need to add any additional hardware to their design — by taking advantage of the fact that light-emitting diodes (LEDs) work as light-receiving devices too.

"It's no secret that LEDs can work as light sensors, the main problem is that they're just not very good at it," Jacobs explains. "When we talk about light communication, there's a definite appeal to using the same component as both transmitter and receiver. For one, the optical alignment for bidirectional signalling is going to be perfect. But the primary appeal to me is the reduced component count."

The dual nature of LEDs has led maker Tim Alex Jacobs down an interesting path to add wire-free reprogramming to an LED badge project. (📹: Tim Alex Jacobs)

Initial investigations in adding wireless programming capabilities focused on ultra-compact infrared (IR) receiver components. "[They are] very small," Jacobs writes, "and I will probably try and work one into some jewellery at some point, but it's still a lot bigger (and more power hungry) than a single LED. We're not going to be able to make anything nearly as good on our own, but can we make something good enough?"

Jacobs turned to the popular WCH Electronics CH32V RISC-V microcontroller to build some proof-of-concept circuits which can use an on-board LED as either a transmitter or a receiver for light-based wireless communication. With one board flashing its LED and the other positioned less than half an inch away, it was possible to transmit serial data — albeit at a maximum 19,200 bits per second (bps) transfer rate.

Buoyed by this success, Jacobs decided to try the same technique with an existing design: an LED matrix badge, powered by the same CH32V003 microcontroller. "An admirable goal would be to use this light comm idea to update the animation patterns," he explains. " In the case of the badge, perhaps all it needs is the ability to change what text is displayed, which would be a few hundred bytes at most."

Putting connecting one row — eight LEDs — to the microcontroller's op-amp in parallel, Jacobs was able to get the badge detecting light, and initially attempted to transmit data using a flashing phone screen. When that ran into noise issues, the camera flash was used instead — but had major problems with speed and jitter. Removing a resistor from the circuit to create an optical differential amplifier delivered the performance boost required — and created a device that, with no hardware modifications at all, could be slowly programmed wirelessly using a smartphone's blinking flash or through flashing contrasting blocks on its screen.

"I also think there's scope for some kind of badge game," Jacobs muses, "if a bunch of people had them at an event. The badges could talk to one another when faced directly at each other, so perhaps you could go around an event and collect as many tokens from other badges as possible."

Jacob's full write-up is available on his website, while the modified badge source code is available on GitHub.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles