Author Topic: 8038 Function Generator Circuit - Sine Wave Glitch  (Read 15724 times)

0 Members and 1 Guest are viewing this topic.

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
8038 Function Generator Circuit - Sine Wave Glitch
« on: April 04, 2012, 07:30:39 pm »
Hi

I 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:[1]



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?

Cheers

John
[1] Courtesy of my shiny new DS1052 DS1102. Winking smiley.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #1 on: April 04, 2012, 07:57:11 pm »
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.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline david77

  • Frequent Contributor
  • **
  • Posts: 934
  • Country: de
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #2 on: April 04, 2012, 08:03:17 pm »
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.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #3 on: April 04, 2012, 10:05:53 pm »
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.
 

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #4 on: April 04, 2012, 11:01:01 pm »
You need something like a 1 uF ceramic cap across the power pins.

Thanks; just one between VCC and VEE (+15V, -15V), or from each pin individually to ground? Sorry if that's a dumb question.

John
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #5 on: April 04, 2012, 11:02:54 pm »
Each pin to ground.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #6 on: April 05, 2012, 12:02:28 am »
ISTR that sinewave nipples  were a standard quirk of this chip - not sure if there was a solution.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4313
  • Country: ca
  • Canadian po
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #7 on: April 05, 2012, 12:10:49 am »
I have never seen a cure for this glitch in the chip.
 

Offline grenert

  • Frequent Contributor
  • **
  • Posts: 448
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #8 on: April 05, 2012, 02:28:46 am »
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.
 

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #9 on: April 05, 2012, 10:06:08 am »
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.

Cheers
John
« Last Edit: April 05, 2012, 10:43:50 am by icon »
 

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #10 on: April 05, 2012, 02:28:42 pm »
About as good as I can get it:



Filtered trace is channel 2, of course.

John
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #11 on: April 05, 2012, 08:46:46 pm »
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.
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #12 on: April 06, 2012, 10:59:00 pm »
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.

Thanks 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.

Regards
John
 

Offline 3n2323

  • Contributor
  • Posts: 37
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #13 on: April 08, 2012, 02:04:21 am »
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?
 

Offline bfritz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: us
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #14 on: April 08, 2012, 04:14:14 am »
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?

If 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.
 

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #15 on: April 08, 2012, 10:50:24 pm »
^
|
|
Yes, that, what he said. Sorry someone else had to reply for me; I hadn't checked back here.

John
 

Offline 3n2323

  • Contributor
  • Posts: 37
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #16 on: April 09, 2012, 12:41:52 am »
If 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.

thank you for the reply!

then we use the
[IMG http://www.whatever...][/img]
tag

in 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.
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #17 on: April 09, 2012, 12:50:46 pm »
If 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.

thank you for the reply!

then we use the
[IMG http://www.whatever...][/img]
tag

in 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.
Yup . 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)
 

alm

  • Guest
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #18 on: April 09, 2012, 01:01:43 pm »
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 example here. 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.
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2905
  • Country: gb
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #19 on: April 09, 2012, 01:37:19 pm »
Quote
About as good as I can get it:

Is it me or does that trace now look decidedly non-sinusoidal?
 

alm

  • Guest
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #20 on: April 09, 2012, 02:08:48 pm »
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.
 

Offline grenert

  • Frequent Contributor
  • **
  • Posts: 448
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #21 on: April 09, 2012, 02:47:24 pm »
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.
 

alm

  • Guest
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #22 on: April 09, 2012, 03:30:39 pm »
The MAX038 produced decent sine waves well above 100 kHz. Too bad it's discontinued.
 

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #23 on: April 09, 2012, 06:24:33 pm »
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.

Yes, 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.

Regards
John
 

Offline grenert

  • Frequent Contributor
  • **
  • Posts: 448
Re: 8038 Function Generator Circuit - Sine Wave Glitch
« Reply #24 on: April 10, 2012, 12:47:25 am »
The MAX038 produced decent sine waves well above 100 kHz. Too bad it's discontinued.

Ah, 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!   :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf