LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help in controlling speed for 4-pin DC fan

Hi everyone,

 

I would like to seek help in controlling the speed of a 4-pin DC ventilation fan. Currently, I am using an n-channel MOSFET (IRF520) to switch on the fan whenever the switch is in the ON state. This portion works successfully, but however, the fan speed is not at its full potential. I was intending to use PWM to adjust the speed of the fan but however, I am unable to do so. My front panel, block diagrams and wiring connections are as shown below.

 

My wiring connections. There is also an additional connection from the PWM wire of the fan to digital pin 9My wiring connections. There is also an additional connection from the PWM wire of the fan to digital pin 9Ventilation_Fand.pngVentilation_Fanp.png

Any advice will be a great help, thanks!

0 Kudos
Message 1 of 2
(3,268 Views)

Hi omg,

 

put the Init function in front of the loop and the close function behind the loop!

They should be called just once and NOT with every iteration of the loop!

(Also the functions defining the output mode should be called once before the loop. Did you set the correct mode for the PWM pin? Do you wire the correct values for the PWM as there is a coercion dot visible?)

 

Did you read the warning and it's description?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(3,221 Views)