# Help with using monostable one-shot multivibrator for limited time

#### DvirIL

Joined Nov 2, 2020
29
Trying to develop a circuit that would know how to output a square wave with a duty cycle that would be controllable, and the duration would be between half a second and a second. Now I manage to make the circuit using a microcontroller that produces these pulses, but I wanted a solution that is only analog, I thought about the 555 timer idea, but I can't find a way to detect a falling edge, and that each falling will produce a number of limited pulses, And when the VIN/TRIGGER is at a logical '1', the output will also be a '1', and only when someone released the button (a button is basically equal to a logical '1') then the circuit will output a square wave. Is it even possible to do this with a 555 and another circuit? Or only through a microcontroller? Attach the requested waveform

#### ericgibbs

Joined Jan 29, 2010
18,231
Hi DV,
Welcome to AAC.
Have you considered using two 555's in series.?
E

#### dl324

Joined Mar 30, 2015
16,146
Welcome to AAC!

Whenever you add "variability" to a circuit, a solution using integrated circuits becomes cumbersome.

What is the PWM frequency? What is the duty cycle range? How is the duty cycle to be controlled? How is the number of pulses to be controlled?

Posting your code would probably be more explanatory than what you provided in your question.

#### AnalogKid

Joined Aug 1, 2013
10,786

If you drive the 555 Reset input with Vin through an inverter, then the 555 will be inhibited when Vin is high, and oscillate when Vin is low. If you take the 555 output through another inverter, then the new output will be high when Vin is high, and then oscillate with the polarity you show when Vin is low. Note that the first half-cycle of the oscillating portion will be wider than all of the following half-cycles due to a difference in charge in the timing capacitor.

That achieves the waveform you indicate.

However, the pulsed portion of the output waveform is not clear. Are you saying that the total pulsed time can be anything between 0.5 s and 1.0 s, or that you want that time to be adjustable between those two values, or that you want a specific number of output pulses and then the output stays low? Or something else?

ak

#### MrChips

Joined Oct 2, 2009
29,848
You can use a 555-timer IC to generate the pulse train required. Feed this into a counter IC to determine how many pulses to generate.

Or you can use a monostable multivibrator (anothe 555-timer) to set the duration of the pulse train and reset the first 555-timer.

#### BobTPH

Joined Jun 5, 2013
8,104
Your description sounds like exactly the kind of problem that is trivial with a microcontroller and complicated with discrete logic. Is there reason you are rejecting the solution that virtually everyone else would use?

#### crutschow

Joined Mar 14, 2008
33,355
That's a curious sequence of pulses.
Can you tell us the application and purpose of the circuit?

#### DvirIL

Joined Nov 2, 2020
29
That's a curious sequence of pulses.
Can you tell us the application and purpose of the circuit?
I have brakes in system, when the brakes suddenly stop with logic 1/0 the brakes make the arm to swing, when I release the brakes as like PWM the swings more soft and user friendly.

#### DvirIL

Joined Nov 2, 2020
29
Could you explain me please how the sequence of the push in switch will create ‘1’ in the output?
and how and when I leave the switch (to identify falling edge) how it will make the 555 to output square wave?

#### DvirIL

Joined Nov 2, 2020
29

If you drive the 555 Reset input with Vin through an inverter, then the 555 will be inhibited when Vin is high, and oscillate when Vin is low. If you take the 555 output through another inverter, then the new output will be high when Vin is high, and then oscillate with the polarity you show when Vin is low. Note that the first half-cycle of the oscillating portion will be wider than all of the following half-cycles due to a difference in charge in the timing capacitor.

That achieves the waveform you indicate.

However, the pulsed portion of the output waveform is not clear. Are you saying that the total pulsed time can be anything between 0.5 s and 1.0 s, or that you want that time to be adjustable between those two values, or that you want a specific number of output pulses and then the output stays low? Or something else?

ak
The pulses could take between 0.5 to 1 sec, it could be adjustable , this is the easiest part, the complex part is to identify the first push and transfer it to output, and when I leave the switch it will make couple of pulses, lets ignore how much time it takes, the purpose is to limit the number of output pulses.

#### sghioto

