~1 second pulser

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.

formatting link
(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.
Reply to
George Herold
Loading thread data ...

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.

Reply to
George Herold

32.768 kHz (2^15 Hz)

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

I'd go CD4060 + CD4040

[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

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.

--
  \_(?)_
Reply to
Jasen Betts

not that part. it needs separate address lines.

--
  \_(?)_
Reply to
Jasen Betts

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.

--
  \_(?)_
Reply to
Jasen Betts

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

Pere

Reply to
o pere o

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.)

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

George H.

Reply to
George Herold

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

George H.

Reply to
George Herold

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).

Reply to
whit3rd

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.

Reply to
George Herold

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:

Reply to
whit3rd

.

own,

t clk.

xtal.)

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... PIT A. One nice grayhill rotary switch. (We use those by the bucket full already. )

u can get

after you

zero).

Hmm I was going to put the ripple counter after the 32kHz Xtal but before a ny 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 mic ro-second here or there won't matter.

Anyway it's all done.

formatting link
(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...

formatting link

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

George H.

Reply to
George Herold

ds.

down,

uct clk.

z xtal.)

o

ITA.

y.)

e

you can get

se after you

s zero).

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 m icro-second here or there won't matter.

)

oops wrong picture...

formatting link

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

George H.

here

Reply to
George Herold

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.

Reply to
whit3rd

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.