# Schmitt trigger transistor duty cycle

I built this Schmitt trigger using transistors (2N3704). Input is a square wave coming from an OCXO, 1 MHz, 50% duty cycle. I obtain a square wave with 70% duty cycle. What can possibly be the cause?

1MHz may seem like a really low frequency but you'll see a lot of effect from storage time in saturated BJTs at that frequency. Here is your circuit (but with 2N3904s substituted since I don't have a model for the 2N3704) running at 100kHz (green is the input (100kHz with 10ns rise/fall times), purple the output). It doesn't work at all at 1MHz.

Similarly, here is a simple inverter made with a 2N3904 with 1k base resistor and 1k load, also running at 100kHz.

The same circuit but with a BAT54 Baker clamp and operating at 1MHz

Again, with the inverter, but 200Ω load, Baker clamp and 30pF across the 1kΩ base resistor and extra 100Ω source resistance to keep it realistic, at 1MHz.

A Schmitt Trigger circuit has two transition voltages, one for a positive edge (Vth+) and one for a negative edge Vth-). The faster the input edges are, the less the absolute values of the transition levels matter. If the input waveform has sloped edges, then the transition voltages matter.

Assume a perfect 50/50 input waveform. The waveform swings between a low level (Vlow), some number of millivolts above GND, and a high level (Vhi), some number of millivolts or volts below Vcc. For the output waveform to be 50/50, the voltage difference between Vlow and Vth+, and between Vhi and Vth-, must be equal. The critical factor here is that the input waveform must spend the same amount of time traveling between Vlow and Vth+ as it does traveling between Vhi and Vth-.

This boils down to a lot of arithmetic to calculate the transition levels in the Schmitt Trigger circuit. There are online calculators specifically designed for this task. Also, there are threads on this and other forums that go into deep detail on this topic. I am poor at finding such threads, but others can recommend them.

Note: if the input waveform is not perfectly symmetrical, that can introduce other errors. For example, if the waveform risetime is 100 ns, but the fall time is 50 ns, this will appear at the circuit output as a change in the duty cycle.

Note: Clock modules and other commercial clock sources typically specify the output duty cycle at 50% of the peak-to-peak voltage level. For example, if the output swings from 0.1 V to 4.1 V, the 50% spec is measured at 2.1 V, even if the device power is 5.0 V. Almost by definition, neither of a Schmitt Trigger interface input transition levels would be at 2.1 V, so the circuit is operating with a waveform whose duty cycle at relevant voltages is undefined.

• Thank You very much for detailed explanation will use an IC to solve this Commented Sep 4, 2023 at 4:41
• Comparator = less math. Opamp = Less less math. Logic gate = datasheet, but the spec is very loose and can change significantly with temperature. Commented Sep 4, 2023 at 14:02
• using now 74HC14 works pretty well almost no ringing a maintaining same duty cycle as per request. Commented Sep 4, 2023 at 16:20

This circuit can't work (unless the power supply is at least 10 V ?) It works at 100 kHz with 5 V.

You should use (digital) integrated circuit even if "hysteresis" is not well "centered" at 2.5 V.

• Thanks also to you for Your comment. Will use 74HC14 indeed. Was wondering in your two schematics above what is the reason for R2/C1 and R4/C2? Commented Sep 4, 2023 at 4:42
• Just "parasitic" components which add "delay" time ... Commented Sep 4, 2023 at 5:57

A schmitt trigger circuit is more often used to square up signals with slow moving or noisy signal edges.

To potentially obtain a 50/50 duty cycle output with a schmitt trigger you would need to have an input signal with symmetrical rise and fall times and/or the circuit's rise and fall trigger points would need to be symmetric about the signal's mid point. If a combination of those parameters are not symmetrical you will not obtain a 50/50 duty cycle.

In addition to the above there are other parameters such as component frequency response and temperature that can effect the transition points of a schmitt trigger circuit.

To better analyze your circuit's true operating points try using a uniform low frequency triangle wave as an input.

Last but not least, a simple transistor switch is far from ideal, using a high quality op-amp in a schmitt trigger design can result in a much more predictable operation.