Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

super simple pulse stretcher

343 views
Skip to first unread message

bitrex

unread,
Jun 20, 2015, 9:08:48 AM6/20/15
to
I have a need to take a square pulse of 0V/+5V and about 5-10ms
duration, and stretch it out long enough to flash a LED brightly enough
to be visible indoors under "ordinary" lighting conditions.

I currently only have op-amps on the board and would rather not add any
logic ICs to do this. So using low-speed op amps and discretes would be
fine. The pulse source into the stretcher would be low impedance.

An optional feature would be to have the "stretch" duration decrease the
more rapidly pulses are coming into the circuit. But that is not a
requirement if it needs significant complexity.

John S

unread,
Jun 20, 2015, 10:25:28 AM6/20/15
to
What's wrong with a 5-10ms flash? I'm flashing some at 400us and they
are easily visible in my shop with florescent lighting.

John Larkin

unread,
Jun 20, 2015, 11:11:10 AM6/20/15
to
NPN emitter follower driving R-C to ground, then a comparator. Use an
opamp as the comparator.


--

John Larkin Highland Technology, Inc
picosecond timing laser drivers and controllers

jlarkin att highlandtechnology dott com
http://www.highlandtechnology.com

Jim Thompson

unread,
Jun 20, 2015, 11:42:18 AM6/20/15
to
On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
<bit...@de.lete.earthlink.net> wrote:

Supplies?

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

bitrex

unread,
Jun 20, 2015, 12:41:11 PM6/20/15
to
On 6/20/2015 11:11 AM, John Larkin wrote:
> On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
> <bit...@de.lete.earthlink.net> wrote:
>
>> I have a need to take a square pulse of 0V/+5V and about 5-10ms
>> duration, and stretch it out long enough to flash a LED brightly enough
>> to be visible indoors under "ordinary" lighting conditions.
>>
>> I currently only have op-amps on the board and would rather not add any
>> logic ICs to do this. So using low-speed op amps and discretes would be
>> fine. The pulse source into the stretcher would be low impedance.
>>
>> An optional feature would be to have the "stretch" duration decrease the
>> more rapidly pulses are coming into the circuit. But that is not a
>> requirement if it needs significant complexity.
>
> NPN emitter follower driving R-C to ground, then a comparator. Use an
> opamp as the comparator.
>
>

I'm probably going to need to be using something like an LM324A. Will
they work OK in that role?

M Philbrook

unread,
Jun 20, 2015, 12:45:20 PM6/20/15
to
In article <558565dc$0$23427$4c5e...@frugalusenet.com>,
bit...@de.lete.earthlink.net says...
Inject the pulse via a diode to the (+) input of a
op-amp. The (+) input will have a small cap on it going
to common for the delay off with a R also going to common
as part of the RC calculations.

Put a voltage divider on the (-) input of the op-amp of
lets say 2.0 volts, that will be your threshold for the comparator.

You may also want to have a low current feed back from the output
to the (+) input to aid in a little snap, hysteresis, for the off
state.

If for some reason your reference pulse appears to be very low current
in nature, it could have issues driving the cap you select. If this is
the case, buffer the pulse with another op-amp in unity mode or use a
NPN trannie in emitter follower mode to drive it, in which case, you
won't need the diode.

Jamie

M Philbrook

unread,
Jun 20, 2015, 12:52:01 PM6/20/15
to
In article <558597a3$0$6977$4c5e...@frugalusenet.com>,
bit...@de.lete.earthlink.net says...
That will work just fine. Just keep in mind that a 324 gets closer to
the bottom rail than it does the top rail. Infact, it can become
detached but I don't think that should cause you any issues.

Jamie

bitrex

