2
\$\begingroup\$

I want to make a way to control the high time with a control voltage, instead of using a variable resistor.

For this I have found this diagram with an op-amp, and I have tested it in Multisim (a simulation tool for electronics.) It seems to do some kind of PWM.

I can't figure out how it works and the formulas that I have found to calculate the high and the low time (from this website) don't seem to match the simulation.

Can somebody help understand the circuit and help me with calculating the high and the low time?

MAX998 datasheet

enter image description here

\$\endgroup\$
10
  • 4
    \$\begingroup\$ That is an opamp in only a very technical sense. Are you familiar with comparator circuits? A quick brush-up on comparators and RC time constants should tell you everything you need to know about this circuit. \$\endgroup\$ Commented Apr 6, 2021 at 13:55
  • 4
    \$\begingroup\$ calculate the high and the low time don't seem to match the simulation. Many beginners already complain when the calculation says 10 ms but the simulator says 10.2 ms. So what are all the numbers you get? Only if there's a difference of more than 20% is it worth discussing what went wrong. I am not that well versed in op amp circuits Then read: Opamps for Everyone: web.mit.edu/6.101/www/reference/op_amps_everyone.pdf also, read the datasheet of the MAX998, is it an opamp or something else? Since this is not an opamp, things actually become much simpler! \$\endgroup\$ Commented Apr 6, 2021 at 14:05
  • 1
    \$\begingroup\$ Try to read this electronics.stackexchange.com/questions/465430/… is this any help? \$\endgroup\$
    – G36
    Commented Apr 6, 2021 at 14:09
  • 1
    \$\begingroup\$ I would simulate this with a voltage controlled voltage source, gain = 10000, min. output voltage = 0 V and max. output voltage = 5 V. That way I'm completely independent of any weird behavior of the IC's model I do not know of. I can always put in a "real" opamp/comparator later to see what changes. But yeah, that's just me and how I work. \$\endgroup\$ Commented Apr 6, 2021 at 14:15
  • 1
    \$\begingroup\$ Do you know how to calculate the upper and the lower threshold voltage (the voltage at "+" input)? \$\endgroup\$
    – G36
    Commented Apr 6, 2021 at 14:42

1 Answer 1

4
\$\begingroup\$

Okay, the basic function of this circuit is as an oscillator. The frequency and the duty cycle both vary with the input voltage. Maximum frequency is at Vin = 2.5V where the duty cycle is 50%. I'm just stating that.

The capacitor charges or discharges through R3 toward Vout of the comparator (which we can reasonably approximate with either 0V or 5V in this particular case of the MAX998 with the relatively high resistor values given (datasheet says typical 0.1V drop with 2mA current).

So let's calculate the thresholds as a function of the input voltage:

It's just a voltage divider, the voltage at the non-inverting input of the comparator is

Vp = Vin/2 + Vout/2, or Vin/2 + 2.5V for the capacitor charging and Vin/2 for the capacitor discharging.

Note that the common mode voltage range of this particular comparator is only up to 5V - 1.2V = 3.8V, above which the output is "unpredictable" unless at least one of the inputs is within CM input range.

So we may conclude that the maximum input voltage for reliable operation is 2.6V using the MAX998. This will limit the maximum reliable "on" duty cycle. The input common mode voltage extends a bit below ground so we can apply an input slightly below ground to get 0% duty cycle.

Now, we only have to calculate the time it takes to charge/discharge between the two threshold voltages as a function of the input voltage. Sadly, the equations in the EDN article you linked seem to have some problems such as unmatched parenthesis.

Given that voltage v(t) of a capacitor being charged from Vi towards Vf is

v(t) = Vi + (Vf - Vi)(1-exp(-t/tau))

I get for charge and discharge times:

tc = -\$\tau\ln(1- \frac{5}{10-V_{IN}}) \$

td = -\$\tau\ln(1- \frac{5}{5+V_{IN}}) \$

where \$\tau\$ = RC

So the maximum frequency (when Vin = 2.5V) is about 0.455/RC

We can calculate the maximum duty cycle with Vin = 2.6V, and it's about 51%.

And the frequency with Vin = 0.1V is about 0.22/RC with a duty cycle of about 15%.

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.