I need a help to design a 1Khz square wave with adjustable duty cycle !!

crutschow

Joined Mar 14, 2008
29,489
As Alec noted, the trigger input cannot be low for a duration longer than the output pulse or the 555 will retrigger.
This can be prevented by using a capacitor and resistor, as he suggested, or making the generator pulse duty-cycle high so that the pulse is low for only a short time (a few microseconds minimum).

That can be done with a 555 astable by eliminating the resistor between the DIS output and the frequency determining capacitor.
The astable will then generate a series of negative going pulses of only a few microseconds duration, sufficient to trigger the monostable, but too short to affect its pulse width.

Edit: No, the capacitor should be in series with the pulse generator output, and should be a smaller value.
 

Thread Starter

Layan_AK

Joined Mar 28, 2017
79
As Alec noted, the trigger input cannot be low for a duration longer than the output pulse or the 555 will retrigger.
This can be prevented by using a capacitor and resistor, as he suggested, or making the generator pulse duty-cycle high so that the pulse is low for only a short time (a few microseconds minimum).

That can be done with a 555 astable by eliminating the resistor between the DIS output and the frequency determining capacitor.
The astable will then generate a series of negative going pulses of only a few microseconds duration, sufficient to trigger the monostable, but too short to affect its pulse width.

Edit: No, the capacitor should be in series with the pulse generator output, and should be a smaller value.
is this true ?when i use this connection no output on pin 3 ^^




55555.jpg

before using cap with pull_up resistor i choosed pulse generator with duty cycle 90% ..
the duty cycle of the output decreases as the light intensity decreased. freq not changed
but under a certain point of intensity the freguency decreased as Duty cycle decreased *.*


555m.jpg
i put 820 ohm in parallel with ldr ..
the circuit worked fine :\
as intensity varies from dark to full light the duty varies from approximately 90% to 10% @_@
and i dont why ^^
if i used 1K or greater instead of 820 the problem appeared ^^

regards :)
 

crutschow

Joined Mar 14, 2008
29,489
Post the waveforms when it is working and when it is not.

What is the operating resistance range of the LDR?

C3 may be too large.
How did you determine its value?
 

Thread Starter

Layan_AK

Joined Mar 28, 2017
79
Post the waveforms when it is working and when it is not.

What is the operating resistance range of the LDR?
500-1M
C3 may be too large.
How did you determine its value?

when i choose c3 below 1u no output ^_^
the best result i got at 1u :D
 

crutschow

Joined Mar 14, 2008
29,489
.........
when i choose c3 below 1u no output ^_^
the best result i got at 1u
The one-shot period is approximately equal to Req*C3 where Reg is the equivalent resistance of LDR and R1 in parallel.
Thus for C3=1μF, the maximum Req would be 1kΩ for a period of 1ms (the maximum allowed for a 1kHz frequency).
That's why it doesn't work for a value of R1 above 820Ω.

The one-shot should work fine with a value of C3 less than 1μF.
What value did you try?
What was the value of R1 when you tried the lower value of C3?

You need to put some thought into the parts values you choose.
 

Thread Starter

Layan_AK

Joined Mar 28, 2017
79
The one-shot period is approximately equal to Req*C3 where Reg is the equivalent resistance of LDR and R1 in parallel.
Thus for C3=1μF, the maximum Req would be 1kΩ for a period of 1ms (the maximum allowed for a 1kHz frequency).
That's why it doesn't work for a value of R1 above 820Ω.

The one-shot should work fine with a value of C3 less than 1μF.
What value did you try?
sorry i put 0.1f instead 0.1u when i put 0.1u with 820no ghange with duty so i increase r1 to 8.2k it works fine ^^
What was the value of R1 when you tried the lower value of C3?

You need to put some thought into the parts values you choose.
 

crutschow

Joined Mar 14, 2008
29,489
So now it's working okay?
So your next step is to add the 555 astable.

Note that when you reply to a post, put you answer after the copied post, not in the middle of it (unless you use a different colored font to make it clear what part is your answer).
 

Thread Starter

Layan_AK

Joined Mar 28, 2017
79
So now it's working okay?
So your next step is to add the 555 astable.

Note that when you reply to a post, put you answer after the copied post, not in the middle of it (unless you use a different colored font to make it clear what part is your answer).
Thanks alot ^^

i add the first 555 astable ..

555-1.jpg



555-2.jpg


555-3.jpg

the circuit workss fine :)

is there any modification or notes must i do ?
should i add a series cap with + pull up resistor to the output of the first 555 or to trigger pin of second one ?

the values of the astable circuit i got it from a 555 timer software i set the freq 1khz and duty 95% then i got the above values ^^

regards
 

crutschow

Joined Mar 14, 2008
29,489
is there any modification or notes must i do ?
You don't really need R2.
If you remove it (replace with a short) and increase the value of R3 to get 1kHz, then U2 will output a minimum negative pulse of several microseconds, which is long enough to trigger U1 but will not interfere with U1's output pulse-width.

If you do that, then you won't need to add a resistor and capacitor at U2's output to shorten the pulse.
 

Thread Starter

Layan_AK

Joined Mar 28, 2017
79
You don't really need R2.
If you remove it (replace with a short) and increase the value of R3 to get 1kHz, then U2 will output a minimum negative pulse of several microseconds, which is long enough to trigger U1 but will not interfere with U1's output pulse-width.

If you do that, then you won't need to add a resistor and capacitor at U2's output to shorten the pulse.

when i removed r2 and replaced it with a short the output of astable decreased from 8.6V to 360 mV :(

is there any thing wrong ^^
 

crutschow

Joined Mar 14, 2008
29,489
You are getting pulse out of U2 so don't understand why they aren't triggering U1. :confused:
Could be a difference in the models used, since the one I have in LTspice works with that short a pulse.

Try putting R2 back in with a value of a few hundred ohms and increase if necessary until U1 triggers..
See how large R2 has to be to cause U1 to trigger.

Note: Please post your Oscilloscope picture as a separate graphic so it doesn't cover up the schematic.
 

Thread Starter

Layan_AK

Joined Mar 28, 2017
79
You are getting pulse out of U2 so don't understand why they aren't triggering U1. :confused:
Could be a difference in the models used, since the one I have in LTspice works with that short a pulse.

Try putting R2 back in with a value of a few hundred ohms and increase if necessary until U1 triggers..
See how large R2 has to be to cause U1 to trigger.

Note: Please post your Oscilloscope picture as a separate graphic so it doesn't cover up the schematic.



R2 was 500 ohm :(

i tried the circuit in another simulator .. replaced r2 with a short the output was fine ^^
 
Last edited:
Top