Close
0%
0%

SIR IrDA Lot

A cheap and easy IrDA SIR adapter

Similar projects worth following
0 followers
Roll-your-own IrDA SIR USB adapter from a USD $3 "BluePill" and a USD$ 5 IrDA transceiver module? The project presents as USB-CDC and driver support is typically out-of-the-box.
It may also be of interest to those not doing IrDA proper, but just wanting the basic serial connectivity. Say, for gas meters.

IrDA was big in the 1990's, but was supplanted by Bluetooth, WiFi, etc. Still, there are niche applications where IrDA is popular (scuba diving?!), yet few folks make adapters anymore, and used ones might not have drivers supported by your OS.
So why not roll-your-own from a USD $3 "BluePill" and a USD$ 5 IrDA transceiver module? The project presents as USB-CDC and driver support is typically out-of-the-box. Just add protocol stack.
It may also be of interest to those not doing IrDA proper, but just wanting the basic serial connectivity. Say, for gas meters.

SIRIrDAlot-20250222a.hex

current firmware; burn with ST-Link v2, or even serial in DFU if you're sporting

hex - 105.90 kB - 02/22/2025 at 16:33

Download

  • Making Fiends

    ziggurat292 hours ago 0 comments

    Today I set out on the fiddly affair of making a wired connection between the BluePill and the IrDA transceiver.  The transceiver requires a couple passives:  a series dropping resistor for the IR LED (so you can tune for power budget), and a couple bypass caps (to provide some impulse capability when driving the LED).

    This is somewhat fraught because the modules are SMD, and typically at a fine pitch of 50 mil.  I am using some obsolete NOS parts from surplus which cost me USD $2 ea.  So I got 10.  Because I know I'm going to break some, and because I know I'm going to want some more.  (And you really want two, because otherwise who are you going to talk to?)

    Anwyay, I chose to do the 'circuit sculpture' technique of wiring in free space with no PCB, just without the aesthetic.  This is a slow process, so I don't recommend it in general, but if you just want a couple and have the time and patience to spare, it can be done.

    I wound up making one for breadboard, and one for wiring permanently.

    The breadboard adapter is pretty easy to fabricate:

    • put some flux on the part
    • make solder balls on the pads
    • cut 24 AWG wires
    • put flux on ends of wires
    • touch the soldering iron to the wire and the solder ball pad and it's done
    • crimp the other ends to terminator of choice
    • create strain relief near the transceiver module by squiring some substance-of-choice (I used UV cure resin, "Bondic"; hot glue is probably an option)  Adding the strain relief is recommended to avoid breakage at the solder pads of the device.  If that happens then the party's over.

    The breadboard is easy because the passives can be on the breadboard.  But this confines you to a breadboard.

    The free-space-wired dedicated module is a little more tricky since you're doing 'circuit sculpture', but it can be done.

    I crimped terminators on mine simply because my BluePill already had pin headers soldered on.

    Final connection is trivial:

    • power (3.3 V) and ground
    • PB11 -- detector, (here shown Yellow)
    • PB10 -- emitter, (here shown Green)

    You'll possibly want two!  I had my breadboard unit in addition to this one, so I was able to open two terminals and see data exchanged in both directions between the two.

  • That's IrDA, sir

    ziggurat2921 hours ago 0 comments

    I had previously completed an IR-related project involving an antique protocol used with HP calculator printers informally called 'Red Eye'.  In that, I (optionally) supported using a transceiver module intended for IrDA to detect RedEye (which is decidedly not IrDA) as a convenience, but it made me think about IrDA proper.

    IrDA is an old wireless technology predating things like WiFi and Bluetooth (parts of it were absorbed into Bluetooth).  It has been mostly deprecated but still has a niche following in some places where RF is not feasible, and also for some reason gas meters and scuba equipment.

    A challenge for these niche markets is the lack of once ubiquitous adapters.  Used ones can be found on auction sites, though you might have trouble finding drivers for them on modern OS's.  And as a rare-ish product, they can also be expensive.

    The most basic form of IrDA is 'serial infrared' or 'SIR'.  It's scarcely more that connecting an LED/photodetector pair to a UART.  The material differences being that the light is not 'on' the full bit period, but 3/16 of a bit period, and that '0' is indicated by light, and also due to crosstalk between receive and transmit, the scheme is half-duplex.

    SIR is the bottom edge of an IrDA protocol 'stack', at the physical layer, abstracting most of the details of the hardware from the protocol.  As such, once you've gotten this physical layer implemented, then it is possible to strap on existing protocol implementations on top of it, since they're just software.  E.g., in Linux, you can use 'irattach' to strap the irda protocols onto a SIR device presented as a tty serial port.  'irattach /dev/ttyS1 -s'

    You can bit-bang IrDA, but many microcontrollers' UART facility include an 'IrDA mode', which realizes the 3/16 bit time 'blipping' of an LED for transmit, and the reverse on receive, and usually also inhibits the receiver when transmitting.  Beyond the initialization, you then just use the UART as usual.

    For transmit, you scarcely need more than an IR LED and a resistor (maybe also a transistor if you don't have the current capability).  The receive side is more complicated and needs amplification and some filtering will help.  As such, it's much easier to use a 'transceiver module' that integrates all the above into a single package that you can directly connect to your microcontroller.  These aren't especially cheap now, probably due to the reduced economies-of-scale, but they're had for about USD $5 in unit quantities.  (You can also often find new-old-stock ('NOS') on surplus for half the cost.)

    In this project, I use an inexpensive dev board for an STM32F103 processor affectionately called a 'BluePill', which can be had for about USD $3.  It connects more-or-less directly to an IrDA module (also needed are a series-dropping resistor and two capacitors for bypass).  So you get a USB SIR adapter for about USB $10 and time and effort of construction.

    Note that being SIR, this is limited to 115,200 bps.  This is sufficient for many applications, but will be slow for things like exchanging photos.  There are things like MIR, FIR, and VFIR, etc., with higher bit rates, but these are not supported directly on the BluePill (or the transceiver modules) so I do not explore them.

    I don't bother implementing the rest of the IrDA stack in this project -- that will be the subject of a separate activity.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates