Maker Pro
Maker Pro

iPod as oscillator for scope wave learning?

Hi. I don't have a function generator but have a spare iPod.
I went online and downloaded some audio tone files (from 10 Hz all the way to 22000 Hz, sampled at 44 KHz).
I don't understand the -3 db on the files. I assume there is a maximum decibel limit to sound files and the files just used -3 as a setting for them (with actual amplitude based on the volume control of the output device).

What I want to do is generate waveforms to examine on my oscilloscope to learn about phase shift.

I am thinking to play the audio files on my iPod, and have the signal output (from headphone jacks cable) to a transistor Base, and amplify a 9v battery voltage across the Collector / Emitter. I read that the headphone jacks output is about 2V peak (although I haven't tested it, and I wonder whether it isn't the volume control on the iPod that determines actual voltage levels).

And furthermore, I would then use the voltage from the transistor to put through resistors and capacitors to observe phase shift.

Will this work?

One thing I am wondering is, this won't be an AC signal but a DC signal.

I don't know how I can generate an AC signal. I could rig up some magnets and coils and turn them around with a DC motor I suppose. But anyway, what about the above iPod setup?
 

KrisBlueNZ

Sadly passed away in 2015
-3dB means that the amplitude of the audio signal encoded in the file is 3 dB less than the absolute maximum that can be encoded.

Assuming the audio is processed at a resolution of 16 bits, the sample values that represent the waveform can range from -32768 to +32767; a range of 65536 (216) different values. If the positive and negative peaks of the sinewave reached the absolute maximum negative and positive values, its amplitude would be 0 dB. A sinewave with an amplitude of -3 dB has a peak-to-peak amplitude (in the digital domain) of 0.707 times the amplitude of a 0 dB signal. So instead of peaking at sample values of -32768 and +32767, it would peak at -23170 and +23170.

In practice the only difference is that for a given volume setting, the -3 dB version will sound quieter than the 0 dB version.

The amplitude on the headphone connector could be as high as 2V peak to peak, yes. As you say, it depends on the setting of the volume control on the iPod, as well as the level of the audio in the file you're playing.

2V p-p is far too high to feed into a common emitter amplifier. You need to attenuate it; you can turn the volume down, and/or you can attenuate it externally using a voltage divider made from two resistors. You probably should have a resistive load on the headphone amplifier anyway. So, for example, you could use a 33 ohm resistor from the headphone output signal, feeding a 1 ohm resistor that's returned to the 0V common rail, then take the signal across the 1 ohm resistor. That will provide a 34 ohm load to the headphone amplifier, and it will attenuate your signal by a factor of 34 (in voltage terms).

The signal you get WILL be an AC signal. It will go above and below 0V.

You will need a capacitor to couple it to the base of the transistor without affecting the base bias (which is set up independently, using resistors).
 
Thanks, that is very helpful, and encouraging that it is an AC signal that comes out.

So, can I ask, what kind of transistor would work with this setup?

How about N2222? I have a few of those on hand.

What do you mean by base bias? Is that the minimum voltage (over 0.7) to cause the C/E channel to flow?

Thanks
 
Hi - thanks; I had read about BJT and FET not too long ago so hopefully I understand the mechanisms.

So, just to be clear, I cannot just feed my iPod audio signal to the Base, and I should have TWO voltage sources for the base? (One the base bias, and then "on top" of that feed in the audio signal?)

And on the Collector side, feed in a 9V source but not to exceed maximum current / power of the N2222?

(I was just figuring I needed the 9V because the 2V from the audio signal is too weak to directly power resistors and capacitors for examining phase shift with the oscilloscope).
 

KrisBlueNZ

Sadly passed away in 2015
Yes. You need two circuits to drive the base. A DC voltage, usually from a voltage divider made from two resistors, to set the bias for the transistor, and an AC (audio) signal, coupled onto the base via a capacitor. This audio signal comes from the iPod but the iPod's output level is too high; that's why I suggested a voltage divider using a 33 ohm resistor and a 1 ohm resistor to attenuate the signal.

The collector connects to the positive supply rail through the collector load resistor. A supply voltage of 9V is reasonable. Run that image search I linked to, and follow the diagrams to the page where they're described.
 

Harald Kapp

Moderator
Moderator
For starters, you can connect the headphone-out from the Ipod directly to the scope input - without amplifier. You can even attach a simple RC filter to the headphone out and watch the resulting phase shift. Headphone-out is capable of driving a headphone (~32 Ohm, that's the rating of the original ear buds as far ass I know), so it should have no problem driving any load >= 32 Ohm.


You may, for educational purposes, want to build an amplifier anyway. Here is the circuit for a simple single transistor amplifier.
 
As an alternative to using an iPod and tone files, you could run a software tone generator or software synthesizer on a computer, tablet, or smartphone (or iPod if it's a Touch). Then you can generate different waveforms, change the frequency, and add filtering. Just connect the headphone output to your scope like you would with an iPod.

Just offering this as a more flexible way to generate waveforms if you have the hardware.
 

KrisBlueNZ

Sadly passed away in 2015
Good idea kpatz. I've suggeted this myself in the past.

There's a free waveform editor called Audacity that runs on Linux and Windows, at least, that can generate waveforms and play them through the headphone output of a desktop computer or laptop.

http://audacity.sourceforge.net
 
Thanks everyone. I will build the little amp.
The reason I didn't want to use a computer, etc. to generate is because I was afraid I would screw up the connections and short out the scope with the ground common, if I am scoping an AC mains connected device.
Also, the spare iPod is spare, not my actual iPhone, but because of that it can only playback audio, not run apps.
 
My new problem now is that I cut and then stripped some headphone (ear buds) wiring and I see Left and Right wires, and stripping those I assume one is common, and the other is the signal. But it just looks like they have very tiny braided twisted wiring inside the plastic sheath, and I don't see how the two wires are insulated from each other unless they are coated with some plastic.

I tried testing for connectivity using my DMM and nothing (it was hard to clip onto those braided wires, they are so tiny).

What I will try to do is wipe them with some nail polish remover (acetone) and see if there is any coating on them. Then I will put a bit of solder onto them to make them more stiff.

In the meantime if you have any advice before I do any of this, much appreciated.
 
It may be easier to buy a stereo mini-plug with solder lugs and attach thicker wires to that instead of using headphone wires which are tiny. Then you can plug it into your iPod or other device and not have to worry about shorting things out or getting the connections wrong.
 
Top