├── .gitignore ├── LICENSE ├── README.md ├── data ├── ACS712.jpg ├── ACS712.png ├── SCT013-000.jpg ├── SCT013-000.png ├── ZMPT101B.jpg ├── ZMPT101B.png ├── alarm.js ├── bad_sin.png ├── channel.htm ├── display.htm ├── good_sin.png ├── group.htm ├── index.htm ├── info.htm ├── ioport.htm ├── jquery-lastest.min.js ├── live.htm ├── mqtt.htm ├── script.js ├── sensor.htm ├── signalpath.png ├── styles.css ├── update.htm ├── voltage-div.png └── wlan.htm ├── hardware └── powermeter_supply │ ├── README.md │ ├── cnc_1.png │ ├── cnc_2.png │ ├── config │ └── measure.json │ ├── gocde │ ├── iso_fine.gcode │ ├── iso_fine_probe.gcode │ └── powermeter.png │ ├── powermeter.brd │ ├── powermeter.pdf │ ├── powermeter.pro │ ├── powermeter.sch │ ├── powermeter_ChiliPeppr.png │ ├── powermeter_ChiliPeppr_low.png │ ├── powermeter_bottom.png │ ├── powermeter_schematic.pdf │ ├── powermeter_schematic.png │ ├── powermeter_schematic_low.png │ └── powermeter_top.png ├── images ├── ACS712.jpg ├── ACS712.png ├── SCT013-000.jpg ├── SCT013-000.png ├── ZMPT101B.jpg ├── ZMPT101B.png ├── live-view.gif ├── live-view.png ├── measurement-setting.png ├── mqtt-setting.png ├── preview.gif ├── schematic.png ├── signalpath.png ├── signalpath.svg └── voltage-div.png ├── lib └── async-mqtt-client-develop │ ├── .editorconfig │ ├── .github │ └── workflows │ │ ├── build_examples_pio.yml │ │ └── cpplint.yml │ ├── .gitignore │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── async-mqtt-client.cppcheck │ ├── docs │ ├── 1.-Getting-started.md │ ├── 2.-API-reference.md │ ├── 3.-Memory-management.md │ ├── 4.-Limitations-and-known-issues.md │ ├── 5.-Troubleshooting.md │ ├── README.md │ └── index.md │ ├── examples │ ├── FullyFeatured-ESP32 │ │ └── FullyFeatured-ESP32.ino │ ├── FullyFeatured-ESP8266 │ │ └── FullyFeatured-ESP8266.ino │ └── FullyFeaturedSSL │ │ ├── platformio.ini │ │ └── src │ │ └── main.cpp │ ├── keywords.txt │ ├── library.json │ ├── library.properties │ ├── scripts │ ├── CI │ │ ├── build_examples_pio.sh │ │ ├── platformio_esp32.ini │ │ └── platformio_esp8266.ini │ └── get-fingerprint │ │ └── get-fingerprint.py │ └── src │ ├── AsyncMqttClient.cpp │ ├── AsyncMqttClient.h │ ├── AsyncMqttClient.hpp │ └── AsyncMqttClient │ ├── Callbacks.hpp │ ├── DisconnectReasons.hpp │ ├── Errors.hpp │ ├── Flags.hpp │ ├── Helpers.hpp │ ├── MessageProperties.hpp │ ├── Packets │ ├── ConnAckPacket.cpp │ ├── ConnAckPacket.hpp │ ├── Out │ │ ├── Connect.cpp │ │ ├── Connect.hpp │ │ ├── Disconn.cpp │ │ ├── Disconn.hpp │ │ ├── OutPacket.cpp │ │ ├── OutPacket.hpp │ │ ├── PingReq.cpp │ │ ├── PingReq.hpp │ │ ├── PubAck.cpp │ │ ├── PubAck.hpp │ │ ├── Publish.cpp │ │ ├── Publish.hpp │ │ ├── Subscribe.cpp │ │ ├── Subscribe.hpp │ │ ├── Unsubscribe.cpp │ │ └── Unsubscribe.hpp │ ├── Packet.hpp │ ├── PingRespPacket.cpp │ ├── PingRespPacket.hpp │ ├── PubAckPacket.cpp │ ├── PubAckPacket.hpp │ ├── PubCompPacket.cpp │ ├── PubCompPacket.hpp │ ├── PubRecPacket.cpp │ ├── PubRecPacket.hpp │ ├── PubRelPacket.cpp │ ├── PubRelPacket.hpp │ ├── PublishPacket.cpp │ ├── PublishPacket.hpp │ ├── SubAckPacket.cpp │ ├── SubAckPacket.hpp │ ├── UnsubAckPacket.cpp │ └── UnsubAckPacket.hpp │ ├── ParsingInformation.hpp │ └── Storage.hpp ├── platformio.ini ├── powermeter.bin └── src ├── config.h ├── config ├── display_config.cpp ├── display_config.h ├── ioport_config.cpp ├── ioport_config.h ├── measure_config.cpp ├── measure_config.h ├── mqtt_config.cpp ├── mqtt_config.h ├── wifi_config.cpp └── wifi_config.h ├── display.cpp ├── display.h ├── ioport.cpp ├── ioport.h ├── measure.cpp ├── measure.h ├── mqttclient.cpp ├── mqttclient.h ├── ntp.cpp ├── ntp.h ├── powermeter.cpp ├── utils ├── basejsonconfig.cpp └── basejsonconfig.h ├── webserver.cpp ├── webserver.h ├── wificlient.cpp └── wificlient.h /.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | .vscode 3 | update_firmware.sh 4 | update_spiffs.sh 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
8 |
96 | If you want to donate to the author then you can buy me a coffee.
97 |
98 |
99 |
31 | 32 | | 33 |34 | 35 | | 36 |37 | 38 | | 39 |41 | | 42 |
43 |
44 | zoom: 45 |
|
97 |
98 | samplerate: 99 | 100 | 101 | phaseshift: 102 | 103 | 104 | 105 | |
106 |
12 | | 13 | | 14 | | calculation | 15 |
SCT013-000 | 18 |![]() |
19 | ![]() |
20 | ( ( turns / burden ) * 3.3V ) / 4096 = ratio ( ( 2000 / 62 ) * 3.3V ) / 4096 = 0.025989163 |
21 |
ZMPT101B | 24 |![]() |
25 | ![]() |
26 | Unfortunately, it is not possible to give a precise figure here. First, the potentiometer should be adjusted so that the sine voltage to be measured is no longer consumed. It is important to use a high-impedance voltage divider, otherwise the sine voltage will be consumed even at low values (example: bad sine and good sine). The ratio 0.33 has proven to be a good starting point. This value should then be adjusted until the measured voltage matches the input voltage. | 27 |
ACS712 | 30 |![]() |
31 | ![]() |
32 | Datasheet ( 1A / ( V per Ampere ) x ( 5V / 4096 ) = ratio 5A variant: ( 1A / 0.185V ) x ( 5V / 4096 ) = 0.006598395 20A variant: ( 1A / 0.100V ) x ( 5V / 4096 ) = 0.012207031 30A variant: ( 1A / 0.066V ) x ( 5V / 4096 ) = 0.018495502 |
33 |
voltage divider | 36 |37 | | ![]() |
38 | With a simple voltage divider, you can also measure voltages greater than VCC (3.3V). If you want to measure voltage up to 36V, you can use an 11:1 (10k:1K) divider as in the example. 39 | 3.3V / ( R7 / ( R7 + R8 ) ) = voltage range 40 | example: 41 | 3.3V / ( 1k / ( 1k + 10k ) ) = 36.6V 42 | 3.3V / ( 2k / ( 2k + 10k ) ) = 19.8V 43 | 3.3V / ( 2k / ( 2k + 1k ) ) = 4.95V 44 | and the ratio: 45 | 3.3V / ( R7 / ( R7 + R8 ) ) / 4096 = ratio 46 | 3.3V / ( 1k / ( 1k + 10k ) ) / 4096 = 0.008862305 (36V) 47 | 3.3V / ( 2k / ( 2k + 10k ) ) / 4096 = 0,004833984 (19.8V) 48 | 3.3V / ( 2k / ( 2k + 1k ) ) / 4096 = 0,001208496 (4.95V) 49 | |
50 |
direct voltage | 53 |54 | | 55 | | Without a voltage divider, you can also measure voltages up to VCC (3.3V). 56 | 3.3V / 4096 = 0.000805664 57 | |
58 |
This documentation is only valid for the AsyncMqttClient version in this repo/directory
** 4 | 5 | ----- 6 | 7 | #### 1. [Getting started](1.-Getting-started.md) 8 | #### 2. [API reference](2.-API-reference.md) 9 | #### 3. [Memory management](3.-Memory-management.md) 10 | #### 4. [Limitations and known issues](4.-Limitations-and-known-issues.md) 11 | #### 5. [Troubleshooting](5.-Troubleshooting.md) 12 | -------------------------------------------------------------------------------- /lib/async-mqtt-client-develop/examples/FullyFeatured-ESP32/FullyFeatured-ESP32.ino: -------------------------------------------------------------------------------- 1 | /* 2 | This example uses FreeRTOS softwaretimers as there is no built-in Ticker library 3 | */ 4 | 5 | 6 | #include