热度 19
2014-6-20 15:37
1552 次阅读|
0 个评论
In my post yesterday , I described the building of a low-cost frequency generator. This is part of my Bodacious Acoustic Diagnostic Astoundingly Superior Spectromatic ( BADASS ) Display project. I need the frequency generator to squirt known signals into my display to ensure that everything is working as I expect. The next trick, of course, is to determine the characteristics of the signals I need to generate: peak-to-peak voltage, DC offset, and suchlike. Just to make sure we're all tap dancing to the same drumbeat, and remembering that a lot of EE Times Asia community members lean more toward the digital side of things than to the analog, take a look at the image below. The upper (blue) trace shows a triangular waveform with a period (p) of 2 ms (0.002 seconds). The period is the amount of time before the waveform starts to repeat itself. The frequency (f) is 1/p = 1/0.002 = 500 Hz. The highest value for this signal is +1.5 V, and the lowest is -1.5 V, so the peak-to-peak voltage is 3 V. Since this signal oscillates around 0 V, it has no DC offset component. By comparison, the lower (green) trace shows a square waveform with a period of 1 ms (0.001 seconds) and a frequency of 1 KHz. Since the lowest and highest values of this signal are 0.25 V and 1.75 V, respectively, its peak-to-peak voltage is 1.5 V. Also, since this signal oscillates around +1 V, it is said to have a DC offset of +1 V. The reason I'm waffling on about this is that I'm planning on driving my BADASS display from the headphone jack coming out of my iPad. Before I do that, I want to set up my frequency generator so that its output looks like that of my iPad. To do this, I need to know the peak-to-peak voltage and DC offset (if any) of the signal coming out of the headphone jack. Now, I'm sure this information is available on the web, but I couldn't find it. The next option was to go for empirical measurements. Before we go there, let's take a step back and consider the rest of my setup. When I'm listening to music on my iPad -- if I'm working on a hobby project in the garage, for example -- I typically listen to it on my Bluetooth Logitech Boombox . The problem is that, if I plug something into the headphone socket, this will disable the Boombox, or vice versa. To get around this, I decided to invest in a cheap and cheerful Cyber Acoustics subwoofer satellite system , which seemed to be a good deal at $39.99 from Amazon. The main thing about this unit (apart from the sound, of course) was that it accepted a 3.5 mm stereo jack as input -- the same as the iPad's headphone output. I also purchased two four-foot stereo audio cables and a six-inch stereo splitter cable . Six-inch stereo splitter cable. The idea is to plug the splitter into the iPad's headphone socket and use one side to drive the satellite system and the other side to drive my BADASS display. Before we proceed further, I should point out that my knowledge is a bit fluffy around the edges when it comes to audio signals and systems. I am, after all, a digital man, and audio tends to involve a lot of wibbly-wobbly analog signals. I'm not talking about digital storage or digital signal processing here; I'm talking about the signals being presented to the outside world when the rubber meets the road. I do know that that there's a difference in the characteristics of line-level signals (used to transmit analog sound between audio components such as CD and DVD players, TVs, audio amplifiers, and mixing consoles) and the signals coming out of the iPad's headphone socket. I also know that you are really not supposed to use a headphone output to drive an amplifier directly, because they tend to have different impedance characteristics. However, I also know that the creators of products like my Cyber Acoustics subwoofer satellite system are well aware that the world is full of idiots, that a lot of people will use the system in conjunction with some sort of MP3 player, and that a lot of people will do what I'm doing -- drive the system from a headphone output. The bottom line is that I decided to put my trust in the fates. When I plugged my splitter cable into the iPad's headphone socket and used one side to drive the satellite system, the resulting sound was pretty darned good, let me tell you. The next step was to look at the signals coming out of the iPad. Actually, I ended up using an iPod, because I wanted to use my iPad as an oscilloscope. (I'm making the not-unreasonable assumption that the headphone outputs from iPads, iPods, and iPhones are all pretty much the same.) I wandered over into the next bay, where they have all the test equipment and set everything up. Ignore the computer monitor in the background and the mouse in the center of the image. This was just a convenient table to use. The woofer is seen on the left. The two speakers are in front of the monitor. The iPod is resting near the front edge of the table, and the satellite system's control hub with the blue LED on top is seen to the right of the iPad. My chum Ivan is the master of the oscilloscope (and he won't let anyone else touch his scope). Before you could say "Max truly is magnificent," Ivan had taken the other output from the splitter and informed me that the signal coming out of the iPod was 2 V peak-to-peak with zero DC offset. It's not that I don't trust Ivan, but I don't like to leave anything to chance, so I next ran the signal from the iPod into the Oscium iMSO-204 oscilloscope running on my iPad. The following screenshot shows just the B channel in blue; I turned the A channel off. The four digital logic signals are seen at the bottom with nothing much happening, which isn't surprising, since they aren't connected to anything. Hurray. My iPad/Oscium oscilloscope confirms 2 V peak-to-peak with zero DC offset (happy dance). Now I know what values to plug into my frequency generator to drive my BADASS display.