Mains Power Monitor

Use this section to discuss your embedded Flowcode projects.
medelec35
Matrix Staff
Posts: 1451
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Mains Power Monitor

Post by medelec35 »

Are you using a wired LAN?
If so are you able to try on a pc that has WiFi?
Martin

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Mains Power Monitor

Post by chipfryer27 »

Hi

It makes no difference if laptop is wired or not, if I double-click to open I get zero interfaces. If I open after starting runtime then I can select whatever interface I'm using without any issue at all. Incidentally laptop was wired when running overnight.

However I've now got it back home, and after the ESP initially connected to router, it then went into a huff.... Router is about two metres away through an internal wall but couldn't connect.

It's now connected after numerous repositioning / restart and I can see it in the DHCP table but that's about it. Can't reach it via the app, which could be related to port numbers / firewall.

Regards

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Mains Power Monitor

Post by medelec35 »

simon-sandtcontrols wrote:
Sun Sep 11, 2022 10:09 am
Hi,

I haven't looked at the software at all but I am guessing that the PF in this case is capacitive and not inductive, again a guess, that the code hasn't included a way of showing which direction it's gone?

Simon.
Hi Simon.
I would agree, its currently capacitive.
The power monitor is using a PZEM 004T-100A module.
It's stated that:
1.4 Power factor
1.4.1 Measuring range 0.00~1.00
1.4.2 Resolution : 0.01
1.4.3 Measurement accuracy : 1%

It does not look like it differentiates between inductive and capacitive since there are only positive values.
Martin

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Mains Power Monitor

Post by chipfryer27 »

Hi

After some downloading issues (see elsewhere) I uninstalled / reinstalled FCv9 but it made no difference. If I double-click to open the app I cannot select any network interface but if I first open FAD/Runtime and open the app from there I can see all interfaces.

Guess it's just a quirk of this laptop. No big deal really.

Now I need to figure out how to get things talking through my Draytek.

Regards,

simon-sandtcontrols
Posts: 19
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Mains Power Monitor

Post by simon-sandtcontrols »

medelec35 wrote:
Mon Sep 12, 2022 8:16 am
simon-sandtcontrols wrote:
Sun Sep 11, 2022 10:09 am
Hi,

I haven't looked at the software at all but I am guessing that the PF in this case is capacitive and not inductive, again a guess, that the code hasn't included a way of showing which direction it's gone?

Simon.
Hi Simon.
I would agree, its currently capacitive.
The power monitor is using a PZEM 004T-100A module.
It's stated that:
1.4 Power factor
1.4.1 Measuring range 0.00~1.00
1.4.2 Resolution : 0.01
1.4.3 Measurement accuracy : 1%

It does not look like it differentiates between inductive and capacitive since there are only positive values.
Hi Martin,

I have just had a look at the data sheet, I think they have missed a trick there. Pity it would have been a useful module but these days there is a lot more capacitive error and it can't be assumed all PF is inductive.

Simon

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Mains Power Monitor

Post by medelec35 »

Hi Simon.
I don't think it's just showing only one or the other.
By definition, the power factor is always between 0 and 1, whether inductive or capacitive.
Therefore if showing 0.4 that could mean either inductive or capacitive.
The reason for this is power factor is

Code: Select all

PF = KW / KVA
since KW will be the same or always less the value won't be negative or greater than 1
The - is shown so it can be determined if leading or lagging and that is down to the developer of the power monitor hardware to add.
The PF shown will be correct for inductive or capacitive loads.
Martin

simon-sandtcontrols
Posts: 19
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Mains Power Monitor

Post by simon-sandtcontrols »

Hi Martin,

Power factor can be either Leading (Cap) or Lagging (Ind), -1 to 1.

https://circuitglobe.com/difference-bet ... n%20nature.

Explains it quite well.

CIVIL - Cap = I (current) leads the V, Ind = V leads the I.

There is more to it than just PF = KW / KVA, that just gives a ratio.

I don't think this module can determine the difference, or at least if it can (which you would expect) it doesn't seem to pass on that information. The number will be correct as you say, but if you want to use that for correction purposes you need to know which way to go. I think it used to be a given that the error would be inductive, but I am not convinced that is always the case these days.

Sorry Chipfryer I think we have digressed from your problem to Power engineering.


Simon.

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Mains Power Monitor

Post by chipfryer27 »

Hi

Not at all, always interested to read wherever a thread takes (never thought a ToF post would lead to a zombie discussion) :)

Personally I don't think it matters too much in domestic premises as low values aren't economically problematic but in commercial / industrial they can be, with some suppliers penalising for low values. In very simplistic terms anything less than "1" is energy being wasted somewhere and someone has to pay. Incidentally for LED lights to be Energy Star compliant I think they can't be less than 0.7 (I assume individually).

If at the start of the day a factory begins then perhaps the PF won't be too bad as it will probably be lighting and office equipment (and kettles). However soon after, the motors powering whatever start up and the PF plummets for the rest of the working day. That can be a significant cost and you can (or could) get grants to correct. My EE friend found this to be quite lucrative. I hasten to add I'm no expert in the subject, he's far more knowledgable than I.

Back to my ESP monitor. Nothing to do with my Draytek, which can be a pain to configure at times. It showed the ESP as connected but I couldn't reach it. However that was my mistake (not telling how long before I realised). After my initial check that it was connecting, I moved it into a cupboard, beside the consumer unit. Checking again I saw the ESP in my DHCP list but couldn't "reach it". Looking at the module I could see all the LEDs flashing which I presumed meant all was good (silly me).

I should have rebooted the router which would force everything to repopulate the list. When I did, the ESP didn't show and wouldn't even after rebooting the ESP module. It's about two metres away through a partition wall so I'm very surprised at the lack of range. Although not actually connected to the WiFi it appears to carry on working (i.e. all the LEDs that should flash, do). I may modify and add in a couple of LEDs (or even one of those eentsy displays) to warn of such problems etc.

In another post I think I've found a way to set the ESP Tx power to maximum so I'll try increasing and hopefully it will then connect. Not ruling out that I just have a dodgy ESP as it was bought from a well known cheap electronics supplier.

Regards

simon-sandtcontrols
Posts: 19
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Mains Power Monitor

Post by simon-sandtcontrols »

Hi Chipfryer,

Have you checked the plasterboard isn't foil backed or has Celotex in the wall?

Simon

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Mains Power Monitor

Post by chipfryer27 »

Hi

If it is anything other than a couple of metres LOS then I have problems. Nothing else in the house has issues even in the cupboard. I attached a couple of little BT headphones to the cat's collar and I could still annoy/play/send it music (delete as appropriate) when it was in there so I'm pretty sure it's my ESP.

Regards

PS
Incidentally cat appears to listen to :- Lion Sleeps Tonight, Stray Cat Strut, Cat Scratch Fever, Cool For Cats, anything by Cat Stevens or Meows, but not so keen on Who Let The Dogs Out......

Post Reply