Analog MUX using discrete MOSFETs for flying capacitor cell measurement BMS

My latest project is a battery management system (BMS) that can accurately measure cells in a lithium battery pack, and also perform shunt balancing and possibly charge shuttling to balance the pack. I would also like to be able to use it for a pack of four 12V SLA batteries. A DG408 could be used to select up to 8 cell voltage taps from nominal 3.2V (LiFePO4) or 3.7V (Li-Ion), with a maximum voltage of 8 * 4.2 or 33.6V, which is within the maximum voltage of 40V for the DG408. But the voltage would need a 12:1 voltage divider to read using a PIC with a 3V power supply (from the bottom cell), and this renders the precision of the 10 bit ADC to 33.6/1024=0.032V, which is really not accurate enough for lithium cell monitoring.

I did a preliminary design using a DG409 which can read any one of four cells differentially, or two DG408s for 8 cells. The outputs can be fed to a "flying capacitor", which will hold a voltage sample taken from a cell, and then a pair of MOSFETs can translate that charge to ground level so the ADC can read it using the full range allowed by the reference.

Another method, used by some BMS chips, utilizes a high CMRR differential amplifier to translate the samples to the ADC.

It is also desired to implement shunt charge balancing, where selected cells that have a higher voltage can be discharged to match lower cells in the pack. This is wasteful, but is a commonly used method, and can be done with MOSFETs and resistors.

It is also possible to use charge shuttling, where the flying capacitor can be connected to lower voltage cells so that its charge adds to that of the low cell. But this requires a fairly large capacitor and a low resistance MUX. The DG408/9 have about 50 ohms per element, so that severely limits the practicality of such charge shuttling.

So, I endeavored to design a multiplexer using discrete MOSFETs. My first attempt used MOSFET opto-isolators, but they are somewhat costly and use a fair amount of current for the LED. Then I tried several designs using discrete MOSFETs, and it looks to be successful, although it's a bit complex. Here is the LTSpice file for a simulation:

formatting link

Here is an image of a complete schematic (as it stands now):

formatting link

And a PDF that may be easier to view:

formatting link

I think this should work pretty well, and the discrete MOSFETs should be able to carry at least 100 mA to perform shunt balancing. A larger sampling capacitor might be able to provide charge shuttling. The circuit seems pretty efficient and should work on cell voltages of 2.5 to 4.5 volts, and

12V nominal batteries.

If anyone has a schematic for the DG408 or similar analog MUX, I'd appreciate a link to the design. What I found from searching turned up NMOS and PMOS devices in anti-parallel, which won't work because of the body diodes. In series should work, but providing the correct gate voltages is a challenge.

Reply to
P E Schoen
Loading thread data ...

On a sunny day (Fri, 10 Nov 2017 04:04:51 -0500) it happened "P E Schoen" wrote in :

My idea is n small switchers with each one PIC and 1 MOSFET, so 1 for each cell, isolated. and fed from a 1 turn on a big transformer driven by 2 MOSFETS push pull oscillator Big charge currents no problem. Avoids disspiating power in parallel MOSFETS, no heat. Usenet patent. When mass produced the small PCBs are possibly cheaper. And greener.

Reply to
Jan Panteltje

