PECMAC command 2 inconsistent return value

I have a couple of PECMAC 4-channel, 50A off-board ammeter boards equipped with Particle controllers (one with Argon, one with Boron).
In that configuration, sending command 2 to the PECMAC returns the correct value for board identification [0x04 0x32 0x04 0x01 0x00 0x00].

However, when I connect several minimodules using nodeLynk, command 2 returns [0x02 0xff 0xff 0xff 0xff 0xff]. This happens even with very slow bus speeds (10,000) and with delays set to a value between 0 and 1000 ms between writing the I2C command and reading from the I2C bus (I have tried many delay value and bus speed combinations).

Even so, all the commands for the other minimodules work fine, and using command 1 to read amperage from the PECMAC also works fine. None of the connected minimodules have the same I2C address.

Also, this problem does not occur on a very similar set-up with a Photon controller (but I haven’t been able to test the Photon in the identical setup.)

This isn’t a show-stopper, as I’m only using 4-channel boards so can just hard-code the channel count, but it worries me that there might be other problems in the data which are not so obvious.

Hi,

Can you provide a photo of your hardware setup?


Not a great picture, I’m afraid. Of 4 units set up so far, 3 (two w/Argon, 1 w/Boron) show the problematic behaviour, but the remaining 1 w/Argon does not. All are running the same user firmware.
There are two shielded 4-conductor cables carrying the nodeLynk bus offboard to a distance of 12’ max.
At the end of those cables are ADXL343 boards that work fine.

connect the battery to boron and give it a go.

I will try install the I2C pull-up resistor jumpers on the two cross-over minimodules from which I’m running the long I2C cables to see whether that helps, because maybe it’s demanding too much from the PECMAC to pull up that extended bus. (The unit without the problem has somewhat shorter I2C cables.)

Installing I2C pull-up resistor jumpers on the cross-over minimodules worked – the PECMAC is now reporting the correct value for board identification!