Hello all,
I want to share my current project. It is working, but I am still looking for improvements. Feedback is appreciated.
Problem
My Raspberry Pi is monitoring the power output of my solar panels. Node-red calculates the power by measuring the time between energy pulses. I would also want to see the power going in or out of my house, but the energy monitor has been sealed by the energy company. The only thing I have to work with is an LED, flashing every Wh. Herein lies the problem. The LED will flash the same, regardless of the power direction.
Solution
The energy and power are measured by monitoring the LED. The direction of power and energy is determined by the phase difference between the voltage and the current. The voltage comes from a transformer that is used by the doorbell. It is an 8V transformer, but delivers 12.5Vrms without load. The current comes from a current transformer on the connection to the mains grid, similar like the one used on this very helpful site:
https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/introduction
This is the circuit that was build:
Results
It works well when a large power is flowing in or out of the house, but determining the direction of power becomes difficult when the power is less than about 200W.
Comparator output @ 2000W. Channel 1 is voltage, channel 2 is current.
Comparator output @ 250W. Channel 1 is voltage, channel 2 is current.
The current looks great at 2000W, but has issues at 250W.
Looking at the current itself: (AC triggered so you can compare the phase as well)
900W flowing in the house:
900 W flowing out of the house:
At small power (about 50W):
Previously I had this working with MCP602 rail to rail op amps. I don’t have any oscilloscope measurements of that but I think that was working slightly better. Looking for ways to improve I heard Dave Jones (of EEVblog) saying that using op amps as comparator is crude and that it was better to use purpose build comparators. That is why I switched to the LM339N.
I would like to improve this setup. Ideas I have:
* Maybe it is possible to filter the current signal. Would that cause phase shifts?
Let me know what you think….
I want to share my current project. It is working, but I am still looking for improvements. Feedback is appreciated.
Problem
My Raspberry Pi is monitoring the power output of my solar panels. Node-red calculates the power by measuring the time between energy pulses. I would also want to see the power going in or out of my house, but the energy monitor has been sealed by the energy company. The only thing I have to work with is an LED, flashing every Wh. Herein lies the problem. The LED will flash the same, regardless of the power direction.
Solution
The energy and power are measured by monitoring the LED. The direction of power and energy is determined by the phase difference between the voltage and the current. The voltage comes from a transformer that is used by the doorbell. It is an 8V transformer, but delivers 12.5Vrms without load. The current comes from a current transformer on the connection to the mains grid, similar like the one used on this very helpful site:
https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/introduction
This is the circuit that was build:
Results
It works well when a large power is flowing in or out of the house, but determining the direction of power becomes difficult when the power is less than about 200W.
Comparator output @ 2000W. Channel 1 is voltage, channel 2 is current.
Comparator output @ 250W. Channel 1 is voltage, channel 2 is current.
The current looks great at 2000W, but has issues at 250W.
Looking at the current itself: (AC triggered so you can compare the phase as well)
900W flowing in the house:
900 W flowing out of the house:
At small power (about 50W):
Previously I had this working with MCP602 rail to rail op amps. I don’t have any oscilloscope measurements of that but I think that was working slightly better. Looking for ways to improve I heard Dave Jones (of EEVblog) saying that using op amps as comparator is crude and that it was better to use purpose build comparators. That is why I switched to the LM339N.
I would like to improve this setup. Ideas I have:
* I have ordered a different current transformer (SCT-013-000 instead of SCT-013-050) from China, but that will take some time to arrive. The SCT-013-000 does not have a built in load resistor, so I can play with that.* Maybe it is possible to filter the current signal. Would that cause phase shifts?
Let me know what you think….