Hi Fred,
It is probably possible to use two can bus controllers (with at least one isolated) and only 1 leonardo but Wijnand and me haven't investigated that route yet. Using 2 leonardo's avoids using multiple devices on the same bus like you suggest (now we use SPI for the canbusses and I2C for the PID value between the 2 leonardo's).
This simplifies the code of each leonardo to a degree that my (still learning) skills can cope with it.
This solutions works perfectly for now.
I myself only use a leonardo on the "bottom" flatpack so when the SOC is below 35% the QUADFP still outputs it's full current.
This is because the upper flatpack outputs 57.6 Volts and the bottom at least 43.6 volts. this is a minimum voltage of 101.2 Volt (arounf 35% SOC)
Wijnand wanted to be able to use his QUADFP on every imaginable socket even on low SOC. With the setup he has now the total voltage can be as low as 87 volts which is way below 0% and therefore the PID controller can control up to every current we can program into the arduino
If you can figure out how to wire up one single leonardo with 2 canbus controllers, please let us know. I can assist in writing code for the arduino or give you hints for the code if you want to do it yourself. Off course if you (or anyone else) wants to know how the code looks like now with the 2 leonardo's (as a starting point), we can share it. no problem. We are here to help one another making the EMC experience better.
Using a CS for the SPI signal sounds good but first we would have the correct hardware components which preferable connect easily to each other. The leonardo board has a lot of spare connections on header pins, including the SPI connections.
Please share your thoughts/solution on how to connect up the second canbus controller to the leonardo. I would love to hear.
Gr Remco