Sound card microcontroller/PC communication
posted Jul 10th 2011 2:01pm by Brian Benchofffiled under: Microcontrollers

The usual way send data from a microcontroller is either over RS-232 with MAX232 serial ICs, crystals, and a relatively ancient computer, or by bit-banging the USB protocol and worrying about driver issues. Not content with these solutions, [Scott] came up with sound card μC/PC communication that doesn’t require any extra components.
[Scott] bought a cheap USB sound card dongle on eBay (although a built-in sound card will do) and wired up the tip and ring of the plug to the microcontroller. The data is sent from the microcontroller a lot like Morse code – a short gap between pulses is a zero, a long gap is a one. This is parsed by a Python script using PyAudio. Synchronization, timing, and calibration is automatic because of a 10-bit ‘packet header’ explained in this video.
After he had a really great way of sending data from a microcontroller to a PC, [Scott] asked himself if it would be possible to have bidirectional communication. Using the same sound card setup, he managed to get bidirectional communication off an ATtiny44a. You can see his demo video of this here.
The cleverness of hack is overwhelming, and we’re kind of amazed that this technique isn’t in the standard repertoire of solder monkeys. After looking at this, we’re tempted to throw out the half-dozen USB/RS-232 adapters we have lying around. They never worked anyway. Check out [Scott]‘s highly informative video of his build below.






i figured the usual way these days was for your arduino to send it’s data back over the ftdi usb link?
more seriously, you could probably crack open one of your cheap usb/rs-232 adapters, strip out the level converter they attached to an ftdi chip and then just have an ftdi cable.