There are now a couple of examples on the Wiki
One is for the ESP32 TTGO, sending the data to the built-in gLCD
The other is for Arduino Uno, using the timer UART to output the data at a baud rate of 19200
The simulation will give 9's and that is expected.
When running on hardware the correct results should be obtained.
New component: PZEM-004T Power Monitor
-
- Matrix Staff
- Posts: 2086
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 644 times
- Been thanked: 702 times
-
- Matrix Staff
- Posts: 2086
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 644 times
- Been thanked: 702 times
Re: New component: PZEM-004T Power Monitor
Hi Jorgen.
You're welcome.
I have just added some notes and a warning on the Wiki.
They are great units.
One application could be to monitor an extension lead and sound an alarm if exceed the rating.
I also use it to monitor mains supplied by my consumer unit.
The energy can be monitored so the price of energy can easily be calculated.
I'm thinking of adding that to the examples.
Can you let me know how you get on, please?
You're welcome.
I have just added some notes and a warning on the Wiki.
They are great units.
One application could be to monitor an extension lead and sound an alarm if exceed the rating.
I also use it to monitor mains supplied by my consumer unit.
The energy can be monitored so the price of energy can easily be calculated.
I'm thinking of adding that to the examples.
Can you let me know how you get on, please?
Martin
-
- Posts: 813
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 696 times
- Been thanked: 183 times
Re: New component: PZEM-004T Power Monitor
Hi Martin!
Concerning Wiki, thank you for info, I will have a look, and look at your examble.
Would be nice with price calculation too.
It seems to be an exciting unit, which is also why I ordered one right away. I ordered on Ebay so it may take a while before I receive the package. The moment I have the module I will test it and you will be the first to hear the result. In the meantime, I start getting ready to
have the program ready with Lcd display and arduino.
By the way, can I use ESP 32 TTGO wihtout have ESP IDF ver 5.0?
So far thank´s
Br Jorgen
Concerning Wiki, thank you for info, I will have a look, and look at your examble.

Would be nice with price calculation too.
It seems to be an exciting unit, which is also why I ordered one right away. I ordered on Ebay so it may take a while before I receive the package. The moment I have the module I will test it and you will be the first to hear the result. In the meantime, I start getting ready to
have the program ready with Lcd display and arduino.
By the way, can I use ESP 32 TTGO wihtout have ESP IDF ver 5.0?
So far thank´s

Br Jorgen
-
- Matrix Staff
- Posts: 1952
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 698 times
Re: New component: PZEM-004T Power Monitor
Yes this should work fine in the default IDF v4.1.By the way, can I use ESP 32 TTGO wihtout have ESP IDF ver 5.0?
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 2086
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 644 times
- Been thanked: 702 times
Re: New component: PZEM-004T Power Monitor
Hi Jorgen.
You're welcome.
In addiiton to bens reply.
For anyone reading this topic. I can confirm I have tested with both V4.1, 4.2 and 5.0
It works for all three versions.
So whichever version you have, there is no need to switch.
You're welcome.
In addiiton to bens reply.
For anyone reading this topic. I can confirm I have tested with both V4.1, 4.2 and 5.0
It works for all three versions.
So whichever version you have, there is no need to switch.
Martin
-
- Posts: 813
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 696 times
- Been thanked: 183 times
Re: New component: PZEM-004T Power Monitor
Hi Ben and Martin!
Thank`s I Will order a ttgo too
In meanwhile I wait for the module I am starting on a testprogram with the PZEM module with a LCD display, later I att. the program and maybe you could have a look at it and check If it is possible what I do or not, so far it work in simulation
Br Jorgen
Thank`s I Will order a ttgo too

In meanwhile I wait for the module I am starting on a testprogram with the PZEM module with a LCD display, later I att. the program and maybe you could have a look at it and check If it is possible what I do or not, so far it work in simulation

Br Jorgen
-
- Valued Contributor
- Posts: 1685
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 374 times
- Been thanked: 583 times
Re: New component: PZEM-004T Power Monitor
Hi Jorgen
If you take a look at Flowcode App Developer you will find under free apps a complete working example of using the module. This connects to your PC running FAD via WiFi.
It may give you some pointers, and I can confirm that Martin's component is very easy to use allowing you to customise things to your needs. I'm really tempted by the TTGO too, but having loads of 16x2 displays I can't really justify the need vs cost
Regards
If you take a look at Flowcode App Developer you will find under free apps a complete working example of using the module. This connects to your PC running FAD via WiFi.
It may give you some pointers, and I can confirm that Martin's component is very easy to use allowing you to customise things to your needs. I'm really tempted by the TTGO too, but having loads of 16x2 displays I can't really justify the need vs cost

Regards
-
- Posts: 813
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 696 times
- Been thanked: 183 times
Re: New component: PZEM-004T Power Monitor
Hi Chipfryer!
Well ok I will have a look, thank´for hint. Yes I also have a lot of LCD display, so I understand you, but I already order a TTgo, so look forward to test Martins project.
As mention, while I wait for delevery I have made a testprogram with a LCD display, only test so not all parameter is added, maybe you and /or Martin will take look at my testprogram for see if I am totally "on wrong way"
Br Jorgen
Well ok I will have a look, thank´for hint. Yes I also have a lot of LCD display, so I understand you, but I already order a TTgo, so look forward to test Martins project.

As mention, while I wait for delevery I have made a testprogram with a LCD display, only test so not all parameter is added, maybe you and /or Martin will take look at my testprogram for see if I am totally "on wrong way"

Br Jorgen
- Attachments
-
- PZMLcd.fcfx
- (15.6 KiB) Downloaded 438 times
-
- Valued Contributor
- Posts: 1685
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 374 times
- Been thanked: 583 times
Re: New component: PZEM-004T Power Monitor
Hi Jorgen
Your chart is pretty similar to the one I made to test functionality. In it I read every value and displayed, set a threshold, and if threshold was breached I'd reset the Energy. Purely as a test, and it worked fine.
I'm sure you will have similar success.
Regards
Your chart is pretty similar to the one I made to test functionality. In it I read every value and displayed, set a threshold, and if threshold was breached I'd reset the Energy. Purely as a test, and it worked fine.
I'm sure you will have similar success.
Regards