OP AMP EXPERTS - help me !!   - Page 1
Forum section: electronics / projects

author: max_torque
author_rank: Super Contributor
timestamp: September 23, 2022, 06:09:51 pm
content: I have a battery cell monitoring device that currently uses a COTS cell stack monitor, the LTC6811 from analogue devices.This part is becoming expensive, difficult to find, and i'd like to have more controls felxibility in terms of the data we can get from our cell monitoring systemI'm looking at options, which currently involve some sort of micro with isolated coms (CAN, RS485, isoSPI etc) and to keep costs down i'd like to try to use the on-board ADC of that micro.Realistically this probably means a 12b ADC resolution, perhaps 13 with a bit of s/w oversampling, but i'd also like 1mV of resolution on my cell voltage measurements (1+-5mV absolute accuracy would be fine)For now, consider a fairly short series sting of cells, putting cell voltages within say 20 volts of the local ground reference for the ADC, that means with cell voltages up to 4.5v (and down to 2.5v, no requirement to measure a true "zero" voltage)So, the issues are measuring a differential voltage of say 2 volts on top of up to 20vdc of common mode, and maybe signifcantly more AC CM (due to high frequency system noise etc)I have no great requirement to absolutely minimise either overal current consumption (current pulled from the 20v string) or individual cell discharge as our cells are large (hundreds of Ah) but i'd like to try to keep the drain even as possible between cells to avoid differences in discharge over storage periods (which could be reasonably long, ie 6 months perhaps)I've considered using a relatively high voltage instrumentation amp (INA) as the front end (36v is fairly easy to come by) and this means a unity gain INA (low cell discharge) but requires a true rail to rail input INA for the top and bottom cells in the stack (Top cell pos is at stack pos, bottom cell neg is at stack neg). Follow that INA with a subtracting opamp to remove say 2.5v, and we get 0 to 2v (easily set with playing with the gains) for 2.5 to 4.5v cell differential voltage, so decent resolution even from 12bits. Downsides are the higher cost (and limited availability these days!) of that high voltage R2R INA and they tend ot be current hogs to some degree (i can turn off the supply to the INA when the device is not actively monitoring the cells, so overall stack current draw is not that important)Other options are an upfront high value resitive divider on the cells, to bring all the voltages down into the range of a more conventional 5v (single supply) INA, but those resistors are going to increase individual cell drain currents and add some common mode offsets, particularly in the AC domainI know there are amplifiers designed for high side current shunt measurement that have a high common mode capability, but i don't have a feeling for the precision of such devices and i'd have to resistively divide the cell votlages down considerable to get into the sensible gain range for such devices (typically 20, 50 or 100V/V)Another option i've not yet thought through is using the differential inputs of the ADC, and whilst this gets me the cell voltage, it looses me some resolution because it's harder to offset some of the voltage i don't need to ever measure (ie < 2.5v)Oh, i'd like to be able to get the cell voltages roughtly 50 times a second, so an analogue b/w of something over 300Hz looks to be in the ball parkIs there an approach i've missed? I've not considered multiplexed front ends, some sort of switched capacitive divider or anything like that. Interested to hear opionions, suggestions and experiences?

author: magic
author_rank: Super Contributor
timestamp: September 23, 2022, 07:14:12 pm
content: Quote from: max_torque on September 23, 2022, 06:09:51 pmWell, that's simple enough, connect the micro alternately to each cell with an analog mux(I suspect this isn't far off from what the Linear part is doing).

author: David Hess
author_rank: Super Contributor
timestamp: September 23, 2022, 09:24:16 pm
content: I would tend toward using a microcontroller for small groups of series connected cells, within the voltage rating of the input multiplexors or amplifiers so 3 cells for 15 volts and 6 cells for 30 volts. This requires a reference for each set of cells but references are cheap, although calibration might not be. Then each microcontroller can talk to the ground referenced system though optocouplers.It is possible that there are some multiple input ADCs which are less expensive than using multiplexors.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 23, 2022, 09:31:54 pm
content: Or by the time you'd get something working properly for a reasonable cost, the LTC6811 might be available again. Who knows.

