Page 1 of 2

help with op amp circuit

Posted: Fri Aug 22, 2008 8:11 pm
by trident
working on a circuit to control 3-wire brushless fan with INTEL 4-wire fan PWM signal.
is their a way to set a minimum fan voltage by adding a zener diode or voltage divider ?
comments, suggestions
Image

Posted: Sat Aug 23, 2008 3:40 am
by MrAl
Hi there trident,


Here are two circuits that do what you want. For the example circuits
both circuits put out a min of 5v and go up to about 10v or so (limit
of the LM317 with 12v input).

The first circuit takes a voltage change at pin 3 of U1 of 0v to 5v
and converts it to an output of 5v to 10v, which means you can reduce
the gain in the first op amp stage if you like.

The second circuit takes the input of 0v to 10v at pin 3 of U1, but does
nothing for 0v to 5v, and then after 5v it starts to raise the output so
you end up with 5v output for 0v to 5v input (U1-3) and 5v to 10v
output for 5v to 10v at U1-3.

Note also the added protection diode across the LM317.

Note also it may be possible to get a higher output voltage
(closer to the full 12v) if a transistor is used instead of the
LM317.

Image

Posted: Sat Aug 23, 2008 5:44 am
by trident
Thank You for your reply MrAl
This circuit will be used inside a PC so thermal drift is important, if I may impose, which method will be more temperature stable ? I am using the LM317 for short-circuit protection, the extra 1 volt or so I would gain by using a pass transistor is not critical as I can select a higher RPM fan and still get sufficient cooling.

Thanks again

Posted: Sat Aug 23, 2008 6:45 am
by MrAl
Hi Trident,


Either circuit should be ok temperature wise for simply driving a fan,
although Circuit 2 is a tiny bit better because it does not rely on a
zener whos temperature characteristic may vary a bit.

I really bet it wont matter for a fan though, but if you are really
worried about it perhaps you can sample the output voltage of
the LM317 (across the fan itself) with the micro controllers ADC
and compensate with the PWM as needed. This is just another
idea if you happen to have an extra i/o pin and an onboard ADC
unit in your uC.

Posted: Sat Aug 23, 2008 7:31 am
by trident
Hello again
Thank you for the divider example MrAl
Here is the revised circuit, I put in the variable resistor so the minimum fan voltage can be tuned.
Your resistor values seem a bit low, is not the adjust current on the LM317 100 uA ?

Thank You, trident
Image

Posted: Sat Aug 23, 2008 8:16 am
by MrAl
trident wrote:Hello again
Thank you for the divider example MrAl
Here is the revised circuit, I put in the variable resistor so the minimum fan voltage can be tuned.
Your resistor values seem a bit low, is not the adjust current on the LM317 100 uA ?

Thank You, trident
Image

Hi Trident,

Yes, the resistor values are low and that is to keep the change in bias
current with temperature from affecting the output voltage by more than
something like 1 percent as well as keep the minimum required load
on the LM317 at all times. Slightly higher values wont matter too much
with just a fan, and the min load is probably always met too with such a
fan, but i would not want to go too high. Even better would probably be
a 1k pot with a 220 ohm resistor for the adjust network, or possibly
for even better temperature tracking just the 1k pot itself, carefully
adjusting to around 1/2 travel before assembly.

You can study the effect of the bias current change with temperature
on your circuit by looking at the data sheet and noting the change
over the temperature range and calculating the output voltage at
temperatures of maybe 0 deg C and maybe 80 deg C. This will
tell you the output voltage swing with a given resistor network
(pot and resistor or just pot alone set to a given value). The
data sheet gives the output voltage formula knowing the two
resistor values and the bias current. After doing the calculations
you may find that 5k is acceptable too, and for just a fan it
most likely will be.

Posted: Sat Aug 23, 2008 11:40 am
by trident
Hello MrAl
If I may impose, one last question and I shall leave you in peace.
With the Zener solution, Is the wattage of the Zener critical ?

Thank You very much for your time, expertise and patience

trident

Posted: Sun Aug 24, 2008 3:12 am
by MrAl
trident wrote:Hello MrAl
If I may impose, one last question and I shall leave you in peace.
With the Zener solution, Is the wattage of the Zener critical ?

Thank You very much for your time, expertise and patience

trident

Hi Trident,

The zener wattage is not critical, but a low wattage type would work
best due to the lower bias current being used. In fact, the zener
might even work better with a resistor lower than 10k (10k shown)
to get the bias current a little higher.

I almost forgot to mention that i assume the pinout of the LM317
in the schematics we drew is like this:

3: input
2: output
1: adjust


You are welcome, and i hope you make out ok with this circuit.
Let us know how it all works out if you can.

Take care for now...

Posted: Sun Aug 24, 2008 3:13 pm
by MrAl
Hi again,


I posted the above reply and then realized that this question comes
up quite a bit on the web so decided to create a chart showing
the effect of the temperature variation on the output voltage
setting with various size resistors where R1 is allowed to vary
and R2 is calculated at room temperature to set the output at
exactly 10.000 volts. As the temperature swings from a minus
extreme to a positive extreme the bias current changes and that
affects the output voltage as shown in the chart below.

