ADC input protection with shunt? - Page 1
Forum section: electronics / projects

author: Things
author_rank: Regular Contributor
timestamp: August 09, 2015, 10:56:04 pm
content: I'm using a MCP3425 to read a current shunt for a reasonably high power 24V brushless motor system. It worked fine for a while, but it seems now I'm not getting any reading at all from it. The typical application circuit shows it's differential inputs just directly connected across the shunt, which is what I've done. However I'm wondering if maybe massive EMI from the motor could have somehow killed the chip? But I'm not really sure, since I'd imagine a big hunky shunt would be pretty good at suppressing EMI?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 09, 2015, 11:20:21 pm
content: Uh yeah, you don't just connect raw IC pins up to a huge power shunt...Sadly another of a laundry-list of things that are wrong in app notesAlways add filtering and protection between a noisy, powerful, or unknown (outside connection?) signal and the inner workings of your circuit.The filtering should be as low bandwidth as you can handle. RC filters are usually fine, but you may need a more involved LC filter if you need tighter specs on response time and flatness versus exclusion of noisy crap. (By the way, don't forget source and/or termination resistors, if you choose an LC filter for a shunt. The shunt has a very low impedance, so just wiring it up straightaway won't give you the right frequency response.)Example:A DC shunt for monitoring battery charge state, might need 1Hz if that; such low filtering is actually rather inconvenient to provide in the analog domain, so it might be cut at some kHz, and the rest handled digitally (which, at such a low sample rate (<kHz), won't take much power, as is needed for a battery management chip).But if you're doing a "DC" shunt but using the current waveform to control a pulse width modulating circuit (which is the best way -- current mode control -- to provide power control for motors, converters, etc.), you need a good bit more bandwidth than the switching frequency (which might be 500kHz to over 10MHz). You also need full common mode rejection up to those frequencies, which is often hard to come by (the common shunt sense amplifiers aren't much good beyond 20kHz or so: fine for DC and monitoring, not so much for switching).The amount of resistance you can spare, in your filter, determines what kind of transient protection you need. The biggest hazards you will have with a shunt are:- Turn on and switching transients (including brush arcing)- Locked rotor or short circuit fault currents- Ground loop voltages (especially transient)The last one is why you always need a differential measurement, of course. (By the way, don't be tempted to build a differential filter -- the two signals are normal mode (single ended) first and foremost; take the difference after filtering both.)Expect that you might have to withstand +/-24V on either shunt terminal, at least transiently (~1us?).For this, you should be able to add series resistance, as part of the filter, and use that to clamp the voltage spikes, down from ~24V, to a more modest supply (maybe you have 0/5 or +/-5V for this local part of the circuit?). BAT54S or BAV99 (or 2 x 1N4148) are very common for clamping (mind that BAT54 and other schottky diodes have a lot of leakage current, which will introduce a DC offset if the series current limiting / filtering resistance is too high; PN diodes are usually preferred for analog signals). If you don't have a handy supply to clamp to, zener diodes or TVSs are quite capable, though not usually suitable for clamping voltages under 5V (the threshold is too soft, and you get distortion; zeners 5V or higher are sharp enough to be used with signals having a typical voltage range maybe 20% below rating).Since you're going into an ADC, you don't have to worry about negative supplies or differential amplifiers, that's all handled for you. The current limiting resistor is required, and a filter capacitor is desirable. The clamp diodes could be provided by the IC itself (it will probably be fine, if the peak current is kept under 10mA), but I would recommend using external diodes, followed by another resistor (because the first set of diodes will clamp the signal to maybe 1V outside the supply rails, which will still cause the IC's diodes to conduct; a second resistor of >= 100 ohms will divide the current safely).In summary, input - resistor - cap to GND and clamp diodes to VCC/GND - resistor - ADC input. Typical values maybe 1k, 10nF*, BAV99, and 100 ohms.*10nF against 1k gives a cutoff of 16kHz, which would be fine for a 50-100kHz sample rate and subsequent digital filtering. Use more or less as needed.Tim

author: Things
author_rank: Regular Contributor
timestamp: August 09, 2015, 11:33:00 pm
content: Thanks for that. I figured filtering would make a bit more sense but also found it odd that it was excluded and not even mentioned in the typical application notes. Will swap the chip out and bodge in a filter and see how it goes

author: Kleinstein
author_rank: Super Contributor
timestamp: August 10, 2015, 08:09:07 am
content: The appl. note is just a simple example. It can be OK in some cases where the current is near DC, like the current from a small solar panel.The circuits im appl. notes or the example section of datasheets are often simplified with something like protection and EMI filter missing. Some of these circuits are also only showing what could be done in principle, even though there might be much better or cheaper solutions using other parts.

author: Things
author_rank: Regular Contributor
timestamp: August 10, 2015, 08:27:04 am
content: I've plonked in a new chip and put 2 100nF caps on each input to ground, as well as a 12K resistor on each input to the caps. I'm not reading the current that quickly so figured it'd be better to go a bit higher, as it really is quite a nasty environment in there for it.

author: bktemp
author_rank: Super Contributor
timestamp: August 10, 2015, 02:44:46 pm
content: The MCP3425 is a delta-sigma adc and has a quite low input impedance: 2.25Mohm/PGA setting. It forms a voltage divider with the external resistance. Therefore the source impedance should be <1kOhm for good measurements. To avoid this problem the best solution is to add a buffer stage before the adc.