Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:40 03 Dec 2021 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PMM (Pico Mains Monitor)

Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 952
Posted: 08:45am 15 Sep 2021
Copy link to clipboard 
Print this post

This post does not really fit the forum.
Origin of this forum is about generating electricity (in Australia) from wind and solar.
I am living in Netherlands where electricity is provideed via national grid, and I am connected to it. In the transition to green however the grid get's burdened with many local electricity suppliers.

In my neighborhood solar panels are popping up like fungus on blue cheese. And recently I have lost 2 mains adapters. Technician as I am I noticed by opening up the adapters that in both cases the input overvoltage protector (MOV) was blown. So I am worried the grid voltage exceeds normal voltage tolerances.

To measure these, I am developing this mains voltage logger based on a RPi pico running MMBasic. For this to work you need at least 5.07.b17.

Here are some pictures of the development.

I am using a small bell transformer for isolation from the mains and a voltage divider using ADC in the pico on GP26. The logger measures continuous in the background and samples the mains at 2kHz (40 samples per sine wave at 50Hz) using the ADC command. Using of MATH functions process the data to an RMS value (actually MATH(SD array()) does a perfect ac-rms on it's own including dc cancelation.

It is work in progress as you can see from the pictures.

Missing is:
- RTC
- FFT graph
- Waveform Graph
- logging events on SD card

I plan to power the setup from a powerbank with charger connected in first instance. So if mains drops, it is still registered.






Edited 2021-09-15 18:46 by Volhout
If nothing goes right ... turn left
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 891
Posted: 09:08am 15 Sep 2021
Copy link to clipboard 
Print this post

  Volhout said  
So I am worried the grid voltage exceeds normal voltage tolerances.

I know at my place in sunny QLD AU, we get over 260VAC at times when the sun is shining & the loads are light.

The inverters are supposed to be limited to about this voltage but ours is not. The installer was not interested in resetting it.

The only real casualty I've had was with a fairly large SMPS I got on line awhile ago. One of the series mains filter capacitors let out heaps of smoke & unpleasant odours. Got full refund though.

The voltage ratings of most stuff advertised doesn't really fit the maximums we get here.

Brian
ChopperP
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1196
Posted: 09:17am 15 Sep 2021
Copy link to clipboard 
Print this post

I'd suggest a fusible resistor followed by a MOV on the secondary of the transformer in addition to anything else. Just in case.
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1686
Posted: 11:53am 15 Sep 2021
Copy link to clipboard 
Print this post

  Volhout said  In my neighborhood solar panels are popping up like fungus... the input overvoltage protector (MOV) was blown.


this is quite a problem in UK.

Because "no voltage drop no current flow" people with panels on a feed-in tariff have to be generating at a higher voltage to push back into the grid so they do anything other than cover drop-outs in high demand periods (they naturally want to be earning as much as possible).

So person A notices their payments have dropped because their energy feed-in has dropped, so they call the "solar man" he comes round and tweaks their kit up a volt or two. Now person B has the same problem and so-on throughout the community.

I have seen mains voltage at almost 260V (UK nominal is 240) in some areas because of this and it isn't going to get better any time soon.

Of course this endless tweaking shouldn't happen but how do you explain the complex problem to people that know only that they want to earn the amazing amounts the sales guy promised and  nothing about kirchoff, ohm et al
.
Edited 2021-09-15 22:03 by CaptainBoing
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1196
Posted: 12:40pm 15 Sep 2021
Copy link to clipboard 
Print this post

From what I understand (we used to install PV systems in the UK) the domestic side isn't a big problem. That's because in most cases the arrays are relatively small compared to the load. There will be excess generation sometimes, but it's not enormous.

The PV inverter usually tracks the grid voltage to only allow a certain amount of feed-in, no matter what the conditions are. Many will keep it low or non-existent until the locally connected load is satisfied because if you don't do that you are paying for electricity at a higher rate than you can get paid for generating it.  

Industrial consumers, with large arrays, have to have export restriction in place, otherwise their DNO will be round to disconnect them! That's because they are capable of affecting distribution wiring and protection equipment on the network through over-generation. There is a set of specific equipment that has to be installed on those sites or they won't get connected.

Severe over-volt problems in the UK are usually caused by local problems, such as a large factory shutting off some big loads or complaints about low voltage off one sub (maybe because of a new housing estate) turning into complaints about high voltage on another. Both those usually get fixed eventually, but it might be when new subs get installed or older ones updated or readjusted. It's worth telling your DNO if there are frequent over-voltage issues. I know of an area not far from here who do have a problem, but they are right on the sub feeding a huge factory complex. Short of moving the domestic stuff onto a different HV line it's not likely that their problem will get fixed.
Edited 2021-09-15 22:42 by Mixtel90
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 4475
Posted: 09:29pm 15 Sep 2021
Copy link to clipboard 
Print this post

In Australia, the inverters are supposed to cut out with a voltage over 254V.

Australia used to have a nominal voltage of 240V but was reduced to 230V some time ago. I don't think the supply companies have bothered to change the taps on too many transformers so we run close to the maximum at times.

I am glad I am no longer responsible for any of that.

A few years ago I built a disturbance recorder based on a MX170 to record the AC waveform for a number of cycles before and after a sudden change in voltage.
I must get back to it. Another half done project to finish.

Jim
VK7JH
MMedit   MMBasic Help
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1196
Posted: 09:54pm 15 Sep 2021
Copy link to clipboard 
Print this post

The paperwork was changed to "harmonise" the 240V UK mains with the 220V European mains without actually changing anything. :)
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
phil99
Senior Member

