Git Product home page Git Product logo

pipowermeter's People

Contributors

craigjensen avatar crjens avatar isaacjensen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pipowermeter's Issues

Does someone still have some boards available

I'm using the power meter for several years, and really liked it, but recently faced an issue on an jack connector.

I'm looking more specifically for the 16 channel input board. I tried to contact @crjens by email, but without success.

So if someone has one available, please contact me.

Philippe

i2c conflict

is it possible to rewire GPIO2 and GPIO3 (pin 3 and 5) to some other pins?
i'd like to use i2c along with pi power meter, but not sure about pullup resistors or other hardware limitations.

i'm connecting it on ribbon, so it's easy to me to rewire and change the reader code accordingly.

Current Sensors, Config Elements, and Sensor Coverage.

I have the dl-ct08cl5 CT's (2000/1) and am unable to configure the readings properly. I also dont seem to understand the scaling factors or where the phase configurations are defined (V1,V2, V3, V1+V2). The CT's seem to be detect voltage and frequency, but no current. I am measuring ~150ohm across the CT's leads before connecting to anything. I am measuring ~44 vac and ~7.6M ohm on a 1AMP load.

Also - For any 220V circuits, do we need both legs? Just curious how the off the shelf clamp meters are calculating load when using only a single leg?

Potential issue with your current sense resistors

Hey Craig,

First off, thanks for open sourcing this project! I've recently been using it as a reference to develop a power monitor with 6 CS5463s for 3 phases of solar generation and 3 phases of household consumption.

Unfortunately, I think that I may have found a potential issue when examining your hardware specs. In your PowerMeterCurrent_DigikeyBOM.txt it indicates that the value of your current sensing resistors is 5 ohms. In your documentation you recommend using sct-013-000 100A:50mA current transducers. Furthermore, on page 7 of the CS5463 datasheet, it indicates that the differential current inputs can handle up to a 500mVpp difference (+/- 250mV since the signals are ground tied).

From those numbers I'm getting that the CS5463 would only be able to measure up to a maximum of 70.8A of sinusoidal input, not 100A before the CS5463 current readings start "peaking". I believe that you may have forgotten to divide by sqrt(2) when choosing your 5 ohm current sense resistor. My reasoning for dividing by sqrt(2) when going from a peak-peak to RMS can be found at the bottom of the Average Electrical Power section of the Root Mean Square Wikipedia page where it states that Vrms = Vp / sqrt(2).

If the CS5463 can measure a max of 250mV peak, then it can only handle a 250mVp / sqrt(2) = 177mVrms sinusoidal signal without "peaking". Dividing this by your current sense resistor of 5 ohms gives 177mVrms / 5 ohms = 35.4 mArms through your current sense resistor. Finally, multiplying that by the turns ratio for the sct-013-000 of 100A:50mA (N = 2000) gives 35.4mArms * 2000 = 70.8Arms through the current transducer before "peaking" begins to occur.

I believe that if you were to substitute a 5.00 ohm / sqrt(2) = 3.5 ohm resistor, you would again be able to read the full 100Arms range of the sct-013-000.

I am quite new to hardware of this complexity, so it is likely that I have made a mistake in dividing by sqrt(2), but I wanted to bring this to your attention nonetheless. Have you been able to take measurements above 70.8 A of sinusoidal current? While currents this high are unlikely to be seen under normal circumstances, I believe that the PiPowerMeter would not be able to handle them.

Thanks again for your time and for developing this amazing project,
Julian

Direction of Power

This is more a question. The Irms and Vrms seems to always be positive no matter what the direction of the CT is and no matter what the direction of the current/voltage is.

I have a couple of CT on a Solar line and the Grid that is sometimes fed by Solar and then becomes negative Power.

How can I find out the direction of the power with the CS5490 ?

Thank you,

Christian

Fresh install errors / no readings

Hi there,

