Cleaning up and changing the range of a digital signal

Ash's picture
Ash

Offline

Joined: Feb 04, 2020

Replies: 1
Cleaning up and changing the range of a digital signal
February 4, 2020 - 2:49pm

I'm new to both this forum and electronics and would appreciate some help with getting started on a problem.

I have the waveform below coming from an anemometer that delivers pules with wind speed.

Screenshot 2020-02-04 at 09.07.12.png

As you can see, there is a lot of noise on the pulses and it ranges from approx 1.8V to 3.2V.

I need to be able to count the swings using an ESP32.

Where should I start to clean this up and change the range from 0V - 3.3V to read and count with a GPIO input? I'm guessing some kind of filter but I'm not sure where to begin with that.

I only need to count the large pulses, not the noise pulses.

Any help will be much appreciated.

Ash

Debasis Parida's picture

Offline

Joined: Aug 22, 2019

Replies: 124
Try a Low pass filter along with a Comperator
February 4, 2020 - 11:17pm

Hey Ash, for reducing the noise at the output, you can try using a Low pass filter at Sensor output. Next to change the range of the signal, you can use a comperator circuit and set a reference value above which all the output value will be HIGH, else LOW. for your case the reference value will be 1.8 volts.Hope this helps!!!

Sourav Gupta's picture

Offline

Joined: Feb 12, 2018

Replies: 304
LC filter will do the job.
February 5, 2020 - 10:34am

Use proper LC filter as suggested by Debasis Parida.
I think you may need phase compensation after the lc filter. However, that can be configured using op-amp.

What is the spec of the anemometer.

Ash's picture
Ash

Offline

Joined: Feb 04, 2020

Replies: 1
Thank you for the replies.
February 5, 2020 - 2:03pm

Thank you for the replies.

Where do I find out how to design a low pass filter and comparator? I need something that does the calculations for me as I'm new to this.

The anemometer is from China and says that it is 12V supply and 0-5V output.

Sourav Gupta's picture

Offline

Joined: Feb 12, 2018

Replies: 304
Need to measure the ringing noises.
February 5, 2020 - 10:19pm

Since you have scope facility, can you measure the noise frequency? It is the first thing that is needed.
Also please provide the peak to peak voltage of the spikes.