Send data to an Arduino by using an audio cable

audiodatasignaltransmission

I want to send some Data to my Arduino by using the audio jack of my smartphone/computer.
(USB is no option, since my smartphone does not support USB Host mode and I also don't want to go wireless or use a modem)

I have allready connected my computer to my Arduino and created a squarewave as the audio signal. But what the Arduino saw, was something like the derivative of the squarewave. Or a declining voltage of capacitor. I haven't lookt at it at a high enough sampling rate to specify this.
(I didn't use an amplificator)

What do I have to do, to get the Arduino to read 0 and 1, like the signal I created?

Best Answer

Audio outputs are typically AC-coupled, i.e. there is a series capacitor. Try Manchester encoding, and experiment with different baud rates - perhaps start around 4000 symbols per second. I've done this successfully in the past but it takes some fiddling to get it to work.