View previous topic :: View next topic |
Author |
Message |
arrow
Joined: 17 May 2005 Posts: 213
|
A/D using a Vrefenece > V supply? |
Posted: Thu Aug 10, 2006 11:30 pm |
|
|
Hi
I have been doing A/D using Vsupply to the PIC (5V) as the reference. (I assume this is the default since I did not have to specify it anywhere).
I would like to migrate to the LF PIC and use 3V supply.
However my sensor has to operate at 5V. Thus as I understand it the A/D has to be at 5V as well.
I was wondering if I could use the Vreference at 5V while Vsupply to the PIC is 3V?
If yes, could someone please tell me how I can do this exactly?
Thank you
a. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Fri Aug 11, 2006 2:42 am |
|
|
You cannot connect this directly to the PIC. It could result in the destruction of the PIC or at least put it in latchup mode.
Instead leave you PIC setup with VDD as the reference (now 3.3 volts) and scale your inputs. If you were using an opamp then you could change the gain. For example, if your opamp previoulsy had a gain of 100 you will now need a gain of 100/5*3.3=66 to give you the same scale factor. This means your PIC program does not need to be modified.
If you do not have opamps on the front end then you could use voltage divides to give similar scaling. You need to keep the resistance value low in order not to impact the A/D reading. If this is not poosible you can use higher values of resistance (despite what it says in the data sheet) providing you incease the time between selecting a channel and taking a reading. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
arrow
Joined: 17 May 2005 Posts: 213
|
|
Posted: Fri Aug 11, 2006 2:49 am |
|
|
Hi Asmallri
Thank you for your suggestions.
I will use high values of R V divider (to limit current drain), and then an op amp follower. This should work, right?
Regards
a. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
|
|