1
\$\begingroup\$

I have a rotating flywheel with an inductive pickup and a magnet passing in front of it a couple of times per rotation. The signal looks like this for low speed inputs of the rotor:

low speed rotation signal

Apologies for the lack of scale. Y is 50mV per division, and X is 0.5s per division. At higher rotation speeds, the pulse amplitude rapidly increases up to and beyond 1V positive and negative swing.

My goal is to detect the pulses by turning them into a 3v3 TTL pulse so they can be used by a microcontroller GPIO.

I found what I thought was a suitable comparator circuit:

comparator circuit

The comparator circuit uses the anti-parallel Schottky diodes to limit the swing of the input voltage, as the input pulse varies in proportion to the speed of the rotor.

I simulated this circuit in LTspice, to reasonably good results. I used a sine wave source as a stand-in for the pulse signal. The simulation shows the following results:

enter image description here

Unfortunately, the circuit wired up IRL, just gives me a constant output high for the shown input signal.

I know there may be cheaper/easier/better/more standard ways to do this, but I would be interested to know why my approach has failed.

Thanks!

\$\endgroup\$
4
  • 2
    \$\begingroup\$ What does does the front end of your real circuit look like - not the simulation. \$\endgroup\$
    – MOSFET
    Commented Apr 22 at 21:25
  • \$\begingroup\$ My answer here might be relevant: electronics.stackexchange.com/questions/707333/… \$\endgroup\$
    – MOSFET
    Commented Apr 23 at 3:39
  • \$\begingroup\$ @MOSFET I am not sure what you mean by the front end? It's just the inductive pickup. I have shown it's output, but I assume it is a low resistance coil? That is why I modeled it as low resistance voltage sources. This also makes me think that the application of a bias voltage, as in your linked example, might not go too well, but I might be mistaken. \$\endgroup\$
    – bvongunten
    Commented Apr 23 at 5:23
  • \$\begingroup\$ What I mean is that in your LTSpice schematic, you have a convoluted model of a coil - three voltage sources and several resistors? Anyway, the biasing in my linked example is to get the operating point within the CM range of the comparator - you mentioned that the output is railed with changing input signals and this would be a reason; you're operating outside the CM range of the comparator (maybe). \$\endgroup\$
    – MOSFET
    Commented Apr 23 at 6:03

1 Answer 1

0
\$\begingroup\$

The pickup coil needs a bias voltage (Vdd/2) and some hysteresis for the comparator wouldn't hurt either. Try something like this: enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ The LT1719 shown in the model, includes slightly negative input voltages; are you sure it needs bias? \$\endgroup\$ Commented Apr 23 at 0:45
  • \$\begingroup\$ @Roanoke: a second vote for a bias voltage. I will try to model that and see what it looks like, then try to modify my circuit. \$\endgroup\$
    – bvongunten
    Commented Apr 23 at 5:26
  • \$\begingroup\$ The bias voltage is to avoid any CM voltage problems. Yes, the input voltage range of the LT1719 includes GND and one input is always at GND potential. According to note 2 in the datasheet, the output should be valid in this case and not stuck to the positive rail. \$\endgroup\$
    – Raonoke
    Commented Apr 25 at 11:11

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.