3 or 4 octave up square wave ??

Started by markusw, November 04, 2005, 06:48:58 AM

Previous topic - Next topic

markusw

Hm, with another cap at the divider it still depends on the input signal strength. Also I just can tweak the doubler to work using the offset trimmers for one frequency only. If I change to another frequency the DC voltage a which the triangle is centered drifts away from Vref again. Maybe it's also time to etch a board or just to rewire the circuit on breadboad and to remove all components that are not needed.  ???

Markus

gez

Quote from: markusw on May 20, 2006, 05:11:41 AM
There is a massive cap after the Vref opamp (1000µ because I had it home). Will try to add another one directly at the divider.

There's no need to put a cap at the output of the op-amp, only a cap decoupling its divider is required.  Remove the 1000u cap.  Are things better now?
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

QuoteThere's no need to put a cap at the output of the op-amp, only a cap decoupling its divider is required.  Remove the 1000u cap.  Are things better now?

Thanks for the clarification :) I removed the 1000µ cap but it didn't improve the situation.

For some reason the DC center voltage of the integrator's out is highly unstable. Even measuring it's voltage level with my DMM already makes it drift away from Vref.

Regards,

Markus

gez

Quote from: markusw on May 20, 2006, 08:10:22 AM
QuoteThere's no need to put a cap at the output of the op-amp, only a cap decoupling its divider is required.  Remove the 1000u cap.  Are things better now?

Thanks for the clarification :) I removed the 1000µ cap but it didn't improve the situation.

For some reason the DC center voltage of the integrator's out is highly unstable. Even measuring it's voltage level with my DMM already makes it drift away from Vref.


It's possible your DMM is loading the output, but it seems unlikely.  In all honesty, without a detailed schematic we could go on for years like this.  Would be best to draw up what you've done in detail.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

#124
Quote from: markusw on May 20, 2006, 08:10:22 AMFor some reason the DC center voltage of the integrator's out is highly unstable. Even measuring it's voltage level with my DMM already makes it drift away from Vref.

If the integrator is biased with its + input connected to Vref, then the output will drift (eventually to the rails) unless there's a signal present.  Better to use a scope with your test signal to determine how well it behaves.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

#125
QuoteIn all honesty, without a detailed schematic we could go on for years like this. 

I will draw a schem for it. Thanks again fro your help.

QuoteBetter to use a scope with your test signal to determine how well it behaves.

Thanks for the hint :) Actually, it is connected all the time to one of the strategic points in the circuit, most of the time to the out to check the square wave. Since my soundcard doesn't have DC coupling I just sometimes try to measure DC with my DMM.

QuoteIf the integrator is biased with its + input connected to Vref, then the output will drift (eventually to the rails) unless there's a signal present.

The problem is, it also drifts with a signal present :)

Interestingly, putting a 470n cap in front of the 100k connected to the -ve input of the integrator drastically stabilises the doubler. Also it's much easier to set the offset voltage trim pots. Now it's even possible to change frequency. The drawback: if I turn the signal off and then after a few seconds on again, it takes some time (a few seconds) until it's doubling again.

Anyway, I'll do the schem.

regards,

Markus

markusw

Here's the schem. I did not include the filter section since at the moment I run the software sine generator through my Tascam USB Audio interface directly into the first comparator.
The other doubler stages are not shown either since they are shorted out at the moment. The other pins of the 4070 are used by the three additional doubler stages.



Regards,

Markus

markusw

Forgot two pull up resistors and a couple of values  :icon_redface:

Schem is updated now.

Markus

gez

Firstly, that 1000u cap decoupling the divider for Vref is total overkill.  Get rid of it and use a cap somewhere in the value of 10u - 47u.  The NE5532 should provide a steady Vref no problem.  Why is '12V' indicated at the centre of the divider?  I thought your supply voltage was 12V.  Is this just a mistake, of have you wired up the centre of the divider to V+?

The inclusion of C3 means there's no need for the diodes I mentioned (these would only be required with direct coupling). 

C5 really shouldn't be necessary.

The output of IC3, the second comparator, needs a collector resistor:  a resistor from output to V+.  Same with IC6, which is probably superfluous by the way: a divider or a pot at the output of the XOR should be all that's required.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

OK, you've included the pull-up resistors now.  Remind me, what exactly is the problem now?  Does it work with your bass through it?
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

QuoteIs this just a mistake, of have you wired up the centre of the divider to V+?

Thanks for finding this bug in the schem. It's already updated.

QuoteC5 really shouldn't be necessary.

It's just included for the feedback option. I just have to move one wire from Vref to the 100k or the other way round to compare both ways.

IC6 is just present because I didn't know for sure if the 4070 would be OK if I directly take the signal from it. However, I suppose it shouln't hurt at the moment?

QuoteRemind me, what exactly is the problem now?

Thanks for your patience! I suppose it should be easier with the schem now (at least after I corrected all the bugs now ;) ).

* With the integrator's +ve in connected to Vref I get a nicer triangle. (Thus the doubled square wave is closer to 50:50 than with the input connected to R8.) With C3 added the circuit is quite stable once the trims are set (they are btw much easier to adjust with C3 added). The drawback, if I briefly switch off the signal to turn it on a moment later the circuit takes a few seconds (maybe 2-3) to stabilise again.

* With the integrators +ve in connected to R8 there are no biasing issues but the triangle is slightly more distorted. This distortion seems to be caused by the not completely flat signal at the +ve input of the integrator. If I increase C5 the triangle gets less distorted but the circuit also gets more (too) sluggish.

