Wednesday, October 5, 2011

Android Phone Audio Signal Generator

An Audio Generator is a very useful tool in a hobbyist's lab especially during experiments and testing of audio circuits such as amplifiers. Unfortunately, this is one of those equipment that a hobbyist may not be willing to buy (that includes me) as it may not serve him much in other circuits i.e. digital circuits. Fortunately though, there are Virtual Instruments available for computers, and now as smartphones get smarter, they are now also available on phones.

FuncGen from Crescendo is one of such software I found on Android Market. It can generate Sine, Triangle, and Square waves, and White and Pink noise. Additionally, it can produce modulated waveforms, AM, FM, and PM. A Sweep mode is also available and an Arbitrary mode (waveform from mathematical expression) is promised in an update.


Modulation Parameters

Frequency resolution of the signal generator is 1Hz, waves can be generated from 1Hz to 20kHz. Triangle waves will already alias at 1760Hz (an anti-alias option is included), Square waves at 440Hz (sampling rate used is most probably 44100Hz). Modulation carrier is limited to 10% of the signal frequency. Full specifications can be found on Help of the program.

I've spent some time doing waveform measurement on my oscilloscope and here are the results:

Note: Probe is set to 10x, volume on the phone is one notch below full.

Sine waves seem to be pure, I don't have a Distortion Analyzer nor an Oscilloscope with FFT function to check though. Amplitude within the band will vary from phone to phone's headphone amplifier hardware. On my LG Optimus One, the useable bandwidth is around 25Hz to 20kHz.

1kHz Sine wave output

Rolloff is already noticeable around 25Hz

On the upper end, noticeable rolloff is around 20kHz
Triangle waves are triangle waves only in the lower end of the band as harmonics are already cut off by the hardware in the upper bands. At around 5kHz, the triangle already starts to look more like just a distorted sine wave, and anything above that, it's already just a sine wave. One thing I've noticed is that triangle waves are partially modulated (even with anti-aliasing turned on). Perhaps this comes from the sampling rate, on a cycle by cycle basis, some frequencies will not have the same exact points on the wave.

1kHz Triangle wave output

100Hz signal riding on the Triangle wave

At 5kHz, it's more just like a distorted Sine wave
Square waves are mostly distorted, though, I haven't tried to lower the volume or try it on another device. I'll take a look at that later. Just like triangle waves, square waves will only be square at the lower end of the band.

1khz Square wave output

100Hz Square wave output

5kHz Square wave output
White noise and Pink noise is clearly distinguishable.

White noise output

Pink noise output
Modulated waveforms are a great additional feature of this signal generator.

Amplitude Modulation

Frequency Modulation

Phase Modulation
While this signal generator may be limited by the phone hardware, this will still be very handy. This is also a lot more portable than using your laptop or desktop as the virtual signal generator. This signal generator is actually just what my workbench needs in my next personal project, but perhaps, I'll add an extra buffer amplifier just to be safe. :D

8 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Thank you for this review I just found this. I could not have done a better job. The low frequency square wave is actually not distorted, what you are looking at is the low frequency high pass function in the headphone driver. I have noticed that on most phones the low frequency cutoff is rather bad already rolling off around 100Hz. That's why the square looks like it does since the phone cannot produce DC.

      I will look into the modulation of the triangle wave, I am pretty sure it is not is the code so it has to be some artifact in the driver.


      Kim Beumer
      Crescendo Systems

      Delete
    2. Thanks Kim for the clarification about the low frequency response.

      Delete
  2. hi, is there any way you can produce mhz freq signal using an android app from a mobile phone?

    ReplyDelete
    Replies
    1. Do you mean mili Hz of Mega Hz. If you need mile Hz yes it is possible, if you want Mega Hz then I am afraid that is not going to happen. The phone's DAC's are way to slow for that.

      Delete
  3. These boosters can amplify your weak mobile signals up to 36X and provide you robust and uninterrupted connectivity. So, whether you are looking for signal boosters for your home or work, Seguro network boosters definitely deserve a try! mobile phone signal booster for home

    ReplyDelete
  4. I should assert barely that its astounding! The blog is informational also always fabricate amazing entitys. signal booster for virgin mobile

    ReplyDelete