unread,
Jun 20, 2015, 12:52:42 PM6/20/15
to
On 6/20/2015 11:42 AM, Jim Thompson wrote:
> On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
> <bit...@de.lete.earthlink.net> wrote:
>
>> I have a need to take a square pulse of 0V/+5V and about 5-10ms
>> duration, and stretch it out long enough to flash a LED brightly enough
>> to be visible indoors under "ordinary" lighting conditions.
>>
>> I currently only have op-amps on the board and would rather not add any
>> logic ICs to do this. So using low-speed op amps and discretes would be
>> fine. The pulse source into the stretcher would be low impedance.
>>
>> An optional feature would be to have the "stretch" duration decrease the
>> more rapidly pulses are coming into the circuit. But that is not a
>> requirement if it needs significant complexity.
>
> Supplies?
>
> ...Jim Thompson
>

Looks like it's going to be +5V virtual ground split into +2.5 and -2.5
at this point so they'll be low-voltage opamps.

bitrex

unread,
Jun 20, 2015, 12:57:49 PM6/20/15
to
I'll explore that a bit in simulation, thanks.

Jim Thompson

unread,
Jun 20, 2015, 1:19:53 PM6/20/15
to
So your input pulse is -2.5V to +2.5V _relative_ to your virtual
ground?

bitrex

unread,
Jun 20, 2015, 1:39:56 PM6/20/15
to
On 6/20/2015 1:19 PM, Jim Thompson wrote:
> On Sat, 20 Jun 2015 12:52:26 -0400, bitrex
> <bit...@de.lete.earthlink.net> wrote:
>
>> On 6/20/2015 11:42 AM, Jim Thompson wrote:
>>> On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
>>> <bit...@de.lete.earthlink.net> wrote:
>>>
>>>> I have a need to take a square pulse of 0V/+5V and about 5-10ms
>>>> duration, and stretch it out long enough to flash a LED brightly enough
>>>> to be visible indoors under "ordinary" lighting conditions.
>>>>
>>>> I currently only have op-amps on the board and would rather not add any
>>>> logic ICs to do this. So using low-speed op amps and discretes would be
>>>> fine. The pulse source into the stretcher would be low impedance.
>>>>
>>>> An optional feature would be to have the "stretch" duration decrease the
>>>> more rapidly pulses are coming into the circuit. But that is not a
>>>> requirement if it needs significant complexity.
>>>
>>> Supplies?
>>>
>>> ...Jim Thompson
>>>
>>
>> Looks like it's going to be +5V virtual ground split into +2.5 and -2.5
>> at this point so they'll be low-voltage opamps.
>
> So your input pulse is -2.5V to +2.5V _relative_ to your virtual
> ground?
>
> ...Jim Thompson
>

Nosir, it will be 5 volts relative to the overall common, i.e. the -2.5
volt point wrt virtual ground.

Jim Thompson

unread,
Jun 20, 2015, 1:53:21 PM6/20/15
to
On Sat, 20 Jun 2015 13:39:40 -0400, bitrex
Isn't that what I just said ?:-)

John Larkin

unread,
Jun 20, 2015, 1:54:08 PM6/20/15
to
Sure. If you have two sections available, use one open drain to
discharge the capacitor, and the other section as the threshold
sensor. Quiescent high, RC pulsed low. Easy.

We sometimes have a "trigger" LED that is basically a stretched input.
In some cases, we want to catch very short pulses - a couple ns - but
also indicate a static high input. Laser drivers want that sort of
indication. We use a fast one-shot (SN74LVC1G123) and OR its input
into the output.

bitrex

