LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature sensor control fan driver

I am doing a college project that involve with DAQ. i am using LM-35 temperature to control the fan speed. when the temperature get hotter, the fan would increase. how can this be done? i thought of using case structure but i cant figure it out how to control the fan speed.

 

0 Kudos
Message 1 of 8
(4,332 Views)

Well the most common way to control a fan or any DC motor speed is by using Pulse Width Modulation (PWM).

 

You did not mention what DAQ you are using, can one of the DIO pins be used as a PWM output?

 

But in general I would do this: Set a few threshold temperatures and increase or decrease the PWM duty cycle as the temperature crosses the thresholds

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 8
(4,305 Views)

Duplicate post...

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 8
(4,304 Views)

i am currently using NI DAQ device.

0 Kudos
Message 4 of 8
(4,288 Views)

@mynameismickeymouse wrote:

i am currently using NI DAQ device.


Pulse Width Modulation (PWM) Using NI-DAQmx and LabVIEW

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 8
(4,279 Views)

i'm apologize but i didnt learn PID controller. i thinking about using case structure but i dont know how to apply it to the fan driver.

here is a simple of the project. Thank

0 Kudos
Message 6 of 8
(4,260 Views)

I am sorry I cannot look at your project because I only have LV2016 here.

 

The tutorial I linked to was not about PID control, it showed how to use a NI-DAQ device for PWM.

 

Anyway I would do something like this:

  1. Decide on a few temperature ranges and PWM %Duty Cycle settings.
    1. t <= 25c Fan Off
    2. t > 25c and <30c Duty Cycle = 50%
    3. t > 30c and <35c Duty Cycle = 75%
    4. t > 35c Duty Cycle = 100%
  2. Measure t and convert it to an I32 integer 
  3. Use that I32 to drive the selector on a Case Structure

 

Here's a couple more tips 

  1. Read the LV Help on Case Structures
    1.  Scroll to the bottom and open the example program
    2. Notice when using integers as the case selector you can set a numeric range for each case in the Case Structure 
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 8
(4,251 Views)

@RTSLVU wrote:

I am sorry I cannot look at your project because I only have LV2016 here.

 

The tutorial I linked to was not about PID control, it showed how to use a NI-DAQ device for PWM.

 

Anyway I would do something like this:

  1. Decide on a few temperature ranges and PWM %Duty Cycle settings.
    1. t <= 25c Fan Off
    2. t > 25c and <30c Duty Cycle = 50%
    3. t > 30c and <35c Duty Cycle = 75%
    4. t > 35c Duty Cycle = 100%
  2. Measure t and convert it to an I32 integer 
  3. Use that I32 to drive the selector on a Case Structure

 

Here's a couple more tips 

  1. Read the LV Help on Case Structures
    1.  Scroll to the bottom and open the example program
    2. Notice when using integers as the case selector you can set a numeric range for each case in the Case Structure 

Your going to need to put some hysteresis in that so that the transitions with falling temp are are at a slightly lower temp that transitions with a rising temp.  There will be more overshoot but the fans will last a lot longer.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(4,236 Views)