As in this answer I plan to use a 5V neopixel RGB LED as both transmitter and receiver to transmit information between ATMega328 boards via fibre optic cable. (This is the Forrest Mimms strategy, for the curious)

Ignoring the coordination problems inherent in it being a half-duplex system (both sides can talk, but not at the same time), what kind of circuitry would I need to switch the LED's mode?

Based on the title of this paper I assume it's possible: Half‐duplex visible light communication using an LED as both a transmitter and a receiver but the paper is paywalled so I can't look up how they did it.

(I assume someone on here has access to that journal, though?)

Bandwidth can be ridiculously low; I'll only be sending ~32 bits max per message, with messages on the 10 to 30s range.

  • \$\begingroup\$ So, have you got a data sheet for the LED that tells you how to use it as a receiver? Using a device in a way that isn't recommended by the supplier is basically off-limit to anything I design. \$\endgroup\$ – Andy aka May 15 '18 at 15:55
  • \$\begingroup\$ I'm pretty sure Forrest Mims was the first to do this. I seem to recall a paper on his web site, but I'm too lazy to find it. forrestmims.org \$\endgroup\$ – George Herold May 15 '18 at 16:50
  • \$\begingroup\$ What kind of bandwidth do you need? What voltage does your microcontroller use? \$\endgroup\$ – peufeu May 15 '18 at 17:07
  • \$\begingroup\$ neopixels blink hundreds of times a second, which you don't want; you need a steady discrete on/off (no pwm) \$\endgroup\$ – dandavis May 16 '18 at 0:37
  • \$\begingroup\$ @dandavis what if I ran a comms clock speed of, say, 0.5s? \$\endgroup\$ – buildsucceeded May 16 '18 at 7:57

Using an LED as detector as well as a transmitter was invented by Forrest Mimms back in the late 60s / early 70s. His Wikipedia page has some info on LED based photo-detectors. Here is a more recent Makezine article which he wrote about it.

As for a way to switch between LED modes, you could just use two low leakage SPDT analog switches to select between forward biasing the LED for transmitting and connecting it up reversed biased to an op amp as a receiver.

Since LEDs are so cheap, the best solution might be using two LEDs at both ends of the link and just always have the receiver circuits active. In this case, you could even use two different color LEDs and have a full duplex link.

  • \$\begingroup\$ Using SPDT doesn't really achieve half-duplex, it's more like no-duplex, but manually configurable as 'sender' or 'receiver' \$\endgroup\$ – buildsucceeded May 15 '18 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.