unread,
Jun 20, 2015, 3:23:47 PM6/20/15
to
On 6/20/2015 1:19 PM, Jim Thompson wrote:
> On Sat, 20 Jun 2015 12:52:26 -0400, bitrex
> <bit...@de.lete.earthlink.net> wrote:
>
>> On 6/20/2015 11:42 AM, Jim Thompson wrote:
>>> On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
>>> <bit...@de.lete.earthlink.net> wrote:
>>>
>>>> I have a need to take a square pulse of 0V/+5V and about 5-10ms
>>>> duration, and stretch it out long enough to flash a LED brightly enough
>>>> to be visible indoors under "ordinary" lighting conditions.
>>>>
>>>> I currently only have op-amps on the board and would rather not add any
>>>> logic ICs to do this. So using low-speed op amps and discretes would be
>>>> fine. The pulse source into the stretcher would be low impedance.
>>>>
>>>> An optional feature would be to have the "stretch" duration decrease the
>>>> more rapidly pulses are coming into the circuit. But that is not a
>>>> requirement if it needs significant complexity.
>>>
>>> Supplies?
>>>
>>> ...Jim Thompson
>>>
>>
>> Looks like it's going to be +5V virtual ground split into +2.5 and -2.5
>> at this point so they'll be low-voltage opamps.
>
> So your input pulse is -2.5V to +2.5V _relative_ to your virtual
> ground?
>
> ...Jim Thompson
>

Correct.

bitrex

unread,
Jun 20, 2015, 5:44:49 PM6/20/15
to
I'm not sure I follow what you mean by using one "open drain." If you
have a moment could you show me in LTSpice? Also I only got 4 hours
sleep last night and jesus I'm lazy today.

M Philbrook

unread,
Jun 20, 2015, 7:31:27 PM6/20/15
to
In article <5585dece$0$7017$4c5e...@frugalusenet.com>,
bit...@de.lete.earthlink.net says...
GND From
/-\ V+ supply ___
V+ supply ( ) Threshold ref -|___|-
\+/ ___ ___ |
|--+|___|+-+++|___|-GND V ->
+ | R4 -
| R3 + |
short pulse + | |
|/ | |\| ||-+
o--------o-| NPN +-+|-\ longer Pulse ||<-
|> | >-+---o-------+--------+||-+
+ +++|+/ | +
| | |/| | |
+-----+-----+ ___ | |
| +--+|___|+--+ |
+ .-. R2 |
--- | | |
C1 --- | |R1 |
+ '-' |
| | |
| | |
=== === +
GND GND GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

C1 and R2 is the charge constant hold time before it goes below
Threshold.

R2 is a + feed back to aid in a little snap action for the off cycle,
make sure to select a value that does not hold + input higher than
the reference input while output is on, otherwise it'll latch.

Jamie

John Larkin

unread,
Jun 20, 2015, 7:31:33 PM6/20/15
to
On Sat, 20 Jun 2015 17:44:34 -0400, bitrex
Oh, sorry, I was thinking LM339, the comparator. I'm starting to
forget those antique part numbers.

If you use opamps, you'll need a diode or a transistor to discharge
the cap. An active discharge part (transistor or mosfet) can give fast
discharge and high stretch ratios.

https://dl.dropboxusercontent.com/u/53724080/Circuits/Timing/Stretchers.JPG

and here's an oldie

https://dl.dropboxusercontent.com/u/53724080/Circuits/Timing/Stretcher.JPG

bitrex

unread,
Jun 20, 2015, 8:35:43 PM6/20/15
to
Cool, thanks!

bitrex

unread,
Jun 20, 2015, 9:42:12 PM6/20/15
to
I think I may go with option #2 - should the op amp be configured as a
comparator in that example?

John Larkin

unread,
Jun 20, 2015, 10:56:43 PM6/20/15
to
On Sat, 20 Jun 2015 21:41:56 -0400, bitrex
The one with the 2N7002?

Opamps usually work OK as comparators, as long as you don't need super
fast response or rise/fall times. They usually don't oscillate so
generally don't need hysteresis.

So there's not really a "configure as a comparator" issue.

Oh, there's one gotcha. Some brands of LM324 do weird things when used
as a comparator. When one section rails, it messes up the bias of the
other three sections. That's because opamp sections use shared current
sources. The original National part did that, maybe still does.

Jasen Betts

unread,
Jun 20, 2015, 11:30:56 PM6/20/15
to
used a fixed pitch font to view:

5V or 12V ------------------+-------+
| |
C1 | |
|| | |
in ---||---+---->|-+----+ | |
|| | | | | .-R6-|--.
R1 | R2 R4 | | |
| | | | | |\| |
| | +-------+--|+\ | //
| === | | | >-+--R7-->|--.
| C2 | | +-----|-/ |
| | | | |/| |
.-->|--' | R3 R5 | |
| | | | | |
0v +--------------+----+----+-------+-------------+

guessed component values.

R1 100k -- sets the scaling down at high frequency
C1,C2 100nF
R2,R3 33K -- sets the length of the output pulse
R4,R5 choose to put approx 1V on the negative input
R6 1M positive feedback - inhibits gradual fade in brightness.
R7 1K sets LED current.
diodes 1n914, 1n4148 or similar.

op-amp input range must include 0v, and allow several voltas
difference on the inputs. (eg LN324)

--
umop apisdn

bitrex

unread,
Jun 21, 2015, 8:08:41 AM6/21/15
to
Great, thanks!

bitrex

unread,
Jun 21, 2015, 1:53:59 PM6/21/15
to
Cool!

Jim Thompson

unread,
Jun 21, 2015, 4:20:48 PM6/21/15
to
Yep. Seat of the pants engineering at its finest >:-}

bitrex

unread,
Jun 22, 2015, 7:51:56 AM6/22/15
to
In this case is that comment meant as a compliment or pejorative? Or
some of both?

Jim Thompson

unread,
Jun 22, 2015, 10:01:32 AM6/22/15
to
On Mon, 22 Jun 2015 07:51:53 -0400, bitrex
Both. Some of concept was on the right track, implementation doesn't
work _at_all_!

Can you define "stretch duration" requirements? How fast might the
input pulses be coming in?

Any reason you can't use a 555 timer ?:-)

bitrex

unread,
Jun 22, 2015, 10:14:52 AM6/22/15
to
They're sync pulses from one of those old musical instrument sequencers
of the type from like, the late 1970s, before MIDI was invented. The
only way to interface gear was with a gate pulse and a control voltage.

I don't know, I guess a realistic upper bound for how fast the input
pulses are coming in would be like, 32nd notes at 200-something beats
per minute? Whatever that works out to...100 ms I guess? That might be
a good stretch length

The 555 timer is really cheap in quantity but the bipolar version draws
a lot of quiescent current and I'm running on batteries. The CMOS is
more expensive. And I'll probably have free opamp sections.


Jim Thompson

unread,
Jun 22, 2015, 10:22:28 AM6/22/15
to
On Mon, 22 Jun 2015 10:14:49 -0400, bitrex
Can you "see" 50ms on and 50ms off?

You say you have free OpAmp "sections" (plural?). How many sections
might be used? 2-3 sections would make it a fairly easy task to get
all your desired features.

Martin Brown

unread,
Jun 22, 2015, 10:38:36 AM6/22/15
to
On 22/06/2015 15:14, bitrex wrote:

> They're sync pulses from one of those old musical instrument sequencers
> of the type from like, the late 1970s, before MIDI was invented. The
> only way to interface gear was with a gate pulse and a control voltage.
>
> I don't know, I guess a realistic upper bound for how fast the input
> pulses are coming in would be like, 32nd notes at 200-something beats
> per minute? Whatever that works out to...100 ms I guess? That might be
> a good stretch length

Why does it need pulse stretching? - wouldn't it be sufficient to drive
enough current through the LED in 5mS to make it bright enough to see?
Some phone camera flashguns are LED based these days.

> The 555 timer is really cheap in quantity but the bipolar version draws
> a lot of quiescent current and I'm running on batteries. The CMOS is
> more expensive. And I'll probably have free opamp sections.



--
Regards,
Martin Brown

Jim Thompson

unread,
Jun 22, 2015, 10:38:40 AM6/22/15
to
On Mon, 22 Jun 2015 10:14:49 -0400, bitrex
<bit...@de.lete.earthlink.net> wrote:

[snip]
>
>I don't know, I guess a realistic upper bound for how fast the input
>pulses are coming in would be like, 32nd notes at 200-something beats
>per minute? Whatever that works out to...100 ms I guess? That might be
>a good stretch length
>

