~1 second pulser

G

George Herold

Guest
Hi all, I mentioned this digital question on SED.
(It's really not much of a hair ball...)
The goal is to make precision* pulses from 1/16th to 32 seconds.
(the numbers may change)
In a factor of 2 progression, 1,2,4,8...
I made the following about a year ago.
https://www.dropbox.com/s/s9wcqxjjrpcmf83/One-shot2.jpg?dl=0
(It's Sunday, I can have a beer as I watch football and
draw circuits :^)

So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

Q1, Is there any advantage to using a higher freq. crystal?
(say dividing down 10 MHz.)

Q2, Is there some better way? I started with the 74hc191 and
worked backwards.

Given a 32kHz clk, I need two divide by 2^10 stages,
I'm not sure how to do the variable divider,
I tried loading different bits into the '191 and then down counting.
(the schematic doesn't show that I'm currently up counting.)
But I got divide by N-1 rather than N... so more thought (or more
digital logic) is needed.

And finally a minor question. I made these one shots
out of 74hc14, a cap, resistor and Schottky diode.
I added some 1 k ohm resistors in series with the cap,
R1 and R2, Is there any reason to have 'em?

Thanks,
Sorry for the rather long post.

George H.

*The needed precision is not all that great, timewise.
100 ppm, should not be too hard to do better than that.
 
On Sunday, January 17, 2016 at 3:13:19 PM UTC-5, George Herold wrote:
Hi all, I mentioned this digital question on SED.
(It's really not much of a hair ball...)
The goal is to make precision* pulses from 1/16th to 32 seconds.
(the numbers may change)
In a factor of 2 progression, 1,2,4,8...
I made the following about a year ago.
https://www.dropbox.com/s/s9wcqxjjrpcmf83/One-shot2.jpg?dl=0
(It's Sunday, I can have a beer as I watch football and
draw circuits :^)

So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

Q1, Is there any advantage to using a higher freq. crystal?
(say dividing down 10 MHz.)

Q2, Is there some better way? I started with the 74hc191 and
worked backwards.

Given a 32kHz clk, I need two divide by 2^10 stages,
I'm not sure how to do the variable divider,
I tried loading different bits into the '191 and then down counting.
(the schematic doesn't show that I'm currently up counting.)
But I got divide by N-1 rather than N... so more thought (or more
digital logic) is needed.

And finally a minor question. I made these one shots
out of 74hc14, a cap, resistor and Schottky diode.
I added some 1 k ohm resistors in series with the cap,
R1 and R2, Is there any reason to have 'em?

Thanks,
Sorry for the rather long post.

George H.

*The needed precision is not all that great, timewise.
100 ppm, should not be too hard to do better than that.

Oh I forgot, another question.
Is there some (free) spice simulator that
has digital IC's? I thought that rather than thinking
I could just diddle with a spice thing.

George H.
 
On 2016-01-17, George Herold <gherold@teachspin.com> wrote:


So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

32.768 kHz (2^15 Hz)

Q1, Is there any advantage to using a higher freq. crystal?
(say dividing down 10 MHz.)

Those 32768 crystals are mass produced to high precision.
(good enough for wristwatches)

Q2, Is there some better way? I started with the 74hc191 and
worked backwards.

I'd go CD4060 + CD4040

The goal is to make precision* pulses from 1/16th to 32 seconds.
[by divisors of powers or two]

so you need /2^10 to /2^20 or ( >>10 to >>20 as written in C )

use a mux to select the output tap, and/or change the connection
between the two chips.

4060 gets you
/8 /16 /32 /64 /128 /512 /1024 /2048 /4096 /8196 /16384
>>3 >>4 >>5 >>6 >>7 >>9 >>10 >>11 >>12 >>13 >>14

4020 gets you
/2 /4 /8 /16 /32 /64 /128 /256 /512 /1024 /2048 /4096
>>1 >>2 >>3 >>4 >>5 >>6 >>7 >>8 >>9 >>10 >>11 >>12

with a pair of 4 input muxes (eg 74VHC153)

tap the 4060 at >>5 >>6 >>13 >>14 into one of the muxes
(bits 0 and 3 of the divider exponent)

feed the tap selected by th first mux into the 4020 input and
tap that at >>2 >>4 >>6 >>8 into the other mux
( bits 2 and 3 of the divider exponent )

and take the output from the second mux

Thus a binary number input from 0 to 15 will give divisors from

>>7 to >>22

which covers your requirements with a few extra stops each side.
with only 3 ICs 2 resistors, 2 capacitors (one a trimmer if precision
is needed), and the crystal.

otoh an 8-pin microcontroller is probably cheaper.

--
\_(ツ)_
 
On Monday, January 18, 2016 at 2:01:07 AM UTC-5, Jasen Betts wrote:
On 2016-01-17, George Herold <gherold@teachspin.com> wrote:


So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

32.768 kHz (2^15 Hz)

Q1, Is there any advantage to using a higher freq. crystal?
(say dividing down 10 MHz.)

Those 32768 crystals are mass produced to high precision.
(good enough for wristwatches)

Q2, Is there some better way? I started with the 74hc191 and
worked backwards.

I'd go CD4060 + CD4040

The goal is to make precision* pulses from 1/16th to 32 seconds.
[by divisors of powers or two]

so you need /2^10 to /2^20 or ( >>10 to >>20 as written in C )

use a mux to select the output tap, and/or change the connection
between the two chips.

4060 gets you
/8 /16 /32 /64 /128 /512 /1024 /2048 /4096 /8196 /16384
3 >>4 >>5 >>6 >>7 >>9 >>10 >>11 >>12 >>13 >>14

4020 gets you
/2 /4 /8 /16 /32 /64 /128 /256 /512 /1024 /2048 /4096
1 >>2 >>3 >>4 >>5 >>6 >>7 >>8 >>9 >>10 >>11 >>12

with a pair of 4 input muxes (eg 74VHC153)

tap the 4060 at >>5 >>6 >>13 >>14 into one of the muxes
(bits 0 and 3 of the divider exponent)

feed the tap selected by th first mux into the 4020 input and
tap that at >>2 >>4 >>6 >>8 into the other mux
( bits 2 and 3 of the divider exponent )

and take the output from the second mux

Thus a binary number input from 0 to 15 will give divisors from

7 to >>22

which covers your requirements with a few extra stops each side.
with only 3 ICs 2 resistors, 2 capacitors (one a trimmer if precision
is needed), and the crystal.

Thanks Jason, I'm not sure a mux helps me that much... I'd like the
pulse length to be set by a single rotary switch. With a mux I think
I'd need more logic to decode the switch position... (unless I'm
missing something.. which is not un-likely.)
otoh an 8-pin microcontroller is probably cheaper.

Yeah a micro is the obvious answer, but not an option for me at this time.

George H.
--
\_(ツ)_
 
On Monday, January 18, 2016 at 7:02:58 AM UTC-5, o pere o wrote:
On 17/01/16 21:13, George Herold wrote:
Hi all, I mentioned this digital question on SED.
(It's really not much of a hair ball...)
The goal is to make precision* pulses from 1/16th to 32 seconds.
(the numbers may change)
In a factor of 2 progression, 1,2,4,8...
I made the following about a year ago.
https://www.dropbox.com/s/s9wcqxjjrpcmf83/One-shot2.jpg?dl=0
(It's Sunday, I can have a beer as I watch football and
draw circuits :^)

So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

Q1, Is there any advantage to using a higher freq. crystal?
(say dividing down 10 MHz.)

Q2, Is there some better way? I started with the 74hc191 and
worked backwards.

Given a 32kHz clk, I need two divide by 2^10 stages,
I'm not sure how to do the variable divider,
I tried loading different bits into the '191 and then down counting.
(the schematic doesn't show that I'm currently up counting.)
But I got divide by N-1 rather than N... so more thought (or more
digital logic) is needed.

And finally a minor question. I made these one shots
out of 74hc14, a cap, resistor and Schottky diode.
I added some 1 k ohm resistors in series with the cap,
R1 and R2, Is there any reason to have 'em?

Thanks,
Sorry for the rather long post.

George H.

*The needed precision is not all that great, timewise.
100 ppm, should not be too hard to do better than that.





A microcontroller's timer could help here, i.e. a software instead of a
hardware solution.

Pere

Yeah very true Pere, I'm not a micro guy and so I'm grabbing
the hammer (tool) I know.

George H.
 
On 2016-01-18, Jasen Betts <jasen@xnet.co.nz> wrote:

> with a pair of 4 input muxes (eg 74VHC153)

not that part. it needs separate address lines.


--
\_(ツ)_
 
On 2016-01-18, Jasen Betts <jasen@xnet.co.nz> wrote:
On 2016-01-18, Jasen Betts <jasen@xnet.co.nz> wrote:

with a pair of 4 input muxes (eg 74VHC153)

not that part. it needs separate address lines.

I mean the circuit requires a part with separate address lines for
each mux.

might be easier just to hook both counters in series and use a 16:1
mux to select which divider tap you want.

--
\_(ツ)_
 
On 17/01/16 21:13, George Herold wrote:
Hi all, I mentioned this digital question on SED.
(It's really not much of a hair ball...)
The goal is to make precision* pulses from 1/16th to 32 seconds.
(the numbers may change)
In a factor of 2 progression, 1,2,4,8...
I made the following about a year ago.
https://www.dropbox.com/s/s9wcqxjjrpcmf83/One-shot2.jpg?dl=0
(It's Sunday, I can have a beer as I watch football and
draw circuits :^)

So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

Q1, Is there any advantage to using a higher freq. crystal?
(say dividing down 10 MHz.)

Q2, Is there some better way? I started with the 74hc191 and
worked backwards.

Given a 32kHz clk, I need two divide by 2^10 stages,
I'm not sure how to do the variable divider,
I tried loading different bits into the '191 and then down counting.
(the schematic doesn't show that I'm currently up counting.)
But I got divide by N-1 rather than N... so more thought (or more
digital logic) is needed.

And finally a minor question. I made these one shots
out of 74hc14, a cap, resistor and Schottky diode.
I added some 1 k ohm resistors in series with the cap,
R1 and R2, Is there any reason to have 'em?

Thanks,
Sorry for the rather long post.

George H.

*The needed precision is not all that great, timewise.
100 ppm, should not be too hard to do better than that.

A microcontroller's timer could help here, i.e. a software instead of a
hardware solution.

Pere
 
On Monday, January 18, 2016 at 6:33:13 AM UTC-8, George Herold wrote:
On Monday, January 18, 2016 at 2:01:07 AM UTC-5, Jasen Betts wrote:
On 2016-01-17, George Herold <gherold@teachspin.com> wrote:

So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

32.768 kHz (2^15 Hz)

The goal is to make precision* pulses from 1/16th to 32 seconds.
[by divisors of powers or two]

Thanks Jason, I'm not sure a mux helps me that much... I'd like the
pulse length to be set by a single rotary switch. With a mux I think
I'd need more logic to decode the switch position... (unless I'm
missing something.. which is not un-likely.)

If you want a repeating pulse, up to 32 seconds wide, you can't repeat it
at 1 Hz, of course.
And if you go from 1/16 second up to 32 seconds by doubling, the 'rotary switch'
has to have 9 positions; that's do-able.

First idea: use lots of divide-by-two stages (CD4060 etc already mentioned) to
get the last nine stages (1/32 second through 16 second periods) to
the switch inputs. On the output, use two flip/flops, one to enable the
pulse, and the other to divide by two (and clear the enable, so only one pulse
is sent).

That's not ideal, because the 'enable' signal is followed at some delay
(like, 16 seconds or so) before the pulse.

Second idea: take 9 switch inputs from the high frequency parts of the divide chain,
32 kHz/16 kHz...64 Hz and the single output line, is gated by the 'enable' flip/flop.
When enabled (a 'do it now' pushbutton, debounced), the first edge sets the output
flip/flop and only reset it when a second (low frequency part) ripple counter
gives a '1' output. The output flip/flop, when reset, zeroes the low frequency
ripple counter. That means the delay from enable is milliseconds.

Third idea: if the 'enable' is a time-critical signal (like for triggering an o'scope)
it ought to be conditioned and a time pulse from the high frequency
divide chain selected out (that'll take a flip/flop or two).
 
On Monday, January 18, 2016 at 4:28:45 PM UTC-5, whit3rd wrote:
On Monday, January 18, 2016 at 6:33:13 AM UTC-8, George Herold wrote:
On Monday, January 18, 2016 at 2:01:07 AM UTC-5, Jasen Betts wrote:
On 2016-01-17, George Herold <gherold@teachspin.com> wrote:

So at the moment the clk is coming from a function generator.
The current plan is to use a 32.79?kHz oscillator and divide it down.

32.768 kHz (2^15 Hz)

The goal is to make precision* pulses from 1/16th to 32 seconds.
[by divisors of powers or two]

Thanks Jason, I'm not sure a mux helps me that much... I'd like the
pulse length to be set by a single rotary switch. With a mux I think
I'd need more logic to decode the switch position... (unless I'm
missing something.. which is not un-likely.)

If you want a repeating pulse, up to 32 seconds wide, you can't repeat it
at 1 Hz, of course.
And if you go from 1/16 second up to 32 seconds by doubling, the 'rotary switch'
has to have 9 positions; that's do-able.

First idea: use lots of divide-by-two stages (CD4060 etc already mentioned) to
get the last nine stages (1/32 second through 16 second periods) to
the switch inputs. On the output, use two flip/flops, one to enable the
pulse, and the other to divide by two (and clear the enable, so only one pulse
is sent).

That's not ideal, because the 'enable' signal is followed at some delay
(like, 16 seconds or so) before the pulse.

Second idea: take 9 switch inputs from the high frequency parts of the divide chain,
32 kHz/16 kHz...64 Hz and the single output line, is gated by the 'enable' flip/flop.
When enabled (a 'do it now' pushbutton, debounced), the first edge sets the output
flip/flop and only reset it when a second (low frequency part) ripple counter
gives a '1' output. The output flip/flop, when reset, zeroes the low frequency
ripple counter. That means the delay from enable is milliseconds.

Third idea: if the 'enable' is a time-critical signal (like for triggering an o'scope)
it ought to be conditioned and a time pulse from the high frequency
divide chain selected out (that'll take a flip/flop or two).

Hi whit3rd, Yeah.. my current plan is use a string of '191's counting down,
and to load bits (with the switch) into that.. So a "fairly fast" inpuct clk.
(fairly fast being ~100 Hz or so. Some ripple counter after the 32kHz xtal.)
The shortest pulses count 2 bits and the longest 12 bits.. that keeps the delay from push button to start reasonable fast...
10's of milli-seconds or so... which is fine.

My biggest problem is that I just don't do digital very often so end up
with a lot more gates than I need.... I've been reading the digital section of
AoE3 which is helping.

George H.
 
On Tuesday, January 19, 2016 at 6:03:30 AM UTC-8, George Herold wrote:

The goal is to make precision* pulses from 1/16th to 32 seconds.
[by divisors of powers or two]

Hi whit3rd, Yeah.. my current plan is use a string of '191's counting down,
and to load bits (with the switch) into that.. So a "fairly fast" inpuct clk.
(fairly fast being ~100 Hz or so. Some ripple counter after the 32kHz xtal.)

So, if you want to have a preset value in the '191, and set timing by
enabling the clock and waiting for it to count down to zero, wouldn't
you want to use a thumbwheel (digit-indicating) switch to make the
preset number?

So, if 'twere my project, I'd use a '190 (BCD counter version) and a two
or three digit thumbwheel to set seconds-tenths-hundredths.

That way, three or four thumbwheel sections would display the pulse time
in milliseconds...

Ripple counters have some delay, which adds jitter to the output time; you can get
around that by flip/flop tricks (set the output flip/flop one input pulse after you
start the timer, and reset it on the first pulse after the timer reaches zero).

There's off-the-shelf timers available, of course:
<http://www.ia.omron.com/products/family/205/>
 
On Tuesday, January 19, 2016 at 2:26:30 PM UTC-5, whit3rd wrote:
On Tuesday, January 19, 2016 at 6:03:30 AM UTC-8, George Herold wrote:

The goal is to make precision* pulses from 1/16th to 32 seconds..
[by divisors of powers or two]

Hi whit3rd, Yeah.. my current plan is use a string of '191's counting down,
and to load bits (with the switch) into that.. So a "fairly fast" inpuct clk.
(fairly fast being ~100 Hz or so. Some ripple counter after the 32kHz xtal.)

So, if you want to have a preset value in the '191, and set timing by
enabling the clock and waiting for it to count down to zero, wouldn't
you want to use a thumbwheel (digit-indicating) switch to make the
preset number?

So, if 'twere my project, I'd use a '190 (BCD counter version) and a two
or three digit thumbwheel to set seconds-tenths-hundredths.

Argh!!! No thumb wheel switches! (Do they still even make those things?)
The last digital thing I did (20 years ago) had thumb wheel switches... PITA.
One nice grayhill rotary switch. (We use those by the bucket full already.)

That way, three or four thumbwheel sections would display the pulse time
in milliseconds...

Ripple counters have some delay, which adds jitter to the output time; you can get
around that by flip/flop tricks (set the output flip/flop one input pulse after you
start the timer, and reset it on the first pulse after the timer reaches zero).

Hmm I was going to put the ripple counter after the 32kHz Xtal but before any other logic stuff. As long as the delay is constant with time, I don't see how that adds jitter... And anyways I hardly care about jitter... a micro-second here or there won't matter.

Anyway it's all done.
https://www.dropbox.com/s/2jsyqeh1ez8sxso/pulser1.JPG?dl=0
(Well I've got to lay out a pcb.. and more circuit bits have to go on it.)

I'm not sure I should show the under side but...
https://www.dropbox.com/s/x1miriatfgtqgsm/pulser2.JPG?dl=0

Looks a bit like one of Jan's offerings.
I find my prototypes tend to grow randomly... things get stuck on where there
is room rather than with fore thought.

George H.
There's off-the-shelf timers available, of course:
http://www.ia.omron.com/products/family/205/
 
On Tuesday, January 19, 2016 at 4:11:53 PM UTC-5, George Herold wrote:
On Tuesday, January 19, 2016 at 2:26:30 PM UTC-5, whit3rd wrote:
On Tuesday, January 19, 2016 at 6:03:30 AM UTC-8, George Herold wrote:

The goal is to make precision* pulses from 1/16th to 32 seconds.
[by divisors of powers or two]

Hi whit3rd, Yeah.. my current plan is use a string of '191's counting down,
and to load bits (with the switch) into that.. So a "fairly fast" inpuct clk.
(fairly fast being ~100 Hz or so. Some ripple counter after the 32kHz xtal.)

So, if you want to have a preset value in the '191, and set timing by
enabling the clock and waiting for it to count down to zero, wouldn't
you want to use a thumbwheel (digit-indicating) switch to make the
preset number?

So, if 'twere my project, I'd use a '190 (BCD counter version) and a two
or three digit thumbwheel to set seconds-tenths-hundredths.

Argh!!! No thumb wheel switches! (Do they still even make those things?)
The last digital thing I did (20 years ago) had thumb wheel switches... PITA.
One nice grayhill rotary switch. (We use those by the bucket full already.)


That way, three or four thumbwheel sections would display the pulse time
in milliseconds...

Ripple counters have some delay, which adds jitter to the output time; you can get
around that by flip/flop tricks (set the output flip/flop one input pulse after you
start the timer, and reset it on the first pulse after the timer reaches zero).

Hmm I was going to put the ripple counter after the 32kHz Xtal but before any other logic stuff. As long as the delay is constant with time, I don't see how that adds jitter... And anyways I hardly care about jitter... a micro-second here or there won't matter.

Anyway it's all done.
https://www.dropbox.com/s/2jsyqeh1ez8sxso/pulser1.JPG?dl=0
(Well I've got to lay out a pcb.. and more circuit bits have to go on it.)

I'm not sure I should show the under side but...
https://www.dropbox.com/s/x1miriatfgtqgsm/pulser2.JPG?dl=0

oops wrong picture...
https://www.dropbox.com/s/ppfvmp3n5wdlbew/pulser3.JPG?dl=0

I've got to add the 32k Hz clk too.. but I'm still waiting for it to come.

George H.
Looks a bit like one of Jan's offerings.
I find my prototypes tend to grow randomly... things get stuck on where there
is room rather than with fore thought.

George H.

There's off-the-shelf timers available, of course:
http://www.ia.omron.com/products/family/205/
 
On Tuesday, January 19, 2016 at 1:31:57 PM UTC-8, George Herold wrote:

So, if 'twere my project, I'd use a '190 (BCD counter version) and a two
or three digit thumbwheel to set seconds-tenths-hundredths.

Argh!!! No thumb wheel switches! (Do they still even make those things?)
Anyway it's all done.

https://www.dropbox.com/s/ppfvmp3n5wdlbew/pulser3.JPG?dl=0

Your next project: make a pretty bezel label for all the positions of that selector
switch, and fasten it on. In correct orientation. It deserves a bigger
knob, I'd say.

I once had a meter face to label (it was some kind of electronic
liquid level sensor, as I recall) and got a plot package to do the
whole thing.
It looked real nice. It was more trouble than
the electronics, though. Rotating the scale text to parallel the pointer arc,
scribing long tickmarks for MS and short ones for LS digits, center-locating
the pivot to position the scale arc at the pointer end, and putting fiducial
marks where the through-screws held the meter scale plate.

I always kinda liked thumbwheels; the SCSI drives that had 'em, were easier
to set up than the ones that needed me to squint at jumpers. And they're
self-labeling.
 

Welcome to EDABoard.com

Sponsor

Back
Top