Import
Methods
| Method | Hardware | Description |
|---|---|---|
read() | All | Read power in watts |
read_current() | Joulescope JS220, Nordic PPK2 | Read current in amps |
read_voltage() | Joulescope JS220, Nordic PPK2 | Read voltage in volts |
read_all() | Joulescope JS220, Nordic PPK2 | Read current, voltage, and power in a single operation |
Method Reference
Net.get(name, type=NetType.WattMeter)
Get a watt meter net by name.
| Parameter | Type | Description |
|---|---|---|
name | str | Name of the watt meter net |
type | NetType | Must be NetType.WattMeter |
read()
Read the current power consumption. Available on all watt meter hardware.
float - Power in watts
read_current()
Read the current in amps. Joulescope JS220 and Nordic PPK2.
float - Current in amps
read_voltage()
Read the voltage in volts. Joulescope JS220 and Nordic PPK2.
float - Voltage in volts
read_all()
Read current, voltage, and power in a single atomic measurement. Joulescope JS220 and Nordic PPK2. This is more efficient than calling read_current(), read_voltage(), and read() separately, as all values come from the same sample window.
dict with keys:
| Key | Type | Description |
|---|---|---|
"current" | float | Current in amps |
"voltage" | float | Voltage in volts |
"power" | float | Power in watts |
Examples
Basic Power Reading
Joulescope Full Measurement
Power Profiling
Battery Life Estimation
Power Limit Verification
Sleep Current Verification (Joulescope)
Supported Hardware
| Manufacturer | Model | Measurement | Features |
|---|---|---|---|
| Yoctopuce | Yocto-Watt | Power only | Instantaneous reading |
| Joulescope | JS220 | Power, voltage, current | 0.1s averaged, atomic multi-measurement |
| Nordic Semiconductor | PPK2 | Power, voltage, current | 0.3s averaged, source mode constant voltage |
Hardware Feature Comparison
| Feature | Yocto-Watt | Joulescope JS220 | Nordic PPK2 |
|---|---|---|---|
read() (power) | Yes | Yes | Yes |
read_current() | No | Yes | Yes |
read_voltage() | No | Yes | Yes |
read_all() | No | Yes | Yes |
| Measurement method | Instantaneous | 0.1s averaged | 0.3s averaged |
| Device selection | Channel-based | Serial number-based | Serial number-based |
Notes
- Power is returned in watts (W)
- Joulescope JS220 averages measurements over 0.1 seconds for higher precision
- Nordic PPK2 averages measurements over 0.3 seconds; operates in source mode (supplies a configurable voltage 0.8–5V), so voltage readings reflect the configured value, not an independent measurement
read_current(),read_voltage(), andread_all()are available on the Joulescope JS220 and Nordic PPK2; calling them on a Yocto-Watt will raise an error- For current on Yocto-Watt: calculate from power and known voltage (I = P / V)
- Use multiple readings and averaging for stability
- Allow settling time after device state changes

