Best way to make a 555 retriggerable?

I'm using a double NE555 (called '556'), in which both halves act as a one-shot. I need them to be retriggerable, that is, if a trigger pulse comes before the completion of an ongoing pulse, the ongoing pulse is extended by an amount equal to the preset time constant.

I found several ways on the 'net to achieve this:

  1. 2.
    formatting link
    (see "montages" n. 2 and 3)

  1. (Starting with a 555 in the usual monostable configuration) It's achieved by wiring the capacitor between pin 6 and GND and the resistor between supply voltage and pin 2. Pins 2 and 6 are wired together, so pin 7 is not used.

  2. Same as the usual 555 in monostable configuration, but reset and trigger are wired together: at each incoming pulse, the timer is reset even if the previous output pulse hasn't finished yet.

I'm trying to build a device that tells me if an incoming signal (Horizontal sync from a VGA card) has a frequency that is below or above a certain value. The first one-shot has a time constant corresponding to the period of this fixed frequency value (54 us, 18.5 KHz). The incoming signal is wired to the trigger pin of the first half of the chip. When the frequency is higher than 18.5 KHz, the interval between the pulses is less than 54 us, so the first one-shot is retriggered constantly and stays high. If the frequency drops below

18.5 KHz, the pulses come at a lower rate, thus allowing the one-shot to basically oscillate at the incoming signal's frequency (for instance: the incoming signal has a frequency of 15 KHz (66 us): the one-shot will produce a 54 us pulse every 66 us). The output of the first one-shot is fed to the second half of the 556 (second one-shot), which is set with a time constant of 84 us: when the first half stays high because the frequency is above 18.5 KHz, this one remains low because it is never triggered; when the first half is oscillating at the incoming signal's frequency, the triggering pulses will always come at intervals lower than 84 us, so the device will be constantly retriggered and give a constantly high output.

Thanks very much for your time.

Reply to
barabbadruso
Loading thread data ...

Unless this is for a contest, the best way to get a dual retriggerable monostable is to use a 74HC123. They're designed for the job.

One-shots are fine as long as you don't care if the delay is wrong by a factor of 2 or 3, but that doesn't fit your application. (Read the data sheet carefully, and compute the worst-case deviations at the corner cases of device-to-device variation, temperature, supply voltage, capacitor tolerance, and so forth, and then add a safety factor, and you'll see what I mean. One-shots stink.)

If this is a one-off hobby project that only has to sort-of-work for a short time, you can use tweaked one-shots. If you want it to actually work properly many times, or over temperature, or after rattling round your workbench drawer for a year, you'll need something a lot more accurate than a one-shot.

If this is for a real-life application, you could use a small microprocessor with a crystal clock and a timer/counter unit. (All micros that I've ever seen have a timer/counter that's good enough for this job.)

If you don't want to learn to use micros, but still want accuracy and repeatability, you'd be very much better off using a crystal oscillator to generate the limiting frequency (18.5 kHz) and then use a CD4046 (phase detector II) to detect whether the frequency is below or above that.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

--
You've described what you want the circuit to do if the input
frequency is higher than, or lower than 18.5kHz, but what do you want
the circuit to do if the input frequency is precisely 18.5kHz?
Reply to
John Fields

HC123 has a +-15% pulse width tolerance from -55 to 125C. That ain't bad.

I like one-shots. They have lots of uses... resetting things, flashing LEDs, decoding Manchester and 1-wire data streams, demodulating wideband FM, all sorts of stuff.

Here's my dual tach:

ftp://jjlarkin.lmi.net/DoubleTach.jpg

John

Reply to
John Larkin

It will blow up ? :)

Reply to
TTman

snipped-for-privacy@email.it a écrit :

Divide your frequency by two with a 74HC74 in order to have an accurate

50% square wave. Use that to drive a small 2N7002 MOS that you'll use to reset a small RC circuit. That'll generate a sawtooth ramp, whose amplitude is (almost) proportional to your signal period. Then compare this to a reference level you purposely define.

Above your reference frequency you'll have no output pulse. Below your comparator will output pulses at F/2.

Maybe you can convince the second half of your 74HC74 to latch the pulses so that your detector outputs constant levels, but it's too late for me here. Someone else?

--
Thanks,
Fred.
Reply to
Fred Bartoli

The world will end.

John

Reply to
John Larkin

--
Cute, but seemingly irrelevant since it only indicates the magnitude,
but not the sign of the error.

Consequently, it seems to have little to with the subject at hand,
which is how to identify whether the signal is below, above, or at the
reference frequency.
Reply to
John Fields

--
Well, probably not, since a singularity won't have been generated
since there's some R in the circuit.
Reply to
John Fields

What does that mean? It converts frequency to voltage. It doesn't indicate anything.

We were discussing one-shots. I posted a one-shot circuit.

Actually, my tach could be used with an analog comparator to indicate whether the input was above or below some frequency threshold. I'm not sure how one could ever determine that a frequency is exactly at some reference... you'd have to wait forever to find out. The OP sensibly asked for "below or above."

John

Reply to
John Larkin

Since it would take forever to determine if a frequency was precisely

18.5 KHz, the world would have ended!

John

Reply to
John Larkin

Some design goals/specs might be in order.

