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

Discussion in 'General Electronics Chat' started by hobbyist, Feb 22, 2016.

1. ### hobbyist Thread Starter Distinguished Member

Aug 10, 2008
773
62
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.

2. ### KL7AJ AAC Fanatic!

Nov 4, 2008
2,043
292
Try adding a positive DC bias to the sine wave

JohnInTX and Ramussons like this.
3. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,956
1,131
Post a schematic.

Hypatia's Protege likes this.
4. ### Hypatia's Protege Distinguished Member

Mar 1, 2015
2,836
1,308
As I understand your question, the desired result may be attained via establishment of an asymmetric (i.e. 'amplitude translated') input...

Best regards
HP

5. ### hobbyist Thread Starter Distinguished Member

Aug 10, 2008
773
62
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.

6. ### Hypatia's Protege Distinguished Member

Mar 1, 2015
2,836
1,308
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

7. ### hobbyist Thread Starter Distinguished Member

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

8. ### dannyf Well-Known Member

Sep 13, 2015
2,196
417
Compare the sine wave to a reference.

9. ### Hypatia's Protege Distinguished Member

Mar 1, 2015
2,836
1,308
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: Feb 23, 2016
10. ### hobbyist Thread Starter Distinguished Member

Aug 10, 2008
773
62
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: Feb 23, 2016
Hypatia's Protege likes this.
11. ### ian field Distinguished Member

Oct 27, 2012
4,447
791
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.

Hypatia's Protege likes this.
12. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,956
1,131
Unless you have good reason to need a sine wave, it's generally a lot easier to create a triangle wave.

13. ### ian field Distinguished Member

Oct 27, 2012
4,447
791
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.

14. ### Hypatia's Protege Distinguished Member

Mar 1, 2015
2,836
1,308

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: Feb 24, 2016
15. ### WBahn Moderator

Mar 31, 2012
18,079
4,917
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 likes this.
16. ### Hypatia's Protege Distinguished Member

Mar 1, 2015
2,836
1,308
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: Feb 24, 2016
17. ### Hypatia's Protege Distinguished Member

Mar 1, 2015
2,836
1,308
OOPS! I missed that when I composed post #14!

You're welcome!!!

Best regards
HP

18. ### hobbyist Thread Starter Distinguished Member

Aug 10, 2008
773
62

That's OK,
No problem....

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

Hypatia's Protege likes this.
19. ### atferrari AAC Fanatic!

Jan 6, 2004
2,663
783
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