Questions about a circuit interfacing a DC fan via open drain way

1. Questions about a circuit interfacing a DC fan via open drain way

I have a small project for part of an experiment where a speed will be controlled by a -10/+10V function generator's analog DC output. So basically the chain will be:

Analog voltage(0..5V)------> PWM(0%..100%)-------> FAN speed(min rpm..max rpm)

To convert analog input to PWM I use Arduino Nano as a micro-controller board. I map 0-5V analog input voltage at A0 pin to a PWM pin duty cycle where I set the PWM freq. to 25kHz.
The Nano uses ATmega328P.

Since people will use the function generator as input, I need to protect the analog input A0 of the Nano from reverse polarity and maximum limits. So on the left side there is the analog input protection with an op-amp buffer for a possible -10/+10V input range. Circuit schematics diagram is given below. Please left-click to zoom in.

And on the right side shows driving the fan with via drain connection. The fan better/recommended needs to be connected via open collector/drain way. The fan type is very indicative of the problems with the PWM signal if used as active pull up. Anyway I investigated on it and I will use open drain connection. Now if I use open drain way directly, the moment the system is powered altogether the fan will jump to full speed since it takes time to micro to boot. So the only workaround is to power first the micro board(to make it output %100 PWM 5V) and then later power the fan. But instead of this I want to invert the logic by using a PNP transistor.

I want to use the +5V output from the Nano board (pin 27) to power the input opamp and the inverter PNP section as shown in my diagram.
I guess this +5V pin can provide upto 500mA.

Below complete schematics diagram shows the plan in my mind and I only also tested on a breadboard so far:

Left-click to enlarge

My question are mainly about R4, R5 and R6.

If I choose R6 much bigger like 100k it has side effects to PWM signals falling ege via I guess capacitive coupling. So I reduced it to 1k.
I'm not sure whether int his case R4 and R5 are necessary as well.

What could be said about this section of the circuit especially the part with R4, R5 and R6? I would be glad if you have other suggestions as well.

And secondly if the fan is some meters far away can I use as single 4-wire STP cable for both fan power and control signal or should I use two separate cables?
And if same cable like a CAT6 is fine which Figure below is a better way?:

- - - Updated - - -

I just wanted to add an issue that I noticed now. At 25kHz where PWM ON time is set under 1.5us the PNP transistor does not switch.

•

2. Re: Questions about a circuit interfacing a DC fan via open drain way

Many questions...
Why do you think you need an opamp for "protection"? Won't the diodes work without the opamp?
What is the output voltage of theArduino? Can you drive the NFet directly?

On powerup, isnt the Arduino output hi-z? A simple pulldown will hold the fan off.

3. Re: Questions about a circuit interfacing a DC fan via open drain way

Originally Posted by barry
Many questions...
Why do you think you need an opamp for "protection"? Won't the diodes work without the opamp?
What is the output voltage of theArduino? Can you drive the NFet directly?

On powerup, isnt the Arduino output hi-z? A simple pulldown will hold the fan off.
Opamp clamps the possible x>10V input to 5V. Analog input of the Nano should not exceed 5.5V. The diodes are for reverse polarity protection.
I can also use Zener but they are not stable for the ADC input. Anyway the input section is not important I can handle it.

But my main worry is during power up. Do you mean pins go HIGH on power up. What do you mean by pull up in this context. Where?
Could provide a sketch or a simple drawing if possible? Better and it takes shorter to understand that way.

So for the fan to be off or minimum RPM, that MOSFET should be kept turned ON during the power up.

If I use pull down resistor as you suggest, the MOSFET will be OFF during the power up and the fan will go to max speed.

•

4. Re: Questions about a circuit interfacing a DC fan via open drain way

No, no and no.

Those diodes are for overvoltage protection; they will do NOTHING for reverse polarity. If the input voltage goes above 5V, U2 (which is a terrible ref. des. for a diode; use D*) will conduct and clamp the voltage. If the input goes below ground, U3 will clamp the voltage. And what do you even mean "reverse polarity"? Instead of varying from -10V to +10V, it varies from +10V to -10V?

I said nothing about the pins going high on power up; I said they go Hi-z (high impedance). I don't know for a fact that that's what the Arduino does, I'm just speculating, since most well-behaved chips do that. You need to figure that out.

If you MUST use that PNP, then use a pullup instead of a pull down.

5. Re: Questions about a circuit interfacing a DC fan via open drain way

According to fan datasheet, the PWM input can be driven by 5V logic directly. No need for additional transistors.

6. Re: Questions about a circuit interfacing a DC fan via open drain way

Ah, look at that. RTFM.

•

7. Re: Questions about a circuit interfacing a DC fan via open drain way

Originally Posted by barry
Ah, look at that. RTFM.
For -10 to +10 diodes will clamp from -0.5V to 5.6V which is dangerous for the micro. Opmap clamps between exactly zero and exactly 5V.
So only diode solution is not fine to me. You can simulate and see thats what I saw.

And regarding directly driving PWM is not recommended unless limiting the input current. Look at the chosen answer in this page. The person seems like he knows what he is talking about.

8. Re: Questions about a circuit interfacing a DC fan via open drain way

You REALLY need to settle down and READ THE DATA SHEETS. The fan PWM input draws a maximum of 1mA. The only way you're going to exceed that is by applying WAY too much voltage.

There are much less expensive ways of limiting the voltage than using an opamp. Why are you using a +/-10V input if you're going to clip it at +/-5??? Why don't you just use a voltage divider?

--[[ ]]--