Since 4-pin MOSFETs are nearly unavailable (not completely extinct, but, I'm not aware of any over 6V), you have to replace them with back-to-back MOSFETs, and a suitable drive arrangement. In short -- trace out the body diodes in your circuit.

This is a good application for photoMOS relays:

formatting link
PhotoFET optos also come to mind,
formatting link

Tim

-- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website:

formatting link

Reply to
Tim Williams

That's awfully complex.

Why not just slam the mosfet gates from some open-drain things, to ground?

Opto-ssrs would sure be easy.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

The PMOS devices are pulled to ground, with gate protection for when the pack voltage is greater than the rated 20V. They are used for the voltages that are above GND, but they don't work for the ground voltage. Of course, that is not really needed. The low voltage taps, including GND, are read with NMOS devices, gates pulled high.

They were considered previously. Here is a design using TLP222, which are about $1 each, and have 2 ohms ON resistance and can handle 500 mA. The TLP175 is rated for 100 mA, has a trigger current of 1 mA, and is about $0.60 each. Here is my design using that topology (yes, much simpler):

formatting link

And a design using a DG408 for 8 channels:

formatting link

For that design, I was going to use an RC circuit and a comparator for each of the cell voltages to GND. The voltage would be determined by the charge time on the capacitor, which can be measured to 16 bits. An additional DG408 would allow 8 channels of differential measurement, and a high CMRR differential amplifier could provide GND reference for the ADC. A DG409 would provide 4 channels. The flying capacitor topology could be implemented as well.

Paul

Reply to
P E Schoen

I have considered that approach, but it only works for channels more than about 2 volts below the supply rail or above GND.

Yes, I have considered the TLP179 and the TLP222 for lower ON resistance and higher current. They are about $0.69 and $0.96 each in 100 piece quantity. That may be the easiest.

I have used them in the past. They are rather expensive.

Tim

-- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website:

formatting link

Reply to
P E Schoen

I have also considered such a design. Small PICs are like 50 cents each. But the problem is with communication of the cell voltages to a master processor for display and control. It is possible (and has been done) to daisy-chain multiple units with communication up and down the chain, but that involves opto-isolators or MOSFETs which increases complexity and cost.

There is a long-running thread in the DIYelectricCar forum where various topologies are being discussed. The most recent discussion starts about here and on following pages:

formatting link

Paul

Reply to
P E Schoen

You can use one section of a cheap quad opamp open-loop as a r-r gate driver. Add a series resistor and use a protected-gate mosfet maybe.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

That might be a good idea. I found a TSM104 quad op-amp that can drive to GND and within 2V of supply rail (30V max). It also has a programmable precision reference, and costs less than 50 cents in 100 piece quantity.

formatting link

The outputs could provide sink voltage to each of four PMOS devices, which can be used to sample the high sides of four cells as well as the low sides of three top cells. It isn't necessary to sample the low side of the bottom cell, which is GND. The spare amplifier can be used to turn on the gates of another pair of PMOS devices to get the high and low sides of the flying capacitor. That looks to be a good solution for up to eight LiFePO4 cells (3.75V each), or six Li-Ion cells (up to 5V each). Perhaps each op-amp could be used for a pair of PMOS devices, so one quad device can suffice.

It seems I may have over-complicated this design, but it still may be useful for higher voltage battery packs of 12V each, although the MOSFET opto-isolators may be best for that.

Thanks,

Paul

Reply to
P E Schoen

It seems that there is a problem using all PMOS devices. When one pair is sampling one of the higher cells, the turned-off PMOS devices on the lower cells will conduct through the body diodes. My original design using both PMOS and NMOS for each pair might be OK. Otherwise, maybe a series-connected PMOS and NMOS with high and low gate drives may work, although perhaps not for the top voltage. That might require a single PMOS device.

Here is a simulation showing the problem:

formatting link

formatting link

The DG408/9 and the opto-isolators and the differential amplifier are beginning to look much better.

Paul

Reply to
P E Schoen

As far as monitoring is concerned, a PNP transistor with emitter resistor to a cell (+), and base that connects (through resistor) to cell (-) will give collector current according to cell voltage. Just monitor the temperature of the thermal enclosure around your transistors... For balancing, could you just use an optoisolator to steal some charge current from the strongest cells? One isolator and one transistor per cell is cheap.

Reply to
whit3rd

On a sunny day (Fri, 10 Nov 2017 15:51:51 -0500) it happened "P E Schoen" wrote in :

Yes, for fun give each small PIC board a photo-diode and IR LED and a fixed serial address

8 bits data, bit 9 set is address mode, old proved system. Case should be light proof. Master PIC (also opto and IR LED) addresses each slave board in turn and gets reply, can set parameters and read voltages and currents. :-)

Using optos is safer :-)

There are many ways. But serial commienukeation is easy.

Yes, it all depends on the power levels and voltages too for course. Low speed optocouplers are not that expensive anymore either:

formatting link

50 for 1$51 free shipping
Reply to
Jan Panteltje

A lot of resistors and zener diodes in your circuit :)

Your PMOS symbol for Q8 (and possibly others) is wrong, for a pmos device the substrate arrow points away from the channel so opposite to an nmos device where arrow points into the channel. Think of the arrow as being another way of indicating the intrinsic substrate D-S diode.

Here is my sketch of some universal bidrectional switches using inverse series nmos devices :-

In your BMS application the logicside world actually has a galvanic connection to the batteryside world so the (B) circuit may be of more interest and since the flying capacitor is very large compared to the HF coupling capacitors measurement errors should not be a worry.

Battery state of charge tends not to change rapidly so why not slow right down to just a few samples per minute and use real relays? Relays are cheap, robust against misuse and come with multiple poles or changeover contacts at minimal extra cost.

piglet

Reply to
piglet

Is the wiring around R26 - R34 correct, looks like you have a continuous

30uA drain on the battery?

piglet

Reply to
piglet

That is probably an artifact of the screen-shot of the PDF. The symbols are correct, but they are rather small.

That looks a lot like John Larkin's circuit. ;)

formatting link

I would agree that solid state relays would be good, and I may go that route. But electromechanical relays are bulky, not cheap, and draw a lot more current. What might be interesting would be a miniature stepper switch, perhaps like the movement in battery powered clocks and watches for the second hand.

Paul

Reply to
P E Schoen

I think you are correct. But I have now made some major changes in the circuit. It uses back-to-back P-channel MOSFETs which can sample voltages of the plus side of the lowest cell and above. It is much simplified. I also added a buck converter which can charge the low cell (which is used for the PIC power supply) from the total pack. This accomplishes balancing without wasting power in shunt resistors.

formatting link

Here is a simulation of the buck charger:

formatting link

The ASCII file:

formatting link

It may need some way to monitor the charging current so the PWM can be adjusted. Maybe a differential amplifier across ten ohm resistor R14. Maybe something like the Si8240:

formatting link

or TS94033:

formatting link

I may get some PC boards made and try this out.

Paul

Reply to
P E Schoen

Looking good. D21,D19,D7,D8 are not doing much useful work as drawn but would if moved slightly - e.g. if D19 moved to the Q4/Q6 gate path then blocks a sneak error current that can flow via R1 and R2.

It is possible R5 will introduce measurement errors by charging up the flying capacitor C3.

I don't know the charge/measurement switching strategy you use but it may be possible to merge R19 and R16 (and R23/R20,R14/R15) into one?

Buck converter D9 and D10 puzzle me but seem mostly harmless?

(Apart from Q22 the mosfet symbol arrows have still got conflicting arrow directions - see the datasheet symbols for BSS84 and BSS138 at ON-Semi or Diodes Inc. A solid line vs broken line channel is used to distinguish depletion from enhancement. Explicity drawing the parasitic diode adds clutter and is redundant if the substrate diode arrowhead is correctly placed.)

piglet

Reply to
piglet

I will be updating this schematic as I fine tune the design:

I can see why the diodes are probably unnecessary, and I see where current can flow from MUX+ and MUX- through Q1 and Q5 body diode when sampling, but I don't understand how a diode can block that. Also I think you mean Q2/Q6?

Yes, it looks to be from the pack voltage through R5, R4, and D14. A diode in series with R4 should take care of that.

I think that would be good. I might use a polyswitch fuse but a 200 mA device has 7.5 ohms resistance, and that severely limits the average charge current. I will probably use 1 ohm resistors, and the one at the bottom will be used for charge current monitoring.

They are probably superfluous and I have removed them.

I have corrected that. My schematic symbol editor is quirky and somehow I got them reversed. I have redrawn the symbols, but I have left the body diodes in place, because it is easier for me to follow the current flow to see possible problems like the sneak current paths you found.

Thanks for your help. I hope to commit this to copper and FR4 pretty soon. Should be fun!

Paul

Reply to
P E Schoen

Simpler still is remove R5 then no diode (D21) needed either :)

piglet

Reply to
piglet

The body diodes are pointing in the right direction, they always were. What was wrong is the channel or substrate diodes are shown reversed. For instance you have Q22 correct - it is a P-channel and so the arrow points out of the substrate and towards the source. It is in fact just another way of showing the parasitic body diode. But now look at the BSS84 symbols - those too are P-channel but the symbol on your design has their substrate diode arrow pointing from source towards the back of the gate. In other words the channel diode direction should point the same way as the body diode (if drawn) the two arrows are showing the same thing and so should point the same way. Likewise the symbols on your design for the BSS138 which is an N-channel device have the body diode drawn right but have the channel arrow pointing out the channel pointing to source - the arrow should point into the channel. Look at how the On-Semi datasheets for those parts correctly depict them. I think sometimes people get confused between FETS and BJTs, on an NPN BJT the emitter arrow points towards the outside world, not so with an N-channel fet!

piglet

Reply to
piglet

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.