Quick tip for those who don't like guesswork. Calibration can be sped up a lot. If you have say 0.32A and expect 0.50 try 0.5/0.32*current conversion factor (like 10000 in the video). You'll get 15624, close to his final 15420. Like mentioned, higher current loads will yield better results using this same process
@@digiblurDIY don't stress, like you mentioned the calibration you did with 10-11 amp loads will be much more accurate. I work in large scale energy monitoring so seeing cheap home solutions like this is awesome!
Starting with a value of 10000 and the known amperage, we can find the calibration value using the formula (10000)(amperage)/(indicated value). For your example (10000)(0.49A)/(0.32A)=15312. Hope this helps!
I want you to know this is fantastic! I am sitting here calibrating and starting to see everything come together. Very excited! I am very glad that I ran across your channel. Thanks for posting this detailed video along with all of the links that you did.
In many applications disconnecting a CT output wires will cause it to burn up, or to damage the insulation rating of the secondary windings by causing the voltage to rise too high on the secondary winding for what the secondary wiring insulation is rated for, ruining the CT. Always keep them connected when current is running in the wire they're connected to for sampling.
Great video. You can trick the clamps into thinking that they're is more current if you loop the wire back around and through the meter clamp. So if you had a 10A load with 1 wire through the core if you wrap it around and bring 2 wires through it will read 20A.
why would you want to do that? Would that be a way to measure two lines using only 1 CT clamp? So if I wanted to measure a 220V circuit like in the USA (which is basically just two separate 120V lines), I could put the clamp around both wires and it will automatically add up the amps and watts?
Easier way to zero in on the calibration: correct multiplier = test_multiplier * expected_amps / measured_amps. For your example, 10000 * 0.49 / 0.32 yeilds 15469. (I love using math to short-circuit iterating.) The ratio of the correct multiplier to the correct amperage is the same as the ratio of the test multiplier to the test amperage: M[act] / A[act] = M[test] / A[test] x / 0.49 = 10000 / 0.32 Solve for x.
This does assume linearity of the system, of course. If a system isn't quite linear, it should get you close, then you can iterate. Since these CTs should be linear, one sample should get you spot on.
@@digiblurDIY - hehe, not a genius, just someone who has seen the light and understands the "this is to that as that is to the other" concept. I really appreciate you walking us through all the stuff you do. I've not jumped in as far as you, Justin, and Rob, but with your (collective) guidance, many more of us are willing to try. I'm just trying to add my little bit. (-:
Appreciate Video! Sorry for chiming in, I would appreciate your opinion. Have you ever tried - Mahorrla Defence Wisdom Method (do a search on google)? It is a great one off product for securing your home from danger without the normal expense. Ive heard some incredible things about it and my buddy after many years got cool success with it.
Note this: When you put hot and neutral wires through a ct, your current reading should be 0 amps on a 2 wire circuit. (aka this how GFCI works through a ct inside the device or breaker) If you clamp an amp meter on the neutral and then clamp it on the hot of the same circuit it will read the same. When clamping both Hot & Neut of the same circuit value will be 0 (balanced) If your clamping it on a 3 wire circuit where the neutral is shared, your reading will be the different or the unbalanced load of the two circuits or if both hot's have the same type of load L1 = 1500W (Black) L2 = 1500W (Red) then 0 watts 0 amps on neutral (White)
I'm a couple years behind, but this video appears to be what I need. I have a Tech/Computer background. But, I'm a complete Noob RE: Power Monitoring. Hoping you have other videos that will feed my thirst for knowledge.
Great video! I get that it's a limitations of I/O but I wish they offered a board with a lot more connections. I'd love to use this to monitor every circuit in my home, but that would cost over 300 just for the boards. That's a lot of stacking as well!
Just picked up one of the "split phase solar" that comes with 2 X dual channel monitors and the board they connect to with the ESP 32. Been working on the house and upgraded the panel so figured may as well have good monitoring. Planning to do some grid tie solar as well after I get the roof replaced and some other stuff done. Anyway is there a major difference in how the boards will work compared to the single 6 channel version? I will end up with 4 channels total with 2 voltage channels. My end plan is to throw a 220 breaker into place for the solar to feed in on as I plan to install the panels and grid tie inverters in pairs to be able to use them for 220 appliances along with 110 stuff. And the goal is to be able to island during bad weather if needed using a small 220 generator to provide some basic power and allow the solar to take up the slack during the daytime (yes I plan to isolate from the grid when I do this for safety). By default the board comes with EmonCMS component installed but I don't want to use something else in between the HomeAssistant install to deal with the data. I really want to use ESPHome since I already use it quite a bit for things anyway but kind of getting in over my head with the software setup on this. Looked at the info on GitHub that you have posted and right now I'm not exactly sure what I will need to do. Hopefully everything will ship out and be here sometime next week but going to setup another ESP32 I have now to get started.
The 6 channel has two of the 3 channel ICs on it instead of one. The board actually doesn't come with any software as it does work that way. The ESP chip that is connected does all the WiFi/CPU stuff and you can put whatever software you want on it with a simple USB cable.
A critical aspect of this is the non-linearity of the CTs. Unless you are operating in the ‘sheet spot’ of the CT then non linearity will be an issue. Do you know if the chip somehow corrects for this? If so how does it do it as I did not notice you characterising each CT for its linearity.
I am wondering if the board is accurate enough to... Instead of adding SCT clamps to other circuits only clamp to the main input and develop signatures based on voltage changes for other devices coming on and off. For example. The dryer draws xxxmA and if you detect a change in voltage of xxxmA the trigger automatons for your dryer. Fridge draws xxymA, bedroom fan yyymA, etc...
I don't know for sure, but I would not think so due to the following. It would take less energy to reach the temperature set on your dryer from summer to winter because of the air temperature. Also if you ran two loads back to back the air temperature would be different, so the drier would not have to work as hard. But that's just my guess.
You could figure out what is what if they are inductive and resistive loads. The metering ICs figure out reactive and apparent power. So you could, for example read the "signature" of you electric dryer when it is on. Reactive power will be low (apart from the motor that spins the drum). Obviously that would take a bit of work over something pretty packaged like Sense.
@@kabturek This is a kewl idea. I am going to look into this further. It would open a whole new world if you you could, in some cases determine what is on and off based on load. I see HA reaping huge benefits from this
Thanks for this nice video. I really like to set this up for power monitoring, however, I have this weird two panel set up in a detached garage and wonder if there is a way to unify data gathered from two panels (with an ESP each)? Thanks!
Great video, I couldn't have got it working without it. I am disappointed the 100 amp current clamps do not fit over 4-0, 4-0, 2-0 aluminum wire coming into my breaker box as my intent was to measure my whole house power usage. Any suggestions?
If you used several different known-draw loads, you could use "the maths" approach (shown a couple of times in other comments) to calculate the multiplier for each load, then average them to get even closer to the true multiplier for that CT+sampler chip.
Very good explanation, thanks. I’ve wanted this for age. I had found some energy monitor system that use what they call « power signature » to recognize which device in the home is running. But they required a monthly fee to get their system. I want to do my own, but similar to that. I dont care so much about esphome (may be because I dont know it) as I’m not interested to see my power usage off my phone or on the net. I want direct instant reading on a local computer or custom device I would build. Is this 6 channel board can output its data directly in the Arduino? Like using an spi interface or something like that? I allready use grafana on influx db. Am i on the right track?
Yes. You don't have to use esphome. Even custom arduino sketches are pretty easy. github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter#setting-up-software
@@digiblurDIY ha ok super. Any suggestion on 200amp ct? My idea was to set two 200 on the main, and two 100 ct on the radiant floor and two (100 I guess but this is only 30 amp I think) on the generator circuit.
@@digiblurDIY Thanks, from what I saw on the HA website was the raspberry PI operating systems. I was able to find a video on doing a VMWare with Ubuntu. Thank you for the response.
Excellent video! I have 6 CT's, the meter board and enclosure being delivered Monday. I'm using Home Assistant Core, so my install might be a bit different, but your video is providing enough guidance I should be ok.
An update to my own post. I switched installs and went with HA on a VM. Now I have access to the "add-on store," which I didn't have before. Anyhow...This afternoon got the ESP32 programmed and installed on the main "meter board." Everything is working fine, but now I need to do an accurate calibration on the CT's. My two cents says that anyone who'd like to install Home Assistant, DO NOT do the install in Windows (Home Assistant Core). Do an install of VirtualBox and install the FULL version which includes everything.
@@phillipzx3754 Is your setup still working? I'm on Windows/Virtualbox as well. Any pointers, tips or things to watch out for? These little projects, while fun are timesucks.
@@walterlau3 It's been working great. My only problem is with Home Assistant and the "History Chart" card in Lovelace. For some reason it stops recording history. I have to refresh the screen manually, but everything else (amps/watts/voltage) works fine. One thing that got me was the CT's for my "mains." The CT's I bought (from the same website) were too small to fit over the wires, so I ordered 2 of the clamps (from the same place) with 16 mm opening. They were STILL too tight, so I used a rasp to remove a bit of the plastic in the opening. They still wouldn't snap completely shut so I tightened them down with some zip ties. So if you want to monitor your Mains lines, I'd suggest finding CT's with 18 mm opening if you have large wires. :-)
In my esphome configuration, I use power function and power template which P = Volt*Current to compare the watts value. The power has about the same value when the load has less than 100 watts or over 1200 watts. if the load between ~100w to ~1200w, the value in power function always has about 50-150 watts less than the power template sensor. I wonder if I need to do anything to get it calibrate properly. Thanks,
I got the answer by talking to my colleagues at work. They said I*V is just apparent power which is not true power, that's why I got close match true power and apparent power (I*V) when I calibrated with 80 lights bulb and heat gun at full load 1200 watts.
Yep, that's what I'm talking about. I use a power factor 1 device to calibrate things but then use the new ESPHome Dev sensors to let the board actually report the real wattage. Also I saw some other comments by you but I think the spam filter is filtering out the ones with links.
Yes, I added it. I wasn't sure if it was due to the name or config or using MQTT or whatever. I did this (keep in mind TH-cam will eat up the YAML formatting I'm sure) utility_meter: daily_total_kwh: source: sensor.12c_total_kwh cycle: daily daily_minisplit_kwh: source: sensor.12c_total_minisplit_kwh cycle: daily daily_total_phase_l_kwh: source: sensor.12c_total_phase_l_kwh cycle: daily daily_total_phase_r_kwh: source: sensor.12c_total_phase_r_kwh cycle: daily
hello Travis great video, I copied your file and made a few changes to suit my multi input (3) * 5KW solar system grid connected home (240 Volt Down Under) wasn't able to flash over USB but connected by the serial connection and use a USB- serial adaptor and that worked fine. going to set it up as zero balance grid connect system, put enough power back into the grid to cover the losses during cloudy days and nights if all goes to plan. ...the right pace with just the right level of technical information to get the job job done. thanks.
Brilliant - thank you! I have just got one of these that replaces some Shelly EM's that are dying :(. This is a great walkthrough video - though it looks like Watt is now available as a sensor value without calculation. Just need to calibrate 9 identical CT clamps - I'm hoping the variation between them is minimal....
Yep you got it right! The newer board revision and software allows the IC to calculate the real watts. Awesome stuff! A little redo is on my list of videos to update with this new data.
@@digiblurDIY UPDATE: I have also added sensors in Home Assistant to convert the W into kWh values. I found I received run time errors from the ESP32 when I added too many sensors (65) and had the web server enabled and DEBUG logging. Removing the web server and changing the login to INFO made everything more stable. #from sensor.yaml #For each CT clamp - platform: integration source: sensor.power_monitor_ct1_power name: Power monitor CT1 energy unit_prefix: k round: 2 #For the total consumption - platform: integration source: sensor.power_monitor_power name: Power monitor energy unit_prefix: k round: 2 this I then feed into a utility meter for daily/monthly/yearly tracking. #from utility_meter.yaml, for most clamps, I have monthly and annual trackers grid_monthly: source: sensor.power_monitor_ct1_energy cycle: monthly grid_yearly: source: sensor.power_monitor_ct1_energy cycle: yearly Thanks again! Steve
@@digiblurDIY I'm about to pull the trigger on this. Are you saying you don't need to do the calibration portion of the clamps in this video with the newer boards?
@@digiblurDIY Cool. Just have to buy these now! One more question: So in your original video, you indicated to get the 100A/50mA clamps for all items to monitor. I'm still watching your second video, but sounds like you are now indicating 100A for the main lines coming into the box and 20A/25mA for everything else (assuming the other items I want to monitor are under 20A), is that right? I have 3 breaker boxes (2 in basement, 1 on first floor), so I may need to do multiple boards to cover everything.
Luckily here in the Netherlands every house has a smart energy meter which spits out telegrams every 5 or 10 seconds which contains all of the details on power consumption and gas consumption. This can be easily fed into HA wired , with a simple rs232 converter or an esp8266/esp32 over Wi-Fi
Travis, Well done video; easy to follow instructions, good explanations, and of course needed mandatory cautionary safety warnings. I just ordered one of the 6 channel boards. Thanks for another great video!
digiblurDIY Yes, just like I had to ad a multiplier for voltage I had to do it for current also when using the SCT-019. Didn’t have to do it with the SCT-013.
@@digiblurDIY I missed that part. Just figured I had to do it with a multiplier on the Voltage. So I take the PGA gain only adjust current and not voltage then? Is it a straight out multiplier, so if I set it to 2X I can just divide my SCT-013 numbers by 2?
I'm not sure if I'm missing something, but wanting to do this. When clamping both lives in a split 240v system and then adding them together you get the total amperage from all of the 120v breakers, but wouldn't it double count any 240v appliances? My theoretical solution to overcome this would be to measure both lives and the common. And then do something like (L1 + L2 - Com) / 2 + Com to get the total current. Am I missing something obvious and it can be simplified? I know this is an old video, but thought the people here may be able to help.
Is this split phase US I assume? You can pass both hots through the same clamp in opposite directions is one method to grab both with one clamp. Or you can double it up if the load is balanced.
I've been holding off for a while now on what to do for this, but this has me interested. Needed a better method of tracking the house and solar. This seems to fit the bill
In my esphome debug log, I'm seeing: "[12:27:16][D][sensor:127]: 'powermon CT5 Watts': Sending state nan W with 0 decimals of accuracy". It apparently isn't calculating something properly because it's return nan (not a number) for all the sensors. Any ideas? I copied your yaml file exactly and haven't modified it yet.
Hi I am new to CT sensor. I have brought 6 channel main board .Do you have any simple code for me to test it.I just want to see data from CT sensor in serial port.
@@digiblurDIY 200 Amp panel. The 100 A CT shown does not fit. It should if it was designed for 100 A main. circuitsetup.us/ recommends the YHDC SCT-016 for monitoring US input .
Yeah I could see that not fitting on larger panels like at all electric homes. A lot of my area uses natural gas for appliances and heat since it is cheaper so panels aren't that large here.
If you purchase one of these today, the power transfer it comes with is 9V AC, will need to update the gain voltage to account for this! The current yaml file has 12v ac.
Yes. The power calibrations linked below on the CircuitSetup github will fit inline with the changes in the new revision of the board plus adds the real wattage.
Very nice explanations, since im a noob regarding the ESP32 and power monitoring I will have to come back and watch this gain when i Have gotten the hardware and scouted out how my own power central is looking. Thank you!
The calibration code suggested at esphome is: sensor: - platform: ct_clamp sensor: adc_sensor name: "Measured Current" update_interval: 60s filters: - calibrate_linear: # Measured value of 0 maps to 0A - 0 -> 0 # Known load: 4.0A # Value shown in logs: 0.1333A - 0.1333 -> 4.0 This seems like a much easier way of doing it. Maybe I am missing something?
Amazing video, congratulations. I would like to use Split Single Phase Energy Meter for an industrial application. Do you know how fast can it sample? Is it possible to reach sample times of around 100ms with ESPHome/EmonCMS?
Hello Travis have set up same power monitoring thanks to your great tutorial and information , the only issue I have is the need to reset power every few days to get it back on the network, any ideas?
Great video. I was actually considering using something from iotawatt. I currently have an Aeotec HEM but was wanting to monitor additional circuits. I'm using power monitoring plugs where I can but still needed something for high current devices.
I don't have an Iotawatt but have looked at them before I looked at this one. Their software seems very mature but went with the hardware that seem to have an edge up on things.
Thank you for this. I spent the last two weeks following this tutorial and building my power monitoring system and it's all done. Now I'm trying to add another sensor in HA that calculates kWh. How can I do this?
Noticed you have a 125A mains box. Is that why you are using only 100A CTs. On a US (or CANADA) split phase 240V 200A main panel, would you not need to use two 200A or 250A rated CTs, one on each service input wire ???
Why does it use TRS (3-pole) Connectors and not just TS (2-pole)? Aren't there just two leads? Ordered some SCT-019 (200A) and wanted to put a plug on them.
i see that there is some sort of limit on the 6 channel add on boards, they say you can have 6 add on, plus the mainboard (48 total clamps) but if you are doing current and power sensor, you can only have 3 boards. i am just getting started and don't understand much on the esp hass.io world . But my question is can you have multiple EPS32 feeding back to the hass.io for this monitoring?
@digiblurDIY Great video, I got my system up and running, and for the life of me I can't figure out why the real watts are way lower than it should be on one of my main feeds. I flipped the CT around and got negative watts. I gave up and just did a calc (volts x amps). Any ideas to get the real watts working? Also, is there some other code to get the daily kWh to reset at midnight; mine just keeps adding with no reset to zero?
Are you using the version that the IC does the calculations? If so, make sure the amps and voltage are calibrated and the IC should do the rest of figuring out the actual watts based on the power factor.
Interesting content, Thank you. If i am powering my ESP chip from an external source, should the ground from the energy monitor be connected to the same ground that is powering the chip for the monitoring to function properly? Any schematics you can share for this setup?
Hi love your video and great information. As I am in Australia and we have 240 V systems and I have 5 kW solar on the roof, and the solar hot water system, also the house has CBUS home automation. I want to monitor my consumption and solar production, which system would you recommend? Thanks
You could use those 220 channels to monitor anything you like. Keep in mind that US 220v appliances would need 2 channels to capture the entire usage. You could do the entire house with 2 channels but it wouldn't be broken down. I use the 6 channel where 2 do the entire house then the other 4 are broken down to other circuits.
@@digiblurDIY Yeah I considered that but unfortunately the last owners didn't run the wires to the main panel but instead ran them to a sub panel located in the garage. No idea why.
@@DrDrewsAdventures perhaps they ran a wire from main panel to a sub-panel in the garage because it makes it easier to add additional circuits in the garage on the future. That's why I'd add a sub-panel to my garage, at least.
Not to be a nag... BUT.... that breaker box needs some organization! On a positive note, Thank you for this tutorial, and VERY nice job on your graphs in grafana.
Would love to rip and replace it indeed. No need for the electric dryer, stove and water heater circuits anymore. It's on the agenda when the emergency generator is done as it is original to the house. Thanks! I am pretty green when it comes to grafana. Need to learn so much more but wow it makes some nice graphs.
@@digiblurDIY Sounds like you got a decent project in your mist! One thing I might add is if it were me, do some before and after shots just to really show off a nice box. cause lets all agree, who doesn't like checking out a nice box? am I right?! Yeah grafana is defiantly an awesome tool. I had mine pulling data from a MySQL database before but this week I actually started using influx for logging sensor data. So far, its been very rewarding!
Travis, great job as always!! In your example of the LED dimmer at the end of the video. Do you have a clamp on that circuit to monitor that? Or were you able to monitor that change from having the 2 clamps on each of your main feeds coming into the panel?
I had a 100a clamp on just that circuit as I was isolating things in a controlled environment without a fridge or other automatic devices cycling on or off.
Great video - thank you! Regarding the warning about unplugging the CT From the board - I want to make sure I am understanding (sorry if this is a dumb question) . If I unplug the RCA plug from the board the tip could be dangerously energized? Is that correct? Would this be for all CTs or is their a certain CT I should look for that would reduce or eliminate this risk. How would you safely unplug it from the board? Thanks again!
Yes All CT's by deafult are dangerous when the secondary is not connected to load or short circuited. To understand imagine a ct of a ration of 200 to 1 ( 200 primary amps results to 1 amp on secondary) so when open circuit CT will amplify the 100 V on primary by 200 times .
They can be used safely if you just take your time and go through the motions. The YHDC models I used either have the zener diode or burden protection circuit in them. To prevent any danger. Remove any load from the circuit first then you can unplug them. Do not turn the circuit back on until either the CT is removed or is plugged back in the board.
Great video. I have the 2 channel board. It is up and running using Esphome. I manage to get readings on the CT1 input and NOT on the CT2 . Any reason behind this? Could you point me in a direction that i can explore to resolve this issue. Thank you in advance,
I purchased the recommended devices and have a couple of errors / questions on the setup. When I try the otA I get no route to host. I was able to compile and upload. I then deleted and re-entered all and it worked for a while and then I am back to no route to host when trying to update the code. Maybe it was a defective module. I purchased two and the 2nd one worked with no issues.
@@digiblurDIY I did. Had an issue with the first one not working correctly after plugging it into the socket. The second device worked correctly. I did notice a slow ping time to the device. Most of my devices are 5 to 10 times faster. Any ideas on why this would be so slow?
Does the direction of the CT clamp matter? Also if you have something like a range with a dual breaker (30, 40a etc) I'm guessing you need to monitor both leads to get the total? Thanks
The clamp direction will make a difference using the new sensor that shows the real wattage and not just calculated. If it is negative just flip it around.
@@digiblurDIY Do you have more info on the new sensor? I have the latest board and used your yaml file that is calculating watts. I tried it both ways and it was positive in both directions. Thanks
Hi, how does this CT clamp get the voltage from since most voltage need to be measure by connecting the live and neutral wires. This unit does not have either one. How accurate is the gain_voltage measurement for AC voltage after calibration?
I'm not familiar with using it on 3 phase but I would assume you could just put the clamp on it and go? Of course you could have the voltage differences. Might be a good question for the CircuitSetup folks.
The ICs are actually made for 3 phase. However, the 2nd and 3rd voltages are not hooked up. You can get around this by writing to the B and C voltage registers. From what I can tell esphome cant do this yet, but I may figure out a hardware solution for the next version.
How do you deal with the power factor of each particular load ? In AC Power in not VxI but VxIxcos(phi), phi is the phase difference btw 2 sinusoidal signals
Hi digiblurDIY, I found your video really intresting even if it exceed my basic knoledges. I'm asking you if you know a proyect to measuere the power and cut some lines when the total power is above a certain limit (to avoid automatic shut off in the energy company meter). I'm looking for a solution for an underfloor electic heating system with a line for each room. Thanks for your advice.
@@digiblurDIY Thanks for your reply. I have to figure out how to connect the relays and how to compute the total Watts in order to decide which line I have to switch off. Thanks again.
All of that has been redone from the transformer to the breaker box and everything torqued since this video. Still the same voltage swings between night and day. Entergy says it is within spec. 🤷♂️
I put in an iotawatt back in December to accomplish the same trick. NO affiliation, but check them out. $129 in a case for 14 channels. CT's are extra of course.
digiblurDIY mine has been rock solid stable, and is within 1% of util co’s kwh each month. My only complaint is that they initially shipped me the wrong ct’s, but they took care of it very quickly.
@@netmagi How often does that take readings? Also, do you get metering data like power factor and reactive power? From what I understand it uses standard ADC IC's so the calculations are done in software.
A question On the voltage, isn't there only one voltage? I see that the board calculates the voltage from the 9VAC power supply for one of the phases. How does it calculate the voltage on the other?
I'm in the US residential where there is only single split phase. If you have two phases you want to monitor you'd need an AC adapter on that phase too then follow the instructions to feed the second phase in. github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter
@@digiblurDIY Thanks. I missed the second phase hookup. Is there a data sheet for the device? When on street power the split phases are close enough (most of the time) to not worry about it. I say most of the time, is recently after power outage the power company only restored one of the phases. What a mess. It would be nice to shut everything down if the phases aren't with in tolerance of each other before damage is done.
That link has all the instructions on how to do it, if you need more info you'd need to contact Circuitsetup as I've never done that. Luckily my transformer is in my backyard so it would be rare if I ever saw half of the split.
What are the damn bright blue LED's on this board that totally illuminate my closet at night? I would also like the ability to turn the LED's off through software. I mean it they are annoying. They even show through the purchased 3D printed case. For now I have packed the case with some black foam I have, but I am worried it might heat up. I am using it with ESPHome. Also, is there a way to reset the totals?
The CTs would go in whatever direction current normally flows. Depending on how you set it up you may want negative readings to calculate net energy consumption.
Yes. There is. That is one of the updates that happened after. There are now more sensors along with non calculated watts. It's all done by the IC now. github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/blob/master/Software/ESPHome/6chan_energy_meter_jp8-jp11.yaml
Would each CT clamp need its own calibration? I have the SCT-013 100A/50ma and wonder if I can just use the number 32498 since it doesn't seem to depend on the voltage of the circuit
Great Job on the video. I have a question and it may be dumb but i do not see any other calculation other then volts * amps, if you don't include your power factor this is only VA (volt amps) not watts. unless there is more then i can see in the code.
Actually this has been added to ESPHome in dev now since the video was recorded. The the chip calculates all of that. next.esphome.io/components/sensor/atm90e32.html
@@seanmcdonald656 The new dev version allows you to get power factor, but you don't necessarily need to bring it into ESPHome. To just get wattage from the board, you'll want to solder JP9-JP11 (if they aren't already). See this example config with power added: github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/blob/master/Software/ESPHome/6chan_energy_meter_jp9-jp11.yaml
I’m interested in doing some whole home power monitoring as well as some automations using HA and Node Red. Would you still recommend this as your favorite option for PM?
I got a v1.2 board and am having some problems getting the gain_voltage high enough. ESPHome only allows 65535 as the max and that's not enough to adjust my voltage up to 120V. I can get to 113V. The output of my Power Supply is 10.1V. Something changed with the v1.2 board. From CircuitSetup: "For v1.2 of the board your voltage calibration will be high, >64,000"
Circuitsetup. I would think that you would need more voltage to be able to back down the gain. And just to be sure you are doing this with the esp32 powered only by the 6 channel board and no USB is connected right?
I tried programming my esp32 this weekend with a 6ch board with 6ch ad-on for 12 channels. The esp32 is programmed, but it it does not come alive with the AC power supply connected on the monitor boards. Unplugging the 10VAC supply, and powering by the usb of the esp32, the esp is alive and all 12 channels are seen on the web interface. In both cases, they boards look powered up, green led on both monitor boards, and red led on the esp32 board. I measure a nice 3.3V on the esp32 when powered by the AC supply. Ideas?
@@digiblurDIY Not high, but also unlimited. It's a butchered old 9VDC power pack rated for 250mA. I opened it up, removed the DC regulation, and wired the transformer directly to the output. The center tap, gave me a 9.9 RMS VAC.
@@digiblurDIY Well you called it! New 1A 9VAC power pack works ($A 27). I'm surprised! Both look the same on the scope. Just had an idea.... It's the DC barrel connector. The board has a 2.1mm pin, my original supply is 2.5mm. Putting a 2.5mm plug on the new supply (it has exchangeable ends) it also fails to come alive despite lighting all the leds.
If I want to get the current measurement from a dual pole (240v) breaker, do I need a CT on both hot wires, or is there a way to double the voltage for a CT on 1 of the two hot wires?
I had this same question - I looked at www.diychatroom.com/threads/balanced-loading-on-240v-circuit.196969/ and what they said made sense - a pure 240v load (e.g. 240v electric dryer, water heater, etc) will always be equal. I'm not sure of the rationale fully, but it would be great to hear about 240v load examples that don't have equal power (btw, US, 240v split phase). I would think all resistance loads (electric water heater, dryer, electric heat) would definitely be covered. Does anyone have cases of 240v split phase loads that are not balanced?
@@digiblurDIY hi mate, what about the transformer supply? As far as I know, transformer design is quite focused on the frequency, operating a 60hz on 50hz can result in greater iron losses. Im thinking this might translate into greater power calculation errors. Having said that I'm sure I could find a 50hz transformer instead.
Quick tip for those who don't like guesswork. Calibration can be sped up a lot. If you have say 0.32A and expect 0.50 try 0.5/0.32*current conversion factor (like 10000 in the video). You'll get 15624, close to his final 15420. Like mentioned, higher current loads will yield better results using this same process
Ah, another math guy! Why "walk it in" if you can just calculate, right? (-:
Thanks for this! I need to update my numbers now.
@@digiblurDIY don't stress, like you mentioned the calibration you did with 10-11 amp loads will be much more accurate. I work in large scale energy monitoring so seeing cheap home solutions like this is awesome!
Haha, I just wanted to suggest the same. :D
Starting with a value of 10000 and the known amperage, we can find the calibration value using the formula (10000)(amperage)/(indicated value). For your example (10000)(0.49A)/(0.32A)=15312. Hope this helps!
I want you to know this is fantastic! I am sitting here calibrating and starting to see everything come together. Very excited! I am very glad that I ran across your channel. Thanks for posting this detailed video along with all of the links that you did.
Does anyone know how is it connected? The hardware I mean
In many applications disconnecting a CT output wires will cause it to burn up, or to damage the insulation rating of the secondary windings by causing the voltage to rise too high on the secondary winding for what the secondary wiring insulation is rated for, ruining the CT. Always keep them connected when current is running in the wire they're connected to for sampling.
This is so much easier now in the current version as of 8/2022! Still a great video though, thank you.
Thanks! I did a redo of the later version as well.
Great video. You can trick the clamps into thinking that they're is more current if you loop the wire back around and through the meter clamp. So if you had a 10A load with 1 wire through the core if you wrap it around and bring 2 wires through it will read 20A.
why would you want to do that? Would that be a way to measure two lines using only 1 CT clamp? So if I wanted to measure a 220V circuit like in the USA (which is basically just two separate 120V lines), I could put the clamp around both wires and it will automatically add up the amps and watts?
Easier way to zero in on the calibration: correct multiplier = test_multiplier * expected_amps / measured_amps. For your example, 10000 * 0.49 / 0.32 yeilds 15469. (I love using math to short-circuit iterating.)
The ratio of the correct multiplier to the correct amperage is the same as the ratio of the test multiplier to the test amperage:
M[act] / A[act] = M[test] / A[test]
x / 0.49 = 10000 / 0.32
Solve for x.
This does assume linearity of the system, of course. If a system isn't quite linear, it should get you close, then you can iterate. Since these CTs should be linear, one sample should get you spot on.
I knew Math genius would come along and show us the light!! :) Thanks!
@@digiblurDIY - hehe, not a genius, just someone who has seen the light and understands the "this is to that as that is to the other" concept.
I really appreciate you walking us through all the stuff you do. I've not jumped in as far as you, Justin, and Rob, but with your (collective) guidance, many more of us are willing to try. I'm just trying to add my little bit. (-:
Appreciate Video! Sorry for chiming in, I would appreciate your opinion. Have you ever tried - Mahorrla Defence Wisdom Method (do a search on google)? It is a great one off product for securing your home from danger without the normal expense. Ive heard some incredible things about it and my buddy after many years got cool success with it.
Note this: When you put hot and neutral wires through a ct, your current reading should be 0 amps on a 2 wire circuit. (aka this how GFCI works through a ct inside the device or breaker) If you clamp an amp meter on the neutral and then clamp it on the hot of the same circuit it will read the same. When clamping both Hot & Neut of the same circuit value will be 0 (balanced)
If your clamping it on a 3 wire circuit where the neutral is shared, your reading will be the different or the unbalanced load of the two circuits or if both hot's have the same type of load L1 = 1500W (Black) L2 = 1500W (Red) then 0 watts 0 amps on neutral (White)
Awesome video! I knew nothing about esp32 and now I know everything :) Ordering this stuff tomorrow.
I did one that is a little more recent covering it again. I believe I linked it in the video description.
I'm a couple years behind, but this video appears to be what I need. I have a Tech/Computer background. But, I'm a complete Noob RE: Power Monitoring. Hoping you have other videos that will feed my thirst for knowledge.
I actually have an updated one on this one as well I did last month.
Great video! I get that it's a limitations of I/O but I wish they offered a board with a lot more connections. I'd love to use this to monitor every circuit in my home, but that would cost over 300 just for the boards. That's a lot of stacking as well!
Check out Emporia th-cam.com/video/z0Jv4nO9OWg/w-d-xo.html
I got the last 6 channel in stock. Thanks for the video!
Glad you got in quickly. I am sure they will have more soon for others. No fear!
Just picked up one of the "split phase solar" that comes with 2 X dual channel monitors and the board they connect to with the ESP 32. Been working on the house and upgraded the panel so figured may as well have good monitoring. Planning to do some grid tie solar as well after I get the roof replaced and some other stuff done.
Anyway is there a major difference in how the boards will work compared to the single 6 channel version? I will end up with 4 channels total with 2 voltage channels. My end plan is to throw a 220 breaker into place for the solar to feed in on as I plan to install the panels and grid tie inverters in pairs to be able to use them for 220 appliances along with 110 stuff. And the goal is to be able to island during bad weather if needed using a small 220 generator to provide some basic power and allow the solar to take up the slack during the daytime (yes I plan to isolate from the grid when I do this for safety).
By default the board comes with EmonCMS component installed but I don't want to use something else in between the HomeAssistant install to deal with the data. I really want to use ESPHome since I already use it quite a bit for things anyway but kind of getting in over my head with the software setup on this. Looked at the info on GitHub that you have posted and right now I'm not exactly sure what I will need to do. Hopefully everything will ship out and be here sometime next week but going to setup another ESP32 I have now to get started.
The 6 channel has two of the 3 channel ICs on it instead of one. The board actually doesn't come with any software as it does work that way. The ESP chip that is connected does all the WiFi/CPU stuff and you can put whatever software you want on it with a simple USB cable.
That's an older spicy power box too! No finger safe covers on the main lugs.
Thanks!
A critical aspect of this is the non-linearity of the CTs. Unless you are operating in the ‘sheet spot’ of the CT then non linearity will be an issue. Do you know if the chip somehow corrects for this? If so how does it do it as I did not notice you characterising each CT for its linearity.
I am wondering if the board is accurate enough to... Instead of adding SCT clamps to other circuits only clamp to the main input and develop signatures based on voltage changes for other devices coming on and off. For example. The dryer draws xxxmA and if you detect a change in voltage of xxxmA the trigger automatons for your dryer. Fridge draws xxymA, bedroom fan yyymA, etc...
I don't know for sure, but I would not think so due to the following. It would take less energy to reach the temperature set on your dryer from summer to winter because of the air temperature. Also if you ran two loads back to back the air temperature would be different, so the drier would not have to work as hard. But that's just my guess.
Check the paper for NILM - non invasive load monitoring
You could figure out what is what if they are inductive and resistive loads. The metering ICs figure out reactive and apparent power. So you could, for example read the "signature" of you electric dryer when it is on. Reactive power will be low (apart from the motor that spins the drum). Obviously that would take a bit of work over something pretty packaged like Sense.
@@kabturek This is a kewl idea. I am going to look into this further. It would open a whole new world if you you could, in some cases determine what is on and off based on load. I see HA reaping huge benefits from this
Amazing video. And, great finding that CircuitSetup board.
I did a little updated one as well th-cam.com/video/n2XZzciz0s4/w-d-xo.html
Thanks for this nice video. I really like to set this up for power monitoring, however, I have this weird two panel set up in a detached garage and wonder if there is a way to unify data gathered from two panels (with an ESP each)? Thanks!
Is one just a sub panel? Or two meters?
@@digiblurDIY Sub Panel, one meeter. No way to run wire in between, hence I’d like to use two ESPs but show the aggregated power data in one view.
Ahh..you want to monitor separate circuits in the sub panel too?
@@digiblurDIY exactly, monitor a second circuit and a second array of solar panels too. That all combined in one view.
Yeah I could see needing two given the two separate locations
Great video, I couldn't have got it working without it.
I am disappointed the 100 amp current clamps do not fit over 4-0, 4-0, 2-0 aluminum wire coming into my breaker box as my intent was to measure my whole house power usage. Any suggestions?
Bigger clamps. They make some very large clamps as well. Circuitsetup.us carries various sizes too.
If you used several different known-draw loads, you could use "the maths" approach (shown a couple of times in other comments) to calculate the multiplier for each load, then average them to get even closer to the true multiplier for that CT+sampler chip.
Very good explanation, thanks. I’ve wanted this for age. I had found some energy monitor system that use what they call « power signature » to recognize which device in the home is running. But they required a monthly fee to get their system. I want to do my own, but similar to that.
I dont care so much about esphome (may be because I dont know it) as I’m not interested to see my power usage off my phone or on the net. I want direct instant reading on a local computer or custom device I would build.
Is this 6 channel board can output its data directly in the Arduino? Like using an spi interface or something like that? I allready use grafana on influx db.
Am i on the right track?
Yes. You don't have to use esphome. Even custom arduino sketches are pretty easy.
github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter#setting-up-software
@@digiblurDIY ha ok super. Any suggestion on 200amp ct? My idea was to set two 200 on the main, and two 100 ct on the radiant floor and two (100 I guess but this is only 30 amp I think) on the generator circuit.
Looks like he's out of stock on CircuitSetup. You might have to get them from YHDC off Aliexpress
@@digiblurDIY hum… sounds like they are not live any more. I sent them questions twice and no answer 🙃 I’m sad
@@guytas did you notice the counterfeit SCT013, named YHDO instead of YHDC. (very innacurate measurement) They were on Amazon.
It would have been nice if you mentioned that Home Assistant needs to run on a Raspberry PI version 3 or 4. I can't run Home Assistant on Windows.
Absolutely it can. HA runs on all kinds of things and HA isn't required for this project anyways.
@@digiblurDIY Thanks, from what I saw on the HA website was the raspberry PI operating systems. I was able to find a video on doing a VMWare with Ubuntu. Thank you for the response.
@@robertpotter4700 I mean, you don't even need VMWare. You can run it on Docker for Windows as well.
Do you have an updated video of this? Just want to make sure it is the latest version. Great work.
This one th-cam.com/video/n2XZzciz0s4/w-d-xo.html
Excellent video! I have 6 CT's, the meter board and enclosure being delivered Monday. I'm using Home Assistant Core, so my install might be a bit different, but your video is providing enough guidance I should be ok.
An update to my own post. I switched installs and went with HA on a VM. Now I have access to the "add-on store," which I didn't have before.
Anyhow...This afternoon got the ESP32 programmed and installed on the main "meter board." Everything is working fine, but now I need to do an accurate calibration on the CT's.
My two cents says that anyone who'd like to install Home Assistant, DO NOT do the install in Windows (Home Assistant Core). Do an install of VirtualBox and install the FULL version which includes everything.
@@phillipzx3754 Is your setup still working? I'm on Windows/Virtualbox as well. Any pointers, tips or things to watch out for? These little projects, while fun are timesucks.
@@walterlau3 It's been working great. My only problem is with Home Assistant and the "History Chart" card in Lovelace. For some reason it stops recording history. I have to refresh the screen manually, but everything else (amps/watts/voltage) works fine.
One thing that got me was the CT's for my "mains." The CT's I bought (from the same website) were too small to fit over the wires, so I ordered 2 of the clamps (from the same place) with 16 mm opening. They were STILL too tight, so I used a rasp to remove a bit of the plastic in the opening. They still wouldn't snap completely shut so I tightened them down with some zip ties.
So if you want to monitor your Mains lines, I'd suggest finding CT's with 18 mm opening if you have large wires. :-)
In my esphome configuration, I use power function and power template which P = Volt*Current to compare the watts value. The power has about the same value when the load has less than 100 watts or over 1200 watts. if the load between ~100w to ~1200w, the value in power function always has about 50-150 watts less than the power template sensor.
I wonder if I need to do anything to get it calibrate properly.
Thanks,
Check out the new wattage sensors in the latest esphome-dev version as you let the chip actually report the true wattage and not calculated.
I got the answer by talking to my colleagues at work. They said I*V is just apparent power which is not true power, that's why I got close match true power and apparent power (I*V) when I calibrated with 80 lights bulb and heat gun at full load 1200 watts.
Yep, that's what I'm talking about. I use a power factor 1 device to calibrate things but then use the new ESPHome Dev sensors to let the board actually report the real wattage. Also I saw some other comments by you but I think the spam filter is filtering out the ones with links.
Have you added this to the 2021.8 energy monitoring now in HA? HA does not automatically pick it up as an energy device.
Yes, I added it. I wasn't sure if it was due to the name or config or using MQTT or whatever. I did this (keep in mind TH-cam will eat up the YAML formatting I'm sure)
utility_meter:
daily_total_kwh:
source: sensor.12c_total_kwh
cycle: daily
daily_minisplit_kwh:
source: sensor.12c_total_minisplit_kwh
cycle: daily
daily_total_phase_l_kwh:
source: sensor.12c_total_phase_l_kwh
cycle: daily
daily_total_phase_r_kwh:
source: sensor.12c_total_phase_r_kwh
cycle: daily
digiblurDIY,
Outstanding video. Clear, concise, accurate, and very informative. My compliments for a job well done.
hello Travis
great video,
I copied your file and made a few changes to suit my multi input (3) * 5KW solar system grid connected home (240 Volt Down Under) wasn't able to flash over USB but connected by the serial connection and use a USB- serial adaptor and that worked fine.
going to set it up as zero balance grid connect system, put enough power back into the grid to cover the losses during cloudy days and nights if all goes to plan.
...the right pace with just the right level of technical information to get the job job done.
thanks.
There are more changes coming the dev version of the software, power factor, real wattage, etc.
Brilliant - thank you! I have just got one of these that replaces some Shelly EM's that are dying :(. This is a great walkthrough video - though it looks like Watt is now available as a sensor value without calculation. Just need to calibrate 9 identical CT clamps - I'm hoping the variation between them is minimal....
Yep you got it right! The newer board revision and software allows the IC to calculate the real watts. Awesome stuff! A little redo is on my list of videos to update with this new data.
@@digiblurDIY UPDATE: I have also added sensors in Home Assistant to convert the W into kWh values.
I found I received run time errors from the ESP32 when I added too many sensors (65) and had the web server enabled and DEBUG logging. Removing the web server and changing the login to INFO made everything more stable.
#from sensor.yaml
#For each CT clamp
- platform: integration
source: sensor.power_monitor_ct1_power
name: Power monitor CT1 energy
unit_prefix: k
round: 2
#For the total consumption
- platform: integration
source: sensor.power_monitor_power
name: Power monitor energy
unit_prefix: k
round: 2
this I then feed into a utility meter for daily/monthly/yearly tracking.
#from utility_meter.yaml, for most clamps, I have monthly and annual trackers
grid_monthly:
source: sensor.power_monitor_ct1_energy
cycle: monthly
grid_yearly:
source: sensor.power_monitor_ct1_energy
cycle: yearly
Thanks again!
Steve
@@digiblurDIY I'm about to pull the trigger on this. Are you saying you don't need to do the calibration portion of the clamps in this video with the newer boards?
Not unless you want to tweak it. They did the calibrations already but it isn't a bad idea to check it.
@@digiblurDIY Cool. Just have to buy these now! One more question: So in your original video, you indicated to get the 100A/50mA clamps for all items to monitor. I'm still watching your second video, but sounds like you are now indicating 100A for the main lines coming into the box and 20A/25mA for everything else (assuming the other items I want to monitor are under 20A), is that right? I have 3 breaker boxes (2 in basement, 1 on first floor), so I may need to do multiple boards to cover everything.
Luckily here in the Netherlands every house has a smart energy meter which spits out telegrams every 5 or 10 seconds which contains all of the details on power consumption and gas consumption. This can be easily fed into HA wired , with a simple rs232 converter or an esp8266/esp32 over Wi-Fi
I know some people with analog meters still. Some by choice and pay extra. Lol.
Travis, Well done video; easy to follow instructions, good explanations, and of course needed mandatory cautionary safety warnings. I just ordered one of the 6 channel boards. Thanks for another great video!
Just a heads up. Just calibrated my system and also had to use a 2x Multiplier on my SCT-019 200A Clamp to get the value high enough.
Thanks for letting us know!
Side note.. 2x as in the gain PGA?
digiblurDIY Yes, just like I had to ad a multiplier for voltage I had to do it for current also when using the SCT-019. Didn’t have to do it with the SCT-013.
You can change the PGA gain and the IC turns up the gain of the 3 channels.
@@digiblurDIY I missed that part. Just figured I had to do it with a multiplier on the Voltage. So I take the PGA gain only adjust current and not voltage then? Is it a straight out multiplier, so if I set it to 2X I can just divide my SCT-013 numbers by 2?
I'm not sure if I'm missing something, but wanting to do this. When clamping both lives in a split 240v system and then adding them together you get the total amperage from all of the 120v breakers, but wouldn't it double count any 240v appliances? My theoretical solution to overcome this would be to measure both lives and the common. And then do something like (L1 + L2 - Com) / 2 + Com to get the total current. Am I missing something obvious and it can be simplified? I know this is an old video, but thought the people here may be able to help.
Is this split phase US I assume? You can pass both hots through the same clamp in opposite directions is one method to grab both with one clamp. Or you can double it up if the load is balanced.
I've been holding off for a while now on what to do for this, but this has me interested. Needed a better method of tracking the house and solar. This seems to fit the bill
In my esphome debug log, I'm seeing: "[12:27:16][D][sensor:127]: 'powermon CT5 Watts': Sending state nan W with 0 decimals of accuracy". It apparently isn't calculating something properly because it's return nan (not a number) for all the sensors. Any ideas? I copied your yaml file exactly and haven't modified it yet.
Nevermind. I figured it out. I changed cs_pin back to 4 and 5 and it seems to be working so far.
It is easy to miss that comm failure on boot as stuff rolls by.
Hi I am new to CT sensor. I have brought 6 channel main board .Do you have any simple code for me to test it.I just want to see data from CT sensor in serial port.
I use IDE.
I did some IDE based code a good while back before it was in ESPHome. github.com/digiblur/digiNRG_SplitPhase
@@digiblurDIY OK
thanks
@@digiblurDIY Can I use this sample code to get CT1 data from main board
#include "EmonLib.h" // Include Emon Library
EnergyMonitor emon1; // Create an instance
void setup()
{
Serial.begin(9600);
emon1.voltage(2, 234.26, 1.7); // Voltage: input pin, calibration, phase_shift
emon1.current(1, 111.1); // Current: input pin, calibration.
}
void loop()
{
emon1.calcVI(20,2000); // Calculate all. No.of half wavelengths (crossings), time-out
emon1.serialprint(); // Print out all variables (realpower, apparent power, Vrms, Irms, power factor)
float realPower = emon1.realPower; //extract Real Power into variable
float apparentPower = emon1.apparentPower; //extract Apparent Power into variable
float powerFActor = emon1.powerFactor; //extract Power Factor into Variable
float supplyVoltage = emon1.Vrms; //extract Vrms into Variable
float Irms = emon1.Irms; //extract Irms into Variable
Serial.print("Voltage : ");
Serial.println( supplyVoltage );
Serial.print("Current : ");
Serial.println( supplyVoltage );
Serial.print("Watts : ");
Serial.println( Irms );
Serial.println( "
" );
}
The output is
0.00 0.00 6.76 0.00 nan
You are missing the IC library.
Does the wattage calculation take into account the phase difference in the voltage and current? Watts vs VA.
I know on the 2 channel it did for me as I was reading negative watts. Didn't think the phase difference through all the way. Doh.
This is very good information. Many thanxs. But how would you use this on solar power input? It is DC and these clamps work with AC only. Thanxs
If you monitor Mains power in the US, the sensor recommended ID does not fit the incoming wires. YHDC SCT-016 will work instead.
That will vary per panel.
@@digiblurDIY 200 Amp panel. The 100 A CT shown does not fit. It should if it was designed for 100 A main. circuitsetup.us/ recommends the YHDC SCT-016 for monitoring US input .
Yeah I could see that not fitting on larger panels like at all electric homes. A lot of my area uses natural gas for appliances and heat since it is cheaper so panels aren't that large here.
Hi, great video!! would like to see a video on setting up grafana.
Will definitely put it on the list.
If you purchase one of these today, the power transfer it comes with is 9V AC, will need to update the gain voltage to account for this! The current yaml file has 12v ac.
Yes. The power calibrations linked below on the CircuitSetup github will fit inline with the changes in the new revision of the board plus adds the real wattage.
Very nice explanations, since im a noob regarding the ESP32 and power monitoring I will have to come back and watch this gain when i Have gotten the hardware and scouted out how my own power central is looking. Thank you!
The calibration code suggested at esphome is:
sensor:
- platform: ct_clamp
sensor: adc_sensor
name: "Measured Current"
update_interval: 60s
filters:
- calibrate_linear:
# Measured value of 0 maps to 0A
- 0 -> 0
# Known load: 4.0A
# Value shown in logs: 0.1333A
- 0.1333 -> 4.0
This seems like a much easier way of doing it. Maybe I am missing something?
Amazing video, congratulations. I would like to use Split Single Phase Energy Meter for an industrial application. Do you know how fast can it sample? Is it possible to reach sample times of around 100ms with ESPHome/EmonCMS?
It is more down to the host processor. I wound use something faster like a Raspberry Pi 4
Hello Travis
have set up same power monitoring thanks to your great tutorial and information , the only issue I have is the need to reset power every few days to get it back on the network, any ideas?
Enable the AP mode in ESPHome and see if maybe it is falling off the network.
Great video. I was actually considering using something from iotawatt. I currently have an Aeotec HEM but was wanting to monitor additional circuits. I'm using power monitoring plugs where I can but still needed something for high current devices.
I don't have an Iotawatt but have looked at them before I looked at this one. Their software seems very mature but went with the hardware that seem to have an edge up on things.
That breaker panel is terrifying! Please leave your nation immediatly for your own safety!!!!!!
It has been rewired and such since the video thankfully. Swapped in a new meter pan, disconnect and an ATS for the generator.
Thank you for this. I spent the last two weeks following this tutorial and building my power monitoring system and it's all done. Now I'm trying to add another sensor in HA that calculates kWh. How can I do this?
Yes, i would just add another in the ESPHome YAML itself.
Just thinking about doing this over the winter. How has it held up? Anything you would do differently now instead of what’s in your video?
I did a recent update on it a few months ago. I went to 12 channels on it. Still kicking and working great.
Can I add a Bluetooth sensors to this devices? Where I have it located in my garage it would be nice to have a temperature sensor.
All depends on the memory left on the board for the entities.
Noticed you have a 125A mains box. Is that why you are using only 100A CTs. On a US (or CANADA) split phase 240V 200A main panel, would you not need to use two 200A or 250A rated CTs, one on each service input wire ???
Yes that's all I needed and it rarely hits 50 to 60 amps per leg.
Why does it use TRS (3-pole) Connectors and not just TS (2-pole)? Aren't there just two leads? Ordered some SCT-019 (200A) and wanted to put a plug on them.
Not sure why they make them like that. It's only 2 wires and a shield.
@@digiblurDIY Thanks!!
@@johnraahauge4552 WHERE did you order the SCT-019, I have 200A service and need a bigger clamp.
Randy Lust EBay: rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com%2Fulk%2Fitm%2F283439437925
i see that there is some sort of limit on the 6 channel add on boards, they say you can have 6 add on, plus the mainboard (48 total clamps) but if you are doing current and power sensor, you can only have 3 boards. i am just getting started and don't understand much on the esp hass.io world . But my question is can you have multiple EPS32 feeding back to the hass.io for this monitoring?
You could have hundreds of esp32 boards around the doing things.
@digiblurDIY Great video, I got my system up and running, and for the life of me I can't figure out why the real watts are way lower than it should be on one of my main feeds. I flipped the CT around and got negative watts. I gave up and just did a calc (volts x amps). Any ideas to get the real watts working? Also, is there some other code to get the daily kWh to reset at midnight; mine just keeps adding with no reset to zero?
Are you using the version that the IC does the calculations? If so, make sure the amps and voltage are calibrated and the IC should do the rest of figuring out the actual watts based on the power factor.
Interesting content, Thank you. If i am powering my ESP chip from an external source, should the ground from the energy monitor be connected to the same ground that is powering the chip for the monitoring to function properly? Any schematics you can share for this setup?
I am just using that power supply I showed wired to mains power.
Hi love your video and great information. As I am in Australia and we have 240 V systems and I have 5 kW solar on the roof, and the solar hot water system, also the house has CBUS home automation. I want to monitor my consumption and solar production, which system would you recommend? Thanks
It will work with 240v fine, I use it on 240v split phase here. All down to how many channels you want to monitor.
In the video you discussed adding sensor values together in the yaml file but there is no example. How do you combine the values?
In my example linked in the description it has some template sensors as examples.
@@digiblurDIY I see the links to your GitHub but there aren’t any links there. Just what looks like text with no link attached.
Its working here. Maybe try another browser? github.com/digiblur/digiNRG_ESPHome
My bad. I was looking for them in the wrong section of the GitHub.
So can I use the 2 channel board to accurately measure my 220V appliances? Would love to see how much power my dryer and AC unit consume.
You could use those 220 channels to monitor anything you like. Keep in mind that US 220v appliances would need 2 channels to capture the entire usage. You could do the entire house with 2 channels but it wouldn't be broken down. I use the 6 channel where 2 do the entire house then the other 4 are broken down to other circuits.
@@digiblurDIY Yeah I considered that but unfortunately the last owners didn't run the wires to the main panel but instead ran them to a sub panel located in the garage. No idea why.
You could put one on each leg then double up on power to get a rough estimate. I would compare the two different legs to see the draw differences.
@@DrDrewsAdventures perhaps they ran a wire from main panel to a sub-panel in the garage because it makes it easier to add additional circuits in the garage on the future. That's why I'd add a sub-panel to my garage, at least.
So much cool information. Thanks for taking the time to make this video.
Hi, I still have the old version board, does this still work or do you recommend me upgrading to the version 1.4 board
Mainly more of real wattage calculations but not sure what version you have.
Not to be a nag... BUT.... that breaker box needs some organization! On a positive note, Thank you for this tutorial, and VERY nice job on your graphs in grafana.
Would love to rip and replace it indeed. No need for the electric dryer, stove and water heater circuits anymore. It's on the agenda when the emergency generator is done as it is original to the house.
Thanks! I am pretty green when it comes to grafana. Need to learn so much more but wow it makes some nice graphs.
@@digiblurDIY Sounds like you got a decent project in your mist! One thing I might add is if it were me, do some before and after shots just to really show off a nice box. cause lets all agree, who doesn't like checking out a nice box? am I right?!
Yeah grafana is defiantly an awesome tool. I had mine pulling data from a MySQL database before but this week I actually started using influx for logging sensor data. So far, its been very rewarding!
Amazing Explanation...Just one query..If at all we want to connect SCT to Arduino GPIO pin, do we need to cut the SCT and solder it to the GPIO pins?
No. You need more than that to do it just via another board. See my smart dryer videos.
Travis, great job as always!! In your example of the LED dimmer at the end of the video. Do you have a clamp on that circuit to monitor that? Or were you able to monitor that change from having the 2 clamps on each of your main feeds coming into the panel?
I had a 100a clamp on just that circuit as I was isolating things in a controlled environment without a fridge or other automatic devices cycling on or off.
@digiblurDIY Should do a new video on this since Home Assistant has recently had a large update focusing on Power Monitoring.
Yep. Had to wait for a massive bug fix that came out last night to start using it in production.
@@digiblurDIY Also waiting for this!
Great video - thank you! Regarding the warning about unplugging the CT From the board - I want to make sure I am understanding (sorry if this is a dumb question) . If I unplug the RCA plug from the board the tip could be dangerously energized? Is that correct? Would this be for all CTs or is their a certain CT I should look for that would reduce or eliminate this risk. How would you safely unplug it from the board? Thanks again!
Yes All CT's by deafult are dangerous when the secondary is not connected to load or short circuited. To understand imagine a ct of a ration of 200 to 1 ( 200 primary amps results to 1 amp on secondary) so when open circuit CT will amplify the 100 V on primary by 200 times .
Anil Ghatikar is this the case with all CTs? Is there a way to compensate for this and safely remove the plug? Thank you for your reply!
They can be used safely if you just take your time and go through the motions. The YHDC models I used either have the zener diode or burden protection circuit in them. To prevent any danger. Remove any load from the circuit first then you can unplug them. Do not turn the circuit back on until either the CT is removed or is plugged back in the board.
Nice video sir,. Could you u give information and how to manage electrical energy and efficienciently....
Have you ever seen a Arduino shield for the Split Core Current Transformers like the one you are using?
No, I've only used it with the ESP32.
Hey, if you were to do this today,what would you use
Really depends on the setup. If you have a lot of circuits check out Emporia th-cam.com/video/z0Jv4nO9OWg/w-d-xo.html
Does your solution work with the new energy feature in home assistant?
Yes. See the updated video th-cam.com/video/n2XZzciz0s4/w-d-xo.html
Great video. I have the 2 channel board. It is up and running using Esphome. I manage to get readings on the CT1 input and NOT on the CT2 . Any reason behind this? Could you point me in a direction that i can explore to resolve this issue. Thank you in advance,
Did you happen to try CT3 in the config maybe? I know I had ESPHome running on it with my sample config.
@@digiblurDIY do you mean changing this (id: "ct2Amps") to this id: "ct3Amps"? Thanks
Yes the chip is a 3 channel on the board and though maybe you were hitting the empty channel.
I purchased the recommended devices and have a couple of errors / questions on the setup. When I try the otA I get no route to host. I was able to compile and upload. I then deleted and re-entered all and it worked for a while and then I am back to no route to host when trying to update the code. Maybe it was a defective module. I purchased two and the 2nd one worked with no issues.
You might have to set a static IP like I do.
@@digiblurDIY I did. Had an issue with the first one not working correctly after plugging it into the socket. The second device worked correctly. I did notice a slow ping time to the device. Most of my devices are 5 to 10 times faster. Any ideas on why this would be so slow?
Does the direction of the CT clamp matter? Also if you have something like a range with a dual breaker (30, 40a etc) I'm guessing you need to monitor both leads to get the total? Thanks
The clamp direction will make a difference using the new sensor that shows the real wattage and not just calculated. If it is negative just flip it around.
@@digiblurDIY Do you have more info on the new sensor? I have the latest board and used your yaml file that is calculating watts. I tried it both ways and it was positive in both directions. Thanks
esphome.io/components/sensor/atm90e32.html
Hi, how does this CT clamp get the voltage from since most voltage need to be measure by connecting the live and neutral wires. This unit does not have either one. How accurate is the gain_voltage measurement for AC voltage after calibration?
The CT clamp only measures the current traveling through the line. It doesn't measure the voltage. That's done through the power supply reference.
@@digiblurDIY I forgot it get the voltage from the 9vAC adapter. How do you know that the 9vAC power supply is actually output 9vAC?
It won't be exactly 9v by itself but you can put a volt meter to it
Its posible if i use 4 curent sensor without using the expand? Do you may explain me how to working on it?
I believe the board only allows for 2 with the main board.
Can it be used with 3 phase installation? Can it derive/approximate the 2 remaining voltages from the first one?
I'm not familiar with using it on 3 phase but I would assume you could just put the clamp on it and go? Of course you could have the voltage differences. Might be a good question for the CircuitSetup folks.
The ICs are actually made for 3 phase. However, the 2nd and 3rd voltages are not hooked up. You can get around this by writing to the B and C voltage registers. From what I can tell esphome cant do this yet, but I may figure out a hardware solution for the next version.
How do you deal with the power factor of each particular load ? In AC Power in not VxI but VxIxcos(phi), phi is the phase difference btw 2 sinusoidal signals
‘Tis might explain the measurement differences with the ShellyEM, I guess the ShellyEM deals with it internaly
The IC handles it all. www.microchip.com/wwwproducts/en/atm90e32as
Hi
digiblurDIY, I found your video really intresting even if it exceed my basic knoledges. I'm asking you if you know a proyect to measuere the power and cut some lines when the total power is above a certain limit (to avoid automatic shut off in the energy company meter). I'm looking for a solution for an underfloor electic heating system with a line for each room. Thanks for your advice.
If you had some relays installed on those lines then yes you could use this if you wanted to or any other power monitoring on those lines.
@@digiblurDIY Thanks for your reply. I have to figure out how to connect the relays and how to compute the total Watts in order to decide which line I have to switch off. Thanks again.
Hello,
I have a ZMAI-90 with CBU module, did you figured how to put Tasmota on this CBU module?
Thanks
Haven't heard of that one.
@@digiblurDIY is new i think from tuya but i didn't find any ESP module to fit with this CBU
Not terrible, but 118 to 123 is a noticeable voltage swing. Might be worth checking some neutral lugs.
All of that has been redone from the transformer to the breaker box and everything torqued since this video. Still the same voltage swings between night and day. Entergy says it is within spec. 🤷♂️
@@digiblurDIY Not terrible if they say that's on the line. Kinda how ya' doin', but it's Entergy so no surprise. :D
Yup. New meter pan with disconnect and added an automatic switch for the generator so I don't have to deal with their monthly outages much.
I put in an iotawatt back in December to accomplish the same trick. NO affiliation, but check them out. $129 in a case for 14 channels. CT's are extra of course.
Nice! Curious how stable in measuring it is as I have heard mixed stories but never personally was able to talk with someone who has one installed.
digiblurDIY mine has been rock solid stable, and is within 1% of util co’s kwh each month. My only complaint is that they initially shipped me the wrong ct’s, but they took care of it very quickly.
@@netmagi How often does that take readings? Also, do you get metering data like power factor and reactive power? From what I understand it uses standard ADC IC's so the calculations are done in software.
@@jdeg2000 Provides pf, apparent power, and real power. I don't know enough about it to tell you how it's accomplished, but I can graph all 3.
Do you have it integrated with Home Assistant and can you see the actual usage in real time?
A question On the voltage, isn't there only one voltage? I see that the board calculates the voltage from the 9VAC power supply for one of the phases. How does it calculate the voltage on the other?
There should be a calibration for the other IC in the config. Set it the same.
@@digiblurDIY but the voltage is only coming from one phase?
I'm in the US residential where there is only single split phase. If you have two phases you want to monitor you'd need an AC adapter on that phase too then follow the instructions to feed the second phase in. github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter
@@digiblurDIY Thanks. I missed the second phase hookup. Is there a data sheet for the device?
When on street power the split phases are close enough (most of the time) to not worry about it. I say most of the time, is recently after power outage the power company only restored one of the phases. What a mess. It would be nice to shut everything down if the phases aren't with in tolerance of each other before damage is done.
That link has all the instructions on how to do it, if you need more info you'd need to contact Circuitsetup as I've never done that. Luckily my transformer is in my backyard so it would be rare if I ever saw half of the split.
What are the damn bright blue LED's on this board that totally illuminate my closet at night? I would also like the ability to turn the LED's off through software. I mean it they are annoying. They even show through the purchased 3D printed case. For now I have packed the case with some black foam I have, but I am worried it might heat up. I am using it with ESPHome. Also, is there a way to reset the totals?
Is it on the board or ESP chip? Which totals?
@@digiblurDIY The two blue LED's in the lower left corner of the 6 channel board. The kWh total.
@@timhughes1690 didnt see your question earlier. The blue leds are the active power pulse. Cf1
For monitoring backfeeding solar panels, I assume you'd want to flip the current clamps around?
I don't have solar and with all the various systems and such you would have to look at yours and figure out what you want to monitor and try it out.
The CTs would go in whatever direction current normally flows. Depending on how you set it up you may want negative readings to calculate net energy consumption.
HI, I will be doing this in Germany. Would I need other types of CT sensors?
Depends on the wire size and amperage.
Thank you for your contributions.Please can anyone tell me why my voltages are 655v, how can I correct this.
Back down the voltage calibration. The newer boards have adjusted things.
@@digiblurDIY That worked, thanks a lot.
Awesome!
Great video, thanks. Is there a way to show the power factor too please?
Yes. There is. That is one of the updates that happened after. There are now more sensors along with non calculated watts. It's all done by the IC now. github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/blob/master/Software/ESPHome/6chan_energy_meter_jp8-jp11.yaml
Thanks for the reply Travis. Much appreciated. I'll be ordering my board this week. Then I'll need your guide for Grafana 😉. John
Sounds good! Reminds me I need to link this in the video description as I am not sure when I get to doing an update on this one.
Whats your view on this model from kincony KC868-M16 Ethernet 16 Channel Ct Clamp Energy Meter Power Monitor
I haven't used it and not sure what power monitoring chips are used.
is there anyway to get this in other countys ? i should pay more shipping than the single phase board costs for germany ...
Would each CT clamp need its own calibration? I have the SCT-013 100A/50ma and wonder if I can just use the number 32498 since it doesn't seem to depend on the voltage of the circuit
I have found they are really super close myself and didn't need to calibrate each. I just did each model.
Those current clamp can be open in 2 and placed over the wire
Yep. That's how I did it. Split core is nice.
Great Job on the video.
I have a question and it may be dumb but i do not see any other calculation other then volts * amps, if you don't include your power factor this is only VA (volt amps) not watts. unless there is more then i can see in the code.
Actually this has been added to ESPHome in dev now since the video was recorded. The the chip calculates all of that. next.esphome.io/components/sensor/atm90e32.html
@@digiblurDIY Thanks for the update.
@@seanmcdonald656 The new dev version allows you to get power factor, but you don't necessarily need to bring it into ESPHome. To just get wattage from the board, you'll want to solder JP9-JP11 (if they aren't already). See this example config with power added: github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/blob/master/Software/ESPHome/6chan_energy_meter_jp9-jp11.yaml
Can I actively monitor the power faster than once every 10s? I like to send it over the home network at a 5 to 10 Htz rate. Is that configurable?
You can change the configuration however you like. I even saw one guy did it with a Raspberry Pi for more processing power.
I’m interested in doing some whole home power monitoring as well as some automations using HA and Node Red. Would you still recommend this as your favorite option for PM?
Hell yes... love this board. You'll see another one going in soon in the project house.
I got a v1.2 board and am having some problems getting the gain_voltage high enough. ESPHome only allows 65535 as the max and that's not enough to adjust my voltage up to 120V. I can get to 113V. The output of my Power Supply is 10.1V. Something changed with the v1.2 board. From CircuitSetup: "For v1.2 of the board your voltage calibration will be high, >64,000"
I have heard people having to use 65000 but it was enough. You might have to reach out to them.
@@digiblurDIY ESPHome or CircuitSetup? Of course I could see if I can get a Jameco that's closer to 9V.
Circuitsetup. I would think that you would need more voltage to be able to back down the gain.
And just to be sure you are doing this with the esp32 powered only by the 6 channel board and no USB is connected right?
@@digiblurDIY Yes, no usb connected. You might be right about the Voltage.
github.com/digiblur/digiNRG_ESPHome/commit/4b793e650d7017e9735e43b5016fefb0941b6daf for the changes needed
I tried programming my esp32 this weekend with a 6ch board with 6ch ad-on for 12 channels. The esp32 is programmed, but it it does not come alive with the AC power supply connected on the monitor boards. Unplugging the 10VAC supply, and powering by the usb of the esp32, the esp is alive and all 12 channels are seen on the web interface. In both cases, they boards look powered up, green led on both monitor boards, and red led on the esp32 board. I measure a nice 3.3V on the esp32 when powered by the AC supply. Ideas?
What amperage is the power supply?
@@digiblurDIY Not high, but also unlimited. It's a butchered old 9VDC power pack rated for 250mA. I opened it up, removed the DC regulation, and wired the transformer directly to the output. The center tap, gave me a 9.9 RMS VAC.
I try to pick a 'real' supply today to see if that's the problem.
Definitely as I haven't heard anyone else having this issue.
@@digiblurDIY Well you called it! New 1A 9VAC power pack works ($A 27). I'm surprised! Both look the same on the scope. Just had an idea.... It's the DC barrel connector. The board has a 2.1mm pin, my original supply is 2.5mm. Putting a 2.5mm plug on the new supply (it has exchangeable ends) it also fails to come alive despite lighting all the leds.
If I want to get the current measurement from a dual pole (240v) breaker, do I need a CT on both hot wires, or is there a way to double the voltage for a CT on 1 of the two hot wires?
I assume US residential split phase? Is it a balanced load? Or do you want to see both hots?
I had this same question - I looked at www.diychatroom.com/threads/balanced-loading-on-240v-circuit.196969/ and what they said made sense - a pure 240v load (e.g. 240v electric dryer, water heater, etc) will always be equal. I'm not sure of the rationale fully, but it would be great to hear about 240v load examples that don't have equal power (btw, US, 240v split phase).
I would think all resistance loads (electric water heater, dryer, electric heat) would definitely be covered.
Does anyone have cases of 240v split phase loads that are not balanced?
@@digiblurDIY so… is the answer here that you just need one CT clamp but you’d need to double do some multiplication on the sensor to just double it?
Either pass it both hots in the clamp in opposite directions or you can double it if it is a balanced load.
This is great! Is there a version available for UK supplies? We're 50hz 240v single phase.
The same board works on your power.
@@digiblurDIY hi mate, what about the transformer supply? As far as I know, transformer design is quite focused on the frequency, operating a 60hz on 50hz can result in greater iron losses. Im thinking this might translate into greater power calculation errors. Having said that I'm sure I could find a 50hz transformer instead.
I know a lot of people who use it in various other configs across the world. Definitely check the board website for more info.
@@digiblurDIY who actually makes the board? Is it circuitsetup, or is that just a distributor?
Circuitsetup.us makes it.
Is there may be any other option for that 6 channel board? I'd need to monitor the 3 phases, and I don't find that board here in germany :(
Check the readme here for that setup.
github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter
Sorry I have a little bit of knowledge but Were the two ct sensor for the mains are in series or parallel?
It's a split phase power feed. So each CT is on each leg.