Just tried to do a fresh install of the current version of PiPowerMeter but can not get it to work correctly (I'm back to using my old version via a disk img I had created back in 2019 - PiPowerMeter Software timestamp: 018-11-26T02:58:19.000Z).

The installer seems to complete without any errors, it does hang for a while here and there thou.

Once installed and rebooted the web page is accessible but no power readings can be obtained and the nodejs.err.log has the following error:

Error: Cannot find module '/home/pi/app/node_modules/CS5490/build/Release/CS5490.node'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:364:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:577:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pi/app/CS5490.js:3:14)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/home/pi/app/node_modules/CS5490/package.json',
  requestPath: 'CS5490'
}
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
    at new NodeError (node:internal/errors:387:5)
    at ChildProcess.target.send (node:internal/child_process:742:16)
    at /home/pi/app/driver.js:170:20
    at /home/pi/app/database.js:874:37
    at Statement.<anonymous> (/home/pi/app/database.js:605:17)
Emitted 'error' event on ChildProcess instance at:
    at node:internal/child_process:746:35
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 'ERR_IPC_CHANNEL_CLOSED'
}
node:internal/modules/cjs/loader:372
      throw err;
      ^

Error: Cannot find module '/home/pi/app/node_modules/CS5490/build/Release/CS5490.node'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:364:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:577:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/pi/app/CS5490.js:3:14)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/home/pi/app/node_modules/CS5490/package.json',
  requestPath: 'CS5490'
}

Fresh install details:
Rpi 3B 1GB
SD card flashed with official image - "2021-03-04-raspios-buster-armhf-lite.img"
Logged on as pi then executed: wget -O - https://raw.githubusercontent.com/crjens/PiPowerMeter/master/setup.sh | bash

Software installation errors

Hi,
Just before I wanted to order the components I try to install the software, but whatever I try, I keep getting errors as below.

Does anyone has suggestions? I am running 2020-02-13-raspbian-buster-lite

Many thanks in advance, Jan

make: *** [CS5490.target.mk:109: Release/obj.target/CS5490/CS5490.o] Error 1
make: Leaving directory '/home/pi/app/node_modules/CS5490/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pi/.nvm/versions/node/v14.15.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 4.19.97-v7+
gyp ERR! command "/home/pi/.nvm/versions/node/v14.15.3/bin/node" "/home/pi/.nvm/versions/node/v14.15.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/app/node_modules/CS5490
gyp ERR! node -v v14.15.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

Enable UART
Disable bluetooth
Removed /etc/systemd/system/multi-user.target.wants/hciuart.service.
CS5490 is installed. Please reboot to apply changes.

[email protected] install /home/pi/app/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.0/napi-v3-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/app/node_modules/sqlite3/build'

AND:

[email protected] install /home/pi/app/node_modules/CS5490
/bin/bash ./install.sh

make: Entering directory '/home/pi/app/node_modules/CS5490/build'
CXX(target) Release/obj.target/CS5490/CS5490.o
../CS5490.cc: In function ‘void DriverVersion(const Nan::FunctionCallbackInfov8::Value&)’:
../CS5490.cc:110:75: error: no matching function for call to ‘Nan::ReturnValuev8::Value::Set(v8::MaybeLocalv8::String)’
info.GetReturnValue().Set(String::NewFromUtf8( isolate, version.c_str() ));
^

Code updates

My Pipowermeter is now quite old and has been sitting in a box. I now have time to revisit it and get it going. However, when I start installing it there seems to be a lot of code errors in getting the preliminary dependencies even before loading the Pi software itself. Is there new instructions on how to do the initial install with new references?
Thanks.

Interested for electric motorcycles

Hello,

We are a young company starting an electric motorcycle business in Uganda. For this purpose, we need to measure the consumption of 6 motorcycles chargers independently. And your solution looks terrific. Is there a way to find the hardware you use here? We are open to discussion to buy your solution.

Hope to read you soon!

Components

Hi Craig!

I'm XO from the Philippines. First, I would like to thank you for your PiPowerMeter. I recently used your schematic of the board and have it printed. I bought the BOM, however some are not available, will it be possible to change the components with the same specifications? Also, my mains do not have grounding and neutral wire, it is ok to use only the two live wire? (240V Line-Line).

Thanks!

Help figuring out

I am interested in this project. But I have some questions?
Is the project still active?
What is the difference between v2.2 and v4.0?
Is there any "ready-to-use" gerber files that can be uploaded?
Any up-to-date BOM files?
Pick-and-place instructions for fab-house?

How 's the kWh calculation going?

How 's the kWh calculation going?

How many measurements take place per hour?

And in general it is interesting for how much ms get full data on current?

