LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pressure sensor with arduino and labview

heyyy i got a project with a pressure sensor using labview and arduino and i'am still new with it anyone made a project like that before i just need some code examples 

0 Kudos
Message 1 of 6
(1,917 Views)

Hi ihebz,

 


@ihebz1 wrote:

heyyy i got a project with a pressure sensor using labview and arduino and i'am still new with it anyone made a project like that before i just need some code examples 


Did you search the forum for relevant threads? There are lots of threads about communicating with an Arduino or using LINX…

 

What have you tried so far?

Where are you stuck?

Which LabVIEW version (year, bitness, license type) do you use?

Do you know how to connect your sensor to your Arduino?

Does that sensor work as expected? Did you verify this using other measurements devices (like DMM)?

 

Best regards,
GerdW


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

@ihebz1 wrote:

heyyy i got a project with a pressure sensor using labview and arduino and i'am still new with it anyone made a project like that before i just need some code examples 


Cut the project in half:

  1. Read a sensor using Arduino and send the value over a serial communication line
  2. Read a serial communication line using LabVIEW and display it to a human being

 

The first task is easily accomplished by searching the part number of the sensor and perusing the Arduino example code that is almost certainly offered there. The Arduino IDE contains example code for sensors and serial communication IIRC.

 

In its path to the solution, the second task is almost identical, since LabVIEW contains a code example library where you can find well-documented examples for most common tasks. However, for serial communication, I would recommend heading over to LabVIEW Wiki and check out this talk: https://labviewwiki.org/wiki/VIWeek_2020/Proper_way_to_communicate_over_serial

 

 

Message 3 of 6
(1,880 Views)

Honestly the easiest way to achieve this is to:

  1. Write the Arduino code using the Arduino native language to read the sensor and send the value out the Arduino's serial port.
    1. There are probably plenty of example Arduino code out there for this
    2. Get it working using the Arduino IDE serial monitor or any other serial terminal like Terra-Term 
  2. Write a LabVIEW program to receive and display the data using VISA just like any other instrument on a serial port.
    1. This video will help with that part VIWeek 2020/Proper way to communicate over serial  
  3. Take it further...
    1. Instead of the Arduino just constantly spitting out values make it respond to a query
    2. Add other sensors

If you want or must use LINX then there might not be a library for your exact sensor, but most sensors output a voltage proportional to the value of what they are sensing. Use an analog input and the analog read vi in LINX and scale the voltage to pressure. The scaling factor should be in the manual for the sensor.

========================
=== Engineer Ambiguously ===
========================
Message 4 of 6
(1,869 Views)

Capturedd.PNG

i'am trying to see a pressure of a pump it it is higher or below 95KPA 

0 Kudos
Message 5 of 6
(1,802 Views)

 


i'am trying to see a pressure of a pump it it is higher or below 95KPA 


What is your sensor? The number of the item or the ordering information.

0 Kudos
Message 6 of 6
(1,794 Views)