I have a sensor (NRG #40 Anemometer) that produces an AC signal with a frequency between 2 Hz to ~100 Hz with an amplitude of 80 mV to 12 V peak-to-peak. The signal to read is the frequency (zero crossing?), amplitude is not relevant.

The signal gets read by a Arduino Uno. To convert the sine wave (from the sensor) to a square wave (suitable for the MCU input), I was thinking of using a 74HC14N Hex inverting Schmitt trigger. The sensor application note suggests adding Over-Voltage Protection, Low-Pass Filter and a limiter. I am running the Schmitt trigger at 3.3V.

signal conditioning block diagram from manufacturer

Unfortunately my Schmitt Trigger output is always high, meaning the input signal is low and doesn't register.

  • How can I bring the input signal to a valid level for the Schmitt trigger?
  • How can I DC bias the input signal to about 1.65 V and limit it to not pass 3.3 V and 0 V?
  • I thought I ignore the Over-Voltage Protection and Low-Pass Filter for the test setup, is this ok?
  • 1
    \$\begingroup\$ To the usual suspect for whom the obvious is not obvious, this is an electronics question, NOT an "arduino question" \$\endgroup\$ Oct 9, 2016 at 1:53
  • \$\begingroup\$ @ChrisStratton do you want me to remove the arduino tag? \$\endgroup\$
    – Mirko
    Oct 9, 2016 at 1:57
  • \$\begingroup\$ You shouldn't need to, but the fact is we have one severely misbehaving so-called "moderator" here who stops reading and migrates questions any time he sees that tag, regardless of what the question is actually about. \$\endgroup\$ Oct 9, 2016 at 1:58
  • \$\begingroup\$ @ChrisStratton thanks for the quick reply and the background info, will keep the tag. I think it gives the right context. \$\endgroup\$
    – Mirko
    Oct 9, 2016 at 2:28

1 Answer 1


The diagram is sort of high-level concept- it does mention the use of a comparator, which will work, rather than a ST inverter, which will not. Even if you biased it to the (rather variable) center point of the inverter, the hysteresis is too large.

Below is an appropriate circuit. R4 and the Schottky diodes D1/D2 clamp the input to about +/- a few hundred mV. C1 and R11 are the low pass filter. R10 is the pullup required by most comparators such as the LM393 shown. R1/R2 create a bit of hysteresis. R9 biases the input up by about half the hysteresis (since the hysteresis is one-sided due to the 0/5V output of the comparator rather than a symmetric output about ground.


simulate this circuit – Schematic created using CircuitLab

Note: Not included in this circuit is any consideration of lightning protection, as it's outside the scope of the signal processing issues. You can find more information at this link, for example. It should not be neglected for a real installation.

  • \$\begingroup\$ Thanks so much, this looks great! I will get the components and try it out. This is based on 5V and works since the Uno has 5V & 3.3V. In the final design I want to use a Arduino (Arduino Zero) which has 3.3V only. I was running the circuit in the simulator with 3.3V and it looked fine. Would you suggest to replace any components for 3.3V? \$\endgroup\$
    – Mirko
    Oct 9, 2016 at 5:52
  • \$\begingroup\$ It should work just fine as-is with a 3.3V supply. \$\endgroup\$ Oct 9, 2016 at 6:04
  • \$\begingroup\$ What happens if there is 10Vac of CM line noise on the outside wind sensor cable with high impedance unbalanced comparator? If using a long cable to sensor, make it shielded ot twisted pair and may need a load resistor to reduce ac hum if near power. \$\endgroup\$ Oct 9, 2016 at 12:04
  • \$\begingroup\$ It's a low impedance source, and floating, so high Z is not a problem, and frequency limited after hard passive clamping so it should be very noise immune. A shielded cable is reasonable. The cable will be very short compared to a wavelength that can make it through the LPF. \$\endgroup\$ Oct 9, 2016 at 12:08
  • \$\begingroup\$ Was able to test the circuit and able to read the frequency successfully. Unfortunately I didn't find any BAT54 or similar in my local electronics store and therefor wasn't able to clamp the input. I get clean readings, but have a couple of off readings (couple kHz) in my current version. My assumption is that it is due to the missing D1/D2. Will report back as soon as I received the components. \$\endgroup\$
    – Mirko
    Oct 10, 2016 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.