Function Generator Waveform Discontinuity - Page 1
Forum section: electronics / testgear

author: jcwtm
author_rank: Newbie
timestamp: October 22, 2021, 05:10:19 am
content: Hi all, I just bought a used BK 4040 function generator and its waveforms are discontinuous at the maximum and minimum. This is most noticeable when outputting the triangle wave and is present to some degree on all frequency ranges. No other features have been enabled. I have tried other function generators on this scope and this function generator on another scope and am certain it's an issue with this function generator. I only have a basic understanding of how a function generator works but if the triangle wave is generated by charging and discharging a capacitor, how can the waveform be discontinuous if it's the same capacitor? Any ideas as to what could be causing this?

author: james_s
author_rank: Super Contributor
timestamp: October 22, 2021, 06:15:01 am
content: It isn't discontinuous, something is causing a rapid voltage change just past the upper and lower peaks though which is quite strange. Do you have a schematic? Sounds like someone was able to get one.https://www.eevblog.com/forum/repair/bk-4040-function-generator-issues/I don't know how the B&K 4040 is designed, it's possible that it is a digital function generator, it could have a stuck bit in the DAC.

author: Brumby
author_rank: Unknown
timestamp: October 22, 2021, 06:42:54 am
content: Quote from: james_s on October 22, 2021, 06:15:01 amAgreedQuoteIt certainly is.QuoteLooks to me like a DC offset between the positive going half cycle and the negative going half cycle. Not sure I would go for a stuck bit in the DAC as this would present as a repeated step change.Interesting fault, though.

author: jcwtm
author_rank: Newbie
timestamp: October 22, 2021, 06:46:21 am
content: Quote from: james_s on October 22, 2021, 06:15:01 amI'll try to get a copy and report back.

author: TurboTom
author_rank: Super Contributor
timestamp: October 22, 2021, 07:56:04 am
content: It's analog design, based on the MAX038 function generator IC. Since the waveform shaping happens internally in the IC with the timing capacitor charge/discharge voltage as the main signal source, the only external cause for an effect like this may be a too high resistive component in the timing capacitor link, causing a level jump when the current sources/sinks are toggled. You may check the range switches and look for other (partial) discontinuities in this area.

author: radiolistener
author_rank: Super Contributor
timestamp: October 23, 2021, 02:44:26 pm
content: If it uses DAC, such issue can be caused due to some problem with DAC databus wires (short circuit between lines or line break or incorrect data line order).But also I was catch similar issues onXR2206generator due to fake XR2206 chip bought from aliexpress, which was probably rejected IC from the factory. It had similar discontinues and random pulse noise which looks very like unstable microcontroller with DAC. This looks very strange, because XR2206 is analog circuit, but that fake instance worked like buggy DDS with DAC...I hear rumors that such instability can be caused due to dirty silicon used for IC manufacturing.

author: mawyatt
author_rank: Super Contributor
timestamp: October 23, 2021, 02:57:54 pm
content: The glitch in the triangle waveform is due to the way these analog generator chips work. They charge a cap to a specific level then discharge at the same rate, the glitch is likely caused by a problem with the change from charge to discharge since it occurs at the peak.On the sine wave this glitch is a result of the way the sine wave is created. The method uses the triangle wave and soft non-linear wave shaping with transistor/diodes to smooth the triangle into something close to a sine wave. Since the triangle wave is used to produce the sine wave, the triangle wave glitch also appears on the sine wave but slightly subdued due the mentioned method to approximate the sine wave.Best,

author: TimFox
author_rank: Super Contributor
timestamp: October 23, 2021, 03:10:59 pm
content: With an analog function generator, the sine-wave shaping circuit after the triangle wave generator always has a problem of some magnitude at the positive and negative peaks, where the zero derivative at the extrema is not obtainable from a passive untuned non-linear circuit from the triangle wave with its discontinuous first derivative at the positive and negative peaks.

author: David Hess
author_rank: Super Contributor
timestamp: October 24, 2021, 12:47:14 am
content: That looks like charge injection from the switches which direct the current into the integrating capacitor. I do not know how that could happen unless the integrating capacitor is too low of value. Is the frequency correct on the output?Quote from: TimFox on October 23, 2021, 03:10:59 pmThat is not the problem here. Since the sine shaper relies on triangle wave linearity and amplitude, the glitch in the sine output is produced from the glitch in the triangle output. An accurate triangle wave is required before an accurate sine wave can be produced.

