Discussion:
[EE] Pic24FJ128 "Hair" on ADC pin
Van Horn, David
2017-08-23 18:16:31 UTC
Permalink
What would cause sharp positive going "hair" on an ADC input?

The ADC is reading ground immediately before, so the sample/hold cap should be discharged, yet every time I sample I see this sharp positive spike on the ADC input pin.
I don't believe there is anything else happening with that pin, and it's always an ADC input.

--
David VanHorn
Lead Hardware Engineer

Backcountry Access, Inc.
2820 Wilderness Pl, Unit H
Boulder, CO 80301 USA
phone: 303-417-1345 x110
email: ***@backcountryaccess.com<mailto:***@backcountryaccess.com>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
s***@interlog.com
2017-08-23 18:48:56 UTC
Permalink
Post by Van Horn, David
What would cause sharp positive going "hair" on an ADC input?
The ADC is reading ground immediately before, so the sample/hold cap
should be discharged, yet every time I sample I see this sharp
positive spike on the ADC input pin.
I don't believe there is anything else happening with that pin, and
it's always an ADC input.
Charge injection in the sampling switch, maybe.

--sp
Post by Van Horn, David
--
David VanHorn
Lead Hardware Engineer
Backcountry Access, Inc.
2820 Wilderness Pl, Unit H
Boulder, CO 80301 USA
phone: 303-417-1345 x110
--
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
Van Horn, David
2017-08-23 18:53:01 UTC
Permalink
Hmm. That sounds like a "nothing you can do about it" kind of problem.



Charge injection in the sampling switch, maybe.

--sp
Post by Van Horn, David
--
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
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
RussellMc
2017-08-24 02:51:41 UTC
Permalink
On 24 August 2017 at 07:53, Van Horn, David <
Post by Van Horn, David
Hmm. That sounds like a "nothing you can do about it" kind of problem.
Charge injection in the sampling switch, maybe.
If you see a"physical" spike at the physical pin it suggests that current
is being supplied by the IC.
As speff says "charge injection" (more or less by definition) but, from
where.

Thoughts only

​Check that ALL ​

​other pins are within operating voltage spec ​and (to be safe) drive spec
as well.

Ensure no short glitches anywhere else.

Is there an external physical signal associated with the sampling that may
be being coupled to the pin.

and:

Is the spike AT the pin only. ie is it to some degree at other pins.
Is it on the IC ground lead too?
Where is the scope probe ground?
Where in the sampling cycle does it occur?
How long/high?
How is the pin "grounded"? - Is the scope ground at the ground point for
the pin?

Russell
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
h
Jason White
2017-08-24 09:52:06 UTC
Permalink
I think you may find that if you make the ADC regularly and sample Vss that
your glitch will reduce (if not disapper). Setting the ADC channel to the
negative reference for a complete conversion cycle (ideally between real
every sample taken) will ensure that (1) the sampling capacitor is
completely discharged (2) if there is feedthrough between channels on the
internal analog switch it will be made consistently to ground rather than
to the last channel sampled.

I encountered this same issue when I had 10 volts from an opamp applied to
an ADC pin though a 100k resistor. The analog switch started leaking
between channels. I found that the above technique greatly reduced charge
injection to the other ADC pins, but I also found that ADC accuracy and
linearity was compromised under those conditions -- because the switch was
still leaking, just to ground rather than the other channels .

Ultimately, I resolved the issue by setting ADC inputs to outputs when they
went out of range. This resolved both the linearity and injection issues
without having to alter the PCB.
Post by RussellMc
On 24 August 2017 at 07:53, Van Horn, David <
Post by Van Horn, David
Hmm. That sounds like a "nothing you can do about it" kind of problem.
Charge injection in the sampling switch, maybe.
If you see a"physical" spike at the physical pin it suggests that current
is being supplied by the IC.
As speff says "charge injection" (more or less by definition) but, from
where.
Thoughts only
​Check that ALL ​
​other pins are within operating voltage spec ​and (to be safe) drive spec
as well.
Ensure no short glitches anywhere else.
Is there an external physical signal associated with the sampling that may
be being coupled to the pin.
Is the spike AT the pin only. ie is it to some degree at other pins.
Is it on the IC ground lead too?
Where is the scope probe ground?
Where in the sampling cycle does it occur?
How long/high?
How is the pin "grounded"? - Is the scope ground at the ground point for
the pin?
Russell
--
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://mailma
Van Horn, David
2017-08-24 14:39:31 UTC
Permalink
I'm doing that. Ground is sampled immediately before the ADC input, so I would hope the sampling cap is discharged.
That would still be a glitch, but it should be a negative glitch since the cap is discharged, and at least it won't depend on whatever other input was last sampled.
But.... That's not what I see.

