Skip to content

Numerous issues with LTC681x Open wire algorithm #59

@gudnimg

Description

@gudnimg

I've been trying to get Open Wire check to work on the DC2259A (LTC6811) Evalution board for quite some time but it never works. So I've had to go into the code and understand each line so that I might prove that the problem is not with the code. I have found many issues and inconsistencies with the datasheet and would like to share what I've found.

Here is a post I made a year ago: https://ez.analog.com/power/f/q-a/120413/ltc6811-dc2259a-open-wire-check-not-working-with-resistors this problem is still around and I haven't found a solution.

Below are some issues I see:

  • Why does the Open wire check for cell voltages use 400mV but GPIO open wire check uses 15mV? There is no mention of this in the datasheet. Where does the "-400mV" stated in the datasheet come from?
  • There is no check for a PEC mismatch when reading the cell voltages.
  • In LTC681x_run_openwire_single the pull-up value is used to check for an open wire for the last cell when we should be using the pull-down measurement.
  • In LTC681x_run_openwire_single this check pullDwn[cic][cell] < pullUp[cic][cell] shouldn't be needed. Otherwise the datasheet should mention it.
  • In LTC681x_run_openwire_single this check openWire_delta[cic][cell]>OPENWIRE_THRESHOLD is incorrect. The threshold is also set incorrectly. This should be openWire_delta[cic][cell] < -4000
  • In LTC681x_run_openwire_single the variable conv_time is never used.
  • openWire_delta is calcuated for Cell 1 when it should only be for Cell 2 to 11. Simple fix is to change for-loop start from 0 to 1.

Numerous issues arise when looking at LTC681x_run_openwire_multi compared to LTC681x_run_openwire_single. The functions are very different when they don't need to be. Some issues above are also present in LTC681x_run_openwire_multi.

  • In LTC681x_run_openwire_multi the variable openWire_delta is uint16_t instead of int16_t so basically negative values are ignored.
  • Removing repetitive elements and sorting array elements is not needed. It is much simpler to have each index of opencells represent cell index and only take value 0 or 1. Where 1 indicates open wire.
  • For Cell 1 pull-down value is incorrectly used if (pullDwn[cic][0] == 0) when the pull-up value should be used according to the datasheets.

This code doesn't do anything useful:

if (pullDwn[cic][N_CHANNELS-2] == 0)
{  
    opencells[n] = N_CHANNELS-1;
    n++;
}

Also the code below in LTC681x_run_openwire_multi does not follow the datasheet algorithm so I'm assuming it's not correct.

if (openWire_delta[cic][cell]>OPENWIRE_THRESHOLD)
{
	opencells[n] = cell+1;
	n++;
        // Is the code below this comment really needed?
	for (int j = cell; j < N_CHANNELS-3 ; j++)                       
	{
		if (pullUp[cic][j + 2] == 0)
		{
			opencells[n] = j+2;
			n++;
		}
	}
	if((cell==N_CHANNELS-4) && (pullDwn[cic][N_CHANNELS-3] == 0))
	{
		opencells[n] = N_CHANNELS-2;
		n++;
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions