Discussion:
Mains voltage logger
Add Reply
David
2025-01-26 15:54:52 UTC
Reply
Permalink
From time to time (once or twice a day on average?) I see the lights
flicker.

It has been more pronounced today, but high winds may be making the supply
a bit more glitchy (although we aren't using any overhead wires as far as
I know).

This made me wonder if I could monitor and log the mains voltage over a
day.
I assume the sampling rate would have to be high to catch momentary
glitches, or a trigger which logs when the voltage strays outside a set
range.

Internet search has so far not helped much.

Has anyone done something like this?

Cheers



Dave R
--
AMD FX-6300 in GA-990X-Gaming SLI-CF running Windows 10 x64
--
This email has been checked for viruses by Avast antivirus software.
www.avast.com
Andy Burns
2025-01-26 16:13:12 UTC
Reply
Permalink
Post by David
This made me wonder if I could monitor and log the mains voltage over a
day.
I assume the sampling rate would have to be high to catch momentary
glitches, or a trigger which logs when the voltage strays outside a set
range.
I've got a Seaward mains disturbance recorder, it can count transients,
and give a yes/no for any dropouts longer than 1/2 a cycle or 2 cycles,
or any voltages outside of 240V +/-6% (pre-EU harmonisation)

It was used at a former employers to deflect blame from computers to
energy suppliers!

<https://securitytradesupplies.com/product/seaward-dr500-disturbance-recorder>
Jim the Geordie
2025-01-26 16:23:35 UTC
Reply
Permalink
Post by David
From time to time (once or twice a day on average?) I see the lights
flicker.
It has been more pronounced today, but high winds may be making the supply
a bit more glitchy (although we aren't using any overhead wires as far as
I know).
This made me wonder if I could monitor and log the mains voltage over a
day.
I assume the sampling rate would have to be high to catch momentary
glitches, or a trigger which logs when the voltage strays outside a set
range.
Internet search has so far not helped much.
Has anyone done something like this?
Cheers
Dave R
When I lived in rural Devon, I was at the 'end of the line'. I was a
long time ago because the picture on my TV screen got smaller and
smaller as the voltage dropped.
I rang SWEB who provided me with a voltage monitor. They then installed
a new transformer when I was proved not to be making it up.
--
Jim the Geordie
Andy Bennett
2025-01-26 16:31:59 UTC
Reply
Permalink
Post by David
From time to time (once or twice a day on average?) I see the lights
flicker.
It has been more pronounced today, but high winds may be making the supply
a bit more glitchy (although we aren't using any overhead wires as far as
I know).
This made me wonder if I could monitor and log the mains voltage over a
day.
I assume the sampling rate would have to be high to catch momentary
glitches, or a trigger which logs when the voltage strays outside a set
range.
Internet search has so far not helped much.
Has anyone done something like this?
Cheers
Dave R
Yes we are out in the sticks, and I have a Extech Instruments DL150
Voltage/Current Datalogger which I use to monitor our supply.
Theo
2025-01-26 16:33:25 UTC
Reply
Permalink
Post by David
From time to time (once or twice a day on average?) I see the lights
flicker.
It has been more pronounced today, but high winds may be making the supply
a bit more glitchy (although we aren't using any overhead wires as far as
I know).
This made me wonder if I could monitor and log the mains voltage over a
day.
I assume the sampling rate would have to be high to catch momentary
glitches, or a trigger which logs when the voltage strays outside a set
range.
Internet search has so far not helped much.
Has anyone done something like this?
Many 'smart plugs' which have power measurement also record mains voltage.
They may be able to log that to their platform which can be seen in their
app. They may not have a very high sampling rate (eg I wouldn't expect more
than 1Hz, probably less), or range (very out of spec voltages like 1kV
spikes may not be recorded)

If you have a logging platform (Home Assistant, Grafana, HomeKit, ...) it
may be possible to log the data from such a plug externally.

Theo
The Natural Philosopher
2025-01-26 20:12:52 UTC
Reply
Permalink
Post by David
From time to time (once or twice a day on average?) I see the lights
flicker.
It has been more pronounced today, but high winds may be making the supply
a bit more glitchy (although we aren't using any overhead wires as far as
I know).
Well sometimes LED lamps just flicker for no reaspn.

Of course you are using overhead wires, unless you are bang on a power
station. The 275kV is all overhead
Post by David
This made me wonder if I could monitor and log the mains voltage over a
day.
I assume the sampling rate would have to be high to catch momentary
glitches, or a trigger which logs when the voltage strays outside a set
range.
Internet search has so far not helped much.
Has anyone done something like this?
Cheers
Not a hard job for a Pi PICO W.

You can sample the ADC at up to MegaHertz range

Interleaving that with network calls is a bit tougher,.

But then I like writing code.
YMMV
Post by David
Dave R
--
“Those who can make you believe absurdities, can make you commit
atrocities.”

― Voltaire, Questions sur les Miracles à M. Claparede, Professeur de
Théologie à Genève, par un Proposant: Ou Extrait de Diverses Lettres de
M. de Voltaire
John Rumm
2025-01-27 01:45:00 UTC
Reply
Permalink
Post by David
From time to time (once or twice a day on average?) I see the lights
flicker.
It has been more pronounced today, but high winds may be making the supply
a bit more glitchy (although we aren't using any overhead wires as far as
I know).
This made me wonder if I could monitor and log the mains voltage over a
day.
I assume the sampling rate would have to be high to catch momentary
glitches, or a trigger which logs when the voltage strays outside a set
range.
Internet search has so far not helped much.
Some UPS devices will connect to monitoring software and record events
like this.
Post by David
Has anyone done something like this?
Mostly... It would be a trivial job to get an arduino or similar dev
board to do what you need.

Something like the little hack I did for a real time power monitor:

https://wiki.diyfaq.org.uk/index.php/DIY_Real_time_mains_power_meter

could be greatly simplified and co-opted to do just voltage monitoring.

You could take the circuit:

Loading Image...

ditch all the current monitor capability (i.e. all the left hand side of
the circuit). Lose the display, and just have it monitor the voltage
(indirectly using the output from the 9V AC transformer as a proxy). Log
that the serial console when there is an event of interest, or perhaps a
SD card etc.
--
Cheers,

John.

/=================================================================\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\=================================================================/
Jeff Layman
2025-01-27 11:16:43 UTC
Reply
Permalink
On 27/01/2025 01:45, John Rumm wrote:
could be greatly simplified and co-opted to do just voltage monitoring.
Post by John Rumm
https://wiki.diyfaq.org.uk/index.php/File:EnergyMonCircuitDiagram.png
Puts on incredibly picky hat...

Shouldn't T2 appear as 9V/240V AC rather than 240V/9V AC?

Takes off hat...
--
Jeff
Loading...