0
\$\begingroup\$

In the last three months, my electricity bill consumption increasead by 50% with no known reason. I got hyper focused on discovering how to prevent that and how to control my energy consumption better.

So I thought a wattmeter would be a cool thing to have on my house. I searched on google but everything looks garbage and do not do the required function. I got ambitious and decided it would also be very cool to plot my home power usage on a graph (daily, hour by hour); so it would be required to measure like once every 30 min IDK and send it to Google Sheets. Those Amazon wattmeters don't do that.

So let's build my own wattmeter. I know very little about Arduino, just the basics like turning a LED on with some programming. I think I have a moderate knowledge about electricity so let's give it a go. First thing, a wattmeter is just a voltimeter and an amperimeter working together because P = U * I so we need to make Arduino read from a voltimeter, an ammmeter, do some math and send it to google. Fine.

First, the voltmeter. I'm in a region with 220V 60Hz monophasic electricity; electricity bills says it can vary from 206V to 231V. Arduino analog ports only support up to 5V, so we need a voltage splitter. That's just two resistors in series with specific values. All good. If we have a 100.000 ohms resistor and a 2.200 ohms, the second one would use a maximum of 4.97V at 231V so I guess it's fine.

Thing is, that's AC, not DC. I searched about AC and found out the peak voltage isn't 231V, but 231 * sqrt(2), so 326V. That's 220.000 ohms and 3.400 ohms to split it to a maximum of 4.97V. Arduino can handle that. Problem is, I don't know if it will sample the voltage fast enough to be able to determine "peak" value. The plan is to get samples over a wavelength (1/60) (or greater) and find the peak value, then divide by sqrt(2) to find the effective voltage (RMS). My insecurities are:

  • Will Arduino be fast enough?

  • Is this a fire hazard? Is there a better way?

I also got worried about power consumption, but I calculated those resistors would only use 0.24W, which is like 0.17 kWh. But maybe I should put a relay to close the circuit every 30 min. I hope Arduino itself + relay + ammeter + esp8266 WiFi module won't use much more power.

About the ammeter, I'm not going to play with this so I'm thinking about buying a ACS758 50A and that's it. I'm also worried if it is safe to put my entire house in series with this device.

When doing this project, I'll definetly call a electrician to prevent anything stupid from happening.

Edit: some suggestions were already given and very well accepted. I changed some things in this project to make it safer:

  • Use a ZMPT101B for measuring voltage instead of that voltage splitter thing. The splitter wouldn't work anyway because of the negative voltage Arduino can't support.
  • Use a clamp ammeter instead of that Acs758 instead of putting my entire house in series. I'll go with SCT 013 000 with some circuits to make it work with Arduino.

Some additional points:

  • Devices in the market that do this aren't available on Brazil. Just those plug in wattmeters, which won't work for that situation as I wish to send it to Google sheets and measure the power consumption of my entire home.
  • I can't add circuits to my electricity meter because that's illegal. Moreover, my meter is >16 years old and isn't electronic, so it doesn't have leds or ports I can interact with.
  • All of this is just plan B to decrease my energy consumption. Plan A is calling an electrician to find out if my meter is working correctly and if it's needed to replace it.
  • I won't get one sample every 30 min. I wasn't very clear at that part. I intend to get a bunch of samples every few milissecond to find the instantaneous power, but only for the period of some oscillations. Then after 30 min or less repeat it. That's because I don't want to have unnecessary data and fill my Google sheets with power measurements from every second.
asked Jan 11, 2024 at 3:12
\$\endgroup\$
18
  • 8
    \$\begingroup\$ Absolutely do NOT make anything connected to mains, with the electrical knowledge you seem to have. Just use a kill-a-watt. -- As an aside, it's "voltmeter" and "ammeter", not "voltimeter" and "amperimeter" (which are, I assume, the words in your native language). Also more common to talk about "single-phase", "monophasic" sounds odd to english-speaking ears. \$\endgroup\$ Commented Jan 11, 2024 at 3:33
  • 2
    \$\begingroup\$ Your calculations on power are off by quite a considerable margin. They will dissipate more than 230W. I strongly suggest you do not do anything mains-related until you have a lot more experience. You could VERY easily start a fire, electrocute yourself or someone else, or destroy your computer. \$\endgroup\$ Commented Jan 11, 2024 at 3:36
  • \$\begingroup\$ @Hearth I appreciate the grammatcal corrections and I'm sorry if it bothered you. \$\endgroup\$ Commented Jan 11, 2024 at 12:37
  • \$\begingroup\$ @SpehroPefhany hey could you show me your power calculations? About the house catching on fire, I'll replace that voltage splitter with a ZMPT101B and the ammeter with a clamp one. That should be considerably safer, correct? \$\endgroup\$ Commented Jan 11, 2024 at 12:45
  • 1
    \$\begingroup\$ @Marvin: No, you can't use RMS values for voltage and current. That is because if you multiply those, the result is the appearant power. If the voltage and current are shifted because of some inductive load or the waveform is distorted from pretty much any cheap phone charger, the appearant power is way higher than the active power which you have to pay for. — You have to sample voltage and current about every 100µs at least, multiply the values, then add up this product to gain a measure for the electrical energy consumed. \$\endgroup\$ Commented Jan 11, 2024 at 19:59

4 Answers 4

3
\$\begingroup\$

You've done some of your homework correctly but to do this correctly and safely there are several other considerations.

  • Your simple voltage divider does not provide mains isolation so you would have to treat the whole device as live and couldn't, for example, hook up to the USB port without risk of electric shock or destroying some electronics.
  • Mains is AC. The Arduino can't handle negative voltages on the ADC. You haven't addressed that.
  • You haven't got any zero-cross detection. You may need that.

If you're really interested in studying the topic (which I suggest is NOT a good beginner's project) then have a look at the https://openenergymonitor.org project where all of this has been sorted out.

If you really want to monitor your energy usage then count pulses from your energy meter - how depends on the type - and that will directly correlate with your bill.

For plug-in devices just buy a Kill-a-Watt or equivalent meter for about 20ドル or so. It will just kill watts and not you.

answered Jan 11, 2024 at 3:39
\$\endgroup\$
5
  • \$\begingroup\$ Hello, thank you for your reply. I also got some suggestions to replace my voltage splitter with a ZMPT101B which should do the trick. Also, it was recommended to change the ammeter for a clamp meter, making the project safer. Do you have any other suggestions? About the kill-a-watt, I pretend to measure the entire house consumption and not only a plug. About the measuring the meter, it is illegal to mess with the meter and mine is very old (16 years). \$\endgroup\$ Commented Jan 11, 2024 at 12:32
  • \$\begingroup\$ A voltage transformer and current clamp (it's not a meter - a clamp meter would have a digital or analog readout on it) would make it much safer. Edit your post to include a photo of your meter. Blur the meter's serial number in the photo if you're paranoid. \$\endgroup\$ Commented Jan 11, 2024 at 13:50
  • \$\begingroup\$ I'm away from home right now but I think a Google picture can do it. Mine is very similar encrypted-tbn0.gstatic.com/… \$\endgroup\$ Commented Jan 11, 2024 at 19:58
  • \$\begingroup\$ That's similar to mine. I 3D printed a bracket to point an industrial photosensor at the disc to detect the stripe. I fed that into a Raspberry Pi and counted the number of revolutions in each minute. I uploaded the count to my web server and had a page that could plot the usage and present a table. (All gone now.) I'd say that 55+5/9 on the front dial of your photo is the number of revolutions per kWh. \$\endgroup\$ Commented Jan 11, 2024 at 20:08
  • \$\begingroup\$ That's a cool solution, thank you. \$\endgroup\$ Commented Jan 11, 2024 at 22:11
0
\$\begingroup\$

Absolutley this is possible eg: AVR app note 465 in case you missed it "Atmel AVR 8-bit Microcontroller" includes things like the processor in an Arduino Uno

However connecting directly to your electricity supply is a dangerous thing for a beginner to do, especially if you are connecting up-stream of most of the safety devices.

I would suggest instead reading the LED pulse output of your existing energy meter (if it's electronic). doing this does not require any electrical connection so it's safe.

The main cause of sudden changes in electricy billing is a gradual change and the power company guessing instead of reading the meter.

answered Jan 11, 2024 at 4:22
\$\endgroup\$
1
  • \$\begingroup\$ My meter is 16 years old (or more) and doesn't seem to have a led pulse. About the project security, I also got some suggestions to replace my voltage splitter with a ZMPT101B which should do the trick. And it was recommended to change the ammeter for a clamp meter, making the project safer. Do you have any other suggestions? \$\endgroup\$ Commented Jan 11, 2024 at 12:35
0
\$\begingroup\$

The analog front end for your project is at best, complicated for those who know what they are doing, and at worst, dangerous for those who don't.

I would suggest you use something like this: https://www.weschler.com/product/nk-technologies-single-phase-power-transducers-aps-series-2/#configurator_form

It will output a 4-20mA signal proportional to the true power consumed which is easily managed by a Pi. It is also isolated so your downstream circuitry is (mostly) safe.

Yes, it is pricey at around 400ドル American. But you have to ask yourself: How much is your time and possibly your life worth to you? Just get something like this and you will be on the green in 3.

answered Jan 11, 2024 at 20:45
\$\endgroup\$
0
\$\begingroup\$

P = U * I

For AC, not quite. See active and reactive power.

https://en.wikipedia.org/wiki/AC_power#Reactive_power

  • Is this a fire hazard?

At your level of knowledge, definitely yes.

answered Jan 13, 2024 at 13:42
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.