CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ADC Clamping on 18F452

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
nilsener
Guest







ADC Clamping on 18F452
PostPosted: Mon Oct 14, 2002 8:07 am     Reply with quote

Dear,

PCWH 3.110 and 18F452

I use all the eight ADC channels, the impedance of my analog sources are 2,5 kOhm. The range of the analog source voltage is 0V ... +12V. If any of the analog source voltage exceeds the positiv supply voltage +vdd=5V of the PIC, the voltage at the input pin clamps at approx 5,6V because of the internal diode to +vdd. No problem, that meets the specification. The problem is that a clamping input pin has influence on the conversion result of the other channels, actually not clamping. I have measured, the current that flows into the clamping pin partly returns on the other pins that are not clamping and so voltage is rising up.

I can not use zener diodes to clamp extern because I need the full range of 0V..+5V. To avoid clamping I have tried to drive all analog input pins low if they are not needed but the result are other problems.

Anyone out there with an idea to solve this problem ?


___________________________
This message was ported from CCS's old forum
Original Post ID: 7808
Tomi
Guest







Re: ADC Clamping on 18F452
PostPosted: Mon Oct 14, 2002 8:33 am     Reply with quote

If you use the Vcc as reference voltage for A/D (internal reference) then you will get false A/D results because the reference voltage is rised up to 5.6V (or more) regardless of the state of the other input pins.
It would be better to keep input voltages in the standard operating range so divide your 0-12V input to 0-5V by a resistor pair.
___________________________
This message was ported from CCS's old forum
Original Post ID: 7809
R.J.Hamlett
Guest







Re: ADC Clamping on 18F452
PostPosted: Mon Oct 14, 2002 8:37 am     Reply with quote

:=Dear,
:=
:=PCWH 3.110 and 18F452
:=
:=I use all the eight ADC channels, the impedance of my analog sources are 2,5 kOhm. The range of the analog source voltage is 0V ... +12V. If any of the analog source voltage exceeds the positiv supply voltage +vdd=5V of the PIC, the voltage at the input pin clamps at approx 5,6V because of the internal diode to +vdd. No problem, that meets the specification. The problem is that a clamping input pin has influence on the conversion result of the other channels, actually not clamping. I have measured, the current that flows into the clamping pin partly returns on the other pins that are not clamping and so voltage is rising up.
:=
:=I can not use zener diodes to clamp extern because I need the full range of 0V..+5V. To avoid clamping I have tried to drive all analog input pins low if they are not needed but the result are other problems.
:=
:=Anyone out there with an idea to solve this problem ?

Clamp externally with your own diodes to the +5v rail. Your existing system is dangerous, since with a 2.5kohm source, if several went to +5v, it could increase the 5v rail, resulting in an inaccurate reading anyway. So something like:

ip - 10k resistor - clamp diode to +5v. Then from the junction between the resistor and the clamp diode, drive a non-inverting op-amp, to feed the A/D input. This way the current potentially being fed into the 5v rail, is only 0.64mA for each signal in the worst case, yet the A/D still sees a low impedance. Though the inputs are allowed to sink up to +/-20mA, this is not a feature that should be used in design, but a damage limit. The clamp diodes go to a common rail internally, and you could potentially be asking this to sink nearly 20mA, and the voltage on this rail _will_ rise, if this sort of current is drawn...

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 7810
david smith
Guest







Re: ADC Clamping on 18F452
PostPosted: Mon Oct 14, 2002 12:54 pm     Reply with quote

:=I use all the eight ADC channels, the impedance of my analog sources are 2,5 kOhm.

I ran into this with an external ADC whose input must be clamped. Prior posts are correct. I ended up putting a precision clamp circuit using opamps to achieve the voltage range and maintain a low impedance. Despite data sheets, ADCs want a low constant Zin. Clamp circuit is more complicated when signal speed increases beyond 1kHz. You can't get safety and precision with just diodes and resistors.
___________________________
This message was ported from CCS's old forum
Original Post ID: 7820
John Yaron
Guest







Re: ADC Clamping on 18F452
PostPosted: Mon Oct 14, 2002 7:31 pm     Reply with quote

:=Dear,
:=
:=PCWH 3.110 and 18F452
:=
:=I use all the eight ADC channels, the impedance of my analog sources are 2,5 kOhm. The range of the analog source voltage is 0V ... +12V. If any of the analog source voltage exceeds the positiv supply voltage +vdd=5V of the PIC, the voltage at the input pin clamps at approx 5,6V because of the internal diode to +vdd. No problem, that meets the specification. The problem is that a clamping input pin has influence on the conversion result of the other channels, actually not clamping. I have measured, the current that flows into the clamping pin partly returns on the other pins that are not clamping and so voltage is rising up.
:=
:=I can not use zener diodes to clamp extern because I need the full range of 0V..+5V. To avoid clamping I have tried to drive all analog input pins low if they are not needed but the result are other problems.
:=
:=Anyone out there with an idea to solve this problem ?
:=
:=

I am at this moment laying out a diff-amp w/gain input
front-end for an 18F458. Thanks for the head's up.
I too was counting on the +/-20ma clamps on RA1-RA4.

My gadget is a 4 channel 'graphing multimeter' since the
bandwidth with using the 18F458 doesn't really justify
it being termed a 'scope'.

I figure if any channel 'clamps out', I'll just just paint
an 'uncal' notifier on the pc based multimeter application.

Comments?
___________________________
This message was ported from CCS's old forum
Original Post ID: 7825
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group