# how do I get a duty cycle greater than 50% converting a sinewave to a square wave.

#### hobbyist

Joined Aug 10, 2008
887
Could someone explain to me, how to get a pulse width, larger than 50% duty cycle, I'm using my circuit simulator, and just made a classic transistor schmitt trigger circuit, it works fine for upper and lower threshold voltages, it triggers a square wave, with a sine wave input, as the sine wave amplitude is increased. As the input sine wave is increased in amplitude, the width of the square wave pulse increases as well.
But when it gets to full input voltage on the sinewave input amplitude, then the squarewave ends up being at 50% duty cycle.

What do I need to do to be able to get past the 50% duty cycle limit?

Thanks.

#### KL7AJ

Joined Nov 4, 2008
2,226
Try adding a positive DC bias to the sine wave

#### Alec_t

Joined Sep 17, 2013
11,755
Post a schematic.

#### Hypatia's Protege

Joined Mar 1, 2015
3,226
Could someone explain to me, how to get a pulse width, larger than 50% duty cycle, I'm using my circuit simulator, and just made a classic transistor schmitt trigger circuit, it works fine for upper and lower threshold voltages, it triggers a square wave, with a sine wave input, as the sine wave amplitude is increased. As the input sine wave is increased in amplitude, the width of the square wave pulse increases as well.
But when it gets to full input voltage on the sinewave input amplitude, then the squarewave ends up being at 50% duty cycle.

What do I need to do to be able to get past the 50% duty cycle limit?

Thanks.
As I understand your question, the desired result may be attained via establishment of an asymmetric (i.e. 'amplitude translated') input...

Best regards
HP

#### hobbyist

Joined Aug 10, 2008
887
I looked at positive biasing the input, but it wouldn't work for threshhold voltages, the way it works with the 50% duty limit, I think that this is not the way its done on a regular basis, so I'm going to look at making a classic transistor astable multivibrator, and make it work with a variable duty cycle, if it's possible.

Thanks again for all your help.

#### Hypatia's Protege

Joined Mar 1, 2015
3,226
I looked at positive biasing the input, but it wouldn't work for threshhold voltages, the way it works with the 50% duty limit, I think that this is not the way its done on a regular basis, so I'm going to look at making a classic transistor astable multivibrator, and make it work with a variable duty cycle, if it's possible.

Thanks again for all your help.
FWIW -- We may be of much greater assistance were you to please post a schematic of the circuit in question! --- Apprehension of the inquiry is often nine tenth's of the 'exercise'

Best regards
HP

#### hobbyist

Joined Aug 10, 2008
887
Thanks HP.
Here is the circuit with both input and output waveforms.

#### dannyf

Joined Sep 13, 2015
2,197
Compare the sine wave to a reference.

#### Hypatia's Protege

Joined Mar 1, 2015
3,226
Thanks HP.
Here is the circuit with both input and output waveforms.

View attachment 101243
So... As can be seen, thresholds corresponding to angles other than 0,π,2π (i.e. untranslated 'zero-crossings') will yield non-symmetrical output duty-cycles -- Of course the 'sense' of duty-cycles so obtained is dependent upon bi-quadrant (i.e. ±n*Pi) justification --- To visualize this, please consider the implications of, for instance, positive Y-Axis translation of the sine-wave (shown in your attachment) such that the threshold level is effectively positioned below the symmetric... As a practical matter you may, of course, achieve said adjustment in the manner of your choosing...

Best regards and have fun!
HP

Last edited:

#### hobbyist

Joined Aug 10, 2008
887
Hi guys thankyou for all the responses,

I got it figured out, this morning, its simply level shifting the input source, above ground putting it in series with some base biasing to the input of the input transistor on the schmitt trigger circuit.

then designing the schmitt, to have upper and lower threshholds to accomodate the signal above ground. I chose around 6v for the trigger levels, and am inputting a 1V pk into it.

Then keeping the input amplitude constant, I vary the pot resistor R7 to pull up the input reference until the treshold is reached, then further change in R7 keeps pulling the sinewave refer. beyond the threshold until the entire wave reference. is above upper threshold, I do the same for lowering the ref. sine wave until it goes below lower threshold.

Now I'll actually build it, and refine it using real components, until I get a good understanding of how to make this circuit work.

Because I'm working on my next design, to make an all discrete transistor PWM unit.

