# Maximum forward current on ESD diodes

I'm interfacing a dsPIC33EP512MC806 with a set of analog systems. The analog systems manage a battery and have vregs for the digital systems. The analog systems measure the voltage and current consumption of the battery providing feed back to the micro. The current is measured with a low quiecent current IC (ZXCT1010). The voltage is measured with a low quiecent current opAmp in a divide by four configuration.

It is the opAmp that concerns me. The digital side will get shut down by disconnecting power from the analog side. The analog side will remain powered on. Because the analog side remains powered on the opAmp still applies about 2.1 volts to the pin of the processor. When the processor is powered on there is no current or at least less than the meter can measure. With the processor turned off there is about 300uA of current from the opAmp into the pin. I believe that an ESD diode is being forward biased. There is a 1k resistor and a 0.1uf capacitor serving as a low pass filter. Also there is another 1k resistor serving as input protection to the pin. This makes for 2k of resistnace between the op amp and the pin of the micro controller.

I'm having a hard time finding any information on what the ESD diode can tolerate. Can the opAmp remain connected to the micro controller indefinitely if the micro controller is shut off?

simulate this circuit – Schematic created using CircuitLab

• Draw a circuit, don't use words. We're not in the middle ages you know. Commented Feb 6, 2016 at 11:29
• @Andyaka I have the post updated. Commented Feb 6, 2016 at 11:44
• The PIC data sheet will tell you what the maximum current is that can be fed into an input pin. This current HAS to be the max current thru the ESD diodes. Even if the device is powered down I can't see that this rating will change. It's going to be in excesss of 1mA I would guess. Commented Feb 6, 2016 at 11:49
• You could make the MCU sleep instead of turning it completely off. Consumes a little, but then no worries about the pin. Commented Feb 6, 2016 at 21:08

The ESD diode you refer to is not really an ESD diode, it will not protect the processor against ESD. I would call it an input clamp diode, and there is usually one from the I/O pin to Vdd and another from the pin to Vss. The maximum current that you can put through the diode is well specified by Microchip, they call it Injection Current, with a maximum of +/- 5mA.

At a first glance it would appear that your 300uA is well within specification and would not cause a problem. However, the +5mA limit is when the processor is running under normal operating conditions, ie Vdd is 3.0V to 3.6V. I would not assume that the same limit applies when the processor is powered down. What can happen with some processors is that the injected current will try to power up the processor, which means that when Vdd is switched on the processor fails to start up correctly. I don't know if this applies to the dsPIC.

If this is for a commercial product then I would want to be absolutely certain that the injected current causes no problems. I would look to either eliminate it altogether, or reduce it to a minimum as follows:

1. Power OA1 from the same 3.3V supply used by the dsPIC, so that OA1 cannot source a voltage when the dsPIC is powered down.

2. Put an analog switch such as a SN74LVC1G66 between the output of OA1 and the dsPIC, and only enable the switch when the 3.3V dsPIC supply is present.

3. You may decide that it is perfectly safe to apply 2.1V to the ADC pin, but in that case you could reduce the injection current to a minimum by increasing the value of R3 in your circuit. You may find that you can increase R3 to 47k without affecting ADC accuracy. As Spehro has commented, the source impedance of your original circuit is higher than that recommended by Microchip, but if you replace R4 with 0R you will be OK.

• The design is a one off senior design project. All i can do is make sure the design functions. I will increase R3 to 10k and drop R4 to something less than 50 ohms. That should reduce the current to about 60nA which i think will be acceptable on all accounts. Commented Feb 7, 2016 at 1:45

Have you got a spare IO pin?

If you have then get rid of the op-amp, make the resistor divider much lower impedance (suitable for a direct drive to the micro's ADC) and "connect" the potential divider to the 8.4V supply using a P channel MOSFET controlled by the spare IO pin via an NPN transistor: -

1 msec later you have measured your battery voltage and, given that you probably don't need to measure it for another minute or so, your average current is 1/60,000 times the current taken for that milli second when you connected the potential divider to the battery supply.

It's probably a good idea to have maybe 100 nF across the lower resistor too. You might also be interested in the answers provided in this stack exchange question. You might find that you can actually have very high impedance resistors directly feeding the ADC pin providing you have a capacitor across the lower resistor (see Hanno's answer).

• The particular design is a one off for a senior design project. If i could respin the boards there are at least half dozen modifications that i would implement. For now all i can do is mitigate the current design to make sure it functions without letting the smoke out. Commented Feb 7, 2016 at 1:40
• I think directly connecting the high impedance potential divider to the ADC input can work if you only read that pin at a low duty cycle AND you have a decoupling capacitor across the lower resistor. Bypassing the op-amp is barely a problem. Commented Feb 7, 2016 at 11:47

By doing this you are exceeding the absolute maximum voltage rating on the pins.

There is no safe current according to the datasheet. It may well work okay (strongly suspect it will), but there are no manufacturer guarantees. Note that you are already well outside (by 10:1) of the manufacturer recommended source impedance of 200$\Omega$ (see 70621C).

Again, this may work fine with a typical chip at room temperature, but it's not a good design for a mass produced product.

You are wasting 0.3mA of battery current, right? Why not power the op-amp from the digital supply, then the wasted current is 100 times better. Of course this raises the same question wrt the op-amp inputs, but that's a different question. A 1N4148 and one additional resistor could deal with it.