200*32/60 = 106.67 beats/sec (if I understand what you are saying)...
so 10ms :-(... don't think you can discern that.

bitrex

unread,
Jun 22, 2015, 1:05:53 PM6/22/15
to
On 6/22/2015 10:38 AM, Jim Thompson wrote:
> On Mon, 22 Jun 2015 10:14:49 -0400, bitrex
> <bit...@de.lete.earthlink.net> wrote:
>
> [snip]
>>
>> I don't know, I guess a realistic upper bound for how fast the input
>> pulses are coming in would be like, 32nd notes at 200-something beats
>> per minute? Whatever that works out to...100 ms I guess? That might be
>> a good stretch length
>>
>
> 200*32/60 = 106.67 beats/sec (if I understand what you are saying)...
> so 10ms :-(... don't think you can discern that.
>
> ...Jim Thompson
>

Ah, yeah I slipped a decimal point there. At 10 ms that will be steady
on for sure, but that's OK.

Jim Thompson

unread,
Jun 22, 2015, 2:48:39 PM6/22/15
to
On Mon, 22 Jun 2015 13:05:49 -0400, bitrex
<bit...@de.lete.earthlink.net> wrote:

>On 6/22/2015 10:38 AM, Jim Thompson wrote:
>> On Mon, 22 Jun 2015 10:14:49 -0400, bitrex
>> <bit...@de.lete.earthlink.net> wrote:
>>
>> [snip]
>>>
>>> I don't know, I guess a realistic upper bound for how fast the input
>>> pulses are coming in would be like, 32nd notes at 200-something beats
>>> per minute? Whatever that works out to...100 ms I guess? That might be
>>> a good stretch length
>>>
>>
>> 200*32/60 = 106.67 beats/sec (if I understand what you are saying)...
>> so 10ms :-(... don't think you can discern that.
>>
>> ...Jim Thompson
>>
>
>Ah, yeah I slipped a decimal point there. At 10 ms that will be steady
>on for sure, but that's OK.

An ordinary pulse stretcher will produce flashes of width "T" until
the incoming pulse spacing is less than "T", then steady.

Seems to me like the trivial solution would be a toggle-flop, driving
the LED with Q.

Jazzier, combine toggle flop with stretcher so that pulse width is
restricted to TAU, until Q "snuffs" off the width at high pulse rates.

Jim Thompson

unread,
Jun 22, 2015, 3:58:24 PM6/22/15
to
On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
<bit...@de.lete.earthlink.net> wrote:

>I have a need to take a square pulse of 0V/+5V and about 5-10ms
>duration, and stretch it out long enough to flash a LED brightly enough
>to be visible indoors under "ordinary" lighting conditions.
>
>I currently only have op-amps on the board and would rather not add any
>logic ICs to do this. So using low-speed op amps and discretes would be
>fine. The pulse source into the stretcher would be low impedance.
>
>An optional feature would be to have the "stretch" duration decrease the
>more rapidly pulses are coming into the circuit. But that is not a
>requirement if it needs significant complexity.

See BitrexStretcher.pdf on the S.E.D/Schematics Page of my website.

Jim Thompson

unread,
Jun 22, 2015, 4:21:51 PM6/22/15
to
On Mon, 22 Jun 2015 12:58:19 -0700, Jim Thompson
<To-Email-Use-Th...@On-My-Web-Site.com> wrote:

>On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
><bit...@de.lete.earthlink.net> wrote:
>
>>I have a need to take a square pulse of 0V/+5V and about 5-10ms
>>duration, and stretch it out long enough to flash a LED brightly enough
>>to be visible indoors under "ordinary" lighting conditions.
>>
>>I currently only have op-amps on the board and would rather not add any
>>logic ICs to do this. So using low-speed op amps and discretes would be
>>fine. The pulse source into the stretcher would be low impedance.
>>
>>An optional feature would be to have the "stretch" duration decrease the
>>more rapidly pulses are coming into the circuit. But that is not a
>>requirement if it needs significant complexity.
>
>See BitrexStretcher.pdf on the S.E.D/Schematics Page of my website.
>
> ...Jim Thompson

If you insist on using discrete's, see ToggleFlopAncient.pdf on the
same page >:-}

John Larkin

unread,
Jun 22, 2015, 4:27:08 PM6/22/15
to
On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
<bit...@de.lete.earthlink.net> wrote:

>I have a need to take a square pulse of 0V/+5V and about 5-10ms
>duration, and stretch it out long enough to flash a LED brightly enough
>to be visible indoors under "ordinary" lighting conditions.
>
>I currently only have op-amps on the board and would rather not add any
>logic ICs to do this. So using low-speed op amps and discretes would be
>fine. The pulse source into the stretcher would be low impedance.
>
>An optional feature would be to have the "stretch" duration decrease the
>more rapidly pulses are coming into the circuit. But that is not a
>requirement if it needs significant complexity.

This is pretty simple:

https://dl.dropboxusercontent.com/u/53724080/Circuits/Timing/Stretcher_Min.JPG

Optional R2 limits the peak cap current, and sets charging time. R1
sets LED current and decay time. Stretch ratios like 50:1 might be
feasible. The power supplies need to be able to deliver the peak
charging current.

LED brightness will sort of follow the input pattern.


--

John Larkin Highland Technology, Inc
picosecond timing precision measurement

bloggs.fred...@gmail.com

unread,
Jun 22, 2015, 6:57:42 PM6/22/15
to
The OA prototype monostable, let the OP figure out how to adapt it:
Please view in a fixed-width font such as Courier.

.
.
.
.
.
. --
. | Cc |\ ---------
. | >-----||---+----------|-\ |
. -- | | > ---+--> |
. [R1] ---|+/ | ---
. | | |/ |
. | | |
. --- +----||-----
. com | C
. [R2] T
. |
. |
. |
. ---
. V-
.
.
.

whit3rd

unread,
Jun 23, 2015, 3:37:34 AM6/23/15
to
On Monday, June 22, 2015 at 11:48:39 AM UTC-7, Jim Thompson wrote:

> An ordinary pulse stretcher will produce flashes of width "T" until
> the incoming pulse spacing is less than "T", then steady.
>
> Seems to me like the trivial solution would be a toggle-flop, driving
> the LED with Q.

I've done two RC-driven LEDs, from both Q and /Q of a toggle flop,
just so one would register close-spaced pulses. All we had in
the drawer were 74HC74, but it's a lot easier wiring to
a '74HC73 JK to do this task. Less fiddling with which inputs
to strap high, and which low... they're all high.

For a while, in the 1980s, 'logic probe' high/low/pulse detector
circuits were a rage. There was lots of cleverness expended on
getting blinkie lights to divulge useful circuit info. That's about
the time everyone started noticing the '555

bitrex

unread,
Jun 30, 2015, 10:03:35 PM6/30/15
to
On 6/22/2015 3:58 PM, Jim Thompson wrote:
> On Sat, 20 Jun 2015 09:08:31 -0400, bitrex
> <bit...@de.lete.earthlink.net> wrote:
>
>> I have a need to take a square pulse of 0V/+5V and about 5-10ms
>> duration, and stretch it out long enough to flash a LED brightly enough
>> to be visible indoors under "ordinary" lighting conditions.
>>
>> I currently only have op-amps on the board and would rather not add any
>> logic ICs to do this. So using low-speed op amps and discretes would be
>> fine. The pulse source into the stretcher would be low impedance.
>>
>> An optional feature would be to have the "stretch" duration decrease the
>> more rapidly pulses are coming into the circuit. But that is not a
>> requirement if it needs significant complexity.
>
> See BitrexStretcher.pdf on the S.E.D/Schematics Page of my website.
>
> ...Jim Thompson
>

Oops, for some reason I just noticed this now. Thanks!
0 new messages