DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: MrStab on July 13, 2014, 08:44:41 AM

Title: Help understanding this CMOS oscillator
Post by: MrStab on July 13, 2014, 08:44:41 AM
hi,

so i found this circuit, and a variant thereof, interesting and decided to build it:

(http://aronnelson.com/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=9588&g2_serialNumber=2)
also: http://zpostbox.ru/g102.gif (http://zpostbox.ru/g102.gif) (... appears to have been blocked by host! wtf!)

i used the values in the first schematic, though i used a 33nF cap instead of 22nF, as somehow i couldn't find the bag with "22nF" written on it at the time. at first i couldn't get anything, till i poked around with a cap between the 3rd and 4th 4049 inputs. i figured this was wrong, and showed some issue elsewhere in the circuit, and eventually found that a 10uF cap in parallel with the 33nF (feedback loop?) cap made things work. weird.

it pretty much works, but i can't find much written info on this particular circuit - just common elements described in other circuits, and i can't figure out why this change in value makes everything work. i've figured out how to change speed, fast/slow switch, depth (roughly), but i don't like not knowing why the stock circuit isn't working for me. i get what seem to be clear and even square and triangle waves, but can't tell if the third output is truly "sinusoidal" or not. look at me with my big words.

i've altered the circuit to use a 4069 since, as i have more of those, but it worked the same with a 4049 (pin differences accounted for). i'm using a basic NPN-LED setup to visualise, before i get too in-depth working out the waveform, but that works independently of the rest of the circuit and doesn't interfere (no difference when i remove it).

any ideas? links? explanations? anything would be really appreciated as always!

cheers!
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 13, 2014, 02:06:33 PM
Hi,
It looks like a basic Schmidt trigger + integrator. The same circuit you normally see done with 2 op-amps is contained in the first 3 inverters.

It should work with components shown but at fairly high frequency  . Maybe your scope timebase was too slow and it wouldn't display?

When you put a bigger cap on the 3rd inverter (integrator), you lowered the frequency, but now maybe the coupling cap to the 4th inverter (waveshaper) is too small to cleanly pass the triangle? It's actually quite a problem to AC couple LFO frequencies if it isn't already a sine wave.

To my mind, the resistor values are low by at least x10 (or even x100!) to use the advantages of the CMOS high input impedance and  also allow smaller non-electrolytic caps at low frequency operation. Assuming you want an LFO BTW ;)

I like using CMOS 4069UB in linear mode too, but unless there's a better use for the last 2 inverters (here doubled up for current drive) I see no advantage over a quad op-amp for the job.
Title: Re: Help understanding this CMOS oscillator
Post by: MrStab on July 13, 2014, 03:15:38 PM
thanks for the info, Jim.

all 3 waveworms seem to work symmetrically, whether or not they're "right" i can't really tell just yet. but they seem to be. i'm guessing the stock value of 22nF was for frequencies too high for general LFO use.

so you think i should lower the resistor values by 10x? using a polarised elecro cap on the 3rd inverter makes me uneasy, if i could use a smaller film cap it'd probably be better. currently i have all 10k resistors and the feedback cap is 10uF - think i should try 1k resistors and a 1uF non-polar cap? just making sure i understand.

i've been messing around with NPNs and LDRs in the signal path, does sound pretty cool so far. i have no scope btw, will be relying on a soundcard & possibly a prescaler when i get things working better. just using ears & an LED to see for now.    

thanks again!
Title: Re: Help understanding this CMOS oscillator
Post by: MrStab on July 13, 2014, 04:01:52 PM
ahh! i mis-read and put 1k resistors when i should've put 100k or more. i get that part now. oops. lol
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 13, 2014, 04:03:11 PM
Hi,

No, I mean the resistors are too low. So where you see 10k, try 100k. Many CMOS inverter linear circuits use 1meg as maximum or even as high as 10meg! For an LFO, the self noise produced by large value resistors isn't a problem. Audio circuits tend to use around 10k values for this reason. You do need to keep the board clean with high value resistors, since any dirt that's even slightly conductive getting between the connections will change the circuit noticeably.