Joined Dec 31, 2017
5,099
Could you explain me please how the sequence of the push in switch will create ‘1’ in the output?
and how and when I leave the switch (to identify falling edge) how it will make the 555 to output square wave?
The output of the 555 is normally low because the reset pin #4 is held low by R1 and C1. Pressing the button applies 5 volts to the reset pin and the output goes high and stays high as long as the button is pressed because control pin#5 is also at appx 5 volts. This raises the internal reference voltage that C2 must charge up to. C2 charges through R2 to the output pin#3. The output voltage is less than the reference voltage so the output stays high while the button is pressed. C2 can not charge up more than about 3.9 volts and the reference is appx 4.3 volts
Releasing the button the reference voltage drops back to appx 3.32 volts and the output goes low and begins producing square waves until C1 discharges below appx 1 volt and resets the 555.

#### DvirIL

Joined Nov 2, 2020
29
The output of the 555 is normally low because the reset pin #4 is held low by R1 and C1. Pressing the button applies 5 volts to the reset pin and the output goes high and stays high as long as the button is pressed because control pin#5 is also at appx 5 volts. This raises the internal reference voltage that C2 must charge up to. C2 charges through R2 to the output pin#3. The output voltage is less than the reference voltage so the output stays high while the button is pressed. C2 can not charge up more than about 3.9 volts and the reference is appx 4.3 volts
Releasing the button the reference voltage drops back to appx 3.32 volts and the output goes low and begins producing square waves until C1 discharges below appx 1 volt and resets the 555.
I tried to simulate your circuit,
the RST always stay high, I dont know how but these are the results blue is the RST PIN, green is the output)

#### sghioto

Joined Dec 31, 2017
5,099
Not surprised. The Sim is not accurately reflecting the operation of the NE555 in the real world in this configuration.
Pin #4 for example will measure appx 1 volt if not connected to Vcc and R1 is removed, not 4.5 volts as the Sim shows.
In actual operation the voltage on pin#4 is appx .5 volt with R1 installed which holds the 555 in the reset mode.
I verified the operation of the circuit on the breadboard. You will see similar results when doing the same.

Last edited:

#### crutschow

Joined Mar 14, 2008
33,355
The Sim is not accurately reflecting the operation of the NE555 in the real world in this configuration.
And it would seem your real world circuit is marginal.
According to the 555 spec (below), the Reset pin can sink as much as 0.4mA, so to guarantee that the Reset voltage is no more than 0.4V for the reset to be active, R1 should be ≤1kΩ.

#### sghioto

Joined Dec 31, 2017
5,099
And it would seem your real world circuit is marginal.
Not really as the actual measured results have shown, which may vary from chip to chip and manufacturer. I tested five NE555P chips recently purchased from DigiKey and all 5 used in the circuit measured 0.5 volts on pin #4 with a 100K pulldown resistor. Using a 10K the reading was 0.1 volt and 0.01 volt with a 1K.
My experience with the NE555 usually required a 10K or less as a pull down and was surprised that a 100K would suffice.
So obviously these newer chips have a different internal reset configuration.

#### crutschow

Joined Mar 14, 2008
33,355
So obviously these newer chips have a different internal reset configuration.
Okay.
But someone else's purchase of a 555 may not be ones with the below spec current.
It's not good practice to design not using worst-case specs.

#### sghioto

Joined Dec 31, 2017
5,099
It's not good practice to design not using worst-case specs.
Disagree on that statement as worst case specs vary as just shown. I design for the actual part being used.
The TS results will vary depending on the chip used and component values can be adjusted as needed.

#### sghioto

Joined Dec 31, 2017
5,099
Or using a LMC555 cmos version the voltage on pin#4 measured 0.03 volts with selected components.

#### DvirIL

Joined Nov 2, 2020
29
And it would seem your real world circuit is marginal.
According to the 555 spec (below), the Reset pin can sink as much as 0.4mA, so to guarantee that the Reset voltage is no more than 0.4V for the reset to be active, R1 should be ≤1kΩ.

View attachment 300478
Now it works great with a value lower than 1kohm but the time for RC is too short,
can I change instead of the resistor the value of the capacitor? is it make it marginal and can effect something else?