Debugging my Tri-Sine waveshaper

Hey guys,

I just breadboarded the Thomas Henry waveshaper and hooked it up to the (buffered) triangle output of my AS3340 vco but no matter what I do, I can’t get a proper sine out of it. Instead I get only the first half of the wave and the second part is flipped over, like so:

Here is the schematic of the waveshaper I’m attempting to build:

Some notable differences are that I’m using 12V rails and that the triangle wave out of the VCO is not 10V p/p but rather around 6V p/p. Also, it is not centered around ground. I tried AC-coupling it with a 10uF cap + 10k resistor but I didn’t have any luck properly doing this.

There is this separate opamp dangling in space. I haven’t connected it because it is not clear to me how it should be connected.

Perhaps this is exactly the intended output and I need to add more components to flip the second half of the sine period? It does say it is a “part of” the sine waveshaper. ::thinking:

Any tips or debugging info would be highly appreciated! ::grin:

The TL072 chip has 2 Opamps and the second unused is connected as shown in the schematic so as not to leave floating pins (not good to have floating pins on opamp :wink: )
So you connect pin 6 and 7 together and the 5 to the GND .

1 Like

I imagine you must have tried to adjust the trimpot ?
and also it looks like it’s the kind of circuit that uses matched transistors, but i don’t think that resolve your problem

I had a go at simulating this. If I did it right, with R1 at about 65k I get a fairly sine-ish output. It’s not the full 10 Vpp claimed, and it has a -12 V DC offset:

(This was at a much higher frequency than yours but I don’t think that matters.) With the input offset by +5 V, though, the output’s bad:

and if I then set R1 to about 30k it looks like this:

which is remarkably like your picture, but still with that -12 V offset.

So I think you need to figure out your input offset problem. I tried adding a series 10 µF cap and a 10k resistor to ground before R1, and changed the frequency to 40 Hz, and got this (the blue is the offset input triangle and the brown is after the cap):

So it ought to work. (This was with ±15 V.)

3 Likes

With ±12 V it looks like you might need to use a different trimmer setting and might need to play with some of the resistor values (I’m seeing saturation at -12 V on the bottom of the sine) but I’d guess it should be workable.

1 Like

Isn’t the triangle out of the AS3340 only positive ?
See here how to fix that :

You can use that second unused OpAmp of the '072 for that.

Oh my god. So many helpful replies. Thanks guys ::heart:

I had a go at simulating this. If I did it right, with R1 at about 65k I get a fairly sine-ish output.

Fantastic. Thank you so much! I also have a circuitlab subscription (the cheapest one). I will have a go at simulating this too.

Isn’t the triangle out of the AS3340 only positive ?

Yes, I tried fixing that with a rudamentary high-pass filter but it didn’t work properly. Perhaps I made a mistake. I will look into your suggestion.

I’ll get back to you with my findings.

A high-pass filter won’t solve that.
You need to shift it down so it is symmetrical about 0V.

2 Likes

Just to recap - issue is that this sine shaper needs a bipolar signal.
As @eric said high-pass filter won’t help you there. You need to shift it with opamp. You can skip the trimmer in my design, it is used to achieve “perfect” symmetry. I only did it in my design because I have LFO mode and it bothered me that it wasn’t exactly on point. Don’t think it will make any difference as a regular oscillator if it is few % off center.

No, an op amp isn’t required. A cap and resistor will do fine.

1 Like

Indeed - use a capacitor for AC coupling - as part of a HPF is good too, you just need to pick the right values. Think of the DC offset like a really low frequency - so you want to block it and let through higher frequencies.

For a simple RC filter the 3db cutoff point is 1 / (2 * pi * R * C) - you want to pick values that give a low 3db point, below the frequency of the signal you want shaped. In @analogoutput’s simulations he picked 10uF and 10k - this gives Fc of something around 1.6Hz - so unless this is for an LFO you should be good to go.

Cheers,
Jared

2 Likes

Its working. :raised_hands: I must have made a mistake when I initially set up my RC filter. I caught myself recently placing the resistor to ground in front of the cap, so it might have been a bug like that.

Now it looks like this. The great thing is that I didn’t even had to modify the schematic at all. After the RC filter (10uf / 10k), even 5V p/p signals can be transformed into sines. I’ve also made the circuit in circuitlab and I must say that it is a perfect little toy to play around with in a simulator :sunglasses:

I think this makes for a fun extension of a VCO because if you turn R1 into a proper knob, you can use it to fade between triangle, sine and something that resembles pulse which is pretty awesome for a little circuit like this. Making this voltage controlled would be a great exercise. Perhaps this is possible using an LM13700, which might be a next exercise for me to try.

I’m definitely going to check out other waveshaping circuits. Does anyone have any good & simple one I can try out?

Thanks again :grin:

1 Like

Barton musical circuits has a couple of cool ones. The MultiPWM or the 4046 shaper. Think he has a couple more too

1 Like

The 4046 “shaper” isn’t really a waveshaper in the usual sense; it creates square waves at the frequency of the input and up to 3 octaves higher and lower, and then lets you mix them.

If you include wavefolding as a kind of waveshaping there are several of them around including the Nonlinear Circuits Timbre.

1 Like

The MultiPWM may not be a true waveshaper either, in that case! :grimacing:

I don’t know if you’d want to consider this a waveshaper or not, but Barton has this new module. It’s designed to take a triangle wave and double its frequency, but it also turns a ramp/saw wave into a triangle and it makes a sine wave into something more complex.

2 Likes

image

1 Like

FYI I stumbled across this thread whilst doing a falstad mockup of the sin shaper - I also find it’s not 10V p-p output.

The version I’ve used is adapted from the Thomas Henry VCO Maximus, its op amp output is above 10 Vpp and then there’s a voltage divider after it; I’ve used a trimmer for the bottom resistor to adjust the amplitude since it depends on the other trimmer settings as well. Comparing to yours it looks like the chief difference is the 20k resistors on the op amp stage instead of 10k.

image

2 Likes

Hi there, I’ve been struggling with the TH sine shaper as well.
I had a PCB built based on the following schematics:

My problem being: the signal coming in the shaper is a beautiful bipolar triangle. And what comes out is not a sine.


In yellow, is what comes in the opamp. Turning the trims only changes the shape of the peaks (pointier or rounder). The shaper behaves like there is an offset on the input signal, when the is not.

I changed the transistor for a matched pair, but nothing really changes. I am kinda lost here :upside_down_face: