LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove noise when transfering analog to digital waveform

Solved!
Go to solution

Hello All,

When transfer the analog signal to digital waveform, whatever shreshold I set to judge( the level is high or low) , there seems values near the shreshold and will cause misjudge to the level.

Is there a kind of filter or other methods to remove the noise? 

attached please find the VI, it is supposed the have 9 positive pulse each duration. 

but I got some unexpected digital signal as below picture.

20230412153532.png

0 Kudos
Message 1 of 18
(1,111 Views)

it seems much more reasonable to judge before the falling edge. but how can we find the start time of each falling edge correctly.

0 Kudos
Message 2 of 18
(1,091 Views)
Solution
Accepted by topic author yeah

Yes, this is why Schmidt trigger exists. You add a hysteresis with high level and low level thresholds instead of just a single threshold to differentiate high and lows.

 

This hysteresis must be large enough to ignore your noisy transitions.

 

Explore this topic - https://forums.ni.com/t5/LabVIEW/Schmitt-Trigger/td-p/300823/page/2

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 3 of 18
(1,088 Views)

Hi Santo,

Thanks, Is it the  Basic Level Trigger Detection VI?

I tried just now but  didn't get the right position. I will try it tomorrow.

20230412182008.png

0 Kudos
Message 4 of 18
(1,077 Views)
Solution
Accepted by topic author yeah

Let's assume your "signal" is really a "digital signal", possibly what is called a "TTL" signal (which my engineering friends tell me means "transistor-transistor logic").  TTL signals generally say "High" is +2.0 - 5.0 V, "Low" is 0 - 0.8 V, and values between 0.8 V and 2 V are ignored.  

 

Let's assume you start off with an unknown Input Voltage and an assumed previous output TTL state, say "Low".  If your current State is Low, then it stays Low unless the Input Voltage is > 2.0 V (in which case it becomes, and stays, High).  If your current State is High, then it stays High unless the Input Voltage is < 0.8 V (in which case it becomes, and stays Low).

 

So you need to figure out how to write code that does the following:

  • Can "remember" the previous State.  [There's something called a "Sxxxx Rxxxxxxx" in LabVIEW that has this feature).
  • Can detect which of two tests to do based on the previous State.  [Sounds like a "Cxxx" structure].
  • Outputs the next state (and "remembers it") (see first bullet point).

Bob Schor

Message 5 of 18
(1,054 Views)

Will make your life easier to put a schmidt non-inverting buffer at the front of the Analog Input instead of try to do this in the software.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 6 of 18
(1,048 Views)

Hi Bob,

Yes, it is the SCL of I2C signal.

🤤oops, why shift resister and case will be replace with xx.

But I will try the suggestion, thanks.

 

0 Kudos
Message 7 of 18
(1,019 Views)

Hi Santo,

It is a I2C siganl from an arduino board, we don't intend to change the hardware.

I'm just trying to "spy" the raw signal.

0 Kudos
Message 8 of 18
(1,017 Views)

@yeah wrote:

Hi Santo,

It is a I2C siganl from an arduino board, we don't intend to change the hardware.

I'm just trying to "spy" the raw signal.


In that case, you need to implement the Schmidt trigger thresholding looping through each sample in the analog waveform to properly detect digital edges.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 9 of 18
(1,013 Views)

Hi Santo,

I'm still not sure what is "Schmidt trigger" you mentioned, is it an exist VI in LabVIEW 2019? or is kind of method need to do myself like Bob suggested above?

0 Kudos
Message 10 of 18
(1,003 Views)