Searching \ for 'Need help with PIC A/D (range setting,' 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=a%2Fd
Search entire site for: 'Need help with PIC A/D (range setting,'.

Truncated match.
PICList Thread
'Need help with PIC A/D (range setting,'
1996\06\09@183909 by Mark K Sullivan

flavicon
face
> I decided to use a voltage divider with a ratio of 1:4. The
>output of the divider goes through a unity gain (single power supply +5v)
>op-amp and into the PIC's analog input.
snip
> I would prefer to use
>VDD as the A/D's reference voltage (TO REDUCE HARDWARE). An 8-18V input
>voltage would be divided down to 2-4.5 volts. How can I represent such
>a specific range with an 8 bit digital conversion?

As long as you are using an op-amp, why not offset and scale the signal to a 0
to 5 volt range?  This will let you get the most resolution out of your 8 bits.

- MArk Sullivan -

1996\06\10@002006 by T.Nelson

flavicon
picon face
On Sun, 9 Jun 1996, NEIL GANDLER wrote:

>  I am about to use a PIC16C74 for A/D conversion and have the following
> questions.
>
>         1. I have a signal that ranges between 8-180VDC that I want
> to sample. I decided to use a voltage divider with a ratio of 1:4. The
> output of the divider goes through a unity gain (single power supply +5v)
> op-amp and into the PIC's analog input. Is this a good design practice?
> I thought of just using the voltage divider without the buffer, but
> this would cause sampling errors when charging the internal sampling capacitor
> It also may not have met the minium impedence requirement of 10K. Anyone have
> a simpler method?

Personally - I would never let that kind of voltage get close to anything
crucial (like the PIC).  As you've outlined - you have a common ground
and shorting your high voltage to something else will happen sooner or later.

So, in my opinion - what you're doing is NOT good design practice.

I suggest running your high voltage through a opto-isolator (like a 4N25
- DigiKey has a good selection of opto-isolators OR I beleive Radio Shack
carries the 4N25).  I would put the opto far away from the PIC (not right
next to each other on a PC board) and have all high voltage lines/traces
covered with something AND use test points for the high voltage that are
hard to get to (I use insulated test points that you have to stick a
probe into to get a reading).

That's my 2 cents.

                                \\\|///
                              \\  ~ ~  //
                               (  @ @  )
--|---------------------------oOOo-(_)-oOOo----------------------------------
--| Troy D.F. Nelson                     | EMAIL  spam_OUTnelsonTakeThisOuTspamcerc.wes.army.mil
--| Coastal Engineering Research Center  | Voice  601-634-3568
--| USAE Waterways Experiment Station    | FAX    601-634-3151
--|------------------------------------Oooo.---------------------------------
                           .oooO     (   )
                           (   )      ) /
                            \ (      (_/
                             \_)

1996\06\10@011928 by Neil Gandler

flavicon
face
On Sun, 9 Jun 1996, Mark K Sullivan wrote:

> > I decided to use a voltage divider with a ratio of 1:4. The
> >output of the divider goes through a unity gain (single power supply +5v)
> >op-amp and into the PIC's analog input.
> snip
> > I would prefer to use
> >VDD as the A/D's reference voltage (TO REDUCE HARDWARE). An 8-18V input
> >voltage would be divided down to 2-4.5 volts. How can I represent such
> >a specific range with an 8 bit digital conversion?
>
> As long as you are using an op-amp, why not offset and scale the signal to a 0
> to 5 volt range?  This will let you get the most resolution out of your 8
bits.
>
> - MArk Sullivan -
>
So, I assume from your reponse that the range is set from 0-5 volts for
the A/D , that it is not user selectable.

Neil

1996\06\10@104409 by Mark K Sullivan

flavicon
face
The input range of the A/D is from Vss (chip ground) to Vref.  If you use Vdd
(+5V) as the reference, that will set the range to 0 to 5V.  You can use a Vref
lower than Vdd but not higher.  If you use Vref lower than Vdd, be aware that
some noise components do not scale with the reference and will therefore be
larger relative to the full scale range than with Vref=Vdd.  These remarks apply
to the 8 bit successive approximation converter used in the 16C7x devices.  More
resolution and flexibility is available with the PIC14000 device, at the cost of
slower conversion rate and more money.

- Mark Sullivan -

1996\06\10@230647 by Martin J. Maney

flavicon
face
On Sun, 9 Jun 1996, NEIL GANDLER wrote:

>  I am about to use a PIC16C74 for A/D conversion and have the following
> questions.

Answer 0: you want to review the errata sheet.  You probably ought to do
this anyway, but it's especially desirable if you're using the A/D
converters (assuming the 74 is similar to the 73).

>         1. I have a signal that ranges between 8-180VDC that I want
> to sample. I decided to use a voltage divider with a ratio of 1:4. The
> output of the divider goes through a unity gain (single power supply +5v)
> op-amp and into the PIC's analog input. Is this a good design practice?

Not if that "180" isn't a typo!  Assuming it was supposed to be "18",
sure, this is good.  If the divider can be made fairly low impedance,
however, there's really nothing much to gain by using the buffer stage.

> I thought of just using the voltage divider without the buffer, but
> this would cause sampling errors when charging the internal sampling capacitor

No, it would just increase the necessary sampling time.  Since the
internal resistance is already on the order of several K ohms (from
memory), the external divider won't add much unless it needs to be very
high impedance.

> It also may not have met the minium impedence requirement of 10K. Anyone have
> a simpler method?

That's a _maximum_ of 10K, and it's only recommended - if your
application can tolerate a larger, varying offset due to the input
leakage, and the longer sampling times aren't a problem, you probably
could get away with exceeding 10K.  But that's 10K impedance looking back
from the A/D input.

>         2. How do I set my range of A/D conversion. I would prefer to use
> VDD as the A/D's reference voltage (TO REDUCE HARDWARE). An 8-18V input
> voltage would be divided down to 2-4.5 volts. How can I represent such
> a specific range with an 8 bit digital conversion?

If getting a range of about 128 counts out of the converter is adequate,
then all you need to do is to run the (buffered?) scaled input into one
of the PIC's analog inputs and setup the A/D appropriately: one of the
options is to use Vdd as the reference.  This is all pretty clearly
described in the data sheet.  From this description, it sounds as if the
only item from the errata you need to be concerned with is setting the
conversion clock to something reasonably close to its maximum allowable
speed, since there turns out to be a significant holding-capacitor droop
with slower clocks.  If you're at all like me you would have done this
anyway, just on the principle that there's nothing to be gained by
running it slower than necessary.  :-)

Luck!

1996\06\10@234245 by Neil Gandler
flavicon
face
On Mon, 10 Jun 1996, Martin J. Maney wrote:

> On Sun, 9 Jun 1996, NEIL GANDLER wrote:
>
> >  I am about to use a PIC16C74 for A/D conversion and have the following
> > questions.
>
> Answer 0: you want to review the errata sheet.  You probably ought to do
> this anyway, but it's especially desirable if you're using the A/D
> converters (assuming the 74 is similar to the 73).
>
Where could I get this errata sheet. It never came with the databooks.
Thanks
Neil

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