Це відео не доступне.
Перепрошуємо.
DIY Home Energy Monitor & CT sensors explained
Вставка
- Опубліковано 14 сер 2024
- I took an ESP32 and a CT sensor to build an energy monitor for my home. And you can do it too! This was built using ESP32, Arduino, CT sensor, Emonlib, resistors, capacitor and a 3D printed case.
📋Technical details & source code on my blog:
savjee.be/2019...
🌍 Social
Twitter: / savjee
Facebook: / savjee
Blog: savjee.be
💌 Newsletter: newsletter.savj... (no more than once a month)
❤️ Become a Simply Explained member: / @simplyexplained
This was exactly the kind of project I was looking for to monitor energy consumption and, in the future, the efficiency of each component. Thanks for outlining the process.
This project and video are great! You also gave a comprehensive discussion on your blog post. Thank you and keep it up!
Can you share the diffs between the real consumptions (based on your bill) and measured ones by your DIY energy monitor? Thanks
Yes! More videos like this! I love tinkering with IoT projects, and am constantly looking for inspiration. Keep up the good work!
Me too! I recently got into programming microcontrollers and it's so much fun (but also very time consuming). I also have a project with an e-ink display. Might do a video on that one as well. Depends on how people like this video.
Simply Explained - Savjee I bought a few CT sensors as well a few years back, but the incoming wires are actually too wide for the sensors.
However I noticed that we have a LED flashing 10 000 times for each kWh on our energy meter, so I’m thinking of using a D1 mini (a tiny Arduino-like board) with a photo resistor. That microprocessor will then report to a Home Assistant instance. I might write a blog post if you’re interested?
@ Would definitely read that! I also think that Home Assistant is very interesting. I don't have it at home yet, but I am considering it as my collection of IoT devices is steadily growing and not all of them work together nicely.
@ sure please keep the good work with good explanation... we are eager to try that!
This is very similar to the route I went down around 2007 for my energy monitoring, ecept I used a much larger CT which wasn't split and I had to do the ballasting for the CT myself and mesure AC voltage. THey weren't as easily obtainable back then. It worked OK ish with high resistivite loads but it was pitiful at low typical loads with a high reactive element. I abandoned the CT route and moved to a blink timing and counting from the main meter using a photo transistor. Thats still the system I use in 2020. Very accurate. The only downside is that at low power consumtion the pulses can be a long time apart and so don't update too frequently. The meter is a typical 1000 pulse per kWh so at 60 watts the pulses are a minute apart. . at 3.6 kW a second apart. THere is a further problem usng the ESP32 in that the analog to digital converter is a bit iffy (read non linear) at the ends of the voltage scale,
hello, I would like to talk to you about this. How can I reach you? thank you
ohm's law (P=IV) only works for DC circuit... when it comes on AC circuit, we need to know for the power factor in order calculate the real power drawn (P=IV*PowerFactor)
Power factor is 1 or close to 1if the load is a resistive type.
Please correct me if I said something wrong for what I understood. Thanks :)
So true. If you don't sense voltage and phase shift it is senseless to call it accurate.
This is so cool, I am definitely going to try this. Wish you showed a little more of how you set it up and powered it etc.
Edit: nvm I see there's quite a bit more media on the blog post
Cool project, I want to put together something similar. ESP32 is a great platform for this.
One little thing: your CT measures an AC current. Without voltage reference there is no way to calculate real power. If you just assume 230V without phase information, you are calculating apparent power. For a household this is probably very close to real power, as you discovered. ‘Reactive current’ is still current and your CT does measure it.
I've built my own on a solder board using an arduino nano. Problem is I have to poll it using python/serial and inject into influxdb. My next version is going to be the esp32 as well. But I am going to use the ADC1115 to get better resolution, 16-bit vs 12-bit.
Nice project build. I love the idea of the usage over time in the way you store the data and figure out the "Always On" devices and account for them.
To get real voltage, you could add AC circuit that reads the voltage directly, then rectifies and outputs to power the esp. But you'd need to have an AC power brick, as the DC ones have been smoothed and/or are done digitally with no transformer. On my line, over the course of a day, my voltage can swing from 125VAC to 116VAC (US power), which can make big difference on power consumption. Right now I'm actually using 2 power bricks as it's still in prototype form.
Thank you! Wow, that's indeed quite a big difference in voltage. I'm actually investigating in using a TP-Link smart switch to do the voltage monitoring. I have a few around the house already and they do expose the voltage through an (unofficial) API.
Really wish there was a way to use a clip style sensor on an individual appliance cord to determine if it is on or not. From my readings a CT would require cutting the cord to clamp one of the conductors, is there another way?
You are correct. These sensors can't detect current with a regular appliance cord because the current going in one wire is going out the other wire in the other direction. These opposing currents null out each other. You could make a short extension cord that has the two wires and then put the clamp over one of the wires. Given the crap I have lying around that's how I'd do it.
A cool little trick for measuring low currents is that you can wrap the wire you put the sensor through the sensor several times and then divide the resulting measurement by the number of loops you did.
Yes, using Hall Effect sensor. See non-contact voltage probes
I've been following your blog post about the home-energy-monitor-v2 but can't figure out how to power the ESP32 while it's installed in the DIN box. Do you recommend using an external battery to power the ESP32? For this project, can I use ESPRESSIF ESP32-WROOM-32D ? Thank you!
C'est vraiment du beau boulot ! Beaucoup de courage ! C'est une très belle chaîne ! Belle découverte !
Juvet Jaurès Ndé la france présente
Can I directly use this CT with my Acrel Energy meter or have to put any circuit CT rating is 100A / 50 milli Amp
Thank's a lot when do you release the multiple sensors videos?
You really should also include a voltage meter as well. Though that becomes invasive and is probably more problematic. Power is exponential, so when the voltage drops or raises (it's never the number they rate it at) you can fluctuate pretty large on power consumption. Length of copper wire can drop the voltage quite a bit if you aren't using a larger gauge. You would want to have the voltage read at the location of the current meter as well. This would give you a better read on the actual power consumed. Reading at the device will kinda bypass line losses, so you can use your readings to determine how efficient your wiring is as well (comparing that to your whole house meter).
What is the maximum distance for the ct cables? I would need 3meters from thensensor to the meter
Is it ok? What kind of cable shouldni use? Is 1,5 mm ok?
Hi, Enjoyed this project, well done but there are some inaccuracies
1. CT stands for current transducer, not current transformer
2. The mains voltage supply throughout Europe (including the UK) has been harmonised since January 2003 at a nominal 230v 50 Hz (formerly 240V in UK, 220V in the rest of Europe) but this does not mean there has been a real change in the supply. Instead, the new “harmonised voltage limits” in most of Europe (the former 220V nominal countries) are now:
230V -10% +6% (i.e. 207.0 V-243.8 V)
In the UK (former 240V nominal) they are:
230V -6% +10% (i.e. 216.2 V - 253.0 V)
This effectively means there is no real change of supply voltage, only a change in the “label”, with no incentive for electricity supply companies to actually change the supply voltage. To cope with both sets of limits all modern equipment will therefore be able to accept 230V +/-10% i.e. 207-253V.
To calculate your energy consumption more correctly, use 220v in Europe and 240v in the UK in your software calculations
Well done video. However, don't you mean watt x hours (not divided) at around 3:30?
what is the use of voltage divider here
What about measuring mains voltage? What options are there if you want to measure inline (not via a magnetic field)?
Really great video. Wanted to go the approach with an ESP32-CAM and number detection of the electricity meter. After viewing your video I am rethinking this. :-)
Do I get that right:
Your CT Sensor outputs a direct Voltage so no alternatig Voltage that you can take a measurement at any point ? ( I mean you have a AC Current and output a DC Voltage with your CT ? ) Otherwise I would not realy understand how that works except if this emonlib does it in the background ?
Also you only measuring Current which means if one wants to measure power going out of the house ( with photovoltaik for example ) You cannot measure that way right ?
Thank you for putting the tutorial together. We will contact you as we are facing some difficulties in getting correct power consumption values.
Hey cool project en goed uitgelegd! Van waar ben je precies? Misschien kunnen we elkaar verder helpen.
Ik wil een soortgelijk systeem bouwen met inderdaad een extra CT voor de zonnepanelen en nog wat extra´s.
I saw someone doing a similar project. If I remember right they calibrated the readings with a known source. I don't know how to do it, but it would maybe be a bit more accurate.
Love the video! Why did you not need a burden resistor?
This particular sensor has one built-in. Pay close attention to the type number of the sensor if you plan on buying one ;)
What should we do if we have a 3 phase system? We can add 3 CTs but how do we calculate the total power used? Do we just add the power of individual phase? And what is the value of resistors you have used?
I can't found the config.h file . Can you help me ?
Thank you
Great Video Thanks!
3:18 But it's AC and the voltage is fluctuating between +325V and -325V. Do you assume that it will average out in the long run?
Well the circuit converts the AC output of the CT sensor into a completely positive one (going from 0V to 2V). Then the emonlib library counts the cycles and calculates how much current is going through it. Emonlib is actually where the magic happens.
This will show aparent power or KVA. Capacitive (switched mode PSUs) or Inductive (Motors) without power factor correction will skew the readings. The usual trick is to power your circuit from an ac ac adaptor to also get a reference low voltage to go with the reference current from the Current Transformer.
Why haven’t you used a burden resistor for the ct sensor?
@simply explained did you ever try this on a three phase system, using three CT clamps?
What is the function of capacitors?
Another factor not considered in the accuracy is that europe has 230V, but with fluctuations, so unless you meassure the voltage every second, you are not getting accurate values for the kwh consumed just by meassuring the Amps
Pretty good work. Congrats!!
I am trying to install the CT clamp but the wire is larger that the hole. Must the clamp be fully closed?
Does need to be sensor clip "just" over live wire? or can be over all wires like clip sensor over extended cable cord (3wires - live, ground, neutral)? Does it affect if I will just clip it over extended cable core?
You can't clip it over all wires. The live and neutral wire cancel each other out, so the sensor would report zero.
It has to be either the live or neutral wire. Not both. Doesn't really matter where you attach the sensor, as long as it's on the cable that you want to measure.
Cool. I'm going to do the same. Keep going! It is very expiring!
amazing work thank you
hey could u explain how to deploy the aws server part,i had tried to burn the program to esp and then dont know how to proceed further,i appreciate if u could make a blog or video on how u deploy the frontend
That CT sensor may can work with efergy engage transmitter?
Nicely done! and thanks for sharing.
Can the output of controller control a digital potentiometer?
is that andre marie ampere or micheal faraday???
Thank you . Can you please explain to us how to connect the voltage and current sensor to a data collection card and then connect the card to a computer for data processing
Hi, nice project over there. Thanks for sharing. Could you share the current value without any load?
Nice video..just one query...In order too connect SCT-013-020 to Arduino GPIO pin, do we need to cut the SCT013 cable and solder it to the GPIO pins? Is there any other way other than cutting the cable ?
Yes, you could use a female headphone jack.
Thanks for your VLOG, great job; Keep going! It is very interesting!
I'm considering the same thing, I've got a 100Amp CT sensor that's rated at 100ma at 100Amps, but I have no idea how many turns (1000-1 does not tell you how many turns just the ratio) to calculate the voltage divider resistors/capacitors - which is how all the video start for a 5v Arduino Nano?
Can someone tell me how to work out if this would work for me in the UK? and if i then need to order a different rated CT clamp?
I don't get that part, but understand the rest...lol
Is there something I can look at on my fuseboard/breaker box to work out what one would be suitable?
Thanks
hello what it needs to be changed to work with 100 A CT?i just want to check it without mqtt just only lcd
Could you please share the links for current calculations and voltage calculations, I'm using esp32 with nodemcu lua so can't use Emonlib
P is not U*I for AC. Only for DC you can use this formula.
Ty
I suppose you only have 'used from the grid' power and no 'injected to the grid' power ?
Although your work is really very appreciated. I am a little bit confused about the EmonLib it works on 1024 resolution and ESP32 work on 4096 can you help me out how you are scaling your resolution my whole project is ready and tested on Arduino Uno but I am stuck with this issue doing the same thing with ESP32.
Thanks, great explanation
Thank you for video, what kind of cable would you recommed to extend the wire of CT (arround 10m) ?
I'm no expert but there may be voltage drop over a long run of cable. I'm in the same boat but am thinking about adding an external wifi antenna to the esp.
wow this is so great, i have one of these CT sensors lying with me and couples of esp32s.
how can i join more then 1 do i need more resistor for that ?
Excellent buddy, excellent!
Could you in future acutally show more clearly how to in detail things like how the audio jack is wired up. Honestly was one of the hardest things to figure out and how you connected it to the AWS ect you could make it like an hour i would watch it like 5 time in the progress of completing this project.
Do you think it's possible to have it more granular, meaning not only main power, but power per breaker?
Sure! The ESP32 has a few more ADC input pins where you can attach CT sensors to.
And if that's not enough, you can always buy an external ADC.
very cool project!
Well explained.
Can I use this project with measuring current by CT sensor for EV car. If I can, is it importance to use monitor together?
Not sure I understand the question. Important to monitor what together?
Yes, you can also use this to monitor individual appliances or your EV car.
Can this be done for monitoring DC current from solar pv?
Great video! A really interesting project, thanks for sharing.
Hi! I just want to ask if the CT sensor will be destroyed or burned when the ampere passing through the wire exceeds 30A? Can the CT sensor handle large amount of current?
You can buy higher rated sensors. There is one that goes up to 100A.
@@simplyexplained Thank you! :)
This is an important point. Due to non-linearity of CTs, we choose the rating in the sweet spot of what we want to measure. However what happens if we supersaturate the coil?
Simply Explained - Savjee This doesn’t answer the question posed
Subd - great vid, keep em coming!
can i measure voltage with hall effect transformer sensor?
Really nice video. great project, well presented, congrats. Would you share what 3d printer do you own... I'm thinking to get one and I really like the end result (box)
Okay, But it wont be accurate cause its not always 230 volts exaclty so why not add a voltage sensor?
I'm wanting to be able to know when a remote device(sump pump) is being powered in our side yard by monitoring the circuit in our breaker box. I just want to turn on an LED light on the wall when it comes on.(to know it's still working and hasn't malfunctioned) Any ideas, anybody.
Hey nice work! Im planning on doing a similar project on my channel soon. You bet I'll take a look at your code!
A small correction though at 5:22 I think you meant apparent power. You cant reliably measure true power without taking into account the voltage, it should be fairly easy for you to implement this using a voltage transformer.
show me???
5:54, yes you are right, he means apparent power. He is not measuring true power consumption, only apparent power. But in his case they should be very close.
Great video; It is very interesting! Many thanks for sharing
Hello, where we can find your code for the application in ionic app ? Thanks very much ;) I really want to rebuild this tool for monitoring my home but I am newbie ;) do you write in the future a complete guide with all details and code to do it ? Thanks very much
Really helpful
Is there a way to identify different devices similar to how SENSE claims to work (but doesn't)?
In theory yes (this is still on my todo list). However, to get the best results you would also need to measure voltage.
Can it read DC curent, too?
Hey, I need your help in making this project. I have the hardware required for the project but not able to configure the AWS IoT can you please help to configure that part I tried to contact you on Twitter but nothing happened so I requesting you to please help me to fix it this. Please help me.
would it be possible to put a ct sensor on each circuit in the breaker box or is it too noisy in there?
Should be possible! I doubt that the noise will be significant enough to really throw of your readings.
can this also be used for 3 phase?
Hey, great project!
I am in the process of building this for my home, but have come up with a problem.
After 60 samples of values are shown on the Arduino IDE monitor window the readings drop to zero.
I have changed the 1 second sampling to 3 seconds, and still after 60 samples, it goes to zero!
I am running all new resistors and capacitors, confirmed all ok, the CT clamp is same model, and i have confirmed i am getting Vac from it.
I have tried different input pins on the ESP32, tries calibration values, tried changing the 1480 averaging value, but still no more than 60 readings!
Any suggestions greatly appreciated!
The first 60 readings are realistic, and fluctuate a little.
Seems like after further investigation, the millis() is causing the problem.
I have also tried the millisdelay() and that does similar (not same) problem.
Without any timing, sampling as fast as possible, it works fine... strange!
Hi !! Great video!!, do you have any idea on how to measure electricity supplied to the grid by a solar Inverter?
Should be the same process. Just add a secondary sensor to the output of your inverter ;)
Can we measure DC current?
FYI: Look into ESPHome and home assistant.
I did come across that one. Very interesting, might use for future projects.
Ohm‘s law (U=R*I) is about resistance, not about power, even if you present it in the most convinced way.
And unfortunately, the reactive power‘s current does flow through the wire and by thus creates loss.
Hi....This is extremely informative video as I am looking for some knowledge. I want to develop this, where should i get started in taking technical help. What kind of technical knowledge people can help. Is there anyways I can seek assistance from your company.
Very cool project!
Can I use it on a power bar (which has 3 wires insulated) for example? or only on the hot wire of the entire house?
You can add it to any wire of any appliance or device. In your case, you would need to dismantle the insulation and add the sensor to 1 of the wires that are carrying current (most likely blue or brown).
@@simplyexplained Thanks. BTW, did you add a burden resistor to the sensor?
No, this model had a built-in burden resistor (which is why it outputs 0 to 1V)
@@simplyexplained when I searched for the model of this sensor on UA-cam one guy said he needed to use burden resistor. I wonder why..
Nice project, and nice video. Some more schematics would have been fine. Doesn't the CT measure the magnitude of the current? so you are getting the apparent power, not the true power. Adding a voltage transformer and some more math will allow you to compute the apparent, the true and the reactive power.
Correct! I didn't bother doing this, because my measurements were pretty on point (in comparison to the analog meter). However, since then, I've moved to a house and it's been causing some issues. Might revisit this project in the future, thanks for your suggestion!
@@simplyexplained Just mentioning something like: to measure reactive power you need to keep track of the voltage too.
That would make the point. Nice video anyway.
I can't find the source code .INO
in Gitube
where is he??
Have you found a neat way to detect power direction for the case where the CT is monitoring a system which can both absorb power and generate power? This will require current phase detection I believe. The ESP32 should be able to do that if, for example, we set up a 1ms interrupt and sample instantaneous supply voltage (via a voltage transformer) and the relative instantaneous current phase. We can also get power factor this way and get closer to real power.
Without calculating the Power Factor, your energy reading are Wrong!
That sensor output is 1v AC not DC , right?
Yes, AC.
@@simplyexplained ok thanks. I didn't know we can hook up an AC voltage to the leg of DC microcontroller
03:21 "You can calculate how many watts you have per hour"
How much does AWS IOT cost monthly
It has a very generous free tier. This setup doesn't cost me anything. That includes AWS IOT but also DynamoDB, API Gateway, Lambda and S3
Hi! You are awesome!! Can you pls make a video explaining sql injection?! Ty! 🙏🏻👍🏻💪🏻
Nice haircut!
😂😂
BlaBlaBlaaa!