Current monitoring with ESPEasy
Moderators: grovkillen, Stuntteam, TD-er
Current monitoring with ESPEasy
Hi,
i made a little 4 channel amplifier for "Current transformators" like the "SCT-013-010".
Instead of sampling the voltage of the ct with the ESP32 or an arduino it uses a "precission rectifier" and generates a DC Voltage which can easily processed by the ESP32.
If you are interested have a look at
https://github.com/olfried/Current-Tran ... /tree/main
I will order some PCB now and if someone wants to get one let me know.
Olaf
i made a little 4 channel amplifier for "Current transformators" like the "SCT-013-010".
Instead of sampling the voltage of the ct with the ESP32 or an arduino it uses a "precission rectifier" and generates a DC Voltage which can easily processed by the ESP32.
If you are interested have a look at
https://github.com/olfried/Current-Tran ... /tree/main
I will order some PCB now and if someone wants to get one let me know.
Olaf
Re: Current monitoring with ESPEasy
Thanks for sharing. Could you please tell me what is the advantage of using a precision rectifier instead of CT? Does it make the coding easier?
Re: Current monitoring with ESPEasy
Those current transformers (CT) clamps output an AC voltage which is linear to the AC current through the cable clamped by the CT.
However this is still an AC voltage and thus is relatively hard to measure as you need to continuously sample it.
Converting it to DC makes it a lot easier to sample as it is no longer time-critical.
However I wonder how this circuit responds to a non-resistive load.
Inductive and capacitive loads only shift the phase, so they introduce a factor where the estimated power consumption will be off.
However when you don't have a nice sinus shape, I don't know what the output will be.
However this is still an AC voltage and thus is relatively hard to measure as you need to continuously sample it.
Converting it to DC makes it a lot easier to sample as it is no longer time-critical.
However I wonder how this circuit responds to a non-resistive load.
Inductive and capacitive loads only shift the phase, so they introduce a factor where the estimated power consumption will be off.
However when you don't have a nice sinus shape, I don't know what the output will be.
Re: Current monitoring with ESPEasy
You're absolutely right!
This circuit only works "perfect" with a pure sinus, with no phase shifting.
But it produces good results if you calibrate it with the power consumer you know, what should be the normal behaviour.
You could use a truee RMS chip of course, but that is not what i wanted to achieve (and much too expensive for me!)
My friend has just a pump in his cellar and only wants to know if it is running or not.
He wants to use ESP Easy and i use the ADC input for voltage, so this might be the right solution.
BTW, i tried it with my drilling machine. That is far away from a sinus, but it worked good enough for me.
Greetings
Olaf
This circuit only works "perfect" with a pure sinus, with no phase shifting.
But it produces good results if you calibrate it with the power consumer you know, what should be the normal behaviour.
You could use a truee RMS chip of course, but that is not what i wanted to achieve (and much too expensive for me!)
My friend has just a pump in his cellar and only wants to know if it is running or not.
He wants to use ESP Easy and i use the ADC input for voltage, so this might be the right solution.
BTW, i tried it with my drilling machine. That is far away from a sinus, but it worked good enough for me.
Greetings
Olaf
Re: Current monitoring with ESPEasy
Oh, sorry for the confusion.
I don't replace the CTs. It is just the electronics behind it.
The solutions which are out there also use CTs. But they just add an offset to the AC output of the CTs and measure the curve directly.
With my circuit the AC is rectified and produces a DC voltage which can be easely measured with ESP Easy. That's all!
Olaf
Re: Current monitoring with ESPEasy
BTW, this is nearly, how my drilling machine looked like. A lot of noise, but this seems to be no problem because the rektifier measures just the peak voltage (which you have to interprete of course).Olfried wrote: ↑07 Nov 2023, 20:47 You're absolutely right!
This circuit only works "perfect" with a pure sinus, with no phase shifting.
But it produces good results if you calibrate it with the power consumer you know, what should be the normal behaviour.
You could use a truee RMS chip of course, but that is not what i wanted to achieve (and much too expensive for me!)
My friend has just a pump in his cellar and only wants to know if it is running or not.
He wants to use ESP Easy and i use the ADC input for voltage, so this might be the right solution.
BTW, i tried it with my drilling machine. That is far away from a sinus, but it worked good enough for me.
Greetings
Olaf
Click here:
https://www.falstad.com/circuit/circuit ... Pg3N4GHxQA
Re: Current monitoring with ESPEasy
Ok, i admit. It looks much nosier, but it's ok for my purpose.Olfried wrote: ↑07 Nov 2023, 21:52BTW, this is nearly, how my drilling machine looked like. A lot of noise, but this seems to be no problem because the rektifier measures just the peak voltage (which you have to interprete of course).Olfried wrote: ↑07 Nov 2023, 20:47 You're absolutely right!
This circuit only works "perfect" with a pure sinus, with no phase shifting.
But it produces good results if you calibrate it with the power consumer you know, what should be the normal behaviour.
You could use a truee RMS chip of course, but that is not what i wanted to achieve (and much too expensive for me!)
My friend has just a pump in his cellar and only wants to know if it is running or not.
He wants to use ESP Easy and i use the ADC input for voltage, so this might be the right solution.
BTW, i tried it with my drilling machine. That is far away from a sinus, but it worked good enough for me.
Greetings
Olaf
Click here:
https://www.falstad.com/circuit/circuit ... Pg3N4GHxQA
Re: Current monitoring with ESPEasy
Hey Olaf,
for that purpose i flashed several Gosund SP1.
I wrote rules for them and used "easyfetch" as a dashboard.
They now monitor if a Pump is running and detect if the pump is running dry and turn off the pump if so.
Furthermore since the pumps we use have membrane container (i don´t know if this is the right term but you probably know what i mean) it also detects when the time between activations become shorter. This is a sign for checking the counter pressure.
All this works really well with the power of ESPeasy rules!
(this is a bit more pro but i also added a flow switch for detecting the running water. It is really sensitive. If the water runs for 30min the pump gets turned off)
I unfortunately have only a screenshot of the dashboard but not of the installation
Re: Current monitoring with ESPEasy
Thx! Sounds cool!chromo23 wrote: ↑07 Nov 2023, 22:04Hey Olaf,
for that purpose i flashed several Gosund SP1.
I wrote rules for them and used "easyfetch" as a dashboard.
They now monitor if a Pump is running and detect if the pump is running dry and turn off the pump if so.
Furthermore since the pumps we use have membrane container (i don´t know if this is the right term but you probably know what i mean) it also detects when the time between activations become shorter. This is a sign for checking the counter pressure.
All this works really well with the power of ESPeasy rules!
(this is a bit more pro but i also added a flow switch for detecting the running water. It is really sensitive. If the water runs for 30min the pump gets turned off)
I unfortunately have only a screenshot of the dashboard but not of the installation
Bildschirmfoto 2023-11-07 um 22.00.25.png
The problem is, that my friend doesn't want to break up the electric wiring for his Pumps. They are wired directly to the electric cabinet and he doesn't want anything between the pumps and power source.
That's why i wanted to use CTs.
Thx anyway!
Re: Current monitoring with ESPEasy
Oh.. i see

