Signal tru Aux cord Android

Hi my problem is quite simple, I'm trying to etablish a communication between my arduino and my my old Android cellular devide tru an Aux cord. The Arduino is able to receive two different signals (L/R) with the Analog In but my problem is that I want to create a kind of digital signal. For now I am using a square signal 1hz at max volume (25/1024) but I would like to know if it is possible to send a continuous voltage to get the said digital signal (0 or 25) or if there is any other to simulate the digital signal.
Thank you !

You'll need to implement a MODEM at both ends to send digital data over audio. Modern phones
have dynamic noise-cancelling technology that will play havoc with most methods of doing this, as
the aux port is designed for one purpose, connecting a headset/earphones/microphone.

google "audio jack modem android"

I don’t understand what you want to do…

The output from the headphone jack is analog audio. It might be able to put-out DC (zero-Hz) if the output is DC coupled. That would depend on the particular phone. You’d have to write an Android application or find a way to generate a zero-Hz “audio” file (i.e. A silent file with a DC offset). The voltage depends on the phone.

What you can do is use regular audio (such as your square wave) and set a threshold in software for tone/no-tone. You’d have to do the same thing with DC, since you probably won’t get 5V out of the phone.

You’ll also need some “timing” since any normal audio waveform (including a square wave) is negative half of the time. For example, if the signal is below the threshold for 1/10th of a second that’s a zero. If it ever goes over the threshold in that 1/10th of a second period, that’s a 1.

Since the Arduino can be damaged by negative voltages, you should [u]bias[/u] or add a [u]protection circuit[/u]. (If you bias the input you can optionally subtract-out the bias in software.)

I’ surprised you’re only getting a reading of 25. I’d expect more voltage (with the phone volume cranked-up).