doncarlosalbatros
Full Member level 2
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.
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.