Skip to content

Bug in def shuntvoltage #2

Open
@jean-claudeF

Description

@jean-claudeF

I discovered a bug in the library:

@property
    def shunt_voltage(self):
        """The shunt voltage (between V+ and V-) in Volts (so +-.327V)"""    # no, +-80mV!
        value = _to_signed(self._read_register(_REG_SHUNTVOLTAGE))
        # The least signficant bit is 10uV which is 0.00001 volts
        # NO!! It is 2.5uV
        # return value * 0.00001
        return value * 0.0000025

Chris defined the shunt voltage LSB as 10uV, but the datasheet says 2.5uV (page 24)
Unfortunately my results are still wrong after this correction (by a factor 5 for current and power)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions