Calculating R, C & maximum input current of Oscillator Circuit

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
I have been trying all day to understand how either one of value C1, Rs2 or the maximum input current was initially calculated. I have worked out the equations however it seems that there is no obvious starting point, every equation needs a value of either Rs2, C1 or the maximum input current. What value can be determined first? I think it might be the maximum input current, but again I can't see any obvious way to state its expected value. I have read on a few forums that the audio range oscillates typically around 0.25uF to 0.25mA in a standard oscillator. So I could use 0.25mA, but I that isn't a very accurate method, since surely the maximum current its dependant to the circuit design. Any ideas? what it have something to the with the TL084 data sheet ?

Design Specs:
Frequency Range: 20Hz - 2000Hz
Voltage range of V7: 0v - 5V

[Screen Shot 2018-04-01 at 19.07.57.pngScreen Shot 2018-04-01 at 19.28.05.png
 

Hymie

Joined Mar 30, 2018
1,003
I have been trying all day to understand how either one of value C1, Rs2 or the maximum input current was initially calculated. I have worked out the equations however it seems that there is no obvious starting point, every equation needs a value of either Rs2, C1 or the maximum input current. What value can be determined first? I think it might be the maximum input current, but again I can't see any obvious way to state its expected value. I have read on a few forums that the audio range oscillates typically around 0.25uF to 0.25mA in a standard oscillator. So I could use 0.25mA, but I that isn't a very accurate method, since surely the maximum current its dependant to the circuit design. Any ideas? what it have something to the with the TL084 data sheet ?

Design Specs:
Frequency Range: 20Hz - 2000Hz
Voltage range of V7: 0v - 5V

[View attachment 149576View attachment 149577
You cannot analyse the circuit in terms of the output frequency, although the current through the capacitor is constant – as a result, the voltage across the capacitor is changing at a constant rate.


The operation of the op-amp is such that the inverting input (pin 2) can be considered as a virtual earth (due to the non-inverting input being held at 0V).

Therefore the current passing through the resistor (Rs2) and capacitor C1 are equal.

In terms of the current through the resistor this equals V7/Rs2

The current through the capacitor C1 equals (dVout/dt) x C1

Therefore for your circuit: V7/Rs2 = - (dVout/dt) x C1

Or Vout = 1/(Rs2 x C1). Integ (V7.dt)

To put it another way, the output is a ramp falling at a rate of V7/(Rs2 x C1) volts per second.

On a practical note, the above calculation has nothing to do with the type/model of op-amp used.

To minimise any issues with input bias currents to the op-amp, the impedance at pins 2 and 3 should be equal; therefore your circuit should be modified such that pin 3 is connected to 0V via a resistor of value Rs2.
 

Veracohr

Joined Jan 3, 2011
761
Capacitors have fewer standard values than resistors so a good approach would be to choose a capacitor first. If current draw is a concern then you might need to do a few iterations of calculation, changing the capacitor value, to arrive at an acceptable level.
 

Hymie

Joined Mar 30, 2018
1,003
Capacitors have fewer standard values than resistors so a good approach would be to choose a capacitor first. If current draw is a concern then you might need to do a few iterations of calculation, changing the capacitor value, to arrive at an acceptable level.
With your circuit shown having V7 at 39mV to achieve the output you want, I would calculate values for Rs2 and C1 based on the V7 voltage being around 1V. This will then allow a considerable range of output ramp rates, with the voltage adjusted between 0.1V – 9V.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
With your circuit shown having V7 at 39mV to achieve the output you want, I would calculate values for Rs2 and C1 based on the V7 voltage being around 1V. This will then allow a considerable range of output ramp rates, with the voltage adjusted between 0.1V – 9V.
The problem is, the value for V7 (39mv on this example) actually varies, as well the frequency of v1. The amount of current that it varies by, or the maximum is dependant on the values of r and c. So I need to calculate either C or R before I can show there’s values. Or I can calculate the maximum currents however I am not sure how this can be done
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Capacitors have fewer standard values than resistors so a good approach would be to choose a capacitor first. If current draw is a concern then you might need to do a few iterations of calculation, changing the capacitor value, to arrive at an acceptable level.
What do you mean by a few iterations of calculation? What factors (aside from the current and resistor) would determine a good value ?
 

Hymie

Joined Mar 30, 2018
1,003
The problem is, the value for V7 (39mv on this example) actually varies, as well the frequency of v1. The amount of current that it varies by, or the maximum is dependant on the values of r and c. So I need to calculate either C or R before I can show there’s values. Or I can calculate the maximum currents however I am not sure how this can be done
Based on the circuit giving you approximately the output you want with V7 at 39mV and the output being a ramp falling at a rate determined by V7/(Rs2 x C1) volts per second. If V7 is set at 1V (increased by a factor of 25), then if the capacitor value is increased by a similar factor (to 22nF) – the ramp rate will be similar.

I suggest you build the circuit with the above values and observe how the op-amp output voltage ramp rate changes with changes in the value of V7.

You state that the 39mV (V7) varies – yet it is shown as a fixed value in your schematic.

As already explained, the inverting input of the op-amp (pin 2) can be considered as a virtual earth and therefore the current drawn from the voltage source V7 is given by V7/Rs2. The current passing through the capacitor C1 is supplied by the op-amp output (not V7).
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Based on the circuit giving you approximately the output you want with V7 at 39mV and the output being a ramp falling at a rate determined by V7/(Rs2 x C1) volts per second. If V7 is set at 1V (increased by a factor of 25), then if the capacitor value is increased by a similar factor (to 22nF) – the ramp rate will be similar.

I suggest you build the circuit with the above values and observe how the op-amp output voltage ramp rate changes with changes in the value of V7.

You state that the 39mV (V7) varies – yet it is shown as a fixed value in your schematic.

As already explained, the inverting input of the op-amp (pin 2) can be considered as a virtual earth and therefore the current drawn from the voltage source V7 is given by V7/Rs2. The current passing through the capacitor C1 is supplied by the op-amp output (not V7).
Apologies, the schematic was only uploaded to help get an idea of the project. I am
Trying to understand it from a design perspective, following these specs:

Known values at max range:
V7 = 5 volts
Ramp output = 5V after 1/2000 seconds

Unknown values:
Resistor Rs2
Capacitor c1
Suitable max input current

So I want to understand the reason for choosing one of these values initially before then calculating the remaining. Could it be to do with the time constant? As I know the input voltage and the desired output voltage, as well as the time wanted to get there. Would there be an equation for this? And I guess from there I can pick RS2 and C1 Equate for the desires time constant equation.

T = RC

I just need to work out what the time constant is, any ideas?
Thanks
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
So using your technique, the resistor value has already been chosen. However this is not the case, since there is no reason for choosing that value expect for what is already given in the circuit. Am I missing something? I am sure there is something obvious that I haven’t grasped. Maybe the maximum current is important ?
 

Hymie

Joined Mar 30, 2018
1,003
So using your technique, the resistor value has already been chosen. However this is not the case, since there is no reason for choosing that value expect for what is already given in the circuit. Am I missing something? I am sure there is something obvious that I haven’t grasped. Maybe the maximum current is important ?
Based on the figures you have provided:-
V7 = 5V
Ramp = 5V @ 1/2000 second
Find values for Rs2 and C1

A delta of 5V in 500uS is equivalent to 10,000V/s

Using the equation V7/(Rs2 x C1) = 10,000V/s

We get 5V/(Rs2 x C1) = 10,000V/s

Transposing gives Rs2 x C1 = 0.0005s

So you can choose any reasonable value for Rs2 and find C1

If we leave the resistance as is at 220K ohm, then C1 = 2.27nF

The current supplied from V7 (at 5V) will be 22.7 micro amps.

One further observation on the circuit – you mention that V7 is an ac signal; if this is the case and the ac waveform goes negative, then the integrated output of the op-amp will become a rising voltage ramp. I suggest you place a scope on V7 to see exactly what the input is.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Based on the figures you have provided:-
V7 = 5V
Ramp = 5V @ 1/2000 second
Find values for Rs2 and C1

A delta of 5V in 500uS is equivalent to 10,000V/s

Using the equation V7/(Rs2 x C1) = 10,000V/s

We get 5V/(Rs2 x C1) = 10,000V/s

Transposing gives Rs2 x C1 = 0.0005s

So you can choose any reasonable value for Rs2 and find C1

If we leave the resistance as is at 220K ohm, then C1 = 2.27nF

The current supplied from V7 (at 5V) will be 22.7 micro amps.

One further observation on the circuit – you mention that V7 is an ac signal; if this is the case and the ac waveform goes negative, then the integrated output of the op-amp will become a rising voltage ramp. I suggest you place a scope on V7 to see exactly what the input is.
]

Thank you that is really helpful, where did you get the delta from, is it an equation ?
Based on the figures you have provided:-
V7 = 5V
Ramp = 5V @ 1/2000 second
Find values for Rs2 and C1

A delta of 5V in 500uS is equivalent to 10,000V/s

Using the equation V7/(Rs2 x C1) = 10,000V/s

We get 5V/(Rs2 x C1) = 10,000V/s

Transposing gives Rs2 x C1 = 0.0005s

So you can choose any reasonable value for Rs2 and find C1

If we leave the resistance as is at 220K ohm, then C1 = 2.27nF

The current supplied from V7 (at 5V) will be 22.7 micro amps.

One further observation on the circuit – you mention that V7 is an ac signal; if this is the case and the ac waveform goes negative, then the integrated output of the op-amp will become a rising voltage ramp. I suggest you place a scope on V7 to see exactly what the input is.

Wow thank you, that completely answered my question! No V7 isn't a AC signal, it is actually a DC signal from a DAC which is connected to a microcontroller. The micro-controller is then connected to a music keyboard, used to change the DC voltage. The DC is planned to go from nearly 0V to DAC maximum of 5V. I am building this tomorrow hopefully and just wanted an understanding of the values.

One note, is the RC actually equal to the time constant in this case? Therefore the capacitor only manages to charge to 1T?
 
Last edited:

Hymie

Joined Mar 30, 2018
1,003
]

Thank you that is really helpful, where did you get the delta from, is it an equation ?



Wow thank you, that completely answered my question! No V7 isn't a AC signal, it is actually a DC signal from a DAC which is connected to a microcontroller. The micro-controller is then connected to a music keyboard, used to change the DC voltage. The DC is planned to go from nearly 0V to DAC maximum of 5V. I am building this tomorrow hopefully and just wanted an understanding of the values.
The delta of 5V in 500us, is the same as 5V in 1/2000 second.
 

Hymie

Joined Mar 30, 2018
1,003
The delta of 5V in 500us, is the same as 5V in 1/2000 second.
RC is not a time constant in the normal sense of the term in this circuit.
The voltage V7 combined with the resistor Rs2 is determining the [constant] current that is being applied to C1 – resulting in the linear ramping voltage across the capacitor.

As the voltage V7 varies, so will the current applied to C1 (changing the rate of voltage change).

Without the fet Q1 shorting capacitor C1 at the required interval, the output of op-amp U2A would drive into the negative voltage rail.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Thank that is very helpful, can I also ask. Would this circuit need some sort of amplifier if I wanted to connect say a 8 ohm, 0,3 w speaker? Or anything larger? Of so what size ?
 

Hymie

Joined Mar 30, 2018
1,003
Thank that is very helpful, can I also ask. Would this circuit need some sort of amplifier if I wanted to connect say a 8 ohm, 0,3 w speaker? Or anything larger? Of so what size ?
increased current output.jpg
You’ll never learn anything if you are spoon fed the solutions – anyway here is a basic circuit used to obtain an output capable driving a speaker (or other higher current loads). I’ll let you work out the component values suitable for your circuit.

Note that the op-amp feedback is taken from the common emitter point of the output transistors – this arrangement avoids crossover distortion that would otherwise exist if the feedback were taken from the op-amp output.

The circuit is from my ancient op-amp cookbook – note that there is an error in the circuit in that the collector of the PNP transistor should be –Vcc and not –Vout.

One other piece of advice when using such a circuit to drive a speaker, although the output may nominally be centred around 0V - to avoid any dc offset being fed to the speaker, place a capacitor of suitable value in series with the speaker.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
View attachment 149931
You’ll never learn anything if you are spoon fed the solutions – anyway here is a basic circuit used to obtain an output capable driving a speaker (or other higher current loads). I’ll let you work out the component values suitable for your circuit.

Note that the op-amp feedback is taken from the common emitter point of the output transistors – this arrangement avoids crossover distortion that would otherwise exist if the feedback were taken from the op-amp output.

The circuit is from my ancient op-amp cookbook – note that there is an error in the circuit in that the collector of the PNP transistor should be –Vcc and not –Vout.

One other piece of advice when using such a circuit to drive a speaker, although the output may nominally be centred around 0V - to avoid any dc offset being fed to the speaker, place a capacitor of suitable value in series with the speaker.

Thank you, and would the name of this circuit be called an audio amplifier? I will work out the component values today :)
 

