原创 Designing a low-cost frequency/function generator

2014-6-19 16:02 1657 18 18 分类: 消费电子

As you may remember, one of my current hobby projects is my Bodacious Acoustic Diagnostic Astoundingly Superior Spectromatic Display (a.k.a. BADASS Display). I will be the only one on my street to have one of these little beauties; how the neighbors will envy me (LOL).

 

The display itself is going to use about 10 meters of NeoPixels from Adafruit, all controlled by an Arduino Mega development kit, which is powered by a microcontroller from Atmel. Meanwhile, the audio stream from my iPad is going to be analyzed by a chipKIT MAX32, which is powered by a microcontroller from Microchip.

 

Now, one way to test this little beauty (when I finish building it, of course) will be to simply plug the audio output from iPad straight in and see what happens. Personally, however, I prefer to take things in stages. I've been thinking that it would be very handy to have an audio frequency generator that I could use to inject specific frequencies into the system to check its response.

 

This requirement was turned up a notch when my chum Steve Manley, who is currently blogging about one of his hobby projects, suggested I take a look at the MSGEQ7 Graphic Equalizer from SparkFun.

 

The MSGEQ7 chips are great. You feed an audio signal into one of your MSGEQ7s, which then filters out seven frequency bands centered around 63Hz, 160Hz, 400Hz, 1,000Hz, 2,500Hz, 6,250Hz, and 16,000Hz. I've decided to use these devices to test out the rest of the system before moving on to use digital signal processing (DSP).

 

I will be using two MSGEQ7 chips -- one for each audio channel -- but I actually purchased four of the little rascals, "just in case." Steve told me that he's bought a bunch of these, and that he really likes them, but that their sensitivity and response can be quite variable. Thus, he suggested using a frequency generator to feed the same frequency to all of the chips, to compare their, responses, and to pick the two with the closest match (I can also apply "fiddle factors" in software of necessary).

 

The end result is that I really need a frequency generator. Now, there are a variety of very tasty-looking frequency generator apps for the iPad, but I'm already using that over-worked little ragamuffin to generate the audio stream and as an oscilloscope using my Oscium iMSO-204.

 

My first port of call was to meander my way into the next bay and talk to my chum Ivan. Even though they don’t actually have a need for a frequency generator, Ivan rooted around under a bench and extracted a somewhat battered old case.

 

 

After blowing the dust off, he opened the case to reveal...

 

 

...something that scared the socks off me. I'm not quite sure what this is. I think it's a creation Ivan pulled together deep in the mists of time. He assured me that this would satisfy all my signal generating needs (once he'd worked out how to use it again), but I'm sad to say that I remained unconvinced.

Once more, Steve Manley came to the rescue. When I asked him what he used to test his sound-to-light creations, he pointed me at the FG085 MiniDDS Function Generator kit from those little scamps at SparkFun.


Based on Steve's glowing recommendation, I decided to invest in one of these little beauties. I don’t know about you, but I find there's something exciting with an air of expectation about an unopened package containing some electronic goodie sitting on one's workbench.

 

 

This function generator kit falls under the heading of "some assembly required." Happily, all of the finicky surface-mount devices have already been installed on the main board for you.

 

 

All that's left are things like the through-hole capacitors, connectors, buttons, and other bits and pieces. On the other hand, there are certainly enough of these to make you feel as though you are earning your keep.

 

 

Fortunately, the "quick start" assembly instruction sheet was very well done, and it really didn’t take long at all to pull everything together and set it running.

 

 

I'm also impressed with the intuitive interface and the associated ease-of-use. You can select between continuous waveforms of Sine, Square, Triangle, Ramp (up and down), and Staircase (up and down). It's immediately obvious how to select things like the frequency (0 to 200KHz), peak-to-peak amplitude (0 to 10V), and DC offset (-5 to +5V) and set them to your required values. You can enter initial values using the keyboard then make fine adjustments using a rotary switch.

 

You can also use this little beauty to generate servo test/control signals with microsecond resolution with user programmable pulse width, amplitude, and cycle. All-in-all, I have to say that this $49.95 kit is well worth the money. The next step is to use it to drive my BADASS Display; watch this space...


 

文章评论0条评论)

登录后参与讨论
我要评论
0
18
×
广告
关闭 站长推荐上一条 /2 下一条