Skip to content

Voltage Tuning

David edited this page Dec 5, 2022 · 8 revisions

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.


Voltage Specification

  1. 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.

  2. Plug your 9V AC transformer in and use your multimeter to measure its output.

    If you're not sure how, set your multimeter to "AC Voltage" mode, 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.

  3. Open a Terminal on your Raspberry Pi and edit the file config.py in the rpi-power-monitor folder:

     nano ~/rpi_power_monitor/rpi_power_monitor/config.py
    
  4. Locate the GRID_VOLTAGE variable. Set it equal to the grid voltage you measured in step 1.

  5. Locate the AC_TRANSFORMER_OUTPUT_VOLTAGE variable. Set it equal to the transformer's output voltage that you measured in step 2.

  6. Save and close the file with Ctrl X, then y.

  7. Update the rpi_power_monitor module with the changes you just applied:

     cd ~/rpi_power_monitor
     pip install .
    
  8. Connect the AC transformer's plug to the input jack on the PCB, then start the software in terminal mode:

     python3 ~/rpi_power_monitor/rpi_power_monitor/power_monitor.py terminal
    
  9. Measure your grid voltage again from the wall, and compare it to the value listed for Voltage in the output table.

     +---------+---------+-------+-------+-------+-------+--------+
     |         |   CT1   |  CT2  |  CT3  |  CT4  |  CT5  |  CT6   |
     +---------+---------+-------+-------+-------+-------+--------+
     |  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 |       |       |       |       |        |
     +---------+---------+-------+-------+-------+-------+--------+
    
  10. 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
    
  11. The answer that you come up with after dividing is simply a scaling factor. Edit config.py again, and find the accuracy_calibration variable. Update the value for 'AC' with the value that you calculated in step 9. Example:

    accuracy_calibration = {
        'ct1' : 1,
        'ct2' : 1,
        'ct3' : 1,
        'ct4' : 1,
        'ct5' : 1,
        'ct6' : 1,
        'AC'  : 1.02313,
    }
    
  12. Save and close config.py. Repeat step 7 to update the module's configuration, and then restart the program in terminal mode, just like you did in step 8. 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' in config.py slightly, and slightly increase the value if the software is reporting lower than your multimeter.

    Or, you can simply repeat steps 9, 10 & 11.

  13. When you're satisfied with the voltage measurement, you'll need to run the following command to update the installed rpi_power_monitor module settings.

    cd ~/rpi_power_monitor
    pip install .