From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ 6008 output 4-20mA

Solved!
Go to solution

Oh wow, first post, and don't even know if it really belong to here but... Anyways...

 

I'm a newbie and I'm kind of lost.

 

Need to work on some final project and it seems I don't get to understand how to get it going. I need to use a lm35 (temp sensor) as the input signal to the DAQ, and the output... it needs to be this 4-20mA that will control the speed of a fan/air extractor.

 

At 25°C the fan needs to stop, and gradually increse it's speed depending to the temperature as in, in 40°C will get it's max. And at 50°C a LED need to turns on as an "emergency" sign.

 

I know I would need some resistor within the... 200-250Ohm range or so, but... How to connect all this **bleep** from the DAQ output to the fan? since it's just a project I will be using one of those pc/laptop fans as the "air extractor".

 

Thanks, peace.

0 Kudos
Message 1 of 22
(5,274 Views)

Welcome to the Forums.

 

This sounds like a school project.  Most of the participants on the Forum are volunteers.  We will not do your work for you but will try to answer questions about how to use LabVIEW and DAQ devices and instruments.

 

First, let's separate the input form the output.  Although you are building a closed loop controller, you can treat the pieces separately.  One task will be to measure the temperature.  You have the LM 35 and can probably connect that either directly or through a decoupling resistor to one of the AI lines on the 6008.

 

The outputs are a different story. The analog outputs of the 6008 can drive a maximum current of 5 mA.  You cannot use this to drive the 4-20 mA input of the fan controller.  You cannot drive a small pc fan with 5 mA either.  So you will need some kind of amplifier to boost the signal to the desired level.

 

I suggest you start by getting the data sheets for all the devices you have or will be using and study them to determine what you actual input and output requirements will be.  Then use that data to design your system.

 

Lynn

 

0 Kudos
Message 2 of 22
(5,271 Views)

Thanks for the fast answer, and indeed, it's for school.

 

I have the data sheets and whatnot, also I'm using an npn tip transistor to the boost the signal. I'm just probably messing up the connections because the fan seems to just take the voltage from the source and not from the DAQ output. I'll check it all again.

 

 

0 Kudos
Message 3 of 22
(5,269 Views)

If you cannot figure out where the problem is, post an image (.png preferred) of your circuit diagram.

 

Lynn

0 Kudos
Message 4 of 22
(5,263 Views)

Hi,

 

Maybe you are not connecting the npn transistor properly, which is why you have the fan always turned on (or off).  Besides, I suggest you amplify the output voltage you get from the temperature sensor LM35.  The signal is too small (in the mV range), and amplifying it will help you detect minimum changes in the signal.  To connect the LM35, I suggest you use the differential mode for analog inputs and an external power supply for the LM35.  Connect Vout of LM35 to AI+, GND of LM35 to both AI- and GND of external Power Supply. and V+ of the LM35 to V+ of the external Power Supply.

 

 

For the acquisition task, you can use the Cont Acq&Graph Voltage-Int Clk.vi example in the NI Example Finder from LabVIEW.  This example implements a continuous analog voltage acquisition, where you only have to configure the acquisition parameters (rate, number of samples, etc). 

 

Hope this helps.

 

Regards!

 

Anuar Rojas

Anuar R.
National Instruments México y Latinoamérica
Ingeniería de Aplicaciones
www.ni.com/soporte
0 Kudos
Message 5 of 22
(5,248 Views)

I got it working already, thanks, I found some dc motor diagram that helped me out with the connections. And yeah, I'm using dif mode.

 

I have another question, if you could give me an advice. My fan should stop in temps under 25°C, should I put a relay to stop the current through the wire when this happens? Cause if I set the min voltage to 25°C (aprox. 3.5v to the fan), the fan spin still (very slowly) at less than 25.

0 Kudos
Message 6 of 22
(5,245 Views)

Hi,

 

Well that should be a programmatic condition, where any temperature value under 25°C sets an ouput value of 0V to the transistor that controls the fan. This is the best way you can do it, if you are controlling the fan through the transistor.

 

What kind of output signal are you using to control de fan?

 

Hope this helps!

 

Anuar Rojas

Anuar R.
National Instruments México y Latinoamérica
Ingeniería de Aplicaciones
www.ni.com/soporte
0 Kudos
Message 7 of 22
(5,237 Views)

Output? analogic voltage. And yeah, using TIP 120 to boost my signal.

0 Kudos
Message 8 of 22
(5,235 Views)

Hi,

 

So you output an analog voltage value that dictates the fan's speed, then it can be done programatically, as I posted before.

 

Regards!

 

Anuar Rojas

Anuar R.
National Instruments México y Latinoamérica
Ingeniería de Aplicaciones
www.ni.com/soporte
0 Kudos
Message 9 of 22
(5,231 Views)

This is what I have so far. It's my test VI, I'm the one introducing the temperatures manually.

 

The fan turns on at around 3.5v so, in the scaling and mappling I have:

 

25°C - 3.5v

40°C - 5v

 

And this 3.5-5 range goes into the DAQ assistant to generate the same amount of voltage, right? If I set... 24°C to 0v, as example. temperatures like... 25 o 26°C would generate like... <3.5v and the fan won't turn on, that's why I was thinking on a relay.

 

You say that it could be done programatically but, how? what am I doing wrong?

0 Kudos
Message 10 of 22
(5,229 Views)