PDA

View Full Version : PIC AD + Vref- using external IC



jorge
- 18th June 2007, 11:01
Hi,

I have been using the AD on a 16f877A with no problems till now , but at the present , in order to change the AD resolution , I need to use the Vref- ( 0 is will not be zero /Vss , but will be 1.8v …) As so , I have been wandering around for a good stabilised Vref of 1.8 to connect to my Vref - ….Any suggestion , advices ? Any good and cheap IC you have been using to get similar V ref outputs?

Note: as you know the standard V divisor using R is really not good, fluctuates a lot, so this hint is out of the deck ;-) .

Thanks for any help!

Regards,
Jorge

Acetronics2
- 18th June 2007, 12:35
Hi, Jorge

Did you , eventually, had a look to the PIC datasheet ... chapter 13 ( you know, the good luck number ... )

To be clear , at what is called, CVRef PIN ...

Alain

jorge
- 18th June 2007, 21:30
i may be missing something ..but in my manual chapter 13 is instruction set summary ...and the one for the AD is the chapter 11...
I saw both...but i really dont know what are you leading me in :-) ?
BTW , i also believe in always RTFM :-) ...

I will explain better my problem , my sensor always outputs ( in standby status 1.8v , and it increases like 0.2mv until it reaches the 5v - since i am using the AD with 0 to 5v refs, and so i make a simple offset routine to "reset it" but ...this way i am only able to read it to 5v ..losing the "end part output above 5v ” ...so what i am trying to do is starting in 1.8 as 0 and going til "5+1.8 v" .... am i messing it up or thinking like a drunk guy ? cant I use an external IC to give to pin Vref- an V- reference different than 0 ?
i know i could workout with some opamps and rescale it ...but i thought i could be able to use Vref- to an voltage reference IC to achieve this ?!?

thanks.


Hi, Jorge

Did you , eventually, had a look to the PIC datasheet ... chapter 13 ( you know, the good luck number ... )

To be clear , at what is called, CVRef PIN ...

Alain

skimask
- 18th June 2007, 23:15
See if I got this straight:
You have now:
Sensor minimum 1.8v - maximum 5v
(PIC A/D minimum 0v - maximum 5v)

You want to shift the input down by 1.8v, so a zero input is really a ZERO input, then you want to multiply that input by 1.5625 so you can regain the full range of 0-5v at the A/D input?

You could do all the above...but, yes, you can reference the Vref- to 1.8v giving you a new ZERO (0) at the A/D input, and use 5v for Vref+ giving you MAX (1023 for 10bit A/D) at the A/D input of the PIC. You could use something as simple as 3 silicon diodes in series or even a red led (hand picked parts of course) as this would give you the 1.8v needed for Vref-. Of course the Vf would vary a bit, temperature, etc. But using the red led would also give you a power led.

And what is this sensor? How much accuracy do you REALLY need?

mister_e
- 18th June 2007, 23:30
lm4128, LM4132 are nice. more you pay, more they're accurate.

jorge
- 19th June 2007, 01:59
lm4128, LM4132 are nice. more you pay, more they're accurate.

Thanks , i will try them !

jorge
- 19th June 2007, 02:05
See if I got this straight:
You have now:
Sensor minimum 1.8v - maximum 5v
(PIC A/D minimum 0v - maximum 5v)

You want to shift the input down by 1.8v, so a zero input is really a ZERO input, then you want to multiply that input by 1.5625 so you can regain the full range of 0-5v at the A/D input?

You could do all the above...but, yes, you can reference the Vref- to 1.8v giving you a new ZERO (0) at the A/D input, and use 5v for Vref+ giving you MAX (1023 for 10bit A/D) at the A/D input of the PIC. You could use something as simple as 3 silicon diodes in series or even a red led (hand picked parts of course) as this would give you the 1.8v needed for Vref-. Of course the Vf would vary a bit, temperature, etc. But using the red led would also give you a power led.

And what is this sensor? How much accuracy do you REALLY need?

Hi, first of all thanks for you reply.
Regarding the sensor it īs a pressure sensor. And regarding the reason , it is simple: since i am discarding by software the first 1.8v of the 5v AD readings i am loosing almost ~36% of the pressure range i could obtain -> 1.8v to 5v only !!!...3.2v only to be converted into valid/useful steps of the AD!
Thanks again for the LED hint , but i really need a Temp free device...