author: max_torque
author_rank: Super Contributor
timestamp: September 25, 2022, 01:26:06 pm
content: We have a stock of the LTC chipsets so it's not a problem to continue with those devices for a while yet! This is an inital think about what it would take to do-our-own, what architecture we could use, and what addiotional capability it could bring us. I'm really interested to try to calculate SoH for individual cells at a cell level to enabel us to really life our cells to the max (our customers need to get eveyry last Wh of energy storage out of our systems because the battery is by far the most expensive part!one option may be to use an off-board (ie not in the host processor) ADC with a higher resolution, but use a simpler analogue front end. say 14 useable bits from a unipolar 16b converter with a bit of s/w filtering would resolve 1.22mV even without any offseting tricks. Probably still need a suitable opamp front end to enable the resistive divider to be nice and high impedance, but that op amp wouldn't need to be rail to rail input or output, and it's fairly easy to find single supply low offset & tempCo opamps in quad packages with a >20v single supply capability

author: David Hess
author_rank: Super Contributor
timestamp: September 25, 2022, 08:29:21 pm
content: Another way to do it is use MOSFET optocouplers to charge a flying capacitor to the battery voltage, and then switch it to the digitizer.

author: Deku Tree
author_rank: Contributor
timestamp: September 25, 2022, 11:56:44 pm
content: Quote from: magic on September 23, 2022, 07:14:12 pmI used a similar setup for a battery cell monitor. The micro shared its ground with the bottom of whatever cell it was connected to. Just make sure to fully break the connection to one cell before muxing to the next.

author: Ian.M
author_rank: Super Contributor
timestamp: September 26, 2022, 06:03:19 am
content: Quote from: David Hess on September 25, 2022, 08:29:21 pmIf you can compromise slightly on the max. string voltage with respect to MCU Gnd, 4000 series CMOS analog switches powered from +Batt are also an option here, which could simplify it considerably. e.g. a CD4052 could handle the battery side of the flying capacitor for a four cell string at up to 18V, and a CD4053 could handle the ADC side. They'll have significantly higher charge injection than PhotoMOS optocouplers, but as long as the flying capacitor is large enough (which you'd want anyway to keep voltage drop on sampling negligible), that's not an issue. Fortunately the CD405x Enable pins are active low, so level shifting could be as simple as pullups to +Batt, and discrete N-MOSFETs cascoding the MCU outputs, with no quiescent draw except when taking a reading.Alternatively if you don't like flying capacitors, the same CD4052 2x 4:1 analog mux could go in front of your instrumentation amp, so long as its input impedance is very high compared to the CD405x max on resistance (at a min. Vdd of your full discharge min. Vbatt).

author: max_torque
author_rank: Super Contributor
timestamp: September 26, 2022, 10:01:47 am
content: The switched cap option with CD series logic looks like an interesting option, given the low cost of these parts.With a single op amp acting as a votlage subtractor to remove the lower 2.5v of the cell voltage signal i don't care about, then a 12b on board ADC of pretty much any micro controller looks to have sufficient resolution further simplifying that side of things.I'd have to do some sums on the transfer capacitor size and the likely scan rate, but it feels like a reasonable solution. Avoiding sampling drain on the transfer cap is probably the hardest part, but using a suitably high impedance input opamp is going to be possible, and i only need a single channel path after the multiplexer. In reality, a pretty "big" cap could be used, because most of the time the cells being measured are actually very close together in terms of their voltages so the actual charge transfer between cells will be fairly small. Assuming the multiplexer has an on state resistance of around 125 ohms, i can work out the sampling rate to transfer say 99% of the charge etc?

author: max_torque
author_rank: Super Contributor
timestamp: September 26, 2022, 10:03:57 am
content: I wonder if there is a post transfer capacitor simplification that can be made, ie to just switch the floating transfer capacitors ground reference, and just use a high impedance passive resistor current limter for the positive side to the ADC?

author: spostma
author_rank: Regular Contributor
timestamp: September 26, 2022, 10:42:43 am
content: I would use a single cheap 2x8 channel CD4097BM to monitor up to 5 LiIon cells (up to 20V string voltage).The trick is to connect the floating sampling capacitor across both multiplexer common out/in pins,and multiplexer channels 0 connected to the ADC input and GND,multiplexer channels 1 across battery cell #1, multiplexer channels 2 across battery cell #2, etc..Disable the analog multiplexer output while switching channels using the INH input.This way you can sample a battery cell voltage using the floating sampling capacitor,then disconnect the sampling capacitor, select ADC channel,and then reconnect the sampling capacitor to the ADC using the INH signal.Use MOSFETS and a large 100K pullup resistor to V++ as logic level converter to the 4 digital inputs of the CD4097BM.Mouser has 1400 pcs of CD4097BME4 on stock for about $0.40.----Even better, you may use TWO CD4097BM chips to monitor up to 9 LiIon cells (up to 40V string voltage)if you connect the first multiplexer power supply pins across cells #1..#5 with digital input pull-downs to the most negative terminal,and the second multiplexer power supply pins across cells #5..#9 with digital input pullups to the most positive terminal,and the microcontroller ground connected to the cell #5 to #6 interconnection.Use P-channel mosfets to the microcontroller VDD as level converter to the negative going pulldowns,and N-channel mosfets to the microcontroller GND as level converter to the positive going pullups.

author: max_torque
author_rank: Super Contributor
timestamp: September 26, 2022, 12:33:34 pm
content: Assuming a break before make architecture then you wouldn't even have to inhibit the multiplexer on a channel change.Connect the sample transfer cap across the common outputs,Connect channel 0 to the ADCChannels 1 to 4 to the cell + and - to be sampledSelect channel 1 - cap charges to cell 1 voltageSelect channel 0 - cap offset to ADC ground, ADC reads voltage from cell 1Select channel 2 - cap charges to cell 2 voltageSelect channel 0 - cap offset to ADC ground, ADC reads voltage from cell 2Select channel 3 - cap charges to cell 3 voltageSelect channel 0 - cap offset to ADC ground, ADC reads voltage from cell 3Select channel 4 - cap charges to cell 4 voltageSelect channel 0 - cap offset to ADC ground, ADC reads voltage from cell 4As the binary encoding input gives no way of connected more than 1 channel at once, the control code just needs to alternate between channel 0 and the channels for each cell tapping?Any spare channels can be used for a Built In Test where a known voltage is connected and the system can therefore self check

