Today we got our dishwasher fixed under warranty. To diagnose it, the tech stuck a photosensor+magnet onto the front panel over the green status LED and started reading diagnostics. It turns out the status LED is actually a serial port*, and it's continually transmitting status.

I can think of so many gadgets that could and should use this trick...

*It's probably something other than regular serial -- a UART's TX would flicker. I don't know any details.

#HidingInPlainSight

@kbob that’s a clever trick, and way less disruptive than most self diagnostics systems.

At a guess it’s encoding data in the difference between, eg, 80% on / 20% off duty cycle and 90% on / 10% off duty cycle. Providing the PWM is fast enough and the “high” and “low” duty cycles are reasonably balanced I’d expect it just looks like a LED around 85% on by (fast) PWM. And just needs good oversampling on the reader to decode.

@ewenmcneill @kbob if you just do that, it’s still going to flicker in a perceivable way. You have to whiten the modulation signal first to avoid slow frequency components in the signal, easy ways to do that are Manchester or 8b/10b encoding.

@jaseg if the bits were sent slowly then I’d agree there could be visible flicker. But if they’re sent rapidly enough with a good (fast) PWM controller so it wasn’t just one on/off per cycle, then the flickering would only be visible to a (fast) camera. (Eg send the duty cycle 10 times per bit, rather than once per bit.)

Whitening (for ~equal 1s and 0s) is a good idea anyway, and could probably be combined with some forward error correction.

CC @kbob

@ewenmcneill @kbob The flicker I’d worry about would be the slight average duty cycle differences betweeen e.g. a long run of “o” (0x6f, six one-bits) and a long run of “A” (0x41, two one-bits). I built a large LED art installation a while ago where I transmitted power and data through the LED’s modulation signal and I was surprised how little residual low-frequency content was enough to make tired eyes perceive a slight flicker.
@jaseg @ewenmcneill Yeah, I did not know about 8b/10b encoding before I started this thread, but it looks like the bee's knees. I'm very much looking forward to trying it out - it looks like one of those algorithms that starts with a lot of theory and collapses down into not very much code.

@jaseg @ewenmcneill @kbob

Which makes me wonder if it only transmits when the magnetic device is attached.

The LED would be a steady green (or whatever) under normal use, but when a magnet is sensed, data is transmitted. Since the LED is covered, you wouldn't see any flickering.