I wrote this up for a /r/Reddit community a while back, thought I'd share it here. I also cross-posted to [email protected], which seems like another Microcontroller-community trying to bootstrap itself here on Lemmy-verse.
I had thought-experiments with IrDA and it seems like a reasonably solid technology. Most modern TI, STM32, and AVR chips seem to support IrDA today in 2023, and IrDA modules still seem to be made. So its an interesting idea for a "wireless" platform.
I was researching wireless communications and... IrDA was brought up in an ancient document somewhere. And that got me thinking: is IrDA a serious option in 2022? We've got like $4 ESP32 for WiFi and $2.50 Radios (NRF2401)
the wireless space is just so competitive.
But what about that... old infrared technology from the 90s/00s? Well... lets look at it seriously. And I don't mean to reimplement the mess that was OBEX, IrCOMM, IrLAP and all the other acronyms from that era. But the lowest level IrPHY is just a 115,200 Baud UART over infrared. Lets look at some parts available today and think of things...
Hardware: Vishay TFDU4101
The Vishay TFDU4101 IrDA combo LED (transmitter)+Photodiode (receiver) is around $5. Though more expensive than radios like NRF2401, it comes with significant power-benefits. It only has 0.075mA of active current and 0.00001 mA of sleep/shutdown current. Your typical radio modules are 10ma to 100mA on receive, so this is clearly a significant benefit.
The TFDU4101 transmitter is "just an LED". At full power, it is specified to eat 300mA+ at ~1.8V dropoff. But the IrDA standard is 3/16 pulse-width, meaning on-bits are just 18% on, while off-bits are 0% on. Assuming 50% on-bits and 50% off-bits, you'll in practice only be using ~9% of that power on the average, or ~30mA or so average transmit current.
You can also use a 56 Ohm resistor to limit the LED's current, with "low-power IrDA" being supported on just 30mA of LED current. At ~10% overall power usage (18% for on bits and 0% for off bits, and 50/50 mix of both), you're only at ~3mA of current on transmit at the low power specs.
At full power, the transceiver module is designed to be used at ranges of 1 meter. At low power, its only designed for 5cm to 10cm or so, being an "NFC-like" protocol.
The TFDU4101 alone has 39,000+ in stock at Mouser and 55,000+ in stock at Digikey. TFDU4101 is 9mm wide, and has smaller siblings at 6mm and 8mm. Though IrDA is not anywhere near as popular as it used to be, someone out there continues to make tens-of-thousands of transceivers. So for the year 2022, we don't have to worry about this transceiver completely dying yet.
Modern uC support in year 2022
-
ATTiny: IRCOM in USART provides support for Atmel chips.
-
Atmel SAM D10/D11: Shares lineage with ATTiny, also has IRCOM bits / support for 115200 baud IrDA
-
MSP430: TI not only has an example of IrDA, but its example is extremely comprehensive, including the entire IrPHY / IrLAP / IrLMP / TTP / IrCOMM protocol stack !!
-
STM32: A big line of chips, but a good application note here shows an implementation for the larger STM32F7. However, chips as small as the STM32L0 claim IrDA support in STM32Cube.
-
RP2040: Someone made that PIO work on fast protocols like DVI. I'm sure it'd work for 115,200 baud IrDA or even the 1Mbit / 4Mbit IrDA standards. You'll probably have to implement oversamping / other such communication details yourself, but I'm sure its actually "possible".
So we have support for virtually every popular hobbyist microcontroller on the market. I haven't used them all, but at least their datasheets have something to say about IrDA.
Example use cases
90s kids probably remember the myriad of applications of IrDA and other infrared technologies. Here's some that I remember:
- (In Japan), Infrared payment (similar to NFC credit cards today)
- Tamagotchi interactions / "Digimon battles"
- Gameboy Color enhancements ("Mystery Gifts" in Pokemon Gold/Silver)
- Delivering photographs out of a camera
- Exchanging contact information in PDAs
Today, a lot of these are accomplished with NFC and/or RFID. And... I think that makes sense. Low-power IrDA's sweet spot range was very similar to the range of RFID cards (though you had to have the transmitter/receivers "point" to each other, unlike RFID which is "directionless).
One-way communication examples
One-way communication is still useful! Every TV back in the 90s had remote controls through infrared lights, and it worked quite reliably. The TV Remote Control standard is a 38kHz carrier wave (much slower than the 115200 baud of IrDA), but is a closely-related technique. If you need a bit more oomph / transmission speed than just the 38kHz remote control protocol, maybe consider the upgrade to IrDA?
So... is IrDA still relevant?
While there's a number of infrared projects I see pop up, I don't think IrDA / 115200 baud infrared comes up very often.
Still though, I'm curious what people around here think. The power-usage on receive is downright miniscule and having ~1 meter range is a bit more than typical NFC / RFID.
Or is this an irrelevant protocol that should remain in the dustbin of the 90s/00s? We have so many radios today (Bluetooth, WiFi, Zigbeee, Z-Wave, etc. etc.) that radio is often the default choice.
Thanks for listening to my rant! Hopefully this serves as inspiration for someone out there.