04-12-2023 02:52 AM
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.
Solved! Go to Solution.
04-12-2023 04:38 AM - edited 04-12-2023 04:40 AM
it seems much more reasonable to judge before the falling edge. but how can we find the start time of each falling edge correctly.
04-12-2023 04:41 AM
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
04-12-2023 05:20 AM
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.
04-12-2023 07:09 AM
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:
Bob Schor
04-12-2023 08:06 AM
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.
04-12-2023 07:40 PM
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.
04-12-2023 07:43 PM
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.
04-12-2023 07:46 PM
@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.
04-12-2023 07:56 PM - edited 04-12-2023 07:58 PM
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?