# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## remove noise when transfering analog to digital waveform

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.

Message 1 of 18
(1,112 Views)

## 回复： remove noise when transfering analog to digital waveform

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

Message 2 of 18
(1,092 Views)
Solution
Accepted by yeah

## 回复： remove noise when transfering analog to digital waveform

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

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

## 回复： remove noise when transfering analog to digital waveform

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.

Message 4 of 18
(1,078 Views)
Solution
Accepted by yeah

## 回复： remove noise when transfering analog to digital waveform

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,055 Views)

## Re: remove noise when transfering analog to digital waveform

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

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

## 回复： remove noise when transfering analog to digital waveform

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.

Message 7 of 18
(1,020 Views)

## Re: remove noise when transfering analog to digital waveform

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.

Message 8 of 18
(1,018 Views)

## Re: remove noise when transfering analog to digital waveform

@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

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

## Re: remove noise when transfering analog to digital waveform

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?

Message 10 of 18
(1,004 Views)