# 230V power metering on rpi

**URL:** <https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082>\
**Category:** General\
**Created:** [20 November 2018 20:38 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082 "2018-11-20T20:38:06Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarbax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tarbax/32/3212_2.png) [@tarbax](https://discourse.nodered.org/u/tarbax)\
**Post date:** [20 November 2018 20:38 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/1 "2018-11-20T20:38:06Z")

</div>

i am currently busy with pond demotics. (relays,temp sensors,buttons, water level, lights and flow meter etc)

And i would like to add a current sensor so i can messure how mush power the whole pond uses.  
what sensor do i need to attach and how to configure this ?

I all doing this on one raspberry pi 3

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [20 November 2018 20:49 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/2 "2018-11-20T20:49:33Z")

</div>

If you use you internet search engine of choose to search for “power metering raspberry pi” you’ll find lots of guides to help you

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 November 2018 20:54 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/3 "2018-11-20T20:54:57Z")

</div>

You could use a Sonoff POW [1] re-flashed with the Tasmota software. That will send data back to MQTT for access in node-red.

[1] [https://www.itead.cc/sonoff-pow.html](https://www.itead.cc/sonoff-pow.html)

---

<div class="post-metadata">

**Author:** ![tarbax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tarbax/32/3212_2.png) [@tarbax](https://discourse.nodered.org/u/tarbax)\
**Post date:** [20 November 2018 21:00 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/4 "2018-11-20T21:00:25Z")

</div>

it is for a pond where they will be at least 4 high power pumps large UV light, pond lights etc so it will be way over the rated Amp of a sonoff and i dont want to be a relay in front off the other relays.

---

<div class="post-metadata">

**Author:** ![tarbax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tarbax/32/3212_2.png) [@tarbax](https://discourse.nodered.org/u/tarbax)\
**Post date:** [20 November 2018 21:26 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/5 "2018-11-20T21:26:05Z")

</div>

what is the easiest way to get an SCT on node red and how to wire it ? any boards that are available ?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 November 2018 21:36 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/6 "2018-11-20T21:36:13Z")

</div>

One device many have used is the Current Cost smart meter - ( mainly in UK ). They are relatively inexpensive and have a simple serial port that is easy to listen to. Or maybe look at the openenergymonitor site - who, as well as a range of products, have some great info for DIY - [https://learn.openenergymonitor.org/electricity-monitoring/ac-power-theory/introduction](https://learn.openenergymonitor.org/electricity-monitoring/ac-power-theory/introduction)

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 November 2018 00:31 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/7 "2018-11-21T00:31:06Z")

</div>

You realise the Sonoff POW is approx 3600w (i.e. 16A) although i would not push it that far.

For the sake of simplicity - why not deploy more than 1 - which would give you better metrics as to the electricity per pump/light.

Each provides a MQTT controllable relay as well as current monitoring etc - so you would be able to remove your current relay soluton and simplify it to one device (relay and monitor) per device

Craig

---

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [21 November 2018 07:47 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/8 "2018-11-21T07:47:19Z")

</div>

Hi @tarbax,

I implemented power measurement on RasPi 3 with ADS1115 (4-channel ADC converter) and Split Current Transformers. I measure the current assuming voltage is 230V.

Comparing to suggested Sonoff POW, this method had disadvantage: the assumption of voltage, not measurement. This can be satisfied with a little more additional circuitry (was not required in my case).  
The advantage of this method is: no special HW (Sonoff) required neither software-related mess with it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 November 2018 09:24 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/9 "2018-11-21T09:24:34Z")

</div>

Just to note that I was not suggesting the Sonoff POW is the best solution for this application, just throwing it into the mix. There is no correct answer for this class of problem, different applications will require different solutions.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 November 2018 12:55 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/10 "2018-11-21T12:55:29Z")

</div>

Hi Tarbax,

