Discussion:
[EE] Driving a 10nF capacitance
Mario
2018-02-05 07:53:53 UTC
Permalink
Hello,
this is for an extremely space-constrained application, so every component
counts.

The PIC datasheet specifies what is the max current that can be sourced/sinked
by a PIC pin.

However, this in principle means that no capacitance can be directly driven,
as any capacitor with low ESR (eg. ceramic) will look almost like a short
circuit, although only for a very brief time.

Regardless of what the datasheet strictly says, in your experience is it safe
to drive a 10nF capacitance directly from a PIC pin (for few hundreds Hz's,
i.e. without thermal or average current excesses, only peak current), or a
resistor is always needed?

The internal resistance of the pin is in the tens of ohms already, so I wonder.
While the peak current, without the external resistor, will exceed the maximum
specified in the datasheet, this is meant as "continuous current", while MOSFETs
do always exhibit a higher peak current capability.. so why not also PIC pins?

Thank you for your insights.

Kind regards,
Mario
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Jason White
2018-02-05 13:22:10 UTC
Permalink
I believe you are correct about the peak current - but I cannot say where
the limit would be for your particular application.

It would be interesting if you could conduct destructive testing and post
the results. Monitoring ESR vs load over a period of time.

It has been my experience that I/O ports are difficult to kill. It seems
they tend to degrade to the point that they self limit damage through
high-ish ESR. You will likely be fine so long as you provide adequate time
for the capacitor to change.

I have written firmware for commercial equipment that used PIC16F series
parts directly driving 1nF capacitors (at a 1 second interval) as part of a
level sensing circuit. I never encountered issues or returns - apparently
it worked without excessively damaging the PIC.
Post by Mario
Hello,
this is for an extremely space-constrained application, so every component
counts.
The PIC datasheet specifies what is the max current that can be sourced/sinked
by a PIC pin.
However, this in principle means that no capacitance can be directly driven,
as any capacitor with low ESR (eg. ceramic) will look almost like a short
circuit, although only for a very brief time.
Regardless of what the datasheet strictly says, in your experience is it safe
to drive a 10nF capacitance directly from a PIC pin (for few hundreds Hz's,
i.e. without thermal or average current excesses, only peak current), or a
resistor is always needed?
The internal resistance of the pin is in the tens of ohms already, so I wonder.
While the peak current, without the external resistor, will exceed the maximum
specified in the datasheet, this is meant as "continuous current", while MOSFETs
do always exhibit a higher peak current capability.. so why not also PIC pins?
Thank you for your insights.
Kind regards,
Mario
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
Jason White
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Bob Blick
2018-02-05 16:55:23 UTC
Permalink
Hi Mario,

It depends on which PIC and what the supply voltage is. For the 16 series PICs up to 5 volts you should be OK as long as you don't try to do it on very many pins and don't do it on multiple pins at the same time.

The higher the supply voltage, the lower the output resistance will be, and that will bring the peak current up. You don't want the peak current to approach the rated limit of the entire port (is it 80 mA? 100 mA? I forget).

At 5 volts, the output resistance when sinking current is about 80 ohms on a 16F88/887/etc. That puts your peak current at 63 mA, so you're OK

At 5.25 volts or 5.5 volts supply that output resistance is lower and you will be shaving very close.

Also, you want the output voltage to slew fast enough that the pin can reach the correct logic level within one internal clock cycle(4 crystal cycles), so that limits the capacitance you can drive without the PIC getting confused and doing some weird read-modify-write stuff. So you want the pin voltage to change by a couple of volts in that time.

BTW, this is all based on my experience, some of it may be technically or morally incorrect.

Hope this helps.

Friendly regards,

Bob

________________________________________
From: piclist-***@mit.edu <piclist-***@mit.edu> on behalf of Mario
Sent: Sunday, February 4, 2018 11:53 PM
To: Microcontroller discussion list - Public.
Subject: [EE] Driving a 10nF capacitance


Hello,
this is for an extremely space-constrained application, so every component
counts.

The PIC datasheet specifies what is the max current that can be sourced/sinked
by a PIC pin.

However, this in principle means that no capacitance can be directly driven,
as any capacitor with low ESR (eg. ceramic) will look almost like a short
circuit, although only for a very brief time.

Regardless of what the datasheet strictly says, in your experience is it safe
to drive a 10nF capacitance directly from a PIC pin (for few hundreds Hz's,
i.e. without thermal or average current excesses, only peak current), or a
resistor is always needed?

The internal resistance of the pin is in the tens of ohms already, so I wonder.
While the peak current, without the external resistor, will exceed the maximum
specified in the datasheet, this is meant as "continuous current", while MOSFETs
do always exhibit a higher peak current capability.. so why not also PIC pins?

Thank you for your insights.

Kind regards,
Mario
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Mario
2018-02-06 14:31:37 UTC
Permalink
Post by Bob Blick
Hi Mario,
It depends on which PIC and what the supply voltage is. For the 16
series PICs up to 5 volts you should be OK as long as you don't try to
do it on very many pins and don't do it on multiple pins at the same time.
The higher the supply voltage, the lower the output resistance will
be, and that will bring the peak current up. You don't want the peak
current to approach the rated limit of the entire port (is it 80 mA?
100 mA? I forget).
At 5 volts, the output resistance when sinking current is about 80
ohms on a 16F88/887/etc. That puts your peak current at 63 mA, so you're OK
At 5.25 volts or 5.5 volts supply that output resistance is lower and
you will be shaving very close.
Also, you want the output voltage to slew fast enough that the pin can
reach the correct logic level within one internal clock cycle(4
crystal cycles), so that limits the capacitance you can drive without
the PIC getting confused and doing some weird read-modify-write stuff.
So you want the pin voltage to change by a couple of volts in that time.
BTW, this is all based on my experience, some of it may be technically or morally incorrect.
"morally incorrect" is fantastic. ;D

Cheers,
Mario
Post by Bob Blick
Hope this helps.
Friendly regards,
Bob
________________________________________
Sent: Sunday, February 4, 2018 11:53 PM
To: Microcontroller discussion list - Public.
Subject: [EE] Driving a 10nF capacitance
Hello,
this is for an extremely space-constrained application, so every component
counts.
The PIC datasheet specifies what is the max current that can be sourced/sinked
by a PIC pin.
However, this in principle means that no capacitance can be directly driven,
as any capacitor with low ESR (eg. ceramic) will look almost like a short
circuit, although only for a very brief time.
Regardless of what the datasheet strictly says, in your experience is it safe
to drive a 10nF capacitance directly from a PIC pin (for few hundreds Hz's,
i.e. without thermal or average current excesses, only peak current), or a
resistor is always needed?
The internal resistance of the pin is in the tens of ohms already, so I wonder.
While the peak current, without the external resistor, will exceed the maximum
specified in the datasheet, this is meant as "continuous current", while MOSFETs
do always exhibit a higher peak current capability.. so why not also PIC pins?
Thank you for your insights.
Kind regards,
Mario
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Loading...