author: Ian.M
author_rank: Super Contributor
timestamp: September 26, 2022, 01:36:15 pm
content: A small refinement: use CD4097 channel 7 as the capacitor grounding & ADC connection, to minimize the average pullup current when taking a set of readings.

author: spostma
author_rank: Regular Contributor
timestamp: September 26, 2022, 02:12:24 pm
content: and another refinement; if you use a single CD4059 (<= 20V total), then MOSFET level shifters to the digital inputs can be omittedif you connect VDD of the CD4059 to the most positive cell terminal,VSS to the next-lower cell terminal, and VEE to the most negative cell terminal.

author: magic
author_rank: Super Contributor
timestamp: September 26, 2022, 02:15:52 pm
content: Quote from: max_torque on September 26, 2022, 10:01:47 amOr low power shunt reference like LM385-2.5 and one resistor.You need some sort of vref anyway...

author: Terry Bites
author_rank: Super Contributor
timestamp: September 26, 2022, 02:48:27 pm
content: 12 bits is very ott for battery monitoring. 0.200uV/V Hmmm.ISOamps haven't got great dc specs and thev'e gone out of fashion becase people do thieir digitising on the iso side.Soon to become unobtainium I expect.You'd have to run each one on its own iso supply. A nightmare.Weigh up the cost.On the opamp front. You'd need a load of precision resistors and precsion opamps. Divide by 10 and diff amp.See attached. Protecting the ADC is simple.Weigh up the cost again!Chipageddon will be the end of us all. ISL78714? MAX17843? BQ79616? all no stock. There are LTC6813s to be had direct from AD at $15 ea in bulk. Ouch.I think the flying cap solutions may be the best option.

author: Ian.M
author_rank: Super Contributor
timestamp: September 26, 2022, 05:41:06 pm
content: Quote from: spostma on September 26, 2022, 02:12:24 pmQuote from: Google: CD4059I think you've got the wrong chip there!A CD4051 16 way analog MUX has VEE and VSS so can do its own logic level conversion, but only gives you one channel. The trade-off of an extra MUX IC and the need for logic to share a common positive with +Batt vs 4 small 'jellybean' MOSFETs + pullup resistors for level-shifting is questionable. Also the min. logic supply (VDD-VSS) for a CD405x is 3V, so its also questionable to power its logic from the top LiPO in a string as it may malfunction due to under-voltage near end of discharge.

author: spostma
author_rank: Regular Contributor
timestamp: September 27, 2022, 10:12:06 pm
content: thank you; I still was talking about the CD4097BM ; that has a level conversion built-in for applications that use negative analog voltages.Sorry for causing confusion!

author: max_torque
author_rank: Super Contributor
timestamp: September 28, 2022, 07:29:39 pm
content: Cost and availability limitations means the choice of microcontroller for this project is suprisingly narrow, looks like a F0 series STM32 is leading, but that hasn't got a particularly good ADC (doesn't have an external VREF pin, so pretty much limited to the VCC of the digital bits (3.3v) so i think i'll use a decent (0.1%, 50ppm) 2.5v reference to calibrate the STM32 analogue reference value and to use as the base voltage for the voltage subtraction. I'll use the additional channel of the CD4097 for a fixed voltage divider from that reference to use as a system diagnostic checker

author: David Hess
author_rank: Super Contributor
timestamp: September 28, 2022, 07:36:36 pm
content: Why not use the reference to generate the 3.3 volt supply?

author: spostma
author_rank: Regular Contributor
timestamp: September 28, 2022, 09:47:33 pm
content: a PIC18LF04Q40 or even a PIC16LF18426 could work for you;they have XLP low power technology and a multi-channel 12-bit ADC that can accumulate samples while the processor is sleeping.

author: max_torque
author_rank: Super Contributor
timestamp: September 29, 2022, 08:13:51 am
content: Quote from: David Hess on September 28, 2022, 07:36:36 pmCould do, but the power pins on the small STM32's are not optimised so that 3.3v precision supply would have to drive all the uC's current requirements. Easy to just stick the ref into one of the ADC channels, measure it, then calculate the actual real time AVCC supply voltage and use that for the rest of the calcs i think? I need to precisely knock 2.500v off the bottom of each cell voltage reading, so that 2.5v ref can also do the calibration of the STM's ADC ref

author: David Hess
author_rank: Super Contributor
timestamp: September 30, 2022, 08:05:01 pm
content: Quote from: max_torque on September 29, 2022, 08:13:51 amA reference would not drive the supply pins directly, but be used to make a a precision low noise regulator with low output impedance. The advantage is fewer sources of noise, since with a separate reference and supply, the noise from the noisy supply gets added to the measurements.Anyway, it is just a thought. The situation where the supply input is used as the reference is not optimal.