This is exactly what I need, thanks! Now I can monitor how much power I'm drawing from my neighbour's power grid and adjust my load so it won't make any suspicion.
The circuit shown at 6:42 is a nice idea and definitely works in a pinch, but it's a serious source of error in your measurements and can easily DESTROY your expensive ESP32. Firstly it relies on the precision and drift of the offset voltage resistor divider, which is not insignificant as if you are using 5% resistors, your center voltage and thus powerline measurement could also be off by 5% (or around 16v at line level). Also at startup, before the 10uF capacitor charges to 1.65v, the input of the ADC swings negative, which can seriously damage some devices which don't have stringent input protection. Finally, if there is some fault in the line which causes the transformer to output a higher than expected voltage, this will exceed the power rail of the circuit and discharge straight into the ESP32. You want a circuit called a "Clamper" or "DC Restorer" which will fix your voltage above ground potential (protecting the ESP32 ADC) and allow you to take advantage of the full scale of the ADC input. This also saves on two precision resistors for the voltage divider, and a rail-to-rail buffer amplifier will tend to isolate the ESP32 from any voltages over the supply rails. With an output buffer you can also use a smaller capacitor value, with higher voltage rating and non-tantalum type for safety such as a ceramic disk capacitor. You can also safely add an external ADC if you want to increase your measurement accuracy substantially. (Just remember to sample the max voltage to calculate the zero crossing point for the AC signal, as there is no center offset voltage now) There is no fundamental difference between your expensive power meter and a circuit you can build at home, you just need to find all your sources of error and minimize them! :) Here is example circuit for reference tinyurl.com/y2aoed7z
@@xristost68 Nice work, only problem is that during that settling time the negative analog voltage would still exceed absolute maximum specifications on popular ADCs like the ADS111x, so you should add a schottky diode from ground to the output to limit that negative swing in the startup :) And if you're using an expensive precision ADC like the AD7792, it only tolerates 30mV below the ground rail, so you would need more strict signal conditioning than just a schottky diode.
Some points from my experience building The same thing for my own home: if you can't find a 12-volt AC former, you can step down the voltage just using a standard voltage divider with 10 or 20 times the resistance on the upstream resistor (depending on if you're in the Europe or US). If you want it isolated, you can use a one-to-one speaker transformer, or they have potted transformers the one-to-one ratio specifically for this task. Also the ESP32 ADC has abysmal accuracy without some sort of filtering in software. I actually used an Arduino nano to measure the current on the two phases coming into my house (US) and pass that off to an ESP8266 to send to my server. The values I got out of this setup were within 0.1% of what the electric company said I used.
I actually just received my very first ESP8266 NodeMCU in the mail yesterday and have been pondering a project all night. Amazing that you post this today!🤘🏼🤘🏼
@@AgentOffice handi is german for phone (maybe specifically mobile phone), shocking cause it's both a shock/surprise but also cause electricity can shock you
I can reccomend shelly devices, most of them have power meter feature integrated, there are aswell a dedicated powermeter wit power clamps. Even 3-phase is available. And they can be integrated very useful 👍
@@mewantsmash hm, his solar panels pumping current into the grid with a power factor of -0.25? dunno about that, but my guess is that solar panels should present a PF as close to 1 as possible.
The CT Clamp component in ESPHome is based of the emonlib library and has very easy integration, it even allows you to use a higher precision external ADC such as ADS1115.
I've recently done this myself, well similar. I wrote my own code in the IDF and used the SCT-013 current clamp so I could measure the whole house current. No touching of live wires needed since it's a clamp rather than pass through doughnut. Works very well but I am assuming voltage since I don't have an isolating transformer yet to measure it. That's the next upgrade!
Some of the new/Modern US home power meters actually have debug output ports. You can hook into those if you want, they are read only and not encrypted in any way. So this may be even easier to access the data.
Im always so fascinated by your projects and even more how economical you make them even though you live in germany where gross can shoot up very high, keep up the spirit scott! (Im from slovakia, so you can understand the meaning of the comment)
Great video, I love incorporating tech into homes like this. I would also like to say thank you for making videos, you have been such a huge inspiration to me and a large reason why I want to get into electrical engineering, much love from Phoenix, AZ.
Your channel is always a great place to watch some cool videos utilizing microcontrollers like the ESP32. It’s such a versatile controller to have around! I’ve used them for all sorts of things, I had one hosting an access point with a simple html interface to control a project I had made.
Wouldn't be one of the eastron meters an option? I use the sdm630 which is connected via modbus to a raspberry pi. The values can be published via mqtt.
If you have a smart meter (which a lot of people have nowadays in Germany and the Netherlands) you can hook up a RPI to the P1 port of the meter. That port spits out a lot of info about your electricity and gas usage (if you have gas at your home). You can also integrate it very easy with Home Assistant.
I had something like that in mind for a long time, great job!!! Adding a temperature sensor on a solar heater and a power relay we could remotely power on its internal resistor when we need it (without have it on all the time). We can also watch the power consumption for security reasons and be able to turn on the outside lights remotely, and so on. Home (and not only) automations with microcontrollers is so simple this days and we can do so many things that really worth spending some time learning how to program them which is pretty simple and a great way to learn children how and why programming is fun and why maths physics and chemistry is necessary most of the time on whatever we do :-)
I really want to see that tesla coil. I've been watching your videos since i first started electronics about three years ago. I still cannot believe that you didnt make a tesla coil that can make some interesting arcs.
I'm a big fan of making cool DIY projects that you cant already buy on the market. The issue I have with this project is that you can already buy a commercial version of this product that will be more reliable and cheaper than making it yourself. The Sonoff Pow can be bought for around USD 11, It has a built-in power consumption tracker, it has a built-in relay for remotely switching the appliance on and off, it is in a clear professional enclosed, and it can easily be modded to work with home assistant. Unfortunately, there is no reason to make your own. It will cost you just as much and you will have a lesser product.
I think your problems with such diffrent values is the non-linearity of the ESP32s ADC. There is alot of stuff about this on google. The best thing so monitor the values all the time is to use a Shelly 3EM and integrate it into your hass
I have built one of these, but with an Arduino Nano. Works pretty good, though not very accurate, especially with low power usage. So I decided to go the Esp32 route. But the built-in ADC resolution is still too low. Which I went with an ADS1115, which gives me 16-bit resolution. Problem is, I can't get the ADC to properly work with the EmonLib code. I've even done the procedure injection, or what ever it's called and made the changes for it. Still nothing. And the guy who originally made the altered code for the ADS1115 with EmonLib won't help. Any ideas on how to get these to work together? I know the ADS1115 can only do about 800sps. To get "real" power consumption, need at least 1500sps or something like that. But it'd be better than the built-in ADC. Also to note, the standard EmonLib can only do about 4 return values per second, and this is because it does several loops per run to get the values. This does slow down the returning values quite a bit.
@@eDoc2020 that's true but that the most important thing to know in my opinion. Because that's what you pay for and if you are using this to monitor your power consumption that's all you need
Great vid as always! Just one question, if you used a current transformer that supports up to 5A how are you going to measure the power for your whole house with it? Surely the house draws more than 5A and that could destroy the transformer
Thanks for this video, I enjoy watching your channel and its great content. I've created an energy metering system in my house using existing energy meters with pulsed outputs, basically gives a pulse for each 1whr consumed - this significantly reduces the complexity of the project as it means only having to count pulses to get near instantaneous energy consumption values. Also if you also monitor milliseconds between pulses, you can work out near instantaneous power consumption as well. These meters are very common and easy to obtain, and they also by their nature have to be reasonably accurate - an added bonus is that they also typically come in a small form factor (1x din width), and pulses are isolated from mains. I populate the energy/power values directly into a time series database (Influx) and graph with results using Grafana.
Great explanation of how different loads effect the phase angle between Voltage and Current BUT to keep things simple with respect to monitoring power consumption (as charged on your power authority account) have you considered just monitoring the pulsing LED on your power meter. I suggest this for one of your excellent UA-cam videos.
I had a doubt Scott, why dont you use ACS712- Current sensor and ZMPT101B- Voltage Sensor and make it as simple as possible and well portable as well with no external circuits as well?
I was going to ask you for a vid on what oscilloscope to buy for tinkering like you. Then i saw the part number on this vid and searched for the one you use, holy shyte, thats a 12000 euro oscilloscope. ok nevermind, i'm gonna keep using my multimeter like the noob i am. good vid btw, as always
Its super cool , but its really difficult when you start. For beginners point of view, various topics like working of esp32, how data came into mobile app, current sensor calibration etc are alot of things to learn. 🤖 All the best to all and do share your experiences. 👍
This is what I've been wanting to do, though A) I want to do every circuit so I need about 30 channels of sampling, and B) I don't really care that much about precise values, calculating reactive power, getting RMS values, etc. I just want some relative values so I know what circuits to go after as hogs next, or which can be adjusted to run primarily in the daytime when the solar panels are producing.
The AC voltage is both positive and negative. ESP32 ADC input accepts only positive. The circuit adds a positive offset (half of 3.3V) so that negative voltage will never reach ESP32 and damage it.
@@greatscottlab Ok, thanks for the reply. I ask because I have been using Flukso for doing similar stuff only using current probes: www.flukso.net/. I have three phases at home, so I would need to install 3 voltage monitors.
Great video as always, But I have a question, would the transformer not influence the phase of the measured votlage? Wich will make the power factor and active power not precise . Or was that accounted for in the code ?
"I have the goal of lowering mine though" Says the guy with a 3d printer, a cnc mill, and literally every high current device XD. Aside from that I really love your videos.
Hi Scott, you should definitely do a follow up and some finalization of this. I need to do exactly this, but the situation is that I want to see each of the info about consumption per beaker, so the question is, do I need to have ESP for each of the breaker? Or is there possibility to combine them? A lot of questions which I think you've been working on in the past, so your experience would come in handy. Thanks
No, you dont need power meter. Just a good multimeter and calibrate the voltage and current values to get match with the value's output on IDE serial monitor.
4 роки тому+1
Hi! I tried this method but I ends up using the PZEM-004T or HLW8032. It shows more efficiency since I have one dedicated chip to measure the power and let the ESP32 to register and casting the data. The only problem that I found is that I don't know how to find if the power factor is capacitive or inductive. They just show me the power factor, without a positive or negative sign =/ Otherwise is perfect.
The average power consumption is rather high compared to what? Regarding private households the energy consumption lowered from >4500kwh to like 3500-3000kwh for 4 persons since 2002 in Germany (Energieverbrauch Abschlussbericht BMWI 2002). And thats without electrical water heating and without electrical heating. As a lot more people tend to have multiple of those crappy electric heating devices in
Hi, friend! I want to notice 1 point. If you place information wires along with the power wires you can get some extra power in case of quick power jumps. Once we tried it on GSM equipment and had to pay 1000 euro for broken input modules ;-). So think about electromagnetic shield.
Hi, May be a stupid question: I have got solar panels and I would like to measure the power going home from grid but eventually the one going out when solar production is greater than consumption. For that I need to identify the direction of current. Do you think this is feasable ? Thanks for advise.
I'm using energy meter with pulse output wired to esp8266 and just counting pulses during time. Class 1 IEC 62053-21 45A 230V 1000imp/kWh - everything is simple. Paid 54PLN (~14USD).
Same here, 1 module 1 phase or 7 module 3 phase maneler energy meter output 800 impulse/kWh very cheap and accurate enough for me, esphome already integrated pulse count energy meter.
Thank you. I will cehck on the emon code. but do you know if i can connect multiple current transformers and use a few more pins on the esp32. will the controller be able to handle 4-5 CT coils ?
I have a question about the esp32-s2-wroom-1 series... and maybe the esp32 in general. I am completely new to programming and got this for my birthday. After some libraries and coding I have gotten an hc-sr04 and a dht-11 working together to output data to the arduino serial monitor... my question is on WiFi do I have to do the network and password or is there a way to just communicate wireless without a network??? I haven't really done much with programming before??? Thanks for any replies!!!
Thank you for the great tutorial, Just a quick question, I have never used my oscilloscope to measure 220v AC, what is the safest way to do it without damaging my oscilloscope? Thanks again
This video is cool as educational stuff, but in reality it's much easier, accurate and maybe even cheaper to buy something like sonoff pow r2 (not an ad, just an example) smart relay with all this measuring functions included.
It'll never give accurate readings with this method as a standard transformer is too non linear and also adds phase shift. A proper PT or divider network is the only way to get good results
There are meters that provide these values and are more compact, possibly more precise and reasonably priced. You could even read then with the cheapest arduino
I understand the safety aspect of using an isolation transformer in this project for sensing the voltage. But, for low loss, such transformer must be large and expensive. Since you know which mains wires are hot and return (connected to earth) can you simply use very large valued resistors, to form an ac voltage divider, capacitively couple the signal to a VDD/2 bias string?
Not sure why, but my outputs are just massively off... I can adjust the calibration number to get it to match, but then as soon as the current changes the output is again massively off.. Using esp32 with ads1115 and the standard emonlib library, but with a slightly modified calcIrms function to take an array of readings from the ads1115 as an input variable, instead of using the built in ADC.
I'm running two circuits, one with grid power supply only (high-power appliences) and another with fail-over from an inverter/battery that has low power appliences and all lamps. I also need to monitor battery charging and discharging currents with voltage, so I could measure efficiency and battery health. I think one current sensor would be enough on battery +ve terminal ; should give -ve values when charging and +ve when discharging.
Hey, you made a video on NE555 timer in which you showed how to get decent PWM using TLC555 instead of NE555. You told that NE555 uses bipolar transistors and TLC555 uses MOSFETs. But I am not getting any TLC555 timer IC in my area. Is there any method or idea to convert NE555 into TLC555 ??
This is exactly what I need, thanks! Now I can monitor how much power I'm drawing from my neighbour's power grid and adjust my load so it won't make any suspicion.
Glad I could help!
I'm happy you glad, @@greatscottlab. Sorry for the late reply, my neighbour's Wi-Fi was down for a moment.
Lmfao
😂😂
@@greatscottlab I think you didn't understand correctly. 😅
The circuit shown at 6:42 is a nice idea and definitely works in a pinch, but it's a serious source of error in your measurements and can easily DESTROY your expensive ESP32.
Firstly it relies on the precision and drift of the offset voltage resistor divider, which is not insignificant as if you are using 5% resistors, your center voltage and thus powerline measurement could also be off by 5% (or around 16v at line level). Also at startup, before the 10uF capacitor charges to 1.65v, the input of the ADC swings negative, which can seriously damage some devices which don't have stringent input protection. Finally, if there is some fault in the line which causes the transformer to output a higher than expected voltage, this will exceed the power rail of the circuit and discharge straight into the ESP32.
You want a circuit called a "Clamper" or "DC Restorer" which will fix your voltage above ground potential (protecting the ESP32 ADC) and allow you to take advantage of the full scale of the ADC input. This also saves on two precision resistors for the voltage divider, and a rail-to-rail buffer amplifier will tend to isolate the ESP32 from any voltages over the supply rails. With an output buffer you can also use a smaller capacitor value, with higher voltage rating and non-tantalum type for safety such as a ceramic disk capacitor. You can also safely add an external ADC if you want to increase your measurement accuracy substantially. (Just remember to sample the max voltage to calculate the zero crossing point for the AC signal, as there is no center offset voltage now)
There is no fundamental difference between your expensive power meter and a circuit you can build at home, you just need to find all your sources of error and minimize them! :)
Here is example circuit for reference tinyurl.com/y2aoed7z
Cool!
This needs to get pinned. Pretty good reply. Thanks for sharing info
Sick reply, thanks alot!
@@xristost68 Nice work, only problem is that during that settling time the negative analog voltage would still exceed absolute maximum specifications on popular ADCs like the ADS111x, so you should add a schottky diode from ground to the output to limit that negative swing in the startup :)
And if you're using an expensive precision ADC like the AD7792, it only tolerates 30mV below the ground rail, so you would need more strict signal conditioning than just a schottky diode.
This is cool. Do you have more info on the circuit? Function and how to choose the capacitor and resistor pls
Hey! This video doesn't start with the word "recently" 😅😅
Vah bhai vah
ha ha
My Sunday morning is complete... Coffee and *GREAT SCOTT!!*
Enjoy!
I have learnt so many things by watching your video and again a big love from India ❤️❤️👍❤️❤️❤️❤️
Oh lucky you, it's sunday night for me((
@@Evgen-Evgen-Evgen Well, it's past midnight for me and I'm technically watching this on a monday 😅
It's
1.30am here..
Some points from my experience building The same thing for my own home: if you can't find a 12-volt AC former, you can step down the voltage just using a standard voltage divider with 10 or 20 times the resistance on the upstream resistor (depending on if you're in the Europe or US). If you want it isolated, you can use a one-to-one speaker transformer, or they have potted transformers the one-to-one ratio specifically for this task. Also the ESP32 ADC has abysmal accuracy without some sort of filtering in software. I actually used an Arduino nano to measure the current on the two phases coming into my house (US) and pass that off to an ESP8266 to send to my server. The values I got out of this setup were within 0.1% of what the electric company said I used.
What a great energy you delivered while saying " stay creative and see u next time"
I just installed Home Assistend on my Proxmox Server and was searching for a "smart" Power Meter I could use with it, perfect timing :D
I actually just received my very first ESP8266 NodeMCU in the mail yesterday and have been pondering a project all night. Amazing that you post this today!🤘🏼🤘🏼
this dude read my thought i wanted to do that exact thing
Yeah me too... It's impressing
Absolutely Like UA-cam algorithm 😂
Same here, but I thought it will be not accurate.
Same here
And he made the cable tracker video right when I needed it
"Handy and shocking." A pun across two languages. I love it
What's it mean
@@AgentOffice handi is german for phone (maybe specifically mobile phone), shocking cause it's both a shock/surprise but also cause electricity can shock you
Urmom
@@AgentOffice urmom
@@BrianLough urmom
I can reccomend shelly devices, most of them have power meter feature integrated, there are aswell a dedicated powermeter wit power clamps. Even 3-phase is available. And they can be integrated very useful 👍
thanks man. I needed a tree phase monitor and this is a good, easy to install and simple solution.
Das waren grad "Grundlagen der Elektrotechnik" (1.Semester) und "HM 1 " ( Höhere Mathematik I ) in 10 Minuten.
Der Mann hats echt drauf ! :=)
Power meter: shows -43W real power
Great Scott: "the power meter still works perfectly fine"
I think he has solar panels, but I was also confused by this
@@mewantsmash hm, his solar panels pumping current into the grid with a power factor of -0.25? dunno about that, but my guess is that solar panels should present a PF as close to 1 as possible.
He probably just hooked up his sensor backwards.
I came on line to just now literally to search for someone who has done this project - nice timing :)
I have literally no idea what I'm watching
But I still love his videos :)
The CT Clamp component in ESPHome is based of the emonlib library and has very easy integration, it even allows you to use a higher precision external ADC such as ADS1115.
I've recently done this myself, well similar. I wrote my own code in the IDF and used the SCT-013 current clamp so I could measure the whole house current. No touching of live wires needed since it's a clamp rather than pass through doughnut. Works very well but I am assuming voltage since I don't have an isolating transformer yet to measure it. That's the next upgrade!
This is one element of my thesis paper on college. Those stressful days.
Some of the new/Modern US home power meters actually have debug output ports. You can hook into those if you want, they are read only and not encrypted in any way. So this may be even easier to access the data.
Im always so fascinated by your projects and even more how economical you make them even though you live in germany where gross can shoot up very high, keep up the spirit scott! (Im from slovakia, so you can understand the meaning of the comment)
Bmore
I love how popular Home Assistant has become.
We just did this for our EE senior design project back in the spring! We won first place!
Great video, I love incorporating tech into homes like this. I would also like to say thank you for making videos, you have been such a huge inspiration to me and a large reason why I want to get into electrical engineering, much love from Phoenix, AZ.
There is a simplier solution for power measuring which is called PZEM-004T (with great accuracy of measurements too!)
It's always nice to see the the face behind The Voice the videos I watch
We need to get this man to 2 Million
GreatScott! glosses over a summation formula that probably has most viewers' eyes glazing over.
"And just like that..."
Your channel is always a great place to watch some cool videos utilizing microcontrollers like the ESP32. It’s such a versatile controller to have around! I’ve used them for all sorts of things, I had one hosting an access point with a simple html interface to control a project I had made.
Wouldn't be one of the eastron meters an option? I use the sdm630 which is connected via modbus to a raspberry pi. The values can be published via mqtt.
If you have a smart meter (which a lot of people have nowadays in Germany and the Netherlands) you can hook up a RPI to the P1 port of the meter. That port spits out a lot of info about your electricity and gas usage (if you have gas at your home). You can also integrate it very easy with Home Assistant.
I am waiting for this video for a long time.
The most informative video on this topic on UA-cam
Thanks sir
I never thought so careful about this problem. Thanks Scott
I had something like that in mind for a long time, great job!!!
Adding a temperature sensor on a solar heater and a power relay we could remotely power on its internal resistor when we need it (without have it on all the time).
We can also watch the power consumption for security reasons and be able to turn on the outside lights remotely, and so on.
Home (and not only) automations with microcontrollers is so simple this days and we can do so many things that really worth spending some time learning how to program them which is pretty simple and a great way to learn children how and why programming is fun and why maths physics and chemistry is necessary most of the time on whatever we do :-)
I really want to see that tesla coil. I've been watching your videos since i first started electronics about three years ago. I still cannot believe that you didnt make a tesla coil that can make some interesting arcs.
I'm a big fan of making cool DIY projects that you cant already buy on the market. The issue I have with this project is that you can already buy a commercial version of this product that will be more reliable and cheaper than making it yourself. The Sonoff Pow can be bought for around USD 11, It has a built-in power consumption tracker, it has a built-in relay for remotely switching the appliance on and off, it is in a clear professional enclosed, and it can easily be modded to work with home assistant. Unfortunately, there is no reason to make your own. It will cost you just as much and you will have a lesser product.
If you want to save energy, just turn off the light strip in the background (0:15), Scott! Jokes aside, great project!
Thank you for making excellent electronics videos. You are my favourite electronics UA-camr!!!
I'd like to hear more about the circuit at 6:40 that scales the AC voltage and shifts it to be above the ground reference used by the ADC.
It is a voltage divider. Nothing more.
@Kevin Counihan Thanks. I understand the resistor values, but what about the cap? Why 10uf?
@Kevin Counihan Thank you! That's very helpful.
Now I need to figure out how to measure a 3 phase power which I use in my home now. Great video for me to get started. Thanks!!
"which is handy and SHOCKING at the same time"
me: i see what you did there
;-)
For your UA-cam channel islands so many things a love ❤️❤️from India
He pulled a little sneaky on ya
Also "handy" is cellphone in deutsch ;)
Could you explain, I don't get it?
Great Scott, love watching your videos! It improved my electronics knowledge by a ton!
I think your problems with such diffrent values is the non-linearity of the ESP32s ADC.
There is alot of stuff about this on google.
The best thing so monitor the values all the time is to use a Shelly 3EM and integrate it into your hass
You are right, but the different price tag. Shelly3EM = 100€. if you calibrate precisely, the data are usable.
I have built one of these, but with an Arduino Nano. Works pretty good, though not very accurate, especially with low power usage.
So I decided to go the Esp32 route. But the built-in ADC resolution is still too low. Which I went with an ADS1115, which gives me 16-bit resolution. Problem is, I can't get the ADC to properly work with the EmonLib code. I've even done the procedure injection, or what ever it's called and made the changes for it. Still nothing.
And the guy who originally made the altered code for the ADS1115 with EmonLib won't help.
Any ideas on how to get these to work together?
I know the ADS1115 can only do about 800sps. To get "real" power consumption, need at least 1500sps or something like that. But it'd be better than the built-in ADC.
Also to note, the standard EmonLib can only do about 4 return values per second, and this is because it does several loops per run to get the values. This does slow down the returning values quite a bit.
If you got one of the newer electricity meters just count the light pulses it emitts and calculate the power drawn
You can do that but it only gives an indication of power (actually energy), not the other parameters like power factor.
@@eDoc2020 that's true but that the most important thing to know in my opinion. Because that's what you pay for and if you are using this to monitor your power consumption that's all you need
Great vid as always! Just one question, if you used a current transformer that supports up to 5A how are you going to measure the power for your whole house with it? Surely the house draws more than 5A and that could destroy the transformer
It looks like he was just measuring a single circuit. Plus I don't think it would destroy the transformer, it would just give incorrect readings.
It can destroy the transformer if you put more than 5 through it I think
You can just get a larger amperage one though to measure larger circuits tbh
@@eDoc2020 he was only measuring one circuit
Thanks for this video, I enjoy watching your channel and its great content. I've created an energy metering system in my house using existing energy meters with pulsed outputs, basically gives a pulse for each 1whr consumed - this significantly reduces the complexity of the project as it means only having to count pulses to get near instantaneous energy consumption values. Also if you also monitor milliseconds between pulses, you can work out near instantaneous power consumption as well. These meters are very common and easy to obtain, and they also by their nature have to be reasonably accurate - an added bonus is that they also typically come in a small form factor (1x din width), and pulses are isolated from mains. I populate the energy/power values directly into a time series database (Influx) and graph with results using Grafana.
Great explanation of how different loads effect the phase angle between Voltage and Current BUT to keep things simple with respect to monitoring power consumption (as charged on your power authority account) have you considered just monitoring the pulsing LED on your power meter. I suggest this for one of your excellent UA-cam videos.
this my favorite channel on youtube😍
I had a doubt Scott, why dont you use ACS712- Current sensor and ZMPT101B- Voltage Sensor and make it as simple as possible and well portable as well with no external circuits as well?
Awesome bro.... This is from India... Vera level.... Thank you for the video...
I was going to ask you for a vid on what oscilloscope to buy for tinkering like you.
Then i saw the part number on this vid and searched for the one you use, holy shyte, thats a 12000 euro oscilloscope.
ok nevermind, i'm gonna keep using my multimeter like the noob i am.
good vid btw, as always
Its super cool , but its really difficult when you start. For beginners point of view, various topics like working of esp32, how data came into mobile app, current sensor calibration etc are alot of things to learn. 🤖 All the best to all and do share your experiences. 👍
Home-Assistant again! Nice video Scott!
another GREAT video from GreatScott!
Glad you enjoyed it!
Nice Project but one thing strikes me about it. Is the RealPower supposed to be negative? @ 10:42
Yes
@@greatscottlab can you please elaborate? is it another joke I didn't get? :)
DIY wins again. Awesome GreatScott!
What about using an optocoupler as a reference point for timing?(zero voltage detector as an interrupt)
now you can get similar thing for $8, and with a relay... great stuff
My brain is overload but great video GreatScott
Thanks again, great explanation of a rather complex setup in a short period of time.
This is what I've been wanting to do, though A) I want to do every circuit so I need about 30 channels of sampling, and B) I don't really care that much about precise values, calculating reactive power, getting RMS values, etc. I just want some relative values so I know what circuits to go after as hogs next, or which can be adjusted to run primarily in the daytime when the solar panels are producing.
06:42 what's this circuit please mention the name of this one
The AC voltage is both positive and negative.
ESP32 ADC input accepts only positive.
The circuit adds a positive offset (half of 3.3V) so that negative voltage will never reach ESP32 and damage it.
It is a voltage divider.
@@greatscottlab Ok Thank you for you're attention
Can someone explain why you need the voltage sensor? Isn't a current clamp enough?
Necessary for the power factor calculation.
@@greatscottlab Ok, thanks for the reply. I ask because I have been using Flukso for doing similar stuff only using current probes: www.flukso.net/. I have three phases at home, so I would need to install 3 voltage monitors.
That's what i needed ... Perfect Timing
Fantastic work, dude! And really interesting project! 😃
Stay safe and creative there! 🖖😊
Great video as always,
But I have a question, would the transformer not influence the phase of the measured votlage? Wich will make the power factor and active power not precise . Or was that accounted for in the code ?
It would influence the signal, but as long as the transformer isn't tiny the effect should be negligible.
"I have the goal of lowering mine though" Says the guy with a 3d printer, a cnc mill, and literally every high current device XD. Aside from that I really love your videos.
Hi Scott, you should definitely do a follow up and some finalization of this. I need to do exactly this, but the situation is that I want to see each of the info about consumption per beaker, so the question is, do I need to have ESP for each of the breaker? Or is there possibility to combine them? A lot of questions which I think you've been working on in the past, so your experience would come in handy. Thanks
8:40 how do you calibrate these values? Do you need a 1000€ power meter to find the right values? 😱
No, you dont need power meter. Just a good multimeter and calibrate the voltage and current values to get match with the value's output on IDE serial monitor.
Hi! I tried this method but I ends up using the PZEM-004T or HLW8032. It shows more efficiency since I have one dedicated chip to measure the power and let the ESP32 to register and casting the data. The only problem that I found is that I don't know how to find if the power factor is capacitive or inductive. They just show me the power factor, without a positive or negative sign =/ Otherwise is perfect.
Great video as always👍😀
Thanks for sharing👍😀
your beard style looks good
Your videos are awesome man. Please keep it up! Thank you
The average power consumption is rather high compared to what?
Regarding private households the energy consumption lowered from >4500kwh to like 3500-3000kwh for 4 persons since 2002 in Germany (Energieverbrauch Abschlussbericht BMWI 2002).
And thats without electrical water heating and without electrical heating.
As a lot more people tend to have multiple of those crappy electric heating devices in
This is just what I needed. Just in time. As always, great job :D
Hi, friend! I want to notice 1 point. If you place information wires along with the power wires you can get some extra power in case of quick power jumps. Once we tried it on GSM equipment and had to pay 1000 euro for broken input modules ;-). So think about electromagnetic shield.
Hi, May be a stupid question: I have got solar panels and I would like to measure the power going home from grid but eventually the one going out when solar production is greater than consumption. For that I need to identify the direction of current. Do you think this is feasable ? Thanks for advise.
Did you consider using an ACS712? If yes why didn’t you use that to measure the current?
ok, you can see it on your phone,, that's cool..
.. a silly question . as it's for HA . can it be integrated into my display for HA?
Great Scott is with us!!!
I'm using energy meter with pulse output wired to esp8266 and just counting pulses during time.
Class 1 IEC 62053-21 45A 230V 1000imp/kWh - everything is simple. Paid 54PLN (~14USD).
Same here, 1 module 1 phase or 7 module 3 phase maneler energy meter output 800 impulse/kWh very cheap and accurate enough for me, esphome already integrated pulse count energy meter.
Is European power usually that clipped? I visually can't estimate the THD, but perhaps its within accepted limits?
Mains power is usually clipped like that due to the spiky non-sinusoidal current draw of most electronics.
Please suggest how to choose or decide the calibration value to get the right readings.
Thank you. I will cehck on the emon code. but do you know if i can connect multiple current transformers and use a few more pins on the esp32. will the controller be able to handle 4-5 CT coils ?
I have a question about the esp32-s2-wroom-1 series... and maybe the esp32 in general. I am completely new to programming and got this for my birthday. After some libraries and coding I have gotten an hc-sr04 and a dht-11 working together to output data to the arduino serial monitor... my question is on WiFi do I have to do the network and password or is there a way to just communicate wireless without a network??? I haven't really done much with programming before???
Thanks for any replies!!!
I was wondering what is the phase relationship between input/output for the mains voltage sensing transformer. There may be a few degrees lag here.
Big fan from india.
Great videos 😊
Take care of your health.
Thank you for the great tutorial,
Just a quick question, I have never used my oscilloscope to measure 220v AC, what is the safest way to do it without damaging my oscilloscope? Thanks again
I would suggest to use those Hilink 220v to 3.3v AC-Dc converter for directly run esp from mains
It won't be Suitable here, Cause those Generate Stable 3.3V DC while here we need to Sample the AC Voltage which Fluctuate Constantly
@@prathamkalgutkar7538 i'm talking of supply to the esp
This video is cool as educational stuff, but in reality it's much easier, accurate and maybe even cheaper to buy something like sonoff pow r2 (not an ad, just an example) smart relay with all this measuring functions included.
exactly what i needed thanks!!
You're welcome!
Do you somehow have to compensate for the phase shift the voltage transformer makes? They are usually a bit out of phase and it's also load dependant
It'll never give accurate readings with this method as a standard transformer is too non linear and also adds phase shift. A proper PT or divider network is the only way to get good results
There are meters that provide these values and are more compact, possibly more precise and reasonably priced. You could even read then with the cheapest arduino
I understand the safety aspect of using an isolation transformer in this project for sensing the voltage. But, for low loss, such transformer must be large and expensive. Since you know which mains wires are hot and return (connected to earth) can you simply use very large valued resistors, to form an ac voltage divider, capacitively couple the signal to a VDD/2 bias string?
Not sure why, but my outputs are just massively off... I can adjust the calibration number to get it to match, but then as soon as the current changes the output is again massively off.. Using esp32 with ads1115 and the standard emonlib library, but with a slightly modified calcIrms function to take an array of readings from the ads1115 as an input variable, instead of using the built in ADC.
I'm running two circuits, one with grid power supply only (high-power appliences) and another with fail-over from an inverter/battery that has low power appliences and all lamps. I also need to monitor battery charging and discharging currents with voltage, so I could measure efficiency and battery health.
I think one current sensor would be enough on battery +ve terminal ; should give -ve values when charging and +ve when discharging.
Will it not be easier to use tasmota or espeasy?
Hey what about the Tesla coil you have talked in the yt
stories???
The video will come out when it is done
@@greatscottlab ok☺
Hey, you made a video on NE555 timer in which you showed how to get decent PWM using TLC555 instead of NE555. You told that NE555 uses bipolar transistors and TLC555 uses MOSFETs. But I am not getting any TLC555 timer IC in my area. Is there any method or idea to convert NE555 into TLC555 ??
Couldn't you have used op amps to multiply and integrate values instead of the u-controller ?