Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Mains frequency monitor

Things

0
Joined
May 1, 2007
Messages
7,517
Points
0
This may not sound like a particularly impressive project compared to some here, though once you understand some of the details of it, it's really quite interesting.

Ever wished you could detect blackouts and brownouts before they actually happen? Well, you can, and all from any standard mains outlet in your house!

So what does it actually do, and why is it useful?

Well, to understand that, you need to think a bit into the infrastructure of your typical power grid. This device is able to monitor frequency down to surprisingly low fluctuations, which you can then log to a computer, or just display on a simple volt/current meter.

At the heart of all power grids are generators, which must spin at a certain speed in order to keep the line frequency constant. The speed of the generators is HIGHLY regulated, in fact, in many countries, even fluctuations as small as +- 0.2Hz are illegal.

Because many mains powered devices rely on the mains frequency being a constant 50 or 60Hz depending on where you live, many things are affected by these frequency changes. For example, AC induction motors will speed up/slow down, AC based clocks may lose or gain time, and well, most electronic devices are designed to only work within a specific frequency range.

With a basic understanding of electronics, you will know that the speed a generator runs at is dependent on the load it's driving. High loads will induce eddy currents in the generator, and cause it to slow down, while light loads will allow it to speed up.

This, in turn, affects the frequency of your mains power.

So how can it detect black/brown outs?

A brownout is usually caused by a load being too high for a given circuit, or short circuits in neighbouring sub-circuits, while blackouts are usually caused by shorts on your own sub-circuit, or in some extreme cases, the entire distribution grid. In many cases, the transformer and protection circuitry for your suburb will detect a brownout condition, and kill the power entirely until it is restored to normal voltage to protect equipment.

When large loads connect and disconnect from the main grid, they will cause the generators to speed up or slow down, varying the frequency of the entire grid. By monitoring the frequency, you can detect entire suburbs blacking out, possible brownouts and thus possible blackouts as well.

The measuring circuit consists of a simple bandpass filter and the library here: Lab3 - Laboratory for Experimental Computer Science

DSCF5091.jpg


It uses timers 0 and 1 on the Arduino as comparators. It generates a very accurate pulse, which your measured frequency is then compared to. Because of this, all the measurement is done in hardware, and anything you do in your main code loop won't effect the accuracy of the reading.

I have started work on a basic computer GUI for it, that graphs the readings over about 28 seconds, as well as an analog reader that averages out the values for smoother movements.

freqgraph8.png


The screenshot was taken as the meter needle was updating, so you can only see part of it there.
The graph at the bottom extends from 49.9 to 50.1Hz, so as you can see, the movements are really tiny, but can still mean a lot.

For example, you will notice that the frequency reading will typically be below 50hz around 6pm - When everyone is getting home, cooking, turning on their heaters etc, whereas around midday it'll stay above 50Hz most of the time.

In the case of the Australian main power grid, the entire east coast is interconnected, so theoretically you could detect blackouts in suburbs over 3000km away, however it depends largely on local and far generation as to how obvious it is.

I had a friend in Sydney (Roughly 600km away, and a major city) do a comparison on a 6 digit frequency counter, and our results were almost identical:

freqmeter.PNG


Note that his frequency counter only sampled twice per second, where mine sampled every 50ms or so, so there is a fair bit of fluctuation in my readings, but the general trend matches.

We coordinated the event over IRC, so you can see that my reading was a few seconds before his.

Just because it looks cool, I decided to attach an analog current meter to my Arduino and let it act as a meter as well. It is connected to pin 3 (Only pins 3 and 11 will work for PWM with this setup, as the others are being used for timing), and has a lowpass filter consisting of a 82K resistor and 10uF capacitor.

It tracks the meter needle on my screen quite nicely, too!

DSCF5097.jpg


Anyway, just thought I'd share this interesting little project I've been working on :)

Dan
 
Last edited:





Joined
Nov 14, 2009
Messages
756
Points
0
That is so cool. You should get PCBs made and sell a kit, I would definetly get one.
 
Joined
May 31, 2009
Messages
3,239
Points
63
Another cool thing would be to blast high frequency through power lines and see if anyone else can see it.

That's a really cool project! +rep
 
Joined
Sep 20, 2008
Messages
17,622
Points
113
A very Interesting project...

How would it handle an X10 product signal piggybacked
on the power grid AC signal...or would it not see it...:thinking:

Many years ago I was working on a project to predict
approaching storms by detecting far away lightning
strikes...


Jerry

You can contact us at any time on our Website: J.BAUER Electronics
 
Last edited:

Things

0
Joined
May 1, 2007
Messages
7,517
Points
0
Yes, I have a lightning detector also, it's great fun :D

The library itself is capable of measuring frequencies up to 20Khz I believe, however my isolation setup conists of a 12VAC transformer, which is feeding a bridge rectifier and a optocoupler. The nature of iron core transformers is they don't transmit high frequencies very well.

If you used a different method, you could probably pick up the high(er) frequency ripple power companies inject to turn on/off high load devices during peak times, such as electric water heaters. I believe it's around 1050Hz in Aus.
 

Fiddy

0
Joined
May 22, 2011
Messages
2,726
Points
63
hehe nice, im sure you could find a way to blast that high frequency ripple onto the 50hz wave to bring in those zellweger relays in everyone's hot water system :)
 




Top