Measure the AC mains frequency with an ordinary counter


Knowing the mains frequency is important in many industries; the speeds of AC motors, for example, are dependent on it. The motor speed= (120*F)/P, where F is the mains frequency and P is the number of poles. Since P is a fixed number for any motor, speed varies in proportion to mains frequency. This frequency can be easily measured by MCU-based projects within a small gating time. The period is measured and 1/T is computed to obtain the frequency.

For non-MCU projects, the mains frequency can be measured with a simple counter within a gating time of 1 second. For 50 Hz (as followed in countries like mine, India), this will show 50 ± 1. If you increase the gating time to 10 seconds, the reading will be 500 ± 1. Finally, if you set the gating time to 100 seconds, the counter will show 5000 ± 1 which can be made to read 50.00. This accuracy is acceptable, but the gating time is too high for the measurement to update within a reasonable period.

What is the alternative? If you can multiply the frequency by 100 and then feed it to the counter, the counter will read 5000 within a gating time of 1 second, which can be made to show 50.00. You will get a resolution of 0.01 Hz while keeping the gating time as 1 second. This is what’s done by the circuit in Figure 1, which implements a by-100 frequency multiplier based on a modified PLL (phase lock loop).


Figure 1 This circuit multiplies the AC mains frequency by 100 and displays the result using a simple counter scheme. The component values shown assume a 50 Hz mains source.

How does it work?

  • Transformer T1 gives an output of 6V AC; this same transformer can be used to produce 5V DC required to power the circuit. U1A is used as zero cross detector, whose output is the mains waveform converted to a square wave with a 50% duty cycle.
  • The 6V AC output routes to pin 1 of U2A, an exclusive OR gate. This IC acts as a phase detector.
  • U3, a 555 timer, functions as 5,000 Hz square wave generator.
  • This frequency is divided by 10 using U4A, a 4518 counter.
  • U4B, another 4518 counter, and U5, a 4585 comparator, operate as a frequency divide-by-5 circuit. In digital comparator U5, another 4585, inputs A0, A1, A2 and A3 are connected to the outputs Q0, Q1, Q2 and Q3 of the U4B previous stage. Input B3, B2, B1 and B0 are hardwired as 0101 (5). When the count in U4B reaches 5, its A=B output sends a pulse to U6A (another 4518 counter) and resets U4B so that it starts counting from zero again.
  • U6A’s Q0 output divides the input frequency by 2.
  • Thus, the combination of U4A, U4B, U5 and U6A operates as divide-by-100 circuit.
  • This divide-by-100 output is connected to pin 2 of U2A, again acting as phase detector.
  • U2A’s output feeds a low-pass filter circuit formed by R2 and C1, and is then connected back to pin 5 of the 555, circuit which works as voltage-controlled oscillator (VCO).
  • Thus, the PLL circuit closes and the 555 output is then read in the counter as the AC mains frequency multiplied by 100.

If the mains frequency variation is in a narrow range of, say, 48 to 52 Hz, this PLL circuit works nicely. The power supply and ground pins of the digital ICs are not shown in the circuit diagram.

Note that since the divide-by-10 output of the 4518 IC is not a square wave with 50% duty cycle, the divide-by-10 second stage was done in two parts: divide-by-5 and divide-by-2, thus solving the challenge of the closing of the phase lock loop.

60 Hz operation notes

Countries such as the United States instead use a 60 Hz mains frequency. With some component changes, this circuit will also measure 60 Hz ± 2 Hz accurately.

  • Transformer T1 should be a 110V/6V AC, 60Hz variant.
  • The 555 multivibrator should be tuned to oscillate at 6000 Hz. R3=R4=11K and C2=0.01uF.
  • For the low pass filter, R2=110K and C1=2.6uF.

The following video shows the operation of this circuit for 49.55 Hz and 50.55 Hz simulated mains frequencies.

Jayapal Ramalingam has over three decades of experience in designing electronics systems for power & process industries and is presently a freelance automation consultant.

Related Content

The post Measure the AC mains frequency with an ordinary counter appeared first on EDN.



Source link