I'm currently having trouble with detecting the RPM frequency from a tacho generator signal. I have tried everything I know.

My tacho generator is attached to a universal washing machine motor, and it provides an AC signal of 0..3300 Hz at 0..170 Vpp.

The 230 Vac 50 Hz motor is driven from a TRIAC using phase control on a separate board isolated with EMI filters. I'm running a speed ramp up to span all available frequencies, 0..1 kHz from the raw tachometer. This is 0..2 kHz after rectification, as you'll see in the circuit below.

Here is the circuit I'm using for zero-crossing detection of the tacho signal. Right now, everything is dispatched around 4 separate breadboards as it is still a prototype.

Please note that, in the first versions, C1 and R5/C2 are not present. Adding them cleans the signals somewhat, but reduces the bandwidth and thus the detection capability of the tacho sensing circuit.


Here is the raw signal from the tacho generator (blue, using a differential probe) and the rectified/scaled/clamped signal (cyan, comparator input, standard probe). I do not understand why the signal at Vclamp point is so dirty.

As you can see, it is quite noisy. I was thinking it is EMI/RFI from the motor itself, even though the tacho is isolated and not connected to the motor circuit in any way, as the real tacho signal is cleaner.

As the signal has 20 ms periodic spikes, it lead me to think it has something to do with the motor control. But that is a completely separate board in a separate enclosure, with a dedicated EMI filter on its input.

tacho input versus scaled, rectified and clamped output

Update : as advised by @Andyaka i probed the tacho signal before and after the rectifier, disconnecting everything else and probing between v+ and V-. Here is the waveform, and i would say the noise comes from the rectifier and/or the breadboard and/or the breadboard wires ... because it is clean before, and after the rectifier (even at <50hz) it is already noisy :

after rectifier, with everything disconnected

Then here is the action of the comparator on that signal (purple is comparator output) without any filter:

comparator input-output

I added a low-pass filter before the comparator: C1 (330 pF) and R2 (100 kohm), giving a 4.8 kHz cut-off frequency. This enhanced the signal before the comparator. But, due the signal average voltage rising with the frequency, I cannot lower my reference voltage to detect the lower frequency oscillations.

I also tried lowering and raising the Vref of the comparator: lower to detect the low RPM, higher to keep triggering even with the low-pass filter on the input.

Then I tried filtering the output of the comparator by adding R5 and C2 and reading the output, first alone then combined with the input filter. With both filters, I still have these kind of spikes on the signal, which falsely trigger the interrupts and corrupt the frequency calculations:

spurious interrupts

Because the signal is not a fixed frequency from 0 Hz to >2 kHz, I cannot seem to find a standard way to reject the spikes/changes (like a debounce) or to reject the invalid values in software, when triggered by spurious interrupts.

On the software side, the only thing i have not tried yet is a Sigma-Kappa clipping. This would track a sliding window, sort the window, reject the outliers and keep the middle value. But I fear it is too time-intensive for an interrupt routine on the microcontroller, which will be an Atmel168 as far as I know.

On the electronics side, I would love to get some ideas:

  • What did I do wrong on the first rectified stage to get so much noise?
  • Is there anything I could improve in my circuit?
  • Should I try any other kind of circuit for this frequency detection?
  • 2
    \$\begingroup\$ I think you'd do yourself a favour by showing the raw tacho waveform (unconnected to anything else) at various speeds so a true picture can emerge of how your real input signal "evolves" in shape vs speed. It will evolve and it will have double edges at slow speeds growing into a single pulse at higher speeds. The amplitude will vary from low to high speed considerably. \$\endgroup\$
    – Andy aka
    Jan 3, 2022 at 18:52
  • 1
    \$\begingroup\$ Perhaps the spikes originate in your Vcc supply or from a ground loop. Can't tell from the schematic if you're using a battery, or some kind of wall-wart. Could you give us a scope trace of Vcc and see if there are spikes there? \$\endgroup\$ Jan 4, 2022 at 0:13
  • 2
    \$\begingroup\$ I don't know if I would trust 1N4007 @ 3300Hz. It's not meant to be a fast diode at all. \$\endgroup\$ Jan 4, 2022 at 10:50
  • \$\begingroup\$ @Andyaka the raw tacho waveform is clean (as shown on the first picture, except the little vertical line each 20ms) in the full frequency range (0-3300) \$\endgroup\$
    – nipil
    Jan 4, 2022 at 15:51
  • 2
    \$\begingroup\$ 30µs would be 10% of a period length @ 3300Hz. I'd call that significant. \$\endgroup\$ Jan 4, 2022 at 16:03

1 Answer 1


The signal is really noisy, so I would be sure that motor housing is grounded. Also shielded cables from control board to motor, and shielded+twisted from tacho to sensing circuit could help reducing this issue. In schematics, a capacitor in vref to ground is a good idea to stability.

And finally take a look to TDA1085C motor controller data sheet, specially at Tachogenerator Circuit:

The tacho signal voltage is proportional to the motor speed.Stability considerations, in addition, require an RC filter, thepole of which must be looked at. The combination of bothelements yield a constant amplitude signal on Pin 12 in mostof the speed range. It is recommended to verify this maximumamplitude to be within 1.0 V peak in order to have the largestsignal/noise ratio without resetting
the integrated circuit(which occurs if VPin12 reaches 5.5 V). It must be also verifiedthat the Pin 12 signal is approximately balanced between“high” (over 300 mV) and “low”. An 8−poles tacho is aminimum for low speed stability and a 16−poles is even better.The RC pole of the tacho circuit should be chosen within30 Hz in order to be as far as possible from the 150 Hz whichcorresponds to the AC line 3rd harmonic generated by themotor during starting procedure. In addition, a high valueresistor coming from VCCintroduces a positive offset at Pin12, removes noise to be interpreted as a tacho signal. Thisoffset should be designed in order to let Pin 12 reach at least− 200 mV (negative voltage) at the lowest motor speed. We remember the necessity of an individual tacho groundconnection.

They recommend filtering much stronger, so increasing tacho signal voltage is compensated, and constant voltage is obtained. Basic application values for tacho input are 22 kOhm and 220 nF, that is 33 Hz filter, and don´t use input rectifier (you can miss signal at low speed, if voltage is below bridge diodes drop).


Your Answer

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

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