Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Sunday January 12 2020, @04:14PM   Printer-friendly
from the wavy-dude dept.

http://cushychicken.github.io/ckt-notes-function-generator/

I [Nash Reilly] haven't done a Circuit Notes post in a long time. Years, in fact! And I'm considering picking up a function generator as a very late Christmas gift to myself. So, naturally, I started poking around online for function generators.

There are some truly cheap options available - you can get kit versions on Amazon for less than $15, but these are pretty limited in bandwidth, scope, and specs. They're basically just bistable multivibrators with some integrator stages for sawtooth and sine wave generation. One of these days, I'll take a little time to look into those - there are lots of foibles that you can run into with these designs due to the analog imperfections in the capacitors and opamps.

Today, however, I'm gonna take a look at the technology that rules the roost in function generation these days: direct digital synthesis. DDS relies on a packaged integration of a phase accumulator (fancy words for "an adding counter"), a lookup table of phase-to-amplitude conversions, and a digital-to-analog converter. DDS is another proof that digital technology makes certain subsets of electronics substantially easier: instead of a bunch of square wave oscillators and integration stages with the associated analog imperfections, you're instead limited by the linearity of your DAC, the resolution of your lookup table, and the linearity of the output stage. Certainly not as high performance as a big, highly tuned analog function generator - but it does fit on a single chip!


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 4, Informative) by Coward, Anonymous on Sunday January 12 2020, @06:31PM (2 children)

    by Coward, Anonymous (7017) on Sunday January 12 2020, @06:31PM (#942532) Journal

    For high frequency sine and square waves, DDS and function generators are the quick-and-dirty solution. Glitches, spurs, and image frequencies show up all over the place. PLLs are cleaner.

    Starting Score:    1  point
    Moderation   +2  
       Interesting=1, Informative=1, Total=2
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   4  
  • (Score: 1) by Ethanol-fueled on Sunday January 12 2020, @09:52PM

    by Ethanol-fueled (2792) on Sunday January 12 2020, @09:52PM (#942560) Homepage

    Well it goes without saying that if you know what a "spur" is and if you're concerned with image rejection, you're gonna spend a few hundred to tens of thousands on a proper synth. And another few hundred at least on a scope that can capture glitches. A basic bitch synth, hell, an arbitrary waveform generator, could be implemented easy as fuck on a fucking Arduino analog write and Google searches could provide you with impedance matching and amplification if you needed those.

  • (Score: 3, Interesting) by VLM on Monday January 13 2020, @12:17PM

    by VLM (445) Subscriber Badge on Monday January 13 2020, @12:17PM (#942699)

    The kind of mistakes detailed in the article would F up a PLL just as well.

    For values of both DDS and PLL, not F-ing up basic analog design principles seems to result in better performance. Or the kind of people who could F up a simple DDS are simply going to F up a simple PLL, given a chance. Hilariously, as an example from the article, sticking a giant capacitor on the output stage of an opamp that oscillates into large capacitance is going to screw up just as well the output of a DDS or the control loop of a PLL, LOL.

    You are correct in the sense that PLL and DDS degrade differently when pushed and some apps can tolerate different levels of types of substandard performance. A bad automobile analogy is if you insist on racing compact cars, something like a 70's Corvair is going to fail under pressure differently than an 80's Yugo vs a 90s Neon, although the failure modes would have differing importance based on track, although none of them are inherently much better or worse.

    To critique the article, OP was implying the PSRR of a '324 is hopefully good. Well, its about 100 dB. A 70s era '741 runs in the mid 90 dB range. Its gonna be fine anyway, because milivolts of noise attenuated by "about 1 hundred dB" is gonna be nothing compared to the devices own noise sources anyways.

    Likewise the guy claims to have never heard of STC and implies they're a graymarket copy of ST and no, STC is "legit" and they specialize in ultra super duper low cost controllers and sell pretty exclusively to the China market (like not much English datasheets). They're not as much fun to use but if you're making 10M consumer fad kids toys or similar, then pennies matter in shipped cost, although if you only sell qty 1000 specialty lab hardware it doesn't make sense to select a labor intensive headache to program. So in summary the STC controller part is a judgment error for the designer although the article implication that its a trademark violation or graymarket is pretty funny.

    My honest guess of the EE stuff in the article is some kid with no experience "designed" it as his senior year final project over a couple beers, or whatever Chinese drink to get drunk, and this product was kinda his application to get an entry level job. It DOES mostly work, and although its got major noob mistakes, whoever designed it will probably turn out OK with some experience at a company with more experienced engineers to teach him some things.

    In "academic world" using reference diagrams and examples is plagiarism to be avoided whereas in "real world" the chip designers put that stuff in the datasheet because you're supposed to use it for technical reasons so... do it... so its kinda funny to see the design where the guy clearly felt like he had to go his own way even when the mfgrs specifically wrote not to do it. Kid doesn't want an F on his final project for "cheating" even if it impairs performance. It would be like seeing a math major going "nah f it I'm not gonna use no integral tables I'm calculating this bad boy all myself to get an A" whereas in the real world people just use computer or google it or use a table.