logo elektroda
logo elektroda
X
logo elektroda

Analyzer - meter of 230VAC network parameters - single phase.

futek2 17535 129

TL;DR

  • An ESP32 DEVKIT V1-based single-phase 230VAC analyzer measures voltage, current, phase shift, cos fi, THD, and harmonic levels on a phone, tablet, or laptop.
  • The circuit uses SCT013 current transformers, a TV16 voltage transformer, precision potentiometers, and Wi‑Fi web pages at 192.168.10.1 for live graphs and configuration.
  • Two software versions support 25A or 100A current transformers, refresh results every 5 seconds, and plot up to 9 harmonics with SVG.
  • Calibration uses precision potentiometers and loads like two 2000W kettles; the current sensor direction must be marked correctly for accurate cos fi and inductive/capacitive readings.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #121 21187471
    jarekgol
    Level 40  
    @futek2 how did you handle the non-blocking ADC readout? Did you compile this on some old version of Arduino, or some other way?
  • ADVERTISEMENT
  • #122 21188720
    futek2
    Level 19  
    Hello coll. jarekgo l and Sentimental .
    Replying to colleague jarekgol it compiles on version ARDUIONO IDE 1.1.18.
    Everything is without problem after the normal installation of libraries.

    Replying col. Sentimental .
    The components used are typical ones available in any electronics shop. And the potentiometers used are only for calibration of the analyser, because I have just taken into account in the project that the values of the elements can be different at the factory, so calibration is a comparison of the values shown on the web page of the meter and the digital readings of the meter with the range of voltmeter and ammeter.
    I have used the meter for another year and I do not notice that the calibration results differ significantly and I check it about every 3 months.

    I wish you a brave step, because the meter-analyser circuit is easy to make and you will have a lot of fun when you check it at home.
    Best regards
    Futek2
  • ADVERTISEMENT
  • #123 21188803
    jarekgol
    Level 40  
    @futek2 have you had a chance during this time to check it on a clean capacitor or choke? Because I have it put together, but it was showing me wrong at the time and we didn't come to any constructive conclusions. I wanted to write something myself, but I fell down on the fact that non-blocking functions on the then contemporary arduino didn't compile. But as you write that version 1.something this explains a lot.
  • ADVERTISEMENT
  • #124 21188980
    futek2
    Level 19  
    Hi. I have been doing a lot of measuring lately, because the energy undercutting people who own food shops have active refrigerators, wedges, and they already have a position on the invoices to pay for reactive inductive and capacitive energy. In order to reduce this, it is necessary to make sure to buy a compensator, but only to take measurements by switching off devices one by one and observing which ones generate a lot.
    And this works and confirmation that it improves is enough to switch on the kettle and immediately the sinusoids of current and voltage balance out and come closer to each other. And as for your meter, assemble it again, maybe you have made some mistake, because it works from the first time.
    Tell us how it went. Because I see from the points for downloading it is a lot of downloads and generally there is no attention to the project.
    Best regards
    Furek2
  • ADVERTISEMENT
  • #125 21189038
    jarekgol
    Level 40  
    Then, as you do a lot of measuring, please measure a simple capacitor from a motor (but without the motor), and post a screen shot. A choke from a fluorescent or sodium lamp wouldn't go amiss either.
  • #126 21295782
    jesiakdawid
    Level 1  
    Hi all, I have a request to the author if there would be an option to add communication over mqtt and display all the readings in topics ? thanks to such a solution you can read the data even with the help of graphene or Home Assistants, which will allow you to consolidate and compare the data of a longer period of time thank you
  • #127 21295817
    futek2
    Level 19  
    Hello kol jesiakdawid .
    I have already closed the project and I do not improve or correct anything, because no one reports the errors.
    It has been going on for more than a year now, it would be difficult to make any changes in the code and I do not remember where to do what in the code.
    I understand that you have made the meter and is satisfied as for such little money and works quite correctly.
    Maybe one day I will return to the topic, but everything works correctly, so what to invent.
    But when you do the configuration via the website, because there is such an option, you can configure the sending of data to the server to draw graphs 24 hours a day.
    and 4 values will be sent:

    1 - Voltage_network
    2 - Phase current
    3 - Power Factor - it is necessary to describe the graph manually as it is 1 in the middle of the scale
    4 - Apparent Power.


    Here is a link
    https://thingspeak.mathworks.com/
    Sign up for an account and it is free of charge
    Regards
    Futek2
  • #129 21413992
    mm00007
    Level 3  
    Hi,


    I have a question regarding the Analyser,
    is this device suitable for checking whether the household meets the conditions included in the agreement with TAURON?
    (here is a fragment of it - tariff G11)
    Table with harmonic values in tariff G11 for odd and even power currents.
  • #130 21493378
    sq3evp
    Level 39  
    mm00007 wrote:
    Here's a pretty similar project, with source code: f1atb
    .

    Very similar to the title project - I think if there is no notation then you would need to look in the code.
    I don't know about the cost of buying the finished product.
📢 Listen (AI):

Topic summary

