PMM (Pico Mains Monitor)


Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 1055
Posted: 08:45am 15 Sep 2021      

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