# Chaos machine Speedrate theory



## karelle (Aug 14, 2019)

Hi, 

juste finished to build the chaos machine, sounds great ! Still mounted on a carboard for the moment because i'm waiting for the well sized enclosure, but very cool pedal ! 
I was wondering if the speed rate could be slower than what is permitted for the moment. I check this schematic https://docs.pedalpcb.com/project/ChaosMachine-Schematic.jpg

I guess that the oscillation is created by the two cascading JRC4558 and i have two questions : 
- how is created those oscillations with 2 amplifiers and a capacitor ?
- is it possible by changing few components to have a slower speedrate ?

Thanks !


----------



## zgrav (Aug 14, 2019)

I suggest a google search using terms like "how to make LFO with IC" and you can find some forums and a couple of videos.   I am not sure how stable the LFO would be if you changed the values to give it a slower range.  There is some chance that a slower rate might stop the oscillation completely.  The LFO rate uses a 1M pot, and I think that more resistance raises the frequency.  When the rate pot is at its slowest point, it is only the resistance from R18 and R20 that are in that cascaded loop.  The question is whether you could lower the values of R18 (and maybe R20) to see if it give you any slower rate.  You could try it and see what happens and let us know.


----------



## Robert (Aug 14, 2019)

First I'd try increasing the value of R18.  

If that doesn't give the results you want, try increasing the value of C10.


----------



## karelle (Aug 15, 2019)

I tried to increase R18 but it shortened the course of the rate potentiometer.
So i tried to decrease R18, and It was pretty interesting : couldn't go slower but way faster, turning the LFO in an oscillator. 1kohm is fun.

I increase C10 by adding other capacitor in parallel. And it's the good path, I start reaching the speed i'm searching at 2,5uF. But I woud like to go way slower, like a 10secondes period LFO.

I search on google the theory about making oscilator with OpAmp, but I couldn't find this type of oscilator with the capacitor in the negative feedback loop. More precisely, i was looking for the formula of the frequency of the oscillation that could give the value of the capacitor i'm looking for ! 

Tomorrow i'll go to this sweet electronic shop, looking for higher capacitance, maybe something like that ? http://www.stquentin-radio.com/?page=info_produit&info=7992&color=3&id=0&act=0 ?

Thanks both of you for your advices, i'll let you know how it goes : )


----------



## zgrav (Aug 15, 2019)

sounds like some fun experimenting.  I did not realize the 1M resistance was the slow part of the range.     a 10 second LFO would certainly be interesting.  if you get it anywhere close to that range, share a sound sample if you can.  : ^ )


----------



## karelle (Aug 23, 2019)

Alright ! 
So I couldn't find any formula to calculate the frequency range of the VCO.

In fact I couldn't find any VCO with Capacitor in the Negative Feedback loop, any link or theory to feed me ?

But, I found experimentaly the value of R18 and C10.

So if you want a real slow LFO, in a kind of psychedelic vibe, making slowly move your sound, you can use a 2.2u and 4.7u film capacitor in parallel.

And for R18 i choosed, 10k.

I'll share a sample !


----------



## zgrav (Aug 23, 2019)

Congrats of finding a tone you like.  If you wanted to have more options you could use a toggle switch to take one of those caps in or out of the circuit, giving you a fast/slow toggle switch.  Looking forward to hearing the sample!


----------



## Chuck D. Bones (Aug 27, 2019)

Here's how the LFO works.  It's kinda long-winded, but trust me, this is the short explanation.  If all you want to know is the formula for the frequency, you can skip the first two paragraphs.

IC4.1 is a schmitt trigger.  It's a comparator with two thresholds, determined by the power supply, Vref_B, R19, R20 and the present state of IC4.1's output.  IC4.2 is an integrator.  Its output ramps up or down linearly at a rate determined by the RATE pot, R18 & C10.  The transfer function of a capacitor is i = C * dv/dt.  Where i is the current flowing thru the capacitor and dv/dt is ramp rate of the capacitor voltage.  The current in the cap (C20) is the same as the current flowing thru the RATE pot & R18. For simplicity, we'll call R18 + RATE = R.  Since the output of IC4.1 is lightly loaded, we can assume that the output swings very close to the rails (0V & +9V).  Vref_B is at 4.5V.  That means the voltage across R is either +4.5V (when IC4 pin 1 is at +9V) or -4.5V (when IC4 pin 1 is at +0V).  The current in R is ±4.5V / R.  When IC4 pin 1 is at +9V, the current is positive and the voltage at IC4 pin 7 ramps in the negative direction.  When it hits the lower threshold of IC4.1, the output of IC4.1 switches to ground.  Now the current in R is negative, so the voltage at IC4 pin 7 ramps in the positive direction.  When it hits the upper threshold of IC4.1, the output of IC4.1 switches to +9V and the process repeats.  The waveform at IC4 pin 7 is a triangle wave with an amplitude determined by IC4.1's thresholds.

IC4.1 will switch whenever pin 3 crosses 4.5V.  We can calc what the voltage at IC4 pin 7 will be when IC4 pin 3 is at 4.5V.  There are two solutions: one when IC4 pin 1 is at 0V and one when IC4 pin 1 is at 9V.  We'll do the 0V case first.  When pin 1 is at 0V and pin 3 is at 4.5V, the current thru R19 is 4.5V / 100K = 45uA.  Since no current flows in or out of pin 3 (there is a tiny bit of current, but not enough to matter), the current in R20 is also 45uA.  That makes the voltage across R20 45uA * 68K = 3.06V.  The right-hand end of of R20 is at 4.5V and the current is flowing left-to-right, so the left-hand end of R20 is at 4.5V + 3.06V = 7.56V.  Because Vref_B is half-way between the rails, the thresholds for IC4.1 are symmetrical.  That means that the other switching threshold is 4.5V - 3.06V = 1.44V.  The difference between the thresholds is DV = 2 * 3.06V = 6.12V.  
Another way to calc DV is DV = 9V * R20 / R19.

Here's how we get a formula for frequency:
The time it takes C10 to ramp up and back down again (one cycle) is T = 2 * C10 * DV / i
The current in R is i = 4.5V / R.  Sub DV and i into the equation for T.
T = 2 * C10 * 9V * R20 / R19 / (4.5V / R)
Rearranging, we get T = 4 * C10 * R20 / R19 * R
Frequency F = 1 / T = R19 / (4 * C10 * R * R20)
When the RATE pot is at min resistance, R = 47K.  When the RATE pot is at max resistance, R = 1047K.  
The max freq is F = 100K / (4 * 1uF * 47K * 68K) = 7.8Hz
The min freq is F = 100K / (4 * 1uF * 1047K * 68K) = 0.35Hz

So how do we change the frequency range?
Changing R19 or R20 will change the amplitude of the triangle wave, so we don't want to mess with those.  We probably don't want to change out the RATE pot.  The ratio of R18 to the resistance of the RATE pot sets the ratio of max to min freq.  Also, we can't make R18 too small or it will load the outputs of IC4 too much at the max RATE setting.  That leaves C10 as the best way to change the frequency range.  There are practical limits on how big we can make C10.  Electrolytic caps leak too much current to work in this circuit.


----------



## zgrav (Aug 27, 2019)

Nice explanation.  Thanks for walking through it.


----------



## karelle (Sep 9, 2019)

Wow, perfect explanation, Thanks Chuck !

I definitely saved all your answer for my next encounter with a lfo : )


----------

