wjdennis wrote: 1) I notice you started with a single decoupling capacitor, but you then increased to 2 in parallel, and now 3 in parallel. Why three separate capacitors?
I added the extra capacitors to minimise any noise/supply/spike issues, also the Slave pcb's have a big ground plane to help prevent noise interference. An EV is a nightmare electrical noise environment so I wanted to be safer. Of course it may still not work and I may need to add inductors/filters etc to further reduce noise in the real world. None of this has been tested in my Honda Insight Yet
wjdennis wrote: 2) I'm just wondering about the timing of the serial communications. The Slave In bus is used in two different ways: first as an on/off signal, and then immediately afterward as a serial bus. There's no hardware or software handshaking. Both slave and master have dual 10ms delays. When the Slave In pin goes high, the Slave could be anywhere in the Main routine from the very top still having to go through its 10 ADC reads), to the statement that checks the pin. So what insures that the master won't start sending its data before the slave is ready?
That's why the delay is adjustable in the software so I can set the delay to cope with the speed of loop execution and the real world execution speed of the software. It's not set in stone and almost certainly will need adjusting when I have tested how long the loop you mention takes to execute.
I might add a real interrupt back into the Slave code which will sort that issue, but have to be very careful about the data it then sends to the Master as it can jump out of that main loop at any point and send invalid data. That's why I removed the interrupt earlier in the Slave software development. It does seem sensible to put it back in now in the light of the below and the potential timing issue
What I might do is store the previous value for the Cell V so that the next time through the 10 x adc loop if it's interupted it send the previous value so we know that's good data. It's all a work in progress at the moment.
wjdennis wrote: Have you considered adding a temperature sensor to the Slave Board? It seems like you could either change J1 to a 4-pin connector, or put another connector in parallel with J1 into the RXD pin. Then you could read the input from a DS18B20, for example, to get the temperature of each cell and transmit it to the master along with the voltage.
Yes I did consider this but it depends very much on where you mount this on the slave board or all you do is get 50 readings of the ambient temp next to the cell. It would have to be fastened to one of the terminals really or ideally burrowed into the cell body itself somehow. The Master can read from many DS18B20 temp sensors in parallel using the I2C bus so that's why I put it on the Master board, of course I haven't written any of that code yet
it just reads ones DS18b20 at the moment on the TEMP SENSOR INPUT. Regarding J1, the DS18B20 needs a 4k7 pull up so that would interfere with the programming input on the Slave board unless a jumper/switch was fitted. I don't think you can use RXD pin as a standard input either on the PIcaxe.