Breaking News
Comments
Newest First | Oldest First | Threaded View
Page 1 / 3   >   >>
Max The Magnificent
User Rank
Blogger
Re: Another way
Max The Magnificent   6/17/2014 9:46:12 AM
NO RATINGS
@David: Sometime I'd like to take it further and design a wider range generator using a switched-cap filter chip fed by the Shift Register clocking signal to do the filtering.

Ooooh -- that sounds like a good column :-)

mhrackin
User Rank
CEO
Re: Another way
mhrackin   6/16/2014 7:19:01 PM
NO RATINGS
Triangles are really easy: all equal value resistors!   I didn't mention earlier, but all resistors should be 1% tolerance or better metal-film for low noise and distortion.  In volume, these are only a fraction of a cent in surface-mount flavors. The cost of mounting is larger than the piece part cost!

bwmetz0
User Rank
Rookie
PC + Audacity = Tone Generator
bwmetz0   6/16/2014 6:49:33 PM
NO RATINGS
I've never had a chance to verify with a scope (can't afford one), but some of those annoying sounds (sine, square, sawtooth) that your wife complains about can be easily generated with Audacity (http://audacity.sourceforge.net), an opensource project.  They claim 0.001 Hz resolution, but I'm sure it's really a function of your soundcard quality, e.g. software vs. on-board vs. discrete card.  The nice bit is there are additional community driven plug-ins for generating other tones like DTMF, etc.

 

The rig looks sweet, but figured you have a old PC sitting around and since this is an audio project, the response is probably good enough using a device designed for producing the same (think about MIDI files)...just in case you forget the new tasty at home or office one day.

anon6223816
User Rank
Rookie
Re: Another way
anon6223816   6/16/2014 5:51:27 PM
NO RATINGS
Note that you can use another set of resistors and an op amp to genererate a triangle, square wave, or other approximate (symmetrical) wave form at the same time off the same register, since the output impedance of modern digital chips is very low compared to the R you'll use with the op amp.

mhrackin
User Rank
CEO
Re: Another way
mhrackin   6/12/2014 9:37:19 AM
NO RATINGS
See David's post above.  My original application aws used in a couple of designs covering the full audio range.  As David pointed out, the main distortion products are pretty high-order, thus the single pole of the small capacitor in parallel with the summing op amp does a pretty good job (depending on how many decades of range you want to support). For my designs, the range was a single decade (telecom range of 300Hz-3KHz) and distortion was well under a percent as I recall.  This was back when i worked for Motorola Comm division in South Florida.  My designs always had the highest gross margins in the company despite being considered the "razors" of the business, not the blades!

zeeglen
User Rank
Blogger
Re: Another way
zeeglen   6/11/2014 8:05:11 PM
NO RATINGS
@ mhrackin

What an elegant idea!  Long ago a test engineer designed a production test fixture for one of my products that required a low frequency sine wave signal.  I suggested that he use a Wien-bridge oscillator, but he was of the digital persuasion and used a squave oscillator, a counter chain, a PROM with the sine conversion lookup table, and a D-to-A.

If only he (and me) had known about what you just described.  Any idea of the distortion specs vs number of shift stages?

David Ashton
User Rank
Blogger
Re: Another way
David Ashton   6/11/2014 6:16:52 PM
NO RATINGS
@mhrackin I also used this technique.  It was the subject of an article in Elektor magazine.  I recalculated the resistor values for a 10-bit shift register and used it for a synthesised frequency generator giving a precise 45 to 55 Hz output for testing frequency-sensitive relays (I worked for an electricity utility at the time).  It worked really well.  Because the primary harmonics (for an 8-bit register) are the 15th and 17th, you can just use RC filtering and it gives you an almost perfect sine wave.  I amplified that with a fairly standard audio amp and transformer to 220V for the output.  It was a great project.   Sometime I'd like to take it further and design a wider range generator using a switched-cap filter chip fed by the Shift Register clocking signal to do the filtering.  Oh for a bit more spare time.....

Max The Magnificent
User Rank
Blogger
Re: Another way
Max The Magnificent   6/11/2014 6:00:55 PM
NO RATINGS
@mhrackin: Back in the 1970s I created a little circuit that used a SINGLE digital chip to create a pretty good sine wave...

I love this stuff. I'd sort of forgotten how we used to cobble circuits together to do "stuff" -- now, whatever we need, our knee-jerk reaction is "how to program this into an MCU"

mhrackin
User Rank
CEO
Another way
mhrackin   6/11/2014 5:48:57 PM
NO RATINGS
Back in the 1970s I created a little circuit that used a SINGLE digital chip to create a pretty good sine wave.  Take an 8-stage shift register (CMOS preferably) and tie the last stage output (inverted; use a transistor if your design doesn't have a spare somewhere).  Oh, and you do need to tie the reset line to a power-up reset (which any digital design should have)That makes what is called a "switch-tail shift register" that will start out with all 8 outputs zero.  First clock pulse will fill the first stage with a "1" which will propagate through until all outputs are 1, at which point the next pulse will start filling with "0"s.  That's a divide-by-16.  Here's the neat part: connect each stage's output to a resistor of a value inversely proportional to sine (22.5 degrees*stage number) ignore the sign! Connect the other ends of all resistors together and to the summing junction (negative input) of an op-amp.  Connect the output of the op amp back to the summing junction with a feedback resistor roughly equal to the parallel value of all the input resistors, and put a small capacitor in parallel with the feedback resistor (this filters the spikes from the sharp edges of the digital outputs). Use your favorite programmable counter design to create the clock at 16 times the desired output frequencies (by changing the programming), or if you have even the tiniest little microP handy, use its programmable timer (of course you could use an 8-bit output parallel port to even eliminate the shift register....).  The rest I leave to the student as an exercise!  You can probably build this today for less than a buck!

 

Max The Magnificent
User Rank
Blogger
Re: Envy?
Max The Magnificent   6/11/2014 4:18:37 PM
NO RATINGS
@MeasurementBlues: Actually, it's called uncertainly.

Are you sure?

Page 1 / 3   >   >>


EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Max Maxfield

How to Fly Without Catching the Dreaded Lurgy?
Max Maxfield
19 comments
I am currently not wearing my happy face. In fact, I am a "poorly soldier," as my mother would say when I was a little lad.

EDN Staff

11 Summer Vacation Spots for Engineers
EDN Staff
19 comments
This collection of places from technology history, museums, and modern marvels is a roadmap for an engineering adventure that will take you around the world. Here are just a few spots ...

Glen Chenier

Engineers Solve Analog/Digital Problem, Invent Creative Expletives
Glen Chenier
15 comments
- An analog engineer and a digital engineer join forces, use their respective skills, and pull a few bunnies out of a hat to troubleshoot a system with which they are completely ...

Larry Desjardin

Engineers Should Study Finance: 5 Reasons Why
Larry Desjardin
45 comments
I'm a big proponent of engineers learning financial basics. Why? Because engineers are making decisions all the time, in multiple ways. Having a good financial understanding guides these ...

Flash Poll
Top Comments of the Week
Like Us on Facebook
EE Times on Twitter
EE Times Twitter Feed

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)