With the help of TSP scripts and low-resistance current sensing resistors, we have realized an interesting application, which is to use a digital multimeter like DMM6500 to measure power through the ratio function. The script is based on the principle that the ratio function stores the voltage measurement data of the sensing and input voltage in one reading, and then displays the ratio of the input voltage to the sensing voltage.
The ratio function compares the voltage on the input terminal with the voltage on the sensing terminal, and outputs their quotient, which is the input voltage divided by the sensing voltage. Since this measurement encodes two separate voltage readings, there are a few things that are fun to use with the TSP script.
For example, in the following application, the ratio function places an external low-resistance shunt resistor between the sensing terminals to measure power. This means that you can use the voltage on the sensing terminal and input to measure current. With these two values, you can calculate the energy consumption of any section of a given Circuit.
![WeChat screenshot_20210907151228.png [Technical master test notes series]5: Use Keithley DMM’s ratio function to measure power](https://buyigbt.com/wp-content/uploads/2021/12/20211205_61ac4ab0e534d.png)
But before that, you must first decode the ratio measurement and extract the voltage and current readings. The voltage on the sensing terminal is stored in the “Extra Value” field of the “Full” style buffer, which is used to store readings (in this case called readingBuffer). Then multiply the ratio reading by the corresponding sensor voltage reading to get the voltage on the input terminal.
After storing the two voltages, the measured value of the sensed voltage can be divided by the value of the parallel resistor to get the current. Finally, after obtaining the current and voltage at a given point in time, multiply the two, and the product is the energy consumption. The power reading can be output to the active writable buffer (powerBuffer) and displayed on the screen. This may seem a bit complicated, but in fact it only takes a few lines of code to get it done, as shown in the following figure:
![WeChat screenshot_20210907151250.png [Technical master test notes series]5: Use Keithley DMM’s ratio function to measure power](https://buyigbt.com/wp-content/uploads/2021/12/20211205_61ac4ab1d6436.png)
This script is suitable for any Keithley DMM that supports TSP.