Help needed designing square wave osc (555)

K

Kasterborus

Guest
Hi, I've been trying to calculate "standard" values that would make me
a 555 R1/R2/C1 square wave oscillator with a 50% duty cycle operating
at close to 30Hz.

Can someone assist? My numbers come out with "odd" component values.

I need a 30Hz and 60Hz oscillator eventually.
Ideally a variable oscillator that could be set to 30 or 60 would be
ideal.

Thanks,
Dave
 
Kasterborus wrote:
Hi, I've been trying to calculate "standard" values that would make me
a 555 R1/R2/C1 square wave oscillator with a 50% duty cycle operating
at close to 30Hz.

Can someone assist? My numbers come out with "odd" component values.

I need a 30Hz and 60Hz oscillator eventually.
Ideally a variable oscillator that could be set to 30 or 60 would be
ideal.
Using the standard oscillator configuration (the one that
uses the discharge pin) and the standard 555 (the original
design made with bipolar transistors, not CMOS) it is hard
to make a square wave oscillator. You will need a switch to
change the capacitors to change frequency. As to strange
values, have you considered using 1% resistors? They come
in many additional standard values.
http://www.logwell.com/tech/components/resistor_values.html

Much easier to use the CMOS version and connect the timing
resistor to the output, instead of having two resistors with
the middle connected to the discharge pin.

But in any case, the square wave will not be a really
accurate 50% square wave, with all tolerances (including the
555 threshold and trigger voltages) taken into account,
especially with temperature change. If that is important to
you, it is probably better to separate the frequency
determining part from the square wave part and use the
standard 555 (non square wave) oscillator to make twice the
desired frequency at a very non 50% duty cycle) and follow
it with a divide by 2, edge triggered flip flop, that will
make a very precise 50% square wave at the desired
frequency. There is also a little gotcha in this method,
but there is no point going into it, here, unless you want
to try going this way. It has to do with a known bug in the
design of the 555.

--
Regards,

John Popelish
 
On Wed, 9 Jul 2008 08:12:04 -0700 (PDT), Kasterborus
<kasterborus@yahoo.com> wrote:

Hi, I've been trying to calculate "standard" values that would make me
a 555 R1/R2/C1 square wave oscillator with a 50% duty cycle operating
at close to 30Hz.
---
Using that astable configuration it's impossible to get a 50% duty
cycle.

Use a CMOS 555 like this: (View in Courier)

.. +----------------+
.. | |
.. [120K] +V |
.. | |8 |
.. | 6+---+---+3 |
.. +-----|TH OUT|--+-->OUT
.. ____ | 2|___ _|4
.. +-O O----+----O|TR R|O--+V |
.. | S1 | +---+---+
..[100nF] [100nF] 1| 7555
.. | | |
.. +---------+---------+--------->GND
---

Can someone assist? My numbers come out with "odd" component values.
---
For a 7555 astable wired as shown above, the frequency of oscillation
is given by:


1
f = --------
1.4RC

So, to start, (since you want to be able to choose between two
frequencies located an octave apart) choose an arbitrary standard
value for the capacitor and connect another identical capacitor across
the first on when you want the frequency halved. Choosing 100nF for
the caps since that's a readily obtainable standard part, we solve for
R at the low frequency:

1 1
R = ------- = -------------------- = 119048 ohms
1.4fC 1.4 * 30Hz * 2e-7F

Which is, essentially, a standard 120 kohm 5% part.

With S1 closed the output will be 30Hz and with it open the output
will be 60Hz, mas o menos.
---

I need a 30Hz and 60Hz oscillator eventually.
Ideally a variable oscillator that could be set to 30 or 60 would be
ideal.
---
You just want to set it to 30 or 60 Hz, or do you want it variable
also?

JF
 
On Wed, 09 Jul 2008 11:39:02 -0500, John Fields wrote:
On Wed, 9 Jul 2008 08:12:04 -0700 (PDT), Kasterborus

Hi, I've been trying to calculate "standard" values that would make me a
555 R1/R2/C1 square wave oscillator with a 50% duty cycle operating at
close to 30Hz.

Using that astable configuration it's impossible to get a 50% duty cycle.
Only if you use the "standard" configuration - I did it once with a couple
of diodes - "steering diodes" such that there was one R value for charge
and a completely different value for discharge, independently selected.

But that symmetrical one that only works with a CMOS chip is much more
elegant. :)

Cheers!
Rich
 
On Wed, 09 Jul 2008 12:27:58 -0400, John Popelish wrote:

frequency. There is also a little gotcha in this method, but there is
no point going into it, here, unless you want to try going this way. It
has to do with a known bug in the design of the 555.
Well, come on, John - don't leave us hanging! Which bug is this?

Thanks,
Rich
 
Rich Grise wrote:
On Wed, 09 Jul 2008 12:27:58 -0400, John Popelish wrote:

frequency. There is also a little gotcha in this method, but there is
no point going into it, here, unless you want to try going this way. It
has to do with a known bug in the design of the 555.

Well, come on, John - don't leave us hanging! Which bug is this?
The 555 contains two comparators and a flip flop. When
operating as an oscillator, the two comparators act as set
and reset signals for the flip flop. The output and
discharge functions are maintained after each of these
events by the flip flop. That is the design concept.

Unfortunately, the internal implementation of this concept
is flawed. The output in not controlled strictly by the
state of the flip flop, but also, in parallel by the output
of one of the comparators. When that comparator generates
the signal to switch the flip flop state, it gets to the
output before the actual flip flop reversal has taken place.
So the output and discharge get bounced by the comparator,
then a little while later (dependent on how hard the
comparator is being over driven, or if the discharge
reverses the comparator output very quickly) the output can
head back to its original state and then, finally lock into
the other state, after the flip flop finally gets flipped.