In this chart, Vo is the output voltage set point at room temperature,
VoP is the voltage that is obtained when the temperature rises to
a positive extreme, and VoM is the output voltage that is obtained
when the temperature drops to a minus extreme, and the last
column 'Dev' is the max deviation of the output voltage over
the full temperature range.
R2 shown is the calculated value to set Vo=10.000 volts.

Note as the resistor R1 rises (and of course the value of R2 must
rise also to keep the output at 10.000 volts at room temperature)
the 'Dev' deviation in output voltage rises also, As can be seen in
the chart, with R1=2000 ohms the deviation is 10 times that as with
R1=200 ohms, which shows that lower is better.
As noted earlier, for a fan driving application however 0.15v deviation
probably wont make too much difference anyway in the fan speed,
unless the fan speed must be maintained at some accurate level,
and in such case there should probably be some direct feedback from
the fan, current measurement, or at least voltage measurement.

Here is the chart...



Code: Select all

LM317 output voltage set for 10.000 volts, choosing various R1
and calculating R2, with max temperature variation bias current
change of +/- 6ua from 50ua normal.

 R1      R2      Vo      VoP     VoM    Dev
----- --------  ------  ------  -----  -----
  200   1401.6  10.000  10.008  9.992  0.017
  400   2781.0  10.000  10.017  9.983  0.033
  600   4138.6  10.000  10.025  9.975  0.050
  800   5475.0  10.000  10.033  9.967  0.066
 1000   6790.7  10.000  10.041  9.959  0.081
 1200   8086.2  10.000  10.049  9.951  0.097
 1400   9361.8  10.000  10.056  9.944  0.112
 1600  10618.2  10.000  10.064  9.936  0.127
 1800  11855.6  10.000  10.071  9.929  0.142
 2000  13074.6  10.000  10.078  9.922  0.157

Posted: Sun Aug 24, 2008 3:22 pm
by trident
Hello

Yes that is the correct pin out on the 317.
The 120mm fan I want to use will not start reliably at 5 volts so I will use a 6.0V, 0.5W (1N5233B) zener. I need to look through my spare parts and see what I need to order and then find my trusty Global Specialties breadboard.

Thank You

trident

Posted: Mon Aug 25, 2008 4:27 am
by MrAl
Hi Trident,


Oh that's ok, you're welcome.

So you decided to go with the zener solution instead of the two resistor
solution? That's good too.

Please let us know how it works out...

Posted: Sat Nov 08, 2008 7:14 pm
by trident
Hello

I have the project on breadboard now and found I needed to reduce the value of the zener resistor [R6] from 10K to 1.2K to get the zener into the breakdown region.
I replaced the LM317 with an LM1117 and do not need the protection diode, but the capacitor values had to be increased.
I also discovered that the input signal needs a 3.3 volt pull up to function correctly. I could use some help with that. What if any zener series would be better than the BZX79 with the small load currents in this circuit?
Image

Posted: Sun Nov 09, 2008 9:26 am
by MrAl
Hi again,


What help do you need with the pullup?

That diode doesnt seem too bad, why dont you want to use that
one?

Posted: Sun Nov 09, 2008 10:36 am
by trident
Pin 4 of J1 cannot source more than 5mA with a supply voltage of 13.2 volts, the 2.2K pull up resistor [R2] takes care of that, but I am not certain how to factor in the zener voltage tolerance to size the shunt resistor [R3] for minimum supply voltage of 11.4 volts. Would it be:
[11.4V - 3.5V] / [ 5mA + (3.5v / 2.2K) ]?
[Vsupply(min) - Vzener] / [Izener + Iload]

Posted: Sun Nov 09, 2008 12:22 pm
by MrAl
Hi again,


Lets take it one step at a time...

The current 'stolen' from the node when J1-4 is at ground is:
I1=3.3/2200. This current must be supplied from Vcc
along with the min zener current Iz, so the total current
requirement is simply:
IT=I1+Iz
or
IT=3.3/2200+Iz
and since Iz=5ma this becomes:
IT=3.3/2200+0.005
which comes out to:
IT=0.0065 amps.

This current flows through R3 from Vcc, and with the min
Vcc of 11.4 the voltage across R3 is 11.4-3.3 or 8.1 volts.

With 8.1 volts across R3 and 0.0065 amps through it, it
must be a 1.246k resistor at most, closest value is 1.2k
but an additional 5 percent takes us up to 1.26 which is
too high, so perhaps a 1k resistor would be a good value
for R3.

Checking, the max current then is:
Imax=(13.2-3.3)/1000=9.9ma, so the power is
Pmax=0.098 watts, so a 1k, 1/4 watt resistor is ok.

The min zener current therefore is 5ma and the max 9.9ma
so it should be ok, although expect some variation in voltage.

The only question i would have now is can R2 be higher, like say
4.7k or even 10k? Increasing R2 would make the zener
voltage even more stable, except of course for temperature.