And thanks for sharing your project!
Re: Current monitoring with ESPEasy
Oh. Thanks for your clarification.Olfried wrote: ↑07 Nov 2023, 20:50Oh, sorry for the confusion.
I don't replace the CTs. It is just the electronics behind it.
The solutions which are out there also use CTs. But they just add an offset to the AC output of the CTs and measure the curve directly.
With my circuit the AC is rectified and produces a DC voltage which can be easely measured with ESP Easy. That's all!
Olaf
Re: Current monitoring with ESPEasy
The project goes on!
Testing on the breadboard

The Olimex POE with ESP Easy

My test loads. A heater, a drilling machine and the pump

The ct

The pump with the recitified and amplified (by factor 3) signal

The curve of the heater. Nearly a sinus

Frontside of the PCB

Backside

Testing on the breadboard

The Olimex POE with ESP Easy

My test loads. A heater, a drilling machine and the pump

The ct

The pump with the recitified and amplified (by factor 3) signal

The curve of the heater. Nearly a sinus


Frontside of the PCB

Backside

Re: Current monitoring with ESPEasy
The show goes on.






Re: Current monitoring with ESPEasy
Hmm the accessibility of the USB connector is a bit tricky
Or are you powering via PoE?
Or are you powering via PoE?
Re: Current monitoring with ESPEasy
Oh, sorry...
Yes, it is a POE device.
It was a little bit tricky to bring ESP Easy on it but it works.
About 20€, nice little deivce.
https://www.olimex.com/Products/IoT/ESP ... e-hardware
Yes, it is a POE device.
It was a little bit tricky to bring ESP Easy on it but it works.
About 20€, nice little deivce.
https://www.olimex.com/Products/IoT/ESP ... e-hardware
Re: Current monitoring with ESPEasy
I know these Olimex boards 
Have them myself and also made some boards based on their schematics.
Just take care when hooking up those small PoE boards. They have no isolation, so if you power them via PoE and at the same time connect them to your PC, you may fry stuff.
There are "ISO" versions, but I don't think yours is an isolated one.

Have them myself and also made some boards based on their schematics.
Just take care when hooking up those small PoE boards. They have no isolation, so if you power them via PoE and at the same time connect them to your PC, you may fry stuff.
There are "ISO" versions, but I don't think yours is an isolated one.
Re: Current monitoring with ESPEasy
Thx for the advice!
I did not connect the olimex via POE yet. And i will not in future!
Greetings
Olaf
I did not connect the olimex via POE yet. And i will not in future!
Greetings
Olaf
Who is online
Users browsing this forum: No registered users and 1 guest