Author Topic: Spikes on triangle wave in VCO  (Read 12845 times)

0 Members and 1 Guest are viewing this topic.

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Spikes on triangle wave in VCO
« on: December 18, 2015, 08:39:42 pm »
I've been building the VCO as detailed in 'The Art of Electronics' v3 (schematic below). The square wave looks good, but the triangle wave has a spike on top as shown in the scope output below (2 figs, one zoomed in on).

I am using all the parts as detailed in the schematic, except IC2 where I have substituted TLC2262.

I am curious as to what might be causing this. I have read that square waves can capacitively couple to other signals in a circuit and am wondering if this is it. If so, how exactly is it capacitively coupling? I have soldered this circuit on stripboard - could it be coupling between tracks, or could it be coupling between leads on the top (I have tried to keep everything as neat as possible)?
 

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 694
Re: Spikes on triangle wave in VCO
« Reply #1 on: December 18, 2015, 08:57:00 pm »
IC2 output on Ch2 of the scope please!

Also +IN of IC2 might be interesting to probe.

A wild guess would be that you are running IC2 off the higher VCC that IC1 uses. This makes the trigger-level all wrong and IC2 'fires' only at the top of the triangle-wave.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14915
  • Country: de
Re: Spikes on triangle wave in VCO
« Reply #2 on: December 18, 2015, 09:01:48 pm »
Capacitive coupling can happen at serveral places. One is between close by lines or from parts to lines. Another type of coupling is inside components: e.g. in the MOSFET there is a gat - Drain capacitance. The desecond OP has some capacitance between the inputs in addition to the lines.

The LT1077 is a rather slow low power OP - so is quite easy to be disturbed even from the output side.

The plan is missing decoupling at the power supply - it is well possible to get cpupling this way to.
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #3 on: December 18, 2015, 09:06:56 pm »
@awallin, here is channel 2 as well. I've double checked and IC2 is definitely running off the 5V reference as in the schematic.

@Kleinstein, the power supply is a 9V battery, if that helps.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spikes on triangle wave in VCO
« Reply #4 on: December 19, 2015, 01:29:08 am »
Seems to me, LT1077C isn't perfectly fast, so it takes some time to respond to the change in input state.  During that time, the input is coupled to the output through the 0.1uF capacitor, allowing feed-forward.  A falling edge on the square wave gives a rising edge at the input, and therefore at the output, before things come under control.
Of course, the same should be true of the rising edge, if even moreso because 2N7000 turning on is a fairly large event.

For the integrator, use an op-amp that has GBW which includes the transition time of the square wave.  That is, if the square wave transitions in ~200ns, use >10MHz GBW.

If you don't have a faster amp handy, slow down the square wave using an RC filter.

LT1077C is in fact rather slow, so you'll need a good bit of slowness, perhaps a series 10k resistor and 1nF to ground (which will be across the G-S of the 2N7000).  Likewise, the maximum operating frequency will be in the low kHz, for a triangle that's reasonably "crisp" yet.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #5 on: December 19, 2015, 12:13:59 pm »
Thanks @T3sl4co1l that's really helpful. I will follow your suggestions and see what happens!
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Spikes on triangle wave in VCO
« Reply #6 on: December 19, 2015, 04:52:33 pm »
Just for fun, I breadboarded the circuit using a TL082 dual op-amp subbing for the two specified opamps. I subbed a 78L05 for the LT1027D and it worked fine, with the TL082 powered by the 5 volt Vreg, although the output voltages were a little low. But eliminating the regulator altogether and feeding the Vcc with 7-8 volts worked even better.
 
I used the same component values except I had to put in around 7.34 k instead of 7.5 k for R1 (didn't have the exact value so I had to put two resistors in series). I haven't checked to see if the formula still holds but the thing responds to varying the Vin to control frequency just fine.

There is just a trace of a tiny spike on the bottoms of the triangle waveform. It doesn't show up at all in "average" acquire mode with 2 averages, but can be seen (barely) in "normal" mode. Certainly there is nothing like the radical spikyness in the OP's scopeshot.




« Last Edit: December 19, 2015, 04:57:22 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Spikes on triangle wave in VCO
« Reply #7 on: December 19, 2015, 05:18:22 pm »
With Vcc (Vref) of 8.2 volts and a control (Vin) voltage of nearly 18 volts I max out on the frequency at a bit under 3 kHz and see some spikes on the top and bottom of the triangle waveform, but still nothing like the OP's spikes.

The easiest person to fool is yourself. -- Richard Feynman
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20080
  • Country: gb
  • 0999
Re: Spikes on triangle wave in VCO
« Reply #8 on: December 19, 2015, 06:37:09 pm »
An ordinary op-amp will work for the Schmitt trigger (IC2) but it won't be so stable as the thresholds will vary depending on the voltage drop of the output transistors.

In the design posted by the original poster, a comparator with a push-pull, rail-to-rail output run of a regulated supply provides a greater level of stability, than one would get from a TL082.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Spikes on triangle wave in VCO
« Reply #9 on: December 19, 2015, 07:11:46 pm »
An ordinary op-amp will work for the Schmitt trigger (IC2) but it won't be so stable as the thresholds will vary depending on the voltage drop of the output transistors.

In the design posted by the original poster, a comparator with a push-pull, rail-to-rail output run of a regulated supply provides a greater level of stability, than one would get from a TL082.

Of course. Nevertheless... my build works, it is stable, and it doesn't have the severe spikes that the OP's build has, even though it is just stuck together on a small breadboard and uses the single chip common-as-dirt dual opamp. Mine does have a greater DC offset on the outputs however.

Some people might say that the TL082 build even works _better_ than the OP's version, since it doesn't have the spikes.


« Last Edit: December 19, 2015, 07:13:40 pm by alsetalokin4017 »
The easiest person to fool is yourself. -- Richard Feynman
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Spikes on triangle wave in VCO
« Reply #10 on: December 19, 2015, 07:14:42 pm »
What kind of bypass caps you have in the power rail? Are the bypass caps close to the op amp? How good is your breadboard?
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20080
  • Country: gb
  • 0999
Re: Spikes on triangle wave in VCO
« Reply #11 on: December 19, 2015, 07:46:13 pm »
An ordinary op-amp will work for the Schmitt trigger (IC2) but it won't be so stable as the thresholds will vary depending on the voltage drop of the output transistors.

In the design posted by the original poster, a comparator with a push-pull, rail-to-rail output run of a regulated supply provides a greater level of stability, than one would get from a TL082.

Of course. Nevertheless... my build works, it is stable, and it doesn't have the severe spikes that the OP's build has, even though it is just stuck together on a small breadboard and uses the single chip common-as-dirt dual opamp. Mine does have a greater DC offset on the outputs however.

Some people might say that the TL082 build even works _better_ than the OP's version, since it doesn't have the spikes.
Yes, the TL082 is much more suited to this application.

The rail-to-rail comparator can be replaced with the old LM393 with buffer transistor to lower the output saturation voltage.
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #12 on: December 19, 2015, 08:14:13 pm »
I have now checked the transition time of my square wave. It is 7.5us, which suggests a GBW of the integrator greater than 133kHz. The LT1077's GBW is 230kHz.

I am also trying to find some alternative op amps I can use in my current stocks to compare with the other approaches suggested.
« Last Edit: December 19, 2015, 08:17:07 pm by helix1 »
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #13 on: December 19, 2015, 08:55:14 pm »
I didn't have a TL082, but did have a TL072 lying about, so breadboarded up again to compare with @alsetalokin4017.

The results are below, again much better than the original circuit and almost no spiking at all on the triangle wave.

I am presuming H&H tested the original circuit so still can't quite understand why mine is so different. The only difference between mine and theirs was IC2, so it must have been that.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spikes on triangle wave in VCO
« Reply #14 on: December 19, 2015, 09:09:22 pm »
Don't assume -- there's more than a few errata since the first printing of the 3rd edition :)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #15 on: December 19, 2015, 09:09:41 pm »
And one more, just for the hell of it. The TLC2262 used as IC2 in the original circuit, this time used for both ICs. Definitely more spiky on the triangle wave, but more with the rising edge on the square wave, in contrast to my original circuit.
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #16 on: December 19, 2015, 09:17:00 pm »
The rise time for the square wave on the TL072 is about 3 times faster as well.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20080
  • Country: gb
  • 0999
