# How to generate a single pulse for certain milliseconds or second without microcontroller?

I'm using an IR sensor as an input and I want that when IR sensor (A) goes high, then a single 300-ms pulse is generated at (B), such that even if (A) stays high, it doesn't generate any other signal until (A) goes low. Then, it generates a single pulse for 300-ms at (C) and again, even if (A) stays low, it doesn't generate any other pulse until (A) goes high again then same.

Please tell me how to get that without using microcontroller like Arduino, Pico, etc. I can use 555 IC or other.

• The type of circuit you're looking for is a Non-retriggerable One-Shot. Feb 14 at 16:00
• ....aka monostable. Feb 14 at 16:02
• Have you looked at data sheets for, say, the NE555? Feb 14 at 16:13
• FYI, the usual terminology is to say B is triggered by the rising edge and C is triggered by the falling edge. You might find what you need by looking for an edge detector circuit. Feb 14 at 16:23
• @MattS thank you and sorry, I didn't know. I will answer it soon so other get the solution. but you actually helped me. thank you Feb 15 at 17:55

There are two ways to approach this. I've posted both ways on other forums over the years.

The first is to have two completely independent monostable circuits, one triggered by a positive-going edge at its input, and one triggered by a negative-going edge at its input. Simple and direct, but the B and C output pulses might not be exactly the same width due to component variations. If you want to adjust the output pulse width, it takes two adjustments.

The second is to have only one monostable circuit that has input gating so that it can be triggered by both edges, and output gating that directs the output pulse to either the B or C downstream circuits. This one works only if the time between the input signal's positive and negative edges is longer than the monostable period, so the circuit has time to terminate and recover before its next trigger. More complex, but the B and C pulse widths are identical, and both can be changed with only one adjustment.

UPDATE:

Here is a circuit from 2015. It looks like a lot of stuff, but that is because the logic is done with diodes and resistors instead of gates. The (self-imposed) goal was to do it with only one IC. Using normal gates would have increased that to three.

R4 and C4 set the output pulse width. R1-C1 is an input delay that is not required in your application; that is why C1 is disconnected. R2-C2 and R3-C3 are differentiators to extract the input signal edges. D3 and D4 combine these to trigger the monostable. D1 and D2 steer the monostable pulse depending on the high/low state of the input by overriding the resistors at the inputs to U1C and U1D.

• I got it, and I will prefer 2nd one but how will I direct the pulse one after one, I mean if first pulse will go to (B) then second pulse will go to (C) and then (B)... Feb 18 at 10:01
• I misread your diagram. I've corrected my answer so the outputs are B and C. It makes more sense now. Feb 18 at 22:17
• I'm a high school student and that circuit is just confusing for me, my moto is to get a single pulse every time at (B) on rising edge and at (C) on falling edge. I can use a programmable microcontroller and program it like on my need and I have done it already but I want to learn that how I can make it from electronics from very basic level and I know that logic gates and circuits made out of it are most basic and we can arrange it to get what we want but I want to know that how many ways are there to solve this problem and which is the best in what scenario. Feb 21 at 18:40
• and I need a power efficient one also Feb 21 at 19:54