I've tried moving the scope ground around, that doesn't affect anything. The grounding around the CPU is "aggressive" with two layers of solid ground, and maximum ground fill on three other layers, the last being VCC fill.
Bypassing of the CPU is "aggressive" including X2Y caps directly at the power pins with six ground vias each.
The source impedance to the PCB is low, and I have tried adding an opamp to drive the ADC pin.
It's not possible for the ADC pin to be driven out of the GND-VCC range.




-----Original Message-----
From: piclist-***@mit.edu [mailto:piclist-***@mit.edu] On Behalf Of Jason White
Sent: Thursday, August 24, 2017 3:52 AM
To: Microcontroller discussion list - Public.
Subject: Re: [EE] Pic24FJ128 "Hair" on ADC pin

I think you may find that if you make the ADC regularly and sample Vss that your glitch will reduce (if not disapper). Setting the ADC channel to the negative reference for a complete conversion cycle (ideally between real every sample taken) will ensure that (1) the sampling capacitor is completely discharged (2) if there is feedthrough between channels on the internal analog switch it will be made consistently to ground rather than to the last channel sampled.

I encountered this same issue when I had 10 volts from an opamp applied to an ADC pin though a 100k resistor. The analog switch started leaking between channels. I found that the above technique greatly reduced charge injection to the other ADC pins, but I also found that ADC accuracy and linearity was compromised under those conditions -- because the switch was still leaking, just to ground rather than the other channels .

Ultimately, I resolved the issue by setting ADC inputs to outputs when they went out of range. This resolved both the linearity and injection issues without having to alter the PCB.
Post by RussellMc
On 24 August 2017 at 07:53, Van Horn, David <
Post by Van Horn, David
Hmm. That sounds like a "nothing you can do about it" kind of problem.
Charge injection in the sampling switch, maybe.
If you see a"physical" spike at the physical pin it suggests that
current is being supplied by the IC.
As speff says "charge injection" (more or less by definition) but,
from where.
Thoughts only
​Check that ALL ​
​other pins are within operating voltage spec ​and (to be safe) drive
spec as well.
Ensure no short glitches anywhere else.
Is there an external physical signal associated with the sampling
that may be being coupled to the pin.
Is the spike AT the pin only. ie is it to some degree at other pins.
Is it on the IC ground lead too?
Where is the scope probe ground?
Where in the sampling cycle does it occur?
How long/high?
How is the pin "grounded"? - Is the scope ground at the ground point
for the pin?
Russell
--
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
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailma
Bob Blick
2017-08-24 23:25:16 UTC
Permalink
Hi David,

It's not just a measuring problem, like your scope ground lead picking up something extraneous?

Do you have another ADC input you can enable to verify that it's definitely only that pin glitching when you sample that pin?

________________________________________
From: piclist-***@mit.edu <piclist-***@mit.edu> on behalf of Van Horn, David
Sent: Wednesday, August 23, 2017 11:16 AM
To: Microcontroller discussion list - Public.
Subject: [EE] Pic24FJ128 "Hair" on ADC pin

What would cause sharp positive going "hair" on an ADC input?

The ADC is reading ground immediately before, so the sample/hold cap should be discharged, yet every time I sample I see this sharp positive spike on the ADC input pin.
I don't believe there is anything else happening with that pin, and it's always an ADC input.
Sean Breheny
2017-08-25 13:07:09 UTC
Permalink
You might also try connecting the scope probe gnd and tip together and
touching both to the same ground node you are using for your measurement
and see if the fuzz is still there.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Van Horn, David
2017-08-25 14:19:17 UTC
Permalink
It's not the probe, and measuring ground is quiet.

-----Original Message-----
From: piclist-***@mit.edu [mailto:piclist-***@mit.edu] On Behalf Of Sean Breheny
Sent: Friday, August 25, 2017 7:07 AM
To: Microcontroller discussion list - Public.
Subject: Re: [EE] Pic24FJ128 "Hair" on ADC pin

You might also try connecting the scope probe gnd and tip together and touching both to the same ground node you are using for your measurement and see if the fuzz is still there.
--
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...