Large resistors means small capacitors. For timing, use the idea of the resistor value multiplied by the capacitor value (not as an accurate prediction but to help fudge toward what you want on the breadboard). So for a given time delay or frequency, a 1meg with 100nF equals a 10k with 10uF. Since cheap large value caps are usually polarized electrolytic which need to go the right way round (there isn't always a right way round), if you can avoid them it's a good thing (I think).

Jim
Title: Re: Help understanding this CMOS oscillator
Post by: MrStab on July 13, 2014, 05:42:11 PM
thanks for the further details, Jim. i changed all resistors for 1M (and 1.5M), and reduced that cap to 100nF, but the wave now seems to be asymmetrical, ie. the signal is trem'd for longer than it is un-trem'd. i'll need to tweak some more. i'm now using a 1M resistor in series with a 1M pot between 1st inverter input and 2nd inverter output for the speed control, doesn't seem to be as effective as it once was.

FWIW, the electrolytics only work with the negative lead on the inverter input. not that it matters anymore. just in case you're curious!

i want a square+triangle+sine capable LFO with minimum parts and easy to customise between circuits, i suppose - there's actually too much info out there, i couldn't figure out what to settle on!

cheers
Title: Re: Help understanding this CMOS oscillator
Post by: duck_arse on July 14, 2014, 08:27:54 AM
Mr Stab,

I have a copy of "301 circuits" from elektor magazine. Nr.6, page 13 is a "cmos function generator", very similar, yet also different, to your shown circuit. it is accompanied by a complete theory and build notes. if you go here:

www.scribd.com/doc/224792624/Elektor-301-1-Circuits
or here maybe:
www.scribd.com/doc/203023492/Elektor-301-Circuits

and can be bothered waiting for the download, you can get a copy for yourself. as a bonus, you'll get 300 other circuits, some will be useful.
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 14, 2014, 11:12:09 AM
Your speed control can quite easily be a 10k in series with a 1Meg pot. You'll find that a common combination.
As for symmetry, a DC offset could mean what you're controlling is going full on or off at one limit before the waveform reaches it's upper or lower limit. The 22uF in the middle is removing the DC offset there, but if it's an electro it's leakage current could be forcing an offset it's meant to correct! You could try 2 large electro's in series (negs together in the middle, pos to outer and connect those in the circuit) they'll probably need to be large though - 100uF as a start.
Title: Re: Help understanding this CMOS oscillator
Post by: MrStab on July 14, 2014, 12:06:30 PM
thanks for the link, Duck - loads of cool projects there for a rainy day. which is every day in Glasgow.
the explanation under the "Block Diagram" heading makes your comment about symmetry make more sense, Jim. i think i'm starting to grasp it, at least.

i'm apprehensive about doing the "series electro trick", based on the fact i've never seen it in commercial circuits - or should i stfu and just try it? a plain, single 100uF electro doesn't seem to make much difference.

Duck's article says at one point "This difficulty is overcome by means of P2, which allows symmetry adjustment." I'm still trying to make sense of it, and admittedly most of the preceeding text is lost on me, but P2 seems to offer some kinda biasing from the power supply to the first inverter input. think i should try that?

was i right to multiply all those 10k resistors by 100? is there some relationship i've missed? if i can't make this circuit usable with sensible values (ie. to avoid polarised caps), i may start on the one in the article. if i can make out all the labels.

thanks for the help, guys
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 14, 2014, 02:46:29 PM
A typical way of injecting a bias is as simple as say, a 10k trimpot across the supply and the wiper feeding (say) a 100k resistor to an input pin. Effectively, the same kind of thing you see as Vref supply to an opamp  input pin but variable.
When I've made LFO's, I've used opamps with a variable Vref as a means to get symmetric sweep. The depth control would be a volume pot terminated to the variable Vref - not ground. The pot wiper feeds whatever your control element is.

I'm pretty sure I've seen 2 electro's in series in Boss LFO circuits (2 x 33uf). That's the integrator timing cap (3rd inverter on your diagram).

Jim
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 16, 2014, 04:50:13 PM
(http://i1374.photobucket.com/albums/ag414/ashdalestudio/CMOSLFOdetail_zpsbe7d680e.png) (http://s1374.photobucket.com/user/ashdalestudio/media/CMOSLFOdetail_zpsbe7d680e.png.html)
Been at the breadboard. Started the idea from scratch and came up with this. No waveshaping needed to get a Sine wave since the CMOS inverter doesn't seem to like pointy waves when biased to linear mode.

A variable DC bias can be injected via 1M to pin 1. This allows wave bending and the sine will readily turn into the so-called "hyper triangle". It does shift the frequency though.

Hmmm - 2 inverters left over. What could I make? Perhaps a cheeky little Tremolo?

Jim
Title: Re: Help understanding this CMOS oscillator
Post by: duck_arse on July 17, 2014, 08:42:38 AM
no no no, no cheeky. use the extra to invert the square and integrate again for outta phase triangles. will that work?

what is your circuits current draw, another? the elektor article noted 6V max and 18mA, or something.
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 17, 2014, 11:17:18 AM
A good idea but if you use another integrator, I think it would need a 2 gang Rate pot on the inputs to each so that the extra one tracks the existing one at all frequencies. You could drive this from the middle of the Trigger( Pin2) so it would be 180deg off? Or follow the existing integrator with the same thing as the last (Sine) stage but with equal value input and feedback resistors.

I think 60, 90 or 120 degree spread would be better for multiple LFO so you don't get that side to side seasick effect, but how to do that easily?
Simple phase shifts are easy - at fixed frequencies. But if you want to go from say 0.3 to 10Hz, well....

I'm thinking along the lines of counter/staircase circuits sequenced by a master counter to get  proper multiphase LFO's. Or program those AVR's I've got lying around ;)

I'll measure the current -  it is a concern if you want battery operation. The chip I've got (HEF4069UBE) seems warm, but it's been scorching hot here lately. It's not such a problem with the CMOS as an oscillator that's always running as it is with an audio circuit that's spending most of it's time sat at mid supply.

I've used these chips in Linear mode at over 12volt. It matters who made it. I think (ancient memory) it's Motorola (and second source from Hitachi) MC14069UB is one to avoid. They contain lower R(on) transistors and they will go up in smoke!
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 17, 2014, 02:09:54 PM
Current Consumption. Rounded up values.
Stopped = 10mA
Running = 20mA peak
@9VDC
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 19, 2014, 04:18:04 PM
(http://i1374.photobucket.com/albums/ag414/ashdalestudio/LFOantisines_zpse0dd5566.jpg) (http://s1374.photobucket.com/user/ashdalestudio/media/LFOantisines_zpse0dd5566.jpg.html)
Added a unity gain inverter after the sine to give antisine. Not too shabby as this is just from slightly clipping the CMOS and nothing more.
Title: Re: Help understanding this CMOS oscillator
Post by: No-Talent-Wanker on July 21, 2014, 08:22:03 PM
Hello, long time lurker but due to the fact that I am just an idiot that happens to be able to read electrical schematics (for the most part) I mostly don't have much to contribute.

Until I saw this...

My latest project is a ribbon controlled synth that is inspired by Tim Escobedo's "Synthstick" except the the ribbon controller is fashioned from copper slug repellent tape and and VHS tape and I'm using a CD4047 for the oscillator as opposed to the CD40106...

So, what has this got to do with helping you understand this CMOS circuit? Well, the raw square wave from the 4047 is really boring (and harsh) so I have been lurking for inspiration in the Lunetta's section on the Electro-Music.com forum (as well as here) looking for simple, low parts count wave shaping circuits and I just got through reading this thread:

http://electro-music.com/forum/topic-43897.html (http://electro-music.com/forum/topic-43897.html)

A little more than half-way down the page, DGTom posts a schemo of a linear State variable Filter and the idea "...but with the inverters replacing the op-amps."

On the second page of that thread is a schemo posted by Silesius and that circuit is similar to the one posted by the OP in that it has multiple waveform outputs... except it only uses 3 inverters and it's a VCF (and an oscillator) using only 1/2 of a 4069 and those mA sucking LED's are not to be found.

Any way, lots of discussion about what's going on in the circuit which may help set off light bulbs for y'all...

Back to lurk mode.
Title: Re: Help understanding this CMOS oscillator
Post by: commathe on July 21, 2014, 09:35:07 PM
This thread has made me really happy since I love CMOS so much. I haven't tried this myself but I've seen it a few times:

(http://www.hqew.net/files/Images/Article/Circuit_Diagram/Phase-Shift-Oscillator-with-Inverter-Gates.gif)

I believe this also puts out a sine
Title: Re: Help understanding this CMOS oscillator
Post by: duck_arse on July 22, 2014, 08:18:54 AM
Quote from: No-Talent-Wanker on July 21, 2014, 08:22:03 PM
Hello.
Back to lurk mode.

I have nothing (as usual) useful to add, except "^ that's a cracker of a name, best I've seen this week".

and anyone who hasn't yet read this, probably should:
http://www.fairchildsemi.com/an/AN/AN-88.pdf
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 22, 2014, 08:34:33 AM
For a synth, you need a a controlled oscillator.
The 3 inverter circuit above does indeed make a sine -  it's a phase shift oscillator. A standard idea but realized with the CMOS. ~it's major drawback is that it's hard to change the pitch from a single control over a useful range.

The basic CMOS Schmitt trigger oscillator on a 40106 (one cap & 1 resistor) does in fact produce 2 waveforms. There's a pretty good triangle wave on the input of this oscillator as well as the square wave from the inverter output. The Triangle is only about one third of the supply voltage in peak to peak amplitude. You can amplify the triangle but it must be with a high input impedance amplifier so as not to load the timing capacitor. I've already shown how a 4069 or 4049 un-buffered inverting amplifier can make a reasonable Sine from a Triangle simply by driving it partially into clipping. This sine shape can be varied by changing the gain (from the clean triangle all the way to square) . It's the same as with an inverting op-amp circuit -  gain = Rfeedback/Rinput.

The Schmitt oscillator can be "played" by varying a single element. Either the feedback resistor or the timing cap. The easiest way is to fit an LDR in series with a fixed timing resistor and have an LED on the LDR with the LED brightness controlling the pitch. You can also vary the pulse width by having a variable DC bias feeding the inverter input.

If instead of 40106 you use 4093 (quad Nand Schmitt), you can gate the oscillator on & off. Use another oscillator as the gate control and you can chop it from slow LFO thru to fast ring mod or oscillator sync effects.

The main complaint against the Schmitt trigger oscillators is poor stability. They are very sensitive to power supply voltage - but that's what voltage regulators are for. In fact you can make a disco drum by letting the supply voltage drop to zero. No don't!

Lots of fun on the breadboard - go to it!

Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on July 22, 2014, 08:45:18 AM
That AN88 is a copy of the National Semiconductors AN88 from their Linear Applications volume 2 (I have a Radio Shack edition - 2 dollars and ninety five cents). In case anyone's wondering, the 74C series were 4000 series CMOS with 74 series TTL compatible functions and pinout. I don't think they're around anymore?


Title: Re: Help understanding this CMOS oscillator
Post by: Mr. Lime on October 10, 2019, 04:44:26 AM
May someone have the frequency calculation of the CMOS LFO for me?
Can't find a formula anywhere..

Is there a significant output drop between the different waveshapes?
Thanks a lot!

(https://i.stack.imgur.com/JmdPy.png)
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on October 10, 2019, 05:11:05 PM
That's one of my concoctions. No way did I calculate anything. Designed on breadboard and tweaked until it worked how I wanted. However, its a standard type of oscillator really but done with inverters instead of op-amps.
It is hard to search for these things. There is no snappy descriptive name for this type. Many sources just call it a "Function Generator" which isn't exactly helpful. Then they tell you everything about it except the frequency formula, which is a well kept secret ;)

(https://www.physicsforums.com/attachments/funcgen-gif.163585/)
In the inverter version, 1/6.3RC, where R is R3+Vr1 and C is C1, might get somewhere close, but with these things, I've never known calc's to hold up to reality. But if it actually does 10Hz when the calc said 6Hz, at least it's in the right range and you know what kind of values your components need to be if not exactly.




Title: Re: Help understanding this CMOS oscillator
Post by: Rob Strand on October 10, 2019, 05:50:06 PM
(Jim's drawing: R1, R2, R = R3+VR1, C=C1)

Period,

T = 4* (R2/R1)  C R

Frequency,

f = 1/T

With Jim's values that calculates to 0.7Hz to 6.5Hz which agrees with the values on the schematic.

Title: Re: Help understanding this CMOS oscillator
Post by: Mr. Lime on October 10, 2019, 06:39:07 PM
Thanks a lot guys!

QuoteThat's one of my concoctions. No way did I calculate anything. Designed on breadboard and tweaked until it worked how I wanted. However, its a standard type of oscillator really but done with inverters instead of op-amps.
It is hard to search for these things. There is no snappy descriptive name for this type. Many sources just call it a "Function Generator" which isn't exactly helpful. Then they tell you everything about it except the frequency formula, which is a well kept secret ;)

Yeah I agree, as much as I love CMOS ICs, it's hard to find some useful reading.

I think a rough calculation is good enough and that helps a lot.
As some may have seen in my other posts I'm looking for available options for oscillators with wide range and this one looks very tasty and cheap.

According to the formula, replacing the cap gives us a nice range!

470n:  0,7Hz - 6,5Hz
47n: 7,8Hz - 65Hz
4n7: 78Hz - 650Hz
470p: 780Hz - 6k5Hz
100p: 390Hz - 3k7Hz
47p: 190Hz - 1k8Hz

If I did my math right..?
Are there any audible limitations to consider when the cap values are changed?
Title: Re: Help understanding this CMOS oscillator
Post by: Rob Strand on October 10, 2019, 06:51:29 PM
Quote470n:  0,7Hz - 6,5Hz
47n: 7,8Hz - 65Hz
4n7: 78Hz - 650Hz
470p: 780Hz - 6k5Hz
100p: 390Hz - 3k7Hz
47p: 190Hz - 1k8Hz

If I did my math right..?
Are there any audible limitations to consider when the cap values are changed?

Overall OK, but there's a small error in that you should add 1M and 120k for the low frequency side.

You might find the frequency starts to deviate from the calculations when the cap values are low, like 47pF.  That's because the gate capacitance and stray capacitances creep into the behaviour of the ckt.

At the high frequency side you might also see some deviations and perhaps some rounding off of the waveform.  If you see that try reducing the values of R1 and R2 but keep the R1/R2 ratio the same eg.  100k and 68k  but you might not need to go that low to kick it back into shape.
Title: Re: Help understanding this CMOS oscillator
Post by: Mr. Lime on October 11, 2019, 04:21:02 PM
QuoteOverall OK, but there's a small error in that you should add 1M and 120k for the low frequency side.

You might find the frequency starts to deviate from the calculations when the cap values are low, like 47pF.  That's because the gate capacitance and stray capacitances creep into the behaviour of the ckt.

At the high frequency side you might also see some deviations and perhaps some rounding off of the waveform.  If you see that try reducing the values of R1 and R2 but keep the R1/R2 ratio the same eg.  100k and 68k  but you might not need to go that low to kick it back into shape.

Of course, the 120k has to be included, you are absolutely right, Rob!

I wouldn't go lower than 100p but good to know where care has to be taken, thanks!

One last thing I'd like to add perhaps is a "resolution" control to pulse width modulate the square wave. This is essential for a bit crusher kind of circuit to me.
Haven't seen something like this with triangle or sine wave outputs included. The Parasit Studio New Wave Generator has such a circuit for it's square wave LFO using CMOS.

Is there anything speaking against something like this?



(https://i.postimg.cc/jL1M3JTF/Oscillator-CMOS.png) (https://postimg.cc/jL1M3JTF)
Title: Re: Help understanding this CMOS oscillator
Post by: Rob Strand on October 11, 2019, 06:42:10 PM
QuoteHaven't seen something like this with triangle or sine wave outputs included. The Parasit Studio New Wave Generator has such a circuit for it's square wave LFO using CMOS.

Is there anything speaking against something like this?
It's not quite what you want.   

When you feed square-wave into the "integrator part the input signal is always full level 0 or Vcc.  So when you have a diode circuit in there the diodes are always on or off.   The only things you have control of is resistance in series with the diodes and the fact you can choose different resistances for positive and negative diodes.

So as you have drawn the circuit, suppose the resolution pot is at one end.  One polarity will charge the integrator quickly through the lowest resistance part of R3 and the other will charge the integrator more slowly through the series combination of R3 and resolution pot.  Since both of those paths have resistances much lower than your timing resistors (R2 + RATE pot) you will find the Rate pot is ineffective.

If you look at the Parasit Studio New Wave Generator they use a switch so only one of the diode paths is effective at any one time, the other time the signal passes through the larger Rate pot resistance.   The have a coarse switch instead of a resolution pot.

I understand you want to use a single Resolution pot for the shape and a Rate pot for the frequency.  Unfortunately a solution isn't so simple.   In order to control the shape the Resolution pot needs to be the larger value pot. Imagine pulling your Rate pot and putting in a 1M Resolution pot.  The shape/duty control works fine but the problem now is the frequency is fixed!     

The ultra-simple solution is to put a different pot in each diode arm but that's really annoying to use.   Another simple solution is to keep the frequency pot wired as is, keep the switch, but put a pot in series with the diode arm.   This is a little easier to use.  A centre-off switch will let you keep the triangle shape.

There's another way where you feed DC into the point where R1 and R22 join but this method is only good when you want the waveform to be kind of trianglular.

Another way is to wire the resolution pot like you have now and the frequency pot like the CE2 does it,
Quotehttps://www.electrosmash.com/images/tech/ce-2/boss-ce-2-lfo-circuit.png

You will need to create a Vref.     I have a feeling if your Vref doesn't match the CMOS gate threshold it might not work that well.  Also the range of frequency adjustment is likely to be poor compared to the original circuit.

So I guess there's no easy solution with that circuit.    Each solution is a move in the right direction but none really working 100% as you like.   That's why Parasit Studio New Wave Generator did what they did.   

Things like the old 8038 function generator let you adjust the duty/shape independent of frequency but inside they use a completely different scheme.
Title: Re: Help understanding this CMOS oscillator
Post by: Mr. Lime on October 12, 2019, 10:21:45 AM
Thanks for those insights!

Indeed things getting to complicated for a CMOS Oscillator when it comes to Vref. Circuit wise it isn't elegant either having so many pots or switches and I guess a dual pot won't help?
I already discussed the ICL8038 somehow but can't find a useful formula for it's frequency output in relation to the pot on pin 8 in the datasheet.  Sure the 8038 has low parts count and fulfills the requirements. On ebay they are seller who carry them and I ordered 5 pieces but I have no idea if they are going to work..
There seem to be almost no guitar effect pedals using that chip so I have no references how to set them up correctly.


(https://i.postimg.cc/bdmHYbpR/LFO-8038.jpg) (https://postimg.cc/bdmHYbpR)
Title: Re: Help understanding this CMOS oscillator
Post by: Rob Strand on October 12, 2019, 05:56:32 PM
QuoteI guess a dual pot won't help?
I can't see an easy way.   What you want is to be able to do is set the two duty resistors using a Resolution pot, more or less like you had.    The problem is for frequency you want to scale *the value* of the Resolution.   but you physically can't do that.   Another angle is to change cap but trying to make that variable isn't so easy.

QuoteI already discussed the ICL8038 somehow but can't find a useful formula for it's frequency output in relation to the pot on pin 8 in the datasheet.  Sure the 8038 has low parts count and fulfills the requirements. On ebay they are seller who carry them and I ordered 5 pieces but I have no idea if they are going to work..
There seem to be almost no guitar effect pedals using that chip so I have no references how to set them up correctly.

There's some formulas on page 7,  (more info on page 10)
https://electronic-engineering.ch/radiocontrol/datasheets/xr8038.pdf

After looking at that data sheet  I'm afraid it might not do what you want either!    My apologies, after 30 years or so my memories of the chip details aren't as clear as they once were.

So if you look at figure 5 it has the variable duty scheme.    At the bottom of the left column on page 7,
"If the duty-cycle is to be varied over a small range about 50%, the connection shown in  Figure 5  is slightly more convenient."  In other words that scheme  has the same problems as the CMOS oscillator.

The circuit on fig 7 where the duty is set by resistors and the frequency set using a control voltage might work.  However, there's not a lot of info on the how the FMSI pin works.

I have a feeling the old XR datasheets and applications notes explained a lot more.   Let me see if I can find something.

So here's one note,
https://www.renesas.com/www/doc/application-note/an013.pdf
(more formulas in https://www.mit.edu/~6.331/icl8038data.pdf)

The first page says 100:1 range in frequency using voltage control.
Title: Re: Help understanding this CMOS oscillator
Post by: diffeq on October 13, 2019, 03:29:51 AM
Get a VCO with triangle output. Feed the triangle wave into a comparator, varying reference voltage will vary duty cycle of the comparator output. VCO will need a stable reference for Vc. Maybe 5V regulator or zener (buffered) can be used for that.

Fig. 32, p. 18 shows a simple enough VCO:
http://www.ti.com/lit/ds/symlink/lm2904-n.pdf
Title: Re: Help understanding this CMOS oscillator
Post by: ElectricDruid on October 13, 2019, 03:47:05 PM
Does it have to be single supply? (That schematic you posted for the 8038 was +/12V)

If you've got +/-12V, get a 3340 (AS3340 or V3340). It's got a triangle wave output, and a pulse output with variable width already. Pulse Width CV runs 0-5V on a +/-15V supply, so probably proportionally less on +/-12V.

Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on October 13, 2019, 04:43:26 PM
On breadboard at the moment, a 4046 VCO with 3Hz to 30kHz control range at 15v and 1Hz to 10kHz at 9v.
Title: Re: Help understanding this CMOS oscillator
Post by: ElectricDruid on October 14, 2019, 06:35:00 AM
Quote from: anotherjim on October 13, 2019, 04:43:26 PM
On breadboard at the moment, a 4046 VCO with 3Hz to 30kHz control range at 15v and 1Hz to 10kHz at 9v.

Lol, even the datasheet for the 4046 doesn't commit itself to any frequency range formula. They vary *so* much it's amazing. I've never used such a variable chip as that one. The differences from one to another are huge, and between different versions by different manufacturers, they can be as much as x10.

Since it was intended to lock to an incoming frequency, I suppose it didn't really matter. So it's our fault for trying to use it as a VCO!
Title: Re: Help understanding this CMOS oscillator
Post by: Rob Strand on October 14, 2019, 06:42:47 AM
QuoteLol, even the datasheet for the 4046 doesn't commit itself to any frequency range formula. They vary *so* much it's amazing. I've never used such a variable chip as that one. The differences from one to another are huge, and between different versions by different manufacturers, they can be as much as x10.
Back in the day I don't remember them being so bad but I do rememeber keeping the control voltage 0.7 to 1V (can't rememeber exactly)  from below supply rail and above ground ground.  Maybe that helps make the range more consistent.

FYI, one of the manufacturers had a graph of control voltage vs freq.
Title: Re: Help understanding this CMOS oscillator
Post by: Mr. Lime on October 14, 2019, 01:10:20 PM
So much input, I really appreciate that.

Too bad things aren't always that simple.
All this discussions about different waveshapes, resolution and frequencies got me thinking about Druid's VCDO.

It has a wide range, different wave shape outputs and a bit crusher section which I think is doing the resolution part..
If we take a guitar signal, form it into a gate and go into a 4046 PLL, the frequency of the VCDO oscillator can be determined by the guitar played note, right?


Maybe that's even more interesting sounding.
Title: Re: Help understanding this CMOS oscillator
Post by: anotherjim on October 14, 2019, 02:04:31 PM
I think the CD4046 is a bit crippled by using very weak MOSFET channels. Minimum Ron is relatively high and upsets the switching speed especially in the timing capacitor control and range of the control circuit. The different performance between brands of 4046 might be explained by differences in MOSFET geometry?

I've been having a go at bypassing some critical parts of the VCO.

Pin 9, 11 control MOSFET disabled by connecting both pins to 0v.
Frequency control by current sink out of pin12 only. This pin is usually left disconnected in most control schemes. To get a fine enough control, I'm using a Darlington PNP pair (x2 2N3906) controlled by a 10k trim pot across the supply, but this is obviously too crude other than for testing.

Internal N-channels used to discharge timing cap pins 6,7 assisted by NPN (2N3904) transistors controlled by the square wave from pin 4 and an inverted output from pin2 using the XOR phase comp. This speeds up the cap discharge helping the ramp wave on the timing cap maintain shape and amplitude and help match the pins6,7 waves if wanted to form saw/triangle waves. Without assistance, the internal arrangement clearly fails to completely discharge the cap at high frequencies.

Using 2 timing caps. One each of same value from pins 6 and 7 to 0v. This stops the negative-going pulse in the chip when the caps are discharging and again improves the ramp wave shape. The caps should be a good match for 50% duty cycle, although they can be different.

Schematic, and probably its own thread, when I'm done.
Yes, once again, I'm trying to polish a turd ;)


Title: Re: Help understanding this CMOS oscillator
Post by: Mr. Lime on October 16, 2019, 07:00:11 AM
Finding no peace of mind..  ;D

Taking a closer look at the Sonic Reducer circuit, there's a simple oscillator that's set up different as the common used LFO.
I saw this oscillator circuit was used to have triangle and squarewave outputs.
(https://synthnerd.files.wordpress.com/2018/12/LFO-for-synthnerd.jpg?w=479&h=333)
Details can be found here: https://synthnerd.wordpress.com/2018/12/31/synth-diy-the-relaxation-lfo/ (https://synthnerd.wordpress.com/2018/12/31/synth-diy-the-relaxation-lfo/)

I marked the section of the Sonic Reducer in red.
Any other problems to consider, if we take the unused inverter and buffer the triangle output?
(the 4066 switch has to be replaced by a transistor)

(https://i.postimg.cc/py3swLch/Sonic-Reducer-Triangle.png) (https://postimg.cc/py3swLch)
Title: Re: Help understanding this CMOS oscillator
Post by: Rob Strand on October 16, 2019, 06:33:51 PM
QuoteFinding no peace of mind.
The requirement of variable freq + variable duty + triangle makes life more difficult. 

You have to separate duty from frequency.   The case were the frequency is done using a voltage control, or a divider like the CE2 + duty control example I mentioned above, are really the best avenues.    The CE2+duty control case has the right structure but isn't so great in practice. So that leaves some sort of VCO + duty.

If you have a solution where the triangle level varies with frequency you could add some sort of leveling circuit make the level correct.   The crudest version of that would be a dual-gang pot which adjusts the gain!
Title: Re: Help understanding this CMOS oscillator
Post by: Mr. Lime on October 17, 2019, 04:42:12 AM
QuoteThe requirement of variable freq + variable duty + triangle makes life more difficult.

Haha, as long these are my worst problems in life, I'm fine  ;D

QuoteYou have to separate duty from frequency.   The case were the frequency is done using a voltage control, or a divider like the CE2 + duty control example I mentioned above, are really the best avenues.    The CE2+duty control case has the right structure but isn't so great in practice. So that leaves some sort of VCO + duty.

I thought the duty cylce control and frequency control were somewhat seperated in the Sonic Reducer schematic I attached as second. I guess the range of the CE-2 oscillator is way too small to really fit the bill..
Title: Re: Help understanding this CMOS oscillator
Post by: Rob Strand on October 17, 2019, 04:58:13 AM
QuoteHaha, as long these are my worst problems in life, I'm fine
:icon_mrgreen:

QuoteI thought the duty cylce control and frequency control were somewhat seperated in the Sonic Reducer schematic I attached as second.

Maybe that's the shot.  It gets around the need to use a triangle output directly.  I like solutions like that since they remove one of the problem areas.   The Schmitt level gets pretty small when the rate pot is at 1M but if it works, it works!