author: duak
author_rank: Super Contributor
timestamp: October 24, 2021, 02:51:12 am
content: If possible, look at voltages right on the terminals of the timing capcitor(s). eg. for the 200k range, look at both terminals of C104. If the anomaly is present there must be some resistance in that circuit, perhaps in the switch contacts - maybe a good cleaning is needed.If not, perhaps some of the square wave is sneaking into the triangle and sine. I don't know enough about the internals of U102 (MAX038) but maybe one the power supply bypass capacitors has gone bad (C109, C110). Check the +5V and -5V for any variations. Since U102 does the selection of the waveform perhaps it has developed some leakage between the waveforms internally. I would also check the board for proper soldering and cleanliness and then observe the signals on it, especially the GND pins. Maybe one of GND pins has a poor connection. I thought this chip was surface mount but I see it is DIP so it should be quite easy.Best o' luck

author: bdunham7
author_rank: Super Contributor
timestamp: October 24, 2021, 04:10:58 pm
content: There is a user manual and a schematic, but no proper service manual that I can see. You can check with BK Precision, if they have one they'll send it to you.You said this happens to some extent at all frequencies. Can you try some wide-ranging frequencies and compare the discontinuities?As has been previously stated, the simplified description of how the triangle wave is generated is a square wave charging a capacitor through a resistor. In this simplified model, a small capacitance across that resistor would create a discontinuity like this as it would allow a surge of charge through with each reversal. The actual circuit is probably a bit more than that, so you'll have to peruse the schematic--I'd start with R104 and U1008.I've worked on a number of analog function generators like this, including the very complex HP 8116A, and although many adjustments are often needed--especially to true up the sine wave--I've not yet seen a discontinuity in the triangle like this. Typically the tips of the triangle are rounded due to the transition time of the input square wave. Perhaps there is some compensation for this somewhere that is overdoing it.Edit: The scanned schematic isn't great and is missing some vertical lines that you'll have to draw in. R100 to R102 and SW100B-7 to R104, for example.

author: TurboTom
author_rank: Super Contributor
timestamp: October 25, 2021, 07:42:16 am
content: The BOM of the generator specifies aMAX038as the main function generator chip. Check the linked datasheet and you'll see there's no adjustment for that kind of distortion provided, there's only an asymmetry compensation for the chare/discharge current source/sink. As others have told, just check the voltage at the Cosc node (pin 5) for similar distortion as you find at the output of the FG. If present, check for a too high resistance in the switching path to the capacitors (as I said somewhere above). An ohmic resistance in this node will cause an instant voltage rise/drop as a result of the charge/discharge currents running through it, just as you observe in the signal. If there's no such resistance externally to be found, you can be pretty sure the function generator chip is defective. You may have a look at the supply rails of the instrument as well.This should actually be a pretty straight-forward repair. Good luck!

author: SilverSolder
author_rank: Super Contributor
timestamp: October 25, 2021, 02:23:44 pm
content: The excessive resistance in the timing RC circuit could also be down to a bad solder joint at any of the involved components, including the chip itself.Interesting problem!

author: Axtman
author_rank: Regular Contributor
timestamp: October 25, 2021, 03:35:56 pm
content: I had the same "pointed" sinewave coming from my old function generator. BY following the calibration procedures I was able to "round off" the top of the sine wave.

author: David Hess
author_rank: Super Contributor
timestamp: October 26, 2021, 02:49:51 am
content: Quote from: TurboTom on October 25, 2021, 07:42:16 amTypically integrated function generators use a current source and a current sink with their outputs connected to the integrating capacitor. The positive side PNP current source comes from just a current mirror. The bottom side NPN current sink switches between no output, and double the current output of the positive side current mirror, so the combined output is +I or -I. The bottom side current is switched by diverting the current away from the emitter of the bottom transistor so the switching node never sees the capacitor directly, but a small amount of charge is still injected though the emitter.Discrete function generators use a different configuration with positive and negative matched current sources, and a diode bridge to direct the current. The low capacitance of the diodes limits charge injection from the switching waveform into the integration capacitor.An operational integrator is not used because the amplifier must be unity gain compensated, which limits bandwidth, and the limited bandwidth causes lag when the integration direction changes.