Define two frequency thresholds, A and B. Below A, the output should be low. Above B, the output should be high. Between A and B is a region where you can't tell if the frequency is higher or lower than desired. What should the output do in that region? Is there a problem if the output changes randomly even for a fixed input frequency? This might require further increase in the distance between A and B. What do you do when noise or mode change glitches the signal you're measuring?

Compare the allowable width of the uncertainty region with the tolerance and stability of the resistors, caps, 555's that you can afford. That will determine if it's even possible to do what you want with a 555.

I like the micro controller solution described elsewhere in this thread.

Reply to
mike

Replace it with a PIC, of course.

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
Synergetics   3860 West First Street   Box 809 Thatcher, AZ 85552
rss: http://www.tinaja.com/whtnu.xml   email: don@tinaja.com

Please visit my GURU's LAIR web site at http://www.tinaja.com
Reply to
Don Lancaster

That's what I wanted to do in the first place. The project I was trying to do is described in this page, with source and all:

formatting link
But my PIC programmer doesn't see the 12C508, no matter what software or operating system I use. I can't code for PICs, otherwise I would adapt the source to one of the other PICs I have, which my programmer can perfectly read / write (PIC16LF84A, PIC16F628A, PIC18F2550).

Reply to
barabbadruso

John Larkin wrote: : Since it would take forever to determine if a frequency was precisely : 18.5 KHz, the world would have ended!

Ahh, another twist with 'practical' vs. 'pedantic' definition of what counts as 'infinite', in latching relays or (ohmygod) 555's . This is going to be a long thread...

Regards, Mikko

Reply to
Okkim Atnarivik

Clearly JF has now come around to the practical definition. So all is well, peace and harmony all around. :)

--

John Devereux
Reply to
John Devereux

The poor ol' 555; it just can't get any respect. ;-)

One tool that's available which may help is the 555 Designer from Schematica . It's free to download although some capabilities are masked in un-registered "demo" mode. probably at least worth checking it out. There are a couple of options shown for setting up a retriggerable input to a monostable layout.

#disclaimer

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

--- That won't retrigger because the output will go low every time RESET\ is asserted, regardless of the states of pins 2 and 6, and will stay low for as long as the trigger pulse is active.

Here's the way I do it, which is the same as Montage n°2.

Version 4 SHEET 1 960 772 WIRE 224 144 -96 144 WIRE -192 208 -288 208 WIRE -96 208 -96 144 WIRE -96 208 -192 208 WIRE -64 208 -96 208 WIRE 256 208 160 208 WIRE -192 240 -192 208 WIRE -64 272 -96 272 WIRE 192 272 160 272 WIRE -96 336 -96 272 WIRE -64 336 -96 336 WIRE 320 336 160 336 WIRE 352 336 320 336 WIRE -192 368 -192 320 WIRE -96 368 -96 336 WIRE -96 368 -192 368 WIRE -192 400 -192 368 WIRE 224 400 224 144 WIRE 224 400 160 400 WIRE 320 464 320 336 WIRE -96 480 -96 368 WIRE 16 528 -32 528 WIRE 192 528 192 272 WIRE 192 528 96 528 WIRE -288 560 -288 208 WIRE 192 560 192 528 WIRE -288 688 -288 640 WIRE -192 688 -192 464 WIRE -192 688 -288 688 WIRE -96 688 -96 576 WIRE -96 688 -192 688 WIRE 192 688 192 640 WIRE 192 688 -96 688 WIRE 256 688 256 208 WIRE 256 688 192 688 WIRE 320 688 320 544 WIRE 320 688 256 688 WIRE -288 752 -288 688 FLAG -288 752 0 FLAG 352 336 OUT SYMBOL Misc\\NE555 48 304 M0 SYMATTR InstName U1 SYMBOL voltage 192 544 M0 WINDOW 3 24 104 Invisible 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 WINDOW 0 33 19 Left 2 SYMATTR Value PULSE(5 0 1 .1U .1U .1 .5 10) SYMATTR InstName V1 SYMBOL voltage -288 544 M0 WINDOW 123 0 0 Left 2 SYMATTR SpiceLine Rser=0 SYMATTR InstName V2 SYMATTR Value 5 SYMBOL res 336 448 M0 WINDOW 0 -42 36 Left 2 WINDOW 3 -57 70 Left 2 SYMATTR InstName R3 SYMATTR Value 1000 SYMBOL res -176 224 M0 SYMATTR InstName R1 SYMATTR Value 2meg SYMBOL cap -176 400 M0 SYMATTR InstName C1 SYMATTR Value 1µ SYMBOL pnp -32 576 R180 WINDOW 0 58 35 Left 2 WINDOW 3 52 64 Left 2 SYMATTR InstName Q1 SYMATTR Value 2N4403 SYMBOL res 0 512 M90 WINDOW 0 65 59 VBottom 2 WINDOW 3 68 59 VTop 2 SYMATTR InstName R2 SYMATTR Value 1000 TEXT 40 720 Right 2 !.tran 0 10s 0 .001s startup uic

--
JF
Reply to
John Fields

How long would it take you to decide if a signal was exactly 18.5 KHz?

John

Reply to
John Larkin

The uA709 has the same problem.

John

Reply to
John Larkin

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.