QuoteDoes it work with your bass through it?

Haven't tried it with my bass recently since I first want it to work with a stable sine signal.

One thing I'll probably try (out of desparation ;) ) is to also DC couple  integrator/2nd comparator.

Regards,

Markus



gez

#131
Looking at the schematic for the MC33171 it has bipolar inputs, so is unsuitable for this application (as shown): the only DC bias for the - input is coming from that 10M resistor...not much!  Subbing in a JFET/MOSFET input amp would be the easiest thing to do (one with low input bias current)...CMOS amp would be ideal.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

QuoteLooking at the schematic for the MC33171 it has bipolar inputs, so is unsuitable for this application (as shown): the only DC bias for the - input is coming from that 10M resistor...not much!  Subbing in a JFET/MOSFET input amp would be the easiest thing to do (one with low input bias current).

THANKS! Sorry for another dumb Q: why are opamps with bipolar inputs unsuitable?? Is there a way to connect the - input to Vref for biasing??

So a TL071 should be OK?

Markus


gez

Quote from: markusw on May 20, 2006, 01:13:48 PMwhy are opamps with bipolar inputs unsuitable?? Is there a way to connect the - input to Vref for biasing??

The inputs of all bipolar transistors require base current to operate.  At the moment, it's being supplied from its output via that 10M resistor.  Going by the max and min figures for input bias current quoted in the data sheet, this is going to cause an offset of between 200mV and 1V. 

Is this the cause of your problem?  Don't know.  If the amp requires a certain amount of bias current to operate properly, then it's possible.

It's also possible to wire it up differently I suppose, but that introduces problems of its own.  A quick sub is the easiest option.

QuoteSo a TL071 should be OK?

I'd have to check the data sheet, but try it you've nothing to lose. 

Will be off-line for a while now...the Eurovision Song Contest is on this evening.  For those who don't know, it's one of those yearly events that has you laughing your head off one moment then sitting there slack jawed in amazement/embarrassment the next.  Priceless!  :icon_razz:
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

TELEFUNKON

didn`t Sandy Shaw win that contest ~40 years ago (Puppet on a String), singing barefoot?

markusw

Hey Gez,

Thanks once more for your patience!

I added a 100k from the -ve input of the integrator to Vref. Didn't really change anything, but maybe it was the wrong way to try.

Subbed a TL071 for the MC33173 also didn't really change anything. Maybe being a JFET input opamp is not sufficient in the case of the TL071?

QuoteWill be off-line for a while now...the Eurovision Song Contest is on this evening.  For those who don't know, it's one of those yearly events that has you laughing your head off one moment then sitting there slack jawed in amazement/embarrassment the next.  Priceless!

I especially love to watch it with the tone from radio and cynical radio moderator on air :icon_lol:  Will have to watch it next year though because today's party time  8)

Regards,

Markus




gez

Quote from: TELEFUNKON on May 20, 2006, 01:38:27 PM
didn`t Sandy Shaw win that contest ~40 years ago (Puppet on a String), singing barefoot?

She did indeed!  Quite a few credible female artists were forced into appearing in the Eurovision in the early days.  The Beeb basically told them "do this, or we don't give you airplay".

It's voting time at the moment and the beer is wearing off...wow it was surreal in places.  Camp Latvians, butch Spanish 'maidens' (wouldn't like to meet them down a dark alley), 'Klingon' Fins and out of tune French.  Low on the 'Balkan Disco' this year, so Stephen should be happy!  :icon_razz:
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

Mark, you might be able to get away with making that 10M resistor smaller.  It may even work ok with a 1M...though that might introduce distortion.  Give it a try.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

#138
OK, try the following.  This idea comes courtesy of the late Andy Flind from his book 'Practical Oscillator Circuits'.  Remove the 10M and replace it with a 1M resistor from the output of the integrator to the junction of its input cap (C3) and the 100k resistor.  Don't remove C3 with things connected like this!

Doing things this way provides bias to the inverting input in a round about way - from the output via the 1M and 100k in series - but keeps closed-loop gain high enough to prevent distortion.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

OK, here are the results from the austrian jury ;) (will try to give a summary on the performance of the different options):

* With the +ve input of the integrator connected to Vref the presence of C3 is essential to get a reasonable performance (w/o voltage drift simply is too high)

QuoteMark, you might be able to get away with making that 10M resistor smaller.

QuoteRemove the 10M and replace it with a 1M resistor from the output of the integrator to the junction of its input cap (C3) and the 100k resistor.  Don't remove C3 with things connected like this!

Tried both variants with a 1M and they work pretty much the same, maybe variant 2 is a little better. However, adding the 1M either way is quite essential in combination with C3 because otherwise it gets touchy (some voltage drift occurs).

* With the +ve input of the integrator connected to R8, C3 is not necessary. Same for the 1M.

To summarise the performance:

* TL071 vs MC33171: not a real difference. Maybe another opamp would help?

* Connecting the +ve input to vref clearly yields the nicer triangle and also a better doubled square wave as assessed by spectrum analysis. Latency is higher though.

* Connecting the +ve input to the R8 feedback reduces latency but yields a less pure doubled square wave. If C5 is increased to 10µ the doubled square wave gets purer but latency increases to similar performance as with the +ve input connected to Vref.

At the moment I'm definitely stuck. Don't know how to improve the performance, i.e. decreasing latency with a rather pure doubled square wave (with the +ve input connected to Vref) or getting a more pure square wave with lower latency (with the +ve input connected to R8).

Regards,

Markus