Schmitt trigger square wave generator with a problem

Hi all,
Some time ago I built a small battery powered sine wave signal gen to pair with my handheld oscilloscope for basic signal tracing. It's this one https://www.valvewizard.co.uk/siggen.html and seems to work well. But then I thought it would be nice to have a square wave output too so I added this one https://sound-au.com/articles/sqr-f14.gif from https://sound-au.com/articles/squarewave.htm in particular the sine to square converter scheme. This way I could have common frequency control for both waveforms but independent output level controls. The problem: The sine wave output is 0,7V rms and apparently this is not enough. You can see that the square is not symmetrical. When I feed it with another sine gen that does 2,6V rms things get a lot better however it seems it needs just a little more than this to be perfect. My conclusion is that it has to do with the Schmitt trigger input threshold but I wasn't able to understand the datasheet on this. So, the question is if there is anything I could adjust to make it work with 0,7V rms.

PS. The delayed rising time is intentional according to Rod Elliott's teaching. Also, the square out as is works to trace ringing, frequency response etc. It is also very good to tell if the DUT is inverting. :) But it does not look nice...
 

Attachments

  • P1020923.JPG
    P1020923.JPG
    331.1 KB · Views: 106
  • P1020924.JPG
    P1020924.JPG
    302.1 KB · Views: 109
  • Signal Gen.JPG
    Signal Gen.JPG
    233 KB · Views: 120
  • Uncovered.JPG
    Uncovered.JPG
    288.9 KB · Views: 107
The problem with this circuit is that he logic threshold is not 50% of the supply voltage, so two 1 meg bias resistors is a bad choice. A better choice is a two input NAND gate with both gates tied together because this series the N channel transistors in the gates and parallels the P channel FETS that have more on resistance. But you should be able to fix this hex inverter circuit just by adjusting the two bias resistor. The exact bias voltage / threshold is about 30%, but you need to tweak it for the chips you have, and you probably want a small offset to avoid random output with low input. You also want a series resistor to limit rectification under overdrive and ESD protection. I'd try about 100K.
 
AX tech editor
Joined 2002
Paid Member
The sure fire way to get 50% DC is to use a flip-flop to divide the freq by 2, that will get you exact 50%. But the freq will be half.
BTW Why is it so important to have 50% DC for a signal tracer?
Look at it as a feature: with non-50% DC it also allows you to spot any phase inversions in your audio circuits!

Jan
 
  • Like
Reactions: 1 user
The problem with this circuit is that he logic threshold is not 50% of the supply voltage, so two 1 meg bias resistors is a bad choice. A better choice is a two input NAND gate with both gates tied together because this series the N channel transistors in the gates and parallels the P channel FETS that have more on resistance. But you should be able to fix this hex inverter circuit just by adjusting the two bias resistor. The exact bias voltage / threshold is about 30%, but you need to tweak it for the chips you have, and you probably want a small offset to avoid random output with low input. You also want a series resistor to limit rectification under overdrive and ESD protection. I'd try about 100K.
All good to know for future design, thanks! In this one sine signal is fixed 0,7V rms taken before the attenuator so do I need to worry about low input or overdrive?
The sure fire way to get 50% DC is to use a flip-flop to divide the freq by 2, that will get you exact 50%. But the freq will be half.
BTW Why is it so important to have 50% DC for a signal tracer?
Look at it as a feature: with non-50% DC it also allows you to spot any phase inversions in your audio circuits!

Jan

Exactly the way I'm using it now! (y) Accidental found on a push pull amp.