I need to detect voltage frequency of an automotive alternator (before rectification). Alternator is a 3-phase generator, I will be looking at one of the phases. The voltage frequency never exceeds 1.5 kHz.

I was thinking of taking OPA340 OP-AMP. I would connect non-inverting input to one of the phases and leave inverting input at ground, while supplying OP-AMP with 3.3V (ADC takes 3.3V max). This will give me 3.3V on the output during positive half-period and 0V during negative half-period. However, I am worried about noise around zero-crossing. Output voltage is just a 3.3V logic signal. Accuracy within 1 Hz would be nice.

  • \$\begingroup\$ Do you need zero-cross or just a frequency reference? If zero-cross, how accurately. What is the signal feeding? A 3.3 V logic signal? Pop the answers into your question rather than the comments. \$\endgroup\$ – Transistor Jan 5 '16 at 21:27
  • \$\begingroup\$ if you ground the inverting input you have unconstrained gain \$\endgroup\$ – Jasen Jan 5 '16 at 21:33
  • \$\begingroup\$ That's correct, I need saturation. \$\endgroup\$ – jurij Jan 5 '16 at 21:35

using an op-amp as a comparitor often ends badly, some op-amps (not OPA340) can be damaged by this. and performance almost always suffers.

no you won't have 0V out the negative half cycle if you are comparing with automobile ground, only while that phase is less than automobile ground (1/6 cycle) that's probably enough.

the simplest solution is a 100K resistor to a the logic input (or Schmitt gate) and just rely on the protection diodes to clip the over voltage - 150uA is most unlikely to damage anything, de-glitch in software

that will give you about 1/6th of the cycle low and the rest high.


simulate this circuit – Schematic created using CircuitLab

if you add a series capacitor will auto bias via the protection diodes and give about 50% duty cycle

this seems good, but the automibile is a surprisingly rough environment for electronics, load dumps and altenator faults can prioduce spikes of hundereds of volts

so add a transistor to buffer the current instead of letting it reach your logic a small transistor can handle tens of milliamperes base current so fault voltages over one kilovolt will be safely handled with this setup.


simulate this circuit

the diode handles the current for the negstive half cycle and the capacitor allows the bias to self-center giving approximately 50 percent duty cycle. at the output.

| improve this answer | |
  • 1
    \$\begingroup\$ Bad or worn field coil supply brushes may cause pre-equalising spikes, so 150uA isn't the limit and even that is a no-no for some 3.3V systems (assuming the regulation is done linearly and on the field coil, as in most, but not all vehicles). Broadcom, of Raspberry Pi fame, strongly disadvises the resistor-direct method for example. \$\endgroup\$ – Asmyldof Jan 5 '16 at 21:51
  • \$\begingroup\$ What kind of buffer do you suggest? \$\endgroup\$ – jurij Jan 6 '16 at 20:03
  • \$\begingroup\$ I suggest using an ordinary transistor, like in the last schematic \$\endgroup\$ – Jasen Jan 6 '16 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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