Electrical – get a triangle wave in this Schmitt trigger oscillator

function generatoroscillatorschmitt-trigger

I'm trying to design a function generator that can generate square, triangle and sine waves, with frequency varying between 100Hz and 100kHz.

The circuit in the blue box is supposed to be a schmitt trigger with thresholds different from those of the NOT gate. the thresholds change when we change the Vb voltage and hence, the frequency changes. (I'm actually using a CD4093B NAND gate with one input in high voltage).

See the circuit in the blue box

This part of the circuit was suggested by my professor, but I have been trying to get it to work in Proteus and instead of a square wave, I'm getting a very neat triangle wave in the output pin of the gate, which doesn't make sense to me, since I thought this pin was supposed to have either a high, or a low voltage and not much in between.

This is the simulation result from this part of the circuit. The graph shows the voltage at the output pin of the gate:

Simulation result

Can someone please explain why this is happening, and possibly suggest a solution to this problem?

I am only allowed to use resistors (not variable), diodes, capacitors and one CD4093B ic.

Thank you in advance

Best Answer

It is supposed to be a Relaxation Oscillator , so the Square wave output on the Gate is integrated to ~ 1/3Vcc then toggles.

If you are seeing x MHz or whatever that is the unity gain bandwidth of the inverting gate in "quasi"- linear negative feedback mode with inadequate phase margin at unity gain.

Raise R1, 100k R2 to 330k or so will prevent that.so it doesn't load R4 and has gain>1

The external bias affects both duty cycle and frequency.