This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

INA219: Over-voltage protection (automotive application)

Other Parts Discussed in Thread: INA219, INA293-Q1, INA290-Q1, INA229-Q1, INA229, INA186-Q1, INA186, INA190-Q1, INA190, INA181, INA180, INA181-Q1, INA180-Q1, TINA-TI

Hi, I'm working on automotive related project where i'm using INA219 IC's to measure currents. 

Its all DC only, and measurement is pretty slow. Maybe every 250ms of so. Im using the following setups:

1) External shunt coupled directly to 12V battery's. measures up to 200A with a 75mV shunt (80mV mode)
2) Only voltage measurement on another battery. Vin+ and Vin- are directly connected to each other
3) 0,75mOhm SMD shunt measuring up to 50A connected directly to 12V system of car (40mV mode)
4) 1,5mOhm SMD shunt measuring up to 20A connected directly to 12V system of car but fused (40mV Mode)

I have done a lot to secure my electronics from the surges common in cars. Common surges can be for example 60V for only a few ms, but a load dump of 200V for 400 ms is also possible. 

What can i do to protect the Vin+ and Vin- of my INA219's? The datasheet suggest series resistors and zener devices but doesn't describe what is possible without compromising the output.

As described above i will be working with very small signals (0-40mv) to keep dissipation in the shunts low. I'm using kelvin wires and keeping them as short as possible to keep noise to a minimum. Even for my 50A shunt i need the measurement to be accurate down picking up currents as low as 100mA.

Would a 100ohm resistor between shunt and Vin- / Vin+ pin plus a 24V TVS diode to GND work, or would this surely effect the accuracy of the output? 

Hope you guys can help!

