Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analog Current Sensor: sct-013-000 on Wemos D1 Mini #5167

Open
ilsicca opened this issue Nov 20, 2024 · 3 comments
Open

Analog Current Sensor: sct-013-000 on Wemos D1 Mini #5167

ilsicca opened this issue Nov 20, 2024 · 3 comments

Comments

@ilsicca
Copy link

ilsicca commented Nov 20, 2024

Board: Wemos D1 Mini ESP8266
ESPEasy version: ESP_Easy_mega_20240822_normal_IRext_no_rx_ESP8266_4M2M.bin (I need the IR Send)

Hi! How are they? I'm try to use a current sensor sct-013-000 on Wemos D1 Mini
image

When I add the analog input (internal device), I only get a constant reading of 547, approx. When I turn on or off the device that I need to measure the current, the analog reading does not change either.
However, when I take the readings without ESPEasy, I can read them correctly. This is the code:

https://github.com/Mottramlabs/MQTT-Power-Sensor/blob/master/Firmware/Version%201/Basic_Current_Sensor/Basic_Current_Sensor.ino

Thanks a lot!

@TD-er
Copy link
Member

TD-er commented Nov 20, 2024

That code seems to capture 600 analog samples as fast as it can and then take the peak-to-peak value.
The analog input plugin in ESPEasy does not take samples that often.
I think it only takes upto 10 per second, maybe 50 (have to check the code).
Then the highest and lowest measured values are discarded and the average is taken over the rest.
So it is actually doing quite the opposite of what you need.

@ilsicca
Copy link
Author

ilsicca commented Nov 20, 2024

thanks @TD-er . Do you know another way to read sct-013-000 with ESPEasy?

@TD-er
Copy link
Member

TD-er commented Nov 20, 2024

Not at this moment, however it is possible to add an extra mode to the ADC plugin to read in bursts and take the peak-to-peak values as is done in your example code.

There is a pending pull request using such clamps, but it is using some extra electronics as frontend.
See:
#4009

You can also look at those PZEM-004Tv30 modules, which also do some pre-processing on measured data from current clamps.
This is much more reliable as the ESP isn't equipped to constantly monitor the signal comming from those current clamps at a high enough sample rate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants