GithubHelp home page GithubHelp logo

sharandac / powermeter Goto Github PK

View Code? Open in Web Editor NEW
36.0 10.0 7.0 26.76 MB

A very flexible ESP32 power meter / energy meter with SCT-013-0x0, ZMPT101B, ACS712 sensors

License: GNU General Public License v3.0

JavaScript 2.30% HTML 5.76% CSS 0.94% C++ 22.88% C 3.51% G-code 64.30% Prolog 0.09% Makefile 0.02% Shell 0.12% Python 0.09%
esp32 powermeter mqtt websocket adc measurement sensor realtime sct-013 acs712

powermeter's People

Contributors

sharandac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powermeter's Issues

L2 filter problem

I would like to rise another problem.
I'm preparing my implementation of your PowerMeter and I can see there is a problem with channel connected to: ADC1-CH7 (GPIO35).
I have HW with all 3 current lines connected to SCT013-030 installed on the same wire + 3 ZMPT101B fed with the same voltage. So all 3 voltage and 3 current reading should be the same.
And when you look at live view all is the same, but when you take a closer look at L2 and current, it is seen that this value is different and is not stable as others.
Take a look at this video:
https://youtu.be/L46QpZTydEg
on oscilloscope readings for L1 and L2 are the same. But when you look at spectrum and filtered value you can see difference. On spectrum you can see some pumping, L2 value jumps.
All channels are set the same, my measure.json file below.
@sharandac would you mind helping me with that?
measure.json
I checked different ESP32 boards, I played with sensors, channels and look like problem is attached to: ADC1-CH7 (GPIO35) directly.

edit:
After some research
-it is not good idea to change ADC channels for predefined L1-3 current and voltage, so follow default:

L1 I ADC1-CH5 GPIO33
L1 V ADC1-CH0 GPIO36 SVP
L2 I ADC1-CH6 GPIO34
L2 V ADC1-CH3 GPIO39 SVN
L3 I ADC1-CH7 GPIO35
L3 V ADC1-CH4 GPIO32

if you change this any calculations defined in virtual channels such a power will be broken;
-in default measure.json microcodes for power and reactive power are mixed, so please be aware of that.

BTW why "all power" as a sum of all powers is not a sum?
2024-05-10 23_56_52-
0,042+0,041+0,043 != 0,101

How to change/add HW port

Hi @sharandac,
I have small question, is it possible, if yes where/how, to change default input ADC ports? In example to use GPIO15 for L1 current measurement (change from ADC1-CH5 to ADC2-CH3)?

error: 'arduinoFFT' was not declared in this scope`

If any of you would have compile error:
src/measure.cpp:480:9: error: 'arduinoFFT' was not declared in this scope
please be aware lib kosme/arduinoFFT is not backward compatible.

Easiest solution is to update platformio.ini file and change:
kosme/arduinoFFT@>=1.5.6
to
kosme/arduinoFFT@=1.5.6

>= replace with =

Saving settings

Hello.
Thank you for the work you've done. I have been looking for a similar project for a very long time. It is completely suitable for my tasks.
In my device, I use ESP 32 and ZMPT101B modules to measure mains voltage.
I have one unclear point.
On the "channel settings" page, I select the voltage measurement channel (for example, L1 voltage), the sensor type (ZMPT101B), set the
coefficients, save the settings (SAVE button at the bottom of the page), everything works correctly, but if you restart the EPS32 web
interface page, or restart the module itself, then all settings return to default values (SCT013-000). In this case, incorrect values are
output. You have to set the parameters again.
Setting the checkbox to allow real time editing, but don't forget to save your settings also has no effect.
I can't figure out how to make the set values persist.

Thank you.

Question: Precision for 3phase setup?

Hi, thanks for the nice write up and detailed diagram! I have a bit offtopic question, how precise do you find the readings of these clamps without voltage measuring? Iโ€™m contemplating about using this diy vs buying ready made product like shelly. Do you calibrate them somehow?

Unable connect to wifi network

When trying to connect to my own personal wifi ap (and other test access points), the debug console only shows this error at startup:

scan for SSID "stsopenwrt" ... found
connect to stsopenwrt (****)
WiFi lost, restart ... failed
starting Wifi-AP with SSID "powermeter1"

So the esp is unable to log into my home network.
Best regards
Jonas

Great Job ! minor issue : graph not visible on browser

Hello, first, congratulations this looks impressive and well designed.

I've uploaded successfully, setting the revision of "WebSockets@=2.3.4" (otherwise error message during compilation).

I can connect successfully but checking the webpage I cannot get the graph and the layout of the page seems incorrect on Chrome on my phone, Chrome and Explorer on PC. Which browser did you recommend ?

thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.