Is it normal for mains frequency to wander around this much?

Oct 10, 2026 Last reply: 17 hours ago 4 Replies

First reply

lee.ortiz

Your numbers look exactly right to me. The grid really does wander about like that. I built basically the same thing a few years back, transformer into an optocoupler into a micro, and logged it for months. A day over here in the UK looks like a slow random walk between roughly…

Read the full reply

I knocked togather a little frequency meter for the mains out of curiosity after watching a documentary about how grid operators juggle the frequency up and down all day. It's just a small plug-in transformer feeding a microcontroller that counts the zero crossings, with a basic display showing the result to two decimal places.



The thing works, but I'm second-guessing the numbers. Over the space of a minute it'll sit at 50.00, then drift down to 49.96, creep back to 50.03, and so on. It never stays pinned on one value for more than a few seconds. Is the grid genuinely wobbling about like that, or is my pickup circuit just noisy and jittering the timing? I tried averaging over ten cycles instead of one and it smooths things out a fair bit, but I don't know if I'm now hiding real movement. Kettle going on makes the number dip a bit, wich I assume is real. Anyone else built one of these and can say what sort of wiggle is normal day to day?


Your numbers look exactly right to me. The grid really does wander about like that. I built basically the same thing a few years back, transformer into an optocoupler into a micro, and logged it for months. A day over here in the UK looks like a slow random walk between roughly 49.9 and 50.1, sitting at 50.00 only when the operators have it balanced nicely. Your 49.96 to 50.03 drift is completely normal. The frequency moves whenever generation and load fall out of balance, even slightly. Millions of kettles, motors and chargers all doing their own thing means it never truly sits still. And yes, the kettle dip is real. A big resistive load suddenly switching in drags the frequency down for a few seconds until the generators respond. You can sometimes see it recover and overshoot a touch afterwards. On the averaging question, ten cycles is a good move and you are not hiding anything important. The real wiggle happens over seconds and minutes, not between individual cycles. If anything, single-cycle readings will show jitter from waveform distortion, because household mains is never a clean sine, and that noise lands right on your zero crossing timing. Averaging over a second or so gives you a number much closer to what the grid operator actually sees. If you want to sanity check your circuit, compare your reading against a cheap plug-in energy meter or a multimeter with a frequency range. They shold agree to within a couple of hundredths. The fun part is watching it over a full day. You will notice it sag during evening peak when everyone is cooking, then drift slightly high overnight as demand drops. The operators also nudge it back on target through the day to make up lost time, which is why a mains-driven wall clock can be minutes off in the afternoon but catch up by morning. Logging frequency and plotting it is half the fun of the build, so consider adding a timestamp to your display.

Mine does the same dance, and one thing I noticed after logging mine for a while is the lunchtime bump. Around midday the reading tends to sit a touch high, I reckon because all the rooftop solar round here is doing its thing and the big plants ease off. Evenings it sags, exactly like the other poster said. One tip on the measurement side: check how you're timing the zero crossings. If you're using a slow polling loop rather than an actual interrupt, you'll get jitter on the last digit that's got nothing to do with the grid. Interrupt-based timing cleaned my display up no end.

Mine had the same kind of wobble and it turned out half of it was my own front end. I was feeding the micro straight off a resistor divider and the flat tops on the local waveform were shuffling the crossing point around. Swapping in a small 9V transformer with a couple of RC stages ahead of the pin cleaned it right up, and the readings settled down nicely. Only after that did I bother averaging, and even then just over a second's worth. Also worth checking your supply voltage to the micro isn't picky, a noisy rail shifts the threshold and drags the timing with it.

Funny timing finding this thread, I've been wondering for ages why the cheap wall clock in my kitchen slowly loses time compared to my phone, then catches back up after a few days. Never connected it to the grid frequency doing this little dance untill I read the replies here. Now I'm tempted to build one of these meters just to see it happening live. Bit out of my depth on the microcontroller side though, I've only ever done simple LED stuff with a starter kit. Is the transformer input the easiest way in for someone like me, or is there a gentler beginner route I should look at first?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required