1

I wrote this up for a /r/Reddit community a while back, thought I'd share it here. I also cross-posted to MICROCONTROLLERS@lemux.minnix.dev, 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.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 07 Jul 2023
1 points (100.0% liked)

Microcontroller

89 readers
3 users here now

A community for everyone who works with microcontrollers from SOT23-6 PICs and ATTINYs to PICs, STMs, and ESPs. All microcontrollers and all users are welcome here. If you're just starting out, read some posts and ask some questions. If you're building cool projects post picture and share your work. If you're a professional tell us about your project and answer questions. Blog posts and updates are encouraged. Let's talk about programming languages, IDEs, and programmers. Post code, schematics, and board layouts.

You may also be interested in:

!arduino@lemmy.ca

RULES:

All Lemmy.ca rules apply here.

  1. Everyone (see rule 98) is welcome.

  2. If you’ve seen a question 100 times answer it the 101st time or ignore it. Even better, write a complete, detailed answer and suggest that the mod(s) pin it to the community.

  3. There is no best microcontroller, language, IDE, or programmer, only what works best for you. There will be no elitist bullshit here. See rule 98.

[Did you actually think there were 98 rules?]

  1. If you present something as fact and are asked to provide proof or a source provide proof or a source. Proof must be from a reliable source. If you fail to provide proof or a source your post or comment may be removed.

  2. Don’t be a dick. Yes, this is a catch-all rule.

  3. The mod(s) have the final say.

founded 1 year ago
MODERATORS