I have added code to implement 2 independent PID controllers, 1 for each set of flatpacks. Unfortunately that cannot work. This is because the message to control the output current and voltage is a broadcast to all connected flatpacks. a message to a single flatpack does not work. The flatpacks are usually only connected in parallel (not in series) so this makes sort of sense for their intended purpose.
I chose to see what would happen if i just use a single PID controller which would control the current of one of the two sets and see what the other set would do.
The very good news is that the second set of flatpacks very closely follows the current of the first (controlled) set of flatpacks. It is at most about 0,5 to 1 amp less and often exactly the same.
This obviously saves a PID controller or even a completely new arduino. For the above to work it is very important that the 2 "top" flatpacks are set to the same voltage, otherwise this doesn't work properly. The 2 "top" flatpacks are not monitored and are set to 57.0 Volts with a short walkin (after powerup the unit reaches this 57.0 volt in about 5 seconds).
Tried the PID version with my two flatpacks yesterday, indeed it's working absolutely great. I'll use it to differ in between 1-phase charging (max. 3kW) and 3-phase charging with full power. Started at about 30% SOC, maintained 20A like a charm. Thanks for your work remmie! Just one thing about the code extracted from the forum: it contains some weird signs, which are not visible in the IDE but result in compiling errors, you can see them in Word if you copy the code in there. Cleaned in manually then. Should we put up a GitHub repository to improve this and manage different code versions? If you're ok with that, I would open one.
One question concerning the non-monitored top flatpacks. Can the walk in period be set permanently? For permanent setting, I always used this code so far:
unsigned char setVpermanent[5] = {0x29, 0x15, 0x00, 0x44, 0x16};
CAN.sendMsgBuf(0x05019C00, 1, 5, setVpermanent)
So where's the option which determines the walk-in period?