Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. YHDC Current Transformer SCT-013-000 readings interval question

YHDC Current Transformer SCT-013-000 readings interval question

Scheduled Pinned Locked Moved Hardware
1 Posts 1 Posters 583 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Oretoh
    wrote on last edited by
    #1

    Good evening people, so I own this ct sensor and I will be using part of the code here from @Fleischtorte .

    My question comes from my lack of knowledge about electric current and eçetricity in general. So in most cases, we see people taking Power (current * voltage) readings every minute and then sum and average those powers once it reaches the 1 hour mark (60 minutes).

    My question is this:
    Seeing as a ct sensor will give different current and therefore Power values every SECOND, why shouldn't we take readings of Power values each second and then sum those values every second until it reaches 1 minutes mark (60 times) and then repeat this 60 times (to make an hour) and finally sum and average those values?

    Basically something like this:

    if (seconds < 60) {
        double Irms = emon.calcIrms(1480)
        double watt = Irms * 230.0
        total_watt_per_minute =  total_watt_per_minute + watt 
    } else {
         seconds = 0
         total_watt_per_hour = total_watt_per_hour + total_watt_per_minute
         total_watt_per_minute = 0
         minutes++
    }
    
    if (minutes >= 60) {
        wh = wh + total_watt_per_hour/60
        kwh = wh/1000;
        total_watt_per_hour = 0
        minutes = 0
    }
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    18

    Online

    11.7k

    Users

    11.2k

    Topics

    113.1k

    Posts


    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • MySensors
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular