Searching \ for '[PIC] 12F675 and A2D when exceeding 5V on AN0' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=a2d
Search entire site for: '12F675 and A2D when exceeding 5V on AN0'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] 12F675 and A2D when exceeding 5V on AN0'
2005\05\01@083428 by laura capaldi

picon face
Hi,

I'm planing to use the A2D functionality of the 12F675 to convert 0-10V out to a 0-1024 range, 10 bit A2D conversion. Everything on the 12F675 looks good for that. My question is whether I have to supply a 10V for Vref/GP1/AN1 or is there a way to scale VDD internally such that I can get a 0-10V mapping on the A2D conversion that is performed on AN0?

Thanks,
Laura


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

2005\05\01@090831 by olin_piclist

face picon face
laura capaldi wrote:
> My question is whether I have to supply a 10V for Vref/GP1/AN1

Not if you want your PIC to live, or you're really certain that "absolute
maximum" doesn't apply to you.

Use a voltage divider to scale the 10V down to 5V into the PIC.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\01@093315 by Jinx

face picon face
> I'm planing to use the A2D functionality of the 12F675 to convert
> 0-10V out to a 0-1024 range, 10 bit A2D conversion. Everything
> on the 12F675 looks good for that. My question is whether I have
> to supply a 10V for Vref/GP1/AN1 or is there a way to scale VDD
> internally such that I can get a 0-10V mapping on the A2D conversion
> that is performed on AN0?

Hi Laura, 10V is way too high for Vref and exceeds the voltage rating
of the pin (Vdd + 0.3V). If you take a look  at Section 7.1.3 of the
12F675 d/s, there are two options for a voltage reference. Vdd or the
Vref pin. So you need to either (a) run the PIC on a reference voltage,
eg 4.096V or (b) have 5V for Vdd and use a reference voltage on the
Vref pin. You'll also need to scale down the 0-10V you want to measure
to get it in the pin's spec wrt Vdd. For best resolution, the higher Vref
the better

Say 4.096V is the reference. Therefore use a voltage divider to reduce
the 10V (max) to 4.096V for full-scale A2D reading. As the A2D is
10-bit, each bit of the A2D represents (4mV*divisor) of your 0-10V

If you assume that your 0-10V is actually 0-10.24V (but never reaches
10.24V, only 10V) then you could use a 5.12V reference (with Vdd
equal to at least this but not exceeding max rating). This would simplify
maths by allowing a direct integer multiplication. ie 10V is resistively
divided by 2 -> 0-5V. Vref is 5.12V. Therefore each bit represents
(5120/1024)*2 = 10mV. The highest result you'd get from the A2D
is h03E8 (= d1000), which represents 1000*10mV = 10V

Don't forget the impedance of the A2D input when choosing the
resistive divider. If your 10V to measure is high impedance you can
use suitable high value resistors then buffer the resulting voltage it with
an op-amp to get a lower impedance signal for the A2D input

2005\05\01@093812 by Matthew Miller

flavicon
face
Hi,

On Sun, May 01, 2005 at 05:34:27AM -0700, laura capaldi wrote:
>
> I'm planing to use the A2D functionality of the 12F675 to convert 0-10V
> out to a 0-1024 range, 10 bit A2D conversion. Everything on the 12F675
> looks good for that. My question is whether I have to supply a 10V for
> Vref/GP1/AN1 or is there a way to scale VDD internally such that I can get
> a 0-10V mapping on the A2D conversion that is performed on AN0?

You will have to scale down the 0-10V signal in some way. Vref can only
exceed Vdd by 0.3 volts. Using a voltage divider made from precision
resistors would be the easiest way to do this.

Matthew

--
"Every sensible man, every honest man, must hold the christian sect in
horror. 'But what shall we substitute in its place?' you say. What? A
ferocious animal has sucked the blood of my relatives. I tell you to rid
yourselves of this beast and you ask me what you shall put in its place?"
       -- Voltaire

2005\05\01@145312 by Wouter van Ooijen

face picon face
> I'm planing to use the A2D functionality of the 12F675 to
> convert 0-10V out to a 0-1024 range, 10 bit A2D conversion.
> Everything on the 12F675 looks good for that. My question is
> whether I have to supply a 10V for Vref/GP1/AN1

no, that would fry the chip

> or is there a
> way to scale VDD internally

again, supplying 10V to a pin would fry the chip

> such that I can get a 0-10V
> mapping on the A2D conversion that is performed on AN0?

us and external voltage divisor

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\05\02@041405 by ThePicMan

flavicon
face
At 05.34 2005.05.01 -0700, you wrote:
>Hi,
>
>I'm planing to use the A2D functionality of the 12F675 to convert 0-10V out
>to a 0-1024 range, 10 bit A2D conversion. Everything on the 12F675 looks
>good for that. My question is whether I have to supply a 10V for
>Vref/GP1/AN1 or is there a way to scale VDD internally such that I can get a
>0-10V mapping on the A2D conversion that is performed on AN0?
>
>Thanks,
>Laura

Hi Laura,
you will destroy the chip if you attempt that. Rather, use the chip with
its natural 0-5V range, and place a resistor voltage divider in front of
the interface, much better use an opamp as a buffer with 0.5x gain.

Ciao.


2005\05\03@181240 by Chetan Bhargava

picon face
Hi Laura,

You can use two 10 K resistors to make a voltage divider.

                          Ain
Vin--------R1----------+------------R2--------------Gnd

Vin - 0-10 volts in (voltage to be measured)
Ain - connect to ADC input
R1 - 10K
R2 - 10K
Gnd - Ground

Formula to calculate the divider is

Vout = Vin (R2/(R1+R2))
Vout = 10(10K/20K)
Vout = 10*0.5
Vout = 5v

So when your Vin is 10V your Vout will be 5V (full scale if you use 5V
reference).

Hope this helps.

--
Chetan Bhargava
Web: http://www.bhargavaz.net
Blog: http://microz.blogspot.com


On 5/1/05, laura capaldi <spam_OUTlauracapaldi01TakeThisOuTspamyahoo.com> wrote:
> Hi,
>
> I'm planing to use the A2D functionality of the 12F675 to convert 0-10V out to a 0-1024 range, 10 bit A2D conversion. Everything on the 12F675 looks good for that. My question is whether I have to supply a 10V for Vref/GP1/AN1 or is there a way to scale VDD internally such that I can get a 0-10V mapping on the A2D conversion that is performed on AN0?
>
> Thanks,
> Laura

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...