General > General Technical Chat
Safety of 300uA pull to 12V on IO pin before MCU startup
<< < (3/3)
Psi:

--- Quote from: gamalot on July 30, 2022, 07:50:56 am ---Since you say that this ADC input pin is used to sense the battery voltage, we can assume that the output of the voltage divider network you use is always less than 6V (the limit voltage given in the data sheet), then 300uA of current for your MCU is safe.

--- End quote ---

Yeah, that's how I read it too. I don't think the battery sense voltage is the issue.

The caps directly across the inputs are more of a concern if VCC falls away faster and they discharge into the IO pin with no current limit.
gamalot:

--- Quote from: Psi on July 30, 2022, 07:55:11 am ---
--- Quote from: gamalot on July 30, 2022, 07:50:56 am ---Since you say that this ADC input pin is used to sense the battery voltage, we can assume that the output of the voltage divider network you use is always less than 6V (the limit voltage given in the data sheet), then 300uA of current for your MCU is safe.

--- End quote ---

Yeah, that's how I read it too. I don't think the battery sense voltage is the issue.

The caps directly across the inputs are more of a concern if VCC falls away faster and they discharge into the IO pin with no current limit.

--- End quote ---

There is a resistor connected in series at the input pin of the ADC. In theory, if the resistor is greater than 330 ohms, it is safe for an input voltage of 5V. Although I don't know the exact value of this resistor(will not be greater than 14k ohms, which is the input impedance of the ADC given in the datasheet), in practice I don't think that 100nF cap would cause any trouble.

---

I just looked at the datasheet again and it states that the ADC is optimized for signal sources with less than 10kohm impedance. So if you're still concerned, you can connect an external 1kohm resistor in series with the ADC input.
tom66:
It probably won't break the microcontroller permanently.

But one thing to be aware of, if this will ever happen outside of 'startup' then it can swamp the ADC.  The issue is, the ADC is only rated as producing accurate results from 0-Vdd for instance.  It won't be damaged if you go out of that range, but it also might not clip correctly.  In fact, it might even cause adjacent channels to misbehave (I have encountered this behaviour on both PIC32 and TI's TM4C series) which can be a really difficult bug to solve.
Ian.M:
In PICs, passing current through the protection diodes of analog-capable pins can lead to all sorts of odd misbehaviors that don't cause permanent damage (but may require power-cycling to recover from), including disturbing or even stopping internal oscillators, shifting internal references which may result in unexpected BOR resets, and of course degrading or corrupting ADC results on other pins.  See Microchip TB3013 for details.  Anecdotally, passing current through the lower protection diode seems particularly problematic as that can lead to current diffusing into the substrate, and I have seen several instances where even a few hundred uA causes massive (>50%) internal oscillator frequency shifts.
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod