LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In Cylinder Pressure and hall sensor sync

Good evening everyone,

 

I'm new to using Labview. I've been using Matlab and Arduino but Labview is a new world to me.

I'm studying engineering and I've been tasked to acquire data from a Optrand pressure sensor (which outputs an analog voltage) to Labview in order to plot a crank-angle to pressure graph.

The hardware that I have access to is a USB6003 and a common hall sensor (which outputs a digital signal).

 

I surely can read all the analog data that the pressure sensor outputs, however, I need to sync the data with the digital trigger from the hall sensor.

Ideally, I would be able to present a graph every second or so with the readings and, upon clicking on a save button, write the readings to a file.

As far as I understand, I can't use a reference trigger nor anything similar, and I'm stuck to using a Start Trigger.

 

I was considering two different approaches to the problem:

1- Somehow make a loop where each trigger starts an analog read and the following trigger would reset the analog read;

2- Continuously read the analog input and timestamp each reading. Then, timestamp all the triggers and by comparing the timing, I would know at what time the triggers happened. All the analog reads taken between triggers would translate to 360º and since the rotational speed would not change between triggers, then I could calculate the crank angles.

 

However, probably due to my limited experience with Labview, I'm not able to achieve this.

I've experimented with tutorials, examples found in the forum and more, but I'm not being able to achieve this result.

 

Could someone, possibly, help me with creating a VI to achieve this? The most basic thing I need is a way to read the analog output from the sensor and somehow sync it to a digital trigger from the Hall sensor to know the crank angle.

 

PS: In the end, a serial communication with an arduino to get some readings and also some additional readings from other sensors will be added to be able to save all the information to a file.

0 Kudos
Message 1 of 3
(1,190 Views)

Hi Alex,

 

simple suggestion:

Create a DAQmx task containing two analog inputs and set the sample rate as needed (ans supported by your USB6003).

Connect pressure signal to first analog input and hall sensor to 2nd analog input.

Now start the task and read the waveforms.

 

They are in sync because they are in the very same task! (There is a small delay/phase shift between both channels because your hardware uses a single ADC with a MUX and so needs to switch between the channels for each sample…)

 


@alexbigmac wrote:

I've been tasked to acquire data from a Optrand pressure sensor (which outputs an analog voltage) to Labview in order to plot a crank-angle to pressure graph.


Usually (in industrial applications) you use some other digital signals to trigger the pressure reading.

We use CDMs (coded disc markers) with 360 ppr to trigger each single sample of the pressure channels, to get one sample per degree crank angle. You need other DAQ hardware than your USB6003 for such measurements…

 

Example result for crank-angle related measurements:

Best regards,
GerdW


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

Thank you very much for your quick and useful response!

I've been trying to implement your solution and I'm currently trying to get a working VI with almost everything I need, including the arduino communication. I'll share with you so that if you can take a look and give your input, I'd deeply appreciate it.

 

The hall sensor output is not very stable and actually fluctuates with the other analog inputs. I've tried putting a pull-up resistor but was not very successful. Curiously, the IR sensor works very good. but is not the best because the hall sensor has a built-in filter which ensures that only a single output is given for each magnet detection.

 

I've been looking at a rotary encoder such as this one:

 

encoder.jpg

Then, I would try using each pulse as an external clock for the analog read. However, since I need the TDC, I'm not sure this would solve all of my problems. I could use it as an external clock but would not have any way of knowing the exact crack angle using the daq, I think. Correct me if I'm wrong.

0 Kudos
Message 3 of 3
(1,109 Views)