8038 Function Generator Circuit - Sine Wave Glitch - Page 1
Forum section: electronics / beginners

author: icon
author_rank: Regular Contributor
timestamp: April 04, 2012, 07:30:39 pm
content: HiI have a function generator based on the venerable (=crap and no longer available) 8038. The square and triangle waves seem pretty clean, but the sine has a funny glitch that appears as the frequency increases. Here it is circa 1KHz:Would I be way off the mark thinking that decoupling capacitor(s) near the chip might fix the problem? If so, given that the chip uses +/-15V would 2 caps, one from Vcc to ground and one from Vee to ground be needed? It's a ready made PCB so I'm going to have to bodge something up on the solder side.If I'm wrong, what might be the cause?CheersJohn Courtesy of my shiny newDS1052DS1102. Winking smiley.

author: Bored@Work
author_rank: Super Contributor
timestamp: April 04, 2012, 07:57:11 pm
content: I am not sure if it was the 8038 or some other common function generator IC, but one of them is known for this nasty habit. If I remember correctly it was typically an issue of the PCB layout, adjustments and keeping the supply power stable.

author: david77
author_rank: Frequent Contributor
timestamp: April 04, 2012, 08:03:17 pm
content: I think you're thinkin of the good old XR2206. I remember reading about it in Elektor, they claimed they managed to get around that problem.

author: amspire
author_rank: Super Contributor
timestamp: April 04, 2012, 10:05:53 pm
content: Looks like the 8038 needs a decoupling capacitor near the IC.Those spikes you are seeing are caused by the crossover current surge as the capacitor is switched between charge and discharge.You need something like a 1 uF ceramic cap across the power pins.Richard.

author: icon
author_rank: Regular Contributor
timestamp: April 04, 2012, 11:01:01 pm
content: Quote from: amspire on April 04, 2012, 10:05:53 pmThanks; just one between VCCand VEE(+15V, -15V), or from each pin individually to ground? Sorry if that's a dumb question.John

author: amspire
author_rank: Super Contributor
timestamp: April 04, 2012, 11:02:54 pm
content: Each pin to ground.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 05, 2012, 12:02:28 am
content: ISTR that sinewave nipples were a standard quirk of this chip - not sure if there was a solution.

author: Lightages
author_rank: Unknown
timestamp: April 05, 2012, 12:10:49 am
content: I have never seen a cure for this glitch in the chip.

author: grenert
author_rank: Frequent Contributor
timestamp: April 05, 2012, 02:28:46 am
content: If you add a little lowpass filtering (like at 1 MHz) to the output, the glitch is a bit improved. The chip is good to only 100 kHz or so anyway.

author: icon
author_rank: Regular Contributor
timestamp: April 05, 2012, 10:06:08 am
content: Ah well, thanks for the additional responses. Despite the addition of two 1uF caps, it still does this (channel 1 is the positive supply):And I know you all like a laugh, so this is my ghetto-engineered PCB. (I learned my craft in a Chinese instrument manufacturing facility)[Dave voice: "I don't like it; I don't like it at all"] Despite appearances, nothing is touching anything it shouldn't, and yes, I'll clean the flux off. I think I'll add a lowpass filter and then stick it in a box. Possibly under the bench.CheersJohn

author: icon
author_rank: Regular Contributor
timestamp: April 05, 2012, 02:28:42 pm
content: About as good as I can get it:Filtered trace is channel 2, of course.John

author: w2aew
author_rank: Super Contributor
timestamp: April 05, 2012, 08:46:46 pm
content: Since that chip doesn't get attached to ground when used with a split supply, you may want to also consider a bypass cap across the V+ and V- pins directly (pin 6 to pin 11). Since it's a high-frequency (narrow) glitch, you may want to tack in a medium value ceramic cap - 0.001-0.01uf or so.

author: icon
author_rank: Regular Contributor
timestamp: April 06, 2012, 10:59:00 pm
content: Quote from: w2aew on April 05, 2012, 08:46:46 pmThanks for the suggestion; tried it - still glitches. As others have said, this chip seems to be curiously resistant to the usual fixes. Perhaps that's why it's no longer available. The low pass filter at least provides a reasonable sine wave, up to 200KHz or so.RegardsJohn