Just I made an almost similar device, but I use MCP3208CI/SL there and all rms calculate in code, more than 40 current sensors do not get to use to withstand 3200 measurements per hour.

Thanks.

Voltage reference not working

Hi folks,

I am using the boards of the fork from CircuitSetup which are based on the Version 2.2 of the crjens boards. Due to circumstances I was only able to finish the assembly of the boards by now and I am trying to use the current software of this master version.

I have troubles getting the voltage reference working. The probe overview looks like this:
image

The configuration of the probes is this:
image

The overall configuration is this:
image

For reference, here some information:
I am living in Germany and trying to use a three phase network with neutral.
I am using the TV16E voltage transformers from YHDC (black ones).

What seems strange to me:
a) The frequency of all three phase-phase references is nearly a plausible value of ~50Hz.
b) The secondary side of the voltage transformers (TV16E) is reversed when comparing the data sheet of the TV16E and the schematics of version 2.2 of the boards (does this matter?)

Can anybody give me a hint on this, where to look first?
Is there any configuration that has to be done additionally to the this to work (e.g. enable voltage references or something like that)?
How can I check if the CS5463 is reading a plausible voltage value?

Thanks!
Cheers elektrolubach

Install Pi meter issue

When install using the latest instructions I receive the following error during the install process --

wiringpi-latest.deb 100%[=====================================================================================>] 51.04K 224KB/s in 0.2s

2022-03-13 12:52:17 (224 KB/s) - ‘wiringpi-latest.deb’ saved [52260/52260]

Selecting previously unselected package wiringpi.
(Reading database ... 40126 files and directories currently installed.)
Preparing to unpack wiringpi-latest.deb ...
Unpacking wiringpi (2.52) ...
Setting up wiringpi (2.52) ...
Processing triggers for man-db (2.8.5-2) ...

Install PiPowerMeter
bash: line 32: git: command not found
bash: line 33: cd: app: No such file or directory
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/pi/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2022-03-13T16_52_29_821Z-debug-0.log

PiPowerMeter is installed
Restarting...

So when I use the URL to access the GUI I receive the message "This site can’t be reached"

Resistor Values vs Part Numbers in BoM

The BoM file generated by eagle for V4.0 boards has a discrepancy.

On PiPowermeter board. The resistors value is 59K. The BoM Partnumber is of 1K resistors

On PiPowermeterCurrent board. The resistor value is 5K but the part number is 7.5K.

Hardware Details

hi there,

I need your help!
Which hardware do you have select?
Do you have details or maybe a datasheet/shopping link?
i can´t find anything about boards like yours!

best regards
Linus

Few watts remanence

Hello,

On some of my probes I have a few watts of remanence while nothing is consumed (2x93W in the example attached). Do you have any idea where this could be coming from? How can I investigate? Should I play with the "scale"? I didn't touch these values in practice.

Many thanks in advance (for the answer and for the product).

PS: I wrote to you for a board order 4 days ago, I don't know if you saw my email or if it's a spam problem again.

Power_Meter_–_Brave-brave_7GC-22-09-07-07h59m
Power_Meter_–_Brave-brave_uzz-22-09-07-07h58m
Power_Meter_–_Brave-brave_6IA-22-09-07-07h58m

Resistor array on back of board

First of all. Thanks for all the work that you've done with this project, and for putting it up on here.

I just uploaded a slightly reworked version of the two boards to my fork of your project. I moved everything that was on the bottom side to the top, and replaced through hole components with smd.

I'm just curious if the resistor arrays for the voltage readings were on the back of the board for a reason, like to cut down on transients interfering with other components? I noticed the space between the copper fills was increased a lot around the high voltage components, but wasn't sure if that was enough.

Choose the location of the powermeter.db file

It would be really nice to be able to choose the location of the db file. The db writings make the system's SD card very tired. I would like to put it in tmps or on another media.

MQTT Provision

Hello,

Thanks for making this project. I started my own with a standard MCP3208 but found that a 12bit ADC is not accurate enough. I like the approach of the CS5490.

I have a question for you. In the driver.js, I saw that you have some provision for MQTT but I could not find anywhere on the configuration web page a way to enter the MQTT server, username, password and port. Am I missing something ?

Thanks

Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.