✨ The discussion centers on the design and development of a single-phase 230VAC network parameter analyzer-meter based on the ESP32 DEVKIT V1 module with 4MB memory. The device measures voltage, current, power factor (COS φ), total harmonic distortion (THD), and energy consumption (kWh), using current transformers (SCT013 type with 1V output) for ranges of 5A, 20A, 25A, and 100A, and a voltage transformer (TV16) for voltage measurement. Calibration is essential due to sensor variability, performed via precision 5k potentiometers and comparison with reference meters such as the Sonel PQM-707 and SANWa 5000. The firmware supports web-based configuration, data visualization with real-time graphs of voltage, current, COS φ, harmonics, and flicker factor, and data logging to servers like ThingSpeak via WiFi. Software updates can be performed over-the-air (OTA) through the ESP32 web interface or USB. The project addresses ADC non-linearity and noise through software correction and averaging, avoiding hardware filters that distort waveform shape. The analyzer is suitable for monitoring household appliances, including motors and LED lighting, with observations on harmonic emissions and power factor changes, especially in photovoltaic (PV) systems. Limitations include occasional WiFi connection drops, addressed by task prioritization in FreeRTOS. The project emphasizes simplicity, affordability, and open collaboration, with ongoing improvements such as reactive power compensation and flicker measurement. Users report successful builds, calibration challenges, and practical applications in energy monitoring and power quality analysis.

FAQ

TL;DR: ±1.5 % accuracy “even a beginner can cope” [Elektroda, futek2, #20256375; #20255939]. The DIY ESP32 analyser logs voltage, current, THD (9 harmonics) and COS φ every 5 s via Wi-Fi. Why it matters: you can spot reactive-energy penalties before the bill arrives.

Quick Facts

• Cost of parts ≈ PLN 150 (≈ €35) [Elektroda, futek2, post #20255939] • Current ranges: 5 A, 20 A, 25 A or 100 A selectable by firmware [Elektroda, futek2, #20309777; #20435759] • Sampling: 4000 points/period at 300 µs, refreshed every 5 s [Elektroda, futek2, post #20256717] • Accuracy after calibration: ±1.5 % versus Sonel PQM-707 [Elektroda, futek2, post #20256375] • OTA updates: http://192.168.10.1/new (login: admin/admin) [Elektroda, futek2, post #20255939]

What parameters does the analyser measure?

Voltage (RMS), current (RMS), apparent power, active power, COS φ, THD for up to 9 harmonics, cumulative kWh, 15-minute trend graphs and light-flicker index [Elektroda, futek2, post #20881348]

How accurate are the readings?

After two-point calibration the meter stayed within ±1.5 % of a certified Sonel PQM-707 for both RMS and THD values [Elektroda, futek2, post #20256375]

Which current transformer should I buy?

Choose an SCT-013 with 1 V output; firmware images exist for 5 A, 20 A, 25 A and 100 A versions. Without the 1 V type you risk ADC clipping [Elektroda, futek2, post #20255939]

Do I need precision resistors?

Standard 1 % metal-film parts are sufficient; final accuracy depends on potentiometer calibration rather than absolute resistor tolerance [Elektroda, futek2, post #21188720]

How do I calibrate the meter?

  1. Connect a resistive load using a known multimeter.
  2. Adjust the 5 k potentiometer until voltage matches.
  3. Load to ≥ 75 % of CT range (e.g., two 2 kW kettles) and trim current [Elektroda, futek2, post #20255939]

Why does my graph show noise at zero current?

With the CT shorted the ESP32’s ADC picks up internal noise; readings below ≈ 0.1 A can wander. This does not affect normal loads [Elektroda, futek2, post #20305427]

What about MQTT or Home Assistant integration?

Native MQTT is not yet implemented. The author has closed further development, so adding topics would require modifying the closed-source firmware [Elektroda, futek2, post #21295817]

Does it meet TAURON G11 billing conditions?

The analyser resolves COS φ to two decimal places and THD to 0.1 %. That granularity is enough to verify COS φ≥ 0.9 and THD≤ 8 % thresholds stated in typical utility contracts [TAURON T&C, 2023].

Why does the Wi-Fi sometimes drop?

Heavy FFT calculations can starve the Wi-Fi task. ESP32’s FreeRTOS may need balanced priorities; edge cases appear when RSSI < -70 dBm [Elektroda, futek2, post #20296339]

Is the +5 V/-5 V label in the schematic an error?

Yes. The PSU delivers +5 V and GND only; the label has been corrected in later diagrams [Elektroda, snow, post #20256366]

Can I flash the BIN from Linux?

Use esptool.py: esptool --chip esp32 write_flash 0x10000 firmware.bin. Boards often need bootloader at 0x1000 and partition table at 0x8000; ESP_Flasher automates this [Elektroda, jarekgol, post #20298465]

What happens if the ESP32 resets?

Energy counter (kWh) clears to zero; configuration in NVS stays intact. Plan external logging for long-term totals [Elektroda, futek2, post #20294657]
ADVERTISEMENT