Oscillator with a Flip-Flop?

Started by bioroids, August 29, 2005, 01:12:58 PM

Previous topic - Next topic

bioroids

Hi!

Is it posible to make a simple square-wave oscillator out of a flip-flop (like half of a CD4013 or CD4027)?
I tried googling it but didnt seem to find what I need.

I have one half of the 4013 left in a circuit, and I need a clock, so was thinking of using it. The only schem I found uses an aditional external mosfet, but there should be a way of doing it without it... I hope.

Any tips are welcomed

Thanks!

Miguel

PS: this is for a sequencing stuff a la Vanishing Point but with 16 steps. I'll post it as soon as I finish troubleshooting it, it seems pretty good so far.
Eramos tan pobres!

Jaicen_solo

Check out the PWM about half way down this page:

http://www.geocities.com/tpe123/folkurban/fuzz/snippets.html

There's a simple oscillator using 2 pins of a 40103 and a 2N3904 trannie. Job done!

doug deeper

4013...is a flip flop
40103...is a schmidt trigger
cool though! :)

gez

Doubt it, not without other components.

This is the only thing I can think of, but I reckon it'll latch up (both outputs going positive).  I'd have to check the data sheet (off to bed now).



I dare say the above could be made to work, but with additional components (probably not worth the effort).  Might work as is though, who knows!
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

bioroids

Yes, I thought about that configuration, but I think it will latch up as you said :(

Thanks anyway, if I come up with something I'll post it

Luck!

Miguel
Eramos tan pobres!

gez

This might prevent latching (still need to check data sheet):



Use a dual-gang pot for variable frequency.

Edit: or single pot to adjust one leg if 50:50 duty cycle isn't essential.  If it is essential you could feed the output to the other half of of the flip-flop.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

Just breadboarded the above and it works beautifully!  Tie C and D inputs to ground.

Didn't try it without the diodes but, having checked the schematic for the 4013, I'd say leave them in.  The S&R inputs are inverters so will trigger at around half supply, so if the cap which is discharging hasn't met its threshold by the time the cap which is ramping up triggers its threshold, then both inputs would be high and it would latch.  You might be able to do away with them, but better to be safe than sorry.

If I have time at the end of the week I’ll do the calculations for frequency, failing that you can just tweak it empirically in the mean time.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

bioroids

Gez, you are a genius!  :D

I'd never (in a million years) thought about the diodes trick!

You should patent this!

Going to the breadboard right now...

Thanks again

Miguel
Eramos tan pobres!

gez

Quote from: bioroidsI'd never (in a million years) thought about the diodes trick!

The diodes idea popped into my head as I was falling asleep; I had to get up and scribble it down/post it in case I forgot it in the morning.  :)

PS The junctions of the resistors and caps could be mixed (active op-amp mixer with reasonably large input resistors) for a sawtooth waveform.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

bioroids

Well they say that the best ideas come when you're fallin asleep!

I just breadboard it and works like a charm. There's no need to use dual ganged pot, as varying one resistance gives a very good range of speed.

I'm using it as a clock for a 4029 counter. The other half of the 4013 toggles the up/down input everytime the counter sets the carry signal. This way it counts up and down very smoothly.

Now I got to couple the audio part of this (OTA based). I'm trying to get some stepped modulation out of this  8)

Thanks a lot again!

Miguel
Eramos tan pobres!

gez

Quote from: bioroidsThere's no need to use dual ganged pot, as varying one resistance gives a very good range of speed.

I'm using it as a clock for a 4029 counter

Just for the benefit of others, it should be pointed out that the duty cycle will change if you just vary one resistance.  In this case it doesn't matter as the 4029 is triggered on ground to positive transitions.

Anyway, glad it works!
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

bioroids

Quote from: gez

Just for the benefit of others, it should be pointed out that the duty cycle will change if you just vary one resistance.  In this case it doesn't matter as the 4029 is triggered on ground to positive transitions.

I suspected that. In my setup it didn't show up, but for other uses it should matter.

Luck!

Miguel
Eramos tan pobres!

gez

Removed the diodes and it works but there are a few things to be aware of.  

As the caps don't fully discharge it doesn't take as long for them to ramp up to meet their trigger thresholds so there's a big increase in frequency.  This means you have to use bigger resistors/caps and it also makes frequency calculation harder (not that I've done this yet).

Also, as you start to deviate from a 50:50 duty cycle the thing is in greater danger of latching up (there's only a certain range you can get away with until both outputs go high), so varying the resistance of one leg to adjust frequency definitely requires the diodes over a wide frequency sweep.

In short, it's better to leave the diodes in.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

bioroids

Quote from: gez
As the caps don't fully discharge it doesn't take as long for them to ramp up to meet their trigger thresholds so there's a big increase in frequency.

In short, it's better to leave the diodes in.

I noticed it when removed one of the diodes, just to try it out. When I removed both diodes it stoped working.

I'm using a 100K pot on one side and a 1K resitor on the other. The cap with the pot is 4.7uf and the other is 1uf. I still got to measure the frequencies, but I think its about between 2hz and 96 hz with this components. Pretty good range for the clock I need.

Thanks again man

Miguel
Eramos tan pobres!

gez

No need to reply to this Miguel, I've just updated the above schematic and blurb to show the frequency calculation and other connections for the chip.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

Again, no need to reply Miguel.  Found this link last week which shows some more ways of doing this.  All the circuits use a trannie, which is what I thought you'd have to do originally.  Anyway, thought I'd post them for your/other's interest.

http://www.discovercircuits.com/PDF-FILES/dfliposc.pdf

From this site (good one):

http://www.discovercircuits.com/O/o-sqwave.htm
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter