• Become a member
  • Log In
The Institution of Electronics
  • Home
  • About us
    • Our Objectives
    • Our History
    • Governance of the Institution
  • The Electron Magazine
    • 2024
      • 2024 – Winter
      • 2024 – Spring
      • 2024 – Summer
      • 2024 – Autumn
    • 2025
      • 2025 – Winter
      • 2025 – Spring
      • 2025 – Summer
      • 2025 – Autumn
    • 2026
      • 2026 – Winter
      • 2026 – Summer
  • Members
    • Membership Grades and Fees
    • Members’ Resources
      • The Electron Newsletter
      • The Archives
  • Education and Projects
    • National Electronics Competition
    • Student Members’ Projects
    • Arkwright Engineering Scholarships
  • News
  • Contact Us
  • Menu Menu
Uncategorised

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.

https://www.edn.com/wp-content/uploads/Measure-mains-frequency.mp4

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

  • Frequency division by any even number, with a 50% duty cycle output
  • Unmasking the ghosts in your grid with power quality analyzers

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

13 October 2026
http://institutionofelectronics.ac.uk/wp-content/uploads/2022/12/IOE_LOGO.png 0 0 whdsolutions http://institutionofelectronics.ac.uk/wp-content/uploads/2022/12/IOE_LOGO.png whdsolutions2026-10-13 13:45:072026-10-13 13:45:07Measure the AC mains frequency with an ordinary counter

Latest news

  • Measure the AC mains frequency with an ordinary counter13 October 2026 - 13:45
  • AI silicon tapeout: Can it beat a benchmark engineers trust?13 October 2026 - 04:37
  • The secret life of ferrite bead: More than just a lump on a wire12 October 2026 - 16:18
  • TP-Link’s Tapo P110M smart plug: Matter and energy monitoring matter12 October 2026 - 13:16
  • Measurement bandwidth9 October 2026 - 13:56
  • Practical design for a multi-output flyback converter with improved cross-regulation9 October 2026 - 08:50
  • The multi-gig Ethernet migration: Motivations and implementations8 October 2026 - 13:29
  • GaN FET meets megawatt-scale demands7 October 2026 - 20:15
  • FPGA IP accelerates deterministic networking7 October 2026 - 20:15
  • Microphone array advances acoustic detection7 October 2026 - 20:15
IOE LOGO 2

Become a member

click here

Become a member

click here

Become a subscriber

click here

Become a sponsor

click here

© Copyright - The Institution of Electronics | Website by WHD Solutions
  • Link to LinkedIn
  • Link to Facebook
  • Link to X
Link to: AI silicon tapeout: Can it beat a benchmark engineers trust? Link to: AI silicon tapeout: Can it beat a benchmark engineers trust? AI silicon tapeout: Can it beat a benchmark engineers trust?
Scroll to top Scroll to top Scroll to top