Re: Spikes on triangle wave in VCO
« Reply #17 on: December 19, 2015, 09:21:04 pm »
I've just noticed that the TL072/082's common mode range doesn't include the negative rail. It's a couple volts above that and may suffer from phase inversion when the input voltage goes too low. If nothing else, the input currents will rise drastically, at lower input voltages, making it less accurate.

The TLC2262 would be better used as IC1. You could even try using it for both IC1 and IC2.

I haven't built the circuit in real life, only simulated it.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20080
  • Country: gb
  • 0999
Re: Spikes on triangle wave in VCO
« Reply #18 on: December 19, 2015, 09:33:57 pm »
The TLC2262 is not supposed to be used as a comparator. The TLV351 would be better.

How about using a 555 timer for the Schmitt trigger?
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #19 on: December 19, 2015, 10:10:52 pm »
Here's the output for TLC2262 and 555 chip. Getting an extra blip on the rising edge of the square wave, and a bit more spiking on the triangle.

Second output is TLC2262 and 7555 chip, which looks better.
« Last Edit: December 19, 2015, 10:16:51 pm by helix1 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spikes on triangle wave in VCO
« Reply #20 on: December 19, 2015, 10:12:34 pm »
Put a pull-down resistor on the 555 output (or use a CMOS version).

Zoom in on the 'blip', and try varying the square wave rise time with an RC lowpass filter.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline helix1Topic starter

  • Contributor
  • Posts: 44
  • Country: gb
Re: Spikes on triangle wave in VCO
« Reply #21 on: December 19, 2015, 10:49:04 pm »
So the blip was fixed by switching to a 7555 instead of NE555.

Here are a few pictures of the spike at the base of the triangle waveform. The first one stays constant on an input till about 1.4V, then starts to increase in height. I have included shots at 2.75V and 5V on the input to the VCO.

The oscillator goes from about 20Hz to 1kHz quite smoothly now. The only problem left is the spike.

The second to last picture shows the spike alongside the rise in the square wave, which is MUCH faster now.

And just for comparison, the last picture shows the spike on the top of the triangle for the LT1077, as used in the original circuit!
« Last Edit: December 19, 2015, 11:07:04 pm by helix1 »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20080
  • Country: gb
  • 0999
Re: Spikes on triangle wave in VCO
« Reply #22 on: December 20, 2015, 01:34:04 pm »
It's not surprising the blip was fixed by replacing the NE555 with the CMOS version.

The bipolar 555 draws huge current spikes when the output changes state. Proper decoupling and layout can help to minimise any blips caused by the current spike.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14915
  • Country: de
Re: Spikes on triangle wave in VCO
« Reply #23 on: December 20, 2015, 02:08:19 pm »
Having a resistor (e.g. 1 K range) in the gate line of the FET could also help to reduce the spike with relatively slow OPs. It slows down the signal to the FET but keeps the square signal fast. The 7555 as a schmidt trigger is a good idea.
 

Offline alsetalokin4017

  • Super Contributor
  • ***
  • Posts: 2055
  • Country: us
Re: Spikes on triangle wave in VCO
« Reply #24 on: December 20, 2015, 04:06:33 pm »
I've now tested LM358N, HA17358, and MC1458P,  all of which have the same pinout as the TL082 type. The 358 variants have spikes similar to the OP's spikes (but still not nearly as bad in amplitude), the 1458 has about the same spikes as the TL082 but the square wave has slower transitions.  On my cheap, tiny breadboard the TL082 gives the cleanest triangle waveform and the fastest square wave transitions (fall time otoo 450-500 ns, risetime otoo 550-600 ns), and overall "squareness". I am not using any decoupling caps on input or near the chip itself, just duplicating the OP's circuit (but without the input voltage regulator, just powering the single opamp chip with ~8.5 V from my bench supply).  The only problem is the DC offset.
And of course when Vin is too low, there are some problems like loss of symmetry and phase inversion. But with Vin from (Vcc/2) to a bit over 2Vcc the thing is well behaved.
The easiest person to fool is yourself. -- Richard Feynman
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf