my first big project - BMS - is it possible?

ok! thanks for all the replies, greatly appreciated!

I don't fully understand everything, but it seems like you all agree that a method of multiplexing is the best solution.
seems like a good idea to me.
Let's see if I understand this:

Instead of reading all cells at the same time, I would connect every cell briefly to the Arduino by switching 102 relays with a separate IC?

something like this?

@ Greynomad, I don't mind buying a lot of relays (they're cheap enough), but I don't have a LOT of space in the Vectrix. Worries for later though..
@ CrossRoads, indeed :slight_smile:
@ Magician, I know there are ready-available BMS systems, but this one, I'd like to learn and understand instead..

If I've got this correctly you will have to switch both the analogue input and the GND. Note how your drawing has GND going to one battery, what happens for the others? So you need double-pole relays.

Also the Arduino has to be powered from a power supply that is isolated from these batteries.

Another thing to think of is when do you read these voltages. If you are going to compare readings against each other or indeed any other data you have to have a known and constant load. Meaning that I think you can't really take a reading while driving as the load will vary a lot I would think.


Rob

@Rob

Good point

If the cells are being read out in a short amount of time (a few milliseconds) there shouldn't be a problem I guess.
If the BMS gives me a warning while I'm accelerating or braking (regenerating) I could guess there might be another reason than actual imbalance.
I guess It would be quite reliable when cruising at a more or less fixed speed (even at top speed = limited to 110kph).
I can also choose/adapt the tolerance for the difference between voltages.
I could also program the arduino to give a secondary alarm if the voltage of one cell drops below a safe point.

An external power supply shouldn't be a problem (I also have a 12V circuit in the Vectrix).
I'd make the circuit so I can put it on when I want (not all the time)

This is the system I was discussing.
The MAX6921 might be used, or the other demux chips discussed above.
Note how each battery is connected to nothing until a relay is closed.
A change is needed in the the Gnd for the battery WOULD NOT the GND for the Arduino, demux, & relay coils.
The two would be isolated so that the measuring electronics only connect to the battery under measurement +/- terminals.

I'm reluctant to be negative towards the relay idea because I don't have a better one to replace it, but how much room is 102 relays going to take up? I mean if it was a car, then yeah just stick it in the boot, but it's a scooter, and there isn't much storage room on a bike...

Scooter?!? What the ... Okay, I never opened that link, thought we talking a car.
Anyway, whole thing could fit on three 80mmx80mm PCBs, so not too big.

In a link, I posted above, data sheet for MAX11068. I didn't look myself earlier, 82 pages...., yet now I get curious and open it. It took a moment to find out on page 10 all analog front end in full details, plus a lot of useful information.
Instead of electromechanical relay - MOSFET multiplexer. The same company produce a chips, high voltage mux, MAX378/379.

It's not 150V, but could be other producers/manufacturers. Or just one ! electromechanical relay to switch a half battery.

It never hurt to study/research first what is already exist on a market, instead of inventing a bike. :slight_smile:

A Mux doesn't give you the detailed voltage needed for ech battery.
You need contacts across each battery with ground isolated from the string of battery ground so that the arduino 5V input limit is not exceeded.

Yes, I understand.
There is quote :

The MAX378 8-channel single-ended (1-of-8) multiplexer
and the MAX379 4-channel differential (2-of-8) multiplexer

Looks like this "differential" is a key, one channel - input, another - commutate a ground. It's all shown on page 10.
Exactly like you try to design it.
And I just dig up one create on their web site: MAX4800, 8x - 200V switch.

I had some reading to do to understand what you guys are talking about :slight_smile:

Crossroads; I understand your scematic, and it makes sense to me.

From what I understand from the rest, I derive that the other chips wouldn't need the relays, because they switch like a transistor (or Mosfet?). correct?

The part I don't understand, is the high voltage issue; I thought, though they are in series, if every cell is connected (with both poles) separately (like measuring them one after another with a voltmeter) the maximum voltage involved should be 1,4 V -or- the voltage of one cell?
Or am I wrong when I assume that? Or missing something?

sorry if my questions seem stupid.. I'm learing a lot here.

Turok

High voltage: With the relays, yes, each relay would only have its batteries voltage only, thus no high voltage. The arduino and its relay coil controls and relay select logic will have its ground at the -terminal of the battery being measured.

I am not convinced the mux will work. You will need a series of the chips. They will all need a common Ground, which will connect to the arduino ground, for the arduino to be able to control them. Then once you get past battery 3, you have a higher voltage on the battery (5.6 on battery 4) than the arduino can read.

