Transmitting Data From Android to Arduino Through Audio Jack




With this project you can send bytes from android to arduino using only an audio jack connector.

How it works?

Basicly ,android sends a "morse" audio signal to arduino.Arduino in the other hand decode the morse code to a byte.That simple.

Parts you need:

1 Arduino uno R3

1 phone with android os

1k resistor

1 old earplugs (without mic is better because its easy to find the wire for gnd )

some wires (better if you use a breadboard with some jumpers)

Step 1: Hook Up Schematic

You need to connect analog pin A1 to gnd with a resistor.(pulldown).Cut the earplugs so you have only the audio jack with 10 cm wires.After you find the gnd wire of audio jack ,connect it with arduino gnd.The other wire of audio jack connect it with analog pin A1.The electronic part of the project is finished

Now lets go to the software part.

Step 2: Setting Up and Running

First, download and install the small apk i made .(the apk is not signed so you need to enable Unknown sources in settings)..

Second upload the arduino sketch(android.ino) to your arduino.

Open the android application (adr).Now connect the audio jack to android.Increase the phone volume to maximum.

Press the reset button on arduino(do this step every time audio jack is reconnected or every time you reopen the apk)

Now to check that everything is ok, touch the green screen on android" Push to send 125". If arduinos led on pin 13 turn on, than everything is good to go.

You can send numbers from 1 to 256 to arduino.The number 125 is for the led but you can change that in arduino.ino

For sending other numbers just write the number on the textbox and click on update.You will see that the green screen changed.Now click on the green screen to send it.

Connect arduino with pc and open Serial monitor .The numbers you send will appear on screen.

Step 3: Applications and Other Projects

You can send 256 numbers to arduino, which mean 256 instruction(every number can be assigned to a specified instruction).In simple words , you can controll electronic stuff with an android phone.

But this project has a lot of other application.

It doesnt matter where the sound comes from in the audio jack, if the signal is the same arduino will recognise it.For example: If you remove audio jack and push the green screen , you will hear a noise signal.If you record that signal in your pc , phone or other devices, and you play it to arduino audio jack, arduino will still decode that signal.

What does that mean?

Well ,one exaple: imagine two phones , one is the sending part with the audio to play(phone A), and the other is connected to arduino with the audio jack(phone B).Phone A calls phone B.Now phone A is speaking with phone B.Everything in the microphone of phone A goes to phone B audio jack, which goes to arduino.Now you can send commands to arduino through phone communication.

For the source code of apk:

Download adr.rar, unzip and open it in Android Studio

I hope this helps you in your future projects :)



  • Trash to Treasure

    Trash to Treasure
  • Arduino Contest 2019

    Arduino Contest 2019
  • Tape Contest

    Tape Contest

14 Discussions


2 years ago

so inspirational! Thanks.
Do you mind to teach us about reverse transmitting data from Arduino to Android? :)

1 reply

Reply 2 years ago

looking for the same .. did u found anything?


2 years ago

it doesn't work for me! :/


2 years ago

Great tutorial bro!
Im having problem about arduino code .


Reply 2 years ago

Can I ask for the android code ?i know its been long for you to dig

Greatly apreciated :)


2 years ago

Hi, nice project! I want to use this to add a touchscreen of an old phone to a attiny85 project (in reality add the phone to the project) as button/input interface. Really neat and cheap solution. I just want to test the app first but cannot run on Android 2.3, can you compile it with earlier SDK (i believe it is 9)? Also another great idea is to make a browser version (html+javascript) of it so it can run on any browser on any system. I'm curious how many milliseconds one command takes, how fast can you repeat or switch to another button?


2 years ago

First of all thanks for posting the code.

Sorry but my English is not very good.

specific question:

Because there is a limitation to send numbers from 1 to 256?

ave track to modify the code and extend you up to 5 digits?

Thank you very much.


3 years ago

Hello ivi, Thanks for ur post it is a simple and cheap way to communicate with android. Can u please send Android source code using ecllipse.


3 years ago

Maybe you know how to transfer data via audio jack from arduino to android? Can you show schema connection all parts together please?