Power measurement can also be done using a [Belkin Wemo **Insight** Switch](https://www.belkin.com/us/p/P-F7C029/). There is an american and european version:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8fae6629c6bf9cd71ab6a766c412c38afcd0cb96.png)

Don't use a normal Wemo Switch, because that only allows you to turn on/off a 230 Volt device.

Wemo devices have a HTTP interface (see [here](https://www.switch-that.com/user-guide/ch11.html) and [here](https://www.switch-that.com/user-guide/apb.html)), which can be called e.g. using a HttpRequest node. Or you can use the [node-red-node-wemo](https://flows.nodered.org/node/node-red-node-wemo) nodes out-of-the box.

Bart

---

<div class="post-metadata">

**Author:** ![tarbax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tarbax/32/3212_2.png) [@tarbax](https://discourse.nodered.org/u/tarbax)\
**Post date:** [21 November 2018 17:59 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/11 "2018-11-21T17:59:00Z")

</div>

i found this [Gravity Analog AC Current Sensor](https://www.dfrobot.com/product-1486.html) from DF robot.  
is this implementable into node red ?

i also planning to get IoTaWatt so i can measure voltage on 3 phases and current of each room, solar and grid separately

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 November 2018 18:44 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/12 "2018-11-21T18:44:17Z")

</div>

Interesting!!  
I'm not a specialist about this area, but there is the similar [SCT-013](https://nl.aliexpress.com/item/SCT-013-100A-15A-20A-50A-niet-invasieve-wisselstroom-sensor-Split-Core-Huidige-Transformator-SCT-013/32900839226.html?spm=a2g0z.search0104.3.10.6f52b5a5J0ELhw&ws_ab_test=searchweb0_0%2Csearchweb201602_4_10065_10068_5734615_319_317_10696_10924_453_10084_454_10083_10618_10920_10921_10304_10307_10922_10820_10821_537_10302_536_10843_10059_10884_10887_100031_321_322_10103_5734515%2Csearchweb201603_51%2CppcSwitch_0&algo_pvid=a7a8aef5-8a90-4be8-b2d1-761935bcbfa4&algo_expid=a7a8aef5-8a90-4be8-b2d1-761935bcbfa4-1) on Aliexpress, which is wired to a Raspberry in this [tutorial](http://www.bujarra.com/midiendo-nuestro-consumo-electrico-con-una-raspberry-pi/?lang=en). They put one of the RPICT boards as a hat on top of a raspberry (which [seems](http://lechacal.com/wiki/index.php/Raspberrypi_Current_and_Temperature_Sensor_Adaptor) to be compatible), to connect it to the gpio pins. Such boards allow up to 7 SCT-013 modules to be connected.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 April 2019 21:57 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/13 "2019-04-08T21:57:22Z")

</div>

> [@craigcurtin](#):
>
> Sonoff POW is approx 3600w (i.e. 16A) although i would not push it that far.

Haha, I wouldn't push a SONOFF to even 1/2 that - at least not in any location susceptible to fire!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 April 2019 22:04 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/14 "2019-04-08T22:04:34Z")

</div>

Interesting. But the boards seem to cost around £35 and for that it might be better to us a bunch of cheap ESP8266's - I expect someone has connected up those current sensors.

---

<div class="post-metadata">

**Author:** ![nlebidakis](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@nlebidakis](https://discourse.nodered.org/u/nlebidakis)\
**Post date:** [25 May 2021 19:28 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/15 "2021-05-25T19:28:35Z")

</div>

Igrowing , can you PLEASE share your code ??

---

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [20 August 2021 16:49 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/16 "2021-08-20T16:49:04Z")

</div>

@nlebidakis sure.

> <https://github.com/igrowing/RaspberryPi/blob/master/poll_power.py>

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [24 August 2021 23:54 UTC](https://discourse.nodered.org/t/230v-power-metering-on-rpi/5082/17 "2021-08-24T23:54:07Z")

</div>

Julian,

In Australia here (240v) - but have now had a Sonoff POWr2 running our clothes dryer (2000w) for over a year and not one issue

Also a 2nd running our dishwasher - peaks at 2400w

And a 3rd running a Hot water service at 2400w for a year now - that one gets warm but nothing to worry about

So i have to say i am very impressed with them so far and how robust they are

Craig
