-
Notifications
You must be signed in to change notification settings - Fork 103
Voltage Tuning
To obtain the most accurate readings possible, ALL users, regardless of their local voltage should follow these simple steps.
This process will work for users in North America on 120V grids, and international users on 230V grids. The process is the same regardless of your locality's voltage.
You'll need a multimeter and a calculator for this process.
-
Measure your A/C electrical voltage and write down the value somewhere.
Ideally, you'll want to measure the same exact outlet that you will be plugging your 9V AC voltage transformer into. Furthermore, for even greater accuracy, the circuit that your 9V AC voltage transformer will be plugged into should not have any heavy loads on the circuit. Heavy loads can cause excessive voltage drop which will differ from the actual voltage of your panel's mains and introduce some measurement errors.
-
Plug your 9V AC transformer in and use your multimeter to measure its output.
If you're not sure how, put one of your probes into the cylindrical plug, and put the other probe on the metal part of the exterior of the cylindrical plug. The goal is to touch the positive "stinger" inside of the plug with one probe and the ground with the other.
-
Open a Terminal on your Raspberry Pi and edit the file
config.py
in therpi-power-monitor
folder:nano ~/rpi-power-monitor/config.py
-
Locate the
GRID_VOLTAGE
variable. Set it equal to the grid voltage you measured in step 1. -
Locate the
AC_TRANSFORMER_OUTPUT_VOLTAGE
variable. Set it equal to the transformer's output voltage that you measured in step 2. -
Save and close the file with
Ctrl X
, theny
. -
Connect the AC transformer's plug to the input jack on the PCB, then start the software in
terminal
mode:python3 ~/rpi-power-monitor/power-monitor.py terminal
-
Measure your grid voltage again from the wall, and compare it to the value listed for Voltage in the output table.
+---------+---------+-------+-------+-------+-------+--------+ | | CT0 | CT1 | CT2 | CT3 | CT4 | CT5 | +---------+---------+-------+-------+-------+-------+--------+ | Watts | 0.065 | 0.543 | 0.446 | 0.272 | 0.828 | -0.022 | | Current | 0.097 | 0.092 | 0.092 | 0.09 | 0.098 | 0.092 | | P.F. | 0.006 | 0.049 | 0.04 | 0.025 | 0.07 | -0.002 | | Voltage | 120.708 | | | | | | +---------+---------+-------+-------+-------+-------+--------+
-
Divide the actual voltage as measured by your multimeter by the voltage listed in the Terminal output. Example:
Measured A/C Voltage: 123.5 Terminal Output: 120.708 123.5 / 120.708 = 1.02313
-
The answer that you come up with after dividing is simply a scaling factor. Edit
config.py
again, and find theaccuracy_calibration
variable. Update the value for'AC'
with the value that you calculated in step 9. Example:accuracy_calibration = { 'ct0' : 1, 'ct1' : 1, 'ct2' : 1, 'ct3' : 1, 'ct4' : 1, 'ct5' : 1, 'AC' : 1.02313, }
-
Save and close
config.py
. Restart the program in terminal mode, just like you did in step 7. Compare the voltage output again to your multimeter. It should be fairly close, and small fluctuations are normal. If the software's voltage level is consistently reading higher than your multimeter, try reducing the value for'AC'
inconfig.py
slightly, and slightly increase the value if the software is reporting lower than your multimeter. Or, you can simply repeat steps 9 & 10.