Coder Social home page Coder Social logo

emonlibcm's People

Contributors

borpin avatar glynhudson avatar ivankravets avatar trystanlea avatar

Stargazers

 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

emonlibcm's Issues

Need help in using the EmonLibCM with ESP32

Hello Wonderfull People !,
I hope you're all very well, I am going to get straight to the point. I want to use this library for the ESP32, Previously I was using emonlib esp32 version by @Savjee https://github.com/Savjee/EmonLib-esp32 , its working fine but there is no accuracy if the current is lower than 1 Amp. Found this library and want to shift to this one as this EmonlibCM has more accuracy.

I am unable to even compile the code. Just using esp32 dev kit v1 and a YHDC 30A/1V CT with the circuit mentioned by the emon learn page. (Really appreciate the work you guys do)

Kindly help me out here.

I removed the rf module part from the EmonLibCM Max example and I am getting this error

EmonLibCM-master/emonLibCM.h:50:24: fatal error: util/crc16.h: No such file or directory compilation terminated. exit status 1 Error compiling for board ESP32 Dev Module

Thanking in advance

Regards

ADC Timing Question for EmonLibCM_setADC()

This affects the avrdb branch.

This is more a question than an issue. I tried to calculate the time to pass into EmonLibCM_setADC() as ADC_duration from the data sheet. While the data sheet calculates the formatting duration as 2/f_CLK_PER, EmonLibCM uses 2/f_CLK_ADC. The result is 36.75µs in the datasheet case and 39.3µs in the EmonLibCM case. The EmonLibCM value is more correct than the value calculated with the data sheet.

Do you have any explanation for your way of determining ADC_duration?

Power drops repeatedly to zero when it measures between 9,200 and 10,200 watts, power reading low at elevated levels

I've recently switched to the continuous monitoring firmware and discovered 2 problems:

  1. the power seems to be under reported, at least on CT1 at elevated power values despite using the same calibration values as the previous descrete sketch. The descrete sketch reports approx 12Kw, and the continuous sketch reports approx 9.5Kw for the same load which includes 2 x 2.8Kw resisitive loads, This stacks up when I compare the MySolar values against the values from my power company.

Continuous Sketch reported 8.3Kwh, actual use 12.12Kwh
Discrete Sketch reported 11.7Kwh, actual use 10.79

  1. Zero is reported for one or 2 samples at random when it measures between 9200 and 10200 Watts on CT1, the other CT's aren't affected and this fault isn't present after reverting to the descrete sampling firmware. Values outside of that range seem OK. Looking at the MSG number it seems the EMONTX is stable.
    Problem 1 may be down to calibration, although I'm surprised it is this far out whilst appearing OK at the lower end, and the under reported values occur at the same time as problem 2.
    Problem 2 seems to be something specific to the EMONTX firmware / library combination.
    This EMONTX communicates via an ESP8266, but only the TX and 0V lines are connected so there is no chance the ESP can be sending commands to the EMONTX

I wonder if there is a problem somewhere in the Library with higher values

Coding style

I am looking at the code, and it doesn't seem to follow any particular style guide. For example, indentations are sometimes 2 spaces, and other time 4 spaces. Also, comment tabulation is not consistent across the .cpp/.h file.

One common solution is to use an auto formatter such as the ClangFormatter, and either use one of the predefined styles, or customize your own. Comments would need more manual work to make them consistent across the file.

Is that something that openenergymonitor is interested in? I could give it a try and send a PR...

EmonLibCM_StopADC - code without effect.

This has no effect

ADCSRA |= (0<<ADATE);
ADCSRA |= (0<<ADIE);
ADCSRA |= (0<<ADSC);

Should this have been?
ADCSRA &= ~(1 << ADATE);
ADCSRA &= ~(1 << ADIE);
ADCSRA &= ~(1 << ADSC);

Create an annotated tag version

Hi @TrystanLea, can you create an annotated Tag version & release. It should then be possible to give a directive to use a specific version in PlatformIO I think.

so

lib_deps_external =
  https://github.com/openenergymonitor/EmonLibCM.git#master
lib_deps_external =
  https://github.com/openenergymonitor/EmonLibCM.git#v2.2.0

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.