The multi slave boards work Ok but as slave numbers increase the available current bypass time decreases due to the increased comms load. I would also like the slaves to retain some autonomous capability beyond the basic fail safe mode they now have.
But in order for the slaves to operate correctly they have to know what is happening with the slave before and after it in the chain. If the loads is on either slave then it interferes with the voltage readings as we discovered.
This problem does not affect the single slave boards on prismatic cells.
So the question is how can we overcome this problem in a more elegant way and allow the slaves to operate the loads without the master having to send all the various commands. Some interslave comms will be reqd so I think we can connect the slave data bus output from the last slave to the input on the first slave. Making a nice closed loop. The Master can also be connected into the input of the first slave to inject commands into the loop. This would probably make the master code a lot simpler.
1) The slaves when first turned on / connected will sit there until the master sends the special start command.
2) Once sent the slaves continue to pass this special command round and round checking cell voltage, operating the load and dumping the cell voltage data on the master bus until another command or a special stop/sleep command is sent by the Master.
The slaves themselves need to turn off the load, measure the voltage, activate the load if reqd and report the cell voltage. The problem is getting them to do that whilst not interfering with each other.
If we start with slave 1 lets imagine when it recieves this special command it executes the following sequence.
1) slave load off
2) send command to next slave (This gives time for cell voltage to stabalise)
5) Pause Xms (This gives time for next slave to turn off it's load)
3) Measure cell voltage
4) Send cell voltage data on master bus
5) Pause Xms (This gives time for next slave to measure it's voltage before this load comes on)
6) Activate load if reqd
Does that make sense? There are lots of possible issues and room for error.