BMS: Window comparator circuit and noise - Page 1
Forum section: electronics / projects

author: Blackgar
author_rank: Contributor
timestamp: February 11, 2023, 08:25:40 am
content: I am going to use an INA240 (bidirectional current sense amplifier) to measure the current on high side for an 48V BMS system.The output of the INA240 will be fed on an 16bit ADC. Also, I need to compare this output signal using comparators and react on bidirectional overcurrent.The above setup is similar to the circuit attached from Texas.I am afraid that comparators could add noise to the analog current reading. I read that low noise power supply and termination resistors may help with this issue.Is there anything else that might prevent the noise from comparator inputs;

author: Siwastaja
author_rank: Super Contributor
timestamp: February 11, 2023, 11:08:43 am
content: You need to decide what bandwidth you need and then filter the signal accordingly.Trying to protect semiconductors from overcurrent? Every microsecond counts - learn to understand the SOA curves for the parts you protect. Trying to protect batteries, wiring, etc.? Overcurrent even for a few seconds doesn't matter. You can filter more aggressively (lower cutoff frequency, i.e., longer time constant)Simple RC filter goes a long way.

author: Blackgar
author_rank: Contributor
timestamp: February 11, 2023, 11:54:04 am
content: Its not about protecting the semicondutors. The semiconductors are protected throught a decicated IC for driving them (it has integrated short circuit etc. features).I need a precise current measurement but also a HW overcurrent detection/notification circuit. The overcurrent feature could be easily done on SW but its not the case.So, I was thinking of INA240->RC filter->ADC input || comparator input. Where the 5V power supply for these ICs will be a separate high accuracy/PSRR LDO.

author: Siwastaja
author_rank: Super Contributor
timestamp: February 11, 2023, 02:25:23 pm
content: The obvious problem is the hysteresis feedback; (R6+R7) injecting current from the comparator output, forming a resistor divider with Rout (some tens of ohms?) of INA240, which can be significant enough voltage shift depending on the output state of the comparator. So you might want to buffer a copy for the window comparator using an opamp wired as buffer.What are you doing with the window comparator output? If swapping the polarity of OUTB is acceptable (maybe you could invert it later), you could wire it like you do OUTA side, to the negative (floating) input; it's much better to make the hysteresis positive feedback adjust the reference voltage instead of the measured signal, if the measured signal is shared by something else such as ADC.Then you just need to look at the input bias current specifications of the comparator to predict the error. I don't know how much charge injection from output to input is a thing for comparators, maybe others would but I would be surprised if it was a big issue.

author: Blackgar
author_rank: Contributor
timestamp: February 11, 2023, 04:21:22 pm
content: I think I confused you with the Texas example.I do not need any hysterisis at all, the resistors R3,R6 and R7 can be ignored.Sorry for the confusion.

author: Siwastaja
author_rank: Super Contributor
timestamp: February 12, 2023, 12:52:53 pm
content: Without hysteresis, the risk of the comparator oscillating becomes very real, and that could make the otherwise nonexistent noise or charge injection issue very real. I would use small amount of hysteresis; some comparators have that built-in though.