LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Current sensor

Hi, 

I need to measure the power consumption of an actuator using the current sensor. The LabVIEW code (using DAQassist) works fine when the actuator is in off condition, but when the actuator is on, an error message came. I couldn't find out the solution to that error... I also tried to check the data using DAQmx, and Arduino code... Data acquisition was always stopped when the actuator is on condition but didn't show any error message. I have attached the sensor datasheet here.

Current Sensor error.JPG

0 Kudos
Message 1 of 9
(5,061 Views)

Hi milon,

 

how did you wire that current sensor?

Can you provide a schematic?

 

Do you try to use the USB bus to power an external device?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(5,042 Views)

Respected Mr. Gerd

Greetings. I have a schematic figure of sensor connection. 

"Do you try to use the USB bus to power an external device?" - I don't know how to do it. The data sheet mentioned that sensor output is 0~2.5V. So, I attached the cable directly with the computer and NI USB.

Current Sensor.JPG

0 Kudos
Message 3 of 9
(5,037 Views)

That spec sheet doesn't tell how much current the device needs to draw from its 5VDC power source.  It really should.

 

The USB-6009 looks like it is a max of 200 mA on that 5VDC terminal.  Perhaps this device draws more than that.

 

Perhaps there is some sort of short between the 220 VAC side and the connection to the USB-6009 that is causing 220 V to be put on those terminals.

 

I would try using a separate 5 VDC power supply instead of the 5VDC supplied by the NI device.

Message 4 of 9
(5,025 Views)

Stop doing this now before you get a dead PC or worse,  you.  Never try and measure high voltages without proper isolation, this setup is probably lethal.  You need to use isolated devices which are suitable for the voltages you are subjecting them to. You are lucky it is just an error message and not smoke!  

Message 5 of 9
(5,019 Views)

Hi, I have had chance to have a proper look a the datasheet and  the device does provide galvanic isolation.  I still think you would have to be very careful how you use this device, I would suggest that when working with mains voltages you would not want to hook up prototype circuits to your PC without very careful consideration.  The error you are seeing is indicating that you have grounding or isolation issues and that you are possibly subjecting your device to very high common mode voltages.  I would get an isolation barrier and put all of the high voltage in an enclosure with  a carefully designed isolation and grounding scheme.  I would use a DAQ with isolation too it possible, the lower cost USB daq options do not provide isolation.  I hope that is a bit more useful.

Message 6 of 9
(4,994 Views)

Respected Dr. 

Greetings. I am planning to control different actuators through LabVIEW. But I need to check the power consumption rate of those actuators at the same time. I am using the ACS712 current sensor. Problems are:
 
1. I made a code using Arduino options/.vis (code attached). The outputs are always the same (showed in the attached picture). After the 1st data collection, 2nd time it doesn't work, showing 5002 error. If I disconnect the USB cable and run the LIFA base again, then it works. The same problem happens again and again.
 same outputssame outputs

Error 5002Error 5002
2. I have attached an Arduino code for the same setup. Its works very well but row data are also different from LabVIEW (graph attached). Why am I getting two types of data from the same sensor node/set up?

Arduino code for current sensorArduino code for current sensorDataData

0 Kudos
Message 7 of 9
(4,850 Views)

Hi,

Greetings. I am planning to control different actuators through Arduino-LabVIEW. But I also need to check the power consumption rate of those actuators at the same time. I am using the ACS712 current sensor. Problems are:
 
1. I made a code using Arduino options/.vis (code attached). The output data are always the same (showed in the attached picture). After the 1st data collection, 2nd time the code doesn't work, showing 5002 error. If I disconnect the USB cable and run the LIFA base again or restart my computer, then the code works. What is the solution of this problem?
Current sensor.JPG 

same outputs

Error 5002Error 5002Error 5002
2. I have made an Arduino code for the same setup. Its works very well and the row data are also different from LabVIEW data (graph attached). Why am I getting two types of data from the same sensor node/set up?

 

Arduino code for current sensor.JPG

Arduino code for the current sensor

Arduino data for current sensor.JPG

Data

0 Kudos
Message 8 of 9
(4,845 Views)

Hi Milon,

 

What is the solution of this problem?

Use your option 2.

 

Why am I getting two types of data from the same sensor node/set up?

In which why is the "type" of the data different? You get a voltage signal which is scaled into a current value…

 

Why do you think it is a good idea to start a new thread for the very same questions?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(4,809 Views)