To handle the higher voltages as go you higher up in battery voltage (with respect to the mux ground), you will need higher power supply voltages (and the spec seemed to show you need both a very +supply and a very low -supply:
"The MAX4800/MAX4801/MAX4802 allow a peak-to peak analog signal range from VNN + 10V to VPP - 10V."

For batteries 1-8, you will have 11.2V.
Then 9-16 will have 22.4.
17-23, 33.6
24-31, 44.8
32-39, 56
40-47, 67.2
48-55, 78.4
56-63, 89.6
64-71, 90.8
72-79. 102
80-87, 113.2
88-95, 124.4
96-103, 135.6

(should be 142.8, missed a couple tenths somewhere).

so VNN must be at least -10V and VBB must be > 152.8V, with respect to battery system ground.

edited: read next posts O'K, you are right. I didn't notice that analog +-10V limits, been happy to see +200V max voltage.
And also couldn't find any multiplexer, that operate higher than 80V. It's strange. :~
The only couple "improvements" I'd suggest, it replace electromechanical relay on solid state, that will minimize space and increase speed of the "homemade" mux front-end.
And second, opto-isolate analog input of the arduino, so processor or "core" would be on ground safe level, capable do other stuff - monitor some additional sensors, display info on LCD and take some commands from control panel or serial link. In order to do it, build a "floating" board, that would include own dc/dc convertor and analog opto-coupler that shown on:
http://ruggedcircuits.com/html/circuit__24.html
or
http://www.vishay.com/docs/83708/appn50.pdf

There is a SSR:

Is there are double version of an SSR? Otherwise you are replacing a 10-pin device with the equivalent of a 12-pin device, and I am not sure 2 of these would fit next to each other in a 12-pin socket even. 2 parts would be 17.4mm long.
I think the parts I suggested originally were 9mmx14mm,126mm^2, vs 132.5mm^2 for 2 SS relays.

turok, what are you thinking in terms of other sensors, a display etc?

You suggested Panasonic, it's only for:

110 V DC, 125 V AC

From Farnell link that I posted in Reply #7, the only relay I posted:

Coil Voltage VDC Nom:5V
Contact Current Max:2A <<< 2A
Contact Voltage AC Nom:125V
Contact Voltage DC Nom:30V <<< 30V DC
Coil Resistance:250ohm
Contact Configuration:DPDT
Coil Type:DC, Sensitive
Coil Current:20mA
Nom Operating Power:70mW
Relay Mounting:PCB
External Height:5.4mm
External Width:14mm <<< 14 mm long
External Depth:9mm <<< 9mm wide

The LH1513 relays are DPST normally open switches
(2 form A) that can replace electromechanical relays in many
applications

And price only $2.79*

edited:
compare to

Prijs per Eenheid: 3,59 €

Yeah, okay, those might work well.

But check the Farnell price for Belgium!

5,14 Euros for Qty 100+

compared to 3.59 Euros for Qty 1 relay.

Now, since this is for a motorbike/scooter, the SSR might make much better sense.
Why not keep searching, see if some other more reasonably priced alternative can be found.

It's for OP to look in details, I just satisfy my curiosity :slight_smile:
BTW, MAX4800 will works, I get confused with analog voltage, but when I re-check again:

Analog Switch
The devices allow a peak-to-peak analog-signal range
from VNN + 10V to VPP - 10V. Analog switch inputs
must be unconnected, or satisfy V NN ? (V COM_ ,
VNO_) ? VPP during power-up and power-down.

It's mean if we set VNN to -10, and VPP to 190V

The V PP and V NN high-voltage supplies are not
required to be symmetrical, but the voltage difference
VPP - VNN must not exceed 200V.

Analog switching range would be 0 - 180 V.

I don't think MAX4800 will work - as I said earlier, its Gnd must be at Arduino Gnd for channel selection controls to work - and then you will have >5V coming out of the mux going to the Arduinio, which will smoke the arduino.
Not to mention extra components to create <=10V and >=152.8V from wherever.

Of course, it will works only with "floating" opto-analog boards, that I mention as second improvement somewhere earlier.
Advantage to go for this switch is high timing performance, I really impressed by 107 us check-up time for 12 cell battery by MAX11068, = 9 us per cell !
It capable get dynamic cells data, when battery extra loaded by starter motor and internal resistance of cell show up in bright light on stage.