author: 3n2323
author_rank: Contributor
timestamp: April 08, 2012, 02:04:21 am
content: hi icon,how did you include the pictures within your messages, instead of having them as attachments at the bottom and show up as attachment icons? do you have to keep them somewhere online?

author: bfritz
author_rank: Regular Contributor
timestamp: April 08, 2012, 04:14:14 am
content: Quote from: 3n2323 on April 08, 2012, 02:04:21 amIf using Internet Explorer and Windows, right click on the picture, and choose the "Properties" item. This will show you the location for any item on a plain 'ole HTML webpage. Note the poster used the online photobucket service as the location for the photos.

author: icon
author_rank: Regular Contributor
timestamp: April 08, 2012, 10:50:24 pm
content: ^||Yes, that, what he said. Sorry someone else had to reply for me; I hadn't checked back here.John

author: 3n2323
author_rank: Contributor
timestamp: April 09, 2012, 12:41:52 am
content: Quote from: bfritz on April 08, 2012, 04:14:14 amthank you for the reply!then we use the[IMGhttp://www.whatever...]tagin the message where we want the picuture t be, correct?it is much nicer to include pictures your way, it's easier for readers as well.

author: T4P
author_rank: Super Contributor
timestamp: April 09, 2012, 12:50:46 pm
content: Quote from: 3n2323 on April 09, 2012, 12:41:52 amYup . Use photobucket , although the ads are a pain in the arse , they keep the quality (Tinypic is owned by them too , but tinypic compresses the image very violently)

author: Unknown
author_rank: Unknown
timestamp: April 09, 2012, 01:01:43 pm
content: Yes, Photobucket is great. I love it when searching for information, coming across an old forum post that containts a solution, and finding out that all critical pictures and schematics are gone.</sarcasm>Just use the forum attachment feature and edit your post to reference these images. This has been discussed repeatedly on this forum, for examplehere. No need to pollute this thread with this information in my opinion, better start a new topic if searching fails to turn up relevant threads.

author: grumpydoc
author_rank: Super Contributor
timestamp: April 09, 2012, 01:37:19 pm
content: QuoteIs it me or does that trace now look decidedly non-sinusoidal?

author: Unknown
author_rank: Unknown
timestamp: April 09, 2012, 02:08:48 pm
content: I noticed the same. It's probably using a sine-shaper to convert a triangular wave to something semi-sinusoidal, but the triangular wave appear to be closer to a ramp (asymmetric triangular wave). Not sure if this is within spec for this regulator, but sine waves for analog function gens were generally not low distortion. This is where modern DDS techniques are far superior, unfortunately also more complex.

author: grenert
author_rank: Frequent Contributor
timestamp: April 09, 2012, 02:47:24 pm
content: The last picture is at 145 kHz; the first is at about 10 kHz. None of those one-chip funcgens gives a very good sine above around 100 kHz. I think the point was to show the glitch is better.

author: Unknown
author_rank: Unknown
timestamp: April 09, 2012, 03:30:39 pm
content: The MAX038 produced decent sine waves well above 100 kHz. Too bad it's discontinued.

author: icon
author_rank: Regular Contributor
timestamp: April 09, 2012, 06:24:33 pm
content: Quote from: grenert on April 09, 2012, 02:47:24 pmYes, sorry, that wasn't very clever was it. I was playing around at that frequency just to make sure that my R and C values were about right, and were getting the spike without unduly attenuating the signal, at about the maximum frequency that's usable. It looks more sinusoidal at 10KHz. Perhaps I need to look into DDS?And regarding external hosting - I share your annoyance about vanishing pictures. I claim force of habit - other forums have no other way of displaying photos. I'll mend my ways in future.RegardsJohn

author: grenert
author_rank: Frequent Contributor
timestamp: April 10, 2012, 12:47:25 am
content: Quote from: alm on April 09, 2012, 03:30:39 pmAh, forgot about that one. It became unobtanium before I ever had a chance to check it out. That's the chip our fearless leader used in his FG project!

author: kripton2035
author_rank: Super Contributor
timestamp: April 10, 2012, 06:41:46 am
content: there are some max038 on ebay sometimes ...beware of fakes - do not buy the cheapest ones...http://www.ebay.com/sch/i.html?LH_TitleDesc=0&_sacat=See-All-Categories&cmd=Blend&_nkw=max038&cmd=Blend&LH_PrefLoc=2