I am working on a BMS that uses SPI to communicate. I am designing the boards to flexible so that they can be connected together to large stacks of batteries. I want to isolate the BMS stuff from the microcontroller stuff, to this end I am using the ISO7421 by TI.
The other issue is that I am not sure that the boards will be very close together. I anticipate that the communication lines will need to travel up to 1ft between boards. To mitigate this I want to use the SN74AHCT125 Bus Buffer to drive the SPI lines before the communication lines go off board.
Here is my issue, I need a way to connect the buses together after the bus buffer and the optoisolators (see the picture). The SPI_OUT lines are the lines to the next board up, the SPI_IN lines are from the next board down, and the SDI, SDO, CSBI and SCLK lines are for the BMS chip on the current board. I don't think I can just connect the two outputs together the way I have it because the MISO line idles high, I would need something between them so that they don't short when there is a different signal. The solution that occurs to me is to use an AND gate. That way when one of the two MISO line idles high and the other one goes low there won't be a problem, but I am worried that this will slow down the system and cause problems.
What are peoples thoughts on this? Am I making this too complicated or is this a legitimate problem? If it is a problem will my solution work or is there a better way?
Thanks