This output bounce often causes problems if it is used to
drive an edge triggered function like another flip flop. It
can produce two clocks in rapid succession. This problem
can be moderated by adding a short time constant RC filter
to the output, or, when driving CMOS flip flops, a series
resistor will usually work (making use of the clock input's
capacitance as part of the filter. I have also cured the
effect by adding a short second time constant in the
discharge path, so the comparator does not see an immediate
voltage reversal when the discharge transistor comes on.
The small delay makes time for the flip flop to lock in.

The problem could have been avoided in the design if the set
and reset had to take irrevocable effect before the flip
flop drove the discharge pin and output to a new state. But
that would have also slowed the propagation time of the
circuit. I have a home made an LTspice model of the
internal circuit (Remember when IC data sheets showed the
full schematic?) if anyone wants to look into how all this
works in detail.

But the important thing is to expect the bad behavior and
not waste a lot of time suspecting it is something you have
done wrong when your downstream flip flop seems to not want
to flip (when it is actually flipping twice for each
supposed single clock edge).

--
Regards,

John Popelish
 
on 2008-07-09, Kasterborus <kasterborus@yahoo.com> wrote:
Hi, I've been trying to calculate "standard" values that would make me
a 555 R1/R2/C1 square wave oscillator with a 50% duty cycle operating
at close to 30Hz.
for 50% that's the wrong circuit to use.
drop r2 and wire r1 from pin 3 to pin 2 - that'll get you pretty close
to 50%

Can someone assist? My numbers come out with "odd" component values.
use a variable resistor.

Bye.
Jasen
 
Kasterborus Inscribed thus:

Many thanks to all who replied - the circuit with 120K/0.1uF works
very well.

I want to feed this into an audio ring modulator circuit - (2
transformers, 4 Ge diodes) My carrier is coming in from a mic pre-amp
- which when I checked on my scope looked like a -10 to 10V signal.
The output from the oscillator (currently running at 5v) is too small
to be an effective modulator and really needs to be amplified and
offset to match the range of the carrier.
Attenuate the output of the mic amp !

I can do this if I have a differential power supply, but at the moment
I just have a +12V supply - is there any way to do the shift down
using just this?

(Did I explain that correctly - industry terminology has never been my
strong point)

Dave
--
Best Reagrds:
Baron.
 
Many thanks to all who replied - the circuit with 120K/0.1uF works
very well.

I want to feed this into an audio ring modulator circuit - (2
transformers, 4 Ge diodes) My carrier is coming in from a mic pre-amp
- which when I checked on my scope looked like a -10 to 10V signal.
The output from the oscillator (currently running at 5v) is too small
to be an effective modulator and really needs to be amplified and
offset to match the range of the carrier.

I can do this if I have a differential power supply, but at the moment
I just have a +12V supply - is there any way to do the shift down
using just this?

(Did I explain that correctly - industry terminology has never been my
strong point)

Dave
 
On Fri, 11 Jul 2008, Kasterborus wrote:

Many thanks to all who replied - the circuit with 120K/0.1uF works
very well.

I want to feed this into an audio ring modulator circuit - (2
transformers, 4 Ge diodes) My carrier is coming in from a mic pre-amp
- which when I checked on my scope looked like a -10 to 10V signal.
The output from the oscillator (currently running at 5v) is too small
to be an effective modulator and really needs to be amplified and
offset to match the range of the carrier.

But what's the end project? Unless you specifically want a modified
signal on the output, you may not want a square wave. A sine-wave would
do the same thing if your intent is merely to translate the audio input up
to a higher frequency. Using a square wave will modify the signal, so
you'll get more than a translation (in electronic music, the modification
is what's wanted) For that matter, if this is a "scrambler", one article
decades ago suggested using a radio for the second signal, making sure to
use the same station at both scrambler and descrambler.

There is nothing magic about a ring modulator. You can get the same
effect with other circuitry, anything that is a double balanced mixer will
have the same effect. Using active components will get around the issue
of needing a strong "carrier" signal, and get away from the need for
audio transformers.

You can find double balanced mixers in all kinds of ICs. Sometimes they
are even deceptive, since they are used as variable gain elements and
using an audio signal instead of a varying DC level will make it a mixer.

Michael

I can do this if I have a differential power supply, but at the moment
I just have a +12V supply - is there any way to do the shift down
using just this?

(Did I explain that correctly - industry terminology has never been my
strong point)

Dave
 
Attenuate the output of the mic amp !
But then wouldn't I end up with a low level signal on the output?
My "power amp" (stripped PC speaker) wouldn't be able to amplify the
signal to the level needed to drive the speaker.

Dave
 
I wanted to make a Dalek voicebox.
Modifying the signal is the desired effect.

I've seen a lot of circuite out there for voice modulators, but no-one
really explains how they work.
I was looking to build one from the ground up and grasp what was going
on.

Dave
 
Kasterborus wrote:

Attenuate the output of the mic amp !


But then wouldn't I end up with a low level signal on the output?
True ! But you would still need to provide some kind of gain control to
get the effects you want. Either way its divide by two or multiply by
two.

My "power amp" (stripped PC speaker) wouldn't be able to amplify the
signal to the level needed to drive the speaker.

Dave
Are you driving the speaker directly ? no amp in there.

--
Best Regards:
Baron.
 

Welcome to EDABoard.com

Sponsor

Back
Top