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

negative V into A/D on 16F877?

Status
Not open for further replies.

JimS

Newbie level 1
Joined
Jan 11, 2003
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
13
16f877a adc negative vref

Hi,
I'm trying to read in a pH sensor that outputs anywhere from +1.6v to -1.6v by using a PIC16F877's A/D converter. Unfortunately, I can't figure out how to deal with the negative voltage range. Can I just apply a -1.6v to RA2/AN2/VREF- and have the ADC give me my 10bits scaled from -1.6v to +1.6v?

thank you
 

sc/mp

Full Member level 2
Joined
Feb 10, 2002
Messages
128
Helped
7
Reputation
14
Reaction score
6
Trophy points
1,298
Activity points
1,054
16f877 quale vref max

No you can't

You must shift voltage before apply it to the pic.
Use an AOP to sum the PH voltage with a constant one.
You can also use two resistors so that the middle point
is always > 0V
 

Sobakava

Full Member level 6
Joined
Mar 27, 2002
Messages
350
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
3,346
It may burn adc of pic for higher voltages.
 

RegUser_2

Full Member level 2
Joined
Dec 24, 2001
Messages
125
Helped
11
Reputation
22
Reaction score
9
Trophy points
1,298
Activity points
1,507
Isn't the PIC ADC a capacitive type?

If so it'll accept negative inputs to the ADC and you will have to tell (program) the ADC that you want bipolar input.
 

sc/mp

Full Member level 2
Joined
Feb 10, 2002
Messages
128
Helped
7
Reputation
14
Reaction score
6
Trophy points
1,298
Activity points
1,054
Here are max ratings voltage for 16f876 :
 

ebenni

Advanced Member level 4
Joined
Jan 30, 2002
Messages
105
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
Turkey
Activity points
545
here is another method,
 

KamW

Advanced Member level 4
Joined
Jul 16, 2001
Messages
113
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
1,130
Why not use any single supply, 5V opamp configuration, with 2.5V ref. so -1.6 -> 0.9, 1.6 -> 4.1

regards
KamW
 

bunalmis

Full Member level 5
Joined
Jan 3, 2003
Messages
268
Helped
19
Reputation
38
Reaction score
11
Trophy points
1,298
Location
Ireland
Activity points
2,147
PIC ADC input voltage must be in 0 to Vcc range.
You can use voltage adder using single opamp, If you want to measure negative voltages.

If your input signal levels -1.6 to +1.6v you can add 1.6v
now your range 0..3.2v and you can apply the pic.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top