4Springs wrote: I've connected all the cells of my BMS in the car, and I'm having some comms problems. I haven't driven anywhere yet, so it shouldn't be interference from controllers etc.
You are probably picking up your 12V power cables. Check your cables:
1. are you using twisted pair for communication? normal UTP cable is the best since it is already twisted in pairs, is sleeve protected and has enough strands to use for return comm. It is cheap also.
2. DO NOT use cables in the same bunch to transfer comm and 12V!!! I had a lot of headaches when i used one line to power master along comms.
I have one battery pack in the rear and two in the front. It appears that the run from front to back (or more precisely from back to front) is too long for reliable communications between modules.
The Master is in the front (under the bonnet). It transmits to one module in the front, which transmits to the rear battery pack. The data then comes back to the front, and is passed around the front cells before coming back to the Master.
I dont think cable length is important. Quality of cables is more important though, as well as connectors you use. I also use 3m cable in the middle and it is not a problem anymore. As long as i dont rout 12V trough it.
The symptom was that I was getting a lot of high and low cell voltages. I found that I could get the faulty readings to stop by bypassing the rear modules. No faults at all with just the front modules, but if I added just one rear module then there were lots of faults.
I thought that perhaps I could ignore the bad packets of data, if I could tell which ones they were. So today I implemented CRC checking on the packets of data. Each cell does a very simple CRC (just adds up all the bytes), and adds the CRC to the end of the packet. If a received CRC does not match the calculated one, the cell does not pass on that data.
The result is that I no longer get corrupt data, but it also means that very little data gets through!
Yes i tried something like that also. In the end i just set up the exact number of cells in code and master stopped adding cells on its own. Try not to use CRC, since Neville set comms up so they would cycle quickly. Lets try to find problem at the root.
I also found that Arber put a 0.01uF capacitor over the resistor on the output of the optocoupler. Neville suggested this particular value after viewing the waveform on an oscilloscope. I tried this, but it doesn't seem to make much difference.
Make RC filter for master input opto like you saw me. BUT you must use exactly the same optos as per specs. Otherwise you should select the valuse of cap with your scope, since the top of the opto curve will not be smooth enough.
Also there are some things you can try.
You make power filter for your master. 12V can cause trouble. This can be fought in different ways.
1. Use 12V - 12V galvanicaly separated power supply. 3W is enough i think. BUT this means you would have to supply power (also ground plane) to relays from main board!
Here i am thinking for some time to use a 240VAC 12VDC cell phone charger. It is galvanicaly isolated and works from 100V up to 240VAC as well as DC. Usually they supply 750mA and are very cheap.
2. Make or use an LC filter for your 12V power supply. You can buy car audio LC filter....
I also soldered one 0,1uF ceramic SMD cap across 12V input on master. It helped initialy however the best i got was one 0,1uF cap on the R1 of the master opto.
There is one other thing. When do you receive those bad comms? Do you have charger connected? Is your charger grounded to chassis? Check there.
Is your battery - isolated from 12V gnd chassis?
If all else fails, you could use optic omms for the last box. However then i recommend using both in and out lines.
Check here: http://www.rcgroups.com/forums/showthread.php?t=500234