[TODO: pics and next steps]
I was researching WebAudio (audio in browser) hacks for a different project, and ran across this example of someone using regular audio output to drive a regular RS232 serial port connection: https://sudoroom.org/serial-over-webaudio/
As a fan of novel comms workarounds, I was intrigued and decided to explore this further. Hackaday itself had featured similar projects, too: http://hackaday.com/2010/11/10/android-talks-pulsewave/. There was even a bidirectional communications example described here http://hackaday.com/2014/11/04/using-a-headphone-jack-as-a-uart/ as part of the Espruino Web IDE project.
However, I wanted to not just talk to my own MCU board, but a proper legacy serial device, the kind with the proper full DB9 or DB25 plug. Looking up the RS232 spec details, I realized that it was not enough to convert the audio signal into regular 5V TTL levels but the full +/- double-digit volt range, instead. Thankfully, for that there is already the trusty MAX232 voltage converter chip, which I was even able to purchase pre-mounted on a DB9 plug breakout board.
For the audio-signal-to-TTL-level conversion I adapted the existing schematic from the RobotsEverywhere folks (http://www.robots-everywhere.com/re_wiki/pub/web/Main.AudioSerial.html) that uses a basic open op-amp circuit. It worked like a charm, and the potentiometer helps adapt to different audio levels.
To perform inbound signal conversion from MAX232 5V input levels to computer/phone microphone jack signal, I just fed it through a second op-amp circuit and then performed a simple voltage step-down. That was complicated by the fact that TRRS microphone contacts are actually powered with their own voltage (http://blog.mklec.com/trrs-and-trs-plugs-and-sockets-explained/), so I had to provide a "realistic" impedance on the contact, while still driving it with the data signal.
Prototyping on a breadboard showed that it could be done, and I managed to get a webpage to talk to the Arduino UART chip at 9600 baud. I was even more excited to be able to feed some data back into the webpage, too! The serial encoding-to-audio code was already developed by the ever-prolific Substack (https://github.com/substack/webaudio-serial-tx), but the serial signal decoding logic I had to write from scratch (only later I found the Espruino source code that did the same, and it was not a clean separate module anyway) [TODO: open-source the resulting decoder module].
After that, it was a matter of soldering all the bits onto a small proto-PCB and stuffing it all inside a plastic enclosure. That part was just recently done, and now I am now cleaning the code up and getting ready to make a nice pretty demo with a real serial device (I have a real VT510 text terminal just for that!).