Turn a smart phone into a signal generator
Signal generators are a handy thing to have around the lab. They are perfect for testing inputs on a new hardware design and verifying the behavior of a circuit before connecting all the pieces together. In recent years these lab tools have not only decreased in size but also in cost. The result has been a plethora of portable versions that now exist on the market.
For an engineer-on-the-go, this is very convenient but often times having to bring one more piece of equipment always seems to put the tool bag over the 50 pound limit. This is one reason why it is becoming popular to design lab equipment that can be plugged into a smart phone. Rather than carry around another device with a computer in it, utilizing the computing power and capabilities of the phone allows the device to be smaller, cheaper and weigh less!
So how can someone turn their smart phone into a signal generator? The simplest way is to exploit the headphone jack that is already present on the phone! There is no need to get fancy and try to interface to the onboard USB! Now just like any engineering project there are limitations on the requirements of what this port can do.
A standard headphone jack will typically only cover the frequency ranges that a human can hear (20 – 20,000 Hz). This seems like a limited range but for most sensors and applications this is actually a pretty wide range. A great example application is for medical sensors such as EKG, EEG and EMG. These signals don’t have components much over 100 Hz at the most!
The smart phone signal generator can be built for less than $15! The hardware consists of a single stereo 3.5 mm headphone plug, some wire and then optionally three alligator clips to connect the signal generator to the test device. The headphone jack consists of a right and left channel in addition to a ground. Figure 1 shows an image of the headphone jack being soldered with three wires. The big metal tab on the bottom is the ground with the green and red wires being attached to the left and right channels respectively. Once the headphone jack is soldered, it can be closed up and the alligator leads can be connected either through solder or the set screw depending on the type of connector chosen. The final piece of hardware can be seen in Figure 2.
Figure 1. Soldering the headphone jack
Figure 2. The assembled hardware
There are a number of software options available for both iOS and Android operating systems through their respective application stores. For iOS, Sig Gen seemed to be the best option available on the market and for a cost of less than $3! Figure 3 shows an example of how the application looks on the phone. For Android, there were far more choices than for iOS. The best looking option that was tested was called Waveform and literally was designed to look like the front panel of a signal generator! It can be seen in Figure 4.
Figure 3. iPhone Sig Gen
Figure 4. Android Waveform
Both of these applications provided the ability to change common functions such as the output signal level, the waveform and frequency. Since the hardware is a phone, the applications also include the ability to generate different waveforms on left and right channels of the headphone jack; each of which is independently controlled! It’s like buying one channel and getting a second one for free!