Ev lithium battery pack cell monitor

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Ev lithium battery pack cell monitor

Post by billduck »

A friend is designing individual pc boards that measure each of 56 Lithium cell voltages. The data is transmitted to one of the input pins of an arduino. The data will be sent over and over, and the pin for the particular cell will be looked at. The question is "How can I capture the a/d #, 10 bit. Several approaches: 1. Have a large time delay before a packet of data. 2. Maybe send 0-1-0-1-0 but with fast cycle times compared to the cycle time of the actual data. 3. ??
Thanks in advance.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Ev lithium battery pack cell monitor

Post by Benj »

Hello,

It sounds like you are trying to send digital readings to an analogue pin. This probably isn't going to work too well. A PWM type signal and a RC filter might work but probably won't be deadly accurate.

You either need to take all your analogue signals and multiplex them into an ADC pin using an external analogue multiplex IC.

Or you can sample each battery with it's own microcontroller and then use a bus to transfer the data to a master unit. I2C would work quite well to connect all the devices together. If the environment is noisy then maybe upgrade from I2C to RS485 or CAN.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Ev lithium battery pack cell monitor

Post by Steve001 »

Hi Billduck,

maybe you could have a go with this

steve

Edit :-

There is also this

http://www.linear.com/product/LTC6803-1
Attachments
battery monitor front end CN0253.pdf
(128.63 KiB) Downloaded 195 times
Success always occurs in private and failure in full view.

billduck
Posts: 159
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: Ev lithium battery pack cell monitor

Post by billduck »

I want to clarify the problem. A data stream - say 110110001 is going to be sent, over and over, to one of the pins of an arduino from a PIC10F320, imbedded in a battery pack,1 for each of 56 Lithium cells. So the challenge is to know when the data stream starts and ends. One method is to interject a 1 after any "00". So the data stream becomes 1101100-1-01. However, the data stream sent is preceded with 000, indicating the beginning of the data stream. So the stream becomes "0001101100101" The 1st 3 zeros show the beginning of the battery voltage, and whenever "00" is seen, the next "1" needs to be discarded.
The problem is easy enough too state, but I am looking for guidance for coding it.
Thanks in advance, from an ex-non-programmer.

Sorry, I had not checked the "Notify me when a reply is posted", so I did not know replies had been sent to earlier posts.

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

Re: Ev lithium battery pack cell monitor

Post by hyperion007 »

You should implement some sort if addressing scheme for each cell in order for you to know which cell is actually sending the data.

Also, you say you will monitor one pin and read the bit stream, but no mentioning of a clock pin, so how will you know that it's three 0's and not just one long one?

If you do have a clock pin as well, then you could count the number of bits to determine the start of each cell data. If the start is always three 0's followed by 8 bits of data, then capture 11 bits, check if there are three 0's at the start, if yes, then discard the three 0's and read the remaining 8 bits. I think you should find a different start sequence though as there could be a lot of scenarios where there would be three 0's in the middle of a data byte.

Post Reply