Joined: 11/02/2018
Location: Australia
Posts: 227
Posted: 01:12am 16 Sep 2021
Copy link to clipboard 
Print this post

@Mixtel90
Same in Aus. When the nominal voltage changed from 240 to 230 the percentage over and under voltage limits were also changed resulting in exactly the same actual limits. The distribution companies were free to do nothing, and they did nothing.
The problem of miss-match between solar / wind output and demand is slowly being addressed by adding large battery banks to the grid.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 952
Posted: 10:06am 16 Sep 2021
Copy link to clipboard 
Print this post

When United Kingdom joined Europe (yes they did once) there was an agreement to harmonize mains voltages. They settled on 230V (mid between 220 and 240) for the whole of Europe. The bulk of the countries on mainland Europe where using 220V at that time.

Since this change would affect the whole grid (pan European) the whole of Europe changed to 230V.

And then Britain itself decided to stay 240V.....

The Brits have a history of being stubborn. That may be why they where able to resist Hitler until the Yanks came. So be proud to be British, be realize what you do to the rest of the world.

Volhout.
If nothing goes right ... turn left
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1686
Posted: 10:42am 16 Sep 2021
Copy link to clipboard 
Print this post

  Volhout said  
The Brits have a history of being stubborn.

no we don't    



Edited 2021-09-16 20:45 by CaptainBoing
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 1196
Posted: 11:14am 16 Sep 2021
Copy link to clipboard 
Print this post

The UK standard, pre-harmonization, was (by law) 240V i.e. 225.6 to 254.4 V.

The EU wanted harmonization across Europe with a 220V system, but that would have cost the UK millions to implement so an agreement was made to change UK law to allow 230V i.e. 216.2V to 253V. That allowed EU harmonization yet kept the 240V equipment that would have had to be replaced otherwise.

It was the only way really, changing everything from 240V to 220V for the sake of EU paperwork would have been madness. Our "nominal voltage" is now 230V, but the actual voltage in most areas is 240V or just above.
-- Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
MikeO
Senior Member

Joined: 11/09/2011
Location: Australia
Posts: 254
Posted: 02:33am 17 Sep 2021
Copy link to clipboard 
Print this post

Moons ago when I was working and a Field engineer, much of the instruments I worked on were in Hospital or university labs. Most contained HV supplies for Photo Multiplier Tubes, which had a habit of failing overnight or the weekend as the mains supplies went up when the day time loads came off, If suspected we would perhaps put a logger on the supply and 254-258vac would not be unusual killing supplies or dynode strings. If it wasn't that maybe the odd clean of fried Mice  
Codenquilts
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 952
Posted: 07:38am 22 Oct 2021
Copy link to clipboard 
Print this post

Finally got time to pick this up again. The code is growing quite big for the build in editor. I have been using a lot of defines based on MM.Hres and MM.Vres, but it is becoming so complex I may drop the variables and hard-code (just to clean up the code).
It is going to be 1 one-off anyway.

Tried to upload a "BMP" file, created by SAVE IMAGE xxx, but the forum would not cooperate...
If nothing goes right ... turn left
 
phil99
Senior Member

Joined: 11/02/2018
Location: Australia
Posts: 227
Posted: 11:02am 22 Oct 2021
Copy link to clipboard 
Print this post

Converting BMP to PNG or JPG first seems to allow upload.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 726
Posted: 06:17am 23 Oct 2021
Copy link to clipboard 
Print this post

@CaptainBoing        
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 952
Posted: 08:05am 23 Oct 2021
Copy link to clipboard 
Print this post

jpg


png



png looks better, even at 100% quality of jpg



Pico, LCD and 6 components....
And a lot of math...

thanks Peter, especially for the ADC function.

The code runs 3 levels interrupts
top level: sampling (machine code, Peter does all that)
lower level: interrupt buffer full
lowest level: timer interrupt (refresh screen every second)

What I still have to do:
- implement RTC (I now enter date and time, but the pico time$ is not really accurate, need to add a DS3231).
- save events to SD card (complete ADC samples array, so you can actually analyze what went wrong, a single peak, or constant level, or outage).

Once I have a publish-able version (with comments) I will publish here.

Volhout
Edited 2021-10-23 18:08 by Volhout
If nothing goes right ... turn left
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2021