btw, i'm not looking to change to another IC. I like the INA219 of its I2C output, great library, and low cost. 
 

  • Hello Bragbe,

    Welcome to the forum and thanks for your question. The short answer is that there really is no solution that doesn’t compromise the INA219 accuracy. Using input resistors with the INA219 will interact with the internal ADC and affect sample acquisition settling time. However, the extent as to how much the accuracy is affected is not known. Settling errors could be mitigated with a sufficient input differential capacitor in between and as close as possible to the input pins of INA219. Another mitigation is to lengthen the conversion times and averaging as much as possible.

    Using 100-Ω input resistors will definitely affect accuracy, but will not severely compromise device operation. The extent of the degradation in accuracy needs to be characterized with bench measurements.

    If in your system you can perform offset and gain error calibration procedures for every device with large input resistors, then these error could be mitigated. By calibration procedures I refer to making measurements of known current levels in the system and recording the INA219 measurement into memory to use when correcting for all subsequent readings. Offset cals requires making just one measurement, usually at 0-A, 12-V bus. Gain cals require making two measurements and calculating devices gain error based upon the slope of the two data points.

    Here is an application note about surge protection for our current sense amplifier devices. This at least gives you an idea of how much protection is needed. http://www.ti.com/lit/ug/tidu473/tidu473.pdf?ts=1590601081123

    My general recommendations are:

    1. Maybe reduce the clamping diode reverse breakdown voltage even further, maybe 18V for better margin.
    2. Make a couple measurements with and without the input 100-Ω resistors and with and without an input capacitor. There is no upper bound to the capacitor so you could choose a big one like 0.1uF or 1uF.
    3. Consider a calibration procedure if error is too high. Offset calibration may be needed anyway given how low shunt voltages you are sensing.
    4. I know you don’t want to use another device, but I should mention a couple other options:   
      1. Use a voltage-output CSA (e.g., INA293-Q1, INA290-Q1) and feed this measurement into a low-cost, low-voltage 12-bit ADC.
      2. Use a larger voltage-rated digital CSA such as the INA229-Q1 (85-V survivable VCM) which released recently.

    Please post back with any more questions you may have.

    Sincerely,

    Peter

  • Hi Bragbe,

    this might interest you:

    snva681a.pdf

    Kai

  • Thank you Peter,

    Testing will indeed be the only way to know if it works or not. Real testing however will be very complicated for me. I do not have the power supplies to simulate a load dump, or other transients. Measuring the high currents will and very low shunt voltages wil also be challenging. At this point this i'm planning to make 5 pcs of this project for myself, friends and other testers. Depending on how people receive it, i might turn it into a commercial product which will need further testing. 

    To answer some of your questions, I'm currently running the prototype on 4 sample mode. 8 sample mode might be acceptable but might take up to much time for the 6pcs of INA219 im planning to use. 

    The reason i'm talking about a 100 ohm resistor is that it will lower surge current of a 200V load dump by a lot. During such spike the dissipation of a 10 ohm resistor will 3000W. a 100 ohm resistor will only have a 300W peak. Both spikes will blow away every SMD resistor but his if off course a worse case scenario. I hope that actual transients will be a lot less violent so a beefy 1205 resistor van handel the short peak. 

    To be a little more clear about the accuracy i need: For the 50A SMD shunt i dont mind a 5% error. Maybe even 10% can be acceptable. I do however need to be able so see the difference between 0, and 100mA. 50mA would be even beter. These very small values are what worry me the most as they will be in the uV range.

    Calibration is not preferred. A one time calibration of offset might be acceptable, but gain will be difficult.

    Can you explain to a novice like me how these resistors will affect the accuracy? I would think the impedance of the Vin- and Vin+ would be very very high so the 100 ohm is a relatively low value maybe effecting the gain by values much lower than 1%. Or is this caused by the "internal capacitor" of the INA that need current to fill up, and is limited by the resistors? Is this why a capacitor is needed? Like i said, i do not care about speed at all. If current jumps form 1A to 20A, and it takes up to a second to register, this can be acceptable. 

    Do you perhaps know if the SPICE models of the INA219 are detailed enough to simulate the effects of different resistors and capasitors?

    Thanks for the link to that application note! I already found and studied it actually, Its extremely interesting but it doesn't say much about the actual errors the circuit created. Also there where no tests with 200V(peak)/400ms transients (automotive load dump) and looking at the schematics i doubt very much that any of these will survive such a spike.

    Another concern of mine, is the effect of the TVS diodes. I fear that there night be a small current leak that have have a large impact on the measured voltage vs the actual shunt voltage. Adding resistors that are crucial for the TVS to work might make this even worse.

    I'm loving your general recommendations and will defiantly follow up on most of them. Why do you suggest using a TVS with a lower breakdown? I found that to have a clamping voltage of 25V a minimum breakdown can be as low as 16-17V. That just fits the range i need them to work.

    Other INA's without internal ADCs i do not like. I need to measure 5 current levels and 2 voltage levels, so i either need 7 ADC channels or i need to do some multiplexing which i find to complicated. My current prototype actually uses 2 INA219 and 4 HALL effect sensors tied to a 4 channel DAC. IT works, but the offset is proofing to be a headache. I just love how simple, stable, and accurate the INA219 is. Its also relatively cheap which is also nice. That INA229 sounds nice, but it sounds expensive, and i dont love the SPI interface. I'm all out of IO on my Atmega.

    I will try to do some SPICE simulations to test different resistors and cap values and read that application not again.

    If you have any other suggestions i would love to hear them! 

  • Thank you Kai,

    I was not aware of that circuit, thank you. To protect all VCC i'm currently using a LTC4380 which seems to offer all protection i need. It however does not protect the input terminals of the INA as the need to be directly connected to the battery. 

  • Hey Superkris,

    The input resistors will affect INA219 accuracy in the same way they affect delta-sigma ADCs. There is effective differential input impedance (Zdiff) that is based up on the switching capacitors and how much transient current they require to charge/discharge. Thus using input resistors can create a voltage divider and thus introduce gain attenuation error.

    Overall these effects are not easy to quantify and not really known for our digital current sense amplifiers. Additionally, simulating these effects with the

    I suggested using a lower breakdown TVS because I sometimes see the clamping voltage be a bit higher than the reverse break down. As long as the max clamping voltage is less than INA219 Abs Max and minimum reverse breakdown voltage is greater than normal operating battery voltage, then everything should be fine.

    I will suggest one more option. Use the INA186-Q1/INA190-Q1 with large input resistors (10kΩ to 1kΩ) and lower power clamping diodes. The INA186 is a high-input impedance current sense amplifier, so pretty large input resistor will not significantly affect gain error, thus you could use lower power clamping diodes. This device has a 500V/V gain option and also has a very large input dynamic range which may be able to measure most of the currents you want. The simulation model shows the effect of the input resistors accurately. This tech note talks about the device a little and how to calculate input filter error. http://www.ti.com/lit/an/sboa343/sboa343.pdf?ts=1590767692955

    Best,

    Peter

  • Sorry for my late reply. Again thank you very much for your support.

    I gave it some thought and although i do not love the idea of dropping the INA219 i fear you may be right and i need to do a full redesign. I agree the INA186 and and INA190 are technically most suitable for the task but there are some issues with costs and availability. Both only seem available from mouser and digi-key where i usually dont buy my components. Because i need 4 chips per PCB, the costs of the INA190 at € 2,50 a piece is not great either. The INA186 is doing a little better at € 1,20 but still more expensive than the € 0,70 i was paying for my INA219. Also the EMS im planning to use (JLCPCB) is not offering assably with either of these chips. 

    So what about the INA181? While its not recommend to use input resistors as large as 100, or 1000ohm, the datasheet is not saying it should never been done. It just creates a large gain error, but i can fix that in the software of my uC. If i calculated correctly, the the gain error with 100 ohm input resistors will be approx 9%. As long as its just the gain that is affected i do not really care. Especially if its similar for each unit.

    The INA181 is also low cost at only 0,35 cent and its much better available. It is even in the database of my preferred EMS.

    Acutely... I just found document SBOA343 that seems to be written by you! Nice! Maybe this is the best solution for my case. I will do some additional calculations. Do you have any additional advice?

  • Hello Superkris,

    Not intending to interrupt the technical conversation you and Peter have been having, just to add a quick comments here - you can always buy TI components on ti.com and you get the best prices here too. We have stock for INA190, INA186, INA181 and other current sense amplifier products for sure.

    https://www.ti.com/store/ti/en/

  • So i have done some math, and the INA181 seems to be a perfect match as you can see below.

    My understanding is that a higher Rf will reduce the gain of the chip right?

    I'm just having some trouble with calculating the gain error caused by the higher Rf and the large 20% tolerance of Rint. In my formula the gain error decreases with the increase of Rf while this should be the other way around. I'm not great at math, so i'm sure this is my fault. I'm 

    https://docs.google.com/spreadsheets/d/1WO6qs1FFnHwRmm9c9mYOTNEMc_RiMjyqXRgmHaGgP9A/edit?usp=sharing

    The SBOA343 document doesn't describe how to calculate this error and the INA181 datasheet doenst talke much about it at all.

    Hope you can give some insight on this. I like where this solution is going!

  • Thank you Zhao, I will remember that!

  • Hey Superkris,

    The INA181/INA180 could be an option as long as it meets your error requirements, although calibration would certainly help with this.

    If you want to use the INA181-Q1/INA180-Q1 with input resistors, then you will want to calculate the theoretical, nominal gain change and make sure the DC sweep is still linear. Then you will want to incorporate a gain calibration procedure for every INA181/INA180.

    It is important to understand that the gain change equation in the datasheet (equation 5) will tell you how the nominal gain will change. Yes, adding input resistors will always decrease the gain. Note that there is a nominal 2.5kOhm input differential resistance. You can simulate the gain change using an ideal differential amplifier in our simulation environment, TINA-TI. Also, note that using our INA181 SPICE model may not show this behavior because it is a behavioral model.

    Note how I mention that the gain change is nominal. In reality there will be variance because all the internal resistors can vary +/-20% over process variation and temperature. The feedback resistors (RFB) and input resistors (Rint) will move up and down with each other because they are trimmed to have a precise ratio, which is what sets the precise gain of our current sense amplifiers (CSA).

    So if you use the INA180/INA181 (or any other low-input impedance CSA), then you need to account for the gain attenuation and the gain variance when using input resistors. I recommend using simulation where RFB and Rint are +/-20% and Rdiff could also be +/-20%. Note that Rdiff does not have to move in same direction as RFB/Rint. If the new gain variance is too large, then you will want to establish a gain calibration procedure in your firmware for every CSA in every system.

    Hope this make sense.

    Best,

    Peter

  • Hi Peter,

    Again thank you so much for you support. I Highly appreciate the time you are taking to help a noob like me out!

    You explanation is again extremely helpful. I'm not sure i fully understand the presence of Rdiff, but knowing its there enables me do some simulation with the schematic you supplied. 

    Below a screenshot of the 4 cases that i tried. They vary form ideal internal resistors, to a worst case variation.

    So the 200 ohm resistor actually works quite nice for me. Sure a 4% gain error is not ideal, but this is a worst case number and i guess in most cases the error will be lower. While calibration might be tricky for each CSA, its still will be possible if really needed. However gain is the most important for my application. Offset is much worse.

    The reduced gain of the 200 ohm input resistor actually creates a perfect match for the Full Scale Range of the ACD i'm planning to use so this is a nice benefit. The 200 ohm resistor lowers the current to 0,9A in worst case automotive load dump. This puts a load peak of 20W on the TVS diode which should be fine. No way any SMD resistor will survive this, but most "modern" vehicles already have clamping diodes to lower the load dump to 60 or 80V. At a 80V load dump the input resistor will have a 16W peak. Hopefully a beefy SMD resistor will survive most transients. If not it can be replaced.

    For those who might read this and would like to know; here are the full errors i calculated for 100, 200, and 500 ohm resistors.

    100R 200R 500R
    Gain reduction 9,09% 16,66% 33,33%
    Case 2 gain error 0,45% 0,82% 1,64%
    Case 3 gain error 1,78% 3,22% 6,25
    Case 4 gain error 2,22% 4,00% 7,69

    Please note: all of the above is only valid for the A3 devices. Also, if you wanna be sue about these numbers please do your own calculations. I obviously barely know what i'm doing.

    Overal my personal opinion is that the suggestion of the INA186/INA190 is obviously better. For my case however the gain error is acceptable. If not, i can still do some calibration in the firmware. The benefits of price and availability also help with my choice to continue my design with the INA180.

    I made the schematic below. I added a rather large filter cap because i will only be measuring DC with a frequency of 4 samples per second max. If anyone has any additional input please let me know!