Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

ADC Vref+ Vref- in 18F4550

Status
Not open for further replies.

UroBoros

Advanced Member level 2
Joined
May 5, 2004
Messages
642
Helped
19
Reputation
38
Reaction score
8
Trophy points
1,298
Location
Cochin - India
Activity points
6,457
18f4550 adc

Hello

Is it possible in 18F4550

I have Vref- as 2 volts and Vref+ as 3 volts AN2 and AN3

The range is now only 1 volts. But the ADC is erratic.

Is this range not possible in PIC or my programming problem?

please

picstudent
 

blueroomelectronics

Advanced Member level 5
Joined
Sep 17, 2006
Messages
1,686
Helped
179
Reputation
356
Reaction score
77
Trophy points
1,328
Location
Toronto, Canada
Activity points
8,700
vref pic

There must be at least 2.5V difference between Vref+ & Vref-

Added after 22 seconds:

Picstudent said:
Hello

Is it possible in 18F4550

I have Vref- as 2 volts and Vref+ as 3 volts AN2 and AN3

The range is now only 1 volts. But the ADC is erratic.

Is this range not possible in PIC or my programming problem?

please

picstudent
 

    UroBoros

    points: 2
    Helpful Answer Positive Rating

xorcise

Full Member level 2
Joined
Sep 27, 2007
Messages
124
Helped
20
Reputation
40
Reaction score
1
Trophy points
1,298
Location
NYC
Activity points
2,169
pic vref

I have used a 2.5V ADC reference with this PIC running at 5V successfully for ADC readings, but this is not the recommended range. If Vdd is 3V or more, like the typical 5V for instance, the range limits between Vref+ and Vref- is 3V. It can be more, but not less. In some applications using a 4.096V reference is popular because of the nice voltage division values.

According to the chart from the datasheet (below) you can have as little as 1.8V difference between Vref+ and Vref- if your primary Vdd voltage to ground is less than 3V. Remember, if you choose to power the PIC with less voltage (down to 2V is possible), you cannot run at the highest oscillator speeds. You will have to reduce the oscillator according to the datasheet's chart.

Here is the datasheet chart... note A20:

 

    UroBoros

    points: 2
    Helpful Answer Positive Rating

UroBoros

Advanced Member level 2
Joined
May 5, 2004
Messages
642
Helped
19
Reputation
38
Reaction score
8
Trophy points
1,298
Location
Cochin - India
Activity points
6,457
pic adc vref

hello

Thanks a lot for the info. Saved a lot of my time. I was desperately trying to fix ADC hardware by some bypass capacitors and all.

btw with normal ADC reference (that is 5 volts) my ADC shows litle higher value.
is. LM35 shows some 34 degrees. calculation part is ok.

Any issue with conversion speed or something?

What is the normal cause for ADC showing a higher value?

thanks

picstudent
 

blueroomelectronics

Advanced Member level 5
Joined
Sep 17, 2006
Messages
1,686
Helped
179
Reputation
356
Reaction score
77
Trophy points
1,328
Location
Toronto, Canada
Activity points
8,700
adc vref

I've used an LM34 and LM35 with a TL431 on VREF+
Absolutely rock solid A/D with the 16F917 even though it's only 2.5 delta A/D ref.
I'll switch to a 4.096 shunt diode and try that. Conversion will be very easy.

The Cricket prototype, the 0x132 in the display is the raw A/D value
 

    UroBoros

    points: 2
    Helpful Answer Positive Rating

UroBoros

Advanced Member level 2
Joined
May 5, 2004
Messages
642
Helped
19
Reputation
38
Reaction score
8
Trophy points
1,298
Location
Cochin - India
Activity points
6,457
vref+

Thanks for the reply.

can you give some more details on how to use TL431 to derive 4.096 refernce?

Presently I am using 5 volts refernce and a voltage divider of 10k:82.5k divider so that maximum voltage measurable is 51.20.

ADC division then will be 5 millivolt.

thanks

picstudent
 

blueroomelectronics

Advanced Member level 5
Joined
Sep 17, 2006
Messages
1,686
Helped
179
Reputation
356
Reaction score
77
Trophy points
1,328
Location
Toronto, Canada
Activity points
8,700
adc con 18f4550

The TL431 is a 2.5V reference, just a 2.7K resistor is all that's needed. But it can be programmed to other voltages.
Using a simple voltage divider means it's only as accurate as your power supply. A precision reference will provide much better accuracy.
Not sure about your math, a 10K:82.5K with a 5V VDD will give you a VREF+ of 4.4595V and your 10bit A/D will be 0.00435498046875V per step. Tough number to work with.
What is 51.20?
 

Sajjadkhan

Full Member level 5
Joined
Sep 25, 2010
Messages
307
Helped
17
Reputation
34
Reaction score
16
Trophy points
1,298
Location
Rawalpindi,Pakistan
Activity points
4,199
Sorry for bumping the thread. All i need is to ask a question.

I want to measure voltage up to 51V(with 0.1V accuracy). Up to 25.5V can be easily measured as 0.1V/bit.

Using a voltage divider which gives 5v on 51V. here is what i want to do.

Vref (-) = 0v, vref(+)=2.5V ---> the adc can measure up to 25.5v.

When analog voltage reaches to 25.5V (i.e. adc value = 255 dec)my 8052 will switches Vref(-)=2.5 and Vref(+)=5.Now if adc output is 0 then it means the previous 25.5 was the answer but if the output of the adc is suppose 15 decimal then voltage is 25.5 + 1.5 =27V.

Problem is with Vref(-). I used a PNP transistor, emitter connected to 5v supply and collector is connect to POT upper leg, mid leg is fed to voltage follower and 3rd leg is grounded. The base of the PNP is connected to a resistor which is then connected to Mikro Controller. The POT is tuned so that when there is 0V on PNP base then there will be 2.5V at the POT mid leg and so as voltage follower op-amp. and when 5 v on the base then 0V on op-amp.

The circuit alone works fine but when connected to Vref(-) then there is always 0.66-0.7V on Vref(-). What causes the problem?
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top