Here the base voltage is at zero volts, and the output reference on the schmitter, is around 5.3v.
The input amplitude around 1v.pk. the Fo. is 1khz.

The input sinewave same amplitude, but ref. voltage for sine wave is raised to around 3.5vdc.

The combination of the sinewave, input ref. and amplitude, just breaks into the threshold voltage of the schmitter, causing full pullup voltage of 12v.vcc to be obtained on the schmitt output.

Further increase in base voltage ref. by adjusting the pot. R7, causes more level shifting of the input sinewave so more wave is exposed in the threshold region.

Finally further increase in pot R7. saturates the threshold with the complete sinewave input.
allowing the appliance to have full dc voltage.

This is concept only using a simulator, actual build will determine how reliable this circuit topology will work, may need to refine circuit, I'll continue on sharing the actual circuit build results, in this thread as I proceed further in this project.

PS,,,,,,
As I go back looking at all your replies, this is the very thing you were all trying to tell me to do.

Last edited:

#### ian field

Joined Oct 27, 2012
6,539
Could someone explain to me, how to get a pulse width, larger than 50% duty cycle, I'm using my circuit simulator, and just made a classic transistor schmitt trigger circuit, it works fine for upper and lower threshold voltages, it triggers a square wave, with a sine wave input, as the sine wave amplitude is increased. As the input sine wave is increased in amplitude, the width of the square wave pulse increases as well.
But when it gets to full input voltage on the sinewave input amplitude, then the squarewave ends up being at 50% duty cycle.

What do I need to do to be able to get past the 50% duty cycle limit?

Thanks.
You may need to convert the sine wave to a triangle wave first - you feed the triangle wave to a comparator with an adjustable Vref, the output will be a square wave that you can adjust the ratio.

#### Alec_t

Joined Sep 17, 2013
11,755
Unless you have good reason to need a sine wave, it's generally a lot easier to create a triangle wave.

#### ian field

Joined Oct 27, 2012
6,539
Unless you have good reason to need a sine wave, it's generally a lot easier to create a triangle wave.
The TS seems to want to change a sinewave into something else.

A PWM comparator would probably work with a sinewave, but linearity will be pretty bad around the peaks.

The basic 2 transistor Schmitt trigger can be tweaked for variable threshold, but the linearity at peaks still applies and I don't know how wide the ratio can go.

It may be just more straightforward to convert from sine to 50:50 square and convert that into triangle (or sawtooth) to feed the PWM comparator.

#### Hypatia's Protege

Joined Mar 1, 2015
3,226
I got it figured out, this morning, its simply level shifting the input source, above ground putting it in series with some base biasing to the input of the input transistor on the schmitt trigger circuit.

Isn't that what we've been telling you?!
-- Wise person say: s/he who would inquire must be prepared to listen!

--EDIT--

Best regards
HP

Last edited:

#### WBahn

Joined Mar 31, 2012
26,319
The first thought I had would be to simply make your trigger points negative. Have the ON state triggered by a rising signal just above the minimum voltage and the OFF state triggered by a falling state a bit lower, but still above the minimum voltage. I haven't given any thought as to how easy this would be to implement using a simple Schmitt topology.

#### Hypatia's Protege

Joined Mar 1, 2015
3,226
The first thought I had would be to simply make your trigger points negative. Have the ON state triggered by a rising signal just above the minimum voltage and the OFF state triggered by a falling state a bit lower, but still above the minimum voltage. I haven't given any thought as to how easy this would be to implement using a simple Schmitt topology.
Indeed, that was my thought as well -- either 'shift' the input signal or 'shift' the threshold - Oh well... seems s/he's got it sorted...

Last edited:

#### Hypatia's Protege

Joined Mar 1, 2015
3,226
PS,,,,,,
As I go back looking at all your replies, this is the very thing you were all trying to tell me to do.
OOPS! I missed that when I composed post #14!

You're welcome!!!

Best regards
HP

#### hobbyist

Joined Aug 10, 2008
887
OOPS! I missed that when I composed post #14!

That's OK,
No problem....

Thanks for your honesty, by bringing to my attention to look at post #17.

#### atferrari

Joined Jan 6, 2004
4,122
Hola Hobbyist,

Just a practical detail: next time you need to test, or demonstrate to others, the effect of different voltages, the treshold in this case, causing a certain effect, you could use a voltage ramp going from the minimum to maximum (or the other way round).

In LTSpice is the simplest way to go. Maybe not with your simulator.

Congratulations