Hymie

Joined Mar 30, 2018
1,003
Thank you, and would the name of this circuit be called an audio amplifier? I will work out the component values today :)

To control the volume of the amplifier output – the input should be taken from the wiper of a potentiometer (say 47k ohm) such that the input can be varied from 0 to 100% of the signal from your ramp circuit (you could even replace Rs6 with a potentiometer with the wiper feeding the amplifier).

The output of your circuit is already de-coupled by capacitor C3 – so there is no need to include a capacitor at the input to the amplifier circuit.

Since your ramp circuit output signal is from 0V to the negative rail, I would estimate that a gain of 10 for the amplifier to be adequate.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
To control the volume of the amplifier output – the input should be taken from the wiper of a potentiometer (say 47k ohm) such that the input can be varied from 0 to 100% of the signal from your ramp circuit (you could even replace Rs6 with a potentiometer with the wiper feeding the amplifier).

The output of your circuit is already de-coupled by capacitor C3 – so there is no need to include a capacitor at the input to the amplifier circuit.

Since your ramp circuit output signal is from 0V to the negative rail, I would estimate that a gain of 10 for the amplifier to be adequate.
Thank you, I am trying to simulate the circuit now. Would the TL084 be sufficient? or would I need to use something more suitable like a LM386.
 

Hymie

Joined Mar 30, 2018
1,003
Thank you, I am trying to simulate the circuit now. Would the TL084 be sufficient? or would I need to use something more suitable like a LM386.

Any old op-amp will do - including a 741.

The sound output of the amplifier will be modified by your ramp circuit in the following ways:-

Increasing the voltage V7 will cause the sound to be louder (for a given frequency of voltage V1), in that the voltage ramp (from 0V) will be greater. The frequency of the output will be dependent on the frequency of voltage V1; but as the frequency increases, the time allowed for the voltage ramp will decrease (reducing the volume).

I guess if both the frequency of voltage V1 and the voltage V7 are randomly varying, you will hear a sound varying in both frequency and amplitude – with a tendency for a reduced output volume at higher frequencies (for the reasons explained above).

With a specified frequency range from 20Hz – 2kHz, I would check the specification of your proposed 0.3W speaker – most cheap small speakers have a cut off of 50Hz or more.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Any old op-amp will do - including a 741.

The sound output of the amplifier will be modified by your ramp circuit in the following ways:-

Increasing the voltage V7 will cause the sound to be louder (for a given frequency of voltage V1), in that the voltage ramp (from 0V) will be greater. The frequency of the output will be dependent on the frequency of voltage V1; but as the frequency increases, the time allowed for the voltage ramp will decrease (reducing the volume).

I guess if both the frequency of voltage V1 and the voltage V7 are randomly varying, you will hear a sound varying in both frequency and amplitude – with a tendency for a reduced output volume at higher frequencies (for the reasons explained above).

With a specified frequency range from 20Hz – 2kHz, I would check the specification of your proposed 0.3W speaker – most cheap small speakers have a cut off of 50Hz or more.
V1 and V7 vary in sync, V1 sets the frequency of the output ramp wave by sending a reset pulse, the speed at which it is reset depends on the timer value sent by a microcontroller, (connectect to a midi device). subsequently, the V7 is set so that it charges the capacitor at a rate so that an amplitude of 5v is produced just before reset is sent to V7. Therefore the output amplitude Is at a constant 5V, even when the frequency varies. My design above already has 2 free TL084 on the IC, so if there is no downside to using them. Then I guess it would make sense to save space no? also, is the LM386 just a IC of the LIN topology you displayed? if so, would it not make sense to use this ?
 
Top