The Stack Overflow podcast is back! Listen to an interview with our new CEO.
2 of 2 replaced with

That sensor is short on details regarding use.

enter image description here

Figure 1. Note the unusual output signal.

The output is given as ±0.5 V so it implies that the device is capacitively coupled on the output. (There are other ways to do it but this would be the simplest.)

You should be able to achieve what you want with a comparitor circuit.


simulate this circuit – Schematic created using CircuitLab

Figure 1. Input comparitor switches when '+' input crosses '-' input.

  • R1 and 2 form a voltage divider. The junction should be set to about 0.25 V for your -0.5 to +0.5 signal.
  • R3 limits the current when input is negative. 10k should be fine.
  • R4 is a reminder that many comparitors have open collector outputs. If your micro input has an internal pull-up resistor you don't need it.

You need to pick a comparitor that will run on your micro voltage, accept the -0.5 V input without damage and operate down to zero volts on the input.

Some micro-controllers offer these as part of the analog inputs. See my answer to Why does the ATTiny84 have both an analog comparator and an ADC? for an example. This would save quite a bit of development. If choosing this option be careful with your -0.5 V signal level and ensure that your micro can handle it.