square wave generator

hello, I want to make a square wave generator with a variable frequency range between 1 and 10Hz. The pulse is between 0 and 5V and a 50% duty cycle. I'm going to use this to interface with some logic chips, my question is, what's the best circuit for this job? In terms of low part count, and inexpensive. Right now I've built a 555 Astable circuit and I pass this through a buffer, but the 50% duty cycle is hard to achieve, and I don't know if the 555 is the best approach.

much thanks

Reply to
panfilero
Loading thread data ...

How do you want to adjust the frequency?

If you don't care much about a linear frequency vs. knob setting, then a

555 into a divider works dandy, and if you use a divider that ends in a divide by two stage then the duty cycle will automatically be 50%. If you use a 74HC4020, 4040 or 4060 then you can use a fairly small cap on the 555 which makes life easier all the way around.
--
www.wescottdesign.com
Reply to
Tim Wescott

Running your oscillator at 2x the desired frequency and then putting a divide by 2 stage afterwards should cure any duty cycle problems.

Reply to
Ralph Barone

It's not easy to get the 555 to produce a 50% duty cycle square wave - IIRR John Fields has a solution involving an extra diode, but it does degrade the the 555's already unremarkable temperature stability.

Using a 555 - or any other astable - to clock a bistable set up to divide by two will give you a nearly perfect square wave, but it uusally involves an extra chip. It is very easy to set up a J/K bistable to divide by two and almost as easy to use a D-type bistable for the same job. The regular J/K's and D-types are mostly duals, so you might have a spare one somewhere in the logic you are driving.

The CD4047 CMOS astable has got a built-in divider, and you can buy it off-the-shelf from Farnell and presumably other broad-line distributors for about $0.50 in small quantities, but John Fields got upset the last time I pointed this out - apparently you can get 555 for half the price.

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

A 555 is NEVER the best approach. Use a PIC.

--
Many thanks,

Don Lancaster                          voice phone: (928)428-4073
 Click to see the full signature
Reply to
Don Lancaster

On a sunny day (Mon, 29 Aug 2011 19:23:20 -0700 (PDT)) it happened panfilero wrote in :

Add a flip flop. Or use a 74HC4046.

Reply to
Jan Panteltje

It isn't all *that* bad. A buffer followed by a D flip-flop ought to give him what he wants but at half the frequency of the raw oscillator.

Addition of a diode and a pot to tweak duty cycle error to the classical circuit will allow it to do a wide range of duty cycles including 50% provided you don't want it too accurate. Second diagram down the page will help the OP with minimum fuss and limited accuracy.

formatting link

Overkill and would require a fair amount of programming to do it.

A 4047 in free running astable mode ought to do exactly what he wants out of the tin with just a few components and very little effort.

formatting link

Regards, Martin Brown

Reply to
Martin Brown

50% duty cycle from a 555 is trivial IF you feed the cap from a resistor connected to Output rather than the usual lash-up. ...Jim Thompson
--
                  [On the Road, in New York]

| James E.Thompson, CTO                            |    mens     |
 Click to see the full signature
Reply to
Jim Thompson

--
The caveat there is that with a 5V supply and depending on the load,
Vout may fall below 2Vcc/3, which will make it impossible for the 555
 Click to see the full signature
Reply to
John Fields

With a CMOS 555 you can get close to a 50% duty cycle by driving the RC from the output pin. The accuracy isn't as good as a divide-by-2, but it doesn't drift around much as long as the timing resistor is much larger than the switch resistances.

They're still occasionally useful, e.g. in driving a string of LEDs with minimal parts count. Last time I used one was about 1995, for doing just that, in a very low cost head tracker.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
 Click to see the full signature
Reply to
Phil Hobbs

You can use anything inverting with loads of gain to make a square wave generator. You could use a 74HC14 for instance. It has inputs with hysteresis so it is unlikely to produce fake pulses. 50% duty can be achieved by dividing the output by 2.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
 Click to see the full signature
Reply to
Nico Coesel

Looking back, I can't think of a more frustrating and confusing starting point for a beginner than trying to use a 555 to clock their fledgling digital experiments. Forrest Mimms III notwithstanding...

Reply to
Bob

Wasn't there an article in the Signetic's 555 cookbook on how to get

50%?
--
You can't have a sense of humor, if you have no sense.
Reply to
Michael A. Terrell

Phil Hobbs mentions using a CMOS 555 which is a good point. The standard

555 puts out lots of noise on the power supply and it gets into everything. The CMOS version (7555) doesn't have that problem. The square wave part is easy with any flip flop used as a divider, as has been mentioned the 4020, 4040 would be good choices.
Reply to
David Eather

The CMOS part is a lot nicer than the original too.

My recollection is that it was the diode trick and/or the exact choice of resistor ratios with one between the capacitor and discharge node. The latter is not very amenable to adjusting the frequency.

Regards, Martin Brown

Reply to
Martin Brown

Not with the bipolar part. It doesn't swing symmetrically. The CMOS version is better.

John

Reply to
John Larkin

CMOS version? Must be a helluva "load"... maybe a Larkin "load" ;-) ...Jim Thompson

--
                  [On the Road, in New York]

| James E.Thompson, CTO                            |    mens     |
 Click to see the full signature
Reply to
Jim Thompson

Appreciate all the responses, I'm going to look into them, noise is an issue so I'll check out the 7555, PIC is overkill, and most people in here mention the frequency divider method so I'll look into that, thanks again

Reply to
panfilero

50% duty cycle is not too much of a problem if one is a bit sneaky..
Reply to
Robert Baer

Opamp (eg 358) with an RCRC feedback path. Or possibly a discrete 1 tr inverting stage with the RCRC. F control is fun.

NT

Reply to
NT

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.